@shopify/cli-kit 3.32.1 → 3.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +2 -6
- package/dist/constants.js +0 -4
- package/dist/constants.js.map +1 -1
- package/dist/file.d.ts +1 -1
- package/dist/git.js +1 -1
- package/dist/git.js.map +1 -1
- package/dist/http.js +2 -2
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/metadata.js +1 -1
- package/dist/metadata.js.map +1 -1
- package/dist/output.js +1 -1
- package/dist/output.js.map +1 -1
- package/dist/path.d.ts +1 -1
- package/dist/path.js +5 -3
- package/dist/path.js.map +1 -1
- package/dist/private/common/array.d.ts +1 -0
- package/dist/private/common/array.js +4 -0
- package/dist/private/common/array.js.map +1 -0
- package/dist/private/node/analytics.js +6 -9
- package/dist/private/node/analytics.js.map +1 -1
- package/dist/private/node/api/graphql.js +1 -0
- package/dist/private/node/api/graphql.js.map +1 -1
- package/dist/private/node/api/headers.js +1 -1
- package/dist/private/node/api/headers.js.map +1 -1
- package/dist/private/node/api/rest.d.ts +6 -0
- package/dist/private/node/api/rest.js +27 -0
- package/dist/private/node/api/rest.js.map +1 -0
- package/dist/private/node/environment/service.d.ts +18 -0
- package/dist/private/node/environment/service.js +32 -0
- package/dist/private/node/environment/service.js.map +1 -0
- package/dist/{environment → private/node/environment}/spin-cache.d.ts +0 -0
- package/dist/{environment → private/node/environment}/spin-cache.js +0 -0
- package/dist/private/node/environment/spin-cache.js.map +1 -0
- package/dist/{environment → private/node/environment}/utilities.d.ts +0 -0
- package/dist/{environment → private/node/environment}/utilities.js +0 -0
- package/dist/private/node/environment/utilities.js.map +1 -0
- package/dist/{session → private/node/session}/authorize.d.ts +1 -5
- package/dist/{session → private/node/session}/authorize.js +9 -9
- package/dist/private/node/session/authorize.js.map +1 -0
- package/dist/{session → private/node/session}/device-authorization.d.ts +0 -0
- package/dist/{session → private/node/session}/device-authorization.js +7 -9
- package/dist/private/node/session/device-authorization.js.map +1 -0
- package/dist/{session → private/node/session}/exchange.d.ts +2 -2
- package/dist/{session → private/node/session}/exchange.js +5 -5
- package/dist/private/node/session/exchange.js.map +1 -0
- package/dist/{session → private/node/session}/identity-token-validation.d.ts +0 -0
- package/dist/{session → private/node/session}/identity-token-validation.js +4 -4
- package/dist/private/node/session/identity-token-validation.js.map +1 -0
- package/dist/{session → private/node/session}/identity.d.ts +1 -1
- package/dist/{session → private/node/session}/identity.js +2 -3
- package/dist/private/node/session/identity.js.map +1 -0
- package/dist/{session → private/node/session}/post-auth.d.ts +1 -1
- package/dist/{session → private/node/session}/post-auth.js +3 -3
- package/dist/private/node/session/post-auth.js.map +1 -0
- package/dist/{session → private/node/session}/redirect-listener.d.ts +0 -0
- package/dist/{session → private/node/session}/redirect-listener.js +2 -2
- package/dist/private/node/session/redirect-listener.js.map +1 -0
- package/dist/{session → private/node/session}/schema.d.ts +1 -1
- package/dist/{session → private/node/session}/schema.js +1 -1
- package/dist/private/node/session/schema.js.map +1 -0
- package/dist/{session → private/node/session}/scopes.d.ts +1 -1
- package/dist/{session → private/node/session}/scopes.js +2 -2
- package/dist/private/node/session/scopes.js.map +1 -0
- package/dist/{session → private/node/session}/store.d.ts +0 -0
- package/dist/{session → private/node/session}/store.js +5 -5
- package/dist/private/node/session/store.js.map +1 -0
- package/dist/{session → private/node/session}/validate.d.ts +0 -0
- package/dist/{session → private/node/session}/validate.js +5 -5
- package/dist/private/node/session/validate.js.map +1 -0
- package/dist/private/node/session.d.ts +56 -0
- package/dist/{session.js → private/node/session.js} +97 -133
- package/dist/private/node/session.js.map +1 -0
- package/dist/private/node/ui/components/Subdued.d.ts +9 -0
- package/dist/private/node/ui/components/Subdued.js +10 -0
- package/dist/private/node/ui/components/Subdued.js.map +1 -0
- package/dist/private/node/ui/components/Subdued.test.d.ts +1 -0
- package/dist/private/node/ui/components/Subdued.test.js +11 -0
- package/dist/private/node/ui/components/Subdued.test.js.map +1 -0
- package/dist/private/node/ui/components/TokenizedText.d.ts +4 -1
- package/dist/private/node/ui/components/TokenizedText.js +4 -0
- package/dist/private/node/ui/components/TokenizedText.js.map +1 -1
- package/dist/private/node/ui/components/TokenizedText.test.js +4 -1
- package/dist/private/node/ui/components/TokenizedText.test.js.map +1 -1
- package/dist/private/node/ui.js +1 -1
- package/dist/private/node/ui.js.map +1 -1
- package/dist/public/common/array.d.ts +4 -0
- package/dist/public/common/array.js +4 -0
- package/dist/public/common/array.js.map +1 -1
- package/dist/public/common/object.d.ts +3 -3
- package/dist/public/common/object.js +5 -7
- package/dist/public/common/object.js.map +1 -1
- package/dist/public/common/url.d.ts +2 -1
- package/dist/public/common/url.js +3 -2
- package/dist/public/common/url.js.map +1 -1
- package/dist/public/node/analytics.js +3 -3
- package/dist/public/node/analytics.js.map +1 -1
- package/dist/public/node/api/admin.d.ts +31 -1
- package/dist/public/node/api/admin.js +28 -0
- package/dist/public/node/api/admin.js.map +1 -1
- package/dist/public/node/api/partners.js +7 -2
- package/dist/public/node/api/partners.js.map +1 -1
- package/dist/public/node/base-command.js +2 -2
- package/dist/public/node/base-command.js.map +1 -1
- package/dist/public/node/cli.d.ts +8 -0
- package/dist/public/node/cli.js +21 -4
- package/dist/public/node/cli.js.map +1 -1
- package/dist/public/node/environment/fqdn.d.ts +26 -0
- package/dist/{environment → public/node/environment}/fqdn.js +15 -31
- package/dist/public/node/environment/fqdn.js.map +1 -0
- package/dist/{environment → public/node/environment}/local.d.ts +62 -16
- package/dist/{environment → public/node/environment}/local.js +66 -24
- package/dist/public/node/environment/local.js.map +1 -0
- package/dist/public/node/environment/spin.d.ts +43 -0
- package/dist/{environment → public/node/environment}/spin.js +28 -35
- package/dist/public/node/environment/spin.js.map +1 -0
- package/dist/public/node/node-package-manager.js +1 -1
- package/dist/public/node/node-package-manager.js.map +1 -1
- package/dist/public/node/ruby.d.ts +1 -1
- package/dist/public/node/ruby.js +12 -13
- package/dist/public/node/ruby.js.map +1 -1
- package/dist/public/node/session.d.ts +53 -0
- package/dist/public/node/session.js +95 -0
- package/dist/public/node/session.js.map +1 -0
- package/dist/public/node/system.d.ts +44 -0
- package/dist/{system.js → public/node/system.js} +34 -54
- package/dist/public/node/system.js.map +1 -0
- package/dist/public/node/tcp.js +1 -1
- package/dist/public/node/tcp.js.map +1 -1
- package/dist/public/node/ui.d.ts +1 -1
- package/dist/public/node/ui.js.map +1 -1
- package/dist/testing/ui.js +1 -1
- package/dist/testing/ui.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui.js +1 -1
- package/dist/ui.js.map +1 -1
- package/package.json +9 -7
- package/dist/api/graphql/all_app_extension_registrations.d.ts +0 -20
- package/dist/api/graphql/all_app_extension_registrations.js +0 -20
- package/dist/api/graphql/all_app_extension_registrations.js.map +0 -1
- package/dist/api/graphql/all_dev_stores_by_org.d.ts +0 -18
- package/dist/api/graphql/all_dev_stores_by_org.js +0 -21
- package/dist/api/graphql/all_dev_stores_by_org.js.map +0 -1
- package/dist/api/graphql/all_orgs.d.ts +0 -12
- package/dist/api/graphql/all_orgs.js +0 -14
- package/dist/api/graphql/all_orgs.js.map +0 -1
- package/dist/api/graphql/convert_dev_to_test_store.d.ts +0 -16
- package/dist/api/graphql/convert_dev_to_test_store.js +0 -13
- package/dist/api/graphql/convert_dev_to_test_store.js.map +0 -1
- package/dist/api/graphql/create_app.d.ts +0 -29
- package/dist/api/graphql/create_app.js +0 -33
- package/dist/api/graphql/create_app.js.map +0 -1
- package/dist/api/graphql/create_deployment.d.ts +0 -33
- package/dist/api/graphql/create_deployment.js +0 -25
- package/dist/api/graphql/create_deployment.js.map +0 -1
- package/dist/api/graphql/extension_create.d.ts +0 -30
- package/dist/api/graphql/extension_create.js +0 -26
- package/dist/api/graphql/extension_create.js.map +0 -1
- package/dist/api/graphql/extension_specifications.d.ts +0 -27
- package/dist/api/graphql/extension_specifications.js +0 -22
- package/dist/api/graphql/extension_specifications.js.map +0 -1
- package/dist/api/graphql/find_app.d.ts +0 -14
- package/dist/api/graphql/find_app.js +0 -17
- package/dist/api/graphql/find_app.js.map +0 -1
- package/dist/api/graphql/find_org.d.ts +0 -18
- package/dist/api/graphql/find_org.js +0 -21
- package/dist/api/graphql/find_org.js.map +0 -1
- package/dist/api/graphql/find_org_basic.d.ts +0 -11
- package/dist/api/graphql/find_org_basic.js +0 -14
- package/dist/api/graphql/find_org_basic.js.map +0 -1
- package/dist/api/graphql/find_store_by_domain.d.ts +0 -21
- package/dist/api/graphql/find_store_by_domain.js +0 -24
- package/dist/api/graphql/find_store_by_domain.js.map +0 -1
- package/dist/api/graphql/functions/api_schema_definition.d.ts +0 -9
- package/dist/api/graphql/functions/api_schema_definition.js +0 -7
- package/dist/api/graphql/functions/api_schema_definition.js.map +0 -1
- package/dist/api/graphql/functions/app_function_set.d.ts +0 -30
- package/dist/api/graphql/functions/app_function_set.js +0 -38
- package/dist/api/graphql/functions/app_function_set.js.map +0 -1
- package/dist/api/graphql/functions/function_service_proxy.d.ts +0 -4
- package/dist/api/graphql/functions/function_service_proxy.js +0 -7
- package/dist/api/graphql/functions/function_service_proxy.js.map +0 -1
- package/dist/api/graphql/functions/upload_url_generate.d.ts +0 -12
- package/dist/api/graphql/functions/upload_url_generate.js +0 -11
- package/dist/api/graphql/functions/upload_url_generate.js.map +0 -1
- package/dist/api/graphql/generate_signed_upload_url.d.ts +0 -15
- package/dist/api/graphql/generate_signed_upload_url.js +0 -15
- package/dist/api/graphql/generate_signed_upload_url.js.map +0 -1
- package/dist/api/graphql/get_urls.d.ts +0 -10
- package/dist/api/graphql/get_urls.js +0 -10
- package/dist/api/graphql/get_urls.js.map +0 -1
- package/dist/api/graphql/get_variant_id.d.ts +0 -17
- package/dist/api/graphql/get_variant_id.js +0 -20
- package/dist/api/graphql/get_variant_id.js.map +0 -1
- package/dist/api/graphql/index.d.ts +0 -21
- package/dist/api/graphql/index.js +0 -22
- package/dist/api/graphql/index.js.map +0 -1
- package/dist/api/graphql/update_draft.d.ts +0 -33
- package/dist/api/graphql/update_draft.js +0 -24
- package/dist/api/graphql/update_draft.js.map +0 -1
- package/dist/api/graphql/update_urls.d.ts +0 -14
- package/dist/api/graphql/update_urls.js +0 -12
- package/dist/api/graphql/update_urls.js.map +0 -1
- package/dist/api.d.ts +0 -3
- package/dist/api.js +0 -4
- package/dist/api.js.map +0 -1
- package/dist/cli.d.ts +0 -8
- package/dist/cli.js +0 -18
- package/dist/cli.js.map +0 -1
- package/dist/environment/fqdn.d.ts +0 -29
- package/dist/environment/fqdn.js.map +0 -1
- package/dist/environment/local.js.map +0 -1
- package/dist/environment/service.d.ts +0 -4
- package/dist/environment/service.js +0 -19
- package/dist/environment/service.js.map +0 -1
- package/dist/environment/spin-cache.js.map +0 -1
- package/dist/environment/spin.d.ts +0 -50
- package/dist/environment/spin.js.map +0 -1
- package/dist/environment/utilities.js.map +0 -1
- package/dist/environment.d.ts +0 -7
- package/dist/environment.js +0 -8
- package/dist/environment.js.map +0 -1
- package/dist/network/service.d.ts +0 -14
- package/dist/network/service.js +0 -11
- package/dist/network/service.js.map +0 -1
- package/dist/public/node/checksum.d.ts +0 -20
- package/dist/public/node/checksum.js +0 -32
- package/dist/public/node/checksum.js.map +0 -1
- package/dist/session/authorize.js.map +0 -1
- package/dist/session/device-authorization.js.map +0 -1
- package/dist/session/exchange.js.map +0 -1
- package/dist/session/identity-token-validation.js.map +0 -1
- package/dist/session/identity.js.map +0 -1
- package/dist/session/post-auth.js.map +0 -1
- package/dist/session/redirect-listener.js.map +0 -1
- package/dist/session/schema.js.map +0 -1
- package/dist/session/scopes.js.map +0 -1
- package/dist/session/store.js.map +0 -1
- package/dist/session/token.d.ts +0 -40
- package/dist/session/token.js +0 -22
- package/dist/session/token.js.map +0 -1
- package/dist/session/validate.js.map +0 -1
- package/dist/session.d.ts +0 -96
- package/dist/session.js.map +0 -1
- package/dist/system.d.ts +0 -51
- package/dist/system.js.map +0 -1
package/dist/ui.js
CHANGED
|
@@ -3,7 +3,7 @@ import { remove, exists } from './file.js';
|
|
|
3
3
|
import { info, completed, content, token, logUpdate, stringifyMessage, debug } from './output.js';
|
|
4
4
|
import colors from './public/node/colors.js';
|
|
5
5
|
import { relative } from './path.js';
|
|
6
|
-
import { isTerminalInteractive } from './environment/local.js';
|
|
6
|
+
import { isTerminalInteractive } from './public/node/environment/local.js';
|
|
7
7
|
import { mapper as mapperUI, run as executorUI } from './ui/executor.js';
|
|
8
8
|
import { Listr as OriginalListr, ListrTaskState } from 'listr2';
|
|
9
9
|
import findProcess from 'find-process';
|
package/dist/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,KAAK,EAAE,WAAW,EAAC,MAAM,YAAY,CAAA;AAC9D,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,WAAW,CAAA;AACxC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAmB,gBAAgB,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAChH,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAC5C,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAA;AAClC,OAAO,EAAC,qBAAqB,EAAC,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAC,MAAM,IAAI,QAAQ,EAAE,GAAG,IAAI,UAAU,EAAC,MAAM,kBAAkB,CAAA;AACtE,OAAO,EAAC,KAAK,IAAI,aAAa,EAAa,cAAc,EAAwB,MAAM,QAAQ,CAAA;AAC/F,OAAO,WAAW,MAAM,cAAc,CAAA;AAEtC,MAAM,UAAU,QAAQ,CAAC,KAAkB,EAAE,OAAwC;IACnF,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC/C,KAAK,CAA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,IAAI,EAAE,kCAAkC,EAAE,KAAK,EAAE,QAAQ,EAAC;KAC5D,CAAA;IAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC;QAC1B;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,GAAG,sBAAsB,oBAAoB,IAAI,2DAA2D,oBAAoB,4BAA4B;YACrK,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAA;AAClC,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;IACjC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;YAC/B,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;YAErB,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YAEhC,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;gBAClC,KAAK,CAAC,wCAAwC,CAAC,CAAA;gBAC/C,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC,CAAA;aAC1B;YACD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAC3B,CAAC,CAAA;QAED,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAA;QACtB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;QAC9B,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import {CancelExecution, Abort, AbortSilent} from './error.js'\nimport {remove, exists} from './file.js'\nimport {info, completed, content, token, logUpdate, Message, Logger, stringifyMessage, debug} from './output.js'\nimport colors from './public/node/colors.js'\nimport {relative} from './path.js'\nimport {isTerminalInteractive} from './environment/local.js'\nimport {mapper as mapperUI, run as executorUI} from './ui/executor.js'\nimport {Listr as OriginalListr, ListrTask, ListrTaskState, ListrBaseClassOptions} from 'listr2'\nimport findProcess from 'find-process'\n\nexport function newListr(tasks: ListrTask[], options?: object | ListrBaseClassOptions) {\n const listr = new OriginalListr(tasks, options)\n listr.tasks.forEach((task) => {\n const loggedSubtaskTitles: string[] = []\n task.renderHook$.subscribe(() => {\n if (task.hasSubtasks()) {\n const activeSubtasks = task.subtasks.filter((subtask) => {\n return [ListrTaskState.PENDING, ListrTaskState.COMPLETED].includes(subtask.state as ListrTaskState)\n })\n activeSubtasks.forEach((subtask) => {\n if (subtask.title && !loggedSubtaskTitles.includes(subtask.title)) {\n loggedSubtaskTitles.push(subtask.title)\n }\n })\n }\n })\n })\n return listr\n}\n\nexport type ListrTasks = ConstructorParameters<typeof OriginalListr>[0]\nexport type {ListrTaskWrapper, ListrDefaultRenderer, ListrTask} from 'listr2'\n\nexport interface PromptAnswer {\n name: string\n value: string\n}\nexport type FilterFunction = (answers: PromptAnswer[], input: string) => Promise<PromptAnswer[]>\n\ninterface BaseQuestion<TName extends string> {\n name: TName\n message: string\n preface?: string\n validate?: (value: string) => string | true\n default?: string\n result?: (value: string) => string | boolean\n choices?: QuestionChoiceType[]\n source?: (filter: FilterFunction) => FilterFunction\n}\n\ntype TextQuestion<TName extends string> = BaseQuestion<TName> & {\n type: 'input'\n // a default is required, otherwise we'd show a prompt like 'undefined'\n default: string\n}\n\ntype PasswordQuestion<TName extends string> = BaseQuestion<TName> & {\n type: 'password'\n}\n\ntype SelectableQuestion<TName extends string> = BaseQuestion<TName> & {\n type: 'select' | 'autocomplete'\n choices: QuestionChoiceType[]\n}\n\nexport type Question<TName extends string = string> =\n | TextQuestion<TName>\n | SelectableQuestion<TName>\n | PasswordQuestion<TName>\n\nexport interface QuestionChoiceType {\n name: string\n value: string\n group?: {name: string; order: number}\n}\n\nconst started = (content: Message, logger: Logger) => {\n const message = `${colors.yellow('❯')} ${stringifyMessage(content)}`\n info(message, logger)\n}\n\nconst failed = (content: Message, logger: Logger) => {\n const message = `${colors.red('✖')} ${stringifyMessage(content)}`\n info(message, logger)\n}\n\n/**\n * Performs a task with the title kept up to date and stdout available to the\n * task while it runs (there is no re-writing stdout while the task runs).\n */\nexport interface TaskOptions {\n title: string\n task: () => Promise<void | {successMessage: string}>\n}\nexport const task = async ({title, task}: TaskOptions) => {\n let success\n started(title, logUpdate)\n try {\n const result = await task()\n success = result?.successMessage || title\n } catch (err) {\n failed(title, logUpdate)\n logUpdate.done()\n throw err\n }\n completed(success, logUpdate)\n logUpdate.done()\n}\nexport const prompt = async <\n TName extends string & keyof TAnswers,\n TAnswers extends {[key in TName]: string} = {[key in TName]: string},\n>(\n questions: ReadonlyArray<Question<TName>>,\n): Promise<TAnswers> => {\n if (!isTerminalInteractive() && questions.length !== 0) {\n throw new Abort(content`\nThe CLI prompted in a non-interactive terminal with the following questions:\n${token.json(questions)}\n `)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const mappedQuestions: any[] = questions.map(mapperUI)\n const value = {} as TAnswers\n for (const question of mappedQuestions) {\n if (question.preface) {\n info(question.preface)\n }\n\n // eslint-disable-next-line no-await-in-loop\n value[question.name as TName] = await executorUI(question)\n }\n return value\n}\n\nexport async function nonEmptyDirectoryPrompt(directory: string) {\n if (await exists(directory)) {\n const options = [\n {name: 'No, don’t delete the files', value: 'abort'},\n {name: 'Yes, delete the files', value: 'overwrite'},\n ]\n\n const relativeDirectory = relative(process.cwd(), directory)\n\n const questions: Question<'value'> = {\n type: 'select',\n name: 'value',\n message: `${relativeDirectory} is not an empty directory. Do you want to delete the existing files and continue?`,\n choices: options,\n }\n\n const choice = await prompt([questions])\n\n if (choice.value === 'abort') {\n throw new CancelExecution()\n }\n\n await remove(directory)\n }\n}\n\nexport async function terminateBlockingPortProcessPrompt(port: number, stepDescription?: string): Promise<boolean> {\n const stepDescriptionContent = stepDescription ?? 'current step'\n\n const processInfo = await findProcess('port', port)\n const formattedProcessName =\n processInfo && processInfo.length > 0 && processInfo[0]?.name\n ? ` ${content`${token.italic(`(${processInfo[0].name})`)}`.value}`\n : ''\n\n const options = [\n {name: 'Yes, terminate process in order to log in now', value: 'finish'},\n {name: `No, cancel command and try later`, value: 'cancel'},\n ]\n\n const choice = await prompt([\n {\n type: 'select',\n name: 'value',\n message: `${stepDescriptionContent} requires a port ${port} that's unavailable because it's running another process${formattedProcessName}. Terminate that process? `,\n choices: options,\n },\n ])\n return choice.value === 'finish'\n}\n\nexport const keypress = async () => {\n return new Promise((resolve, reject) => {\n const handler = (buffer: Buffer) => {\n process.stdin.setRawMode(false)\n process.stdin.pause()\n\n const bytes = Array.from(buffer)\n\n if (bytes.length && bytes[0] === 3) {\n debug('Canceled keypress, User pressed CTRL+C')\n reject(new AbortSilent())\n }\n process.nextTick(resolve)\n }\n\n process.stdin.resume()\n process.stdin.setRawMode(true)\n process.stdin.once('data', handler)\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,KAAK,EAAE,WAAW,EAAC,MAAM,YAAY,CAAA;AAC9D,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,WAAW,CAAA;AACxC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAmB,gBAAgB,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAChH,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAC5C,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAA;AAClC,OAAO,EAAC,qBAAqB,EAAC,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAC,MAAM,IAAI,QAAQ,EAAE,GAAG,IAAI,UAAU,EAA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,MAAM,EAAE,CAAA;QACtB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;QAC9B,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import {CancelExecution, Abort, AbortSilent} from './error.js'\nimport {remove, exists} from './file.js'\nimport {info, completed, content, token, logUpdate, Message, Logger, stringifyMessage, debug} from './output.js'\nimport colors from './public/node/colors.js'\nimport {relative} from './path.js'\nimport {isTerminalInteractive} from './public/node/environment/local.js'\nimport {mapper as mapperUI, run as executorUI} from './ui/executor.js'\nimport {Listr as OriginalListr, ListrTask, ListrTaskState, ListrBaseClassOptions} from 'listr2'\nimport findProcess from 'find-process'\n\nexport function newListr(tasks: ListrTask[], options?: object | ListrBaseClassOptions) {\n const listr = new OriginalListr(tasks, options)\n listr.tasks.forEach((task) => {\n const loggedSubtaskTitles: string[] = []\n task.renderHook$.subscribe(() => {\n if (task.hasSubtasks()) {\n const activeSubtasks = task.subtasks.filter((subtask) => {\n return [ListrTaskState.PENDING, ListrTaskState.COMPLETED].includes(subtask.state as ListrTaskState)\n })\n activeSubtasks.forEach((subtask) => {\n if (subtask.title && !loggedSubtaskTitles.includes(subtask.title)) {\n loggedSubtaskTitles.push(subtask.title)\n }\n })\n }\n })\n })\n return listr\n}\n\nexport type ListrTasks = ConstructorParameters<typeof OriginalListr>[0]\nexport type {ListrTaskWrapper, ListrDefaultRenderer, ListrTask} from 'listr2'\n\nexport interface PromptAnswer {\n name: string\n value: string\n}\nexport type FilterFunction = (answers: PromptAnswer[], input: string) => Promise<PromptAnswer[]>\n\ninterface BaseQuestion<TName extends string> {\n name: TName\n message: string\n preface?: string\n validate?: (value: string) => string | true\n default?: string\n result?: (value: string) => string | boolean\n choices?: QuestionChoiceType[]\n source?: (filter: FilterFunction) => FilterFunction\n}\n\ntype TextQuestion<TName extends string> = BaseQuestion<TName> & {\n type: 'input'\n // a default is required, otherwise we'd show a prompt like 'undefined'\n default: string\n}\n\ntype PasswordQuestion<TName extends string> = BaseQuestion<TName> & {\n type: 'password'\n}\n\ntype SelectableQuestion<TName extends string> = BaseQuestion<TName> & {\n type: 'select' | 'autocomplete'\n choices: QuestionChoiceType[]\n}\n\nexport type Question<TName extends string = string> =\n | TextQuestion<TName>\n | SelectableQuestion<TName>\n | PasswordQuestion<TName>\n\nexport interface QuestionChoiceType {\n name: string\n value: string\n group?: {name: string; order: number}\n}\n\nconst started = (content: Message, logger: Logger) => {\n const message = `${colors.yellow('❯')} ${stringifyMessage(content)}`\n info(message, logger)\n}\n\nconst failed = (content: Message, logger: Logger) => {\n const message = `${colors.red('✖')} ${stringifyMessage(content)}`\n info(message, logger)\n}\n\n/**\n * Performs a task with the title kept up to date and stdout available to the\n * task while it runs (there is no re-writing stdout while the task runs).\n */\nexport interface TaskOptions {\n title: string\n task: () => Promise<void | {successMessage: string}>\n}\nexport const task = async ({title, task}: TaskOptions) => {\n let success\n started(title, logUpdate)\n try {\n const result = await task()\n success = result?.successMessage || title\n } catch (err) {\n failed(title, logUpdate)\n logUpdate.done()\n throw err\n }\n completed(success, logUpdate)\n logUpdate.done()\n}\nexport const prompt = async <\n TName extends string & keyof TAnswers,\n TAnswers extends {[key in TName]: string} = {[key in TName]: string},\n>(\n questions: ReadonlyArray<Question<TName>>,\n): Promise<TAnswers> => {\n if (!isTerminalInteractive() && questions.length !== 0) {\n throw new Abort(content`\nThe CLI prompted in a non-interactive terminal with the following questions:\n${token.json(questions)}\n `)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const mappedQuestions: any[] = questions.map(mapperUI)\n const value = {} as TAnswers\n for (const question of mappedQuestions) {\n if (question.preface) {\n info(question.preface)\n }\n\n // eslint-disable-next-line no-await-in-loop\n value[question.name as TName] = await executorUI(question)\n }\n return value\n}\n\nexport async function nonEmptyDirectoryPrompt(directory: string) {\n if (await exists(directory)) {\n const options = [\n {name: 'No, don’t delete the files', value: 'abort'},\n {name: 'Yes, delete the files', value: 'overwrite'},\n ]\n\n const relativeDirectory = relative(process.cwd(), directory)\n\n const questions: Question<'value'> = {\n type: 'select',\n name: 'value',\n message: `${relativeDirectory} is not an empty directory. Do you want to delete the existing files and continue?`,\n choices: options,\n }\n\n const choice = await prompt([questions])\n\n if (choice.value === 'abort') {\n throw new CancelExecution()\n }\n\n await remove(directory)\n }\n}\n\nexport async function terminateBlockingPortProcessPrompt(port: number, stepDescription?: string): Promise<boolean> {\n const stepDescriptionContent = stepDescription ?? 'current step'\n\n const processInfo = await findProcess('port', port)\n const formattedProcessName =\n processInfo && processInfo.length > 0 && processInfo[0]?.name\n ? ` ${content`${token.italic(`(${processInfo[0].name})`)}`.value}`\n : ''\n\n const options = [\n {name: 'Yes, terminate process in order to log in now', value: 'finish'},\n {name: `No, cancel command and try later`, value: 'cancel'},\n ]\n\n const choice = await prompt([\n {\n type: 'select',\n name: 'value',\n message: `${stepDescriptionContent} requires a port ${port} that's unavailable because it's running another process${formattedProcessName}. Terminate that process? `,\n choices: options,\n },\n ])\n return choice.value === 'finish'\n}\n\nexport const keypress = async () => {\n return new Promise((resolve, reject) => {\n const handler = (buffer: Buffer) => {\n process.stdin.setRawMode(false)\n process.stdin.pause()\n\n const bytes = Array.from(buffer)\n\n if (bytes.length && bytes[0] === 3) {\n debug('Canceled keypress, User pressed CTRL+C')\n reject(new AbortSilent())\n }\n process.nextTick(resolve)\n }\n\n process.stdin.resume()\n process.stdin.setRawMode(true)\n process.stdin.once('data', handler)\n })\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/cli-kit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A set of utilities, interfaces, and models that are common across all the platform features",
|
|
6
6
|
"keywords": [
|
|
@@ -57,14 +57,17 @@
|
|
|
57
57
|
"dynamic": [
|
|
58
58
|
"./node-package-manager.js",
|
|
59
59
|
"./error-handler.js",
|
|
60
|
-
"../../environment/local.js",
|
|
60
|
+
"../../public/node/environment/local.js",
|
|
61
|
+
"./environment/local.js",
|
|
61
62
|
"@oclif/core",
|
|
62
|
-
"../../environment/utilities.js",
|
|
63
|
+
"../../private/node/environment/utilities.js",
|
|
63
64
|
"../../constants.js",
|
|
64
65
|
"../../path.js",
|
|
65
|
-
"
|
|
66
|
+
"./system.js"
|
|
66
67
|
],
|
|
67
|
-
"static": [
|
|
68
|
+
"static": [
|
|
69
|
+
"@oclif/core"
|
|
70
|
+
]
|
|
68
71
|
}
|
|
69
72
|
]
|
|
70
73
|
}
|
|
@@ -115,11 +118,10 @@
|
|
|
115
118
|
"lodash": "4.17.21",
|
|
116
119
|
"log-update": "4.0.0",
|
|
117
120
|
"macaddress": "0.5.3",
|
|
118
|
-
"md5-file": "5.0.0",
|
|
119
121
|
"node-abort-controller": "3.0.1",
|
|
120
122
|
"node-fetch": "3.2.4",
|
|
121
123
|
"open": "8.4.0",
|
|
122
|
-
"pathe": "0.
|
|
124
|
+
"pathe": "1.0.0",
|
|
123
125
|
"prettier": "2.7.1",
|
|
124
126
|
"react": "17.0.2",
|
|
125
127
|
"semver": "7.3.6",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const AllAppExtensionRegistrationsQuery: string;
|
|
2
|
-
export interface AllAppExtensionRegistrationsQueryVariables {
|
|
3
|
-
apiKey: string;
|
|
4
|
-
}
|
|
5
|
-
export interface AllAppExtensionRegistrationsQuerySchema {
|
|
6
|
-
app: {
|
|
7
|
-
extensionRegistrations: {
|
|
8
|
-
id: string;
|
|
9
|
-
uuid: string;
|
|
10
|
-
title: string;
|
|
11
|
-
type: string;
|
|
12
|
-
}[];
|
|
13
|
-
functions: {
|
|
14
|
-
id: string;
|
|
15
|
-
uuid: string;
|
|
16
|
-
title: string;
|
|
17
|
-
type: string;
|
|
18
|
-
}[];
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const AllAppExtensionRegistrationsQuery = gql `
|
|
3
|
-
query allAppExtensionRegistrations($apiKey: String!) {
|
|
4
|
-
app(apiKey: $apiKey) {
|
|
5
|
-
extensionRegistrations {
|
|
6
|
-
id
|
|
7
|
-
uuid
|
|
8
|
-
title
|
|
9
|
-
type
|
|
10
|
-
}
|
|
11
|
-
functions {
|
|
12
|
-
id
|
|
13
|
-
uuid
|
|
14
|
-
title
|
|
15
|
-
type: apiType
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
20
|
-
//# sourceMappingURL=all_app_extension_registrations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"all_app_extension_registrations.js","sourceRoot":"","sources":["../../../src/api/graphql/all_app_extension_registrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;CAiBnD,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const AllAppExtensionRegistrationsQuery = gql`\n query allAppExtensionRegistrations($apiKey: String!) {\n app(apiKey: $apiKey) {\n extensionRegistrations {\n id\n uuid\n title\n type\n }\n functions {\n id\n uuid\n title\n type: apiType\n }\n }\n }\n`\n\nexport interface AllAppExtensionRegistrationsQueryVariables {\n apiKey: string\n}\n\nexport interface AllAppExtensionRegistrationsQuerySchema {\n app: {\n extensionRegistrations: {\n id: string\n uuid: string\n title: string\n type: string\n }[]\n functions: {\n id: string\n uuid: string\n title: string\n type: string\n }[]\n }\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const AllDevStoresByOrganizationQuery: string;
|
|
2
|
-
export interface AllDevStoresByOrganizationSchema {
|
|
3
|
-
organizations: {
|
|
4
|
-
nodes: {
|
|
5
|
-
id: string;
|
|
6
|
-
stores: {
|
|
7
|
-
nodes: {
|
|
8
|
-
shopId: string;
|
|
9
|
-
link: string;
|
|
10
|
-
shopDomain: string;
|
|
11
|
-
shopName: string;
|
|
12
|
-
transferDisabled: boolean;
|
|
13
|
-
convertableToPartnerTest: boolean;
|
|
14
|
-
}[];
|
|
15
|
-
};
|
|
16
|
-
}[];
|
|
17
|
-
};
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const AllDevStoresByOrganizationQuery = gql `
|
|
3
|
-
query FindOrganization($id: ID!) {
|
|
4
|
-
organizations(id: $id, first: 1) {
|
|
5
|
-
nodes {
|
|
6
|
-
id
|
|
7
|
-
stores(first: 500, archived: false, type: [DEVELOPMENT]) {
|
|
8
|
-
nodes {
|
|
9
|
-
shopId
|
|
10
|
-
link
|
|
11
|
-
shopDomain
|
|
12
|
-
shopName
|
|
13
|
-
transferDisabled
|
|
14
|
-
convertableToPartnerTest
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
21
|
-
//# sourceMappingURL=all_dev_stores_by_org.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"all_dev_stores_by_org.js","sourceRoot":"","sources":["../../../src/api/graphql/all_dev_stores_by_org.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;CAkBjD,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const AllDevStoresByOrganizationQuery = gql`\n query FindOrganization($id: ID!) {\n organizations(id: $id, first: 1) {\n nodes {\n id\n stores(first: 500, archived: false, type: [DEVELOPMENT]) {\n nodes {\n shopId\n link\n shopDomain\n shopName\n transferDisabled\n convertableToPartnerTest\n }\n }\n }\n }\n }\n`\n\nexport interface AllDevStoresByOrganizationSchema {\n organizations: {\n nodes: {\n id: string\n stores: {\n nodes: {\n shopId: string\n link: string\n shopDomain: string\n shopName: string\n transferDisabled: boolean\n convertableToPartnerTest: boolean\n }[]\n }\n }[]\n }\n}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface AllOrganizationsQuerySchemaOrganization {
|
|
2
|
-
id: string;
|
|
3
|
-
businessName: string;
|
|
4
|
-
website: string;
|
|
5
|
-
appsNext: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface AllOrganizationsQuerySchema {
|
|
8
|
-
organizations: {
|
|
9
|
-
nodes: AllOrganizationsQuerySchemaOrganization[];
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export declare const AllOrganizationsQuery: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"all_orgs.js","sourceRoot":"","sources":["../../../src/api/graphql/all_orgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAenC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;CAWvC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport interface AllOrganizationsQuerySchemaOrganization {\n id: string\n businessName: string\n website: string\n appsNext: boolean\n}\n\nexport interface AllOrganizationsQuerySchema {\n organizations: {\n nodes: AllOrganizationsQuerySchemaOrganization[]\n }\n}\n\nexport const AllOrganizationsQuery = gql`\n {\n organizations(first: 200) {\n nodes {\n id\n businessName\n website\n appsNext\n }\n }\n }\n`\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const ConvertDevToTestStoreQuery: string;
|
|
2
|
-
export interface ConvertDevToTestStoreVariables {
|
|
3
|
-
input: {
|
|
4
|
-
organizationID: number;
|
|
5
|
-
shopId: string;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
export interface ConvertDevToTestStoreSchema {
|
|
9
|
-
convertDevToTestStore: {
|
|
10
|
-
convertedToTestStore: boolean;
|
|
11
|
-
userErrors: {
|
|
12
|
-
field: string[];
|
|
13
|
-
message: string;
|
|
14
|
-
}[];
|
|
15
|
-
};
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const ConvertDevToTestStoreQuery = gql `
|
|
3
|
-
mutation convertDevToTestStore($input: ConvertDevToTestStoreInput!) {
|
|
4
|
-
convertDevToTestStore(input: $input) {
|
|
5
|
-
convertedToTestStore
|
|
6
|
-
userErrors {
|
|
7
|
-
message
|
|
8
|
-
field
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
//# sourceMappingURL=convert_dev_to_test_store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert_dev_to_test_store.js","sourceRoot":"","sources":["../../../src/api/graphql/convert_dev_to_test_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;;;;;;;;;;CAU5C,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const ConvertDevToTestStoreQuery = gql`\n mutation convertDevToTestStore($input: ConvertDevToTestStoreInput!) {\n convertDevToTestStore(input: $input) {\n convertedToTestStore\n userErrors {\n message\n field\n }\n }\n }\n`\n\nexport interface ConvertDevToTestStoreVariables {\n input: {\n organizationID: number\n shopId: string\n }\n}\n\nexport interface ConvertDevToTestStoreSchema {\n convertDevToTestStore: {\n convertedToTestStore: boolean\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare const CreateAppQuery: string;
|
|
2
|
-
export interface CreateAppQueryVariables {
|
|
3
|
-
org: number;
|
|
4
|
-
title: string;
|
|
5
|
-
appUrl: string;
|
|
6
|
-
redir: string[];
|
|
7
|
-
type: string;
|
|
8
|
-
}
|
|
9
|
-
export interface CreateAppQuerySchema {
|
|
10
|
-
appCreate: {
|
|
11
|
-
app: {
|
|
12
|
-
id: string;
|
|
13
|
-
apiKey: string;
|
|
14
|
-
title: string;
|
|
15
|
-
applicationUrl: string;
|
|
16
|
-
redirectUrlWhitelist: string[];
|
|
17
|
-
organizationId: string;
|
|
18
|
-
apiSecretKeys: {
|
|
19
|
-
secret: string;
|
|
20
|
-
}[];
|
|
21
|
-
appType: string;
|
|
22
|
-
grantedScopes: string[];
|
|
23
|
-
};
|
|
24
|
-
userErrors: {
|
|
25
|
-
field: string[];
|
|
26
|
-
message: string;
|
|
27
|
-
}[];
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const CreateAppQuery = gql `
|
|
3
|
-
mutation AppCreate($org: Int!, $title: String!, $appUrl: Url!, $redir: [Url]!, $type: AppType) {
|
|
4
|
-
appCreate(
|
|
5
|
-
input: {
|
|
6
|
-
organizationID: $org
|
|
7
|
-
title: $title
|
|
8
|
-
applicationUrl: $appUrl
|
|
9
|
-
redirectUrlWhitelist: $redir
|
|
10
|
-
appType: $type
|
|
11
|
-
}
|
|
12
|
-
) {
|
|
13
|
-
app {
|
|
14
|
-
id
|
|
15
|
-
apiKey
|
|
16
|
-
title
|
|
17
|
-
appType
|
|
18
|
-
applicationUrl
|
|
19
|
-
redirectUrlWhitelist
|
|
20
|
-
apiSecretKeys {
|
|
21
|
-
secret
|
|
22
|
-
}
|
|
23
|
-
appType
|
|
24
|
-
grantedScopes
|
|
25
|
-
}
|
|
26
|
-
userErrors {
|
|
27
|
-
field
|
|
28
|
-
message
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
//# sourceMappingURL=create_app.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create_app.js","sourceRoot":"","sources":["../../../src/api/graphql/create_app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BhC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const CreateAppQuery = gql`\n mutation AppCreate($org: Int!, $title: String!, $appUrl: Url!, $redir: [Url]!, $type: AppType) {\n appCreate(\n input: {\n organizationID: $org\n title: $title\n applicationUrl: $appUrl\n redirectUrlWhitelist: $redir\n appType: $type\n }\n ) {\n app {\n id\n apiKey\n title\n appType\n applicationUrl\n redirectUrlWhitelist\n apiSecretKeys {\n secret\n }\n appType\n grantedScopes\n }\n userErrors {\n field\n message\n }\n }\n }\n`\n\nexport interface CreateAppQueryVariables {\n org: number\n title: string\n appUrl: string\n redir: string[]\n type: string\n}\n\nexport interface CreateAppQuerySchema {\n appCreate: {\n app: {\n id: string\n apiKey: string\n title: string\n applicationUrl: string\n redirectUrlWhitelist: string[]\n organizationId: string\n apiSecretKeys: {\n secret: string\n }[]\n appType: string\n grantedScopes: string[]\n }\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const CreateDeployment: string;
|
|
2
|
-
export interface ExtensionSettings {
|
|
3
|
-
uuid: string;
|
|
4
|
-
config: string;
|
|
5
|
-
context: string;
|
|
6
|
-
}
|
|
7
|
-
export interface CreateDeploymentVariables {
|
|
8
|
-
apiKey: string;
|
|
9
|
-
uuid: string;
|
|
10
|
-
bundleUrl: string;
|
|
11
|
-
extensions: ExtensionSettings[];
|
|
12
|
-
}
|
|
13
|
-
export interface CreateDeploymentSchema {
|
|
14
|
-
deploymentCreate: {
|
|
15
|
-
deployment: {
|
|
16
|
-
uuid: string;
|
|
17
|
-
deployedVersions: {
|
|
18
|
-
extensionVersion: {
|
|
19
|
-
uuid: string;
|
|
20
|
-
registrationUuid: string;
|
|
21
|
-
validationErrors: {
|
|
22
|
-
field: string[];
|
|
23
|
-
message: string;
|
|
24
|
-
}[];
|
|
25
|
-
};
|
|
26
|
-
}[];
|
|
27
|
-
};
|
|
28
|
-
userErrors: {
|
|
29
|
-
field: string[];
|
|
30
|
-
message: string;
|
|
31
|
-
}[];
|
|
32
|
-
};
|
|
33
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const CreateDeployment = gql `
|
|
3
|
-
mutation CreateDeployment($apiKey: String!, $uuid: String!, $bundleUrl: String!, $extensions: [ExtensionSettings!]!) {
|
|
4
|
-
deploymentCreate(input: {apiKey: $apiKey, uuid: $uuid, bundleUrl: $bundleUrl, extensions: $extensions}) {
|
|
5
|
-
deployment {
|
|
6
|
-
uuid
|
|
7
|
-
deployedVersions {
|
|
8
|
-
extensionVersion {
|
|
9
|
-
uuid
|
|
10
|
-
registrationUuid
|
|
11
|
-
validationErrors {
|
|
12
|
-
message
|
|
13
|
-
field
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
userErrors {
|
|
19
|
-
message
|
|
20
|
-
field
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
//# sourceMappingURL=create_deployment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create_deployment.js","sourceRoot":"","sources":["../../../src/api/graphql/create_deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;CAsBlC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const CreateDeployment = gql`\n mutation CreateDeployment($apiKey: String!, $uuid: String!, $bundleUrl: String!, $extensions: [ExtensionSettings!]!) {\n deploymentCreate(input: {apiKey: $apiKey, uuid: $uuid, bundleUrl: $bundleUrl, extensions: $extensions}) {\n deployment {\n uuid\n deployedVersions {\n extensionVersion {\n uuid\n registrationUuid\n validationErrors {\n message\n field\n }\n }\n }\n }\n userErrors {\n message\n field\n }\n }\n }\n`\n\nexport interface ExtensionSettings {\n uuid: string\n config: string\n context: string\n}\n\nexport interface CreateDeploymentVariables {\n apiKey: string\n uuid: string\n bundleUrl: string\n extensions: ExtensionSettings[]\n}\n\nexport interface CreateDeploymentSchema {\n deploymentCreate: {\n deployment: {\n uuid: string\n deployedVersions: {\n extensionVersion: {\n uuid: string\n registrationUuid: string\n validationErrors: {\n field: string[]\n message: string\n }[]\n }\n }[]\n }\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare const ExtensionCreateQuery: string;
|
|
2
|
-
export interface ExtensionCreateVariables {
|
|
3
|
-
apiKey: string;
|
|
4
|
-
type: string;
|
|
5
|
-
title: string;
|
|
6
|
-
config: string;
|
|
7
|
-
context?: string | null;
|
|
8
|
-
}
|
|
9
|
-
export interface ExtensionCreateSchema {
|
|
10
|
-
extensionCreate: {
|
|
11
|
-
extensionRegistration: {
|
|
12
|
-
id: string;
|
|
13
|
-
uuid: string;
|
|
14
|
-
type: string;
|
|
15
|
-
title: string;
|
|
16
|
-
draftVersion: {
|
|
17
|
-
registrationId: string;
|
|
18
|
-
lastUserInteractionAt: string;
|
|
19
|
-
validationErrors: {
|
|
20
|
-
field: string[];
|
|
21
|
-
message: string;
|
|
22
|
-
}[];
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
userErrors: {
|
|
26
|
-
field: string[];
|
|
27
|
-
message: string;
|
|
28
|
-
}[];
|
|
29
|
-
};
|
|
30
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const ExtensionCreateQuery = gql `
|
|
3
|
-
mutation ExtensionCreate($apiKey: String!, $type: ExtensionType!, $title: String!, $config: JSON!, $context: String) {
|
|
4
|
-
extensionCreate(input: {apiKey: $apiKey, type: $type, title: $title, config: $config, context: $context}) {
|
|
5
|
-
extensionRegistration {
|
|
6
|
-
id
|
|
7
|
-
uuid
|
|
8
|
-
type
|
|
9
|
-
title
|
|
10
|
-
draftVersion {
|
|
11
|
-
registrationId
|
|
12
|
-
lastUserInteractionAt
|
|
13
|
-
validationErrors {
|
|
14
|
-
field
|
|
15
|
-
message
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
userErrors {
|
|
20
|
-
field
|
|
21
|
-
message
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
//# sourceMappingURL=extension_create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension_create.js","sourceRoot":"","sources":["../../../src/api/graphql/extension_create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;CAuBtC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const ExtensionCreateQuery = gql`\n mutation ExtensionCreate($apiKey: String!, $type: ExtensionType!, $title: String!, $config: JSON!, $context: String) {\n extensionCreate(input: {apiKey: $apiKey, type: $type, title: $title, config: $config, context: $context}) {\n extensionRegistration {\n id\n uuid\n type\n title\n draftVersion {\n registrationId\n lastUserInteractionAt\n validationErrors {\n field\n message\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n`\n\nexport interface ExtensionCreateVariables {\n apiKey: string\n type: string\n title: string\n config: string\n context?: string | null\n}\n\nexport interface ExtensionCreateSchema {\n extensionCreate: {\n extensionRegistration: {\n id: string\n uuid: string\n type: string\n title: string\n draftVersion: {\n registrationId: string\n lastUserInteractionAt: string\n validationErrors: {\n field: string[]\n message: string\n }[]\n }\n }\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const ExtensionSpecificationsQuery: string;
|
|
2
|
-
export interface ExtensionSpecificationsQueryVariables {
|
|
3
|
-
api_key: string;
|
|
4
|
-
}
|
|
5
|
-
export interface RemoteSpecification {
|
|
6
|
-
name: string;
|
|
7
|
-
externalName: string;
|
|
8
|
-
identifier: string;
|
|
9
|
-
gated: boolean;
|
|
10
|
-
externalIdentifier: string;
|
|
11
|
-
options: {
|
|
12
|
-
managementExperience: 'cli' | 'custom' | 'dashboard';
|
|
13
|
-
registrationLimit: number;
|
|
14
|
-
};
|
|
15
|
-
features?: {
|
|
16
|
-
argo?: {
|
|
17
|
-
surface: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export interface FlattenedRemoteSpecification extends RemoteSpecification {
|
|
22
|
-
surface?: string;
|
|
23
|
-
registrationLimit: number;
|
|
24
|
-
}
|
|
25
|
-
export interface ExtensionSpecificationsQuerySchema {
|
|
26
|
-
extensionSpecifications: RemoteSpecification[];
|
|
27
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const ExtensionSpecificationsQuery = gql `
|
|
3
|
-
query fetchSpecifications($api_key: String!) {
|
|
4
|
-
extensionSpecifications(apiKey: $api_key) {
|
|
5
|
-
name
|
|
6
|
-
externalName
|
|
7
|
-
externalIdentifier
|
|
8
|
-
identifier
|
|
9
|
-
gated
|
|
10
|
-
options {
|
|
11
|
-
managementExperience
|
|
12
|
-
registrationLimit
|
|
13
|
-
}
|
|
14
|
-
features {
|
|
15
|
-
argo {
|
|
16
|
-
surface
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
//# sourceMappingURL=extension_specifications.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extension_specifications.js","sourceRoot":"","sources":["../../../src/api/graphql/extension_specifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;CAmB9C,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const ExtensionSpecificationsQuery = gql`\n query fetchSpecifications($api_key: String!) {\n extensionSpecifications(apiKey: $api_key) {\n name\n externalName\n externalIdentifier\n identifier\n gated\n options {\n managementExperience\n registrationLimit\n }\n features {\n argo {\n surface\n }\n }\n }\n }\n`\n\nexport interface ExtensionSpecificationsQueryVariables {\n api_key: string\n}\n\nexport interface RemoteSpecification {\n name: string\n externalName: string\n identifier: string\n gated: boolean\n externalIdentifier: string\n options: {\n managementExperience: 'cli' | 'custom' | 'dashboard'\n registrationLimit: number\n }\n features?: {\n argo?: {\n surface: string\n }\n }\n}\n\nexport interface FlattenedRemoteSpecification extends RemoteSpecification {\n surface?: string\n registrationLimit: number\n}\n\nexport interface ExtensionSpecificationsQuerySchema {\n extensionSpecifications: RemoteSpecification[]\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const FindAppQuery: string;
|
|
2
|
-
export interface FindAppQuerySchema {
|
|
3
|
-
app: {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
apiKey: string;
|
|
7
|
-
organizationId: string;
|
|
8
|
-
apiSecretKeys: {
|
|
9
|
-
secret: string;
|
|
10
|
-
}[];
|
|
11
|
-
appType: string;
|
|
12
|
-
grantedScopes: string[];
|
|
13
|
-
};
|
|
14
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const FindAppQuery = gql `
|
|
3
|
-
query FindApp($apiKey: String!) {
|
|
4
|
-
app(apiKey: $apiKey) {
|
|
5
|
-
id
|
|
6
|
-
title
|
|
7
|
-
apiKey
|
|
8
|
-
organizationId
|
|
9
|
-
apiSecretKeys {
|
|
10
|
-
secret
|
|
11
|
-
}
|
|
12
|
-
appType
|
|
13
|
-
grantedScopes
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
//# sourceMappingURL=find_app.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find_app.js","sourceRoot":"","sources":["../../../src/api/graphql/find_app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;CAc9B,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const FindAppQuery = gql`\n query FindApp($apiKey: String!) {\n app(apiKey: $apiKey) {\n id\n title\n apiKey\n organizationId\n apiSecretKeys {\n secret\n }\n appType\n grantedScopes\n }\n }\n`\n\nexport interface FindAppQuerySchema {\n app: {\n id: string\n title: string\n apiKey: string\n organizationId: string\n apiSecretKeys: {\n secret: string\n }[]\n appType: string\n grantedScopes: string[]\n }\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const FindOrganizationQuery: string;
|
|
2
|
-
export interface FindOrganizationQuerySchema {
|
|
3
|
-
organizations: {
|
|
4
|
-
nodes: {
|
|
5
|
-
id: string;
|
|
6
|
-
businessName: string;
|
|
7
|
-
website: string;
|
|
8
|
-
appsNext: boolean;
|
|
9
|
-
apps: {
|
|
10
|
-
nodes: {
|
|
11
|
-
id: string;
|
|
12
|
-
title: string;
|
|
13
|
-
apiKey: string;
|
|
14
|
-
}[];
|
|
15
|
-
};
|
|
16
|
-
}[];
|
|
17
|
-
};
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const FindOrganizationQuery = gql `
|
|
3
|
-
query FindOrganization($id: ID!, $title: String) {
|
|
4
|
-
organizations(id: $id, first: 1) {
|
|
5
|
-
nodes {
|
|
6
|
-
id
|
|
7
|
-
businessName
|
|
8
|
-
website
|
|
9
|
-
appsNext
|
|
10
|
-
apps(first: 100, title: $title) {
|
|
11
|
-
nodes {
|
|
12
|
-
id
|
|
13
|
-
title
|
|
14
|
-
apiKey
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
21
|
-
//# sourceMappingURL=find_org.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find_org.js","sourceRoot":"","sources":["../../../src/api/graphql/find_org.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;CAkBvC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const FindOrganizationQuery = gql`\n query FindOrganization($id: ID!, $title: String) {\n organizations(id: $id, first: 1) {\n nodes {\n id\n businessName\n website\n appsNext\n apps(first: 100, title: $title) {\n nodes {\n id\n title\n apiKey\n }\n }\n }\n }\n }\n`\n\nexport interface FindOrganizationQuerySchema {\n organizations: {\n nodes: {\n id: string\n businessName: string\n website: string\n appsNext: boolean\n apps: {\n nodes: {\n id: string\n title: string\n apiKey: string\n }[]\n }\n }[]\n }\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { gql } from 'graphql-request';
|
|
2
|
-
export const FindOrganizationBasicQuery = gql `
|
|
3
|
-
query FindOrganization($id: ID!) {
|
|
4
|
-
organizations(id: $id, first: 1) {
|
|
5
|
-
nodes {
|
|
6
|
-
id
|
|
7
|
-
businessName
|
|
8
|
-
website
|
|
9
|
-
appsNext
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
//# sourceMappingURL=find_org_basic.js.map
|