@shopify/cli-kit 3.6.1 → 3.8.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/CHANGELOG.md +26 -0
- package/dist/analytics.d.ts +11 -1
- package/dist/analytics.js +33 -23
- package/dist/analytics.js.map +1 -1
- package/dist/api/common.d.ts +1 -1
- package/dist/api/common.js +1 -1
- package/dist/api/common.js.map +1 -1
- package/dist/api/graphql/extension_specifications.js.map +1 -1
- package/dist/api/graphql/functions/app_function_set.d.ts +9 -23
- package/dist/api/graphql/functions/app_function_set.js +18 -27
- package/dist/api/graphql/functions/app_function_set.js.map +1 -1
- package/dist/api/graphql/functions/upload_url_generate.d.ts +12 -0
- package/dist/api/graphql/functions/upload_url_generate.js +11 -0
- package/dist/api/graphql/functions/upload_url_generate.js.map +1 -0
- package/dist/api/graphql/get_urls.d.ts +10 -0
- package/dist/api/graphql/get_urls.js +10 -0
- package/dist/api/graphql/get_urls.js.map +1 -0
- package/dist/api/graphql/index.d.ts +19 -14
- package/dist/api/graphql/index.js +19 -14
- package/dist/api/graphql/index.js.map +1 -1
- package/dist/api/graphql/update_urls.d.ts +2 -2
- package/dist/api/graphql/update_urls.js +2 -2
- package/dist/api/graphql/update_urls.js.map +1 -1
- package/dist/constants.d.ts +3 -1
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/content-tokens.d.ts +44 -0
- package/dist/content-tokens.js +103 -0
- package/dist/content-tokens.js.map +1 -0
- package/dist/environment/local.d.ts +19 -2
- package/dist/environment/local.js +45 -5
- package/dist/environment/local.js.map +1 -1
- package/dist/environment/utilities.d.ts +4 -0
- package/dist/environment/utilities.js +9 -0
- package/dist/environment/utilities.js.map +1 -1
- package/dist/error.d.ts +4 -4
- package/dist/error.js +16 -4
- package/dist/error.js.map +1 -1
- package/dist/file.d.ts +9 -1
- package/dist/file.js +15 -2
- package/dist/file.js.map +1 -1
- package/dist/github.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/metadata.d.ts +180 -12
- package/dist/metadata.js +39 -6
- package/dist/metadata.js.map +1 -1
- package/dist/monorail.d.ts +48 -1
- package/dist/monorail.js +2 -1
- package/dist/monorail.js.map +1 -1
- package/dist/node/archiver.js +1 -0
- package/dist/node/archiver.js.map +1 -1
- package/dist/node/base-command.d.ts +11 -1
- package/dist/node/base-command.js +19 -4
- package/dist/node/base-command.js.map +1 -1
- package/dist/node/cli.js +2 -2
- package/dist/node/cli.js.map +1 -1
- package/dist/node/dot-env.d.ts +9 -0
- package/dist/node/dot-env.js +31 -0
- package/dist/node/dot-env.js.map +1 -1
- package/dist/node/error-handler.d.ts +14 -2
- package/dist/node/error-handler.js +58 -13
- package/dist/node/error-handler.js.map +1 -1
- package/dist/node/hooks/prerun.js +1 -1
- package/dist/node/hooks/prerun.js.map +1 -1
- package/dist/node/node-package-manager.d.ts +12 -17
- package/dist/node/node-package-manager.js +23 -14
- package/dist/node/node-package-manager.js.map +1 -1
- package/dist/node/ruby.js +14 -7
- package/dist/node/ruby.js.map +1 -1
- package/dist/output.d.ts +22 -43
- package/dist/output.js +31 -91
- package/dist/output.js.map +1 -1
- package/dist/path.d.ts +1 -0
- package/dist/plugins/tunnel.d.ts +40 -0
- package/dist/plugins/tunnel.js +11 -0
- package/dist/plugins/tunnel.js.map +1 -0
- package/dist/plugins.d.ts +11 -13
- package/dist/plugins.js +0 -1
- package/dist/plugins.js.map +1 -1
- package/dist/session/authorize.js +1 -1
- package/dist/session/authorize.js.map +1 -1
- package/dist/session/exchange.js +1 -2
- package/dist/session/exchange.js.map +1 -1
- package/dist/session/redirect-listener.js +6 -5
- package/dist/session/redirect-listener.js.map +1 -1
- package/dist/session.js +1 -1
- package/dist/session.js.map +1 -1
- package/dist/store.d.ts +4 -2
- package/dist/store.js +3 -4
- package/dist/store.js.map +1 -1
- package/dist/string.d.ts +1 -0
- package/dist/string.js +3 -0
- package/dist/string.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typing/deep-required.d.ts +12 -0
- package/dist/typing/deep-required.js +2 -0
- package/dist/typing/deep-required.js.map +1 -0
- package/dist/typing/pick-by-prefix.d.ts +12 -0
- package/dist/typing/pick-by-prefix.js +2 -0
- package/dist/typing/pick-by-prefix.js.map +1 -0
- package/dist/ui/executor.d.ts +7 -0
- package/dist/ui/executor.js +60 -0
- package/dist/ui/executor.js.map +1 -0
- package/dist/ui/inquirer/autocomplete.d.ts +11 -0
- package/dist/ui/inquirer/autocomplete.js +95 -0
- package/dist/ui/inquirer/autocomplete.js.map +1 -0
- package/dist/ui/inquirer/input.d.ts +16 -0
- package/dist/ui/inquirer/input.js +46 -0
- package/dist/ui/inquirer/input.js.map +1 -0
- package/dist/ui/inquirer/password.d.ts +7 -0
- package/dist/ui/inquirer/password.js +8 -0
- package/dist/ui/inquirer/password.js.map +1 -0
- package/dist/ui/inquirer/select.d.ts +14 -0
- package/dist/ui/inquirer/select.js +27 -0
- package/dist/ui/inquirer/select.js.map +1 -0
- package/dist/ui.d.ts +7 -23
- package/dist/ui.js +13 -60
- package/dist/ui.js.map +1 -1
- package/dist/version.d.ts +1 -0
- package/package.json +15 -5
- package/dist/api/graphql/functions/module_upload_url_generate.d.ts +0 -18
- package/dist/api/graphql/functions/module_upload_url_generate.js +0 -17
- package/dist/api/graphql/functions/module_upload_url_generate.js.map +0 -1
- package/dist/ui/autocomplete.d.ts +0 -7
- package/dist/ui/autocomplete.js +0 -43
- package/dist/ui/autocomplete.js.map +0 -1
- package/dist/ui/input.d.ts +0 -7
- package/dist/ui/input.js +0 -48
- package/dist/ui/input.js.map +0 -1
- package/dist/ui/select.d.ts +0 -6
- package/dist/ui/select.js +0 -30
- package/dist/ui/select.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @shopify/cli-kit
|
|
2
2
|
|
|
3
|
+
## 3.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- db4e6089: Releasing extensions binary in an automatic way
|
|
8
|
+
- 79df925d: Add GraphQL endpoint to get Partners URLs
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 79df925d: Add new fields to app cache: updateURLs and newApp
|
|
13
|
+
- 03bd5f28: Added `web-env` command to show and generate .env files without erasing existing ones
|
|
14
|
+
|
|
15
|
+
## 3.7.1
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 18717ad5: Rename the environment variable SHOPIFY_CONFIG to SHOPIFY_ENV because it's more representative of its usage
|
|
20
|
+
- 29f46e8f: Make inquirer default for inputs
|
|
21
|
+
- bba213f9: Shopify Functions identifiers have been changed to ULIDs. Existing projects will be updated during the next deploy.
|
|
22
|
+
|
|
23
|
+
## 3.6.2
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 59d56a40: Only show errors from CLI 2 once
|
|
28
|
+
|
|
3
29
|
## 3.6.1
|
|
4
30
|
|
|
5
31
|
## 3.6.0
|
package/dist/analytics.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ interface StartOptions {
|
|
|
3
3
|
command: string;
|
|
4
4
|
args: string[];
|
|
5
5
|
currentTime?: number;
|
|
6
|
+
commandClass?: Interfaces.Command.Class;
|
|
6
7
|
}
|
|
7
|
-
export declare const start: ({ command, args, currentTime }: StartOptions) => void
|
|
8
|
+
export declare const start: ({ command, args, currentTime, commandClass }: StartOptions) => Promise<void>;
|
|
8
9
|
interface ReportEventOptions {
|
|
9
10
|
config: Interfaces.Config;
|
|
10
11
|
errorMessage?: string;
|
|
@@ -16,4 +17,13 @@ interface ReportEventOptions {
|
|
|
16
17
|
*
|
|
17
18
|
*/
|
|
18
19
|
export declare function reportEvent(options: ReportEventOptions): Promise<void>;
|
|
20
|
+
export declare function getEnvironmentData(config: Interfaces.Config): {
|
|
21
|
+
uname: string;
|
|
22
|
+
env_ci: boolean;
|
|
23
|
+
env_ci_platform: string | undefined;
|
|
24
|
+
env_plugin_installed_any_custom: boolean;
|
|
25
|
+
env_plugin_installed_shopify: string;
|
|
26
|
+
env_shell: string;
|
|
27
|
+
env_web_ide: string | undefined;
|
|
28
|
+
};
|
|
19
29
|
export {};
|
package/dist/analytics.js
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
1
|
import * as environment from './environment.js';
|
|
3
2
|
import { platformAndArch } from './os.js';
|
|
4
|
-
import { resolve } from './path.js';
|
|
5
3
|
import { version as rubyVersion } from './node/ruby.js';
|
|
6
4
|
import { content, debug, token } from './output.js';
|
|
7
5
|
import constants from './constants.js';
|
|
8
6
|
import * as metadata from './metadata.js';
|
|
9
|
-
import { publishEvent } from './monorail.js';
|
|
7
|
+
import { publishEvent, MONORAIL_COMMAND_TOPIC } from './monorail.js';
|
|
10
8
|
import { fanoutHooks } from './plugins.js';
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { packageManagerUsedForCreating } from './node/node-package-manager.js';
|
|
10
|
+
export const start = async ({ command, args, currentTime = new Date().getTime(), commandClass }) => {
|
|
11
|
+
await metadata.addSensitive(() => ({
|
|
13
12
|
commandStartOptions: {
|
|
14
13
|
startTime: currentTime,
|
|
15
14
|
startCommand: command,
|
|
16
15
|
startArgs: args,
|
|
17
16
|
},
|
|
18
|
-
});
|
|
17
|
+
}));
|
|
18
|
+
await metadata.addPublic(() => ({
|
|
19
|
+
cmd_all_launcher: packageManagerUsedForCreating(),
|
|
20
|
+
cmd_all_plugin: commandClass?.plugin?.name,
|
|
21
|
+
}));
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* Report an analytics event, sending it off to Monorail -- Shopify's internal analytics service.
|
|
@@ -30,11 +33,11 @@ export async function reportEvent(options) {
|
|
|
30
33
|
// Nothing to log
|
|
31
34
|
return;
|
|
32
35
|
}
|
|
33
|
-
if (environment.local.analyticsDisabled()) {
|
|
36
|
+
if (!environment.local.alwaysLogAnalytics() && environment.local.analyticsDisabled()) {
|
|
34
37
|
debug(content `Skipping command analytics, payload: ${token.json(payload)}`);
|
|
35
38
|
return;
|
|
36
39
|
}
|
|
37
|
-
const response = await publishEvent(
|
|
40
|
+
const response = await publishEvent(MONORAIL_COMMAND_TOPIC, payload.public, payload.sensitive);
|
|
38
41
|
if (response.type === 'error') {
|
|
39
42
|
debug(response.message);
|
|
40
43
|
}
|
|
@@ -56,20 +59,9 @@ const buildPayload = async ({ config, errorMessage }) => {
|
|
|
56
59
|
}
|
|
57
60
|
const { startCommand, startArgs, startTime } = commandStartOptions;
|
|
58
61
|
const currentTime = new Date().getTime();
|
|
59
|
-
let directory = process.cwd();
|
|
60
|
-
const pathFlagIndex = startArgs.indexOf('--path');
|
|
61
|
-
if (pathFlagIndex >= 0) {
|
|
62
|
-
directory = resolve(startArgs[pathFlagIndex + 1]);
|
|
63
|
-
}
|
|
64
|
-
const { platform, arch } = platformAndArch();
|
|
65
62
|
const { '@shopify/app': appPublic, ...otherPluginsPublic } = await fanoutHooks(config, 'public_command_metadata', {});
|
|
66
|
-
const { partner_id, project_type, api_key, ...otherShopifyAppPublic } = appPublic ?? {};
|
|
67
63
|
const sensitivePluginData = await fanoutHooks(config, 'sensitive_command_metadata', {});
|
|
68
|
-
const
|
|
69
|
-
partner_id,
|
|
70
|
-
api_key,
|
|
71
|
-
project_type,
|
|
72
|
-
};
|
|
64
|
+
const environmentData = getEnvironmentData(config);
|
|
73
65
|
return {
|
|
74
66
|
public: {
|
|
75
67
|
command: startCommand,
|
|
@@ -77,12 +69,13 @@ const buildPayload = async ({ config, errorMessage }) => {
|
|
|
77
69
|
time_end: currentTime,
|
|
78
70
|
total_time: currentTime - startTime,
|
|
79
71
|
success: errorMessage === undefined,
|
|
80
|
-
uname: `${platform} ${arch}`,
|
|
81
72
|
cli_version: await constants.versions.cliKit(),
|
|
82
73
|
ruby_version: (await rubyVersion()) || '',
|
|
83
74
|
node_version: process.version.replace('v', ''),
|
|
84
75
|
is_employee: await environment.local.isShopify(),
|
|
85
|
-
...
|
|
76
|
+
...environmentData,
|
|
77
|
+
...appPublic,
|
|
78
|
+
...metadata.getAllPublic(),
|
|
86
79
|
},
|
|
87
80
|
sensitive: {
|
|
88
81
|
args: startArgs.join(' '),
|
|
@@ -90,7 +83,6 @@ const buildPayload = async ({ config, errorMessage }) => {
|
|
|
90
83
|
metadata: JSON.stringify({
|
|
91
84
|
...sensitiveMetadata,
|
|
92
85
|
extraPublic: {
|
|
93
|
-
'@shopify/app': otherShopifyAppPublic,
|
|
94
86
|
...otherPluginsPublic,
|
|
95
87
|
},
|
|
96
88
|
extraSensitive: sensitivePluginData,
|
|
@@ -98,4 +90,22 @@ const buildPayload = async ({ config, errorMessage }) => {
|
|
|
98
90
|
},
|
|
99
91
|
};
|
|
100
92
|
};
|
|
93
|
+
export function getEnvironmentData(config) {
|
|
94
|
+
const ciPlatform = environment.local.ciPlatform();
|
|
95
|
+
const pluginNames = config.plugins
|
|
96
|
+
.map((plugin) => plugin.name)
|
|
97
|
+
.sort()
|
|
98
|
+
.filter((plugin) => !plugin.startsWith('@oclif/'));
|
|
99
|
+
const shopifyPlugins = pluginNames.filter((plugin) => plugin.startsWith('@shopify/'));
|
|
100
|
+
const { platform, arch } = platformAndArch();
|
|
101
|
+
return {
|
|
102
|
+
uname: `${platform} ${arch}`,
|
|
103
|
+
env_ci: ciPlatform.isCI,
|
|
104
|
+
env_ci_platform: ciPlatform.name,
|
|
105
|
+
env_plugin_installed_any_custom: pluginNames.length !== shopifyPlugins.length,
|
|
106
|
+
env_plugin_installed_shopify: JSON.stringify(shopifyPlugins),
|
|
107
|
+
env_shell: config.shell,
|
|
108
|
+
env_web_ide: environment.local.webIDEPlatform(),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
101
111
|
//# sourceMappingURL=analytics.js.map
|
package/dist/analytics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;AACvC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AACjD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,EAAC,YAAY,EAAE,sBAAsB,EAAC,MAAM,eAAe,CAAA;AAClE,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAA;AACxC,OAAO,EAAC,6BAA6B,EAAC,MAAM,gCAAgC,CAAA;AAU5E,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,EAAe,EAAE,EAAE;IAC7G,MAAM,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC;QACjC,mBAAmB,EAAE;YACnB,SAAS,EAAE,WAAW;YACtB,YAAY,EAAE,OAAO;YACrB,SAAS,EAAE,IAAI;SAChB;KACF,CAAC,CAAC,CAAA;IAEH,MAAM,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC;QAC9B,gBAAgB,EAAE,6BAA6B,EAAE;QACjD,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI;KAC3C,CAAC,CAAC,CAAA;AACL,CAAC,CAAA;AAOD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAA2B;I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B,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;SAC5B,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAA;IACpD,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAA;IAErF,MAAM,EAAC,QAAQ,EAAE,IAAI,EAAC,GAAG,eAAe,EAAE,CAAA;IAE1C,OAAO;QACL,KAAK,EAAE,GAAG,QAAQ,IAAI,IAAI,EAAE;QAC5B,MAAM,EAAE,UAAU,CAAC,IAAI;QACvB,eAAe,EAAE,UAAU,CAAC,IAAI;QAChC,+BAA+B,EAAE,WAAW,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM;QAC7E,4BAA4B,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC;QAC5D,SAAS,EAAE,MAAM,CAAC,KAAK;QACvB,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,cAAc,EAAE;KAChD,CAAA;AACH,CAAC","sourcesContent":["import * as environment from './environment.js'\nimport {platformAndArch} from './os.js'\nimport {version as rubyVersion} from './node/ruby.js'\nimport {content, debug, token} from './output.js'\nimport constants from './constants.js'\nimport * as metadata from './metadata.js'\nimport {publishEvent, MONORAIL_COMMAND_TOPIC} from './monorail.js'\nimport {fanoutHooks} from './plugins.js'\nimport {packageManagerUsedForCreating} from './node/node-package-manager.js'\nimport {Interfaces} from '@oclif/core'\n\ninterface StartOptions {\n command: string\n args: string[]\n currentTime?: number\n commandClass?: Interfaces.Command.Class\n}\n\nexport const start = async ({command, args, currentTime = new Date().getTime(), commandClass}: StartOptions) => {\n await metadata.addSensitive(() => ({\n commandStartOptions: {\n startTime: currentTime,\n startCommand: command,\n startArgs: args,\n },\n }))\n\n await metadata.addPublic(() => ({\n cmd_all_launcher: packageManagerUsedForCreating(),\n cmd_all_plugin: commandClass?.plugin?.name,\n }))\n}\n\ninterface ReportEventOptions {\n config: Interfaces.Config\n errorMessage?: string\n}\n\n/**\n * Report an analytics event, sending it off to Monorail -- Shopify's internal analytics service.\n *\n * The payload for an event includes both generic data, and data gathered from installed plug-ins.\n *\n */\nexport async function reportEvent(options: ReportEventOptions) {\n try {\n const payload = await buildPayload(options)\n if (payload === undefined) {\n // Nothing to log\n return\n }\n if (!environment.local.alwaysLogAnalytics() && environment.local.analyticsDisabled()) {\n debug(content`Skipping command analytics, payload: ${token.json(payload)}`)\n return\n }\n const response = await publishEvent(MONORAIL_COMMAND_TOPIC, payload.public, payload.sensitive)\n if (response.type === 'error') {\n debug(response.message)\n }\n // eslint-disable-next-line no-catch-all/no-catch-all\n } catch (error) {\n let message = 'Failed to report usage analytics'\n if (error instanceof Error) {\n message = message.concat(`: ${error.message}`)\n }\n debug(message)\n }\n}\n\nconst buildPayload = async ({config, errorMessage}: ReportEventOptions) => {\n const {commandStartOptions, ...sensitiveMetadata} = metadata.getAllSensitive()\n if (commandStartOptions === undefined) {\n debug('Unable to log analytics event - no information on executed command')\n return\n }\n const {startCommand, startArgs, startTime} = commandStartOptions\n const currentTime = new Date().getTime()\n\n const {'@shopify/app': appPublic, ...otherPluginsPublic} = await fanoutHooks(config, 'public_command_metadata', {})\n const sensitivePluginData = await fanoutHooks(config, 'sensitive_command_metadata', {})\n\n const environmentData = getEnvironmentData(config)\n\n return {\n public: {\n command: startCommand,\n time_start: startTime,\n time_end: currentTime,\n total_time: currentTime - startTime,\n success: errorMessage === undefined,\n cli_version: await constants.versions.cliKit(),\n ruby_version: (await rubyVersion()) || '',\n node_version: process.version.replace('v', ''),\n is_employee: await environment.local.isShopify(),\n ...environmentData,\n ...appPublic,\n ...metadata.getAllPublic(),\n },\n sensitive: {\n args: startArgs.join(' '),\n error_message: errorMessage,\n metadata: JSON.stringify({\n ...sensitiveMetadata,\n extraPublic: {\n ...otherPluginsPublic,\n },\n extraSensitive: sensitivePluginData,\n }),\n },\n }\n}\n\nexport function getEnvironmentData(config: Interfaces.Config) {\n const ciPlatform = environment.local.ciPlatform()\n\n const pluginNames = config.plugins\n .map((plugin) => plugin.name)\n .sort()\n .filter((plugin) => !plugin.startsWith('@oclif/'))\n const shopifyPlugins = pluginNames.filter((plugin) => plugin.startsWith('@shopify/'))\n\n const {platform, arch} = platformAndArch()\n\n return {\n uname: `${platform} ${arch}`,\n env_ci: ciPlatform.isCI,\n env_ci_platform: ciPlatform.name,\n env_plugin_installed_any_custom: pluginNames.length !== shopifyPlugins.length,\n env_plugin_installed_shopify: JSON.stringify(shopifyPlugins),\n env_shell: config.shell,\n env_web_ide: environment.local.webIDEPlatform(),\n }\n}\n"]}
|
package/dist/api/common.d.ts
CHANGED
|
@@ -17,5 +17,5 @@ export declare function sanitizedHeadersOutput(headers: {
|
|
|
17
17
|
}): string;
|
|
18
18
|
export declare function debugLogRequest<T>(api: string, query: RequestDocument, variables?: Variables, headers?: {
|
|
19
19
|
[key: string]: string;
|
|
20
|
-
}):
|
|
20
|
+
}): void;
|
|
21
21
|
export declare function handlingErrors<T>(api: string, action: () => Promise<T>): Promise<T>;
|
package/dist/api/common.js
CHANGED
|
@@ -43,7 +43,7 @@ export function sanitizedHeadersOutput(headers) {
|
|
|
43
43
|
})
|
|
44
44
|
.join('\n');
|
|
45
45
|
}
|
|
46
|
-
export
|
|
46
|
+
export function debugLogRequest(api, query, variables, headers = {}) {
|
|
47
47
|
debug(`
|
|
48
48
|
Sending ${token.raw(api)} GraphQL request:
|
|
49
49
|
${query}
|
package/dist/api/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAA;AACrD,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAC,gB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AAE;;;EAGnD,sBAAsB,CAAC,OAAO,CAAC;CAChC,CAAC,CAAA;AACF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAI,GAAW,EAAE,MAAwB;IAC3E,IAAI;QACF,OAAO,MAAM,MAAM,EAAE,CAAA;KACtB;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,KAAK,YAAY,WAAW,EAAE;YAChC,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,CAAA;QAC3C,KAAK,CAAC,GAAG,CACb,GAAG,CACJ,8DAA8D,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE;;IAEvF,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;OACpC,CAAC,CAAA;YACF,IAAI,WAAkB,CAAA;YACtB,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,EAAE;gBAC/B,WAAW,GAAG,IAAI,kBAAkB,CAAC,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;aAC1E;iBAAM;gBACL,WAAW,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC,CAAA;aACtC;YACD,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;YAC/B,MAAM,WAAW,CAAA;SAClB;aAAM;YACL,MAAM,KAAK,CAAA;SACZ;KACF;AACH,CAAC","sourcesContent":["import {firstPartyDev} from '../environment/local.js'\nimport constants from '../constants.js'\nimport {stringifyMessage, content, token as outputToken, token, debug} from '../output.js'\nimport {Abort, ExtendableError} from '../error.js'\nimport {ClientError, RequestDocument, Variables} from 'graphql-request'\nimport {randomUUID} from 'crypto'\n\nexport class RequestClientError extends ExtendableError {\n statusCode: number\n public constructor(message: string, statusCode: number) {\n super(message)\n this.statusCode = statusCode\n }\n}\n\nexport async function buildHeaders(token: string): Promise<{[key: string]: string}> {\n const userAgent = `Shopify CLI; v=${await constants.versions.cliKit()}`\n\n const headers = {\n 'User-Agent': userAgent,\n // 'Sec-CH-UA': secCHUA, This header requires the Git sha.\n 'Sec-CH-UA-PLATFORM': process.platform,\n 'X-Request-Id': randomUUID(),\n authorization: `Bearer ${token}`,\n 'X-Shopify-Access-Token': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n ...(firstPartyDev() && {'X-Shopify-Cli-Employee': '1'}),\n }\n\n return headers\n}\n\n/**\n * Removes the sensitive data from the headers and outputs them as a string.\n * @param headers {{[key: string]: string}} HTTP headers.\n * @returns {string} A sanitized version of the headers as a string.\n */\nexport function sanitizedHeadersOutput(headers: {[key: string]: string}): string {\n const sanitized: {[key: string]: string} = {}\n const keywords = ['token', 'authorization']\n Object.keys(headers).forEach((header) => {\n if (keywords.find((keyword) => header.toLocaleLowerCase().includes(keyword)) === undefined) {\n sanitized[header] = headers[header]\n }\n })\n return Object.keys(sanitized)\n .map((header) => {\n return ` - ${header}: ${sanitized[header]}`\n })\n .join('\\n')\n}\n\nexport function debugLogRequest<T>(\n api: string,\n query: RequestDocument,\n variables?: Variables,\n headers: {[key: string]: string} = {},\n) {\n debug(`\nSending ${token.raw(api)} GraphQL request:\n${query}\n\nWith variables:\n${variables ? JSON.stringify(variables, null, 2) : ''}\n\nAnd headers:\n${sanitizedHeadersOutput(headers)}\n`)\n}\n\nexport async function handlingErrors<T>(api: string, action: () => Promise<T>): Promise<T> {\n try {\n return await action()\n } catch (error) {\n if (error instanceof ClientError) {\n const errorMessage = stringifyMessage(content`\n The ${token.raw(\n api,\n )} GraphQL API responded unsuccessfully with the HTTP status ${`${error.response.status}`} and errors:\n\n ${outputToken.json(error.response.errors)}\n `)\n let mappedError: Error\n if (error.response.status < 500) {\n mappedError = new RequestClientError(errorMessage, error.response.status)\n } else {\n mappedError = new Abort(errorMessage)\n }\n mappedError.stack = error.stack\n throw mappedError\n } else {\n throw error\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
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;;;;;;;;;;;;;;;CAe9C,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 identifier\n options {\n managementExperience\n }\n features {\n argo {\n surface\n }\n }\n }\n }\n`\n\nexport interface ExtensionSpecificationsQueryVariables {\n
|
|
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;;;;;;;;;;;;;;;CAe9C,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 identifier\n options {\n managementExperience\n }\n features {\n argo {\n surface\n }\n }\n }\n }\n`\n\nexport interface ExtensionSpecificationsQueryVariables {\n api_key: string\n}\n\nexport interface ExtensionSpecificationsQuerySchema {\n extensionSpecifications: {\n name: string\n identifier: string\n options: {\n managementExperience: 'cli' | 'custom' | 'dashboard'\n }[]\n features?: {\n argo?: {\n surface: string\n }\n }\n }[]\n}\n"]}
|
|
@@ -1,43 +1,29 @@
|
|
|
1
1
|
export declare const AppFunctionSetMutation: string;
|
|
2
2
|
export interface AppFunctionSetMutationSchema {
|
|
3
3
|
data: {
|
|
4
|
-
|
|
4
|
+
functionSet: {
|
|
5
5
|
userErrors: {
|
|
6
6
|
field: string;
|
|
7
7
|
message: string;
|
|
8
8
|
tag: string;
|
|
9
9
|
}[];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
appKey: string;
|
|
13
|
-
configSchema: unknown;
|
|
14
|
-
extensionPointName: string;
|
|
15
|
-
title: string;
|
|
10
|
+
function?: {
|
|
11
|
+
id: string;
|
|
16
12
|
};
|
|
17
13
|
};
|
|
18
14
|
};
|
|
19
15
|
}
|
|
20
16
|
export interface AppFunctionSetVariables {
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
id?: string;
|
|
18
|
+
legacyUuid?: string;
|
|
23
19
|
title: string;
|
|
24
20
|
description?: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
scriptConfigVersion?: string;
|
|
29
|
-
configurationUi: boolean;
|
|
30
|
-
configurationDefinition?: string;
|
|
31
|
-
moduleUploadUrl: string;
|
|
32
|
-
library?: {
|
|
33
|
-
language: string;
|
|
34
|
-
version: string;
|
|
35
|
-
};
|
|
21
|
+
apiType: string;
|
|
22
|
+
apiVersion?: string;
|
|
23
|
+
inputQuery?: string;
|
|
36
24
|
appBridge?: {
|
|
37
25
|
createPath?: string;
|
|
38
26
|
detailsPath?: string;
|
|
39
27
|
};
|
|
40
|
-
|
|
41
|
-
apiVersion?: string;
|
|
42
|
-
skipCompilationJob: boolean;
|
|
28
|
+
moduleUploadUrl: string;
|
|
43
29
|
}
|
|
@@ -1,49 +1,40 @@
|
|
|
1
1
|
import { gql } from 'graphql-request';
|
|
2
2
|
export const AppFunctionSetMutation = gql `
|
|
3
|
-
mutation
|
|
4
|
-
$
|
|
5
|
-
$
|
|
3
|
+
mutation FunctionSet(
|
|
4
|
+
$id: FunctionId
|
|
5
|
+
$legacyUuid: String
|
|
6
6
|
$title: String!
|
|
7
7
|
$description: String
|
|
8
|
-
$
|
|
9
|
-
$
|
|
10
|
-
$schemaMinorVersion: String
|
|
11
|
-
$scriptConfigVersion: String
|
|
12
|
-
$configurationUi: Boolean!
|
|
13
|
-
$configurationDefinition: String
|
|
14
|
-
$moduleUploadUrl: String!
|
|
15
|
-
$library: LibraryInput
|
|
8
|
+
$apiType: String!
|
|
9
|
+
$apiVersion: String!
|
|
16
10
|
$inputQuery: String
|
|
17
11
|
$appBridge: AppBridgeInput
|
|
18
|
-
$
|
|
12
|
+
$moduleUploadUrl: String!
|
|
19
13
|
) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
functionSet(
|
|
15
|
+
id: $id
|
|
16
|
+
legacyUuid: $legacyUuid
|
|
23
17
|
title: $title
|
|
24
18
|
description: $description
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
schemaMinorVersion: $schemaMinorVersion
|
|
28
|
-
scriptConfigVersion: $scriptConfigVersion
|
|
29
|
-
configurationUi: $configurationUi
|
|
30
|
-
configurationDefinition: $configurationDefinition
|
|
31
|
-
moduleUploadUrl: $moduleUploadUrl
|
|
32
|
-
library: $library
|
|
19
|
+
apiType: $apiType
|
|
20
|
+
apiVersion: $apiVersion
|
|
33
21
|
inputQuery: $inputQuery
|
|
34
22
|
appBridge: $appBridge
|
|
35
|
-
|
|
23
|
+
moduleUploadUrl: $moduleUploadUrl
|
|
36
24
|
) {
|
|
37
25
|
userErrors {
|
|
38
26
|
field
|
|
39
27
|
message
|
|
40
28
|
tag
|
|
41
29
|
}
|
|
42
|
-
|
|
30
|
+
function {
|
|
31
|
+
id
|
|
43
32
|
uuid
|
|
44
33
|
appKey
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
configuration {
|
|
35
|
+
schema
|
|
36
|
+
}
|
|
37
|
+
apiType
|
|
47
38
|
title
|
|
48
39
|
}
|
|
49
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_function_set.js","sourceRoot":"","sources":["../../../../src/api/graphql/functions/app_function_set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"app_function_set.js","sourceRoot":"","sources":["../../../../src/api/graphql/functions/app_function_set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCxC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const AppFunctionSetMutation = gql`\n mutation FunctionSet(\n $id: FunctionId\n $legacyUuid: String\n $title: String!\n $description: String\n $apiType: String!\n $apiVersion: String!\n $inputQuery: String\n $appBridge: AppBridgeInput\n $moduleUploadUrl: String!\n ) {\n functionSet(\n id: $id\n legacyUuid: $legacyUuid\n title: $title\n description: $description\n apiType: $apiType\n apiVersion: $apiVersion\n inputQuery: $inputQuery\n appBridge: $appBridge\n moduleUploadUrl: $moduleUploadUrl\n ) {\n userErrors {\n field\n message\n tag\n }\n function {\n id\n uuid\n appKey\n configuration {\n schema\n }\n apiType\n title\n }\n }\n }\n`\n\nexport interface AppFunctionSetMutationSchema {\n data: {\n functionSet: {\n userErrors: {\n field: string\n message: string\n tag: string\n }[]\n function?: {\n id: string\n }\n }\n }\n}\n\nexport interface AppFunctionSetVariables {\n id?: string\n legacyUuid?: string\n title: string\n description?: string\n apiType: string\n apiVersion?: string\n inputQuery?: string\n appBridge?: {\n createPath?: string\n detailsPath?: string\n }\n moduleUploadUrl: string\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload_url_generate.js","sourceRoot":"","sources":["../../../../src/api/graphql/functions/upload_url_generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAA;;;;;;;;CAQ3C,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const UploadUrlGenerateMutation = gql`\n mutation uploadUrlGenerate {\n uploadUrlGenerate {\n url\n headers\n maxSize\n }\n }\n`\n\nexport interface UploadUrlGenerateMutationSchema {\n data: {\n uploadUrlGenerate: {\n url: string\n headers: {[key: string]: string}\n maxSize: string\n }\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_urls.js","sourceRoot":"","sources":["../../../src/api/graphql/get_urls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;CAO9B,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const GetURLsQuery = gql`\n query getApp($apiKey: String!) {\n app(apiKey: $apiKey) {\n applicationUrl\n redirectUrlWhitelist\n }\n }\n`\n\nexport interface GetURLsQueryVariables {\n apiKey: string\n}\n\nexport interface GetURLsQuerySchema {\n app: {\n applicationUrl: string\n redirectUrlWhitelist: string[]\n }\n}\n"]}
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './all_app_extension_registrations.js';
|
|
2
|
+
export * from './all_app_extension_registrations.js';
|
|
2
3
|
export * from './all_orgs.js';
|
|
3
|
-
export * from './create_app.js';
|
|
4
|
-
export * from './update_urls.js';
|
|
5
|
-
export * from './find_app.js';
|
|
6
|
-
export * from './update_draft.js';
|
|
7
|
-
export * from './generate_signed_upload_url.js';
|
|
8
|
-
export * from './create_deployment.js';
|
|
9
4
|
export * from './all_stores_by_org.js';
|
|
10
5
|
export * from './convert_dev_to_test_store.js';
|
|
6
|
+
export * from './create_app.js';
|
|
7
|
+
export * from './create_deployment.js';
|
|
11
8
|
export * from './extension_create.js';
|
|
12
9
|
export * from './extension_specifications.js';
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export * from './functions/module_upload_url_generate.js';
|
|
10
|
+
export * from './find_app.js';
|
|
11
|
+
export * from './find_org_basic.js';
|
|
12
|
+
export * from './find_org.js';
|
|
13
|
+
export * from './find_store_by_domain.js';
|
|
18
14
|
export * from './functions/app_function_set.js';
|
|
19
15
|
export * from './functions/compile_module.js';
|
|
16
|
+
export * from './functions/function_service_proxy.js';
|
|
17
|
+
export * from './functions/function_service_proxy.js';
|
|
18
|
+
export * from './functions/get_app_functions.js';
|
|
19
|
+
export * from './functions/get_app_functions.js';
|
|
20
20
|
export * from './functions/module_compilation_status.js';
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
21
|
+
export * from './functions/upload_url_generate.js';
|
|
22
|
+
export * from './generate_signed_upload_url.js';
|
|
23
|
+
export * from './get_urls.js';
|
|
24
|
+
export * from './get_variant_id.js';
|
|
25
|
+
export * from './get_variant_id.js';
|
|
26
|
+
export * from './update_draft.js';
|
|
27
|
+
export * from './update_urls.js';
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './all_app_extension_registrations.js';
|
|
2
|
+
export * from './all_app_extension_registrations.js';
|
|
2
3
|
export * from './all_orgs.js';
|
|
3
|
-
export * from './create_app.js';
|
|
4
|
-
export * from './update_urls.js';
|
|
5
|
-
export * from './find_app.js';
|
|
6
|
-
export * from './update_draft.js';
|
|
7
|
-
export * from './generate_signed_upload_url.js';
|
|
8
|
-
export * from './create_deployment.js';
|
|
9
4
|
export * from './all_stores_by_org.js';
|
|
10
5
|
export * from './convert_dev_to_test_store.js';
|
|
6
|
+
export * from './create_app.js';
|
|
7
|
+
export * from './create_deployment.js';
|
|
11
8
|
export * from './extension_create.js';
|
|
12
9
|
export * from './extension_specifications.js';
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export * from './functions/module_upload_url_generate.js';
|
|
10
|
+
export * from './find_app.js';
|
|
11
|
+
export * from './find_org_basic.js';
|
|
12
|
+
export * from './find_org.js';
|
|
13
|
+
export * from './find_store_by_domain.js';
|
|
18
14
|
export * from './functions/app_function_set.js';
|
|
19
15
|
export * from './functions/compile_module.js';
|
|
16
|
+
export * from './functions/function_service_proxy.js';
|
|
17
|
+
export * from './functions/function_service_proxy.js';
|
|
18
|
+
export * from './functions/get_app_functions.js';
|
|
19
|
+
export * from './functions/get_app_functions.js';
|
|
20
20
|
export * from './functions/module_compilation_status.js';
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
21
|
+
export * from './functions/upload_url_generate.js';
|
|
22
|
+
export * from './generate_signed_upload_url.js';
|
|
23
|
+
export * from './get_urls.js';
|
|
24
|
+
export * from './get_variant_id.js';
|
|
25
|
+
export * from './get_variant_id.js';
|
|
26
|
+
export * from './update_draft.js';
|
|
27
|
+
export * from './update_urls.js';
|
|
23
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAA;AACpD,cAAc,sCAAsC,CAAA;AACpD,cAAc,eAAe,CAAA;AAC7B,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,2BAA2B,CAAA;AACzC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uCAAuC,CAAA;AACrD,cAAc,uCAAuC,CAAA;AACrD,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,0CAA0C,CAAA;AACxD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA","sourcesContent":["export * from './all_app_extension_registrations.js'\nexport * from './all_app_extension_registrations.js'\nexport * from './all_orgs.js'\nexport * from './all_stores_by_org.js'\nexport * from './convert_dev_to_test_store.js'\nexport * from './create_app.js'\nexport * from './create_deployment.js'\nexport * from './extension_create.js'\nexport * from './extension_specifications.js'\nexport * from './find_app.js'\nexport * from './find_org_basic.js'\nexport * from './find_org.js'\nexport * from './find_store_by_domain.js'\nexport * from './functions/app_function_set.js'\nexport * from './functions/compile_module.js'\nexport * from './functions/function_service_proxy.js'\nexport * from './functions/function_service_proxy.js'\nexport * from './functions/get_app_functions.js'\nexport * from './functions/get_app_functions.js'\nexport * from './functions/module_compilation_status.js'\nexport * from './functions/upload_url_generate.js'\nexport * from './generate_signed_upload_url.js'\nexport * from './get_urls.js'\nexport * from './get_variant_id.js'\nexport * from './get_variant_id.js'\nexport * from './update_draft.js'\nexport * from './update_urls.js'\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const UpdateURLsQuery: string;
|
|
2
2
|
export interface UpdateURLsQueryVariables {
|
|
3
3
|
apiKey: string;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
applicationUrl: string;
|
|
5
|
+
redirectUrlWhitelist: string[];
|
|
6
6
|
}
|
|
7
7
|
export interface UpdateURLsQuerySchema {
|
|
8
8
|
appUpdate: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { gql } from 'graphql-request';
|
|
2
2
|
export const UpdateURLsQuery = gql `
|
|
3
|
-
mutation appUpdate($apiKey: String!, $
|
|
4
|
-
appUpdate(input: {apiKey: $apiKey, applicationUrl: $
|
|
3
|
+
mutation appUpdate($apiKey: String!, $applicationUrl: Url!, $redirectUrlWhitelist: [Url]!) {
|
|
4
|
+
appUpdate(input: {apiKey: $apiKey, applicationUrl: $applicationUrl, redirectUrlWhitelist: $redirectUrlWhitelist}) {
|
|
5
5
|
userErrors {
|
|
6
6
|
message
|
|
7
7
|
field
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update_urls.js","sourceRoot":"","sources":["../../../src/api/graphql/update_urls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;CASjC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const UpdateURLsQuery = gql`\n mutation appUpdate($apiKey: String!, $
|
|
1
|
+
{"version":3,"file":"update_urls.js","sourceRoot":"","sources":["../../../src/api/graphql/update_urls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAA;AAEnC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;CASjC,CAAA","sourcesContent":["import {gql} from 'graphql-request'\n\nexport const UpdateURLsQuery = gql`\n mutation appUpdate($apiKey: String!, $applicationUrl: Url!, $redirectUrlWhitelist: [Url]!) {\n appUpdate(input: {apiKey: $apiKey, applicationUrl: $applicationUrl, redirectUrlWhitelist: $redirectUrlWhitelist}) {\n userErrors {\n message\n field\n }\n }\n }\n`\n\nexport interface UpdateURLsQueryVariables {\n apiKey: string\n applicationUrl: string\n redirectUrlWhitelist: string[]\n}\n\nexport interface UpdateURLsQuerySchema {\n appUpdate: {\n userErrors: {\n field: string[]\n message: string\n }[]\n }\n}\n"]}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const constants: {
|
|
2
2
|
environmentVariables: {
|
|
3
3
|
unitTest: string;
|
|
4
|
-
|
|
4
|
+
env: string;
|
|
5
5
|
runAsUser: string;
|
|
6
6
|
partnersEnv: string;
|
|
7
7
|
shopifyEnv: string;
|
|
@@ -14,7 +14,9 @@ declare const constants: {
|
|
|
14
14
|
partnersToken: string;
|
|
15
15
|
verbose: string;
|
|
16
16
|
noAnalytics: string;
|
|
17
|
+
alwaysLogAnalytics: string;
|
|
17
18
|
firstPartyDev: string;
|
|
19
|
+
debugGoBinary: string;
|
|
18
20
|
};
|
|
19
21
|
paths: {
|
|
20
22
|
executables: {
|
package/dist/constants.js
CHANGED
|
@@ -10,7 +10,7 @@ const cacheFolder = () => {
|
|
|
10
10
|
const constants = {
|
|
11
11
|
environmentVariables: {
|
|
12
12
|
unitTest: 'SHOPIFY_UNIT_TEST',
|
|
13
|
-
|
|
13
|
+
env: 'SHOPIFY_ENV',
|
|
14
14
|
runAsUser: 'SHOPIFY_RUN_AS_USER',
|
|
15
15
|
partnersEnv: 'SHOPIFY_PARTNERS_ENV',
|
|
16
16
|
shopifyEnv: 'SHOPIFY_SHOPIFY_ENV',
|
|
@@ -23,7 +23,9 @@ const constants = {
|
|
|
23
23
|
partnersToken: 'SHOPIFY_CLI_PARTNERS_TOKEN',
|
|
24
24
|
verbose: 'SHOPIFY_FLAG_VERBOSE',
|
|
25
25
|
noAnalytics: 'SHOPIFY_CLI_NO_ANALYTICS',
|
|
26
|
+
alwaysLogAnalytics: 'SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS',
|
|
26
27
|
firstPartyDev: 'SHOPIFY_CLI_1P_DEV',
|
|
28
|
+
debugGoBinary: 'SHOPIFY_DEBUG_GO_BINARY',
|
|
27
29
|
},
|
|
28
30
|
paths: {
|
|
29
31
|
executables: {
|