@shopify/cli 3.76.2 → 3.77.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 (112) hide show
  1. package/dist/assets/hydrogen/bundle/analyzer.html +21 -17
  2. package/dist/assets/hydrogen/starter/CHANGELOG.md +116 -36
  3. package/dist/assets/hydrogen/starter/app/layout.tsx +46 -0
  4. package/dist/assets/hydrogen/starter/app/root.tsx +1 -42
  5. package/dist/assets/hydrogen/starter/app/routes/search.tsx +4 -3
  6. package/dist/assets/hydrogen/starter/app/routes.ts +7 -0
  7. package/dist/assets/hydrogen/starter/package.json +17 -15
  8. package/dist/assets/hydrogen/starter/tsconfig.json +1 -1
  9. package/dist/assets/hydrogen/starter/vite.config.ts +2 -1
  10. package/dist/assets/hydrogen/tailwind/package.json +1 -1
  11. package/dist/assets/hydrogen/vanilla-extract/package.json +2 -2
  12. package/dist/assets/hydrogen/virtual-routes/assets/debug-network.css +27 -10
  13. package/dist/assets/hydrogen/virtual-routes/assets/styles.css +13 -2
  14. package/dist/assets/hydrogen/virtual-routes/layout.jsx +39 -0
  15. package/dist/assets/hydrogen/virtual-routes/virtual-root-with-layout.jsx +63 -0
  16. package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +10 -8
  17. package/dist/assets/hydrogen/vite/package.json +1 -1
  18. package/dist/assets/hydrogen/vite/vite.config.js +1 -0
  19. package/dist/{chunk-SROPQDQ2.js → chunk-3LPRAP3C.js} +4 -4
  20. package/dist/{chunk-TYXJ553W.js → chunk-4QUBSR5N.js} +2 -2
  21. package/dist/{chunk-ZUCWDIGE.js → chunk-57Q6OQG4.js} +2 -2
  22. package/dist/{chunk-AZ3SNZKH.js → chunk-5Y3LMFTE.js} +3 -3
  23. package/dist/{chunk-2WTNMSEA.js → chunk-7N6KTS5H.js} +3 -3
  24. package/dist/{chunk-BJXULBKX.js → chunk-7TDJWEEF.js} +143 -28
  25. package/dist/{chunk-3UYXKXR6.js → chunk-7Z57GKMD.js} +21 -8
  26. package/dist/{chunk-IKXB6S5W.js → chunk-CYZVSCKE.js} +2 -2
  27. package/dist/{chunk-SO2JXJNK.js → chunk-DE23IXCV.js} +7 -7
  28. package/dist/{chunk-WFJKWPG7.js → chunk-DXETR7HO.js} +4 -4
  29. package/dist/{chunk-DZC6PFFO.js → chunk-F7YDVUG6.js} +2 -2
  30. package/dist/{chunk-7ZRFR7FA.js → chunk-FGOKII2H.js} +7 -7
  31. package/dist/{chunk-J64C3R6H.js → chunk-G2Z2JNWZ.js} +3 -3
  32. package/dist/{chunk-DTR7ATW4.js → chunk-HL6ZWA6P.js} +3 -3
  33. package/dist/{chunk-CBRJA5VT.js → chunk-IDLVFDLS.js} +4 -4
  34. package/dist/{chunk-EPUCFUDR.js → chunk-J2TFYL5Z.js} +3 -3
  35. package/dist/{chunk-OSETU22I.js → chunk-JA44NPON.js} +3 -3
  36. package/dist/{chunk-WYLW7KVV.js → chunk-KMLSEENO.js} +3 -3
  37. package/dist/{chunk-3DV6EZ24.js → chunk-KRRCKFNF.js} +7 -7
  38. package/dist/{chunk-VXUNILLD.js → chunk-LGVMVIUY.js} +6 -3
  39. package/dist/{chunk-LLYJXSNC.js → chunk-MJ5E3G6Z.js} +3 -3
  40. package/dist/{chunk-MIAZDAJI.js → chunk-NKPXKN63.js} +2 -2
  41. package/dist/{chunk-XAK5UQFR.js → chunk-NMVJRPWT.js} +2 -2
  42. package/dist/{chunk-J4VMFBCX.js → chunk-ODZP3BOI.js} +3 -3
  43. package/dist/{chunk-WOA7JN7E.js → chunk-OZYTPWJS.js} +12 -8
  44. package/dist/{chunk-6RHYOJ63.js → chunk-PFXZ73LI.js} +5 -5
  45. package/dist/{chunk-KTICPCDH.js → chunk-RXPX6QL6.js} +4 -4
  46. package/dist/{chunk-PNWJ2GZC.js → chunk-THDGA4UF.js} +5 -5
  47. package/dist/{chunk-AHNHLXEN.js → chunk-TIMSXB7V.js} +9 -6
  48. package/dist/{chunk-XOWOZYS5.js → chunk-V24VKC54.js} +3 -3
  49. package/dist/{chunk-JMXX7A4N.js → chunk-V2EXSXIB.js} +2 -2
  50. package/dist/{chunk-QP45KHVL.js → chunk-Y7SMROY2.js} +214 -121
  51. package/dist/{chunk-TKC27SYH.js → chunk-YKGXAR4K.js} +268 -241
  52. package/dist/{chunk-WXONIGO7.js → chunk-YUFBJAT6.js} +5 -2
  53. package/dist/{chunk-KI626P2Z.js → chunk-YW77LWOY.js} +3 -3
  54. package/dist/{chunk-3IUNQ4LM.js → chunk-ZPXCGFEZ.js} +4 -4
  55. package/dist/cli/commands/auth/logout.js +12 -12
  56. package/dist/cli/commands/auth/logout.test.js +13 -13
  57. package/dist/cli/commands/cache/clear.js +11 -11
  58. package/dist/cli/commands/debug/command-flags.js +11 -11
  59. package/dist/cli/commands/docs/generate.js +11 -11
  60. package/dist/cli/commands/docs/generate.test.js +11 -11
  61. package/dist/cli/commands/help.d.ts +1 -0
  62. package/dist/cli/commands/help.js +11 -11
  63. package/dist/cli/commands/kitchen-sink/async.js +12 -12
  64. package/dist/cli/commands/kitchen-sink/async.test.js +12 -12
  65. package/dist/cli/commands/kitchen-sink/index.js +14 -14
  66. package/dist/cli/commands/kitchen-sink/index.test.js +14 -14
  67. package/dist/cli/commands/kitchen-sink/prompts.js +12 -12
  68. package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -12
  69. package/dist/cli/commands/kitchen-sink/static.js +12 -12
  70. package/dist/cli/commands/kitchen-sink/static.test.js +12 -12
  71. package/dist/cli/commands/notifications/generate.js +12 -12
  72. package/dist/cli/commands/notifications/list.js +12 -12
  73. package/dist/cli/commands/search.d.ts +1 -0
  74. package/dist/cli/commands/search.js +12 -12
  75. package/dist/cli/commands/upgrade.js +12 -12
  76. package/dist/cli/commands/version.js +12 -12
  77. package/dist/cli/commands/version.test.js +12 -12
  78. package/dist/cli/services/commands/notifications.js +7 -7
  79. package/dist/cli/services/commands/search.js +3 -3
  80. package/dist/cli/services/commands/search.test.js +3 -3
  81. package/dist/cli/services/commands/version.js +4 -4
  82. package/dist/cli/services/commands/version.test.js +5 -5
  83. package/dist/cli/services/kitchen-sink/async.js +3 -3
  84. package/dist/cli/services/kitchen-sink/prompts.js +3 -3
  85. package/dist/cli/services/kitchen-sink/static.js +3 -3
  86. package/dist/cli/services/upgrade.js +4 -4
  87. package/dist/cli/services/upgrade.test.js +5 -5
  88. package/dist/configs/all.yml +39 -3
  89. package/dist/configs/recommended.yml +36 -0
  90. package/dist/configs/theme-app-extension.yml +3 -3
  91. package/dist/{custom-oclif-loader-FMEBF4P4.js → custom-oclif-loader-OE7KHHEX.js} +3 -3
  92. package/dist/data/filters.json +270 -327
  93. package/dist/data/latest.json +1 -1
  94. package/dist/data/objects.json +1482 -3709
  95. package/dist/data/preset.json +6 -0
  96. package/dist/data/preset_blocks.json +6 -0
  97. package/dist/data/setting.json +167 -50
  98. package/dist/data/tags.json +45 -101
  99. package/dist/{error-handler-AMKMVQCR.js → error-handler-CLK6ULQD.js} +9 -9
  100. package/dist/hooks/postrun.js +7 -7
  101. package/dist/hooks/prerun.js +8 -8
  102. package/dist/index.js +6785 -2452
  103. package/dist/{local-2RXSPQ2I.js → local-YA7BWRS4.js} +3 -3
  104. package/dist/{morph-WRZ7XCTF.js → morph-UGAQHTEA.js} +9 -9
  105. package/dist/{node-X35R6UYP.js → node-66AIONQH.js} +15 -15
  106. package/dist/{node-package-manager-3GAIXEER.js → node-package-manager-BD2U7LUE.js} +4 -4
  107. package/dist/{path-GWAZZN2N.js → path-2K5HIMHZ.js} +2 -2
  108. package/dist/tsconfig.tsbuildinfo +1 -1
  109. package/dist/{ui-MTRH5XFP.js → ui-UIXIY6XH.js} +3 -3
  110. package/dist/{workerd-EHYW43DG.js → workerd-VYNSPDCR.js} +14 -14
  111. package/oclif.manifest.json +24 -19
  112. package/package.json +7 -7
@@ -40,8 +40,19 @@ body {
40
40
  padding: 0;
41
41
  margin: 0;
42
42
  background: #fff;
43
- font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
44
- Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
43
+ font-family:
44
+ 'Inter',
45
+ system-ui,
46
+ -apple-system,
47
+ BlinkMacSystemFont,
48
+ 'Segoe UI',
49
+ Roboto,
50
+ Oxygen,
51
+ Ubuntu,
52
+ Cantarell,
53
+ 'Open Sans',
54
+ 'Helvetica Neue',
55
+ sans-serif;
45
56
  -webkit-font-smoothing: antialiased;
46
57
  min-height: 100vh;
47
58
  display: flex;
@@ -0,0 +1,39 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useNonce } from "@shopify/hydrogen";
3
+ import {
4
+ Links,
5
+ Meta,
6
+ Outlet,
7
+ Scripts,
8
+ ScrollRestoration
9
+ } from "@remix-run/react";
10
+ import { Layout as VirtualLayout } from "./components/Layout.jsx";
11
+ import styles from "./assets/styles.css?url";
12
+ function Layout() {
13
+ const nonce = useNonce();
14
+ return /* @__PURE__ */ jsxs("html", { lang: "en", children: [
15
+ /* @__PURE__ */ jsxs("head", { children: [
16
+ /* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
17
+ /* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width,initial-scale=1" }),
18
+ /* @__PURE__ */ jsx("link", { rel: "stylesheet", href: styles }),
19
+ /* @__PURE__ */ jsx("title", { children: "Hydrogen" }),
20
+ /* @__PURE__ */ jsx(
21
+ "meta",
22
+ {
23
+ name: "description",
24
+ content: "A custom storefront powered by Hydrogen"
25
+ }
26
+ ),
27
+ /* @__PURE__ */ jsx(Meta, {}),
28
+ /* @__PURE__ */ jsx(Links, {})
29
+ ] }),
30
+ /* @__PURE__ */ jsxs("body", { children: [
31
+ /* @__PURE__ */ jsx(VirtualLayout, { children: /* @__PURE__ */ jsx(Outlet, {}) }),
32
+ /* @__PURE__ */ jsx(ScrollRestoration, { nonce }),
33
+ /* @__PURE__ */ jsx(Scripts, { nonce })
34
+ ] })
35
+ ] });
36
+ }
37
+ export {
38
+ Layout as default
39
+ };
@@ -0,0 +1,63 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import {
3
+ Links,
4
+ Meta,
5
+ Outlet,
6
+ Scripts,
7
+ ScrollRestoration,
8
+ isRouteErrorResponse,
9
+ useRouteError
10
+ } from "@remix-run/react";
11
+ import favicon from "./assets/favicon.svg";
12
+ import { Layout as VirtualLayout } from "./components/Layout.jsx";
13
+ import { useNonce } from "@shopify/hydrogen";
14
+ import styles from "./assets/styles.css?url";
15
+ const links = () => {
16
+ return [{ rel: "icon", type: "image/svg+xml", href: favicon }];
17
+ };
18
+ function App() {
19
+ const nonce = useNonce();
20
+ return /* @__PURE__ */ jsxs("html", { lang: "en", children: [
21
+ /* @__PURE__ */ jsxs("head", { children: [
22
+ /* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
23
+ /* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width,initial-scale=1" }),
24
+ /* @__PURE__ */ jsx("link", { rel: "stylesheet", href: styles }),
25
+ /* @__PURE__ */ jsx("title", { children: "Hydrogen" }),
26
+ /* @__PURE__ */ jsx(
27
+ "meta",
28
+ {
29
+ name: "description",
30
+ content: "A custom storefront powered by Hydrogen"
31
+ }
32
+ ),
33
+ /* @__PURE__ */ jsx(Meta, {}),
34
+ /* @__PURE__ */ jsx(Links, {})
35
+ ] }),
36
+ /* @__PURE__ */ jsxs("body", { children: [
37
+ /* @__PURE__ */ jsx(VirtualLayout, { children: /* @__PURE__ */ jsx(Outlet, {}) }),
38
+ /* @__PURE__ */ jsx(ScrollRestoration, { nonce }),
39
+ /* @__PURE__ */ jsx(Scripts, { nonce })
40
+ ] })
41
+ ] });
42
+ }
43
+ function ErrorBoundary() {
44
+ const error = useRouteError();
45
+ let errorMessage = "Unknown error";
46
+ let errorStatus = 500;
47
+ if (isRouteErrorResponse(error)) {
48
+ errorMessage = error?.data?.message ?? error.data;
49
+ errorStatus = error.status;
50
+ } else if (error instanceof Error) {
51
+ errorMessage = error.message;
52
+ }
53
+ return /* @__PURE__ */ jsx(VirtualLayout, { children: /* @__PURE__ */ jsxs("div", { className: "route-error", children: [
54
+ /* @__PURE__ */ jsx("h1", { children: "Please report this error" }),
55
+ /* @__PURE__ */ jsx("h2", { children: errorStatus }),
56
+ errorMessage && /* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx("pre", { children: errorMessage }) })
57
+ ] }) });
58
+ }
59
+ export {
60
+ ErrorBoundary,
61
+ App as default,
62
+ links
63
+ };
@@ -9,21 +9,19 @@ import {
9
9
  useRouteError
10
10
  } from "@remix-run/react";
11
11
  import favicon from "./assets/favicon.svg";
12
- import { Layout } from "./components/Layout.jsx";
12
+ import { Layout as VirtualLayout } from "./components/Layout.jsx";
13
13
  import { useNonce } from "@shopify/hydrogen";
14
14
  import styles from "./assets/styles.css?url";
15
15
  const links = () => {
16
- return [
17
- { rel: "stylesheet", href: styles },
18
- { rel: "icon", type: "image/svg+xml", href: favicon }
19
- ];
16
+ return [{ rel: "icon", type: "image/svg+xml", href: favicon }];
20
17
  };
21
- function App() {
18
+ function Layout({ children }) {
22
19
  const nonce = useNonce();
23
20
  return /* @__PURE__ */ jsxs("html", { lang: "en", children: [
24
21
  /* @__PURE__ */ jsxs("head", { children: [
25
22
  /* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
26
23
  /* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width,initial-scale=1" }),
24
+ /* @__PURE__ */ jsx("link", { rel: "stylesheet", href: styles }),
27
25
  /* @__PURE__ */ jsx("title", { children: "Hydrogen" }),
28
26
  /* @__PURE__ */ jsx(
29
27
  "meta",
@@ -36,12 +34,15 @@ function App() {
36
34
  /* @__PURE__ */ jsx(Links, {})
37
35
  ] }),
38
36
  /* @__PURE__ */ jsxs("body", { children: [
39
- /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsx(Outlet, {}) }),
37
+ /* @__PURE__ */ jsx(VirtualLayout, { children }),
40
38
  /* @__PURE__ */ jsx(ScrollRestoration, { nonce }),
41
39
  /* @__PURE__ */ jsx(Scripts, { nonce })
42
40
  ] })
43
41
  ] });
44
42
  }
43
+ function App() {
44
+ return /* @__PURE__ */ jsx(Outlet, {});
45
+ }
45
46
  function ErrorBoundary() {
46
47
  const error = useRouteError();
47
48
  let errorMessage = "Unknown error";
@@ -52,7 +53,7 @@ function ErrorBoundary() {
52
53
  } else if (error instanceof Error) {
53
54
  errorMessage = error.message;
54
55
  }
55
- return /* @__PURE__ */ jsx(Layout, { children: /* @__PURE__ */ jsxs("div", { className: "route-error", children: [
56
+ return /* @__PURE__ */ jsx(VirtualLayout, { children: /* @__PURE__ */ jsxs("div", { className: "route-error", children: [
56
57
  /* @__PURE__ */ jsx("h1", { children: "Please report this error" }),
57
58
  /* @__PURE__ */ jsx("h2", { children: errorStatus }),
58
59
  errorMessage && /* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx("pre", { children: errorMessage }) })
@@ -60,6 +61,7 @@ function ErrorBoundary() {
60
61
  }
61
62
  export {
62
63
  ErrorBoundary,
64
+ Layout,
63
65
  App as default,
64
66
  links
65
67
  };
@@ -8,7 +8,7 @@
8
8
  "isbot": "^5.1.21"
9
9
  },
10
10
  "devDependencies": {
11
- "vite": "^5.1.8",
11
+ "vite": "^6.2.0",
12
12
  "vite-tsconfig-paths": "^4.3.1"
13
13
  }
14
14
  }
@@ -14,6 +14,7 @@ export default defineConfig({
14
14
  v3_fetcherPersist: true,
15
15
  v3_relativeSplatPath: true,
16
16
  v3_throwAbortReason: true,
17
+ v3_routeConfig: true,
17
18
  },
18
19
  }),
19
20
  tsconfigPaths(),
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  logout
3
- } from "./chunk-OSETU22I.js";
3
+ } from "./chunk-JA44NPON.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-6RHYOJ63.js";
6
+ } from "./chunk-PFXZ73LI.js";
7
7
  import {
8
8
  outputSuccess
9
- } from "./chunk-3UYXKXR6.js";
9
+ } from "./chunk-7Z57GKMD.js";
10
10
  import {
11
11
  init_cjs_shims
12
12
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ var Logout = class extends base_command_default {
25
25
  export {
26
26
  Logout
27
27
  };
28
- //# sourceMappingURL=chunk-SROPQDQ2.js.map
28
+ //# sourceMappingURL=chunk-3LPRAP3C.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clearCollectedLogs,
3
3
  collectedLogs
4
- } from "./chunk-3UYXKXR6.js";
4
+ } from "./chunk-7Z57GKMD.js";
5
5
  import {
6
6
  init_cjs_shims
7
7
  } from "./chunk-PKR7KJ6P.js";
@@ -33,4 +33,4 @@ function mockAndCaptureOutput() {
33
33
  export {
34
34
  mockAndCaptureOutput
35
35
  };
36
- //# sourceMappingURL=chunk-TYXJ553W.js.map
36
+ //# sourceMappingURL=chunk-4QUBSR5N.js.map
@@ -40,7 +40,7 @@ var require_commondir = __commonJS({
40
40
 
41
41
  // ../cli-kit/dist/public/node/path.js
42
42
  init_cjs_shims();
43
- var import_commondir = __toESM(require_commondir(), 1);
43
+ var import_commondir = __toESM(require_commondir());
44
44
  import { fileURLToPath } from "url";
45
45
  function joinPath(...paths) {
46
46
  return join(...paths);
@@ -108,4 +108,4 @@ export {
108
108
  sniffForPath,
109
109
  sniffForJson
110
110
  };
111
- //# sourceMappingURL=chunk-ZUCWDIGE.js.map
111
+ //# sourceMappingURL=chunk-57Q6OQG4.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-WFJKWPG7.js";
3
+ } from "./chunk-DXETR7HO.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-6RHYOJ63.js";
6
+ } from "./chunk-PFXZ73LI.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ var Generate = class extends base_command_default {
25
25
  export {
26
26
  Generate
27
27
  };
28
- //# sourceMappingURL=chunk-AZ3SNZKH.js.map
28
+ //# sourceMappingURL=chunk-5Y3LMFTE.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  prompts
3
- } from "./chunk-XAK5UQFR.js";
3
+ } from "./chunk-NMVJRPWT.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-6RHYOJ63.js";
6
+ } from "./chunk-PFXZ73LI.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ var KitchenSinkPrompts = class extends base_command_default {
25
25
  export {
26
26
  KitchenSinkPrompts
27
27
  };
28
- //# sourceMappingURL=chunk-2WTNMSEA.js.map
28
+ //# sourceMappingURL=chunk-7N6KTS5H.js.map
@@ -5,16 +5,19 @@ import {
5
5
  } from "./chunk-25IMI7TH.js";
6
6
  import {
7
7
  CLI_KIT_VERSION
8
- } from "./chunk-JMXX7A4N.js";
8
+ } from "./chunk-V2EXSXIB.js";
9
9
  import {
10
10
  Environment,
11
11
  firstPartyDev,
12
12
  import_ts_error,
13
+ maxRequestTimeForNetworkCallsMs,
13
14
  outputContent,
14
15
  outputDebug,
15
16
  runWithTimer,
16
- serviceEnvironment
17
- } from "./chunk-3UYXKXR6.js";
17
+ serviceEnvironment,
18
+ skipNetworkLevelRetry,
19
+ sleep
20
+ } from "./chunk-7Z57GKMD.js";
18
21
  import {
19
22
  __commonJS,
20
23
  __require,
@@ -26918,6 +26921,37 @@ function sanitizeURL(url) {
26918
26921
  // ../cli-kit/dist/private/node/api.js
26919
26922
  init_cjs_shims();
26920
26923
 
26924
+ // ../cli-kit/dist/private/node/sleep-with-backoff.js
26925
+ init_cjs_shims();
26926
+ var DEFAULT_RETRY_DELAY_MS = 300, DEFAULT_MAX_TIME_MS = 1e4;
26927
+ function calculateBackoffDelay(attempt, firstDelayMs, maximumDelayMs = DEFAULT_MAX_TIME_MS / 3) {
26928
+ if (attempt === 0)
26929
+ return 0;
26930
+ let delayMultiplier = 2 ** (attempt - 1);
26931
+ return Math.min(firstDelayMs * delayMultiplier, maximumDelayMs);
26932
+ }
26933
+ async function* backoffGenerator(shouldContinue, firstDelayMs) {
26934
+ let attempt = 0;
26935
+ for (; ; ) {
26936
+ let nextDelayMs = calculateBackoffDelay(attempt, firstDelayMs);
26937
+ if (!shouldContinue(nextDelayMs))
26938
+ return { remainingMs: 0, iterations: attempt };
26939
+ await sleep(nextDelayMs / 1e3), yield nextDelayMs, attempt++;
26940
+ }
26941
+ }
26942
+ async function* sleepWithBackoffUntil(maxTimeMs = DEFAULT_MAX_TIME_MS, firstDelayMs = DEFAULT_RETRY_DELAY_MS) {
26943
+ if (maxTimeMs <= 0)
26944
+ return { remainingMs: 0, iterations: 0 };
26945
+ let startTime = Date.now(), generator = backoffGenerator((nextDelay) => Date.now() - startTime + nextDelay <= maxTimeMs, firstDelayMs), attempt = 0;
26946
+ for await (let delayMs of generator)
26947
+ yield delayMs, attempt++;
26948
+ let elapsedTime = Date.now() - startTime;
26949
+ return {
26950
+ remainingMs: maxTimeMs - elapsedTime,
26951
+ iterations: attempt
26952
+ };
26953
+ }
26954
+
26921
26955
  // ../../node_modules/.pnpm/graphql-request@6.1.0_graphql@16.10.0/node_modules/graphql-request/build/esm/index.js
26922
26956
  init_cjs_shims();
26923
26957
 
@@ -27278,7 +27312,7 @@ var createRequestBody = (query, variables, operationName, jsonSerializer) => {
27278
27312
 
27279
27313
  // ../cli-kit/dist/private/node/api.js
27280
27314
  import { performance } from "perf_hooks";
27281
- var allAPIs = ["admin", "storefront-renderer", "partners", "business-platform", "app-management"], DEFAULT_RETRY_DELAY_MS = 1e3, DEFAULT_RETRY_LIMIT = 10, interestingResponseHeaders = /* @__PURE__ */ new Set([
27315
+ var allAPIs = ["admin", "storefront-renderer", "partners", "business-platform", "app-management"], DEFAULT_RETRY_DELAY_MS2 = 1e3, DEFAULT_RETRY_LIMIT = 10, interestingResponseHeaders = /* @__PURE__ */ new Set([
27282
27316
  "cache-control",
27283
27317
  "content-type",
27284
27318
  "etag",
@@ -27289,10 +27323,38 @@ var allAPIs = ["admin", "storefront-renderer", "partners", "business-platform",
27289
27323
  function responseHeaderIsInteresting(header) {
27290
27324
  return interestingResponseHeaders.has(header);
27291
27325
  }
27292
- async function makeVerboseRequest({ request, url }) {
27293
- let t0 = performance.now(), duration = 0, responseHeaders = {}, sanitizedUrl = sanitizeURL(url), response = {};
27326
+ function isARetryableNetworkError(error) {
27327
+ return error instanceof Error ? [
27328
+ "socket hang up",
27329
+ "ECONNRESET",
27330
+ "ECONNABORTED",
27331
+ "ENOTFOUND",
27332
+ "ENETUNREACH",
27333
+ "network socket disonnected",
27334
+ "ETIMEDOUT",
27335
+ "ECONNREFUSED",
27336
+ "EAI_FAIL",
27337
+ "The operation was aborted."
27338
+ ].some((issueMessage) => error.message.includes(issueMessage)) : !1;
27339
+ }
27340
+ async function runRequestWithNetworkLevelRetry(requestOptions) {
27341
+ if (!requestOptions.useNetworkLevelRetry)
27342
+ return requestOptions.request();
27343
+ let lastSeenError;
27344
+ for await (let _delayMs of sleepWithBackoffUntil(requestOptions.maxRetryTimeMs))
27345
+ try {
27346
+ return await requestOptions.request();
27347
+ } catch (err) {
27348
+ if (lastSeenError = err, !isARetryableNetworkError(err))
27349
+ throw err;
27350
+ outputDebug(`Retrying request to ${requestOptions.url} due to network error ${err}`);
27351
+ }
27352
+ throw lastSeenError;
27353
+ }
27354
+ async function makeVerboseRequest(requestOptions) {
27355
+ let t0 = performance.now(), duration = 0, responseHeaders = {}, sanitizedUrl = sanitizeURL(requestOptions.url), response = {};
27294
27356
  try {
27295
- response = await request(), response.headers.forEach((value, key) => {
27357
+ response = await runRequestWithNetworkLevelRetry(requestOptions), response.headers.forEach((value, key) => {
27296
27358
  responseHeaderIsInteresting(key) && (responseHeaders[key] = value);
27297
27359
  });
27298
27360
  } catch (err) {
@@ -27358,8 +27420,8 @@ async function makeVerboseRequest({ request, url }) {
27358
27420
  function errorsIncludeStatus429(error) {
27359
27421
  return error.response.status === 429 ? !0 : typeof error.response.errors == "string" ? !1 : error.response.errors?.some((error2) => error2.extensions?.code === "429") ?? !1;
27360
27422
  }
27361
- async function simpleRequestWithDebugLog({ request, url }, errorHandler) {
27362
- let result = await makeVerboseRequest({ request, url });
27423
+ async function simpleRequestWithDebugLog(requestOptions, errorHandler) {
27424
+ let result = await makeVerboseRequest(requestOptions);
27363
27425
  switch (outputDebug(`Request to ${result.sanitizedUrl} completed in ${result.duration} ms
27364
27426
  With response headers:
27365
27427
  ${result.sanitizedHeaders}
@@ -27376,10 +27438,10 @@ ${result.sanitizedHeaders}
27376
27438
  throw errorHandler ? errorHandler(result.clientError, result.requestId) : result.clientError;
27377
27439
  }
27378
27440
  }
27379
- async function retryAwareRequest({ request, url }, errorHandler, unauthorizedHandler, retryOptions = {
27441
+ async function retryAwareRequest(requestOptions, errorHandler, unauthorizedHandler, retryOptions = {
27380
27442
  scheduleDelay: setTimeout
27381
27443
  }) {
27382
- let retriesUsed = 0, limitRetriesTo = retryOptions.limitRetriesTo ?? DEFAULT_RETRY_LIMIT, result = await makeVerboseRequest({ request, url });
27444
+ let retriesUsed = 0, limitRetriesTo = retryOptions.limitRetriesTo ?? DEFAULT_RETRY_LIMIT, result = await makeVerboseRequest(requestOptions);
27383
27445
  for (outputDebug(`Request to ${result.sanitizedUrl} completed in ${result.duration} ms
27384
27446
  With response headers:
27385
27447
  ${result.sanitizedHeaders}
@@ -27398,10 +27460,10 @@ ${result.sanitizedHeaders}
27398
27460
  if (limitRetriesTo <= retriesUsed)
27399
27461
  throw outputDebug(`${limitRetriesTo} retries exhausted for request to ${result.sanitizedUrl}`), errorHandler ? errorHandler(result.clientError, result.requestId) : result.clientError;
27400
27462
  retriesUsed += 1;
27401
- let retryDelayMs = result.delayMs ?? retryOptions.defaultDelayMs ?? DEFAULT_RETRY_DELAY_MS;
27463
+ let retryDelayMs = result.delayMs ?? retryOptions.defaultDelayMs ?? DEFAULT_RETRY_DELAY_MS2;
27402
27464
  outputDebug(`Scheduling retry request #${retriesUsed} to ${result.sanitizedUrl} in ${retryDelayMs} ms`), result = await new Promise((resolve) => {
27403
27465
  retryOptions.scheduleDelay(() => {
27404
- resolve(makeVerboseRequest({ request, url }));
27466
+ resolve(makeVerboseRequest(requestOptions));
27405
27467
  }, retryDelayMs);
27406
27468
  });
27407
27469
  }
@@ -28271,25 +28333,76 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
28271
28333
  function formData() {
28272
28334
  return new import_form_data.default();
28273
28335
  }
28274
- async function fetch2(url, init) {
28275
- return runWithTimer("cmd_all_timing_network_ms")(() => simpleRequestWithDebugLog({ url: url.toString(), request: () => fetch(url, init) }));
28276
- }
28277
- async function shopifyFetch(url, init) {
28278
- let sanitizedUrl = sanitizeURL(url.toString()), options = {
28279
- ...init ?? {},
28280
- headers: {
28281
- ...await buildHeaders(),
28282
- ...init?.headers ?? {}
28283
- }
28336
+ function requestMode(preset = "default", env = process.env) {
28337
+ let networkLevelRetryIsSupported = !skipNetworkLevelRetry(env);
28338
+ switch (preset) {
28339
+ case "default":
28340
+ return {
28341
+ useNetworkLevelRetry: networkLevelRetryIsSupported,
28342
+ maxRetryTimeMs: DEFAULT_MAX_TIME_MS,
28343
+ useAbortSignal: !0,
28344
+ timeoutMs: maxRequestTimeForNetworkCallsMs(env)
28345
+ };
28346
+ case "non-blocking":
28347
+ return {
28348
+ useNetworkLevelRetry: !1,
28349
+ useAbortSignal: !0,
28350
+ timeoutMs: maxRequestTimeForNetworkCallsMs(env)
28351
+ };
28352
+ case "slow-request":
28353
+ return {
28354
+ useNetworkLevelRetry: !1,
28355
+ useAbortSignal: !1
28356
+ };
28357
+ }
28358
+ return {
28359
+ ...preset,
28360
+ useNetworkLevelRetry: networkLevelRetryIsSupported && preset.useNetworkLevelRetry
28284
28361
  };
28285
- return outputDebug(outputContent`Sending ${options.method ?? "GET"} request to URL ${sanitizedUrl}
28362
+ }
28363
+ function abortSignalFromRequestBehaviour(behaviour) {
28364
+ let signal;
28365
+ return behaviour.useAbortSignal === !0 ? signal = AbortSignal.timeout(behaviour.timeoutMs) : behaviour.useAbortSignal && typeof behaviour.useAbortSignal == "function" ? signal = behaviour.useAbortSignal() : behaviour.useAbortSignal && (signal = behaviour.useAbortSignal), signal;
28366
+ }
28367
+ async function innerFetch({ url, behaviour, init, logRequest, useHttpsAgent }) {
28368
+ logRequest && outputDebug(outputContent`Sending ${init?.method ?? "GET"} request to URL ${sanitizeURL(url.toString())}
28286
28369
  With request headers:
28287
- ${sanitizedHeadersOutput(options.headers ?? {})}
28288
- `), runWithTimer("cmd_all_timing_network_ms")(async () => simpleRequestWithDebugLog({
28370
+ ${sanitizedHeadersOutput(init?.headers ?? {})}
28371
+ `);
28372
+ let agent;
28373
+ useHttpsAgent && (agent = await httpsAgent());
28374
+ let request = async () => {
28375
+ let signal = abortSignalFromRequestBehaviour(behaviour);
28376
+ return init?.signal && (signal = init.signal), fetch(url, { ...init, agent, signal });
28377
+ };
28378
+ return runWithTimer("cmd_all_timing_network_ms")(async () => simpleRequestWithDebugLog({
28289
28379
  url: url.toString(),
28290
- request: async () => fetch(url, { ...init, agent: await httpsAgent() })
28380
+ request,
28381
+ ...behaviour
28291
28382
  }));
28292
28383
  }
28384
+ async function fetch2(url, init, preferredBehaviour) {
28385
+ let options = {
28386
+ url,
28387
+ init,
28388
+ logRequest: !1,
28389
+ useHttpsAgent: !1,
28390
+ // all special behaviours are disabled by default
28391
+ behaviour: requestMode(preferredBehaviour || "non-blocking")
28392
+ };
28393
+ return innerFetch(options);
28394
+ }
28395
+ async function shopifyFetch(url, init, preferredBehaviour) {
28396
+ let options = {
28397
+ url,
28398
+ init,
28399
+ logRequest: !0,
28400
+ useHttpsAgent: !0,
28401
+ // special behaviours enabled by default
28402
+ behaviour: preferredBehaviour ? requestMode(preferredBehaviour) : requestMode()
28403
+ };
28404
+ return innerFetch(options);
28405
+ }
28293
28406
 
28294
28407
  // ../../node_modules/.pnpm/zod@3.24.1/node_modules/zod/lib/index.mjs
28295
28408
  init_cjs_shims();
@@ -31249,6 +31362,8 @@ export {
31249
31362
  require_mime_types,
31250
31363
  FetchError,
31251
31364
  formData,
31365
+ requestMode,
31366
+ abortSignalFromRequestBehaviour,
31252
31367
  fetch2 as fetch,
31253
31368
  shopifyFetch,
31254
31369
  z
@@ -31271,4 +31386,4 @@ mime-types/index.js:
31271
31386
  * MIT Licensed
31272
31387
  *)
31273
31388
  */
31274
- //# sourceMappingURL=chunk-BJXULBKX.js.map
31389
+ //# sourceMappingURL=chunk-7TDJWEEF.js.map
@@ -12,7 +12,7 @@ import {
12
12
  relativizePath,
13
13
  sniffForJson,
14
14
  sniffForPath
15
- } from "./chunk-ZUCWDIGE.js";
15
+ } from "./chunk-57Q6OQG4.js";
16
16
  import {
17
17
  require_cross_spawn,
18
18
  require_lib,
@@ -6413,10 +6413,10 @@ var require_ci_info = __commonJS({
6413
6413
  exports.name = null;
6414
6414
  exports.isPR = null;
6415
6415
  vendors.forEach(function(vendor) {
6416
- let isCI = (Array.isArray(vendor.env) ? vendor.env : [vendor.env]).every(function(obj) {
6416
+ let isCI2 = (Array.isArray(vendor.env) ? vendor.env : [vendor.env]).every(function(obj) {
6417
6417
  return checkEnv(obj);
6418
6418
  });
6419
- if (exports[vendor.constant] = isCI, !!isCI)
6419
+ if (exports[vendor.constant] = isCI2, !!isCI2)
6420
6420
  switch (exports.name = vendor.name, typeof vendor.pr) {
6421
6421
  case "string":
6422
6422
  exports.isPR = !!env3[vendor.pr];
@@ -23827,7 +23827,9 @@ var identifier = "shopify-cli", cacheFolder = () => process.env.XDG_CACHE_HOME ?
23827
23827
  otelURL: "SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",
23828
23828
  themeKitAccessDomain: "SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",
23829
23829
  json: "SHOPIFY_FLAG_JSON",
23830
- neverUsePartnersApi: "SHOPIFY_CLI_NEVER_USE_PARTNERS_API"
23830
+ neverUsePartnersApi: "SHOPIFY_CLI_NEVER_USE_PARTNERS_API",
23831
+ skipNetworkLevelRetry: "SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",
23832
+ maxRequestTimeForNetworkCalls: "SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS"
23831
23833
  }, defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com", systemEnvironmentVariables = {
23832
23834
  backendPort: "BACKEND_PORT"
23833
23835
  }, pathConstants = {
@@ -24911,6 +24913,9 @@ async function sleep(seconds) {
24911
24913
  function terminalSupportsPrompting() {
24912
24914
  return isTruthy(process.env.CI) ? !1 : !!(process.stdin.isTTY && process.stdout.isTTY);
24913
24915
  }
24916
+ function isCI() {
24917
+ return isTruthy(process.env.CI);
24918
+ }
24914
24919
 
24915
24920
  // ../cli-kit/dist/private/node/context/spin-cache.js
24916
24921
  init_cjs_shims();
@@ -25109,6 +25114,13 @@ function jsonOutputEnabled(environment = getEnvironmentVariables()) {
25109
25114
  function blockPartnersAccess() {
25110
25115
  return isTruthy(getEnvironmentVariables()[environmentVariables.neverUsePartnersApi]);
25111
25116
  }
25117
+ function skipNetworkLevelRetry(environment = getEnvironmentVariables()) {
25118
+ return isTruthy(environment[environmentVariables.skipNetworkLevelRetry]);
25119
+ }
25120
+ function maxRequestTimeForNetworkCallsMs(environment = getEnvironmentVariables()) {
25121
+ let maxRequestTime = environment[environmentVariables.maxRequestTimeForNetworkCalls];
25122
+ return maxRequestTime && !isNaN(Number(maxRequestTime)) ? Number(maxRequestTime) : 15 * 1e3;
25123
+ }
25112
25124
 
25113
25125
  // ../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
25114
25126
  init_cjs_shims();
@@ -29532,7 +29544,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
29532
29544
  try {
29533
29545
  await getAndSet();
29534
29546
  } catch (error) {
29535
- let { sendErrorToBugsnag } = await import("./error-handler-AMKMVQCR.js");
29547
+ let { sendErrorToBugsnag } = await import("./error-handler-CLK6ULQD.js");
29536
29548
  await sendErrorToBugsnag(error, "unexpected_error");
29537
29549
  }
29538
29550
  }, durationStack = [];
@@ -31281,8 +31293,6 @@ export {
31281
31293
  uniq,
31282
31294
  uniqBy,
31283
31295
  difference,
31284
- tslib_es6_exports,
31285
- init_tslib_es6,
31286
31296
  getRandomName,
31287
31297
  capitalize,
31288
31298
  pluralize,
@@ -31339,6 +31349,7 @@ export {
31339
31349
  exec2 as exec,
31340
31350
  sleep,
31341
31351
  terminalSupportsPrompting,
31352
+ isCI,
31342
31353
  currentProcessIsGlobal,
31343
31354
  installGlobalShopifyCLI,
31344
31355
  installGlobalCLIPrompt,
@@ -31423,6 +31434,8 @@ export {
31423
31434
  getIdentityTokenInformation,
31424
31435
  jsonOutputEnabled,
31425
31436
  blockPartnersAccess,
31437
+ skipNetworkLevelRetry,
31438
+ maxRequestTimeForNetworkCallsMs,
31426
31439
  isTerminalInteractive,
31427
31440
  homeDirectory,
31428
31441
  isDevelopment,
@@ -31538,4 +31551,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
31538
31551
  * LICENSE file in the root directory of this source tree.
31539
31552
  *)
31540
31553
  */
31541
- //# sourceMappingURL=chunk-3UYXKXR6.js.map
31554
+ //# sourceMappingURL=chunk-7Z57GKMD.js.map
@@ -7,7 +7,7 @@ import {
7
7
  renderSuccess,
8
8
  renderTable,
9
9
  renderWarning
10
- } from "./chunk-3UYXKXR6.js";
10
+ } from "./chunk-7Z57GKMD.js";
11
11
  import {
12
12
  init_cjs_shims
13
13
  } from "./chunk-PKR7KJ6P.js";
@@ -203,4 +203,4 @@ async function staticService() {
203
203
  export {
204
204
  staticService
205
205
  };
206
- //# sourceMappingURL=chunk-IKXB6S5W.js.map
206
+ //# sourceMappingURL=chunk-CYZVSCKE.js.map