@forge/cli-shared

9.7.0-next.15-experimental-554d4179.7.0-next.14-experimental-fd0ebbc
out/apps/get-app-owner.js
~out/apps/get-app-owner.jsModified
+12−12
Index: package/out/apps/get-app-owner.js
===================================================================
--- package/out/apps/get-app-owner.js
+++ package/out/apps/get-app-owner.js
@@ -1,15 +1,25 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
-exports.GetAppOwnerQuery = exports.MissingAppOwnerError = void 0;
+exports.GetAppOwnerQuery = exports.GET_APP_OWNER = exports.MissingAppOwnerError = void 0;
 const graphql_1 = require("../graphql");
 const ui_1 = require("../ui");
 class MissingAppOwnerError extends Error {
     constructor() {
         super(ui_1.Text.env.error.appOwnerNotExist);
     }
 }
 exports.MissingAppOwnerError = MissingAppOwnerError;
+exports.GET_APP_OWNER = (0, graphql_1.graphql)(`
+  query forge_cli_getAppOwner($id: ID!) {
+    app(id: $id) {
+      createdBy {
+        name
+        accountId
+      }
+    }
+  }
+`);
 class GetAppOwnerQuery {
     graphqlClient;
     getAppConfig;
     constructor(graphqlClient, getAppConfig) {
@@ -20,19 +30,9 @@
         const { id: appId } = await this.getAppConfig();
         return this.getAppOwner(appId);
     }
     async getAppOwner(appId) {
-        const query = `
-      query forge_cli_getAppOwner($id: ID!) {
-        app(id: $id) {
-          createdBy {
-            name
-            accountId
-          }
-        }
-      }
-    `;
-        const { app } = await this.graphqlClient.query(query, {
+        const { app } = await this.graphqlClient.query(exports.GET_APP_OWNER, {
             id: appId
         });
         if (!app) {
             throw new graphql_1.MissingAppError();