Skip to content

Commit 040a430

Browse files
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 cc2c52d commit 040a430

2 files changed

Lines changed: 8 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: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,16 @@ export async function ensureDeploymentIdsPresence(options: EnsureDeploymentIdsPr
5858
activeAppVersion: options.activeAppVersion,
5959
})
6060

61+
const shouldFetchInstallCount =
62+
extensionIdentifiersBreakdown.onlyRemote.length > 0 &&
63+
!options.force &&
64+
!(options.allowUpdates && options.allowDeletes)
65+
6166
let installCount: number | undefined
62-
if (extensionIdentifiersBreakdown.onlyRemote.length > 0) {
67+
if (shouldFetchInstallCount) {
6368
try {
6469
installCount = await options.developerPlatformClient.appInstallCount({
65-
id: options.appId,
70+
id: options.remoteApp.id,
6671
apiKey: options.remoteApp.apiKey,
6772
organizationId: options.remoteApp.organizationId,
6873
})

0 commit comments

Comments
 (0)