@shopify/cli-hydrogen 6.0.2 → 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 (108) 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 +173 -37
  4. package/dist/commands/hydrogen/deploy.test.js +192 -20
  5. package/dist/commands/hydrogen/dev.js +56 -31
  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 +22 -11
  11. package/dist/commands/hydrogen/setup.js +0 -4
  12. package/dist/commands/hydrogen/setup.test.js +0 -1
  13. package/dist/commands/hydrogen/shortcut.js +1 -0
  14. package/dist/commands/hydrogen/upgrade.js +720 -0
  15. package/dist/commands/hydrogen/upgrade.test.js +786 -0
  16. package/dist/generator-templates/starter/.graphqlrc.yml +12 -1
  17. package/dist/generator-templates/starter/CHANGELOG.md +126 -0
  18. package/dist/generator-templates/starter/README.md +23 -0
  19. package/dist/generator-templates/starter/app/components/Cart.tsx +1 -1
  20. package/dist/generator-templates/starter/app/components/Footer.tsx +3 -1
  21. package/dist/generator-templates/starter/app/components/Header.tsx +5 -1
  22. package/dist/generator-templates/starter/app/components/Layout.tsx +14 -11
  23. package/dist/generator-templates/starter/app/components/Search.tsx +1 -1
  24. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerAddressMutations.ts +61 -0
  25. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +39 -0
  26. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerOrderQuery.ts +87 -0
  27. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +58 -0
  28. package/dist/generator-templates/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +24 -0
  29. package/dist/generator-templates/starter/app/lib/fragments.ts +102 -0
  30. package/dist/generator-templates/starter/app/lib/session.ts +67 -0
  31. package/dist/generator-templates/starter/app/root.tsx +11 -45
  32. package/dist/generator-templates/starter/app/routes/[robots.txt].tsx +0 -27
  33. package/dist/generator-templates/starter/app/routes/account.$.tsx +8 -4
  34. package/dist/generator-templates/starter/app/routes/account._index.tsx +5 -0
  35. package/dist/generator-templates/starter/app/routes/account.addresses.tsx +215 -206
  36. package/dist/generator-templates/starter/app/routes/account.orders.$id.tsx +56 -163
  37. package/dist/generator-templates/starter/app/routes/account.orders._index.tsx +32 -109
  38. package/dist/generator-templates/starter/app/routes/account.profile.tsx +40 -180
  39. package/dist/generator-templates/starter/app/routes/account.tsx +20 -135
  40. package/dist/generator-templates/starter/app/routes/account_.authorize.tsx +5 -0
  41. package/dist/generator-templates/starter/app/routes/account_.login.tsx +3 -140
  42. package/dist/generator-templates/starter/app/routes/account_.logout.tsx +5 -24
  43. package/dist/generator-templates/starter/app/routes/cart.tsx +7 -5
  44. package/dist/generator-templates/starter/app/routes/collections.$handle.tsx +1 -1
  45. package/dist/generator-templates/starter/app/routes/products.$handle.tsx +2 -2
  46. package/dist/generator-templates/starter/app/routes/search.tsx +1 -1
  47. package/dist/generator-templates/starter/customer-accountapi.generated.d.ts +506 -0
  48. package/dist/generator-templates/starter/package.json +11 -10
  49. package/dist/generator-templates/starter/remix.config.js +4 -0
  50. package/dist/generator-templates/starter/remix.env.d.ts +6 -11
  51. package/dist/generator-templates/starter/server.ts +24 -167
  52. package/dist/generator-templates/starter/storefrontapi.generated.d.ts +104 -881
  53. package/dist/hooks/init.js +4 -4
  54. package/dist/lib/auth.js +5 -10
  55. package/dist/lib/build.js +6 -1
  56. package/dist/lib/bundle/analyzer.js +36 -26
  57. package/dist/lib/check-lockfile.js +1 -0
  58. package/dist/lib/codegen.js +59 -18
  59. package/dist/lib/defer.js +12 -0
  60. package/dist/lib/file.js +52 -3
  61. package/dist/lib/flags.js +27 -9
  62. package/dist/lib/get-oxygen-deployment-data.test.js +4 -2
  63. package/dist/lib/graphql/admin/client.test.js +2 -2
  64. package/dist/lib/graphql/admin/get-oxygen-data.js +1 -0
  65. package/dist/lib/log.js +32 -14
  66. package/dist/lib/mini-oxygen/assets.js +118 -0
  67. package/dist/lib/mini-oxygen/common.js +2 -1
  68. package/dist/lib/mini-oxygen/index.js +7 -5
  69. package/dist/lib/mini-oxygen/mini-oxygen.test.js +214 -0
  70. package/dist/lib/mini-oxygen/node.js +19 -5
  71. package/dist/lib/mini-oxygen/workerd-inspector-logs.js +227 -0
  72. package/dist/lib/mini-oxygen/workerd-inspector-proxy.js +200 -0
  73. package/dist/lib/mini-oxygen/workerd-inspector.js +62 -235
  74. package/dist/lib/mini-oxygen/workerd.js +74 -50
  75. package/dist/lib/missing-routes.js +6 -3
  76. package/dist/lib/onboarding/common.js +40 -9
  77. package/dist/lib/onboarding/local.js +19 -11
  78. package/dist/lib/onboarding/remote.js +48 -28
  79. package/dist/lib/render-errors.js +2 -0
  80. package/dist/lib/request-events.js +65 -31
  81. package/dist/lib/setups/css/assets.js +1 -46
  82. package/dist/lib/setups/css/css-modules.js +3 -2
  83. package/dist/lib/setups/css/postcss.js +4 -2
  84. package/dist/lib/setups/css/tailwind.js +4 -2
  85. package/dist/lib/setups/css/vanilla-extract.js +3 -2
  86. package/dist/lib/setups/i18n/replacers.test.js +56 -38
  87. package/dist/lib/shell.js +1 -1
  88. package/dist/lib/template-diff.js +89 -0
  89. package/dist/lib/template-downloader.js +3 -2
  90. package/dist/lib/transpile/project.js +1 -1
  91. package/dist/virtual-routes/assets/debug-network.css +592 -0
  92. package/dist/virtual-routes/assets/favicon-dark.svg +20 -0
  93. package/dist/virtual-routes/components/FlameChartWrapper.jsx +8 -10
  94. package/dist/virtual-routes/components/IconClose.jsx +38 -0
  95. package/dist/virtual-routes/components/IconDiscard.jsx +44 -0
  96. package/dist/virtual-routes/components/RequestDetails.jsx +179 -0
  97. package/dist/virtual-routes/components/RequestTable.jsx +92 -0
  98. package/dist/virtual-routes/components/RequestWaterfall.jsx +151 -0
  99. package/dist/virtual-routes/lib/useDebugNetworkServer.jsx +176 -0
  100. package/dist/virtual-routes/routes/subrequest-profiler.jsx +243 -0
  101. package/oclif.manifest.json +134 -59
  102. package/package.json +18 -26
  103. package/dist/generator-templates/starter/app/routes/account_.activate.$id.$activationToken.tsx +0 -161
  104. package/dist/generator-templates/starter/app/routes/account_.recover.tsx +0 -129
  105. package/dist/generator-templates/starter/app/routes/account_.register.tsx +0 -207
  106. package/dist/generator-templates/starter/app/routes/account_.reset.$id.$resetToken.tsx +0 -136
  107. package/dist/virtual-routes/routes/debug-network.jsx +0 -289
  108. /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.0.2",
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,76 @@
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
+ },
159
+ "force": {
160
+ "name": "force",
161
+ "type": "boolean",
162
+ "char": "f",
163
+ "description": "Forces a deployment to proceed if there are uncommited changes in its Git repository.",
164
+ "required": false,
165
+ "allowNo": false
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
+ },
174
174
  "path": {
175
175
  "name": "path",
176
176
  "type": "option",
@@ -184,10 +184,10 @@
184
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).",
185
185
  "multiple": false
186
186
  },
187
- "public-deployment": {
188
- "name": "public-deployment",
187
+ "no-json-output": {
188
+ "name": "no-json-output",
189
189
  "type": "boolean",
190
- "description": "Marks a preview deployment as publicly accessible.",
190
+ "description": "Prevents the command from creating a JSON file containing the deployment URL in CI environments.",
191
191
  "required": false,
192
192
  "allowNo": false
193
193
  },
@@ -195,14 +195,21 @@
195
195
  "name": "token",
196
196
  "type": "option",
197
197
  "char": "t",
198
- "description": "Oxygen deployment token",
198
+ "description": "Oxygen deployment token. Defaults to the linked storefront's token if available.",
199
+ "required": false,
200
+ "multiple": false
201
+ },
202
+ "metadata-description": {
203
+ "name": "metadata-description",
204
+ "type": "option",
205
+ "description": "Description of the changes in the deployment. Defaults to the commit message of the latest commit if there are no uncommited changes.",
199
206
  "required": false,
200
207
  "multiple": false
201
208
  },
202
209
  "metadata-url": {
203
210
  "name": "metadata-url",
204
211
  "type": "option",
205
- "description": "URL that links to the deployment. Will be saved and displayed in the Shopify admin",
212
+ "hidden": true,
206
213
  "required": false,
207
214
  "multiple": false
208
215
  },
@@ -216,7 +223,7 @@
216
223
  "metadata-version": {
217
224
  "name": "metadata-version",
218
225
  "type": "option",
219
- "description": "A version identifier for the deployment. Will be saved and displayed in the Shopify admin",
226
+ "hidden": true,
220
227
  "required": false,
221
228
  "multiple": false
222
229
  }
@@ -245,10 +252,15 @@
245
252
  "multiple": false,
246
253
  "default": 3000
247
254
  },
248
- "worker-unstable": {
249
- "name": "worker-unstable",
255
+ "worker": {
256
+ "name": "worker",
257
+ "type": "boolean",
258
+ "hidden": true
259
+ },
260
+ "legacy-runtime": {
261
+ "name": "legacy-runtime",
250
262
  "type": "boolean",
251
- "description": "Run the app in a worker environment closer to Oxygen production instead of a Node.js sandbox. This flag is unstable and may change without notice.",
263
+ "description": "Run the app in a Node.js sandbox instead of an Oxygen worker.",
252
264
  "allowNo": false
253
265
  },
254
266
  "codegen": {
@@ -256,10 +268,7 @@
256
268
  "type": "boolean",
257
269
  "description": "Generate types for the Storefront API queries found in your project. It updates the types on file save.",
258
270
  "required": false,
259
- "allowNo": false,
260
- "aliases": [
261
- "codegen-unstable"
262
- ]
271
+ "allowNo": false
263
272
  },
264
273
  "codegen-config-path": {
265
274
  "name": "codegen-config-path",
@@ -286,14 +295,15 @@
286
295
  "debug": {
287
296
  "name": "debug",
288
297
  "type": "boolean",
289
- "description": "Attaches a Node inspector",
298
+ "description": "Enables inspector connections with a debugger.",
290
299
  "allowNo": false
291
300
  },
292
- "host": {
293
- "name": "host",
301
+ "inspector-port": {
302
+ "name": "inspector-port",
294
303
  "type": "option",
295
- "hidden": true,
296
- "multiple": false
304
+ "description": "Port where the inspector will be available.",
305
+ "multiple": false,
306
+ "default": 9229
297
307
  },
298
308
  "env-branch": {
299
309
  "name": "env-branch",
@@ -301,6 +311,20 @@
301
311
  "char": "e",
302
312
  "description": "Specify an environment's branch name when using remote environment variables.",
303
313
  "multiple": false
314
+ },
315
+ "disable-version-check": {
316
+ "name": "disable-version-check",
317
+ "type": "boolean",
318
+ "description": "Skip the version check when running `hydrogen dev`",
319
+ "required": false,
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
304
328
  }
305
329
  },
306
330
  "args": {}
@@ -348,7 +372,7 @@
348
372
  "template": {
349
373
  "name": "template",
350
374
  "type": "option",
351
- "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.",
352
376
  "multiple": false
353
377
  },
354
378
  "install-deps": {
@@ -511,10 +535,15 @@
511
535
  "multiple": false,
512
536
  "default": 3000
513
537
  },
514
- "worker-unstable": {
515
- "name": "worker-unstable",
538
+ "worker": {
539
+ "name": "worker",
540
+ "type": "boolean",
541
+ "hidden": true
542
+ },
543
+ "legacy-runtime": {
544
+ "name": "legacy-runtime",
516
545
  "type": "boolean",
517
- "description": "Run the app in a worker environment closer to Oxygen production instead of a Node.js sandbox. This flag is unstable and may change without notice.",
546
+ "description": "Run the app in a Node.js sandbox instead of an Oxygen worker.",
518
547
  "allowNo": false
519
548
  },
520
549
  "env-branch": {
@@ -523,6 +552,19 @@
523
552
  "char": "e",
524
553
  "description": "Specify an environment's branch name when using remote environment variables.",
525
554
  "multiple": false
555
+ },
556
+ "inspector-port": {
557
+ "name": "inspector-port",
558
+ "type": "option",
559
+ "description": "Port where the inspector will be available.",
560
+ "multiple": false,
561
+ "default": 9229
562
+ },
563
+ "debug": {
564
+ "name": "debug",
565
+ "type": "boolean",
566
+ "description": "Enables inspector connections with a debugger.",
567
+ "allowNo": false
526
568
  }
527
569
  },
528
570
  "args": {}
@@ -605,6 +647,39 @@
605
647
  },
606
648
  "args": {}
607
649
  },
650
+ "hydrogen:upgrade": {
651
+ "id": "hydrogen:upgrade",
652
+ "description": "Upgrade Remix and Hydrogen npm dependencies.",
653
+ "strict": true,
654
+ "pluginName": "@shopify/cli-hydrogen",
655
+ "pluginAlias": "@shopify/cli-hydrogen",
656
+ "pluginType": "core",
657
+ "aliases": [],
658
+ "flags": {
659
+ "path": {
660
+ "name": "path",
661
+ "type": "option",
662
+ "description": "The path to the directory of the Hydrogen storefront. The default is the current directory.",
663
+ "multiple": false
664
+ },
665
+ "version": {
666
+ "name": "version",
667
+ "type": "option",
668
+ "char": "v",
669
+ "description": "A target hydrogen version to update to",
670
+ "required": false,
671
+ "multiple": false
672
+ },
673
+ "force": {
674
+ "name": "force",
675
+ "type": "boolean",
676
+ "char": "f",
677
+ "description": "Ignore warnings and force the upgrade to the target version",
678
+ "allowNo": false
679
+ }
680
+ },
681
+ "args": {}
682
+ },
608
683
  "hydrogen:debug:cpu": {
609
684
  "id": "hydrogen:debug:cpu",
610
685
  "description": "Builds and profiles the server startup time the app.",