diff --git a/dashboard/src/components/CommunityAppDialog.vue b/dashboard/src/components/CommunityAppDialog.vue
index 7e0fdcc8b..35d075395 100644
--- a/dashboard/src/components/CommunityAppDialog.vue
+++ b/dashboard/src/components/CommunityAppDialog.vue
@@ -34,7 +34,11 @@ async function onSubmit() {
return console.error(error);
}
- const packageData = { ...result, versionsUrl: `${url}@${version || 'latest'}` };
+ const packageData = {
+ ...result, // { manifest, publishState, creationDate, ts }
+ versionsUrl: `${url}@${version || 'latest'}`,
+ iconUrl: result.manifest.iconUrl // compat with app store format
+ };
emit('success', packageData);
diff --git a/dashboard/src/views/AppstoreView.vue b/dashboard/src/views/AppstoreView.vue
index f9b7676d5..f96b26af7 100644
--- a/dashboard/src/views/AppstoreView.vue
+++ b/dashboard/src/views/AppstoreView.vue
@@ -165,7 +165,10 @@ async function onHashChange() {
});
}
- const packageData = { ...result, appStoreId: `${appId}@${version}` };
+ const packageData = {
+ ...result, // { id, creationDate, publishState, manifest, iconUrl }
+ appStoreId: `${appId}@${version}`
+ };
appInstallDialog.value.open(packageData, installedApps.value.length >= features.value.appMaxCount, domains.value);
}
}
diff --git a/package-lock.json b/package-lock.json
index ed0dae943..4a300cdd0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,7 +12,7 @@
"@aws-sdk/client-s3": "^3.974.0",
"@aws-sdk/lib-storage": "^3.974.0",
"@cloudron/connect-lastmile": "^2.3.0",
- "@cloudron/manifest-format": "^5.32.1",
+ "@cloudron/manifest-format": "^5.32.2",
"@cloudron/pipework": "^1.2.0",
"@cloudron/superagent": "^1.0.1",
"@google-cloud/dns": "^5.3.1",
@@ -1291,9 +1291,9 @@
"license": "MIT"
},
"node_modules/@cloudron/manifest-format": {
- "version": "5.32.1",
- "resolved": "https://registry.npmjs.org/@cloudron/manifest-format/-/manifest-format-5.32.1.tgz",
- "integrity": "sha512-dq54lx/YMO1TOoFfdZTArgU3UH+WOz57z8Tcafc09d82iKB40grZSVsT1AWuY+yw5aXbo8V0r5P9nDx/qzMejw==",
+ "version": "5.32.2",
+ "resolved": "https://registry.npmjs.org/@cloudron/manifest-format/-/manifest-format-5.32.2.tgz",
+ "integrity": "sha512-VzkJG2LwwDsxa9iaeh2VvUYrgxzgkUUHAo2bjr9C0eRqMCSYaMyKMWjO7529x+xRreFHJZ+kOjoQ6PpIkxOudg==",
"license": "MIT",
"dependencies": {
"ajv": "^8.17.1",
diff --git a/package.json b/package.json
index 0f5614d5f..bcc8f369d 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,7 @@
"@aws-sdk/client-s3": "^3.974.0",
"@aws-sdk/lib-storage": "^3.974.0",
"@cloudron/connect-lastmile": "^2.3.0",
- "@cloudron/manifest-format": "^5.32.1",
+ "@cloudron/manifest-format": "^5.32.2",
"@cloudron/pipework": "^1.2.0",
"@cloudron/superagent": "^1.0.1",
"@google-cloud/dns": "^5.3.1",
diff --git a/src/appstore.js b/src/appstore.js
index 438b3031e..d2eb242d7 100644
--- a/src/appstore.js
+++ b/src/appstore.js
@@ -396,7 +396,7 @@ async function getAppVersion(appId, version) {
if (response.status === 404) throw new BoxError(BoxError.NOT_FOUND, `Could not find app ${appId}`);
if (response.status !== 200) throw new BoxError(BoxError.EXTERNAL_ERROR, `App fetch failed. ${response.status} ${JSON.stringify(response.body)}`);
- return response.body;
+ return response.body; // { id, creationDate, publishState, manifest, iconUrl }
}
async function getApp(appId) {
diff --git a/src/community.js b/src/community.js
index 96875f552..d78854180 100644
--- a/src/community.js
+++ b/src/community.js
@@ -36,11 +36,7 @@ async function getAppVersion(url, version) {
const manifestError = manifestFormat.checkVersionsRequirements(versionData.manifest);
if (manifestError) throw new BoxError(BoxError.BAD_FIELD, `Invalid manifest: ${manifestError.message}`);
- return {
- id: versionData.manifest.id,
- iconUrl: versionData.manifest.iconUrl,
- ...versionData // { manifest, publishState, creationDate, ts }
- };
+ return versionData; // { manifest, publishState, creationDate, ts }
}
async function downloadManifest(versionsUrl) {
@@ -98,8 +94,6 @@ async function getAppUpdate(app, options) {
return {
id: app.manifest.id,
- creationDate: nextVersion.creationDate,
- manifest: nextVersion.manifest,
- unstable: nextVersion.publishState === 'approved'
+ ...nextVersion // { manifest, publishState, creationDate, ts }
};
}
diff --git a/src/routes/appstore.js b/src/routes/appstore.js
index bb8815251..1a2b257f7 100644
--- a/src/routes/appstore.js
+++ b/src/routes/appstore.js
@@ -37,10 +37,10 @@ async function getAppVersion(req, res, next) {
assert.strictEqual(typeof req.params.appstoreId, 'string');
assert.strictEqual(typeof req.params.versionId, 'string');
- const [error, manifest] = await safe(appstore.getAppVersion(req.params.appstoreId, req.params.versionId));
+ const [error, result] = await safe(appstore.getAppVersion(req.params.appstoreId, req.params.versionId));
if (error) return next(BoxError.toHttpError(error));
- next(new HttpSuccess(200, manifest));
+ next(new HttpSuccess(200, result)); // { id, creationDate, publishState, manifest, iconUrl }
}
async function unlinkAccount(req, res, next) {
diff --git a/src/routes/community.js b/src/routes/community.js
index 0314799ae..115a52726 100644
--- a/src/routes/community.js
+++ b/src/routes/community.js
@@ -17,5 +17,5 @@ async function getAppVersion(req, res, next) {
const [error, result] = await safe(community.getAppVersion(req.query.url, req.query.version));
if (error) return next(BoxError.toHttpError(error));
- next(new HttpSuccess(200, result));
+ next(new HttpSuccess(200, result)); // { manifest, publishState, creationDate, ts }
}