@shopify/cli 3.61.2 → 3.62.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 (197) hide show
  1. package/dist/assets/dev-console/extensions/dev-console/assets/index-dfaab2a5.css +1 -0
  2. package/dist/assets/dev-console/extensions/dev-console/assets/{index-f3e60690.js → index-e3682a83.js} +1 -1
  3. package/dist/assets/dev-console/index.html +2 -2
  4. package/dist/{chokidar-RFZXZKRQ.js → chokidar-5MKSECYV.js} +4 -3
  5. package/dist/{chunk-QDZF6IG4.js → chunk-22PYIFA2.js} +112 -17
  6. package/dist/{chunk-3MBQVTEX.js → chunk-2QVJZ5TG.js} +2 -1
  7. package/dist/{chunk-KBXWK6XB.js → chunk-2ZSNH7CD.js} +4 -5
  8. package/dist/{chunk-BYFLATOA.js → chunk-5FNE3T7E.js} +5 -4
  9. package/dist/{chunk-G4EQLT5B.js → chunk-5X4QXYEZ.js} +9 -7
  10. package/dist/chunk-66NABVCG.js +73 -0
  11. package/dist/{chunk-LAY4AEXX.js → chunk-6UDFXWNE.js} +2 -1
  12. package/dist/{chunk-QQP6JS5H.js → chunk-7MXLRMOY.js} +3 -2
  13. package/dist/{chunk-EHF6FVWH.js → chunk-A5STII7T.js} +3 -2
  14. package/dist/{chunk-UPM6XNBH.js → chunk-ADESJ2KG.js} +6 -5
  15. package/dist/{chunk-BZJX2NV6.js → chunk-AMAYT2P2.js} +3 -2
  16. package/dist/{chunk-QTBH3GO6.js → chunk-B62HZLMM.js} +3 -2
  17. package/dist/{chunk-3RM5SOXY.js → chunk-BMTG2VHL.js} +4 -3
  18. package/dist/{chunk-FWGRGI4R.js → chunk-BYC3NA2Y.js} +2 -1
  19. package/dist/{chunk-NJTSDTDU.js → chunk-BZFXXFUC.js} +6 -5
  20. package/dist/{chunk-7IZTLXJ5.js → chunk-CKFE55FX.js} +4 -3
  21. package/dist/{chunk-YP5UVIUW.js → chunk-CYQRKZVM.js} +6 -5
  22. package/dist/{chunk-HTYJDJRZ.js → chunk-DL3MKXVR.js} +2 -1
  23. package/dist/{chunk-IUHH3PST.js → chunk-DLK3F3DC.js} +2 -1
  24. package/dist/{chunk-4XNS74OG.js → chunk-EARPFFS7.js} +2 -1
  25. package/dist/chunk-EQPYUHNM.js +3642 -0
  26. package/dist/{chunk-LKGDG6WW.js → chunk-FMKVOTQK.js} +2 -1
  27. package/dist/{chunk-I434ZJQI.js → chunk-GEN4RXTD.js} +7 -6
  28. package/dist/{chunk-QSO3GQEK.js → chunk-HJ4AUFE7.js} +94 -160
  29. package/dist/{chunk-FQIRJADJ.js → chunk-JIJ65JT6.js} +2 -1
  30. package/dist/{chunk-JQPQJN44.js → chunk-JKYNFUD3.js} +11 -12
  31. package/dist/{chunk-4L37JOS5.js → chunk-JL3ESOD2.js} +3 -2
  32. package/dist/{chunk-4TTAP7NN.js → chunk-JOOYCYFU.js} +6 -5
  33. package/dist/{chunk-XMJDBJPP.js → chunk-K3GG6Y3J.js} +12 -12
  34. package/dist/{chunk-VQZ2SHRY.js → chunk-K6257PKA.js} +3 -2
  35. package/dist/{chunk-5KRK4DLX.js → chunk-LC6MEJT3.js} +4 -3
  36. package/dist/{chunk-KDOLMUJB.js → chunk-LH533WG4.js} +2 -1
  37. package/dist/{chunk-FBB6KUZG.js → chunk-LSCXQWNO.js} +2 -1
  38. package/dist/{chunk-VC6CC75R.js → chunk-MG6QFKFM.js} +5 -4
  39. package/dist/{chunk-ETSILRIY.js → chunk-MQ2RGCDU.js} +5 -4
  40. package/dist/{chunk-QOHDW3X5.js → chunk-MQGV3PCJ.js} +4 -3
  41. package/dist/{chunk-PBFWVFAQ.js → chunk-NABCTJNW.js} +3 -2
  42. package/dist/{chunk-YZGLFVKK.js → chunk-NNASIYCT.js} +3 -2
  43. package/dist/chunk-PIB2FEJJ.js +4385 -0
  44. package/dist/{chunk-TXXQWILO.js → chunk-PIVNWN2P.js} +4 -3
  45. package/dist/{chunk-Q3KADKQA.js → chunk-PO6SEYU4.js} +4 -3
  46. package/dist/{chunk-FAFQQMD4.js → chunk-PRJ3U7MR.js} +2 -1
  47. package/dist/{chunk-5B2D56W6.js → chunk-Q4XGXPUG.js} +2 -1
  48. package/dist/{chunk-ZE2ZPLYI.js → chunk-QGJLRFY4.js} +19 -89
  49. package/dist/{chunk-RP2ISWQN.js → chunk-QOUOFEGO.js} +3 -2
  50. package/dist/{chunk-CWYZA7C7.js → chunk-RUSG4O2Z.js} +13464 -5175
  51. package/dist/{chunk-CKKROMZF.js → chunk-S4VBXFXP.js} +3 -2
  52. package/dist/{chunk-BE73NZXB.js → chunk-SAR5HGRG.js} +2 -1
  53. package/dist/{chunk-GXPKATXW.js → chunk-T5LLJYYS.js} +2 -1
  54. package/dist/{chunk-NBIE3DNN.js → chunk-TCRWMUKX.js} +4 -3
  55. package/dist/{chunk-4757GPBG.js → chunk-UACSLX64.js} +6 -5
  56. package/dist/{chunk-4KKFUTH7.js → chunk-UJ3QKFA5.js} +2 -1
  57. package/dist/chunk-UNPXLODI.js +121 -0
  58. package/dist/{chunk-RQ24VTW4.js → chunk-VM4POVNV.js} +2 -1
  59. package/dist/{chunk-CTETXMMM.js → chunk-VS6RWOLM.js} +8 -7
  60. package/dist/{chunk-BUWM6JUU.js → chunk-W5VEUSWG.js} +5 -4
  61. package/dist/{chunk-PCQFWMMD.js → chunk-WADS2TV5.js} +63 -5
  62. package/dist/{chunk-M73YMW2C.js → chunk-WAEWSGBK.js} +2579 -1632
  63. package/dist/{chunk-6SL33DOA.js → chunk-XQFDS44U.js} +2 -1
  64. package/dist/{chunk-WCNR75S2.js → chunk-YC4FLMDD.js} +2 -1
  65. package/dist/{chunk-OXZ2SRCK.js → chunk-YECNACSF.js} +3 -2
  66. package/dist/{chunk-QLLSCNEC.js → chunk-YX5VXHSJ.js} +4 -3
  67. package/dist/{chunk-5MODHNUE.js → chunk-ZCMXEGSE.js} +5 -4
  68. package/dist/{chunk-4VEOJ5JD.js → chunk-ZEHQN47F.js} +2 -1
  69. package/dist/{chunk-3JLUTHGR.js → chunk-ZPFJOUKZ.js} +2 -1
  70. package/dist/{chunk-M63RTPGR.js → chunk-ZPL24Y2D.js} +1 -0
  71. package/dist/cli/commands/auth/logout.js +37 -39
  72. package/dist/cli/commands/auth/logout.test.js +39 -41
  73. package/dist/cli/commands/debug/command-flags.js +33 -35
  74. package/dist/cli/commands/demo/catalog.js +36 -38
  75. package/dist/cli/commands/demo/generate-file.js +37 -39
  76. package/dist/cli/commands/demo/index.js +35 -37
  77. package/dist/cli/commands/demo/print-ai-prompt.js +37 -39
  78. package/dist/cli/commands/docs/generate.js +33 -35
  79. package/dist/cli/commands/docs/generate.test.js +34 -36
  80. package/dist/cli/commands/help.js +33 -35
  81. package/dist/cli/commands/kitchen-sink/async.js +34 -36
  82. package/dist/cli/commands/kitchen-sink/async.test.js +35 -37
  83. package/dist/cli/commands/kitchen-sink/index.js +36 -38
  84. package/dist/cli/commands/kitchen-sink/index.test.js +37 -39
  85. package/dist/cli/commands/kitchen-sink/prompts.js +34 -36
  86. package/dist/cli/commands/kitchen-sink/prompts.test.js +35 -37
  87. package/dist/cli/commands/kitchen-sink/static.js +34 -36
  88. package/dist/cli/commands/kitchen-sink/static.test.js +35 -37
  89. package/dist/cli/commands/search.js +34 -36
  90. package/dist/cli/commands/upgrade.js +33 -35
  91. package/dist/cli/commands/upgrade.test.js +5 -4
  92. package/dist/cli/commands/version.js +34 -36
  93. package/dist/cli/commands/version.test.js +35 -37
  94. package/dist/cli/services/commands/search.js +19 -21
  95. package/dist/cli/services/commands/search.test.js +20 -22
  96. package/dist/cli/services/commands/version.js +23 -25
  97. package/dist/cli/services/commands/version.test.js +25 -27
  98. package/dist/cli/services/demo.js +21 -23
  99. package/dist/cli/services/demo.test.js +22 -24
  100. package/dist/cli/services/kitchen-sink/async.js +19 -21
  101. package/dist/cli/services/kitchen-sink/prompts.js +19 -21
  102. package/dist/cli/services/kitchen-sink/static.js +19 -21
  103. package/dist/cli/services/upgrade.js +22 -24
  104. package/dist/cli/services/upgrade.test.js +30 -27
  105. package/dist/{constants-XCWOF7M7.js → constants-3CLHB4LQ.js} +5 -6
  106. package/dist/{custom-oclif-loader-4SQGUQ7D-P5C4NLSX.js → custom-oclif-loader-ZH42ZTTC.js} +25 -28
  107. package/dist/{del-DGT5RCOW.js → del-KSMMBLCD.js} +9 -8
  108. package/dist/{devtools-SJTLOVKU.js → devtools-6ZZ3EAY7.js} +3 -2
  109. package/dist/error-handler-I6WJC3U2.js +43 -0
  110. package/dist/error-handler-JFX2TIYX.js +38 -0
  111. package/dist/hooks/postrun.js +28 -30
  112. package/dist/hooks/prerun.js +23 -25
  113. package/dist/{http-proxy-WYSSUHIT.js → http-proxy-KFHAZRTT.js} +3 -2
  114. package/dist/index.js +138858 -143506
  115. package/dist/lib-E7NFRKVR.js +14 -0
  116. package/dist/{lib-RZNRJEWB.js → lib-LY6ZCPIO.js} +2 -1
  117. package/dist/{lib-AAMRQUES.js → lib-MUDJYT6A.js} +4 -3
  118. package/dist/{local-YKOG4EUR-XRRBWLSI.js → local-QXPV4RF5.js} +18 -14
  119. package/dist/{magic-string.es-6DE547FE.js → magic-string.es-ATGURXGQ.js} +2 -1
  120. package/dist/{morph-DCIZUK2Q.js → morph-WKKSW22O.js} +6 -5
  121. package/dist/{multipart-parser-ENLY4BKU.js → multipart-parser-KYOHF24X.js} +3 -2
  122. package/dist/{node-3DKQAOFU.js → node-5XXX7TNJ.js} +30 -29
  123. package/dist/{node-package-manager-HYTHPJBI.js → node-package-manager-O65VOP6W.js} +23 -23
  124. package/dist/{npa-AYOTDW63.js → npa-L2ZRSPZ2.js} +4 -3
  125. package/dist/{open-B7XFJJCK.js → open-JRS7RW22.js} +3 -2
  126. package/dist/out-AS7GH6TC.js +7 -0
  127. package/dist/{path-2NNC3QGW.js → path-JVVXOELJ.js} +10 -6
  128. package/dist/{source-map-V6UVDDPX.js → source-map-37TX6JEW.js} +2 -1
  129. package/dist/system-EEQBTJMJ.js +31 -0
  130. package/dist/tsconfig.tsbuildinfo +1 -1
  131. package/dist/{ui-5LSDG3C5.js → ui-3BAHGNCQ.js} +20 -20
  132. package/dist/{workerd-TFH7T6NI.js → workerd-WR22YQIS.js} +29 -28
  133. package/oclif.manifest.json +108 -93
  134. package/package.json +15 -5
  135. package/dist/assets/dev-console/extensions/dev-console/assets/index-792a0c8d.css +0 -1
  136. package/dist/chunk-3LWRRBH5.js +0 -75
  137. package/dist/chunk-3PIGYQSE.js +0 -36
  138. package/dist/chunk-CK7MF3LY.js +0 -28803
  139. package/dist/chunk-J4I3URIN.js +0 -893
  140. package/dist/chunk-MHMFNQE3.js +0 -76
  141. package/dist/chunk-MXHK26B3.js +0 -89
  142. package/dist/chunk-NJP5GFNN.js +0 -29224
  143. package/dist/chunk-OC4AY5G7.js +0 -11936
  144. package/dist/chunk-OQBI57X3.js +0 -22
  145. package/dist/chunk-RPRKZ6JC.js +0 -53861
  146. package/dist/chunk-RTZHOWFC.js +0 -5485
  147. package/dist/chunk-SZQX5J7X.js +0 -64
  148. package/dist/chunk-T77LT3XG.js +0 -4743
  149. package/dist/chunk-UV4APOMB.js +0 -273
  150. package/dist/chunk-VF4VWJWS.js +0 -213222
  151. package/dist/chunk-WZBNLCJ5.js +0 -13452
  152. package/dist/chunk-YWPV7MV2.js +0 -16432
  153. package/dist/chunk-ZLGRKPW3.js +0 -68
  154. package/dist/chunk-ZZGXXS5X.js +0 -819
  155. package/dist/cli/commands/auth/logout.js.map +0 -1
  156. package/dist/cli/commands/debug/command-flags.js.map +0 -1
  157. package/dist/cli/commands/demo/catalog.js.map +0 -1
  158. package/dist/cli/commands/demo/generate-file.js.map +0 -1
  159. package/dist/cli/commands/demo/index.js.map +0 -1
  160. package/dist/cli/commands/demo/print-ai-prompt.js.map +0 -1
  161. package/dist/cli/commands/docs/generate.js.map +0 -1
  162. package/dist/cli/commands/help.js.map +0 -1
  163. package/dist/cli/commands/kitchen-sink/async.js.map +0 -1
  164. package/dist/cli/commands/kitchen-sink/index.js.map +0 -1
  165. package/dist/cli/commands/kitchen-sink/prompts.js.map +0 -1
  166. package/dist/cli/commands/kitchen-sink/static.js.map +0 -1
  167. package/dist/cli/commands/search.js.map +0 -1
  168. package/dist/cli/commands/upgrade.js.map +0 -1
  169. package/dist/cli/commands/version.js.map +0 -1
  170. package/dist/cli/services/commands/search.js.map +0 -1
  171. package/dist/cli/services/commands/version.js.map +0 -1
  172. package/dist/cli/services/demo.js.map +0 -1
  173. package/dist/cli/services/kitchen-sink/async.js.map +0 -1
  174. package/dist/cli/services/kitchen-sink/prompts.js.map +0 -1
  175. package/dist/cli/services/kitchen-sink/static.js.map +0 -1
  176. package/dist/cli/services/upgrade.js.map +0 -1
  177. package/dist/custom-oclif-loader-OD47SFAU.js +0 -92
  178. package/dist/del-ICEHOC6W-GYLFYUKX.js +0 -2817
  179. package/dist/devtools-6HZ2IPFU-GLFJP63E.js +0 -3557
  180. package/dist/devtools-IHJDLLT4.js +0 -77
  181. package/dist/error-handler-EPMFPTYX.js +0 -37
  182. package/dist/error-handler-WI4YVJIS-U3BMMYNJ.js +0 -31
  183. package/dist/error-handler-WL3Q25NI.js +0 -45
  184. package/dist/hooks/postrun.js.map +0 -1
  185. package/dist/hooks/prerun.js.map +0 -1
  186. package/dist/index.js.map +0 -1
  187. package/dist/lib-76RCE6WZ-5IYGTKKK.js +0 -17
  188. package/dist/lib-UYK3ZLZK.js +0 -13
  189. package/dist/local-KISH2IRF.js +0 -67
  190. package/dist/multipart-parser-ENLY4BKU-IUS26CJU.js +0 -363
  191. package/dist/node-package-manager-S7TSAUJZ-KKDY6KSF.js +0 -70
  192. package/dist/open-B7XFJJCK-4XEFFVL7.js +0 -295
  193. package/dist/out-LRIJ35RZ.js +0 -6
  194. package/dist/out-M5MRQZP5-YHIOILKU.js +0 -14
  195. package/dist/path-HO4HBKK5-4Q2BBYUA.js +0 -33
  196. package/dist/system-LIP7AECY.js +0 -33
  197. package/dist/ui-FUZYK6S3-PVVDPVD5.js +0 -51
@@ -1,13 +1,15 @@
1
1
  import {
2
+ Conf,
2
3
  latestVersion
3
- } from "./chunk-CWYZA7C7.js";
4
+ } from "./chunk-RUSG4O2Z.js";
4
5
  import {
5
6
  require_semver
6
- } from "./chunk-FAFQQMD4.js";
7
+ } from "./chunk-PRJ3U7MR.js";
7
8
  import {
8
9
  AbortController,
9
10
  AbortError,
10
11
  BugError,
12
+ captureOutput,
11
13
  exec,
12
14
  fileExists,
13
15
  findPathUp,
@@ -18,16 +20,16 @@ import {
18
20
  readFile,
19
21
  runWithTimer,
20
22
  writeFile
21
- } from "./chunk-CK7MF3LY.js";
23
+ } from "./chunk-WAEWSGBK.js";
22
24
  import {
23
25
  dirname,
24
26
  joinPath
25
- } from "./chunk-MHMFNQE3.js";
27
+ } from "./chunk-UNPXLODI.js";
26
28
  import {
27
29
  __export,
28
30
  __toESM,
29
31
  init_cjs_shims
30
- } from "./chunk-M63RTPGR.js";
32
+ } from "./chunk-ZPL24Y2D.js";
31
33
 
32
34
  // ../cli-kit/src/public/node/node-package-manager.ts
33
35
  var node_package_manager_exports = {};
@@ -56,10 +58,88 @@ __export(node_package_manager_exports, {
56
58
  pnpmWorkspaceFile: () => pnpmWorkspaceFile,
57
59
  readAndParsePackageJson: () => readAndParsePackageJson,
58
60
  usesWorkspaces: () => usesWorkspaces,
61
+ versionSatisfies: () => versionSatisfies,
59
62
  writePackageJSON: () => writePackageJSON,
60
63
  yarnLockfile: () => yarnLockfile
61
64
  });
62
65
  init_cjs_shims();
66
+
67
+ // ../cli-kit/src/private/node/conf-store.ts
68
+ init_cjs_shims();
69
+
70
+ // ../cli-kit/src/public/node/local-storage.ts
71
+ init_cjs_shims();
72
+ var LocalStorage = class {
73
+ constructor(options) {
74
+ this.config = new Conf(options);
75
+ }
76
+ /**
77
+ * Get a value from the local storage.
78
+ *
79
+ * @param key - The key to get.
80
+ * @returns The value.
81
+ */
82
+ get(key) {
83
+ return this.config.get(key);
84
+ }
85
+ /**
86
+ * Set a value in the local storage.
87
+ *
88
+ * @param key - The key to set.
89
+ * @param value - The value to set.
90
+ */
91
+ set(key, value) {
92
+ this.config.set(key, value);
93
+ }
94
+ /**
95
+ * Delete a value from the local storage.
96
+ *
97
+ * @param key - The key to delete.
98
+ */
99
+ delete(key) {
100
+ this.config.delete(key);
101
+ }
102
+ /**
103
+ * Clear the local storage (delete all values).
104
+ */
105
+ clear() {
106
+ this.config.clear();
107
+ }
108
+ };
109
+
110
+ // ../cli-kit/src/private/node/conf-store.ts
111
+ var _instance;
112
+ function cliKitStore() {
113
+ if (!_instance) {
114
+ _instance = new LocalStorage({ projectName: "shopify-cli-kit" });
115
+ }
116
+ return _instance;
117
+ }
118
+ function getSession(config = cliKitStore()) {
119
+ outputDebug(outputContent`Getting session store...`);
120
+ return config.get("sessionStore");
121
+ }
122
+ function setSession(session, config = cliKitStore()) {
123
+ outputDebug(outputContent`Setting session store...`);
124
+ config.set("sessionStore", session);
125
+ }
126
+ function removeSession(config = cliKitStore()) {
127
+ outputDebug(outputContent`Removing session store...`);
128
+ config.delete("sessionStore");
129
+ }
130
+ async function cacheRetrieveOrRepopulate(key, fn, timeout, config = cliKitStore()) {
131
+ const cache = config.get("cache") || {};
132
+ const cached = cache[key];
133
+ if (cached?.value !== void 0 && (timeout === void 0 || Date.now() - cached.timestamp < timeout)) {
134
+ return cached.value;
135
+ }
136
+ const value = await fn();
137
+ cache[key] = { value, timestamp: Date.now() };
138
+ config.set("cache", cache);
139
+ return value;
140
+ }
141
+
142
+ // ../cli-kit/src/public/node/node-package-manager.ts
63
143
  var import_semver = __toESM(require_semver(), 1);
64
144
  var yarnLockfile = "yarn.lock";
65
145
  var npmLockfile = "package-lock.json";
@@ -96,12 +176,12 @@ function packageManagerFromUserAgent(env = process.env) {
96
176
  return "unknown";
97
177
  }
98
178
  async function getPackageManager(fromDirectory) {
99
- const packageJson = await findPathUp("package.json", { cwd: fromDirectory, type: "file" });
100
- if (!packageJson) {
179
+ const directory = await captureOutput("npm", ["prefix"], { cwd: fromDirectory });
180
+ outputDebug(outputContent`Obtaining the dependency manager in directory ${outputToken.path(directory)}...`);
181
+ const packageJson = joinPath(directory, "package.json");
182
+ if (!await fileExists(packageJson)) {
101
183
  return packageManagerFromUserAgent();
102
184
  }
103
- const directory = dirname(packageJson);
104
- outputDebug(outputContent`Obtaining the dependency manager in directory ${outputToken.path(directory)}...`);
105
185
  const yarnLockPath = joinPath(directory, yarnLockfile);
106
186
  const pnpmLockPath = joinPath(directory, pnpmLockfile);
107
187
  const bunLockPath = joinPath(directory, bunLockfile);
@@ -178,18 +258,26 @@ async function usesWorkspaces(appDirectory) {
178
258
  const pnpmWorkspacePath = joinPath(appDirectory, pnpmWorkspaceFile);
179
259
  return Boolean(packageJsonContent.workspaces) || fileExists(pnpmWorkspacePath);
180
260
  }
181
- async function checkForNewVersion(dependency, currentVersion) {
182
- outputDebug(outputContent`Checking if there's a version of ${dependency} newer than ${currentVersion}`);
261
+ async function checkForNewVersion(dependency, currentVersion, { cacheExpiryInHours = 0 } = {}) {
262
+ const getLatestVersion = async () => {
263
+ outputDebug(outputContent`Checking if there's a version of ${dependency} newer than ${currentVersion}`);
264
+ return getLatestNPMPackageVersion(dependency);
265
+ };
266
+ const cacheKey = `npm-package-${dependency}`;
267
+ let lastVersion;
183
268
  try {
184
- const lastVersion = await getLatestNPMPackageVersion(dependency);
185
- if (lastVersion && new import_semver.SemVer(currentVersion).compare(lastVersion) < 0) {
186
- return lastVersion;
187
- } else {
188
- return void 0;
189
- }
269
+ lastVersion = await cacheRetrieveOrRepopulate(cacheKey, getLatestVersion, cacheExpiryInHours * 24 * 1e3);
190
270
  } catch (error) {
191
271
  return void 0;
192
272
  }
273
+ if (lastVersion && new import_semver.SemVer(currentVersion).compare(lastVersion) < 0) {
274
+ return lastVersion;
275
+ } else {
276
+ return void 0;
277
+ }
278
+ }
279
+ function versionSatisfies(version, requirements) {
280
+ return (0, import_semver.satisfies)(version, requirements);
193
281
  }
194
282
  async function readAndParsePackageJson(packageJsonPath) {
195
283
  if (!await fileExists(packageJsonPath)) {
@@ -371,6 +459,11 @@ async function writePackageJSON(directory, packageJSON) {
371
459
  }
372
460
 
373
461
  export {
462
+ LocalStorage,
463
+ getSession,
464
+ setSession,
465
+ removeSession,
466
+ cacheRetrieveOrRepopulate,
374
467
  yarnLockfile,
375
468
  npmLockfile,
376
469
  pnpmLockfile,
@@ -390,6 +483,7 @@ export {
390
483
  getDependencies,
391
484
  usesWorkspaces,
392
485
  checkForNewVersion,
486
+ versionSatisfies,
393
487
  readAndParsePackageJson,
394
488
  addNPMDependenciesIfNeeded,
395
489
  addNPMDependencies,
@@ -399,3 +493,4 @@ export {
399
493
  writePackageJSON,
400
494
  node_package_manager_exports
401
495
  };
496
+ //# sourceMappingURL=chunk-22PYIFA2.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __commonJS,
3
3
  init_cjs_shims
4
- } from "./chunk-M63RTPGR.js";
4
+ } from "./chunk-ZPL24Y2D.js";
5
5
 
6
6
  // ../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js
7
7
  var require_normalize_path = __commonJS({
@@ -46,3 +46,4 @@ normalize-path/index.js:
46
46
  * Released under the MIT License.
47
47
  *)
48
48
  */
49
+ //# sourceMappingURL=chunk-2QVJZ5TG.js.map
@@ -1,16 +1,14 @@
1
1
  import {
2
+ figures_default,
2
3
  renderAutocompletePrompt,
3
4
  renderConfirmationPrompt,
4
5
  renderDangerousConfirmationPrompt,
5
6
  renderSelectPrompt,
6
7
  renderTextPrompt
7
- } from "./chunk-CK7MF3LY.js";
8
- import {
9
- figures_default
10
- } from "./chunk-YWPV7MV2.js";
8
+ } from "./chunk-WAEWSGBK.js";
11
9
  import {
12
10
  init_cjs_shims
13
- } from "./chunk-M63RTPGR.js";
11
+ } from "./chunk-ZPL24Y2D.js";
14
12
 
15
13
  // src/cli/services/kitchen-sink/prompts.ts
16
14
  init_cjs_shims();
@@ -183,3 +181,4 @@ async function prompts() {
183
181
  export {
184
182
  prompts
185
183
  };
184
+ //# sourceMappingURL=chunk-2ZSNH7CD.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-G4EQLT5B.js";
3
+ } from "./chunk-5X4QXYEZ.js";
4
4
  import {
5
5
  renderTable,
6
6
  renderText
7
- } from "./chunk-CK7MF3LY.js";
7
+ } from "./chunk-WAEWSGBK.js";
8
8
  import {
9
9
  require_lib
10
- } from "./chunk-I434ZJQI.js";
10
+ } from "./chunk-GEN4RXTD.js";
11
11
  import {
12
12
  __toESM,
13
13
  init_cjs_shims
14
- } from "./chunk-M63RTPGR.js";
14
+ } from "./chunk-ZPL24Y2D.js";
15
15
 
16
16
  // src/cli/commands/debug/command-flags.ts
17
17
  init_cjs_shims();
@@ -96,3 +96,4 @@ var CommandFlags = class _CommandFlags extends base_command_default {
96
96
  export {
97
97
  CommandFlags
98
98
  };
99
+ //# sourceMappingURL=chunk-5FNE3T7E.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  require_toml
3
- } from "./chunk-4XNS74OG.js";
3
+ } from "./chunk-EARPFFS7.js";
4
4
  import {
5
5
  errorHandler,
6
6
  registerCleanBugsnagErrorsFromWithinPlugins
7
- } from "./chunk-JQPQJN44.js";
7
+ } from "./chunk-JKYNFUD3.js";
8
8
  import {
9
9
  hashString
10
- } from "./chunk-UPM6XNBH.js";
10
+ } from "./chunk-ADESJ2KG.js";
11
11
  import {
12
12
  AbortError,
13
13
  addPublicMetadata,
@@ -23,17 +23,17 @@ import {
23
23
  renderWarning,
24
24
  terminalSupportsRawMode,
25
25
  underscore
26
- } from "./chunk-CK7MF3LY.js";
26
+ } from "./chunk-WAEWSGBK.js";
27
27
  import {
28
28
  require_lib
29
- } from "./chunk-I434ZJQI.js";
29
+ } from "./chunk-GEN4RXTD.js";
30
30
  import {
31
31
  cwd
32
- } from "./chunk-MHMFNQE3.js";
32
+ } from "./chunk-UNPXLODI.js";
33
33
  import {
34
34
  __toESM,
35
35
  init_cjs_shims
36
- } from "./chunk-M63RTPGR.js";
36
+ } from "./chunk-ZPL24Y2D.js";
37
37
 
38
38
  // ../cli-kit/src/public/node/base-command.ts
39
39
  init_cjs_shims();
@@ -97,6 +97,7 @@ var BaseCommand = class extends import_core.Command {
97
97
  return void 0;
98
98
  }
99
99
  async catch(error) {
100
+ error.skipOclifErrorHandling = true;
100
101
  await errorHandler(error, this.config);
101
102
  return import_core.Errors.handle(error);
102
103
  }
@@ -257,3 +258,4 @@ export {
257
258
  encodeToml,
258
259
  base_command_default
259
260
  };
261
+ //# sourceMappingURL=chunk-5X4QXYEZ.js.map
@@ -0,0 +1,73 @@
1
+ import {
2
+ execa,
3
+ outputContent,
4
+ outputDebug
5
+ } from "./chunk-WAEWSGBK.js";
6
+ import {
7
+ init_cjs_shims
8
+ } from "./chunk-ZPL24Y2D.js";
9
+
10
+ // ../cli-kit/src/public/node/os.ts
11
+ init_cjs_shims();
12
+ import { userInfo as osUserInfo } from "os";
13
+ async function username(platform = process.platform) {
14
+ outputDebug(outputContent`Obtaining user name...`);
15
+ const environmentVariable = getEnvironmentVariable();
16
+ if (environmentVariable) {
17
+ return environmentVariable;
18
+ }
19
+ const userInfoUsername = getUsernameFromOsUserInfo();
20
+ if (userInfoUsername) {
21
+ return userInfoUsername;
22
+ }
23
+ try {
24
+ if (platform === "win32") {
25
+ const { stdout } = await execa("whoami");
26
+ return cleanWindowsCommand(stdout);
27
+ }
28
+ const { stdout: userId } = await execa("id", ["-u"]);
29
+ try {
30
+ const { stdout } = await execa("id", ["-un", userId]);
31
+ return stdout;
32
+ } catch {
33
+ }
34
+ return makeUsernameFromId(userId);
35
+ } catch {
36
+ return null;
37
+ }
38
+ }
39
+ function platformAndArch(platform = process.platform, arch = process.arch) {
40
+ let archString;
41
+ if (arch === "x64") {
42
+ archString = "amd64";
43
+ } else if (arch === "ia32") {
44
+ archString = "386";
45
+ } else {
46
+ archString = arch;
47
+ }
48
+ const platformString = platform.match(/^win.+/) ? "windows" : platform;
49
+ return { platform: platformString, arch: archString };
50
+ }
51
+ function getEnvironmentVariable() {
52
+ const { env } = process;
53
+ return env.SUDO_USER || env.C9_USER || env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
54
+ }
55
+ function getUsernameFromOsUserInfo() {
56
+ try {
57
+ return osUserInfo().username;
58
+ } catch {
59
+ return null;
60
+ }
61
+ }
62
+ function cleanWindowsCommand(value) {
63
+ return value.replace(/^.*\\/, "");
64
+ }
65
+ function makeUsernameFromId(userId) {
66
+ return `no-username-${userId}`;
67
+ }
68
+
69
+ export {
70
+ username,
71
+ platformAndArch
72
+ };
73
+ //# sourceMappingURL=chunk-66NABVCG.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_cjs_shims
3
- } from "./chunk-M63RTPGR.js";
3
+ } from "./chunk-ZPL24Y2D.js";
4
4
 
5
5
  // ../../node_modules/.pnpm/zod@3.22.3/node_modules/zod/lib/index.mjs
6
6
  init_cjs_shims();
@@ -3726,3 +3726,4 @@ export {
3726
3726
  ZodOptional,
3727
3727
  z
3728
3728
  };
3729
+ //# sourceMappingURL=chunk-6UDFXWNE.js.map
@@ -7,10 +7,10 @@ import {
7
7
  renderSuccess,
8
8
  renderTable,
9
9
  renderWarning
10
- } from "./chunk-CK7MF3LY.js";
10
+ } from "./chunk-WAEWSGBK.js";
11
11
  import {
12
12
  init_cjs_shims
13
- } from "./chunk-M63RTPGR.js";
13
+ } from "./chunk-ZPL24Y2D.js";
14
14
 
15
15
  // src/cli/services/kitchen-sink/static.ts
16
16
  init_cjs_shims();
@@ -194,3 +194,4 @@ async function staticService() {
194
194
  export {
195
195
  staticService
196
196
  };
197
+ //# sourceMappingURL=chunk-7MXLRMOY.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  renderConcurrent,
3
3
  renderTasks
4
- } from "./chunk-CK7MF3LY.js";
4
+ } from "./chunk-WAEWSGBK.js";
5
5
  import {
6
6
  init_cjs_shims
7
- } from "./chunk-M63RTPGR.js";
7
+ } from "./chunk-ZPL24Y2D.js";
8
8
 
9
9
  // src/cli/services/kitchen-sink/async.ts
10
10
  init_cjs_shims();
@@ -59,3 +59,4 @@ async function asyncTasks() {
59
59
  export {
60
60
  asyncTasks
61
61
  };
62
+ //# sourceMappingURL=chunk-A5STII7T.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  platformAndArch
3
- } from "./chunk-OQBI57X3.js";
3
+ } from "./chunk-66NABVCG.js";
4
4
  import {
5
5
  getPackageManager,
6
6
  packageManagerFromUserAgent
7
- } from "./chunk-QDZF6IG4.js";
7
+ } from "./chunk-22PYIFA2.js";
8
8
  import {
9
9
  addPublicMetadata,
10
10
  addSensitiveMetadata,
@@ -12,13 +12,13 @@ import {
12
12
  cloudEnvironment,
13
13
  currentProcessIsGlobal,
14
14
  macAddress
15
- } from "./chunk-CK7MF3LY.js";
15
+ } from "./chunk-WAEWSGBK.js";
16
16
  import {
17
17
  cwd
18
- } from "./chunk-MHMFNQE3.js";
18
+ } from "./chunk-UNPXLODI.js";
19
19
  import {
20
20
  init_cjs_shims
21
- } from "./chunk-M63RTPGR.js";
21
+ } from "./chunk-ZPL24Y2D.js";
22
22
 
23
23
  // ../cli-kit/src/private/node/analytics.ts
24
24
  init_cjs_shims();
@@ -121,3 +121,4 @@ export {
121
121
  getEnvironmentData,
122
122
  getSensitiveEnvironmentData
123
123
  };
124
+ //# sourceMappingURL=chunk-ADESJ2KG.js.map
@@ -3,12 +3,12 @@ import {
3
3
  require_glob_parent,
4
4
  require_picomatch,
5
5
  require_utils
6
- } from "./chunk-RQ24VTW4.js";
6
+ } from "./chunk-VM4POVNV.js";
7
7
  import {
8
8
  __commonJS,
9
9
  __require,
10
10
  init_cjs_shims
11
- } from "./chunk-M63RTPGR.js";
11
+ } from "./chunk-ZPL24Y2D.js";
12
12
 
13
13
  // ../../node_modules/.pnpm/fast-glob@3.3.1/node_modules/fast-glob/out/utils/array.js
14
14
  var require_array = __commonJS({
@@ -2761,3 +2761,4 @@ queue-microtask/index.js:
2761
2761
  run-parallel/index.js:
2762
2762
  (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
2763
2763
  */
2764
+ //# sourceMappingURL=chunk-AMAYT2P2.js.map
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  init_cjs_shims
3
- } from "./chunk-M63RTPGR.js";
3
+ } from "./chunk-ZPL24Y2D.js";
4
4
 
5
5
  // ../cli-kit/src/public/common/version.ts
6
6
  init_cjs_shims();
7
- var CLI_KIT_VERSION = "3.61.2";
7
+ var CLI_KIT_VERSION = "3.62.0";
8
8
 
9
9
  export {
10
10
  CLI_KIT_VERSION
11
11
  };
12
+ //# sourceMappingURL=chunk-B62HZLMM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  z
3
- } from "./chunk-LAY4AEXX.js";
3
+ } from "./chunk-6UDFXWNE.js";
4
4
  import {
5
5
  AbortError,
6
6
  BugError,
@@ -17,10 +17,10 @@ import {
17
17
  renderTextPrompt,
18
18
  renderWarning,
19
19
  sleep
20
- } from "./chunk-CK7MF3LY.js";
20
+ } from "./chunk-WAEWSGBK.js";
21
21
  import {
22
22
  init_cjs_shims
23
- } from "./chunk-M63RTPGR.js";
23
+ } from "./chunk-ZPL24Y2D.js";
24
24
 
25
25
  // src/cli/services/demo.ts
26
26
  init_cjs_shims();
@@ -351,3 +351,4 @@ export {
351
351
  demoStepsSchema,
352
352
  demo
353
353
  };
354
+ //# sourceMappingURL=chunk-BMTG2VHL.js.map
@@ -2,7 +2,7 @@ import {
2
2
  __commonJS,
3
3
  __require,
4
4
  init_cjs_shims
5
- } from "./chunk-M63RTPGR.js";
5
+ } from "./chunk-ZPL24Y2D.js";
6
6
 
7
7
  // ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
8
8
  var require_ms = __commonJS({
@@ -776,3 +776,4 @@ export {
776
776
  require_supports_color,
777
777
  require_src
778
778
  };
779
+ //# sourceMappingURL=chunk-BYC3NA2Y.js.map
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  staticService
3
- } from "./chunk-QQP6JS5H.js";
3
+ } from "./chunk-7MXLRMOY.js";
4
4
  import {
5
5
  asyncTasks
6
- } from "./chunk-EHF6FVWH.js";
6
+ } from "./chunk-A5STII7T.js";
7
7
  import {
8
8
  prompts
9
- } from "./chunk-KBXWK6XB.js";
9
+ } from "./chunk-2ZSNH7CD.js";
10
10
  import {
11
11
  base_command_default
12
- } from "./chunk-G4EQLT5B.js";
12
+ } from "./chunk-5X4QXYEZ.js";
13
13
  import {
14
14
  init_cjs_shims
15
- } from "./chunk-M63RTPGR.js";
15
+ } from "./chunk-ZPL24Y2D.js";
16
16
 
17
17
  // src/cli/commands/kitchen-sink/index.ts
18
18
  init_cjs_shims();
@@ -36,3 +36,4 @@ var KitchenSinkAll = class extends base_command_default {
36
36
  export {
37
37
  KitchenSinkAll
38
38
  };
39
+ //# sourceMappingURL=chunk-BZFXXFUC.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  versionService
3
- } from "./chunk-YP5UVIUW.js";
3
+ } from "./chunk-CYQRKZVM.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-G4EQLT5B.js";
6
+ } from "./chunk-5X4QXYEZ.js";
7
7
  import {
8
8
  init_cjs_shims
9
- } from "./chunk-M63RTPGR.js";
9
+ } from "./chunk-ZPL24Y2D.js";
10
10
 
11
11
  // src/cli/commands/version.ts
12
12
  init_cjs_shims();
@@ -22,3 +22,4 @@ var Version = class extends base_command_default {
22
22
  export {
23
23
  Version
24
24
  };
25
+ //# sourceMappingURL=chunk-CKFE55FX.js.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  CLI_KIT_VERSION
3
- } from "./chunk-QTBH3GO6.js";
3
+ } from "./chunk-B62HZLMM.js";
4
4
  import {
5
5
  checkForNewVersion,
6
6
  packageManagerFromUserAgent
7
- } from "./chunk-QDZF6IG4.js";
7
+ } from "./chunk-22PYIFA2.js";
8
8
  import {
9
9
  getOutputUpdateCLIReminder,
10
10
  outputContent,
11
11
  outputInfo,
12
12
  outputToken
13
- } from "./chunk-CK7MF3LY.js";
13
+ } from "./chunk-WAEWSGBK.js";
14
14
  import {
15
15
  init_cjs_shims
16
- } from "./chunk-M63RTPGR.js";
16
+ } from "./chunk-ZPL24Y2D.js";
17
17
 
18
18
  // src/cli/services/commands/version.ts
19
19
  init_cjs_shims();
@@ -21,7 +21,7 @@ async function versionService() {
21
21
  const cliDependency = "@shopify/cli";
22
22
  const currentVersion = CLI_KIT_VERSION;
23
23
  outputInfo(outputContent`Current Shopify CLI version: ${outputToken.yellow(currentVersion)}`.value);
24
- const lastVersion = await checkForNewVersion(cliDependency, currentVersion);
24
+ const lastVersion = await checkForNewVersion(cliDependency, currentVersion, { cacheExpiryInHours: 24 });
25
25
  if (lastVersion) {
26
26
  const packageManager = packageManagerFromUserAgent();
27
27
  outputInfo(getOutputUpdateCLIReminder(packageManager, lastVersion));
@@ -31,3 +31,4 @@ async function versionService() {
31
31
  export {
32
32
  versionService
33
33
  };
34
+ //# sourceMappingURL=chunk-CYQRKZVM.js.map
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  __toESM,
5
5
  init_cjs_shims
6
- } from "./chunk-M63RTPGR.js";
6
+ } from "./chunk-ZPL24Y2D.js";
7
7
 
8
8
  // ../../node_modules/.pnpm/web-streams-polyfill@3.3.3/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js
9
9
  var require_ponyfill_es2018 = __commonJS({
@@ -4751,3 +4751,4 @@ fetch-blob/index.js:
4751
4751
  formdata-polyfill/esm.min.js:
4752
4752
  (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
4753
4753
  */
4754
+ //# sourceMappingURL=chunk-DL3MKXVR.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __commonJS,
3
3
  init_cjs_shims
4
- } from "./chunk-M63RTPGR.js";
4
+ } from "./chunk-ZPL24Y2D.js";
5
5
 
6
6
  // ../../node_modules/.pnpm/zod@3.22.3/node_modules/zod/lib/helpers/util.js
7
7
  var require_util = __commonJS({
@@ -5082,3 +5082,4 @@ var require_zod_to_json_schema = __commonJS({
5082
5082
  export {
5083
5083
  require_zod_to_json_schema
5084
5084
  };
5085
+ //# sourceMappingURL=chunk-DLK3F3DC.js.map