@forge/cli

13.2.0-next.4-experimental-094961613.2.0-next.12-experimental-28c9ab7
out/installations/graphql-client.js
~out/installations/graphql-client.jsModified
+16−2
Index: package/out/installations/graphql-client.js
===================================================================
--- package/out/installations/graphql-client.js
+++ package/out/installations/graphql-client.js
@@ -369,8 +369,9 @@
     handleFailedInstallOrUpgrade(result, hasMajorVersion, environment, environmentType) {
         const { errors, requestId } = result;
         const error = errors?.[0];
         const statusCode = error?.extensions?.statusCode;
+        const isRateLimited = statusCode === 429;
         const isUserError = statusCode && statusCode >= 400 && statusCode < 500 ? true : false;
         const code = error?.extensions?.errorType ?? undefined;
         if (code === ALREADY_INSTALLED_CODE) {
             throw new AlreadyInstalledError(requestId, statusCode ?? undefined, hasMajorVersion, environment, environmentType);
@@ -380,8 +381,11 @@
         }
         if (error && requestId) {
             error.message = cli_shared_1.Text.install.error.appendRequestIdToErrorMessage(error.message ?? undefined, requestId);
         }
+        if (error && isRateLimited) {
+            error.message = [error.message, cli_shared_1.Text.install.error.tooManyRequests].filter(Boolean).join('. ');
+        }
         throw new InstallationRequestFailedError(isUserError, code, (0, harmonized_app_installation_errors_1.expandHarmonizedAppInstallationError)(code, error?.message ?? undefined), requestId);
     }
     async uninstallApp(input) {
         const query = `
@@ -670,8 +674,12 @@
     async getVersions(appId, environmentKey, firstN = 1) {
         const query = `
       query forge_cli_getApplicationEnvironmentLatestVersions($appId: ID!, $environmentKey: String!, $firstN: Int!) {
         app(id: $appId) {
+          appFeatures {
+            key
+            value
+          }
           environmentByKey(key: $environmentKey) {
             type
             versions(first: $firstN) {
               nodes {
@@ -704,9 +712,10 @@
             throw new EnvironmentNotFoundError(environmentKey);
         }
         return {
             nodes: result.app.environmentByKey.versions?.nodes,
-            environmentType: result.app.environmentByKey.type
+            environmentType: result.app.environmentByKey.type,
+            appFeatures: result.app.appFeatures
         };
     }
     async getVersionByMajorVersionId(id, environmentKey, majorVersion) {
         if (!majorVersion) {
@@ -714,8 +723,12 @@
         }
         const query = `
       query forge_cli_getApplicationVersionList($id: ID!, $environmentKey: String!, $majorVersion: Int!) {
         app(id: $id) {
+          appFeatures {
+            key
+            value
+          }
           environmentByKey(key: $environmentKey) {
             type
             versions(majorVersion: $majorVersion) {
               nodes {
@@ -752,9 +765,10 @@
             return undefined;
         }
         return {
             nodes: app.environmentByKey.versions.nodes,
-            environmentType: app.environmentByKey.type
+            environmentType: app.environmentByKey.type,
+            appFeatures: app.appFeatures
         };
     }
 }
 exports.InstallationsGraphqlClient = InstallationsGraphqlClient;