Skip to content

Commit 264d3d4

Browse files
Alfonso NoriegaAlfonso Noriega
authored andcommitted
fix: address review feedback — 3 bugs
1. Warning body now says 'version' instead of 'release' on deploy-without-release path 2. Skip appInstallCount API call when prompt will be skipped (--force / --allow-updates+--allow-deletes) 3. Pass remoteApp.id (Management API app ID) instead of options.appId (API key) to appInstallCount 4. Add nullish coalesce for installCount in AppManagementClient (type safety)
1 parent 8d91e15 commit 264d3d4

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

packages/app/src/cli/prompts/deploy-release.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ async function deployConfirmationPrompt({
162162
confirmation: appTitle,
163163
...(showInstallCountWarning
164164
? {
165-
body: `This release removes extensions and related data from ${installCount} app installations.\nUse caution as this may include production data on live stores.`,
165+
body: `This ${release ? 'release' : 'version'} removes extensions and related data from ${installCount} app installations.\nUse caution as this may include production data on live stores.`,
166166
}
167167
: {}),
168168
})

packages/app/src/cli/services/context/identifiers.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,14 @@ export async function ensureDeploymentIdsPresence(options: EnsureDeploymentIdsPr
5858
activeAppVersion: options.activeAppVersion,
5959
})
6060

61+
const shouldFetchInstallCount =
62+
extensionIdentifiersBreakdown.onlyRemote.length > 0 && !options.force && !(options.allowUpdates && options.allowDeletes)
63+
6164
let installCount: number | undefined
62-
if (extensionIdentifiersBreakdown.onlyRemote.length > 0) {
65+
if (shouldFetchInstallCount) {
6366
try {
6467
installCount = await options.developerPlatformClient.appInstallCount({
65-
id: options.appId,
68+
id: options.remoteApp.id,
6669
apiKey: options.remoteApp.apiKey,
6770
organizationId: options.remoteApp.organizationId,
6871
})

0 commit comments

Comments
 (0)