Skip to content

Commit f4a94d6

Browse files
Merge pull request #329 from DataDog/sdkennedy2/apps-hide-standalone-url
[APPS] Stop exposing raw index.html standalone URL Co-authored-by: sdkennedy2 <scott.kennedy@datadoghq.com>
2 parents d923ad3 + bed9e2f commit f4a94d6

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

packages/plugins/apps/src/upload.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,13 @@ Would have uploaded ${summary}`,
131131

132132
log.debug(`Uploaded ${summary}\n`);
133133

134-
if (response.version_id && response.application_id && response.app_builder_id) {
135-
const { version_id, application_id, app_builder_id } = response;
136-
const appUrl = `https://api.${context.site}/api/unstable/app-builder-code/apps/serve/${application_id}/v/${version_id}/index.html`;
137-
const appBuilderUrl = `https://app.${context.site}/app-builder/apps/${app_builder_id}`;
134+
if (response.app_builder_id) {
135+
const appBuilderUrl = `https://app.${context.site}/app-builder/apps/${response.app_builder_id}`;
138136

137+
log.info(`Your application is available at:\n ${cyan(appBuilderUrl)}`);
138+
}
139+
140+
if (response.version_id) {
139141
const releaseUrl = getReleaseUrl(context.site, context.identifier);
140142
await doRequest({
141143
auth: { apiKey: context.apiKey, appKey: context.appKey },
@@ -157,9 +159,7 @@ Would have uploaded ${summary}`,
157159
log.warn(message);
158160
},
159161
});
160-
log.info(
161-
`Your application is available at:\n${bold('Standalone :')}\n ${cyan(appUrl)}\n\n${bold('AppBuilder :')}\n ${cyan(appBuilderUrl)}`,
162-
);
162+
log.info(`Published uploaded version ${bold(response.version_id)} to live.`);
163163
}
164164
} catch (error: unknown) {
165165
const err = error instanceof Error ? error : new Error(String(error));

0 commit comments

Comments
 (0)