@shopify/cli 3.68.0 → 3.68.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 (81) hide show
  1. package/dist/{chunk-FIAUTHMT.js → chunk-3M35CLHM.js} +2 -2
  2. package/dist/{chunk-QIBFYG6F.js → chunk-3Q52FLVU.js} +3 -3
  3. package/dist/{chunk-DMM6NVLV.js → chunk-43SYBNY3.js} +4 -4
  4. package/dist/{chunk-JJOZP7G6.js → chunk-6H3CV7RL.js} +3 -3
  5. package/dist/{chunk-RUR45G5U.js → chunk-6MAEOVS3.js} +2 -2
  6. package/dist/{chunk-FKQTUQ3O.js → chunk-6RT7XCLB.js} +4 -4
  7. package/dist/{chunk-7PUJMPXN.js → chunk-6ZDQFSSJ.js} +5 -5
  8. package/dist/{chunk-C4FBYE7F.js → chunk-72AFLINH.js} +4 -4
  9. package/dist/{chunk-5VZ6BLBM.js → chunk-7MDO7W7X.js} +3 -3
  10. package/dist/{chunk-6IS7OFWG.js → chunk-7S76TS4X.js} +5 -5
  11. package/dist/{chunk-GDKBDEZV.js → chunk-BZ2F2UZZ.js} +3 -3
  12. package/dist/{chunk-WUA6LTEH.js → chunk-EPBXQ43B.js} +6 -6
  13. package/dist/{chunk-A3DV6VXO.js → chunk-GKSNOFYA.js} +2 -2
  14. package/dist/{chunk-E2OAY724.js → chunk-GLV27A4V.js} +2 -2
  15. package/dist/{chunk-INEJACZ7.js → chunk-HWFFJANJ.js} +3 -3
  16. package/dist/{chunk-YKH4ILAB.js → chunk-JEUAVIWO.js} +7 -7
  17. package/dist/{chunk-JR6ZN4TY.js → chunk-JF3XJON5.js} +4 -4
  18. package/dist/{chunk-G47SEBU3.js → chunk-M7RWRKXK.js} +3 -3
  19. package/dist/{chunk-EUBA2XGP.js → chunk-MS2XBA2O.js} +4 -4
  20. package/dist/{chunk-HTDUPJH5.js → chunk-N2B5M33U.js} +3 -3
  21. package/dist/{chunk-XCGES3AJ.js → chunk-NOB736ZC.js} +3 -3
  22. package/dist/{chunk-OBX5DIH4.js → chunk-NPVFC3AI.js} +4 -4
  23. package/dist/{chunk-DD5ULVKP.js → chunk-O2TXYCMU.js} +3 -3
  24. package/dist/{chunk-JAQZDU4S.js → chunk-QAP5YFY6.js} +2 -2
  25. package/dist/{chunk-ZJZ3SGOJ.js → chunk-QNE3KDXA.js} +2 -2
  26. package/dist/{chunk-UCYJX4VB.js → chunk-RUY5HVC5.js} +2 -2
  27. package/dist/{chunk-NCUKAORS.js → chunk-S3KCQ67R.js} +6 -6
  28. package/dist/{chunk-JAH3NBCG.js → chunk-SARPUMOJ.js} +4 -4
  29. package/dist/{chunk-IL455HI5.js → chunk-SFSTMK3J.js} +3 -3
  30. package/dist/{chunk-4H7GRGC6.js → chunk-V54N7BU5.js} +3 -3
  31. package/dist/{chunk-WJBW5QHV.js → chunk-X4VIZNM7.js} +2 -2
  32. package/dist/{chunk-VVY6VJR6.js → chunk-XPDRDFSD.js} +2 -2
  33. package/dist/{chunk-MXZ6B3TP.js → chunk-YESRKQ2L.js} +2 -2
  34. package/dist/{chunk-D72SCNZ2.js → chunk-YGWIVVUL.js} +3 -3
  35. package/dist/cli/commands/auth/logout.js +10 -10
  36. package/dist/cli/commands/auth/logout.test.js +11 -11
  37. package/dist/cli/commands/debug/command-flags.js +9 -9
  38. package/dist/cli/commands/demo/catalog.js +10 -10
  39. package/dist/cli/commands/demo/generate-file.js +10 -10
  40. package/dist/cli/commands/demo/index.js +10 -10
  41. package/dist/cli/commands/demo/print-ai-prompt.js +10 -10
  42. package/dist/cli/commands/docs/generate.js +9 -9
  43. package/dist/cli/commands/docs/generate.test.js +9 -9
  44. package/dist/cli/commands/help.js +9 -9
  45. package/dist/cli/commands/kitchen-sink/async.js +10 -10
  46. package/dist/cli/commands/kitchen-sink/async.test.js +10 -10
  47. package/dist/cli/commands/kitchen-sink/index.js +12 -12
  48. package/dist/cli/commands/kitchen-sink/index.test.js +12 -12
  49. package/dist/cli/commands/kitchen-sink/prompts.js +10 -10
  50. package/dist/cli/commands/kitchen-sink/prompts.test.js +10 -10
  51. package/dist/cli/commands/kitchen-sink/static.js +10 -10
  52. package/dist/cli/commands/kitchen-sink/static.test.js +10 -10
  53. package/dist/cli/commands/search.js +10 -10
  54. package/dist/cli/commands/upgrade.js +10 -10
  55. package/dist/cli/commands/version.js +10 -10
  56. package/dist/cli/commands/version.test.js +10 -10
  57. package/dist/cli/services/commands/search.js +2 -2
  58. package/dist/cli/services/commands/search.test.js +2 -2
  59. package/dist/cli/services/commands/version.js +3 -3
  60. package/dist/cli/services/commands/version.test.js +4 -4
  61. package/dist/cli/services/demo.js +2 -2
  62. package/dist/cli/services/demo.test.js +2 -2
  63. package/dist/cli/services/kitchen-sink/async.js +2 -2
  64. package/dist/cli/services/kitchen-sink/prompts.js +2 -2
  65. package/dist/cli/services/kitchen-sink/static.js +2 -2
  66. package/dist/cli/services/upgrade.js +3 -3
  67. package/dist/cli/services/upgrade.test.js +5 -5
  68. package/dist/{custom-oclif-loader-Y5TLP3GI.js → custom-oclif-loader-KLQXTO4F.js} +2 -2
  69. package/dist/{error-handler-EORUUIBK.js → error-handler-5FD7IHCB.js} +8 -8
  70. package/dist/hooks/postrun.js +6 -6
  71. package/dist/hooks/prerun.js +6 -6
  72. package/dist/index.js +141 -135
  73. package/dist/{local-4NQ3UGM2.js → local-LNHYBD2A.js} +2 -2
  74. package/dist/{node-NWOSUD3V.js → node-Y6VIULWD.js} +11 -11
  75. package/dist/{node-package-manager-D7JIOBLM.js → node-package-manager-6CQ6226U.js} +3 -3
  76. package/dist/{system-WDT2XUAD.js → system-LDMV4BPS.js} +2 -2
  77. package/dist/tsconfig.tsbuildinfo +1 -1
  78. package/dist/{ui-JUVEDXYN.js → ui-PA5ER7II.js} +2 -2
  79. package/dist/{workerd-VWTWLJIV.js → workerd-APENUASI.js} +11 -11
  80. package/oclif.manifest.json +1 -1
  81. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -123,7 +123,7 @@ import {
123
123
  unsetStorefront,
124
124
  waitForJob,
125
125
  writeDotEnv
126
- } from "./chunk-YKH4ILAB.js";
126
+ } from "./chunk-JEUAVIWO.js";
127
127
  import {
128
128
  require_lib as require_lib4
129
129
  } from "./chunk-NUP5TATA.js";
@@ -141,39 +141,39 @@ import {
141
141
  } from "./chunk-OXKHBIW7.js";
142
142
  import {
143
143
  KitchenSinkStatic
144
- } from "./chunk-QIBFYG6F.js";
144
+ } from "./chunk-3Q52FLVU.js";
145
145
  import {
146
146
  Search
147
- } from "./chunk-G47SEBU3.js";
147
+ } from "./chunk-M7RWRKXK.js";
148
148
  import {
149
149
  Upgrade
150
- } from "./chunk-C4FBYE7F.js";
150
+ } from "./chunk-72AFLINH.js";
151
151
  import {
152
152
  getOutputUpdateCLIReminder
153
- } from "./chunk-JJOZP7G6.js";
153
+ } from "./chunk-6H3CV7RL.js";
154
154
  import {
155
155
  Version
156
- } from "./chunk-IL455HI5.js";
157
- import "./chunk-XCGES3AJ.js";
158
- import "./chunk-MXZ6B3TP.js";
156
+ } from "./chunk-SFSTMK3J.js";
157
+ import "./chunk-NOB736ZC.js";
158
+ import "./chunk-YESRKQ2L.js";
159
159
  import {
160
160
  HelpCommand
161
- } from "./chunk-VVY6VJR6.js";
161
+ } from "./chunk-XPDRDFSD.js";
162
162
  import {
163
163
  KitchenSinkAsync
164
- } from "./chunk-HTDUPJH5.js";
164
+ } from "./chunk-N2B5M33U.js";
165
165
  import {
166
166
  KitchenSinkAll
167
- } from "./chunk-6IS7OFWG.js";
168
- import "./chunk-ZJZ3SGOJ.js";
169
- import "./chunk-UCYJX4VB.js";
167
+ } from "./chunk-7S76TS4X.js";
168
+ import "./chunk-QNE3KDXA.js";
169
+ import "./chunk-RUY5HVC5.js";
170
170
  import {
171
171
  KitchenSinkPrompts
172
- } from "./chunk-4H7GRGC6.js";
173
- import "./chunk-E2OAY724.js";
172
+ } from "./chunk-V54N7BU5.js";
173
+ import "./chunk-GLV27A4V.js";
174
174
  import {
175
175
  Logout
176
- } from "./chunk-JAH3NBCG.js";
176
+ } from "./chunk-SARPUMOJ.js";
177
177
  import {
178
178
  ensureAuthenticatedAdmin,
179
179
  ensureAuthenticatedAppManagement,
@@ -181,32 +181,32 @@ import {
181
181
  ensureAuthenticatedPartners,
182
182
  ensureAuthenticatedStorefront,
183
183
  ensureAuthenticatedThemes
184
- } from "./chunk-DD5ULVKP.js";
184
+ } from "./chunk-O2TXYCMU.js";
185
185
  import {
186
186
  CommandFlags
187
- } from "./chunk-GDKBDEZV.js";
187
+ } from "./chunk-BZ2F2UZZ.js";
188
188
  import {
189
189
  Catalog
190
- } from "./chunk-OBX5DIH4.js";
190
+ } from "./chunk-NPVFC3AI.js";
191
191
  import {
192
192
  GenerateFile
193
- } from "./chunk-FKQTUQ3O.js";
193
+ } from "./chunk-6RT7XCLB.js";
194
194
  import {
195
195
  Demo
196
- } from "./chunk-JR6ZN4TY.js";
196
+ } from "./chunk-JF3XJON5.js";
197
197
  import {
198
198
  PrintAIPrompt
199
- } from "./chunk-DMM6NVLV.js";
199
+ } from "./chunk-43SYBNY3.js";
200
200
  import "./chunk-QSUS3GJF.js";
201
- import "./chunk-WJBW5QHV.js";
201
+ import "./chunk-X4VIZNM7.js";
202
202
  import {
203
203
  DocsGenerate
204
- } from "./chunk-5VZ6BLBM.js";
204
+ } from "./chunk-7MDO7W7X.js";
205
205
  import {
206
206
  base_command_default,
207
207
  decodeToml,
208
208
  encodeToml
209
- } from "./chunk-EUBA2XGP.js";
209
+ } from "./chunk-MS2XBA2O.js";
210
210
  import {
211
211
  require_byline,
212
212
  require_end_of_stream,
@@ -214,14 +214,14 @@ import {
214
214
  require_iserror,
215
215
  require_pump,
216
216
  require_stack_generator
217
- } from "./chunk-NCUKAORS.js";
217
+ } from "./chunk-S3KCQ67R.js";
218
218
  import {
219
219
  execCLI2,
220
220
  fanoutHooks,
221
221
  getListOfTunnelPlugins,
222
222
  reportAnalyticsEvent,
223
223
  version
224
- } from "./chunk-WUA6LTEH.js";
224
+ } from "./chunk-EPBXQ43B.js";
225
225
  import {
226
226
  ClientError,
227
227
  FetchError,
@@ -254,12 +254,12 @@ import {
254
254
  restRequestHeaders,
255
255
  restRequestUrl,
256
256
  setNextDeprecationDate
257
- } from "./chunk-7PUJMPXN.js";
257
+ } from "./chunk-6ZDQFSSJ.js";
258
258
  import "./chunk-VSLR7ET4.js";
259
259
  import {
260
260
  platformAndArch,
261
261
  username
262
- } from "./chunk-JAQZDU4S.js";
262
+ } from "./chunk-QAP5YFY6.js";
263
263
  import {
264
264
  LocalStorage,
265
265
  UnknownPackageManagerError,
@@ -281,7 +281,7 @@ import {
281
281
  usesWorkspaces,
282
282
  versionSatisfies,
283
283
  writePackageJSON
284
- } from "./chunk-RUR45G5U.js";
284
+ } from "./chunk-6MAEOVS3.js";
285
285
  import {
286
286
  require_semver
287
287
  } from "./chunk-BYPQXSAL.js";
@@ -290,7 +290,7 @@ import {
290
290
  } from "./chunk-O5K4AU7Q.js";
291
291
  import {
292
292
  CLI_KIT_VERSION
293
- } from "./chunk-A3DV6VXO.js";
293
+ } from "./chunk-GKSNOFYA.js";
294
294
  import {
295
295
  deepStrict,
296
296
  errorsToString,
@@ -472,7 +472,7 @@ import {
472
472
  use_stdin_default,
473
473
  writeFile,
474
474
  writeFileSync
475
- } from "./chunk-D72SCNZ2.js";
475
+ } from "./chunk-YGWIVVUL.js";
476
476
  import {
477
477
  require_signal_exit
478
478
  } from "./chunk-QETDXAFX.js";
@@ -144610,7 +144610,7 @@ import { fileURLToPath } from "url";
144610
144610
  async function warnIfOldNodeVersion() {
144611
144611
  let nodeVersion = process.versions.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
144612
144612
  if (nodeMajorVersion < 18) {
144613
- let { renderWarning: renderWarning2 } = await import("./ui-JUVEDXYN.js");
144613
+ let { renderWarning: renderWarning2 } = await import("./ui-PA5ER7II.js");
144614
144614
  renderWarning2({
144615
144615
  headline: "Upgrade to a supported Node version now.",
144616
144616
  body: [
@@ -144635,7 +144635,7 @@ function forceNoColor() {
144635
144635
  }
144636
144636
  async function runCLI(options) {
144637
144637
  setupEnvironmentVariables(options), forceNoColor(), await warnIfOldNodeVersion();
144638
- let { errorHandler: errorHandler2 } = await import("./error-handler-EORUUIBK.js"), { isDevelopment } = await import("./local-4NQ3UGM2.js"), oclif = await import("./lib-4WCTNKJK.js"), { ShopifyConfig } = await import("./custom-oclif-loader-Y5TLP3GI.js");
144638
+ let { errorHandler: errorHandler2 } = await import("./error-handler-5FD7IHCB.js"), { isDevelopment } = await import("./local-LNHYBD2A.js"), oclif = await import("./lib-4WCTNKJK.js"), { ShopifyConfig } = await import("./custom-oclif-loader-KLQXTO4F.js");
144639
144639
  isDevelopment() && (oclif.default.settings.debug = !0);
144640
144640
  try {
144641
144641
  let config2 = new ShopifyConfig({ root: fileURLToPath(options.moduleURL) });
@@ -144645,7 +144645,7 @@ async function runCLI(options) {
144645
144645
  }
144646
144646
  }
144647
144647
  async function useLocalCLIIfDetected(filepath) {
144648
- let { environmentVariables } = await import("./constants-TR6ABVLJ.js"), { joinPath: join6 } = await import("./path-T2RCZTRE.js"), { exec: exec2 } = await import("./system-WDT2XUAD.js");
144648
+ let { environmentVariables } = await import("./constants-TR6ABVLJ.js"), { joinPath: join6 } = await import("./path-T2RCZTRE.js"), { exec: exec2 } = await import("./system-LDMV4BPS.js");
144649
144649
  if (!isTruthy(process.env[environmentVariables.enableCliRedirect]) || isTruthy(process.env[environmentVariables.skipCliRedirect]) || process.env.npm_config_user_agent)
144650
144650
  return !1;
144651
144651
  let cliPackage = await localCliPackage();
@@ -144665,7 +144665,7 @@ async function useLocalCLIIfDetected(filepath) {
144665
144665
  return !0;
144666
144666
  }
144667
144667
  async function localCliPackage() {
144668
- let { captureOutput } = await import("./system-WDT2XUAD.js"), npmListOutput = "", localShopifyCLI = {};
144668
+ let { captureOutput } = await import("./system-LDMV4BPS.js"), npmListOutput = "", localShopifyCLI = {};
144669
144669
  try {
144670
144670
  npmListOutput = await captureOutput("npm", ["list", "@shopify/cli", "--json", "-l"]), localShopifyCLI = JSON.parse(npmListOutput);
144671
144671
  } catch {
@@ -144824,35 +144824,45 @@ function setThemeStore(store) {
144824
144824
  themeLocalStorage().set("themeStore", store);
144825
144825
  }
144826
144826
  function getDevelopmentTheme() {
144827
- return outputDebug(outputContent`Getting development theme...`), developmentThemeLocalStorage().get(getThemeStore());
144827
+ return outputDebug(outputContent`Getting development theme...`), developmentThemeLocalStorage().get(requireThemeStore());
144828
144828
  }
144829
144829
  function setDevelopmentTheme(theme) {
144830
- outputDebug(outputContent`Setting development theme...`), developmentThemeLocalStorage().set(getThemeStore(), theme);
144830
+ outputDebug(outputContent`Setting development theme...`), developmentThemeLocalStorage().set(requireThemeStore(), theme);
144831
144831
  }
144832
144832
  function removeDevelopmentTheme() {
144833
- outputDebug(outputContent`Removing development theme...`), developmentThemeLocalStorage().delete(getThemeStore());
144833
+ outputDebug(outputContent`Removing development theme...`), developmentThemeLocalStorage().delete(requireThemeStore());
144834
144834
  }
144835
144835
  function getREPLTheme() {
144836
- return outputDebug(outputContent`Getting REPL theme...`), replThemeLocalStorage().get(getThemeStore());
144836
+ return outputDebug(outputContent`Getting REPL theme...`), replThemeLocalStorage().get(requireThemeStore());
144837
144837
  }
144838
144838
  function setREPLTheme(theme) {
144839
- outputDebug(outputContent`Setting REPL theme to ${theme}...`), replThemeLocalStorage().set(getThemeStore(), theme);
144839
+ outputDebug(outputContent`Setting REPL theme to ${theme}...`), replThemeLocalStorage().set(requireThemeStore(), theme);
144840
144840
  }
144841
144841
  function removeREPLTheme() {
144842
- outputDebug(outputContent`Removing REPL theme...`), replThemeLocalStorage().delete(getThemeStore());
144842
+ outputDebug(outputContent`Removing REPL theme...`), replThemeLocalStorage().delete(requireThemeStore());
144843
144843
  }
144844
144844
  function getStorefrontPassword() {
144845
- let themeStore = getThemeStore();
144846
- return outputDebug(outputContent`Getting storefront password for shop ${themeStore}...`), themeStorePasswordStorage().get(getThemeStore());
144845
+ let themeStore = requireThemeStore();
144846
+ return outputDebug(outputContent`Getting storefront password for shop ${themeStore}...`), themeStorePasswordStorage().get(themeStore);
144847
144847
  }
144848
144848
  function setStorefrontPassword(password) {
144849
- let themeStore = getThemeStore();
144849
+ let themeStore = requireThemeStore();
144850
144850
  outputDebug(outputContent`Setting storefront password for shop ${themeStore}...`), themeStorePasswordStorage().set(themeStore, password);
144851
144851
  }
144852
144852
  function removeStorefrontPassword() {
144853
- let themeStore = getThemeStore();
144853
+ let themeStore = requireThemeStore();
144854
144854
  outputDebug(outputContent`Removing storefront password for ${themeStore}...`), themeStorePasswordStorage().delete(themeStore);
144855
144855
  }
144856
+ function requireThemeStore() {
144857
+ let themeStore = getThemeStore();
144858
+ if (!themeStore)
144859
+ throw new BugError("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.", [
144860
+ "It may be possible to recover by running",
144861
+ { command: "shopify theme list --store <store>" },
144862
+ "(setting the store flag to the store you wish to use) and then running the command again."
144863
+ ]);
144864
+ return themeStore;
144865
+ }
144856
144866
 
144857
144867
  // ../theme/dist/cli/utilities/theme-store.js
144858
144868
  function ensureThemeStore(flags) {
@@ -147074,7 +147084,11 @@ async function getPatternsFromShopifyIgnore(root) {
147074
147084
  return await fileExists(shopifyIgnorePath) ? (await readFile(shopifyIgnorePath, { encoding: "utf8" })).split(/(\r\n|\r|\n)/).map((line) => line.trim()).filter((line) => line && !line.startsWith("#")) : [];
147075
147085
  }
147076
147086
  function matchGlob2(key, pattern) {
147077
- return matchGlob(key, pattern) ? !0 : shouldReplaceGlobPattern(pattern) ? matchGlob(key, pattern.replace("/*.", "/**/*.")) : !1;
147087
+ let matchOpts = {
147088
+ matchBase: !0,
147089
+ noglobstar: !0
147090
+ };
147091
+ return matchGlob(key, pattern, matchOpts) ? !0 : shouldReplaceGlobPattern(pattern) ? matchGlob(key, pattern.replace("/*.", "/**/*."), matchOpts) : !1;
147078
147092
  }
147079
147093
  function raiseWarningForNonExplicitGlobPatterns(patterns) {
147080
147094
  new Set(patterns).forEach((pattern) => {
@@ -147862,7 +147876,7 @@ function hotReloadScript() {
147862
147876
 
147863
147877
  // ../theme/dist/cli/utilities/theme-environment/proxy.js
147864
147878
  init_cjs_shims();
147865
- var VANITY_CDN_PREFIX = "/cdn/", EXTENSION_CDN_PREFIX = "/ext/cdn/", IGNORED_ENDPOINTS = [
147879
+ var CART_PREFIX = "/cart/", VANITY_CDN_PREFIX = "/cdn/", EXTENSION_CDN_PREFIX = "/ext/cdn/", IGNORED_ENDPOINTS = [
147866
147880
  "/.well-known",
147867
147881
  "/shopify/monorail",
147868
147882
  "/mini-profiler-resources",
@@ -147879,7 +147893,7 @@ function getProxyHandler(_theme, ctx) {
147879
147893
  });
147880
147894
  }
147881
147895
  function canProxyRequest(event) {
147882
- if (event.method !== "GET" || event.path.startsWith(VANITY_CDN_PREFIX) || event.path.startsWith(EXTENSION_CDN_PREFIX))
147896
+ if (event.method !== "GET" || event.path.startsWith(CART_PREFIX) || event.path.startsWith(VANITY_CDN_PREFIX) || event.path.startsWith(EXTENSION_CDN_PREFIX))
147883
147897
  return !0;
147884
147898
  let [pathname] = event.path.split("?"), extension = extname(pathname), acceptsType = event.headers.get("accept") ?? "*/*";
147885
147899
  return extension === ".html" || acceptsType.includes("text/html") ? !1 : !!extension || acceptsType !== "*/*";
@@ -147966,7 +147980,14 @@ function proxyStorefrontRequest(event, ctx) {
147966
147980
  // Important to return 3xx responses to the client
147967
147981
  redirect: "manual"
147968
147982
  },
147969
- onResponse: patchProxiedResponseHeaders.bind(null, ctx)
147983
+ async onResponse(event2, response) {
147984
+ patchProxiedResponseHeaders(ctx, event2, response);
147985
+ let fileName = url.pathname.split("/").at(-1);
147986
+ if (ctx.localThemeFileSystem.files.has(`assets/${fileName}.liquid`)) {
147987
+ let body2 = await response.text();
147988
+ await send(event2, injectCdnProxy(body2, ctx));
147989
+ }
147990
+ }
147970
147991
  }).catch(async (error) => {
147971
147992
  let pathname = event.path.split("?")[0];
147972
147993
  if (error.statusCode >= 500 && !pathname.endsWith(".js.map")) {
@@ -147980,9 +148001,6 @@ function proxyStorefrontRequest(event, ctx) {
147980
148001
  });
147981
148002
  }
147982
148003
 
147983
- // ../theme/dist/cli/utilities/theme-environment/html.js
147984
- init_cjs_shims();
147985
-
147986
148004
  // ../theme/dist/cli/utilities/theme-ext-environment/theme-ext-server.js
147987
148005
  init_cjs_shims();
147988
148006
 
@@ -148057,6 +148075,67 @@ function mountThemeExtensionFileSystem(root) {
148057
148075
  };
148058
148076
  }
148059
148077
 
148078
+ // ../theme/dist/cli/utilities/theme-environment/html.js
148079
+ init_cjs_shims();
148080
+ function getHtmlHandler(theme, ctx) {
148081
+ return defineEventHandler((event) => {
148082
+ outputInfo(`${event.method} ${event.path}`);
148083
+ let [browserPathname = "/", browserSearch = ""] = event.path.split("?");
148084
+ return render2(ctx.session, {
148085
+ method: event.method,
148086
+ path: browserPathname,
148087
+ query: [...new URLSearchParams(browserSearch)],
148088
+ themeId: String(theme.id),
148089
+ sectionId: "",
148090
+ headers: getProxyStorefrontHeaders(event),
148091
+ replaceExtensionTemplates: getExtensionInMemoryTemplates(ctx),
148092
+ replaceTemplates: getInMemoryTemplates(ctx, browserPathname, getCookie2(event, "localization")?.toLowerCase())
148093
+ }).then(async (response) => {
148094
+ let html = await patchRenderingResponse(ctx, event, response);
148095
+ return assertThemeId(response, html, String(theme.id)), ctx.options.liveReload !== "off" && (html = injectHotReloadScript(html)), html;
148096
+ }).catch(async (error) => {
148097
+ let headline = `Failed to render storefront with status ${error.statusCode} (${error.statusMessage}).`;
148098
+ error.data?.requestId && (headline += `
148099
+ Request ID: ${error.data.requestId}`), error.data?.url && (headline += `
148100
+ URL: ${error.data.url}`);
148101
+ let cause = error.cause;
148102
+ renderError({ headline, body: cause?.stack ?? error.stack ?? error.message }), setResponseStatus(event, error.statusCode ?? 502, error.statusMessage), setResponseHeader(event, "Content-Type", "text/html");
148103
+ let [title, ...rest] = headline.split(`
148104
+ `), errorPageHtml = getErrorPage({
148105
+ title,
148106
+ header: title,
148107
+ message: [...rest, cause?.message ?? error.message].join("<br>"),
148108
+ code: error.stack?.replace(`${error.message}
148109
+ `, "") ?? ""
148110
+ });
148111
+ return ctx.options.liveReload !== "off" && (errorPageHtml = injectHotReloadScript(errorPageHtml)), errorPageHtml;
148112
+ });
148113
+ });
148114
+ }
148115
+ function getErrorPage(options) {
148116
+ return (0, String.raw)`<html>
148117
+ <head>
148118
+ <title>${options.title ?? "Unknown error"}</title>
148119
+ </head>
148120
+ <body
148121
+ id="full-error-page"
148122
+ style="display: flex; flex-direction: column; align-items: center; padding-top: 20px; font-family: Arial"
148123
+ >
148124
+ <h2>${options.header}</h2>
148125
+ <p>${options.message}</p>
148126
+ <pre>${options.code}</pre>
148127
+ </body>
148128
+ </html>`;
148129
+ }
148130
+ function assertThemeId(response, html, expectedThemeId) {
148131
+ let obtainedThemeId = html.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];
148132
+ obtainedThemeId && obtainedThemeId !== expectedThemeId && (renderFatalError(new AbortError(`Theme ID mismatch: expected ${expectedThemeId} but got ${obtainedThemeId}.
148133
+ Request ID: ${response.headers.get("x-request-id")}
148134
+ URL: ${response.url}`, `This is likely related to an issue in upstream Shopify APIs.
148135
+ Please try again in a few minutes and report this issue:
148136
+ https://github.com/Shopify/cli/issues/new?template=bug-report.yml`)), process.exit(1));
148137
+ }
148138
+
148060
148139
  // ../theme/dist/cli/utilities/theme-environment/local-assets.js
148061
148140
  init_cjs_shims();
148062
148141
  function getAssetsHandler(_theme, ctx) {
@@ -148189,80 +148268,6 @@ function getExtensionInMemoryTemplates(ctx) {
148189
148268
  return replaceExtTemplates;
148190
148269
  }
148191
148270
 
148192
- // ../theme/dist/cli/utilities/theme-environment/html.js
148193
- function getHtmlHandler(theme, ctx) {
148194
- return defineEventHandler((event) => {
148195
- outputInfo(`${event.method} ${event.path}`);
148196
- let [browserPathname = "/", browserSearch = ""] = event.path.split("?");
148197
- return render2(ctx.session, {
148198
- method: event.method,
148199
- path: browserPathname,
148200
- query: [...new URLSearchParams(browserSearch)],
148201
- themeId: String(theme.id),
148202
- sectionId: "",
148203
- headers: getProxyStorefrontHeaders(event),
148204
- replaceExtensionTemplates: getExtensionInMemoryTemplates(ctx),
148205
- replaceTemplates: getInMemoryTemplates(ctx, browserPathname, getCookie2(event, "localization")?.toLowerCase())
148206
- }).then(async (response) => {
148207
- let html = await patchRenderingResponse(ctx, event, response);
148208
- return html = prettifySyntaxErrors(html), assertThemeId(response, html, String(theme.id)), ctx.options.liveReload !== "off" && (html = injectHotReloadScript(html)), html;
148209
- }).catch(async (error) => {
148210
- let headline = `Failed to render storefront with status ${error.statusCode} (${error.statusMessage}).`;
148211
- error.data?.requestId && (headline += `
148212
- Request ID: ${error.data.requestId}`), error.data?.url && (headline += `
148213
- URL: ${error.data.url}`);
148214
- let cause = error.cause;
148215
- renderError({ headline, body: cause?.stack ?? error.stack ?? error.message }), setResponseStatus(event, error.statusCode ?? 502, error.statusMessage), setResponseHeader(event, "Content-Type", "text/html");
148216
- let [title, ...rest] = headline.split(`
148217
- `), errorPageHtml = getErrorPage({
148218
- title,
148219
- header: title,
148220
- message: [...rest, cause?.message ?? error.message].join("<br>"),
148221
- code: error.stack?.replace(`${error.message}
148222
- `, "") ?? ""
148223
- });
148224
- return ctx.options.liveReload !== "off" && (errorPageHtml = injectHotReloadScript(errorPageHtml)), errorPageHtml;
148225
- });
148226
- });
148227
- }
148228
- function prettifySyntaxErrors(html) {
148229
- return html.replace(/Liquid(?: syntax)? error \([^\n]+(?:\n|<)/g, getErrorSection);
148230
- }
148231
- function getErrorSection(error) {
148232
- let html = String.raw, color = "orangered";
148233
- return html`
148234
- <div
148235
- id="section-error"
148236
- style="border: solid thick ${color}; background: color(from ${color} srgb r g b / 0.2); padding: 20px;"
148237
- >
148238
- <pre>${error}</pre>
148239
- </div>
148240
- `;
148241
- }
148242
- function getErrorPage(options) {
148243
- return (0, String.raw)`<html>
148244
- <head>
148245
- <title>${options.title ?? "Unknown error"}</title>
148246
- </head>
148247
- <body
148248
- id="full-error-page"
148249
- style="display: flex; flex-direction: column; align-items: center; padding-top: 20px; font-family: Arial"
148250
- >
148251
- <h2>${options.header}</h2>
148252
- <p>${options.message}</p>
148253
- <pre>${options.code}</pre>
148254
- </body>
148255
- </html>`;
148256
- }
148257
- function assertThemeId(response, html, expectedThemeId) {
148258
- let obtainedThemeId = html.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];
148259
- obtainedThemeId && obtainedThemeId !== expectedThemeId && (renderFatalError(new AbortError(`Theme ID mismatch: expected ${expectedThemeId} but got ${obtainedThemeId}.
148260
- Request ID: ${response.headers.get("x-request-id")}
148261
- URL: ${response.url}`, `This is likely related to an issue in upstream Shopify APIs.
148262
- Please try again in a few minutes and report this issue:
148263
- https://github.com/Shopify/cli/issues/new?template=bug-report.yml`)), process.exit(1));
148264
- }
148265
-
148266
148271
  // ../theme/dist/cli/utilities/theme-environment/hot-reload/server.js
148267
148272
  var import_theme_check_node3 = __toESM(require_dist5(), 1);
148268
148273
  import EventEmitter3 from "node:events";
@@ -148370,8 +148375,7 @@ function getHotReloadHandler(theme, ctx) {
148370
148375
  statusText: response.statusText,
148371
148376
  data: { requestId: response.headers.get("x-request-id"), url: response.url }
148372
148377
  });
148373
- let html = await patchRenderingResponse(ctx, event, response);
148374
- return prettifySyntaxErrors(html);
148378
+ return patchRenderingResponse(ctx, event, response);
148375
148379
  }).catch(async (error) => {
148376
148380
  let headline = `Failed to render section on Hot Reload with status ${error.statusCode} (${error.statusMessage}).`;
148377
148381
  error.data?.requestId && (headline += `
@@ -148638,7 +148642,9 @@ function createIntervalTask({ promise, titleGetter, timeout }) {
148638
148642
  function buildDeleteJob(remoteChecksums, themeFileSystem, theme, session, options) {
148639
148643
  if (options.nodelete)
148640
148644
  return { progress: { current: 0, total: 0 }, promise: Promise.resolve() };
148641
- let remoteFilesToBeDeleted = getRemoteFilesToBeDeleted(remoteChecksums, themeFileSystem), orderedFiles = orderFilesToBeDeleted(remoteFilesToBeDeleted), progress = { current: 0, total: orderedFiles.length }, promise = Promise.all(orderedFiles.map((file) => deleteThemeAsset(theme.id, file.key, session).then(() => {
148645
+ let remoteFilesToBeDeleted = getRemoteFilesToBeDeleted(remoteChecksums, themeFileSystem), orderedFiles = orderFilesToBeDeleted(remoteFilesToBeDeleted), progress = { current: 0, total: orderedFiles.length }, promise = Promise.all(orderedFiles.map((file) => deleteThemeAsset(theme.id, file.key, session).catch((error) => {
148646
+ renderError({ headline: `Failed to delete file "${file.key}" from remote theme.`, body: error.message });
148647
+ }).finally(() => {
148642
148648
  progress.current++;
148643
148649
  }))).then(() => {
148644
148650
  progress.current = progress.total;
@@ -149703,7 +149709,7 @@ function buildDeleteTasks(remoteChecksums, themeFileSystem, options) {
149703
149709
  if (options.nodelete)
149704
149710
  return [];
149705
149711
  let remoteKeys = new Set(remoteChecksums.map((checksum) => checksum.key));
149706
- return Array.from(themeFileSystem.files.keys()).filter((key) => !remoteKeys.has(key)).map((key) => ({
149712
+ return themeFileSystem.applyIgnoreFilters([...themeFileSystem.files.values()]).map(({ key }) => key).filter((key) => !remoteKeys.has(key)).map((key) => ({
149707
149713
  title: `Cleaning your local directory (removing ${key})`,
149708
149714
  task: async () => themeFileSystem.delete(key)
149709
149715
  }));
@@ -153880,10 +153886,10 @@ async function buildAssetsUrl(port, root) {
153880
153886
  async function startMiniOxygen(options, useNodeRuntime = !1) {
153881
153887
  if (useNodeRuntime) {
153882
153888
  process.env.MINIFLARE_SUBREQUEST_LIMIT = 100;
153883
- let { startNodeServer } = await import("./node-NWOSUD3V.js");
153889
+ let { startNodeServer } = await import("./node-Y6VIULWD.js");
153884
153890
  return startNodeServer(options);
153885
153891
  }
153886
- let { startWorkerdServer } = await import("./workerd-VWTWLJIV.js");
153892
+ let { startWorkerdServer } = await import("./workerd-APENUASI.js");
153887
153893
  return startWorkerdServer(options);
153888
153894
  }
153889
153895
 
@@ -161110,7 +161116,7 @@ function setCachedAppInfo(options, config2 = appLocalStorage()) {
161110
161116
  }
161111
161117
  function clearCurrentConfigFile(directory, config2 = appLocalStorage()) {
161112
161118
  let normalized = normalizePath(directory), savedApp = config2.get(normalized);
161113
- config2.set(normalized, {
161119
+ savedApp && config2.set(normalized, {
161114
161120
  ...savedApp,
161115
161121
  configFile: void 0
161116
161122
  });
@@ -173773,7 +173779,7 @@ init_cjs_shims();
173773
173779
  // ../plugin-did-you-mean/dist/services/conf.js
173774
173780
  init_cjs_shims();
173775
173781
  function isAutocorrectEnabled(conf = getConfig2()) {
173776
- return conf.get("autocorrectEnabled");
173782
+ return !!conf.get("autocorrectEnabled");
173777
173783
  }
173778
173784
  function setAutocorrect(value, conf = getConfig2()) {
173779
173785
  conf.set("autocorrectEnabled", value);
@@ -22,7 +22,7 @@ import {
22
22
  useDeviceAuth,
23
23
  useEmbeddedThemeCLI,
24
24
  useThemebundling
25
- } from "./chunk-D72SCNZ2.js";
25
+ } from "./chunk-YGWIVVUL.js";
26
26
  import "./chunk-QETDXAFX.js";
27
27
  import "./chunk-NZDBLGNM.js";
28
28
  import "./chunk-BFQFJ7IZ.js";
@@ -64,4 +64,4 @@ export {
64
64
  useEmbeddedThemeCLI,
65
65
  useThemebundling
66
66
  };
67
- //# sourceMappingURL=local-4NQ3UGM2.js.map
67
+ //# sourceMappingURL=local-LNHYBD2A.js.map
@@ -12,18 +12,18 @@ import {
12
12
  importLocal,
13
13
  logRequestLine,
14
14
  setConstructors
15
- } from "./chunk-YKH4ILAB.js";
16
- import "./chunk-DD5ULVKP.js";
17
- import "./chunk-EUBA2XGP.js";
18
- import "./chunk-NCUKAORS.js";
19
- import "./chunk-WUA6LTEH.js";
20
- import "./chunk-7PUJMPXN.js";
15
+ } from "./chunk-JEUAVIWO.js";
16
+ import "./chunk-O2TXYCMU.js";
17
+ import "./chunk-MS2XBA2O.js";
18
+ import "./chunk-S3KCQ67R.js";
19
+ import "./chunk-EPBXQ43B.js";
20
+ import "./chunk-6ZDQFSSJ.js";
21
21
  import "./chunk-VSLR7ET4.js";
22
- import "./chunk-JAQZDU4S.js";
23
- import "./chunk-RUR45G5U.js";
22
+ import "./chunk-QAP5YFY6.js";
23
+ import "./chunk-6MAEOVS3.js";
24
24
  import "./chunk-BYPQXSAL.js";
25
25
  import "./chunk-O5K4AU7Q.js";
26
- import "./chunk-A3DV6VXO.js";
26
+ import "./chunk-GKSNOFYA.js";
27
27
  import "./chunk-NLUGD7PZ.js";
28
28
  import {
29
29
  AbortError,
@@ -31,7 +31,7 @@ import {
31
31
  readFile,
32
32
  renderSuccess,
33
33
  source_default
34
- } from "./chunk-D72SCNZ2.js";
34
+ } from "./chunk-YGWIVVUL.js";
35
35
  import "./chunk-QETDXAFX.js";
36
36
  import "./chunk-NZDBLGNM.js";
37
37
  import "./chunk-BFQFJ7IZ.js";
@@ -164,4 +164,4 @@ async function startNodeServer({
164
164
  export {
165
165
  startNodeServer
166
166
  };
167
- //# sourceMappingURL=node-NWOSUD3V.js.map
167
+ //# sourceMappingURL=node-Y6VIULWD.js.map
@@ -28,9 +28,9 @@ import {
28
28
  versionSatisfies,
29
29
  writePackageJSON,
30
30
  yarnLockfile
31
- } from "./chunk-RUR45G5U.js";
31
+ } from "./chunk-6MAEOVS3.js";
32
32
  import "./chunk-BYPQXSAL.js";
33
- import "./chunk-D72SCNZ2.js";
33
+ import "./chunk-YGWIVVUL.js";
34
34
  import "./chunk-QETDXAFX.js";
35
35
  import "./chunk-NZDBLGNM.js";
36
36
  import "./chunk-BFQFJ7IZ.js";
@@ -78,4 +78,4 @@ export {
78
78
  writePackageJSON,
79
79
  yarnLockfile
80
80
  };
81
- //# sourceMappingURL=node-package-manager-D7JIOBLM.js.map
81
+ //# sourceMappingURL=node-package-manager-6CQ6226U.js.map
@@ -4,7 +4,7 @@ import {
4
4
  openURL,
5
5
  sleep,
6
6
  terminalSupportsPrompting
7
- } from "./chunk-D72SCNZ2.js";
7
+ } from "./chunk-YGWIVVUL.js";
8
8
  import "./chunk-QETDXAFX.js";
9
9
  import "./chunk-NZDBLGNM.js";
10
10
  import "./chunk-BFQFJ7IZ.js";
@@ -28,4 +28,4 @@ export {
28
28
  sleep,
29
29
  terminalSupportsPrompting
30
30
  };
31
- //# sourceMappingURL=system-WDT2XUAD.js.map
31
+ //# sourceMappingURL=system-LDMV4BPS.js.map