@forge/cli

13.0.013.1.0-next.4-experimental-9423de1
out/service/installation-service.js
~out/service/installation-service.jsModified
+8−8
Index: package/out/service/installation-service.js
===================================================================
--- package/out/service/installation-service.js
+++ package/out/service/installation-service.js
@@ -52,25 +52,25 @@
             const matchInstallationId = !filterInstallationId || filterInstallationId === id;
             return matchProduct && matchSite && matchEnvironment && matchInstallationId;
         });
     }
-    async listAppInstallations(filter) {
-        const { id: appId } = await this.getAppConfig();
+    async listAppInstallations(filter, appIdOverride) {
+        const appId = appIdOverride ?? (await this.getAppConfig()).id;
         const installations = await this.listInstallationsClient.listInstallations(appId, filter);
         return { installations: this.filterInstallations(installations, { ...filter }) };
     }
-    async hasNoAppInstallationsForEnv(appEnv) {
-        const { id: appId } = await this.getAppConfig();
+    async hasNoAppInstallationsForEnv(appEnv, appIdOverride) {
+        const appId = appIdOverride ?? (await this.getAppConfig()).id;
         return this.hasNoAppInstallationsForEnvClient.hasNoAppInstallationsForEnv(appId, appEnv);
     }
-    async listNonTechnicalAppInstallations(filter) {
-        const { installations } = await this.listAppInstallations(filter);
+    async listNonTechnicalAppInstallations(filter, appIdOverride) {
+        const { installations } = await this.listAppInstallations(filter, appIdOverride);
         return {
             installations: installations.filter(({ product }) => product !== IDENTITY_PRODUCT_NAME && product !== JIRA_SERVICE_DESK_PRODUCT_NAME)
         };
     }
-    async findOnlyMatchingInstallation(filter) {
-        const filterInstalls = await this.listNonTechnicalAppInstallations(filter);
+    async findOnlyMatchingInstallation(filter, appIdOverride) {
+        const filterInstalls = await this.listNonTechnicalAppInstallations(filter, appIdOverride);
         if (!filterInstalls.installations.length) {
             throw new cli_shared_1.UserError(cli_shared_1.Text.error.invalidInstallationContext);
         }
         if (filterInstalls.installations.length !== 1) {