shopify 3.93.1 → 3.94.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.
Files changed (94) 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/chunk-52KHWFYF.js +1 -0
  4. package/dist/chunk-7F3HZJH4.js +3 -0
  5. package/dist/{chunk-TCRHJ3ZH.js → chunk-7JFIBCHH.js} +66 -66
  6. package/dist/{chunk-PB3UDYWH.js → chunk-AQOYGO3U.js} +16 -16
  7. package/dist/{chunk-T57REQVZ.js → chunk-DBDY2YEY.js} +1 -1
  8. package/dist/chunk-DEW5QFGH.js +415 -0
  9. package/dist/chunk-FU2Y2M3M.js +5 -0
  10. package/dist/chunk-JBSYWYIP.js +2 -0
  11. package/dist/chunk-QYR5VPQA.js +4 -0
  12. package/dist/{chunk-SVYSLNQH.js → chunk-R6N4NGU6.js} +178 -182
  13. package/dist/{chunk-P3ASN7B5.js → chunk-SVA22NZQ.js} +209 -211
  14. package/dist/cli/commands/config/autoupgrade/constants.d.ts +5 -0
  15. package/dist/cli/commands/config/autoupgrade/constants.js +6 -0
  16. package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -0
  17. package/dist/cli/commands/config/autoupgrade/off.js +22 -0
  18. package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -0
  19. package/dist/cli/commands/config/autoupgrade/on.js +22 -0
  20. package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -0
  21. package/dist/cli/commands/config/autoupgrade/status.js +30 -0
  22. package/dist/cli/commands/docs/generate.d.ts +1 -1
  23. package/dist/cli/commands/docs/generate.js +6 -3
  24. package/dist/cli/commands/upgrade.js +3 -1
  25. package/dist/cli/services/kitchen-sink/static.js +1 -1
  26. package/dist/configs/all.yml +3 -0
  27. package/dist/configs/recommended.yml +3 -0
  28. package/dist/data/filters.json +30 -0
  29. package/dist/data/objects.json +17 -1
  30. package/dist/data/setting.json +25 -0
  31. package/dist/data/shopify_system_translations.json +29 -6
  32. package/dist/error-handler-JHFQZGYG.js +1 -0
  33. package/dist/hooks/postrun.js +1 -1
  34. package/dist/hooks/prerun.js +1 -1
  35. package/dist/{http-proxy-node16-KBILO6A6.js → http-proxy-node16-TTURN6MD.js} +1 -1
  36. package/dist/index.js +1117 -1121
  37. package/dist/lib-3WHF5XD3.js +1 -0
  38. package/dist/{local-JCUIPKND.js → local-4PW2CHVR.js} +1 -1
  39. package/dist/{morph-6DCXNO2H.js → morph-DQREIZD2.js} +1 -1
  40. package/dist/node-package-manager-NTQEYCSE.js +1 -0
  41. package/dist/path-HUAU3YBW.js +1 -0
  42. package/dist/tsconfig.tsbuildinfo +1 -1
  43. package/dist/{ui-XTVYPIVY.js → ui-7Z2HOOEO.js} +1 -1
  44. package/dist/{workerd-3GJRSBJN.js → workerd-VL54JTEU.js} +1 -1
  45. package/oclif.manifest.json +63 -3
  46. package/package.json +7 -6
  47. package/dist/assets/dev-console/extensions/dev-console/assets/index-BnXVL6nA.js +0 -78
  48. package/dist/chunk-NOSKVZWJ.js +0 -2
  49. package/dist/chunk-QJEBL3WX.js +0 -4
  50. package/dist/chunk-VLDSGLBP.js +0 -1
  51. package/dist/chunk-WOERFYNW.js +0 -415
  52. package/dist/chunk-XV44IQDO.js +0 -5
  53. package/dist/cli/commands/store/auth.d.ts +0 -15
  54. package/dist/cli/commands/store/auth.js +0 -46
  55. package/dist/cli/commands/store/execute.d.ts +0 -21
  56. package/dist/cli/commands/store/execute.js +0 -89
  57. package/dist/cli/services/store/auth/callback.d.ts +0 -8
  58. package/dist/cli/services/store/auth/callback.js +0 -140
  59. package/dist/cli/services/store/auth/config.d.ts +0 -6
  60. package/dist/cli/services/store/auth/config.js +0 -15
  61. package/dist/cli/services/store/auth/existing-scopes.d.ts +0 -5
  62. package/dist/cli/services/store/auth/existing-scopes.js +0 -40
  63. package/dist/cli/services/store/auth/index.d.ts +0 -18
  64. package/dist/cli/services/store/auth/index.js +0 -88
  65. package/dist/cli/services/store/auth/pkce.d.ts +0 -36
  66. package/dist/cli/services/store/auth/pkce.js +0 -49
  67. package/dist/cli/services/store/auth/recovery.d.ts +0 -4
  68. package/dist/cli/services/store/auth/recovery.js +0 -17
  69. package/dist/cli/services/store/auth/result.d.ts +0 -24
  70. package/dist/cli/services/store/auth/result.js +0 -39
  71. package/dist/cli/services/store/auth/scopes.d.ts +0 -4
  72. package/dist/cli/services/store/auth/scopes.js +0 -53
  73. package/dist/cli/services/store/auth/session-lifecycle.d.ts +0 -3
  74. package/dist/cli/services/store/auth/session-lifecycle.js +0 -69
  75. package/dist/cli/services/store/auth/session-store.d.ts +0 -32
  76. package/dist/cli/services/store/auth/session-store.js +0 -127
  77. package/dist/cli/services/store/auth/token-client.d.ts +0 -40
  78. package/dist/cli/services/store/auth/token-client.js +0 -95
  79. package/dist/cli/services/store/execute/admin-context.d.ts +0 -11
  80. package/dist/cli/services/store/execute/admin-context.js +0 -41
  81. package/dist/cli/services/store/execute/admin-transport.d.ts +0 -6
  82. package/dist/cli/services/store/execute/admin-transport.js +0 -42
  83. package/dist/cli/services/store/execute/index.d.ts +0 -13
  84. package/dist/cli/services/store/execute/index.js +0 -22
  85. package/dist/cli/services/store/execute/request.d.ts +0 -21
  86. package/dist/cli/services/store/execute/request.js +0 -88
  87. package/dist/cli/services/store/execute/result.d.ts +0 -3
  88. package/dist/cli/services/store/execute/result.js +0 -29
  89. package/dist/cli/services/store/execute/targets.d.ts +0 -18
  90. package/dist/cli/services/store/execute/targets.js +0 -21
  91. package/dist/error-handler-54XVSWV5.js +0 -1
  92. package/dist/lib-EN3PX6IK.js +0 -1
  93. package/dist/node-package-manager-P7JQBCHZ.js +0 -1
  94. package/dist/path-IT7KPARG.js +0 -1
@@ -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-TCRHJ3ZH.js";import"./chunk-PRKBO42R.js";import"./chunk-PB3UDYWH.js";import"./chunk-WOERFYNW.js";import"./chunk-P3ASN7B5.js";import"./chunk-XV44IQDO.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-P3ASN7B5.js";import"./chunk-XV44IQDO.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-PB3UDYWH.js";import"./chunk-WOERFYNW.js";import"./chunk-P3ASN7B5.js";import"./chunk-XV44IQDO.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};