shopify 3.93.2 → 3.94.1

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.
Files changed (111) hide show
  1. package/dist/assets/dev-console/extensions/dev-console/assets/index-Bm_GpKQW.js +51 -0
  2. package/dist/assets/dev-console/index.html +1 -1
  3. package/dist/assets/hydrogen/starter/CHANGELOG.md +0 -64
  4. package/dist/assets/hydrogen/starter/app/components/Aside.tsx +2 -4
  5. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +3 -6
  6. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +23 -117
  7. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
  8. package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +4 -24
  9. package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
  10. package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +53 -14
  11. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +4 -11
  12. package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
  13. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
  14. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
  15. package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +14 -0
  16. package/dist/assets/hydrogen/starter/package.json +5 -5
  17. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +11 -0
  18. package/dist/assets/hydrogen/starter/vite.config.ts +1 -1
  19. package/dist/assets/hydrogen/vite/vite.config.js +1 -1
  20. package/dist/{chunk-5FCKEHCK.js → chunk-3CRQIN6A.js} +154 -154
  21. package/dist/{chunk-4VZV4LQX.js → chunk-3TG7H626.js} +66 -66
  22. package/dist/chunk-52KHWFYF.js +1 -0
  23. package/dist/{chunk-IG47ZDRU.js → chunk-6OKIHCZG.js} +1 -1
  24. package/dist/chunk-7FYGRWMW.js +415 -0
  25. package/dist/{chunk-MX6WWR5F.js → chunk-D24XVLOA.js} +16 -16
  26. package/dist/chunk-EU23C3Y3.js +3 -0
  27. package/dist/chunk-FU2Y2M3M.js +5 -0
  28. package/dist/chunk-JBSYWYIP.js +2 -0
  29. package/dist/chunk-QYR5VPQA.js +4 -0
  30. package/dist/{chunk-XVFYDYZA.js → chunk-SVA22NZQ.js} +209 -211
  31. package/dist/cli/commands/config/autoupgrade/constants.d.ts +5 -0
  32. package/dist/cli/commands/config/autoupgrade/constants.js +6 -0
  33. package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -0
  34. package/dist/cli/commands/config/autoupgrade/off.js +22 -0
  35. package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -0
  36. package/dist/cli/commands/config/autoupgrade/on.js +22 -0
  37. package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -0
  38. package/dist/cli/commands/config/autoupgrade/status.js +30 -0
  39. package/dist/cli/commands/docs/generate.d.ts +1 -1
  40. package/dist/cli/commands/docs/generate.js +6 -3
  41. package/dist/cli/commands/upgrade.js +3 -1
  42. package/dist/cli/services/kitchen-sink/static.js +1 -1
  43. package/dist/configs/all.yml +3 -0
  44. package/dist/configs/recommended.yml +3 -0
  45. package/dist/data/filters.json +30 -0
  46. package/dist/data/objects.json +17 -1
  47. package/dist/data/setting.json +25 -0
  48. package/dist/data/shopify_system_translations.json +29 -6
  49. package/dist/error-handler-YQEGKTYS.js +1 -0
  50. package/dist/hooks/postrun.js +1 -1
  51. package/dist/hooks/prerun.js +1 -1
  52. package/dist/{http-proxy-node16-DSQMBVDI.js → http-proxy-node16-TTURN6MD.js} +1 -1
  53. package/dist/index.js +1117 -1121
  54. package/dist/lib-3WHF5XD3.js +1 -0
  55. package/dist/{local-WHQ3ZS4K.js → local-J5FE2ICC.js} +1 -1
  56. package/dist/{morph-Q32V442A.js → morph-DQREIZD2.js} +1 -1
  57. package/dist/node-package-manager-AKAMTDCS.js +1 -0
  58. package/dist/path-HUAU3YBW.js +1 -0
  59. package/dist/tsconfig.tsbuildinfo +1 -1
  60. package/dist/{ui-GZ7DOSHP.js → ui-65JEOETJ.js} +1 -1
  61. package/dist/{workerd-LJU6AVMQ.js → workerd-2QD5AUPI.js} +1 -1
  62. package/oclif.manifest.json +65 -4
  63. package/package.json +8 -7
  64. package/dist/assets/dev-console/extensions/dev-console/assets/index-BnXVL6nA.js +0 -78
  65. package/dist/chunk-4QL77VYJ.js +0 -415
  66. package/dist/chunk-DDTYWTF2.js +0 -1
  67. package/dist/chunk-FYQIRCLV.js +0 -5
  68. package/dist/chunk-NOSKVZWJ.js +0 -2
  69. package/dist/chunk-QJEBL3WX.js +0 -4
  70. package/dist/cli/commands/store/auth.d.ts +0 -15
  71. package/dist/cli/commands/store/auth.js +0 -46
  72. package/dist/cli/commands/store/execute.d.ts +0 -21
  73. package/dist/cli/commands/store/execute.js +0 -89
  74. package/dist/cli/services/store/auth/callback.d.ts +0 -8
  75. package/dist/cli/services/store/auth/callback.js +0 -140
  76. package/dist/cli/services/store/auth/config.d.ts +0 -6
  77. package/dist/cli/services/store/auth/config.js +0 -15
  78. package/dist/cli/services/store/auth/existing-scopes.d.ts +0 -5
  79. package/dist/cli/services/store/auth/existing-scopes.js +0 -40
  80. package/dist/cli/services/store/auth/index.d.ts +0 -18
  81. package/dist/cli/services/store/auth/index.js +0 -88
  82. package/dist/cli/services/store/auth/pkce.d.ts +0 -36
  83. package/dist/cli/services/store/auth/pkce.js +0 -49
  84. package/dist/cli/services/store/auth/recovery.d.ts +0 -4
  85. package/dist/cli/services/store/auth/recovery.js +0 -17
  86. package/dist/cli/services/store/auth/result.d.ts +0 -24
  87. package/dist/cli/services/store/auth/result.js +0 -39
  88. package/dist/cli/services/store/auth/scopes.d.ts +0 -4
  89. package/dist/cli/services/store/auth/scopes.js +0 -53
  90. package/dist/cli/services/store/auth/session-lifecycle.d.ts +0 -3
  91. package/dist/cli/services/store/auth/session-lifecycle.js +0 -69
  92. package/dist/cli/services/store/auth/session-store.d.ts +0 -32
  93. package/dist/cli/services/store/auth/session-store.js +0 -127
  94. package/dist/cli/services/store/auth/token-client.d.ts +0 -40
  95. package/dist/cli/services/store/auth/token-client.js +0 -95
  96. package/dist/cli/services/store/execute/admin-context.d.ts +0 -11
  97. package/dist/cli/services/store/execute/admin-context.js +0 -41
  98. package/dist/cli/services/store/execute/admin-transport.d.ts +0 -6
  99. package/dist/cli/services/store/execute/admin-transport.js +0 -42
  100. package/dist/cli/services/store/execute/index.d.ts +0 -13
  101. package/dist/cli/services/store/execute/index.js +0 -22
  102. package/dist/cli/services/store/execute/request.d.ts +0 -21
  103. package/dist/cli/services/store/execute/request.js +0 -88
  104. package/dist/cli/services/store/execute/result.d.ts +0 -3
  105. package/dist/cli/services/store/execute/result.js +0 -29
  106. package/dist/cli/services/store/execute/targets.d.ts +0 -18
  107. package/dist/cli/services/store/execute/targets.js +0 -21
  108. package/dist/error-handler-GZ2I7BG5.js +0 -1
  109. package/dist/lib-GGVLMXY5.js +0 -1
  110. package/dist/node-package-manager-6XMPTNUI.js +0 -1
  111. package/dist/path-IT7KPARG.js +0 -1
@@ -1,95 +0,0 @@
1
- import { adminUrl } from '@shopify/cli-kit/node/api/admin';
2
- import { graphqlRequest } from '@shopify/cli-kit/node/api/graphql';
3
- import { AbortError } from '@shopify/cli-kit/node/error';
4
- import { fetch } from '@shopify/cli-kit/node/http';
5
- import { outputContent, outputDebug, outputToken } from '@shopify/cli-kit/node/output';
6
- import { maskToken, STORE_AUTH_APP_CLIENT_ID } from './config.js';
7
- function truncateHttpErrorBody(body, length = 300) {
8
- return body.slice(0, length);
9
- }
10
- export async function exchangeStoreAuthCodeForToken(options) {
11
- const endpoint = `https://${options.store}/admin/oauth/access_token`;
12
- outputDebug(outputContent `Exchanging authorization code for token at ${outputToken.raw(endpoint)}`);
13
- const response = await fetch(endpoint, {
14
- method: 'POST',
15
- headers: { 'Content-Type': 'application/json' },
16
- body: JSON.stringify({
17
- client_id: STORE_AUTH_APP_CLIENT_ID,
18
- code: options.code,
19
- code_verifier: options.codeVerifier,
20
- redirect_uri: options.redirectUri,
21
- }),
22
- });
23
- const body = await response.text();
24
- if (!response.ok) {
25
- outputDebug(outputContent `Token exchange failed with HTTP ${outputToken.raw(String(response.status))}: ${outputToken.raw(truncateHttpErrorBody(body || response.statusText))}`);
26
- throw new AbortError(`Failed to exchange OAuth code for an access token (HTTP ${response.status}).`, body || response.statusText);
27
- }
28
- let parsed;
29
- try {
30
- parsed = JSON.parse(body);
31
- }
32
- catch {
33
- throw new AbortError('Received an invalid token response from Shopify.');
34
- }
35
- outputDebug(outputContent `Token exchange succeeded: access_token=${outputToken.raw(maskToken(parsed.access_token))}, refresh_token=${outputToken.raw(parsed.refresh_token ? maskToken(parsed.refresh_token) : 'none')}, expires_in=${outputToken.raw(String(parsed.expires_in ?? 'unknown'))}s, user=${outputToken.raw(String(parsed.associated_user?.id ?? 'unknown'))} (${outputToken.raw(parsed.associated_user?.email ?? 'no email')})`);
36
- return parsed;
37
- }
38
- export async function refreshStoreAccessToken(options) {
39
- const endpoint = `https://${options.store}/admin/oauth/access_token`;
40
- outputDebug(outputContent `Refreshing access token for ${outputToken.raw(options.store)} using refresh_token=${outputToken.raw(maskToken(options.refreshToken))}`);
41
- const response = await fetch(endpoint, {
42
- method: 'POST',
43
- headers: { 'Content-Type': 'application/json' },
44
- body: JSON.stringify({
45
- client_id: STORE_AUTH_APP_CLIENT_ID,
46
- grant_type: 'refresh_token',
47
- refresh_token: options.refreshToken,
48
- }),
49
- });
50
- const body = await response.text();
51
- if (!response.ok) {
52
- outputDebug(outputContent `Token refresh failed with HTTP ${outputToken.raw(String(response.status))}: ${outputToken.raw(truncateHttpErrorBody(body || response.statusText))}`);
53
- throw new AbortError(`Token refresh failed for ${options.store} (HTTP ${response.status}).`);
54
- }
55
- let parsed;
56
- try {
57
- parsed = JSON.parse(body);
58
- }
59
- catch {
60
- throw new AbortError('Received an invalid refresh response from Shopify.');
61
- }
62
- if (!parsed.access_token) {
63
- throw new AbortError(`Token refresh returned an invalid response for ${options.store}.`);
64
- }
65
- return {
66
- accessToken: parsed.access_token,
67
- refreshToken: parsed.refresh_token,
68
- expiresIn: parsed.expires_in,
69
- refreshTokenExpiresIn: parsed.refresh_token_expires_in,
70
- };
71
- }
72
- const CurrentAppInstallationAccessScopesQuery = `#graphql
73
- query CurrentAppInstallationAccessScopes {
74
- currentAppInstallation {
75
- accessScopes {
76
- handle
77
- }
78
- }
79
- }
80
- `;
81
- export async function fetchCurrentStoreAuthScopes(options) {
82
- outputDebug(outputContent `Fetching current app installation scopes for ${outputToken.raw(options.store)} using token ${outputToken.raw(maskToken(options.accessToken))}`);
83
- const data = await graphqlRequest({
84
- query: CurrentAppInstallationAccessScopesQuery,
85
- api: 'Admin',
86
- url: adminUrl(options.store, 'unstable'),
87
- token: options.accessToken,
88
- responseOptions: { handleErrors: false },
89
- });
90
- if (!Array.isArray(data.currentAppInstallation?.accessScopes)) {
91
- throw new Error('Shopify did not return currentAppInstallation.accessScopes.');
92
- }
93
- return data.currentAppInstallation.accessScopes.flatMap((scope) => typeof scope.handle === 'string' ? [scope.handle] : []);
94
- }
95
- //# sourceMappingURL=token-client.js.map
@@ -1,11 +0,0 @@
1
- import type { AdminSession } from '@shopify/cli-kit/node/session';
2
- import type { StoredStoreAppSession } from '../auth/session-store.js';
3
- export interface AdminStoreGraphQLContext {
4
- adminSession: AdminSession;
5
- version: string;
6
- session: StoredStoreAppSession;
7
- }
8
- export declare function prepareAdminStoreGraphQLContext(input: {
9
- store: string;
10
- userSpecifiedVersion?: string;
11
- }): Promise<AdminStoreGraphQLContext>;
@@ -1,41 +0,0 @@
1
- import { fetchApiVersions } from '@shopify/cli-kit/node/api/admin';
2
- import { AbortError } from '@shopify/cli-kit/node/error';
3
- import { reauthenticateStoreAuthError } from '../auth/recovery.js';
4
- import { clearStoredStoreAppSession } from '../auth/session-store.js';
5
- import { loadStoredStoreSession } from '../auth/session-lifecycle.js';
6
- async function resolveApiVersion(options) {
7
- const { session, adminSession, userSpecifiedVersion } = options;
8
- if (userSpecifiedVersion === 'unstable')
9
- return userSpecifiedVersion;
10
- let availableVersions;
11
- try {
12
- availableVersions = await fetchApiVersions(adminSession);
13
- }
14
- catch (error) {
15
- if (error instanceof AbortError &&
16
- error.message.includes(`Error connecting to your store ${adminSession.storeFqdn}:`) &&
17
- /\b(?:401|404)\b/.test(error.message)) {
18
- clearStoredStoreAppSession(session.store, session.userId);
19
- throw reauthenticateStoreAuthError(`Stored app authentication for ${session.store} is no longer valid.`, session.store, session.scopes.join(','));
20
- }
21
- throw error;
22
- }
23
- if (!userSpecifiedVersion) {
24
- const supportedVersions = availableVersions.filter((version) => version.supported).map((version) => version.handle);
25
- return supportedVersions.sort().reverse()[0];
26
- }
27
- const versionList = availableVersions.map((version) => version.handle);
28
- if (versionList.includes(userSpecifiedVersion))
29
- return userSpecifiedVersion;
30
- throw new AbortError(`Invalid API version: ${userSpecifiedVersion}`, `Allowed versions: ${versionList.join(', ')}`);
31
- }
32
- export async function prepareAdminStoreGraphQLContext(input) {
33
- const session = await loadStoredStoreSession(input.store);
34
- const adminSession = {
35
- token: session.accessToken,
36
- storeFqdn: session.store,
37
- };
38
- const version = await resolveApiVersion({ session, adminSession, userSpecifiedVersion: input.userSpecifiedVersion });
39
- return { adminSession, version, session };
40
- }
41
- //# sourceMappingURL=admin-context.js.map
@@ -1,6 +0,0 @@
1
- import type { PreparedStoreExecuteRequest } from './request.js';
2
- import type { AdminStoreGraphQLContext } from './admin-context.js';
3
- export declare function runAdminStoreGraphQLOperation(input: {
4
- context: AdminStoreGraphQLContext;
5
- request: PreparedStoreExecuteRequest;
6
- }): Promise<unknown>;
@@ -1,42 +0,0 @@
1
- import { adminUrl } from '@shopify/cli-kit/node/api/admin';
2
- import { graphqlRequest } from '@shopify/cli-kit/node/api/graphql';
3
- import { AbortError } from '@shopify/cli-kit/node/error';
4
- import { outputContent } from '@shopify/cli-kit/node/output';
5
- import { renderSingleTask } from '@shopify/cli-kit/node/ui';
6
- import { reauthenticateStoreAuthError } from '../auth/recovery.js';
7
- import { clearStoredStoreAppSession } from '../auth/session-store.js';
8
- function isGraphQLClientError(error) {
9
- if (!error || typeof error !== 'object' || !('response' in error))
10
- return false;
11
- const response = error.response;
12
- return !!response && typeof response === 'object';
13
- }
14
- export async function runAdminStoreGraphQLOperation(input) {
15
- try {
16
- return await renderSingleTask({
17
- title: outputContent `Executing GraphQL operation`,
18
- task: async () => {
19
- return graphqlRequest({
20
- query: input.request.query,
21
- api: 'Admin',
22
- url: adminUrl(input.context.adminSession.storeFqdn, input.context.version, input.context.adminSession),
23
- token: input.context.adminSession.token,
24
- variables: input.request.parsedVariables,
25
- responseOptions: { handleErrors: false },
26
- });
27
- },
28
- renderOptions: { stdout: process.stderr },
29
- });
30
- }
31
- catch (error) {
32
- if (isGraphQLClientError(error) && error.response.status === 401) {
33
- clearStoredStoreAppSession(input.context.session.store, input.context.session.userId);
34
- throw reauthenticateStoreAuthError(`Stored app authentication for ${input.context.session.store} is no longer valid.`, input.context.session.store, input.context.session.scopes.join(','));
35
- }
36
- if (isGraphQLClientError(error) && error.response.errors) {
37
- throw new AbortError('GraphQL operation failed.', JSON.stringify({ errors: error.response.errors }, null, 2));
38
- }
39
- throw error;
40
- }
41
- }
42
- //# sourceMappingURL=admin-transport.js.map
@@ -1,13 +0,0 @@
1
- import { type StoreGraphQLApi } from './targets.js';
2
- interface ExecuteStoreOperationInput {
3
- store: string;
4
- api?: StoreGraphQLApi;
5
- query?: string;
6
- queryFile?: string;
7
- variables?: string;
8
- variableFile?: string;
9
- version?: string;
10
- allowMutations?: boolean;
11
- }
12
- export declare function executeStoreOperation(input: ExecuteStoreOperationInput): Promise<unknown>;
13
- export {};
@@ -1,22 +0,0 @@
1
- import { renderSingleTask } from '@shopify/cli-kit/node/ui';
2
- import { outputContent } from '@shopify/cli-kit/node/output';
3
- import { prepareStoreExecuteRequest } from './request.js';
4
- import { getStoreGraphQLTarget } from './targets.js';
5
- export async function executeStoreOperation(input) {
6
- const target = getStoreGraphQLTarget(input.api ?? 'admin');
7
- const request = await prepareStoreExecuteRequest({
8
- query: input.query,
9
- queryFile: input.queryFile,
10
- variables: input.variables,
11
- variableFile: input.variableFile,
12
- version: input.version,
13
- allowMutations: input.allowMutations,
14
- });
15
- const context = await renderSingleTask({
16
- title: outputContent `Loading stored store auth`,
17
- task: async () => target.prepareContext({ store: input.store, requestedVersion: request.requestedVersion }),
18
- renderOptions: { stdout: process.stderr },
19
- });
20
- return await target.execute({ context, request });
21
- }
22
- //# sourceMappingURL=index.js.map
@@ -1,21 +0,0 @@
1
- import { OperationDefinitionNode } from 'graphql';
2
- interface ParsedGraphQLOperation {
3
- operationDefinition: OperationDefinitionNode;
4
- }
5
- export interface PreparedStoreExecuteRequest {
6
- query: string;
7
- parsedOperation: ParsedGraphQLOperation;
8
- parsedVariables?: {
9
- [key: string]: unknown;
10
- };
11
- requestedVersion?: string;
12
- }
13
- export declare function prepareStoreExecuteRequest(input: {
14
- query?: string;
15
- queryFile?: string;
16
- variables?: string;
17
- variableFile?: string;
18
- version?: string;
19
- allowMutations?: boolean;
20
- }): Promise<PreparedStoreExecuteRequest>;
21
- export {};
@@ -1,88 +0,0 @@
1
- import { AbortError, BugError } from '@shopify/cli-kit/node/error';
2
- import { fileExists, readFile } from '@shopify/cli-kit/node/fs';
3
- import { outputContent, outputToken } from '@shopify/cli-kit/node/output';
4
- import { parse } from 'graphql';
5
- async function readQuery(input) {
6
- if (input.query !== undefined) {
7
- if (!input.query.trim()) {
8
- throw new AbortError('The --query flag value is empty. Please provide a valid GraphQL query or mutation.');
9
- }
10
- return input.query;
11
- }
12
- if (input.queryFile) {
13
- if (!(await fileExists(input.queryFile))) {
14
- throw new AbortError(outputContent `Query file not found at ${outputToken.path(input.queryFile)}. Please check the path and try again.`);
15
- }
16
- const query = await readFile(input.queryFile, { encoding: 'utf8' });
17
- if (!query.trim()) {
18
- throw new AbortError(outputContent `Query file at ${outputToken.path(input.queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);
19
- }
20
- return query;
21
- }
22
- throw new BugError('Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.');
23
- }
24
- async function parseVariables(variables, variableFile) {
25
- if (variables) {
26
- try {
27
- return JSON.parse(variables);
28
- }
29
- catch (error) {
30
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
31
- throw new AbortError(outputContent `Invalid JSON in ${outputToken.yellow('--variables')} flag: ${errorMessage}`, 'Please provide valid JSON format.');
32
- }
33
- }
34
- else if (variableFile) {
35
- if (!(await fileExists(variableFile))) {
36
- throw new AbortError(outputContent `Variable file not found at ${outputToken.path(variableFile)}. Please check the path and try again.`);
37
- }
38
- const fileContent = await readFile(variableFile, { encoding: 'utf8' });
39
- try {
40
- return JSON.parse(fileContent);
41
- }
42
- catch (error) {
43
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
44
- throw new AbortError(outputContent `Invalid JSON in variable file ${outputToken.path(variableFile)}: ${errorMessage}`, 'Please provide valid JSON format.');
45
- }
46
- }
47
- return undefined;
48
- }
49
- function parseGraphQLOperation(graphqlOperation) {
50
- let document;
51
- try {
52
- document = parse(graphqlOperation);
53
- }
54
- catch (error) {
55
- if (error instanceof Error) {
56
- throw new AbortError(`Invalid GraphQL syntax: ${error.message}`);
57
- }
58
- throw error;
59
- }
60
- const operationDefinitions = document.definitions.filter((definition) => definition.kind === 'OperationDefinition');
61
- if (operationDefinitions.length !== 1) {
62
- throw new AbortError('GraphQL document must contain exactly one operation definition. Multiple operations are not supported.');
63
- }
64
- return {
65
- operationDefinition: operationDefinitions[0],
66
- };
67
- }
68
- function isMutation(operation) {
69
- return operation.operationDefinition.operation === 'mutation';
70
- }
71
- function validateMutationsAllowed(operation, allowMutations = false) {
72
- if (isMutation(operation) && !allowMutations) {
73
- throw new AbortError('Mutations are disabled by default for shopify store execute.', 'Re-run with --allow-mutations if you intend to modify store data.');
74
- }
75
- }
76
- export async function prepareStoreExecuteRequest(input) {
77
- const query = await readQuery({ query: input.query, queryFile: input.queryFile });
78
- const parsedOperation = parseGraphQLOperation(query);
79
- validateMutationsAllowed(parsedOperation, input.allowMutations);
80
- const parsedVariables = await parseVariables(input.variables, input.variableFile);
81
- return {
82
- query,
83
- parsedOperation,
84
- parsedVariables,
85
- requestedVersion: input.version,
86
- };
87
- }
88
- //# sourceMappingURL=request.js.map
@@ -1,3 +0,0 @@
1
- type StoreExecuteOutputFormat = 'text' | 'json';
2
- export declare function writeOrOutputStoreExecuteResult(result: unknown, outputFile?: string, format?: StoreExecuteOutputFormat): Promise<void>;
3
- export {};
@@ -1,29 +0,0 @@
1
- import { writeFile } from '@shopify/cli-kit/node/fs';
2
- import { outputResult } from '@shopify/cli-kit/node/output';
3
- import { renderSuccess } from '@shopify/cli-kit/node/ui';
4
- function serializeStoreExecuteResult(result) {
5
- return JSON.stringify(result, null, 2);
6
- }
7
- function renderStoreExecuteSuccess(outputFile) {
8
- if (outputFile) {
9
- renderSuccess({
10
- headline: 'Operation succeeded.',
11
- body: `Results written to ${outputFile}`,
12
- });
13
- return;
14
- }
15
- renderSuccess({ headline: 'Operation succeeded.' });
16
- }
17
- export async function writeOrOutputStoreExecuteResult(result, outputFile, format = 'text') {
18
- const serializedResult = serializeStoreExecuteResult(result);
19
- if (outputFile) {
20
- await writeFile(outputFile, serializedResult);
21
- if (format === 'text')
22
- renderStoreExecuteSuccess(outputFile);
23
- return;
24
- }
25
- if (format === 'text')
26
- renderStoreExecuteSuccess();
27
- outputResult(serializedResult);
28
- }
29
- //# sourceMappingURL=result.js.map
@@ -1,18 +0,0 @@
1
- import type { PreparedStoreExecuteRequest } from './request.js';
2
- import { type AdminStoreGraphQLContext } from './admin-context.js';
3
- export type StoreGraphQLApi = 'admin';
4
- interface PrepareStoreGraphQLTargetContextInput {
5
- store: string;
6
- requestedVersion?: string;
7
- }
8
- interface ExecuteStoreGraphQLTargetInput<TContext> {
9
- context: TContext;
10
- request: PreparedStoreExecuteRequest;
11
- }
12
- interface StoreGraphQLTarget<TContext> {
13
- id: StoreGraphQLApi;
14
- prepareContext(input: PrepareStoreGraphQLTargetContextInput): Promise<TContext>;
15
- execute(input: ExecuteStoreGraphQLTargetInput<TContext>): Promise<unknown>;
16
- }
17
- export declare function getStoreGraphQLTarget(api: StoreGraphQLApi): StoreGraphQLTarget<AdminStoreGraphQLContext>;
18
- export {};
@@ -1,21 +0,0 @@
1
- import { BugError } from '@shopify/cli-kit/node/error';
2
- import { prepareAdminStoreGraphQLContext } from './admin-context.js';
3
- import { runAdminStoreGraphQLOperation } from './admin-transport.js';
4
- const adminStoreGraphQLTarget = {
5
- id: 'admin',
6
- prepareContext: async ({ store, requestedVersion }) => {
7
- return prepareAdminStoreGraphQLContext({ store, userSpecifiedVersion: requestedVersion });
8
- },
9
- execute: async ({ context, request }) => {
10
- return runAdminStoreGraphQLOperation({ context, request });
11
- },
12
- };
13
- export function getStoreGraphQLTarget(api) {
14
- switch (api) {
15
- case 'admin':
16
- return adminStoreGraphQLTarget;
17
- default:
18
- throw new BugError(`Unsupported store GraphQL API target: ${api}`);
19
- }
20
- }
21
- //# sourceMappingURL=targets.js.map
@@ -1 +0,0 @@
1
- import{Na as a,Oa as b,Pa as c,Qa as d,Ra as e}from"./chunk-4VZV4LQX.js";import"./chunk-PRKBO42R.js";import"./chunk-MX6WWR5F.js";import"./chunk-4QL77VYJ.js";import"./chunk-XVFYDYZA.js";import"./chunk-FYQIRCLV.js";import"./chunk-QJEBL3WX.js";import"./chunk-EENHXSWU.js";import"./chunk-NOSKVZWJ.js";import"./chunk-T4M5CWAO.js";import"./chunk-PRVQAHWI.js";import"./chunk-QUTQDXSL.js";import"./chunk-VPRTJUIN.js";export{e as addBugsnagMetadata,c as cleanStackFrameFilePath,a as errorHandler,d as registerCleanBugsnagErrorsFromWithinPlugins,b as sendErrorToBugsnag};
@@ -1 +0,0 @@
1
- import{s as a}from"./chunk-XVFYDYZA.js";import"./chunk-FYQIRCLV.js";import"./chunk-QJEBL3WX.js";import"./chunk-EENHXSWU.js";import"./chunk-VPRTJUIN.js";export default a();
@@ -1 +0,0 @@
1
- import{A as g,B as h,C as i,D as j,E as k,F as l,G as m,H as n,I as o,J as p,K as q,L as r,M as s,N as t,O as u,P as v,Q as w,R as x,S as y,T as z,U as A,V as B,W as C,X as D,u as a,v as b,w as c,x as d,y as e,z as f}from"./chunk-MX6WWR5F.js";import"./chunk-4QL77VYJ.js";import"./chunk-XVFYDYZA.js";import"./chunk-FYQIRCLV.js";import"./chunk-QJEBL3WX.js";import"./chunk-EENHXSWU.js";import"./chunk-NOSKVZWJ.js";import"./chunk-T4M5CWAO.js";import"./chunk-PRVQAHWI.js";import"./chunk-QUTQDXSL.js";import"./chunk-VPRTJUIN.js";export{k as FindUpAndReadPackageJsonNotFoundError,j as PackageJsonNotFoundError,i as UnknownPackageManagerError,y as addNPMDependencies,x as addNPMDependenciesIfNeeded,z as addNPMDependenciesWithoutVersionIfNeeded,B as addResolutionOrOverride,d as bunLockfile,u as checkForCachedNewVersion,t as checkForNewVersion,A as findUpAndReadPackageJson,r as getDependencies,m as getPackageManager,p as getPackageName,q as getPackageVersion,D as inferPackageManager,n as installNPMDependenciesRecursively,o as installNodeModules,f as lockfiles,g as lockfilesByManager,b as npmLockfile,h as packageManager,l as packageManagerFromUserAgent,c as pnpmLockfile,e as pnpmWorkspaceFile,w as readAndParsePackageJson,s as usesWorkspaces,v as versionSatisfies,C as writePackageJSON,a as yarnLockfile};
@@ -1 +0,0 @@
1
- import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p}from"./chunk-NOSKVZWJ.js";import"./chunk-VPRTJUIN.js";export{g as basename,m as cwd,f as dirname,h as extname,e as isAbsolutePath,k as isSubpath,a as joinPath,l as moduleDirectory,b as normalizePath,i as parsePath,d as relativePath,j as relativizePath,c as resolvePath,p as sanitizeRelativePath,o as sniffForJson,n as sniffForPath};