@shopify/cli-hydrogen 6.1.0 → 7.0.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 (97) hide show
  1. package/dist/commands/hydrogen/build.js +40 -78
  2. package/dist/commands/hydrogen/codegen.js +8 -3
  3. package/dist/commands/hydrogen/deploy.js +107 -35
  4. package/dist/commands/hydrogen/deploy.test.js +83 -13
  5. package/dist/commands/hydrogen/dev.js +30 -15
  6. package/dist/commands/hydrogen/init.js +1 -1
  7. package/dist/commands/hydrogen/init.test.js +155 -53
  8. package/dist/commands/hydrogen/link.js +5 -21
  9. package/dist/commands/hydrogen/link.test.js +10 -10
  10. package/dist/commands/hydrogen/preview.js +7 -6
  11. package/dist/commands/hydrogen/setup.js +0 -4
  12. package/dist/commands/hydrogen/setup.test.js +0 -1
  13. package/dist/commands/hydrogen/upgrade.js +15 -0
  14. package/dist/generator-templates/starter/.graphqlrc.yml +12 -1
  15. package/dist/generator-templates/starter/CHANGELOG.md +56 -0
  16. package/dist/generator-templates/starter/README.md +23 -0
  17. package/dist/generator-templates/starter/app/components/Cart.tsx +1 -1
  18. package/dist/generator-templates/starter/app/components/Header.tsx +5 -1
  19. package/dist/generator-templates/starter/app/components/Layout.tsx +1 -1
  20. package/dist/generator-templates/starter/app/components/Search.tsx +1 -1
  21. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerAddressMutations.ts +61 -0
  22. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +39 -0
  23. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerOrderQuery.ts +87 -0
  24. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +58 -0
  25. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +24 -0
  26. package/dist/generator-templates/starter/app/lib/fragments.ts +102 -0
  27. package/dist/generator-templates/starter/app/lib/session.ts +67 -0
  28. package/dist/generator-templates/starter/app/root.tsx +11 -45
  29. package/dist/generator-templates/starter/app/routes/account.$.tsx +8 -4
  30. package/dist/generator-templates/starter/app/routes/account._index.tsx +5 -0
  31. package/dist/generator-templates/starter/app/routes/account.addresses.tsx +215 -206
  32. package/dist/generator-templates/starter/app/routes/account.orders.$id.tsx +56 -163
  33. package/dist/generator-templates/starter/app/routes/account.orders._index.tsx +32 -109
  34. package/dist/generator-templates/starter/app/routes/account.profile.tsx +40 -180
  35. package/dist/generator-templates/starter/app/routes/account.tsx +20 -135
  36. package/dist/generator-templates/starter/app/routes/account_.authorize.tsx +5 -0
  37. package/dist/generator-templates/starter/app/routes/account_.login.tsx +3 -140
  38. package/dist/generator-templates/starter/app/routes/account_.logout.tsx +5 -24
  39. package/dist/generator-templates/starter/app/routes/cart.tsx +7 -5
  40. package/dist/generator-templates/starter/app/routes/collections.$handle.tsx +1 -1
  41. package/dist/generator-templates/starter/app/routes/products.$handle.tsx +2 -2
  42. package/dist/generator-templates/starter/app/routes/search.tsx +1 -1
  43. package/dist/generator-templates/starter/customer-accountapi.generated.d.ts +506 -0
  44. package/dist/generator-templates/starter/package.json +11 -11
  45. package/dist/generator-templates/starter/remix.config.js +4 -0
  46. package/dist/generator-templates/starter/remix.env.d.ts +4 -11
  47. package/dist/generator-templates/starter/server.ts +24 -167
  48. package/dist/generator-templates/starter/storefrontapi.generated.d.ts +104 -881
  49. package/dist/hooks/init.js +4 -4
  50. package/dist/lib/auth.js +5 -10
  51. package/dist/lib/build.js +6 -1
  52. package/dist/lib/bundle/analyzer.js +36 -26
  53. package/dist/lib/codegen.js +58 -18
  54. package/dist/lib/defer.js +12 -0
  55. package/dist/lib/file.js +52 -3
  56. package/dist/lib/flags.js +15 -8
  57. package/dist/lib/get-oxygen-deployment-data.test.js +4 -2
  58. package/dist/lib/graphql/admin/client.test.js +2 -2
  59. package/dist/lib/graphql/admin/get-oxygen-data.js +1 -0
  60. package/dist/lib/log.js +31 -14
  61. package/dist/lib/mini-oxygen/index.js +4 -5
  62. package/dist/lib/mini-oxygen/mini-oxygen.test.js +214 -0
  63. package/dist/lib/mini-oxygen/node.js +4 -2
  64. package/dist/lib/mini-oxygen/workerd-inspector-logs.js +2 -2
  65. package/dist/lib/mini-oxygen/workerd.js +27 -10
  66. package/dist/lib/missing-routes.js +6 -3
  67. package/dist/lib/onboarding/common.js +40 -9
  68. package/dist/lib/onboarding/local.js +19 -11
  69. package/dist/lib/onboarding/remote.js +48 -28
  70. package/dist/lib/request-events.js +65 -31
  71. package/dist/lib/setups/css/assets.js +1 -46
  72. package/dist/lib/setups/css/css-modules.js +3 -2
  73. package/dist/lib/setups/css/postcss.js +4 -2
  74. package/dist/lib/setups/css/tailwind.js +4 -2
  75. package/dist/lib/setups/css/vanilla-extract.js +3 -2
  76. package/dist/lib/setups/i18n/replacers.test.js +54 -38
  77. package/dist/lib/template-diff.js +89 -0
  78. package/dist/lib/template-downloader.js +3 -2
  79. package/dist/lib/transpile/project.js +1 -1
  80. package/dist/virtual-routes/assets/debug-network.css +592 -0
  81. package/dist/virtual-routes/assets/favicon-dark.svg +20 -0
  82. package/dist/virtual-routes/components/FlameChartWrapper.jsx +8 -10
  83. package/dist/virtual-routes/components/IconClose.jsx +38 -0
  84. package/dist/virtual-routes/components/IconDiscard.jsx +44 -0
  85. package/dist/virtual-routes/components/RequestDetails.jsx +179 -0
  86. package/dist/virtual-routes/components/RequestTable.jsx +92 -0
  87. package/dist/virtual-routes/components/RequestWaterfall.jsx +151 -0
  88. package/dist/virtual-routes/lib/useDebugNetworkServer.jsx +176 -0
  89. package/dist/virtual-routes/routes/subrequest-profiler.jsx +243 -0
  90. package/oclif.manifest.json +54 -61
  91. package/package.json +14 -11
  92. package/dist/generator-templates/starter/app/routes/account_.activate.$id.$activationToken.tsx +0 -161
  93. package/dist/generator-templates/starter/app/routes/account_.recover.tsx +0 -129
  94. package/dist/generator-templates/starter/app/routes/account_.register.tsx +0 -207
  95. package/dist/generator-templates/starter/app/routes/account_.reset.$id.$resetToken.tsx +0 -136
  96. package/dist/virtual-routes/routes/debug-network.jsx +0 -289
  97. /package/dist/generator-templates/starter/app/{utils.ts → lib/variants.ts} +0 -0
@@ -0,0 +1,243 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { Script } from "@shopify/hydrogen";
4
+ import { RequestWaterfall } from "../components/RequestWaterfall.jsx";
5
+ import { RequestTable } from "../components/RequestTable.jsx";
6
+ import { Link } from "@remix-run/react";
7
+ import favicon from "../assets/favicon.svg";
8
+ import faviconDark from "../assets/favicon-dark.svg";
9
+ import styles from "../assets/debug-network.css";
10
+ import { useDebugNetworkServer } from "../lib/useDebugNetworkServer.jsx";
11
+ import { RequestDetails } from "../components/RequestDetails.jsx";
12
+ import { IconClose } from "../components/IconClose.jsx";
13
+ import { IconDiscard } from "../components/IconDiscard.jsx";
14
+ const links = () => {
15
+ return [
16
+ {
17
+ rel: "icon",
18
+ type: "image/svg+xml",
19
+ href: favicon
20
+ },
21
+ {
22
+ rel: "stylesheet",
23
+ href: styles
24
+ }
25
+ ];
26
+ };
27
+ const WATERFALL_CONFIG = {
28
+ colors: {
29
+ server: "#2ED389",
30
+ streaming: "#33CCFF",
31
+ subRequest: "#FFCC00"
32
+ }
33
+ };
34
+ function DebugNetwork() {
35
+ const {
36
+ serverEvents,
37
+ clear,
38
+ timestamp,
39
+ setHidePutRequests,
40
+ setPreserveLog,
41
+ setHideNotification
42
+ } = useDebugNetworkServer();
43
+ const isEmptyState = serverEvents.mainRequests.length === 0;
44
+ return /* @__PURE__ */ jsxs(
45
+ "div",
46
+ {
47
+ id: "server-network-timing",
48
+ className: `${serverEvents.hideNotification ? "" : "withNotification"}`,
49
+ children: [
50
+ /* @__PURE__ */ jsx(
51
+ Script,
52
+ {
53
+ src: "https://unpkg.com/flame-chart-js@2.3.2/dist/index.min.js",
54
+ suppressHydrationWarning: true
55
+ }
56
+ ),
57
+ /* @__PURE__ */ jsx(
58
+ NotificationBanner,
59
+ {
60
+ hideNotification: serverEvents.hideNotification,
61
+ setHideNotification
62
+ }
63
+ ),
64
+ /* @__PURE__ */ jsx(DebugHeader, {}),
65
+ /* @__PURE__ */ jsxs("div", { id: "main", className: `${isEmptyState ? " empty" : ""}`, children: [
66
+ /* @__PURE__ */ jsx(
67
+ OptionsAndLegend,
68
+ {
69
+ serverEvents,
70
+ clearCallback: clear,
71
+ setHidePutRequests,
72
+ setPreserveLog
73
+ }
74
+ ),
75
+ /* @__PURE__ */ jsx("div", { id: "request-waterfall", className: "pad", children: isEmptyState ? /* @__PURE__ */ jsx(EmptyState, {}) : /* @__PURE__ */ jsx("div", { className: "request-waterfall-chart", children: /* @__PURE__ */ jsx(
76
+ RequestWaterfall,
77
+ {
78
+ serverEvents,
79
+ config: WATERFALL_CONFIG
80
+ },
81
+ timestamp
82
+ ) }) }),
83
+ /* @__PURE__ */ jsx(RequestInfo, { serverEvents })
84
+ ] })
85
+ ]
86
+ }
87
+ );
88
+ }
89
+ function NotificationBanner({
90
+ hideNotification,
91
+ setHideNotification
92
+ }) {
93
+ if (hideNotification) {
94
+ return null;
95
+ }
96
+ return /* @__PURE__ */ jsxs("div", { className: "notification", children: [
97
+ /* @__PURE__ */ jsx("div", { id: "close-notification", children: /* @__PURE__ */ jsx(
98
+ "button",
99
+ {
100
+ className: "plain icon",
101
+ onClick: () => {
102
+ setHideNotification(true);
103
+ },
104
+ children: /* @__PURE__ */ jsx(IconClose, {})
105
+ }
106
+ ) }),
107
+ /* @__PURE__ */ jsx("p", { children: "Note: You may need to turn on 'Disable Cache' for your navigating window." })
108
+ ] });
109
+ }
110
+ function EmptyState() {
111
+ return /* @__PURE__ */ jsxs("div", { id: "empty-view", children: [
112
+ /* @__PURE__ */ jsx("p", { className: "text-large bold", children: "Navigate to your app" }),
113
+ /* @__PURE__ */ jsx("p", { className: "text-normal", children: "Open your localhost to initiate subrequest profiler" }),
114
+ /* @__PURE__ */ jsx(Link, { to: "/", target: "_blank", className: "link-margin-top", children: /* @__PURE__ */ jsx("button", { className: "primary", children: "Open app" }) })
115
+ ] });
116
+ }
117
+ function DebugHeader() {
118
+ return /* @__PURE__ */ jsx("header", { className: "justify-between text-large", children: /* @__PURE__ */ jsxs("div", { className: "flex-row", children: [
119
+ /* @__PURE__ */ jsx("img", { className: "logo", src: faviconDark, alt: "Hydrogen logo" }),
120
+ /* @__PURE__ */ jsx("h1", { children: "Subrequest Profiler" }),
121
+ /* @__PURE__ */ jsx("span", { className: "pill", children: "Development" })
122
+ ] }) });
123
+ }
124
+ function OptionsAndLegend({
125
+ serverEvents,
126
+ clearCallback,
127
+ setHidePutRequests,
128
+ setPreserveLog
129
+ }) {
130
+ return /* @__PURE__ */ jsxs("div", { id: "options-and-legend", className: "justify-between pad", children: [
131
+ /* @__PURE__ */ jsxs("div", { className: "flex-row text-large", children: [
132
+ /* @__PURE__ */ jsxs("button", { id: "buttonClear", onClick: () => clearCallback(), children: [
133
+ /* @__PURE__ */ jsx(IconDiscard, {}),
134
+ /* @__PURE__ */ jsx("span", { children: "Clear" })
135
+ ] }),
136
+ /* @__PURE__ */ jsxs("div", { className: "form-control", children: [
137
+ /* @__PURE__ */ jsx(
138
+ "input",
139
+ {
140
+ id: "hidePutRequests",
141
+ type: "checkbox",
142
+ checked: serverEvents.hidePutRequests,
143
+ onChange: (event) => setHidePutRequests(event.target.checked)
144
+ }
145
+ ),
146
+ /* @__PURE__ */ jsx("label", { htmlFor: "hidePutRequests", children: "Hide cache update requests (PUT)" })
147
+ ] }),
148
+ /* @__PURE__ */ jsxs("div", { className: "form-control", children: [
149
+ /* @__PURE__ */ jsx(
150
+ "input",
151
+ {
152
+ id: "preserveLog",
153
+ type: "checkbox",
154
+ checked: serverEvents.preserveLog,
155
+ onChange: (event) => setPreserveLog(event.target.checked)
156
+ }
157
+ ),
158
+ /* @__PURE__ */ jsx("label", { htmlFor: "preserveLog", children: "Preserve Log" })
159
+ ] })
160
+ ] }),
161
+ /* @__PURE__ */ jsxs("div", { className: "flex-row text-normal gap-small", children: [
162
+ /* @__PURE__ */ jsxs("div", { className: "legend flex-row", children: [
163
+ /* @__PURE__ */ jsx("p", { className: "bold-1", children: "Main Request" }),
164
+ /* @__PURE__ */ jsxs("p", { className: "flex-row gap-small", children: [
165
+ /* @__PURE__ */ jsx(
166
+ "span",
167
+ {
168
+ className: "swatch",
169
+ style: {
170
+ backgroundColor: WATERFALL_CONFIG.colors.server
171
+ }
172
+ }
173
+ ),
174
+ "Time on server"
175
+ ] }),
176
+ /* @__PURE__ */ jsxs("p", { className: "flex-row gap-small", children: [
177
+ /* @__PURE__ */ jsx(
178
+ "span",
179
+ {
180
+ className: "swatch",
181
+ style: {
182
+ backgroundColor: WATERFALL_CONFIG.colors.streaming
183
+ }
184
+ }
185
+ ),
186
+ "Time to stream to client"
187
+ ] })
188
+ ] }),
189
+ /* @__PURE__ */ jsx("div", { className: "legend flex-row", children: /* @__PURE__ */ jsxs("p", { className: "flex-row gap-small", children: [
190
+ /* @__PURE__ */ jsx(
191
+ "span",
192
+ {
193
+ className: "swatch",
194
+ style: {
195
+ backgroundColor: WATERFALL_CONFIG.colors.subRequest
196
+ }
197
+ }
198
+ ),
199
+ "Sub request"
200
+ ] }) })
201
+ ] })
202
+ ] });
203
+ }
204
+ function RequestInfo({ serverEvents }) {
205
+ const [activeEventId, setActiveEventId] = useState();
206
+ useEffect(() => {
207
+ window.setActiveEventId = setActiveEventId;
208
+ }, []);
209
+ useEffect(() => {
210
+ if (!activeEventId) {
211
+ setActiveEventId(void 0);
212
+ }
213
+ }, [activeEventId]);
214
+ return /* @__PURE__ */ jsxs("div", { id: "request-info", children: [
215
+ /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx(
216
+ RequestTable,
217
+ {
218
+ serverEvents,
219
+ activeEventId,
220
+ setActiveEventId
221
+ }
222
+ ) }),
223
+ /* @__PURE__ */ jsx(
224
+ "div",
225
+ {
226
+ id: "request-details-panel",
227
+ className: `${activeEventId ? "active" : ""}`,
228
+ children: /* @__PURE__ */ jsx(
229
+ RequestDetails,
230
+ {
231
+ serverEvents,
232
+ activeEventId,
233
+ setActiveEventId
234
+ }
235
+ )
236
+ }
237
+ )
238
+ ] });
239
+ }
240
+ export {
241
+ DebugNetwork as default,
242
+ links
243
+ };
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "6.1.0",
2
+ "version": "7.0.0",
3
3
  "commands": {
4
4
  "hydrogen:build": {
5
5
  "id": "hydrogen:build",
@@ -45,10 +45,7 @@
45
45
  "type": "boolean",
46
46
  "description": "Generate types for the Storefront API queries found in your project.",
47
47
  "required": false,
48
- "allowNo": false,
49
- "aliases": [
50
- "codegen-unstable"
51
- ]
48
+ "allowNo": false
52
49
  },
53
50
  "codegen-config-path": {
54
51
  "name": "codegen-config-path",
@@ -60,23 +57,12 @@
60
57
  "codegen"
61
58
  ]
62
59
  },
63
- "base": {
64
- "name": "base",
65
- "type": "option",
66
- "hidden": true,
67
- "multiple": false
68
- },
69
- "entry": {
70
- "name": "entry",
71
- "type": "option",
72
- "hidden": true,
73
- "multiple": false
74
- },
75
- "target": {
76
- "name": "target",
77
- "type": "option",
78
- "hidden": true,
79
- "multiple": false
60
+ "diff": {
61
+ "name": "diff",
62
+ "type": "boolean",
63
+ "description": "Applies the current files on top of Hydrogen's starter template in a temporary directory.",
64
+ "required": false,
65
+ "allowNo": false
80
66
  }
81
67
  },
82
68
  "args": {}
@@ -115,62 +101,61 @@
115
101
  "pluginName": "@shopify/cli-hydrogen",
116
102
  "pluginAlias": "@shopify/cli-hydrogen",
117
103
  "pluginType": "core",
118
- "aliases": [
119
- "codegen-unstable"
120
- ],
121
- "deprecateAliases": true,
104
+ "aliases": [],
122
105
  "flags": {
123
106
  "path": {
124
107
  "name": "path",
125
108
  "type": "option",
126
109
  "description": "The path to the directory of the Hydrogen storefront. The default is the current directory.",
127
- "multiple": false,
128
- "deprecateAliases": true
110
+ "multiple": false
129
111
  },
130
112
  "codegen-config-path": {
131
113
  "name": "codegen-config-path",
132
114
  "type": "option",
133
115
  "description": "Specify a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if it exists.",
134
116
  "required": false,
135
- "multiple": false,
136
- "deprecateAliases": true
117
+ "multiple": false
137
118
  },
138
119
  "force-sfapi-version": {
139
120
  "name": "force-sfapi-version",
140
121
  "type": "option",
141
122
  "description": "Force generating Storefront API types for a specific version instead of using the one provided in Hydrogen. A token can also be provided with this format: `<version>:<token>`.",
142
123
  "hidden": true,
143
- "multiple": false,
144
- "deprecateAliases": true
124
+ "multiple": false
145
125
  },
146
126
  "watch": {
147
127
  "name": "watch",
148
128
  "type": "boolean",
149
129
  "description": "Watch the project for changes to update types on file save.",
150
130
  "required": false,
151
- "allowNo": false,
152
- "deprecateAliases": true
131
+ "allowNo": false
153
132
  }
154
133
  },
155
134
  "args": {}
156
135
  },
157
136
  "hydrogen:deploy": {
158
137
  "id": "hydrogen:deploy",
138
+ "description": "Builds and deploys a Hydrogen storefront to Oxygen.",
159
139
  "strict": true,
160
140
  "pluginName": "@shopify/cli-hydrogen",
161
141
  "pluginAlias": "@shopify/cli-hydrogen",
162
142
  "pluginType": "core",
163
- "hidden": true,
164
143
  "aliases": [],
165
144
  "flags": {
166
145
  "env-branch": {
167
146
  "name": "env-branch",
168
147
  "type": "option",
169
- "char": "e",
170
- "description": "Environment branch (tag) for environment to deploy to",
148
+ "description": "Environment branch (tag) for environment to deploy to.",
171
149
  "required": false,
172
150
  "multiple": false
173
151
  },
152
+ "preview": {
153
+ "name": "preview",
154
+ "type": "boolean",
155
+ "description": "Deploys to the Preview environment. Overrides --env-branch and Git metadata.",
156
+ "required": false,
157
+ "allowNo": false
158
+ },
174
159
  "force": {
175
160
  "name": "force",
176
161
  "type": "boolean",
@@ -179,6 +164,13 @@
179
164
  "required": false,
180
165
  "allowNo": false
181
166
  },
167
+ "auth-bypass-token": {
168
+ "name": "auth-bypass-token",
169
+ "type": "boolean",
170
+ "description": "Generate an authentication bypass token, which can be used to perform end-to-end tests against the deployment.",
171
+ "required": false,
172
+ "allowNo": false
173
+ },
182
174
  "path": {
183
175
  "name": "path",
184
176
  "type": "option",
@@ -192,17 +184,10 @@
192
184
  "description": "Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).",
193
185
  "multiple": false
194
186
  },
195
- "public-deployment": {
196
- "name": "public-deployment",
197
- "type": "boolean",
198
- "description": "Marks a preview deployment as publicly accessible.",
199
- "required": false,
200
- "allowNo": false
201
- },
202
187
  "no-json-output": {
203
188
  "name": "no-json-output",
204
189
  "type": "boolean",
205
- "description": "Prevents the command from creating a JSON file containing the deployment URL (in CI environments).",
190
+ "description": "Prevents the command from creating a JSON file containing the deployment URL in CI environments.",
206
191
  "required": false,
207
192
  "allowNo": false
208
193
  },
@@ -210,7 +195,7 @@
210
195
  "name": "token",
211
196
  "type": "option",
212
197
  "char": "t",
213
- "description": "Oxygen deployment token",
198
+ "description": "Oxygen deployment token. Defaults to the linked storefront's token if available.",
214
199
  "required": false,
215
200
  "multiple": false
216
201
  },
@@ -224,7 +209,7 @@
224
209
  "metadata-url": {
225
210
  "name": "metadata-url",
226
211
  "type": "option",
227
- "description": "URL that links to the deployment. Will be saved and displayed in the Shopify admin",
212
+ "hidden": true,
228
213
  "required": false,
229
214
  "multiple": false
230
215
  },
@@ -238,7 +223,7 @@
238
223
  "metadata-version": {
239
224
  "name": "metadata-version",
240
225
  "type": "option",
241
- "description": "A version identifier for the deployment. Will be saved and displayed in the Shopify admin",
226
+ "hidden": true,
242
227
  "required": false,
243
228
  "multiple": false
244
229
  }
@@ -270,7 +255,12 @@
270
255
  "worker": {
271
256
  "name": "worker",
272
257
  "type": "boolean",
273
- "description": "Run the app in a worker environment closer to Oxygen production instead of a Node.js sandbox.",
258
+ "hidden": true
259
+ },
260
+ "legacy-runtime": {
261
+ "name": "legacy-runtime",
262
+ "type": "boolean",
263
+ "description": "Run the app in a Node.js sandbox instead of an Oxygen worker.",
274
264
  "allowNo": false
275
265
  },
276
266
  "codegen": {
@@ -278,10 +268,7 @@
278
268
  "type": "boolean",
279
269
  "description": "Generate types for the Storefront API queries found in your project. It updates the types on file save.",
280
270
  "required": false,
281
- "allowNo": false,
282
- "aliases": [
283
- "codegen-unstable"
284
- ]
271
+ "allowNo": false
285
272
  },
286
273
  "codegen-config-path": {
287
274
  "name": "codegen-config-path",
@@ -318,12 +305,6 @@
318
305
  "multiple": false,
319
306
  "default": 9229
320
307
  },
321
- "host": {
322
- "name": "host",
323
- "type": "option",
324
- "hidden": true,
325
- "multiple": false
326
- },
327
308
  "env-branch": {
328
309
  "name": "env-branch",
329
310
  "type": "option",
@@ -337,6 +318,13 @@
337
318
  "description": "Skip the version check when running `hydrogen dev`",
338
319
  "required": false,
339
320
  "allowNo": false
321
+ },
322
+ "diff": {
323
+ "name": "diff",
324
+ "type": "boolean",
325
+ "description": "Applies the current files on top of Hydrogen's starter template in a temporary directory.",
326
+ "required": false,
327
+ "allowNo": false
340
328
  }
341
329
  },
342
330
  "args": {}
@@ -384,7 +372,7 @@
384
372
  "template": {
385
373
  "name": "template",
386
374
  "type": "option",
387
- "description": "Sets the template to use. Pass `demo-store` for a fully-featured store template or `hello-world` for a barebones project.",
375
+ "description": "Scaffolds project based on an existing template or example from the Hydrogen repository.",
388
376
  "multiple": false
389
377
  },
390
378
  "install-deps": {
@@ -550,7 +538,12 @@
550
538
  "worker": {
551
539
  "name": "worker",
552
540
  "type": "boolean",
553
- "description": "Run the app in a worker environment closer to Oxygen production instead of a Node.js sandbox.",
541
+ "hidden": true
542
+ },
543
+ "legacy-runtime": {
544
+ "name": "legacy-runtime",
545
+ "type": "boolean",
546
+ "description": "Run the app in a Node.js sandbox instead of an Oxygen worker.",
554
547
  "allowNo": false
555
548
  },
556
549
  "env-branch": {
package/package.json CHANGED
@@ -4,18 +4,19 @@
4
4
  "access": "public",
5
5
  "@shopify:registry": "https://registry.npmjs.org"
6
6
  },
7
- "version": "6.1.0",
7
+ "version": "7.0.0",
8
8
  "license": "MIT",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "build": "tsup && node scripts/build-check.mjs",
12
- "dev": "tsup --watch",
12
+ "dev": "tsup --watch ./src",
13
13
  "typecheck": "tsc --noEmit",
14
14
  "generate:manifest": "node scripts/generate-manifest.mjs",
15
15
  "test": "cross-env SHOPIFY_UNIT_TEST=1 vitest run --test-timeout=20000",
16
16
  "test:watch": "cross-env SHOPIFY_UNIT_TEST=1 vitest --test-timeout=20000"
17
17
  },
18
18
  "devDependencies": {
19
+ "@remix-run/dev": "^2.5.1",
19
20
  "@types/diff": "^5.0.2",
20
21
  "@types/fs-extra": "^11.0.1",
21
22
  "@types/gunzip-maybe": "^1.4.0",
@@ -23,34 +24,36 @@
23
24
  "@types/recursive-readdir": "^2.2.1",
24
25
  "@types/stack-trace": "^0.0.30",
25
26
  "@types/tar-fs": "^2.0.1",
26
- "@vitest/coverage-v8": "^0.33.0",
27
+ "@vitest/coverage-v8": "^1.0.4",
27
28
  "devtools-protocol": "^0.0.1177611",
28
29
  "fast-glob": "^3.2.12",
29
- "flame-chart-js": "2.3.1",
30
+ "flame-chart-js": "2.3.2",
30
31
  "get-port": "^7.0.0",
31
- "type-fest": "^3.6.0",
32
- "vitest": "^0.33.0"
32
+ "type-fest": "^4.5.0",
33
+ "vitest": "^1.0.4"
33
34
  },
34
35
  "dependencies": {
35
36
  "@ast-grep/napi": "0.11.0",
36
37
  "@graphql-codegen/cli": "5.0.0",
37
38
  "@oclif/core": "2.11.7",
38
- "@shopify/cli-kit": "3.51.0",
39
- "@shopify/hydrogen-codegen": "^0.1.0",
40
- "@shopify/mini-oxygen": "^2.2.4",
41
- "@shopify/oxygen-cli": "2.6.2",
39
+ "@shopify/cli-kit": "3.52.0",
40
+ "@shopify/hydrogen-codegen": "^0.2.0",
41
+ "@shopify/mini-oxygen": "^2.2.5",
42
+ "@shopify/oxygen-cli": "^4.0.0",
42
43
  "ansi-escapes": "^6.2.0",
43
44
  "cli-truncate": "^4.0.0",
44
45
  "diff": "^5.1.0",
45
46
  "fs-extra": "^11.1.0",
46
47
  "get-port": "^7.0.0",
48
+ "graphql-config": "5.0.3",
47
49
  "gunzip-maybe": "^1.4.2",
48
- "miniflare": "3.20231016.0",
50
+ "miniflare": "3.20231218.2",
49
51
  "prettier": "^2.8.4",
50
52
  "semver": "^7.5.3",
51
53
  "source-map": "^0.7.4",
52
54
  "stack-trace": "^1.0.0-pre2",
53
55
  "tar-fs": "^2.1.1",
56
+ "tempy": "^3.0.0",
54
57
  "ts-morph": "20.0.0",
55
58
  "use-resize-observer": "^9.1.0",
56
59
  "ws": "^8.13.0"