@shopify/cli 3.70.0 → 3.71.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 (128) hide show
  1. package/dist/{lib-CPSRXLFM.js → chunk-2HGYYNE5.js} +5 -2
  2. package/dist/{chunk-5OP2SA7G.js → chunk-3AOK7V27.js} +214 -56
  3. package/dist/{chunk-PNN7RS7Y.js → chunk-3NSN5Z4N.js} +100 -11
  4. package/dist/{chunk-I3IIDOBX.js → chunk-455HYBGX.js} +3 -3
  5. package/dist/{chunk-BMNDAI5O.js → chunk-4G7SL7SU.js} +4 -4
  6. package/dist/{chunk-NH4U4X67.js → chunk-5F2WGMCL.js} +4 -4
  7. package/dist/{chunk-PJKCWDDX.js → chunk-5JZ5AGAQ.js} +548 -550
  8. package/dist/chunk-5OHM64KO.js +104 -0
  9. package/dist/{chunk-MRDDDATQ.js → chunk-675SL4FV.js} +3 -3
  10. package/dist/{chunk-WN3FKMKB.js → chunk-AXNBVGJC.js} +14 -19
  11. package/dist/{chunk-335KXO4I.js → chunk-BEVHUPQZ.js} +7 -7
  12. package/dist/{chunk-5QQTRGJ7.js → chunk-GJ7EWRH4.js} +4 -4
  13. package/dist/{chunk-KYBCPKPL.js → chunk-GV72NRZZ.js} +3 -3
  14. package/dist/{chunk-ZGHNMRBX.js → chunk-HSTSRNLJ.js} +121 -66
  15. package/dist/{chunk-JLK5OMFF.js → chunk-IGH7XTG6.js} +2 -2
  16. package/dist/{chunk-47OJGAFT.js → chunk-IJG6JLEF.js} +3 -3
  17. package/dist/{chunk-MH5JSAVK.js → chunk-IJSEKDUR.js} +3 -3
  18. package/dist/{chunk-NYFXBTWK.js → chunk-JTWM7VKM.js} +4 -4
  19. package/dist/{chunk-PKE54TAY.js → chunk-K6UZ5NEO.js} +7 -7
  20. package/dist/{chunk-FDJVVEGH.js → chunk-KBDH6IDK.js} +5 -7
  21. package/dist/{chunk-VFQMUAHB.js → chunk-KJJGDUT2.js} +4 -4
  22. package/dist/{chunk-N4X7XQWN.js → chunk-KOHDI3KN.js} +7 -3
  23. package/dist/{chunk-MX4RJDBM.js → chunk-KYB6A4PE.js} +1 -2
  24. package/dist/{chunk-VHAXHYTL.js → chunk-LMK5VFZE.js} +3 -3
  25. package/dist/{chunk-AT4IG4GJ.js → chunk-LSQU4XJZ.js} +9 -11
  26. package/dist/{chunk-ND6AGPC6.js → chunk-MG6EVKFQ.js} +3 -3
  27. package/dist/{chunk-TCTXUAZT.js → chunk-MHLSPYVQ.js} +3 -3
  28. package/dist/{chunk-CBD6UXLA.js → chunk-OJOHMVV7.js} +5 -5
  29. package/dist/{chunk-GDYKHT64.js → chunk-PDNTPE4N.js} +2805 -33
  30. package/dist/{chunk-X6F3DHKX.js → chunk-RQJF2YRM.js} +2 -2
  31. package/dist/{chunk-LN444KRM.js → chunk-RXYE2GI3.js} +2 -2
  32. package/dist/{chunk-UOZCMFCN.js → chunk-SVWWKVUI.js} +18 -13
  33. package/dist/{chunk-XSMWYZDC.js → chunk-T2BV6JEL.js} +10 -10
  34. package/dist/{chunk-N2DEYZD6.js → chunk-UDRKRTS4.js} +3 -3
  35. package/dist/{chunk-SYRHCENA.js → chunk-VNZQKLLO.js} +2 -2
  36. package/dist/{chunk-MQXHFQM3.js → chunk-WLNYFGYY.js} +4 -4
  37. package/dist/{chunk-NEOIQ6PN.js → chunk-WNDN5FAY.js} +2 -2
  38. package/dist/{chunk-DVTWERMH.js → chunk-WZW6P6AO.js} +5 -5
  39. package/dist/{chunk-MMQOVZDR.js → chunk-XOSZOZ3F.js} +5 -5
  40. package/dist/{chunk-WI6MEN7U.js → chunk-YNXUXQFM.js} +2 -2
  41. package/dist/{chunk-43YGIE7Y.js → chunk-YZA6BRN3.js} +2 -2
  42. package/dist/cli/commands/auth/logout.js +18 -20
  43. package/dist/cli/commands/auth/logout.test.js +24 -26
  44. package/dist/cli/commands/cache/clear.js +17 -19
  45. package/dist/cli/commands/debug/command-flags.js +17 -19
  46. package/dist/cli/commands/docs/generate.js +17 -19
  47. package/dist/cli/commands/docs/generate.test.js +18 -20
  48. package/dist/cli/commands/help.js +17 -19
  49. package/dist/cli/commands/kitchen-sink/async.js +18 -20
  50. package/dist/cli/commands/kitchen-sink/async.test.js +19 -21
  51. package/dist/cli/commands/kitchen-sink/index.js +20 -22
  52. package/dist/cli/commands/kitchen-sink/index.test.js +23 -25
  53. package/dist/cli/commands/kitchen-sink/prompts.js +18 -20
  54. package/dist/cli/commands/kitchen-sink/prompts.test.js +19 -21
  55. package/dist/cli/commands/kitchen-sink/static.js +18 -20
  56. package/dist/cli/commands/kitchen-sink/static.test.js +19 -21
  57. package/dist/cli/commands/notifications/generate.js +18 -20
  58. package/dist/cli/commands/notifications/list.js +18 -20
  59. package/dist/cli/commands/search.js +18 -20
  60. package/dist/cli/commands/upgrade.js +18 -20
  61. package/dist/cli/commands/upgrade.test.js +1 -2
  62. package/dist/cli/commands/version.js +18 -20
  63. package/dist/cli/commands/version.test.js +19 -21
  64. package/dist/cli/services/commands/notifications.js +12 -14
  65. package/dist/cli/services/commands/search.js +8 -9
  66. package/dist/cli/services/commands/search.test.js +9 -10
  67. package/dist/cli/services/commands/version.js +9 -10
  68. package/dist/cli/services/commands/version.test.js +11 -12
  69. package/dist/cli/services/kitchen-sink/async.js +8 -9
  70. package/dist/cli/services/kitchen-sink/prompts.js +8 -9
  71. package/dist/cli/services/kitchen-sink/static.js +8 -9
  72. package/dist/cli/services/upgrade.js +9 -10
  73. package/dist/cli/services/upgrade.test.js +12 -13
  74. package/dist/configs/all.yml +15 -0
  75. package/dist/configs/recommended.yml +9 -0
  76. package/dist/{custom-oclif-loader-IZLFCRGJ.js → custom-oclif-loader-U43F5H7M.js} +8 -9
  77. package/dist/data/filters.json +98 -3
  78. package/dist/data/latest.json +1 -1
  79. package/dist/data/manifest_theme.json +1 -0
  80. package/dist/data/objects.json +39 -1619
  81. package/dist/data/preset_blocks.json +78 -0
  82. package/dist/data/section.json +1 -42
  83. package/dist/data/shopify_system_translations.json +34 -7
  84. package/dist/data/tags.json +10 -0
  85. package/dist/data/theme_block.json +1 -19
  86. package/dist/{del-FEQWOMIX.js → del-K5ZJEWTD.js} +3 -3
  87. package/dist/{error-handler-DAI5HMQW.js → error-handler-GSXEX5NX.js} +15 -17
  88. package/dist/hooks/postrun.js +13 -15
  89. package/dist/hooks/prerun.js +15 -19
  90. package/dist/index.js +19503 -17452
  91. package/dist/lib-PPXZBVZX.js +6 -0
  92. package/dist/{lib-JJXX7GH6.js → lib-XYCLX35G.js} +5 -5
  93. package/dist/{local-QD6GDUUE.js → local-STC6NEOC.js} +10 -9
  94. package/dist/{morph-FN23MJ2S.js → morph-SEECJQ2W.js} +2 -2
  95. package/dist/{node-4XKDIIJ7.js → node-I54BR73K.js} +19 -21
  96. package/dist/{node-package-manager-IEZ6F5VN.js → node-package-manager-DUWCXRNZ.js} +9 -10
  97. package/dist/{out-ZDSLKX4N.js → out-MHEKZJWS.js} +2 -2
  98. package/dist/{path-T2RCZTRE.js → path-5SZGULBR.js} +2 -3
  99. package/dist/tsconfig.tsbuildinfo +1 -1
  100. package/dist/{ui-BUB4OWO7.js → ui-GZXRHEXO.js} +8 -9
  101. package/dist/{workerd-DIIGDIHZ.js → workerd-WQ2CUXFS.js} +19 -21
  102. package/oclif.manifest.json +334 -131
  103. package/package.json +7 -8
  104. package/assets/demo-catalog.json +0 -655
  105. package/dist/assets/demo-catalog.json +0 -655
  106. package/dist/chunk-2PUMVRDO.js +0 -131
  107. package/dist/chunk-7GNQ7YY4.js +0 -116
  108. package/dist/chunk-E2SYFYJU.js +0 -58
  109. package/dist/chunk-NLUGD7PZ.js +0 -2731
  110. package/dist/chunk-P6ABWRKD.js +0 -59
  111. package/dist/chunk-QSUS3GJF.js +0 -3838
  112. package/dist/chunk-RUK73IAH.js +0 -312
  113. package/dist/chunk-T2GATXSP.js +0 -112
  114. package/dist/chunk-VT3VJHZ7.js +0 -45
  115. package/dist/chunk-XEDHKQZA.js +0 -116
  116. package/dist/cli/commands/demo/catalog.d.ts +0 -6
  117. package/dist/cli/commands/demo/catalog.js +0 -36
  118. package/dist/cli/commands/demo/generate-file.d.ts +0 -11
  119. package/dist/cli/commands/demo/generate-file.js +0 -37
  120. package/dist/cli/commands/demo/index.d.ts +0 -10
  121. package/dist/cli/commands/demo/index.js +0 -36
  122. package/dist/cli/commands/demo/print-ai-prompt.d.ts +0 -6
  123. package/dist/cli/commands/demo/print-ai-prompt.js +0 -37
  124. package/dist/cli/services/demo.d.ts +0 -26440
  125. package/dist/cli/services/demo.js +0 -25
  126. package/dist/cli/services/demo.test.js +0 -42
  127. package/dist/constants-QFFDI47A.js +0 -26
  128. package/dist/system-KSIGUX64.js +0 -29
@@ -1,312 +0,0 @@
1
- import {
2
- z
3
- } from "./chunk-NLUGD7PZ.js";
4
- import {
5
- AbortError,
6
- BugError,
7
- outputInfo,
8
- renderAutocompletePrompt,
9
- renderConcurrent,
10
- renderConfirmationPrompt,
11
- renderFatalError,
12
- renderInfo,
13
- renderSelectPrompt,
14
- renderSuccess,
15
- renderTable,
16
- renderTasks,
17
- renderTextPrompt,
18
- renderWarning,
19
- sleep
20
- } from "./chunk-PJKCWDDX.js";
21
- import {
22
- init_cjs_shims
23
- } from "./chunk-POZ5MGPT.js";
24
-
25
- // src/cli/services/demo.ts
26
- init_cjs_shims();
27
- function oneOrMore(singular) {
28
- return z.union([singular, z.array(singular)]);
29
- }
30
- var scalar = z.union([z.string(), z.number(), z.boolean(), z.null(), z.undefined()]), linkSchema = z.object({ label: z.string(), url: z.string() }), inlineTokenSchema = z.union([
31
- z.string(),
32
- z.object({ command: z.string() }),
33
- z.object({ link: linkSchema }),
34
- z.object({ char: z.string().length(1) }),
35
- z.object({ userInput: z.string() }),
36
- z.object({ subdued: z.string() }),
37
- z.object({ filePath: z.string() }),
38
- z.object({ bold: z.string() })
39
- ]), headlineTokenSchema = oneOrMore(
40
- z.union([
41
- z.string(),
42
- z.object({ command: z.string() }),
43
- z.object({ char: z.string().length(1) }),
44
- z.object({ userInput: z.string() }),
45
- z.object({ subdued: z.string() }),
46
- z.object({ filePath: z.string() })
47
- ])
48
- ), inlineTokenItemSchema = oneOrMore(inlineTokenSchema), listSchema = z.object({
49
- list: z.object({
50
- title: z.string().optional(),
51
- items: z.array(inlineTokenItemSchema),
52
- ordered: z.boolean().optional()
53
- })
54
- }), tokenItemSchema = oneOrMore(z.union([inlineTokenSchema, listSchema])), tableSchema = z.object({
55
- rows: z.array(z.object({}).catchall(scalar)),
56
- columns: z.object({}).catchall(
57
- z.object({
58
- header: z.string().optional(),
59
- color: z.string().optional()
60
- })
61
- )
62
- }), infoTableSchema = z.union([
63
- z.object({}).catchall(z.array(inlineTokenItemSchema)),
64
- z.array(
65
- z.object({
66
- color: z.string().optional(),
67
- header: z.string(),
68
- helperText: z.string().optional(),
69
- bullet: z.string().optional(),
70
- items: z.array(inlineTokenItemSchema)
71
- })
72
- )
73
- ]), abstractDemoStepSchema = z.object({
74
- type: z.string(),
75
- properties: z.object({}),
76
- // optional properties for documentation purposes
77
- title: z.string().optional(),
78
- description: z.string().optional()
79
- }), outputStepSchema = abstractDemoStepSchema.extend({
80
- type: z.literal("output"),
81
- properties: z.object({
82
- content: z.string()
83
- })
84
- }), renderStepPropertiesSchema = z.object({
85
- headline: headlineTokenSchema.optional(),
86
- body: tokenItemSchema.optional(),
87
- nextSteps: z.array(inlineTokenItemSchema).optional(),
88
- reference: z.array(inlineTokenItemSchema).optional(),
89
- link: linkSchema.optional(),
90
- customSections: z.array(
91
- z.object({
92
- title: z.string().optional(),
93
- body: tokenItemSchema
94
- })
95
- ).optional(),
96
- orderedNextSteps: z.boolean().optional()
97
- }), renderInfoStepSchema = abstractDemoStepSchema.extend({
98
- type: z.literal("info"),
99
- properties: renderStepPropertiesSchema
100
- }), renderSuccessStepSchema = abstractDemoStepSchema.extend({
101
- type: z.literal("success"),
102
- properties: renderStepPropertiesSchema
103
- }), renderWarningStepSchema = abstractDemoStepSchema.extend({
104
- type: z.literal("warning"),
105
- properties: renderStepPropertiesSchema
106
- }), renderFatalErrorStepSchema = abstractDemoStepSchema.extend({
107
- type: z.literal("fatalError"),
108
- properties: z.object({
109
- errorType: z.union([z.literal("abort"), z.literal("bug")]),
110
- message: z.string(),
111
- tryMessage: z.string().optional(),
112
- nextSteps: z.array(inlineTokenItemSchema).optional()
113
- })
114
- }), renderTableStepSchema = abstractDemoStepSchema.extend({
115
- type: z.literal("table"),
116
- properties: tableSchema
117
- }), renderAutoCompletePromptStepSchema = abstractDemoStepSchema.extend({
118
- type: z.literal("autocompletePrompt"),
119
- properties: z.object({
120
- message: z.string(),
121
- choices: z.array(
122
- z.object({
123
- label: z.string(),
124
- value: z.string()
125
- })
126
- )
127
- })
128
- }), renderConfirmationPromptStepSchema = abstractDemoStepSchema.extend({
129
- type: z.literal("confirmationPrompt"),
130
- properties: z.object({
131
- message: headlineTokenSchema,
132
- infoTable: infoTableSchema.optional(),
133
- defaultValue: z.boolean().optional(),
134
- confirmationMessage: z.string(),
135
- cancellationMessage: z.string()
136
- })
137
- }), renderSelectPromptStepSchema = abstractDemoStepSchema.extend({
138
- type: z.literal("selectPrompt"),
139
- properties: z.object({
140
- message: headlineTokenSchema,
141
- choices: z.array(
142
- z.object({
143
- label: z.string(),
144
- value: z.string(),
145
- key: z.string().length(1).optional(),
146
- group: z.string().optional(),
147
- disabled: z.boolean().optional()
148
- })
149
- ),
150
- defaultValue: z.string().optional(),
151
- infoTable: infoTableSchema.optional()
152
- })
153
- }), renderTextPromptStepSchema = abstractDemoStepSchema.extend({
154
- type: z.literal("textPrompt"),
155
- properties: z.object({
156
- message: z.string(),
157
- defaultValue: z.string().optional(),
158
- password: z.boolean().optional(),
159
- allowEmpty: z.boolean().optional()
160
- })
161
- }), sleepStepSchema = abstractDemoStepSchema.extend({
162
- type: z.literal("sleep"),
163
- properties: z.object({
164
- duration: z.number()
165
- })
166
- }), taskbarStepSchema = abstractDemoStepSchema.extend({
167
- type: z.literal("taskbar"),
168
- properties: z.object({
169
- steps: z.array(
170
- z.object({
171
- title: z.string(),
172
- duration: z.number()
173
- })
174
- )
175
- })
176
- }), renderConcurrentPropertiesSchema = z.object({
177
- processes: z.array(
178
- z.object({
179
- prefix: z.string(),
180
- steps: z.array(
181
- z.object({
182
- startMessage: z.string().optional(),
183
- duration: z.number(),
184
- endMessage: z.string().optional()
185
- })
186
- )
187
- })
188
- )
189
- }), renderConcurrentStepSchema = abstractDemoStepSchema.extend({
190
- type: z.literal("concurrent"),
191
- properties: renderConcurrentPropertiesSchema
192
- }), demoStepSchema = z.discriminatedUnion("type", [
193
- outputStepSchema,
194
- renderInfoStepSchema,
195
- renderSuccessStepSchema,
196
- renderWarningStepSchema,
197
- renderTableStepSchema,
198
- renderFatalErrorStepSchema,
199
- renderAutoCompletePromptStepSchema,
200
- renderConfirmationPromptStepSchema,
201
- renderSelectPromptStepSchema,
202
- renderTextPromptStepSchema,
203
- sleepStepSchema,
204
- taskbarStepSchema,
205
- renderConcurrentStepSchema
206
- ]), demoStepsSchema = z.object({
207
- $schema: z.string().optional(),
208
- command: z.string().optional(),
209
- steps: z.array(demoStepSchema)
210
- });
211
- async function demo(stepsJsonData) {
212
- let { steps, command } = demoStepsSchema.parse(stepsJsonData), executors = steps.map(executorForStep);
213
- await simulateTyping(command);
214
- for (let executor of executors)
215
- await executor();
216
- }
217
- async function simulateTyping(text) {
218
- if (!text)
219
- return;
220
- console.clear(), process.stdout.write("$ ");
221
- let chars = text.split("");
222
- for (; chars.length > 0; ) {
223
- let char = chars.shift();
224
- process.stdout.write(char), await sleep(0.1 + Math.random() / 10);
225
- }
226
- process.stdout.write(`
227
- `), await sleep(1 + Math.random() / 10);
228
- }
229
- function executorForStep(step) {
230
- switch (step.type) {
231
- case "output":
232
- return async () => {
233
- outputInfo(step.properties.content);
234
- };
235
- case "sleep":
236
- return async () => {
237
- await sleep(step.properties.duration);
238
- };
239
- case "taskbar":
240
- return taskbarExecutor(step.properties.steps);
241
- case "concurrent":
242
- return concurrentExecutor(step.properties);
243
- case "info":
244
- return async () => {
245
- renderInfo(step.properties);
246
- };
247
- case "success":
248
- return async () => {
249
- renderSuccess(step.properties);
250
- };
251
- case "warning":
252
- return async () => {
253
- renderWarning(step.properties);
254
- };
255
- case "fatalError":
256
- return async () => {
257
- let { errorType, message, nextSteps, tryMessage } = step.properties;
258
- errorType === "abort" ? renderFatalError(new AbortError(message, tryMessage, nextSteps)) : renderFatalError(new BugError(message, tryMessage));
259
- };
260
- case "table":
261
- return async () => {
262
- renderTable(step.properties);
263
- };
264
- case "autocompletePrompt":
265
- return async () => {
266
- await renderAutocompletePrompt(step.properties);
267
- };
268
- case "confirmationPrompt":
269
- return async () => {
270
- await renderConfirmationPrompt(step.properties);
271
- };
272
- case "selectPrompt":
273
- return async () => {
274
- await renderSelectPrompt(step.properties);
275
- };
276
- case "textPrompt":
277
- return async () => {
278
- await renderTextPrompt(step.properties);
279
- };
280
- default:
281
- throw new Error(`Unknown step type: ${step.type}`);
282
- }
283
- }
284
- function taskbarExecutor(steps) {
285
- return async () => {
286
- let tasks = steps.map(({ title, duration }) => ({
287
- title,
288
- task: async () => sleep(duration)
289
- }));
290
- await renderTasks(tasks);
291
- };
292
- }
293
- function concurrentExecutor({ processes }) {
294
- return async () => {
295
- let concurrentProcesses = processes.map(({ prefix, steps }) => ({
296
- prefix,
297
- action: async (stdout) => {
298
- for (let step of steps) {
299
- let { startMessage, duration, endMessage } = step;
300
- startMessage && stdout.write(startMessage), await sleep(duration), endMessage && stdout.write(endMessage);
301
- }
302
- }
303
- }));
304
- await renderConcurrent({ processes: concurrentProcesses });
305
- };
306
- }
307
-
308
- export {
309
- demoStepsSchema,
310
- demo
311
- };
312
- //# sourceMappingURL=chunk-RUK73IAH.js.map
@@ -1,112 +0,0 @@
1
- import {
2
- basename,
3
- dirname,
4
- extname,
5
- isAbsolute,
6
- join,
7
- normalize,
8
- relative,
9
- resolve
10
- } from "./chunk-PNN7RS7Y.js";
11
- import {
12
- __commonJS,
13
- __require,
14
- __toESM,
15
- init_cjs_shims
16
- } from "./chunk-POZ5MGPT.js";
17
-
18
- // ../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
19
- var require_commondir = __commonJS({
20
- "../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js"(exports, module) {
21
- init_cjs_shims();
22
- var path = __require("path");
23
- module.exports = function(basedir, relfiles) {
24
- if (relfiles)
25
- var files = relfiles.map(function(r) {
26
- return path.resolve(basedir, r);
27
- });
28
- else
29
- var files = basedir;
30
- var res = files.slice(1).reduce(function(ps, file) {
31
- if (!file.match(/^([A-Za-z]:)?\/|\\/))
32
- throw new Error("relative path without a basedir");
33
- for (var xs = file.split(/\/+|\\+/), i = 0; ps[i] === xs[i] && i < Math.min(ps.length, xs.length); i++)
34
- ;
35
- return ps.slice(0, i);
36
- }, files[0].split(/\/+|\\+/));
37
- return res.length > 1 ? res.join("/") : "/";
38
- };
39
- }
40
- });
41
-
42
- // ../cli-kit/dist/public/node/path.js
43
- init_cjs_shims();
44
- var import_commondir = __toESM(require_commondir());
45
- import { fileURLToPath } from "url";
46
- function joinPath(...paths) {
47
- return join(...paths);
48
- }
49
- function normalizePath(path) {
50
- return normalize(path);
51
- }
52
- function resolvePath(...paths) {
53
- return resolve(...paths);
54
- }
55
- function relativePath(from, to) {
56
- return relative(from, to);
57
- }
58
- function isAbsolutePath(path) {
59
- return isAbsolute(path);
60
- }
61
- function dirname2(path) {
62
- return dirname(path);
63
- }
64
- function basename2(path, ext) {
65
- return basename(path, ext);
66
- }
67
- function extname2(path) {
68
- return extname(path);
69
- }
70
- function relativizePath(path, dir = cwd()) {
71
- let result = (0, import_commondir.default)([path, dir]), relativePath2 = relative(dir, path), relativeComponents = relativePath2.split("/").filter((component) => component === "..").length;
72
- return result === "/" || relativePath2 === "" || relativeComponents > 2 ? path : relativePath2;
73
- }
74
- function isSubpath(mainPath, subpath) {
75
- let relativePath2 = relative(mainPath, subpath);
76
- return !relativePath2.startsWith("..") && !isAbsolutePath(relativePath2);
77
- }
78
- function moduleDirectory(moduleURL) {
79
- return dirname2(fileURLToPath(moduleURL));
80
- }
81
- function cwd() {
82
- return normalize(process.env.INIT_CWD ? process.env.INIT_CWD : process.cwd());
83
- }
84
- function sniffForPath(argv = process.argv) {
85
- let pathFlagIndex = argv.indexOf("--path");
86
- if (pathFlagIndex === -1)
87
- return argv.find((arg) => arg.startsWith("--path="))?.split("=")[1];
88
- let pathFlag = argv[pathFlagIndex + 1];
89
- if (!(!pathFlag || pathFlag.startsWith("-")))
90
- return pathFlag;
91
- }
92
- function sniffForJson(argv = process.argv) {
93
- return argv.indexOf("--json") !== -1;
94
- }
95
-
96
- export {
97
- joinPath,
98
- normalizePath,
99
- resolvePath,
100
- relativePath,
101
- isAbsolutePath,
102
- dirname2 as dirname,
103
- basename2 as basename,
104
- extname2 as extname,
105
- relativizePath,
106
- isSubpath,
107
- moduleDirectory,
108
- cwd,
109
- sniffForPath,
110
- sniffForJson
111
- };
112
- //# sourceMappingURL=chunk-T2GATXSP.js.map
@@ -1,45 +0,0 @@
1
- import {
2
- demo
3
- } from "./chunk-RUK73IAH.js";
4
- import {
5
- base_command_default
6
- } from "./chunk-335KXO4I.js";
7
- import {
8
- outputInfo,
9
- readFile,
10
- renderAutocompletePrompt
11
- } from "./chunk-PJKCWDDX.js";
12
- import {
13
- joinPath
14
- } from "./chunk-T2GATXSP.js";
15
- import {
16
- init_cjs_shims
17
- } from "./chunk-POZ5MGPT.js";
18
-
19
- // src/cli/commands/demo/catalog.ts
20
- init_cjs_shims();
21
- import { fileURLToPath } from "url";
22
- var Catalog = class extends base_command_default {
23
- static {
24
- this.description = "Browse the catalog for steps";
25
- }
26
- static {
27
- this.hidden = !0;
28
- }
29
- async run() {
30
- let catalogFile = joinPath(fileURLToPath(import.meta.url), "../../../../../assets/demo-catalog.json"), { steps } = JSON.parse(await readFile(catalogFile)), stepSelection = await renderAutocompletePrompt({
31
- message: "Step to display",
32
- choices: steps.map(({ title, type }) => ({
33
- label: title,
34
- value: title,
35
- group: type
36
- }))
37
- }), selectedStep = steps.find(({ title }) => title === stepSelection);
38
- outputInfo("The step looks like this:"), await demo({ steps: [selectedStep] }), outputInfo("JSON for this step:"), outputInfo(JSON.stringify(selectedStep, null, 2));
39
- }
40
- };
41
-
42
- export {
43
- Catalog
44
- };
45
- //# sourceMappingURL=chunk-VT3VJHZ7.js.map
@@ -1,116 +0,0 @@
1
- import {
2
- joinPath
3
- } from "./chunk-T2GATXSP.js";
4
- import {
5
- init_cjs_shims
6
- } from "./chunk-POZ5MGPT.js";
7
-
8
- // ../cli-kit/dist/private/node/constants.js
9
- init_cjs_shims();
10
-
11
- // ../../node_modules/.pnpm/env-paths@3.0.0/node_modules/env-paths/index.js
12
- init_cjs_shims();
13
- import path from "node:path";
14
- import os from "node:os";
15
- import process2 from "node:process";
16
- var homedir = os.homedir(), tmpdir = os.tmpdir(), { env } = process2, macos = (name) => {
17
- let library = path.join(homedir, "Library");
18
- return {
19
- data: path.join(library, "Application Support", name),
20
- config: path.join(library, "Preferences", name),
21
- cache: path.join(library, "Caches", name),
22
- log: path.join(library, "Logs", name),
23
- temp: path.join(tmpdir, name)
24
- };
25
- }, windows = (name) => {
26
- let appData = env.APPDATA || path.join(homedir, "AppData", "Roaming"), localAppData = env.LOCALAPPDATA || path.join(homedir, "AppData", "Local");
27
- return {
28
- // Data/config/cache/log are invented by me as Windows isn't opinionated about this
29
- data: path.join(localAppData, name, "Data"),
30
- config: path.join(appData, name, "Config"),
31
- cache: path.join(localAppData, name, "Cache"),
32
- log: path.join(localAppData, name, "Log"),
33
- temp: path.join(tmpdir, name)
34
- };
35
- }, linux = (name) => {
36
- let username = path.basename(homedir);
37
- return {
38
- data: path.join(env.XDG_DATA_HOME || path.join(homedir, ".local", "share"), name),
39
- config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, ".config"), name),
40
- cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, ".cache"), name),
41
- // https://wiki.debian.org/XDGBaseDirectorySpecification#state
42
- log: path.join(env.XDG_STATE_HOME || path.join(homedir, ".local", "state"), name),
43
- temp: path.join(tmpdir, username, name)
44
- };
45
- };
46
- function envPaths(name, { suffix = "nodejs" } = {}) {
47
- if (typeof name != "string")
48
- throw new TypeError(`Expected a string, got ${typeof name}`);
49
- return suffix && (name += `-${suffix}`), process2.platform === "darwin" ? macos(name) : process2.platform === "win32" ? windows(name) : linux(name);
50
- }
51
-
52
- // ../cli-kit/dist/private/node/constants.js
53
- var identifier = "shopify-cli", cacheFolder = () => process.env.XDG_CACHE_HOME ? process.env.XDG_CACHE_HOME : envPaths(identifier).cache, logsFolder = () => envPaths(identifier).log, environmentVariables = {
54
- alwaysLogAnalytics: "SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",
55
- alwaysLogMetrics: "SHOPIFY_CLI_ALWAYS_LOG_METRICS",
56
- deviceAuth: "SHOPIFY_CLI_DEVICE_AUTH",
57
- enableCliRedirect: "SHOPIFY_CLI_ENABLE_CLI_REDIRECT",
58
- env: "SHOPIFY_CLI_ENV",
59
- firstPartyDev: "SHOPIFY_CLI_1P_DEV",
60
- noAnalytics: "SHOPIFY_CLI_NO_ANALYTICS",
61
- partnersToken: "SHOPIFY_CLI_PARTNERS_TOKEN",
62
- runAsUser: "SHOPIFY_RUN_AS_USER",
63
- serviceEnv: "SHOPIFY_SERVICE_ENV",
64
- skipCliRedirect: "SHOPIFY_CLI_SKIP_CLI_REDIRECT",
65
- spinInstance: "SPIN_INSTANCE",
66
- themeToken: "SHOPIFY_CLI_THEME_TOKEN",
67
- unitTest: "SHOPIFY_UNIT_TEST",
68
- verbose: "SHOPIFY_FLAG_VERBOSE",
69
- noThemeBundling: "SHOPIFY_CLI_NO_THEME_BUNDLING",
70
- bundledThemeCLI: "SHOPIFY_CLI_BUNDLED_THEME_CLI",
71
- // Variables to detect if the CLI is running in a cloud environment
72
- codespaces: "CODESPACES",
73
- codespaceName: "CODESPACE_NAME",
74
- codespacePortForwardingDomain: "GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",
75
- gitpod: "GITPOD_WORKSPACE_URL",
76
- cloudShell: "CLOUD_SHELL",
77
- spin: "SPIN",
78
- spinAppPort: "SERVER_PORT",
79
- spinAppHost: "SPIN_APP_HOST",
80
- organization: "SHOPIFY_CLI_ORGANIZATION",
81
- identityToken: "SHOPIFY_CLI_IDENTITY_TOKEN",
82
- refreshToken: "SHOPIFY_CLI_REFRESH_TOKEN",
83
- otelURL: "SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",
84
- themeKitAccessDomain: "SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN"
85
- }, defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com", systemEnvironmentVariables = {
86
- backendPort: "BACKEND_PORT"
87
- }, pathConstants = {
88
- executables: {
89
- dev: "/opt/dev/bin/dev"
90
- },
91
- directories: {
92
- cache: {
93
- path: () => cacheFolder(),
94
- vendor: {
95
- path: () => joinPath(cacheFolder(), "vendor"),
96
- binaries: () => joinPath(cacheFolder(), "vendor", "binaries")
97
- }
98
- }
99
- }
100
- }, sessionConstants = {
101
- expirationTimeMarginInMinutes: 4
102
- }, bugsnagApiKey = "9e1e6889176fd0c795d5c659225e0fae", reportingRateLimit = { limit: 300, timeout: { days: 1 } }, themeKitAccessDomain = process.env[environmentVariables.themeKitAccessDomain] ?? defaultThemeKitAccessDomain;
103
-
104
- export {
105
- envPaths,
106
- logsFolder,
107
- environmentVariables,
108
- defaultThemeKitAccessDomain,
109
- systemEnvironmentVariables,
110
- pathConstants,
111
- sessionConstants,
112
- bugsnagApiKey,
113
- reportingRateLimit,
114
- themeKitAccessDomain
115
- };
116
- //# sourceMappingURL=chunk-XEDHKQZA.js.map
@@ -1,6 +0,0 @@
1
- import Command from '@shopify/cli-kit/node/base-command';
2
- export default class Catalog extends Command {
3
- static description: string;
4
- static hidden: boolean;
5
- run(): Promise<void>;
6
- }
@@ -1,36 +0,0 @@
1
- import {
2
- Catalog
3
- } from "../../../chunk-VT3VJHZ7.js";
4
- import "../../../chunk-RUK73IAH.js";
5
- import "../../../chunk-335KXO4I.js";
6
- import "../../../chunk-WN3FKMKB.js";
7
- import "../../../chunk-O5K4AU7Q.js";
8
- import "../../../chunk-AT4IG4GJ.js";
9
- import "../../../chunk-5OP2SA7G.js";
10
- import "../../../chunk-SYRHCENA.js";
11
- import "../../../chunk-UOZCMFCN.js";
12
- import "../../../chunk-GDYKHT64.js";
13
- import "../../../chunk-VSLR7ET4.js";
14
- import "../../../chunk-FDJVVEGH.js";
15
- import "../../../chunk-BYPQXSAL.js";
16
- import "../../../chunk-43YGIE7Y.js";
17
- import "../../../chunk-NLUGD7PZ.js";
18
- import "../../../chunk-PJKCWDDX.js";
19
- import "../../../chunk-XVNW332R.js";
20
- import "../../../chunk-XEDHKQZA.js";
21
- import "../../../chunk-T2GATXSP.js";
22
- import "../../../chunk-CBD6UXLA.js";
23
- import "../../../chunk-CBBS4CV7.js";
24
- import "../../../chunk-SNOECVP4.js";
25
- import "../../../chunk-NEOIQ6PN.js";
26
- import "../../../chunk-7Q3MMWAC.js";
27
- import "../../../chunk-MX4RJDBM.js";
28
- import "../../../chunk-NB4NLOEJ.js";
29
- import "../../../chunk-UBB7JKND.js";
30
- import "../../../chunk-522OB3EU.js";
31
- import "../../../chunk-PNN7RS7Y.js";
32
- import "../../../chunk-POZ5MGPT.js";
33
- export {
34
- Catalog as default
35
- };
36
- //# sourceMappingURL=catalog.js.map
@@ -1,11 +0,0 @@
1
- import Command from '@shopify/cli-kit/node/base-command';
2
- export default class GenerateFile extends Command {
3
- static description: string;
4
- static summary: string;
5
- static hidden: boolean;
6
- static flags: {
7
- path: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
8
- file: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
- };
10
- run(): Promise<void>;
11
- }
@@ -1,37 +0,0 @@
1
- import {
2
- GenerateFile
3
- } from "../../../chunk-7GNQ7YY4.js";
4
- import "../../../chunk-QSUS3GJF.js";
5
- import "../../../chunk-RUK73IAH.js";
6
- import "../../../chunk-335KXO4I.js";
7
- import "../../../chunk-WN3FKMKB.js";
8
- import "../../../chunk-O5K4AU7Q.js";
9
- import "../../../chunk-AT4IG4GJ.js";
10
- import "../../../chunk-5OP2SA7G.js";
11
- import "../../../chunk-SYRHCENA.js";
12
- import "../../../chunk-UOZCMFCN.js";
13
- import "../../../chunk-GDYKHT64.js";
14
- import "../../../chunk-VSLR7ET4.js";
15
- import "../../../chunk-FDJVVEGH.js";
16
- import "../../../chunk-BYPQXSAL.js";
17
- import "../../../chunk-43YGIE7Y.js";
18
- import "../../../chunk-NLUGD7PZ.js";
19
- import "../../../chunk-PJKCWDDX.js";
20
- import "../../../chunk-XVNW332R.js";
21
- import "../../../chunk-XEDHKQZA.js";
22
- import "../../../chunk-T2GATXSP.js";
23
- import "../../../chunk-CBD6UXLA.js";
24
- import "../../../chunk-CBBS4CV7.js";
25
- import "../../../chunk-SNOECVP4.js";
26
- import "../../../chunk-NEOIQ6PN.js";
27
- import "../../../chunk-7Q3MMWAC.js";
28
- import "../../../chunk-MX4RJDBM.js";
29
- import "../../../chunk-NB4NLOEJ.js";
30
- import "../../../chunk-UBB7JKND.js";
31
- import "../../../chunk-522OB3EU.js";
32
- import "../../../chunk-PNN7RS7Y.js";
33
- import "../../../chunk-POZ5MGPT.js";
34
- export {
35
- GenerateFile as default
36
- };
37
- //# sourceMappingURL=generate-file.js.map
@@ -1,10 +0,0 @@
1
- import Command from '@shopify/cli-kit/node/base-command';
2
- export default class Demo extends Command {
3
- static description: string;
4
- static hidden: boolean;
5
- static flags: {
6
- path: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
7
- file: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
8
- };
9
- run(): Promise<void>;
10
- }