@shopify/cli 3.77.1 → 3.78.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 (89) hide show
  1. package/dist/assets/hydrogen/starter/CHANGELOG.md +67 -16
  2. package/dist/assets/hydrogen/starter/app/root.tsx +45 -4
  3. package/dist/assets/hydrogen/starter/app/routes.ts +4 -2
  4. package/dist/assets/hydrogen/starter/package.json +3 -3
  5. package/dist/{chunk-J2TFYL5Z.js → chunk-2YVR2YAE.js} +3 -3
  6. package/dist/{chunk-LGVMVIUY.js → chunk-35A3HBTL.js} +4 -4
  7. package/dist/{chunk-NKPXKN63.js → chunk-35XDICNP.js} +2 -2
  8. package/dist/{chunk-FGOKII2H.js → chunk-5LKOKELK.js} +36 -32
  9. package/dist/{chunk-YUFBJAT6.js → chunk-A5LK333I.js} +3 -3
  10. package/dist/{chunk-MJ5E3G6Z.js → chunk-BV6PURBM.js} +3 -3
  11. package/dist/{chunk-TIMSXB7V.js → chunk-C3Q6M5C3.js} +3 -3
  12. package/dist/{chunk-DE23IXCV.js → chunk-D2R3AM3S.js} +6 -6
  13. package/dist/{chunk-HL6ZWA6P.js → chunk-FIH2SHBE.js} +4 -4
  14. package/dist/{chunk-3LPRAP3C.js → chunk-GEAXCEGF.js} +4 -4
  15. package/dist/{chunk-4QUBSR5N.js → chunk-GRJWPHAK.js} +2 -2
  16. package/dist/{chunk-THDGA4UF.js → chunk-HLFLQFAO.js} +5 -5
  17. package/dist/{chunk-OZYTPWJS.js → chunk-HQF3OQCV.js} +6 -6
  18. package/dist/{chunk-YW77LWOY.js → chunk-ICGAJSRH.js} +3 -3
  19. package/dist/{chunk-CYZVSCKE.js → chunk-IJLYOQTB.js} +2 -2
  20. package/dist/{chunk-7N6KTS5H.js → chunk-K6OZPDRE.js} +3 -3
  21. package/dist/{chunk-7TDJWEEF.js → chunk-KJNPOPZU.js} +4 -4
  22. package/dist/{chunk-V24VKC54.js → chunk-KKK42SBP.js} +3 -3
  23. package/dist/{chunk-IDLVFDLS.js → chunk-KUVHPVGH.js} +3 -3
  24. package/dist/{chunk-V2EXSXIB.js → chunk-MLQTLKNQ.js} +2 -2
  25. package/dist/{chunk-Y7SMROY2.js → chunk-N2GQBM45.js} +13 -4
  26. package/dist/{chunk-YKGXAR4K.js → chunk-NCYK3NPS.js} +119 -97
  27. package/dist/{chunk-VSKRQ3JT.js → chunk-QAKYKTFV.js} +2 -1
  28. package/dist/{chunk-KMLSEENO.js → chunk-QVDCZMPL.js} +3 -3
  29. package/dist/{chunk-7Z57GKMD.js → chunk-R2JN4S25.js} +4 -4
  30. package/dist/{chunk-ODZP3BOI.js → chunk-RYZBD47F.js} +3 -3
  31. package/dist/{chunk-KRRCKFNF.js → chunk-S6ZWGAX6.js} +8 -8
  32. package/dist/{chunk-ZPXCGFEZ.js → chunk-TQMZLUGH.js} +5 -5
  33. package/dist/{chunk-5Y3LMFTE.js → chunk-UDNM674J.js} +3 -3
  34. package/dist/{chunk-RXPX6QL6.js → chunk-VAMD3FV3.js} +4 -4
  35. package/dist/{chunk-DXETR7HO.js → chunk-VNCW4T6F.js} +4 -4
  36. package/dist/{chunk-PFXZ73LI.js → chunk-VNKMVUTV.js} +5 -5
  37. package/dist/{chunk-JA44NPON.js → chunk-VTV2W43J.js} +3 -3
  38. package/dist/{chunk-G2Z2JNWZ.js → chunk-WM4XS6OG.js} +3 -3
  39. package/dist/{chunk-F7YDVUG6.js → chunk-WVISX7R6.js} +2 -2
  40. package/dist/{chunk-NMVJRPWT.js → chunk-XSNERQSV.js} +2 -2
  41. package/dist/cli/commands/auth/logout.js +12 -12
  42. package/dist/cli/commands/auth/logout.test.js +13 -13
  43. package/dist/cli/commands/cache/clear.js +11 -11
  44. package/dist/cli/commands/debug/command-flags.js +11 -11
  45. package/dist/cli/commands/docs/generate.js +11 -11
  46. package/dist/cli/commands/docs/generate.test.js +11 -11
  47. package/dist/cli/commands/help.js +11 -11
  48. package/dist/cli/commands/kitchen-sink/async.js +12 -12
  49. package/dist/cli/commands/kitchen-sink/async.test.js +12 -12
  50. package/dist/cli/commands/kitchen-sink/index.js +14 -14
  51. package/dist/cli/commands/kitchen-sink/index.test.js +14 -14
  52. package/dist/cli/commands/kitchen-sink/prompts.js +12 -12
  53. package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -12
  54. package/dist/cli/commands/kitchen-sink/static.js +12 -12
  55. package/dist/cli/commands/kitchen-sink/static.test.js +12 -12
  56. package/dist/cli/commands/notifications/generate.js +12 -12
  57. package/dist/cli/commands/notifications/list.js +12 -12
  58. package/dist/cli/commands/search.js +12 -12
  59. package/dist/cli/commands/upgrade.js +12 -12
  60. package/dist/cli/commands/version.js +12 -12
  61. package/dist/cli/commands/version.test.js +12 -12
  62. package/dist/cli/services/commands/notifications.js +7 -7
  63. package/dist/cli/services/commands/search.js +3 -3
  64. package/dist/cli/services/commands/search.test.js +3 -3
  65. package/dist/cli/services/commands/version.js +4 -4
  66. package/dist/cli/services/commands/version.test.js +5 -5
  67. package/dist/cli/services/kitchen-sink/async.js +3 -3
  68. package/dist/cli/services/kitchen-sink/prompts.js +3 -3
  69. package/dist/cli/services/kitchen-sink/static.js +3 -3
  70. package/dist/cli/services/upgrade.js +4 -4
  71. package/dist/cli/services/upgrade.test.js +5 -5
  72. package/dist/{custom-oclif-loader-OE7KHHEX.js → custom-oclif-loader-URFPN7T5.js} +3 -3
  73. package/dist/data/default_setting_values.json +0 -56
  74. package/dist/data/latest.json +1 -1
  75. package/dist/{error-handler-CLK6ULQD.js → error-handler-JMG43AG2.js} +9 -9
  76. package/dist/hooks/postrun.js +7 -7
  77. package/dist/hooks/prerun.js +8 -8
  78. package/dist/index.js +48307 -10869
  79. package/dist/{lib-SGEWXU7Z.js → lib-IZAG57CE.js} +2 -2
  80. package/dist/{local-YA7BWRS4.js → local-VNB4TMEI.js} +3 -3
  81. package/dist/{morph-UGAQHTEA.js → morph-W4XLLZ47.js} +9 -9
  82. package/dist/{node-66AIONQH.js → node-4XPDXMES.js} +15 -15
  83. package/dist/{node-package-manager-BD2U7LUE.js → node-package-manager-GL4PGGZJ.js} +4 -4
  84. package/dist/tsconfig.tsbuildinfo +1 -1
  85. package/dist/{ui-UIXIY6XH.js → ui-LKIZMLKP.js} +3 -3
  86. package/dist/{workerd-VYNSPDCR.js → workerd-RCIF7HOL.js} +14 -14
  87. package/oclif.manifest.json +1 -1
  88. package/package.json +10 -8
  89. package/dist/assets/hydrogen/starter/app/layout.tsx +0 -46
@@ -1,5 +1,38 @@
1
1
  # skeleton
2
2
 
3
+ ## 2025.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Moved the `Layout` component back into `root.tsx` to avoid issues with styled errors. ([#2829](https://github.com/Shopify/hydrogen/pull/2829)) by [@ruggishop](https://github.com/ruggishop)
8
+
9
+ 1. If you have a separate `app/layout.tsx` file, delete it and move its default exported component into your `root.tsx`. For example:
10
+
11
+ ```ts
12
+ // /app/root.tsx
13
+ export function Layout({children}: {children?: React.ReactNode}) {
14
+ const nonce = useNonce();
15
+ const data = useRouteLoaderData<RootLoader>('root');
16
+
17
+ return (
18
+ <html lang="en">
19
+ ...
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## 2025.1.5
25
+
26
+ ### Patch Changes
27
+
28
+ - Fixed an issue with the creation of JavaScript projects. ([#2818](https://github.com/Shopify/hydrogen/pull/2818)) by [@seanparsons](https://github.com/seanparsons)
29
+
30
+ ## 2025.1.4
31
+
32
+ ### Patch Changes
33
+
34
+ - Updates the `@shopify/cli`, `@shopify/cli-kit` and `@shopify/plugin-cloudflare` dependencies to 3.77.1. ([#2816](https://github.com/Shopify/hydrogen/pull/2816)) by [@seanparsons](https://github.com/seanparsons)
35
+
3
36
  ## 2025.1.3
4
37
 
5
38
  ### Patch Changes
@@ -27,7 +60,30 @@
27
60
 
28
61
  Please refer to the Remix documentation for more details on `v3_routeConfig` future flag: [https://remix.run/docs/en/main/start/future-flags#v3_routeconfig](https://remix.run/docs/en/main/start/future-flags#v3_routeconfig)
29
62
 
30
- 1. Add the following npm package dev dependencies:
63
+ 1. Update your `vite.config.ts`.
64
+
65
+ ```diff
66
+ export default defineConfig({
67
+ plugins: [
68
+ hydrogen(),
69
+ oxygen(),
70
+ remix({
71
+ - presets: [hydrogen.preset()],
72
+ + presets: [hydrogen.v3preset()],
73
+ future: {
74
+ v3_fetcherPersist: true,
75
+ v3_relativeSplatPath: true,
76
+ v3_throwAbortReason: true,
77
+ v3_lazyRouteDiscovery: true,
78
+ v3_singleFetch: true,
79
+ + v3_routeConfig: true,
80
+ },
81
+ }),
82
+ tsconfigPaths(),
83
+ ],
84
+ ```
85
+
86
+ 1. Update your `package.json` and install the new packages. Make sure to match the Remix version along with other Remix npm packages and ensure the versions are 2.16.1 or above:
31
87
 
32
88
  ```diff
33
89
  "devDependencies": {
@@ -36,22 +92,29 @@
36
92
  + "@remix-run/route-config": "^2.16.1",
37
93
  ```
38
94
 
39
- 1. If you have `export function Layout` in your `root.tsx`, move this export into its own file. For example:
95
+ 1. Move the `Layout` component export from `root.tsx` into its own file. Make sure to supply an `<Outlet>` so Remix knows where to inject your route content.
40
96
 
41
97
  ```ts
42
98
  // /app/layout.tsx
99
+ import {Outlet} from '@remix-run/react';
100
+
43
101
  export default function Layout() {
44
102
  const nonce = useNonce();
45
103
  const data = useRouteLoaderData<RootLoader>('root');
46
104
 
47
105
  return (
48
106
  <html lang="en">
49
- ...
107
+ ...
108
+ <Outlet />
109
+ ...
110
+ </html>
50
111
  );
51
112
  }
113
+
114
+ // Remember to remove the Layout export from your root.tsx
52
115
  ```
53
116
 
54
- 1. Create a `routes.ts` file.
117
+ 1. Add a routes.ts file. This is your new Remix route configuration file.
55
118
 
56
119
  ```ts
57
120
  import { flatRoutes } from "@remix-run/fs-routes";
@@ -64,18 +127,6 @@
64
127
  ]) satisfies RouteConfig;
65
128
  ```
66
129
 
67
- 1. Update your `vite.config.ts`.
68
-
69
- ```diff
70
- export default defineConfig({
71
- plugins: [
72
- hydrogen(),
73
- oxygen(),
74
- remix({
75
- - presets: [hydrogen.preset()],
76
- + presets: [hydrogen.v3preset()],
77
- ```
78
-
79
130
  - Updated dependencies [[`0425e50d`](https://github.com/Shopify/hydrogen/commit/0425e50dafe2f42326cba67076e5fcea2905e885), [`74ef1ba7`](https://github.com/Shopify/hydrogen/commit/74ef1ba7d41988350e9d2c81731c90381943d1f0)]:
80
131
  - @shopify/remix-oxygen@2.0.12
81
132
  - @shopify/hydrogen@2025.1.3
@@ -1,13 +1,21 @@
1
- import {getShopAnalytics} from '@shopify/hydrogen';
1
+ import {Analytics, getShopAnalytics, useNonce} from '@shopify/hydrogen';
2
2
  import {type LoaderFunctionArgs} from '@shopify/remix-oxygen';
3
3
  import {
4
4
  Outlet,
5
5
  useRouteError,
6
6
  isRouteErrorResponse,
7
7
  type ShouldRevalidateFunction,
8
+ Links,
9
+ Meta,
10
+ Scripts,
11
+ ScrollRestoration,
12
+ useRouteLoaderData,
8
13
  } from '@remix-run/react';
9
14
  import favicon from '~/assets/favicon.svg';
10
15
  import {FOOTER_QUERY, HEADER_QUERY} from '~/lib/fragments';
16
+ import resetStyles from '~/styles/reset.css?url';
17
+ import appStyles from '~/styles/app.css?url';
18
+ import {PageLayout} from './components/PageLayout';
11
19
 
12
20
  export type RootLoader = typeof loader;
13
21
 
@@ -25,9 +33,9 @@ export const shouldRevalidate: ShouldRevalidateFunction = ({
25
33
  // revalidate when manually revalidating via useRevalidator
26
34
  if (currentUrl.toString() === nextUrl.toString()) return true;
27
35
 
28
- // Defaulting to no revalidation for root loader data to improve performance.
29
- // When using this feature, you risk your UI getting out of sync with your server.
30
- // Use with caution. If you are uncomfortable with this optimization, update the
36
+ // Defaulting to no revalidation for root loader data to improve performance.
37
+ // When using this feature, you risk your UI getting out of sync with your server.
38
+ // Use with caution. If you are uncomfortable with this optimization, update the
31
39
  // line below to `return defaultShouldRevalidate` instead.
32
40
  // For more details see: https://remix.run/docs/en/main/route/should-revalidate
33
41
  return false;
@@ -133,6 +141,39 @@ function loadDeferredData({context}: LoaderFunctionArgs) {
133
141
  };
134
142
  }
135
143
 
144
+ export function Layout({children}: {children?: React.ReactNode}) {
145
+ const nonce = useNonce();
146
+ const data = useRouteLoaderData<RootLoader>('root');
147
+
148
+ return (
149
+ <html lang="en">
150
+ <head>
151
+ <meta charSet="utf-8" />
152
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
153
+ <link rel="stylesheet" href={resetStyles}></link>
154
+ <link rel="stylesheet" href={appStyles}></link>
155
+ <Meta />
156
+ <Links />
157
+ </head>
158
+ <body>
159
+ {data ? (
160
+ <Analytics.Provider
161
+ cart={data.cart}
162
+ shop={data.shop}
163
+ consent={data.consent}
164
+ >
165
+ <PageLayout {...data}>{children}</PageLayout>
166
+ </Analytics.Provider>
167
+ ) : (
168
+ children
169
+ )}
170
+ <ScrollRestoration nonce={nonce} />
171
+ <Scripts nonce={nonce} />
172
+ </body>
173
+ </html>
174
+ );
175
+ }
176
+
136
177
  export default function App() {
137
178
  return <Outlet />;
138
179
  }
@@ -1,7 +1,9 @@
1
1
  import {flatRoutes} from '@remix-run/fs-routes';
2
- import {layout, type RouteConfig} from '@remix-run/route-config';
2
+ import {type RouteConfig} from '@remix-run/route-config';
3
3
  import {hydrogenRoutes} from '@shopify/hydrogen';
4
4
 
5
5
  export default hydrogenRoutes([
6
- layout('./layout.tsx', (await flatRoutes())),
6
+ ...(await flatRoutes()),
7
+ // Manual route definitions can be added to this array, in addition to or instead of using the `flatRoutes` file-based routing convention.
8
+ // See https://remix.run/docs/en/main/guides/routing for more details
7
9
  ]) satisfies RouteConfig;
@@ -2,7 +2,7 @@
2
2
  "name": "skeleton",
3
3
  "private": true,
4
4
  "sideEffects": false,
5
- "version": "2025.1.3",
5
+ "version": "2025.1.6",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "build": "shopify hydrogen build --codegen",
@@ -32,9 +32,9 @@
32
32
  "@remix-run/dev": "^2.16.1",
33
33
  "@remix-run/fs-routes": "^2.16.1",
34
34
  "@remix-run/route-config": "^2.16.1",
35
- "@shopify/cli": "~3.77.0",
35
+ "@shopify/cli": "~3.77.1",
36
36
  "@shopify/hydrogen-codegen": "^0.3.3",
37
- "@shopify/mini-oxygen": "^3.1.2",
37
+ "@shopify/mini-oxygen": "^3.2.0",
38
38
  "@shopify/oxygen-workers-types": "^4.1.6",
39
39
  "@shopify/prettier-config": "^1.1.2",
40
40
  "@total-typescript/ts-reset": "^0.6.1",
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  packageManagerFromUserAgent
3
- } from "./chunk-YW77LWOY.js";
3
+ } from "./chunk-ICGAJSRH.js";
4
4
  import {
5
5
  currentProcessIsGlobal,
6
6
  inferPackageManagerForGlobalCLI,
7
7
  outputContent,
8
8
  outputToken
9
- } from "./chunk-7Z57GKMD.js";
9
+ } from "./chunk-R2JN4S25.js";
10
10
  import {
11
11
  init_cjs_shims
12
12
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ export {
25
25
  cliInstallCommand,
26
26
  getOutputUpdateCLIReminder
27
27
  };
28
- //# sourceMappingURL=chunk-J2TFYL5Z.js.map
28
+ //# sourceMappingURL=chunk-2YVR2YAE.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  searchService
3
- } from "./chunk-NKPXKN63.js";
3
+ } from "./chunk-35XDICNP.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-PFXZ73LI.js";
6
+ } from "./chunk-VNKMVUTV.js";
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-VSKRQ3JT.js";
9
+ } from "./chunk-QAKYKTFV.js";
10
10
  import {
11
11
  __toESM,
12
12
  init_cjs_shims
@@ -48,4 +48,4 @@ var import_core = __toESM(require_lib(), 1), Search = class _Search extends base
48
48
  export {
49
49
  Search
50
50
  };
51
- //# sourceMappingURL=chunk-LGVMVIUY.js.map
51
+ //# sourceMappingURL=chunk-35A3HBTL.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  openURL
3
- } from "./chunk-7Z57GKMD.js";
3
+ } from "./chunk-R2JN4S25.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-PKR7KJ6P.js";
@@ -15,4 +15,4 @@ async function searchService(query) {
15
15
  export {
16
16
  searchService
17
17
  };
18
- //# sourceMappingURL=chunk-NKPXKN63.js.map
18
+ //# sourceMappingURL=chunk-35XDICNP.js.map
@@ -4,16 +4,16 @@ import {
4
4
  import {
5
5
  fanoutHooks,
6
6
  reportAnalyticsEvent
7
- } from "./chunk-DE23IXCV.js";
7
+ } from "./chunk-D2R3AM3S.js";
8
8
  import {
9
9
  getEnvironmentData
10
- } from "./chunk-Y7SMROY2.js";
10
+ } from "./chunk-N2GQBM45.js";
11
11
  import {
12
12
  CLI_KIT_VERSION
13
- } from "./chunk-V2EXSXIB.js";
13
+ } from "./chunk-MLQTLKNQ.js";
14
14
  import {
15
15
  runWithRateLimit
16
- } from "./chunk-YW77LWOY.js";
16
+ } from "./chunk-ICGAJSRH.js";
17
17
  import {
18
18
  AbortSilentError,
19
19
  CancelExecution,
@@ -28,7 +28,7 @@ import {
28
28
  reportingRateLimit,
29
29
  require_stacktracey,
30
30
  shouldReportErrorAsUnexpected
31
- } from "./chunk-7Z57GKMD.js";
31
+ } from "./chunk-R2JN4S25.js";
32
32
  import {
33
33
  cwd,
34
34
  isAbsolutePath,
@@ -38,7 +38,7 @@ import {
38
38
  } from "./chunk-57Q6OQG4.js";
39
39
  import {
40
40
  require_lib
41
- } from "./chunk-VSKRQ3JT.js";
41
+ } from "./chunk-QAKYKTFV.js";
42
42
  import {
43
43
  __commonJS,
44
44
  __require,
@@ -2042,33 +2042,37 @@ var reportError = async (error, config) => {
2042
2042
  shouldReportErrorAsUnexpected(error) && (exitMode = "unexpected_error"), config !== void 0 && await reportAnalyticsEvent({ config, errorMessage: error instanceof Error ? error.message : void 0, exitMode }), await sendErrorToBugsnag(error, exitMode);
2043
2043
  };
2044
2044
  async function sendErrorToBugsnag(error, exitMode) {
2045
- if (import_core.settings.debug)
2046
- return outputDebug("Skipping Bugsnag report"), { reported: !1, error, unhandled: void 0 };
2047
- let unhandled = exitMode === "unexpected_error", reportableError, stacktrace, report = !1;
2048
- error instanceof Error ? (report = !0, reportableError = new Error(error.message), stacktrace = error.stack) : typeof error == "string" && error.trim().length !== 0 ? (report = !0, reportableError = new Error(error), stacktrace = reportableError.stack) : (report = !1, reportableError = new Error("Unknown error"));
2049
- let formattedStacktrace = new import_stacktracey.default(stacktrace ?? "").clean().items.map((item) => {
2050
- let filePath = cleanSingleStackTracePath(item.file);
2051
- return ` at ${item.callee} (${filePath}:${item.line}:${item.column})`;
2052
- }).join(`
2045
+ try {
2046
+ if (import_core.settings.debug)
2047
+ return outputDebug("Skipping Bugsnag report"), { reported: !1, error, unhandled: void 0 };
2048
+ let unhandled = exitMode === "unexpected_error", reportableError, stacktrace, report = !1;
2049
+ error instanceof Error ? (report = !0, reportableError = new Error(error.message), stacktrace = error.stack) : typeof error == "string" && error.trim().length !== 0 ? (report = !0, reportableError = new Error(error), stacktrace = reportableError.stack) : (report = !1, reportableError = new Error("Unknown error"));
2050
+ let formattedStacktrace = new import_stacktracey.default(stacktrace ?? "").clean().items.map((item) => {
2051
+ let filePath = cleanSingleStackTracePath(item.file);
2052
+ return ` at ${item.callee} (${filePath}:${item.line}:${item.column})`;
2053
+ }).join(`
2053
2054
  `);
2054
- reportableError.stack = `Error: ${reportableError.message}
2055
+ reportableError.stack = `Error: ${reportableError.message}
2055
2056
  ${formattedStacktrace}`;
2056
- let withinRateLimit = !1;
2057
- return await runWithRateLimit({
2058
- key: "send-error-to-bugsnag",
2059
- ...reportingRateLimit,
2060
- task: async () => {
2061
- withinRateLimit = !0;
2062
- }
2063
- }), withinRateLimit || (outputDebug("Skipping Bugsnag report due to rate limiting"), report = !1), report && (initializeBugsnag(), await new Promise((resolve, reject) => {
2064
- outputDebug(`Reporting ${unhandled ? "unhandled" : "handled"} error to Bugsnag: ${reportableError.message}`);
2065
- let eventHandler = (event) => {
2066
- event.severity = "error", event.unhandled = unhandled;
2067
- }, errorHandler2 = (error2) => {
2068
- error2 ? reject(error2) : resolve(reportableError);
2069
- };
2070
- import_js.default.notify(reportableError, eventHandler, errorHandler2);
2071
- })), { error: reportableError, reported: report, unhandled };
2057
+ let withinRateLimit = !1;
2058
+ return await runWithRateLimit({
2059
+ key: "send-error-to-bugsnag",
2060
+ ...reportingRateLimit,
2061
+ task: async () => {
2062
+ withinRateLimit = !0;
2063
+ }
2064
+ }), withinRateLimit || (outputDebug("Skipping Bugsnag report due to rate limiting"), report = !1), report && (initializeBugsnag(), await new Promise((resolve, reject) => {
2065
+ outputDebug(`Reporting ${unhandled ? "unhandled" : "handled"} error to Bugsnag: ${reportableError.message}`);
2066
+ let eventHandler = (event) => {
2067
+ event.severity = "error", event.unhandled = unhandled;
2068
+ }, errorHandler2 = (error2) => {
2069
+ error2 ? reject(error2) : resolve(reportableError);
2070
+ };
2071
+ import_js.default.notify(reportableError, eventHandler, errorHandler2);
2072
+ })), { error: reportableError, reported: report, unhandled };
2073
+ } catch (err) {
2074
+ return outputDebug(`Error reporting to Bugsnag: ${err}`), { error, reported: !1, unhandled: void 0 };
2075
+ }
2072
2076
  }
2073
2077
  function cleanStackFrameFilePath({ currentFilePath, projectRoot, pluginLocations }) {
2074
2078
  let fullLocation = isAbsolutePath(currentFilePath) ? currentFilePath : joinPath(projectRoot, currentFilePath), matchingPluginPath = pluginLocations.filter(({ pluginPath }) => fullLocation.startsWith(pluginPath))[0];
@@ -2136,4 +2140,4 @@ export {
2136
2140
  registerCleanBugsnagErrorsFromWithinPlugins,
2137
2141
  addBugsnagMetadata
2138
2142
  };
2139
- //# sourceMappingURL=chunk-FGOKII2H.js.map
2143
+ //# sourceMappingURL=chunk-5LKOKELK.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-PFXZ73LI.js";
3
+ } from "./chunk-VNKMVUTV.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-VSKRQ3JT.js";
6
+ } from "./chunk-QAKYKTFV.js";
7
7
  import {
8
8
  __toESM,
9
9
  init_cjs_shims
@@ -46,4 +46,4 @@ var HelpCommand = class _HelpCommand extends base_command_default {
46
46
  export {
47
47
  HelpCommand
48
48
  };
49
- //# sourceMappingURL=chunk-YUFBJAT6.js.map
49
+ //# sourceMappingURL=chunk-A5LK333I.js.map
@@ -2,7 +2,7 @@ import {
2
2
  init_cjs_shims
3
3
  } from "./chunk-PKR7KJ6P.js";
4
4
 
5
- // ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.9_@graphql-codegen+cli@5.0.4_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
5
+ // ../../node_modules/.pnpm/@shopify+cli-hydrogen@10.0.0_@graphql-codegen+cli@5.0.4_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
6
6
  init_cjs_shims();
7
7
 
8
8
  // ../../node_modules/.pnpm/get-port@7.1.0/node_modules/get-port/index.js
@@ -94,7 +94,7 @@ function portNumbers(from, to) {
94
94
  }(from, to);
95
95
  }
96
96
 
97
- // ../../node_modules/.pnpm/@shopify+cli-hydrogen@9.0.9_@graphql-codegen+cli@5.0.4_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
97
+ // ../../node_modules/.pnpm/@shopify+cli-hydrogen@10.0.0_@graphql-codegen+cli@5.0.4_react-dom@17.0.2_react@17.0.2/node_modules/@shopify/cli-hydrogen/dist/lib/find-port.js
98
98
  function findPort(portPreference, range = 100) {
99
99
  return getPorts({
100
100
  port: portNumbers(portPreference, portPreference + range)
@@ -104,4 +104,4 @@ function findPort(portPreference, range = 100) {
104
104
  export {
105
105
  findPort
106
106
  };
107
- //# sourceMappingURL=chunk-MJ5E3G6Z.js.map
107
+ //# sourceMappingURL=chunk-BV6PURBM.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-PFXZ73LI.js";
3
+ } from "./chunk-VNKMVUTV.js";
4
4
  import {
5
5
  mkdir,
6
6
  outputInfo,
7
7
  rmdir,
8
8
  writeFile
9
- } from "./chunk-7Z57GKMD.js";
9
+ } from "./chunk-R2JN4S25.js";
10
10
  import {
11
11
  cwd,
12
12
  joinPath
@@ -118,4 +118,4 @@ export {
118
118
  writeCommandFlagInterface,
119
119
  writeCommandUsageExampleFile
120
120
  };
121
- //# sourceMappingURL=chunk-TIMSXB7V.js.map
121
+ //# sourceMappingURL=chunk-C3Q6M5C3.js.map
@@ -2,16 +2,16 @@ import {
2
2
  getEnvironmentData,
3
3
  getLastSeenUserIdAfterAuth,
4
4
  getSensitiveEnvironmentData
5
- } from "./chunk-Y7SMROY2.js";
5
+ } from "./chunk-N2GQBM45.js";
6
6
  import {
7
7
  fetch
8
- } from "./chunk-7TDJWEEF.js";
8
+ } from "./chunk-KJNPOPZU.js";
9
9
  import {
10
10
  CLI_KIT_VERSION
11
- } from "./chunk-V2EXSXIB.js";
11
+ } from "./chunk-MLQTLKNQ.js";
12
12
  import {
13
13
  runWithRateLimit
14
- } from "./chunk-YW77LWOY.js";
14
+ } from "./chunk-ICGAJSRH.js";
15
15
  import {
16
16
  alwaysLogAnalytics,
17
17
  alwaysLogMetrics,
@@ -28,7 +28,7 @@ import {
28
28
  outputDebug,
29
29
  outputToken,
30
30
  reportingRateLimit
31
- } from "./chunk-7Z57GKMD.js";
31
+ } from "./chunk-R2JN4S25.js";
32
32
  import {
33
33
  __commonJS,
34
34
  __esm,
@@ -15930,4 +15930,4 @@ export {
15930
15930
  requestIdsCollection,
15931
15931
  reportAnalyticsEvent
15932
15932
  };
15933
- //# sourceMappingURL=chunk-DE23IXCV.js.map
15933
+ //# sourceMappingURL=chunk-D2R3AM3S.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-PFXZ73LI.js";
3
+ } from "./chunk-VNKMVUTV.js";
4
4
  import {
5
5
  renderTable,
6
6
  renderText
7
- } from "./chunk-7Z57GKMD.js";
7
+ } from "./chunk-R2JN4S25.js";
8
8
  import {
9
9
  require_lib
10
- } from "./chunk-VSKRQ3JT.js";
10
+ } from "./chunk-QAKYKTFV.js";
11
11
  import {
12
12
  __toESM,
13
13
  init_cjs_shims
@@ -83,4 +83,4 @@ var import_core = __toESM(require_lib(), 1), CommandFlags = class _CommandFlags
83
83
  export {
84
84
  CommandFlags
85
85
  };
86
- //# sourceMappingURL=chunk-HL6ZWA6P.js.map
86
+ //# sourceMappingURL=chunk-FIH2SHBE.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  logout
3
- } from "./chunk-JA44NPON.js";
3
+ } from "./chunk-VTV2W43J.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-PFXZ73LI.js";
6
+ } from "./chunk-VNKMVUTV.js";
7
7
  import {
8
8
  outputSuccess
9
- } from "./chunk-7Z57GKMD.js";
9
+ } from "./chunk-R2JN4S25.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-3LPRAP3C.js.map
28
+ //# sourceMappingURL=chunk-GEAXCEGF.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clearCollectedLogs,
3
3
  collectedLogs
4
- } from "./chunk-7Z57GKMD.js";
4
+ } from "./chunk-R2JN4S25.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-4QUBSR5N.js.map
36
+ //# sourceMappingURL=chunk-GRJWPHAK.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  prompts
3
- } from "./chunk-NMVJRPWT.js";
3
+ } from "./chunk-XSNERQSV.js";
4
4
  import {
5
5
  staticService
6
- } from "./chunk-CYZVSCKE.js";
6
+ } from "./chunk-IJLYOQTB.js";
7
7
  import {
8
8
  asyncTasks
9
- } from "./chunk-F7YDVUG6.js";
9
+ } from "./chunk-WVISX7R6.js";
10
10
  import {
11
11
  base_command_default
12
- } from "./chunk-PFXZ73LI.js";
12
+ } from "./chunk-VNKMVUTV.js";
13
13
  import {
14
14
  init_cjs_shims
15
15
  } from "./chunk-PKR7KJ6P.js";
@@ -34,4 +34,4 @@ var KitchenSinkAll = class extends base_command_default {
34
34
  export {
35
35
  KitchenSinkAll
36
36
  };
37
- //# sourceMappingURL=chunk-THDGA4UF.js.map
37
+ //# sourceMappingURL=chunk-HLFLQFAO.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  fetch,
3
3
  z
4
- } from "./chunk-7TDJWEEF.js";
4
+ } from "./chunk-KJNPOPZU.js";
5
5
  import {
6
6
  CLI_KIT_VERSION
7
- } from "./chunk-V2EXSXIB.js";
7
+ } from "./chunk-MLQTLKNQ.js";
8
8
  import {
9
9
  cacheRetrieve,
10
10
  cacheStore,
11
11
  versionSatisfies
12
- } from "./chunk-YW77LWOY.js";
12
+ } from "./chunk-ICGAJSRH.js";
13
13
  import {
14
14
  AbortSilentError,
15
15
  exec,
@@ -19,7 +19,7 @@ import {
19
19
  renderError,
20
20
  renderInfo,
21
21
  renderWarning
22
- } from "./chunk-7Z57GKMD.js";
22
+ } from "./chunk-R2JN4S25.js";
23
23
  import {
24
24
  init_cjs_shims
25
25
  } from "./chunk-PKR7KJ6P.js";
@@ -87,7 +87,7 @@ async function showNotificationsIfNeeded(currentSurfaces, environment = process.
87
87
  throw new AbortSilentError();
88
88
  let errorMessage = `Error showing notifications: ${error.message}`;
89
89
  outputDebug(errorMessage);
90
- let { sendErrorToBugsnag } = await import("./error-handler-CLK6ULQD.js");
90
+ let { sendErrorToBugsnag } = await import("./error-handler-JMG43AG2.js");
91
91
  await sendErrorToBugsnag(errorMessage, "unexpected_error");
92
92
  }
93
93
  }
@@ -199,4 +199,4 @@ export {
199
199
  fetchNotificationsInBackground,
200
200
  stringifyFilters
201
201
  };
202
- //# sourceMappingURL=chunk-OZYTPWJS.js.map
202
+ //# sourceMappingURL=chunk-HQF3OQCV.js.map
@@ -21,7 +21,7 @@ import {
21
21
  require_get_stream,
22
22
  runWithTimer,
23
23
  writeFile
24
- } from "./chunk-7Z57GKMD.js";
24
+ } from "./chunk-R2JN4S25.js";
25
25
  import {
26
26
  dirname,
27
27
  joinPath
@@ -13439,7 +13439,7 @@ async function latestVersion(packageName, options) {
13439
13439
  }
13440
13440
 
13441
13441
  // ../cli-kit/dist/public/node/node-package-manager.js
13442
- var import_semver3 = __toESM(require_semver()), yarnLockfile = "yarn.lock", npmLockfile = "package-lock.json", pnpmLockfile = "pnpm-lock.yaml", bunLockfile = "bun.lockb", pnpmWorkspaceFile = "pnpm-workspace.yaml", lockfiles = [yarnLockfile, pnpmLockfile, npmLockfile, bunLockfile], lockfilesByManager = {
13442
+ var import_semver3 = __toESM(require_semver(), 1), yarnLockfile = "yarn.lock", npmLockfile = "package-lock.json", pnpmLockfile = "pnpm-lock.yaml", bunLockfile = "bun.lockb", pnpmWorkspaceFile = "pnpm-workspace.yaml", lockfiles = [yarnLockfile, pnpmLockfile, npmLockfile, bunLockfile], lockfilesByManager = {
13443
13443
  yarn: yarnLockfile,
13444
13444
  npm: npmLockfile,
13445
13445
  pnpm: pnpmLockfile,
@@ -13749,4 +13749,4 @@ deep-extend/lib/deep-extend.js:
13749
13749
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13750
13750
  *)
13751
13751
  */
13752
- //# sourceMappingURL=chunk-YW77LWOY.js.map
13752
+ //# sourceMappingURL=chunk-ICGAJSRH.js.map