@shopify/cli-hydrogen 8.1.0 → 8.2.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.
- package/dist/assets/hydrogen/starter/CHANGELOG.md +166 -0
- package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +37 -0
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +150 -0
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +68 -0
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +101 -0
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +80 -0
- package/dist/assets/hydrogen/starter/app/components/ProductImage.tsx +23 -0
- package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +27 -0
- package/dist/assets/hydrogen/starter/app/lib/session.ts +5 -0
- package/dist/assets/hydrogen/starter/app/root.tsx +23 -36
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -5
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +12 -70
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +7 -14
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +1 -8
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +5 -22
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +0 -1
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +1 -3
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +51 -232
- package/dist/assets/hydrogen/starter/package.json +10 -11
- package/dist/assets/hydrogen/starter/server.ts +4 -0
- package/dist/assets/hydrogen/tailwind/package.json +1 -6
- package/dist/assets/hydrogen/tailwind/tailwind.css +6 -3
- package/dist/assets/hydrogen/vanilla-extract/package.json +2 -3
- package/dist/assets/hydrogen/virtual-routes/components/{Layout.jsx → PageLayout.jsx} +2 -2
- package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +1 -2
- package/dist/assets/hydrogen/virtual-routes/components/RequestTable.jsx +1 -2
- package/dist/assets/hydrogen/virtual-routes/routes/index.jsx +1 -2
- package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +8 -30
- package/dist/commands/hydrogen/build.js +33 -10
- package/dist/commands/hydrogen/customer-account/push.js +3 -6
- package/dist/commands/hydrogen/debug/cpu.js +3 -3
- package/dist/commands/hydrogen/deploy.js +14 -3
- package/dist/commands/hydrogen/dev.js +3 -6
- package/dist/commands/hydrogen/env/list.js +1 -2
- package/dist/commands/hydrogen/env/pull.js +2 -4
- package/dist/commands/hydrogen/env/push.js +6 -12
- package/dist/commands/hydrogen/init.d.ts +18 -15
- package/dist/commands/hydrogen/init.js +12 -24
- package/dist/commands/hydrogen/link.js +1 -2
- package/dist/commands/hydrogen/preview.js +4 -6
- package/dist/commands/hydrogen/setup/css.js +29 -12
- package/dist/commands/hydrogen/setup/vite.js +3 -6
- package/dist/commands/hydrogen/setup.js +8 -7
- package/dist/commands/hydrogen/upgrade.js +16 -32
- package/dist/hooks/init.js +50 -6
- package/dist/index.d.ts +46 -46
- package/dist/lib/auth.js +1 -2
- package/dist/lib/build.js +1 -2
- package/dist/lib/bundle/analyzer.js +39 -24
- package/dist/lib/bundle/vite-plugin.js +161 -0
- package/dist/lib/check-cli-version.js +61 -0
- package/dist/lib/check-lockfile.js +2 -2
- package/dist/lib/classic-compiler/build.js +3 -3
- package/dist/lib/classic-compiler/dev.js +5 -10
- package/dist/lib/codegen.js +8 -16
- package/dist/lib/defer.js +2 -4
- package/dist/lib/environment-variables.js +2 -4
- package/dist/lib/file.js +15 -7
- package/dist/lib/flags.js +10 -0
- package/dist/lib/get-oxygen-deployment-data.js +1 -2
- package/dist/lib/graphiql-url.js +1 -2
- package/dist/lib/import-utils.js +3 -2
- package/dist/lib/log.js +11 -22
- package/dist/lib/mini-oxygen/common.js +1 -2
- package/dist/lib/mini-oxygen/node.js +1 -2
- package/dist/lib/missing-routes.js +1 -2
- package/dist/lib/onboarding/common.js +60 -15
- package/dist/lib/onboarding/local.js +14 -13
- package/dist/lib/onboarding/remote.js +16 -9
- package/dist/lib/onboarding/setup-template.mocks.js +6 -3
- package/dist/lib/remix-config.js +2 -4
- package/dist/lib/remix-version-check.js +1 -2
- package/dist/lib/request-events.js +3 -6
- package/dist/lib/setups/css/assets.js +1 -1
- package/dist/lib/setups/css/index.js +17 -10
- package/dist/lib/setups/css/replacers.js +74 -76
- package/dist/lib/setups/css/tailwind.js +16 -20
- package/dist/lib/setups/css/vanilla-extract.js +8 -5
- package/dist/lib/setups/i18n/replacers.js +1 -2
- package/dist/lib/setups/routes/generate.js +18 -19
- package/dist/lib/shell.js +5 -10
- package/dist/lib/template-diff.js +83 -104
- package/dist/lib/template-downloader.js +2 -2
- package/dist/lib/transpile/morph/functions.js +3 -6
- package/dist/lib/transpile/morph/index.js +2 -4
- package/dist/lib/transpile/morph/typedefs.js +3 -6
- package/dist/lib/transpile/morph/utils.js +2 -4
- package/dist/lib/transpile/project.js +4 -3
- package/oclif.manifest.json +51 -4
- package/package.json +8 -12
- package/dist/assets/hydrogen/css-modules/package.json +0 -6
- package/dist/assets/hydrogen/postcss/package.json +0 -10
- package/dist/assets/hydrogen/postcss/postcss.config.js +0 -8
- package/dist/assets/hydrogen/starter/app/components/Cart.tsx +0 -364
- package/dist/assets/hydrogen/tailwind/postcss.config.js +0 -10
- package/dist/assets/hydrogen/tailwind/tailwind.config.js +0 -8
- package/dist/lib/check-version.js +0 -75
- package/dist/lib/setups/css/css-modules.js +0 -23
- package/dist/lib/setups/css/postcss.js +0 -31
|
@@ -6,7 +6,7 @@ import { fetch } from '@shopify/cli-kit/node/http';
|
|
|
6
6
|
import { parseGitHubRepositoryURL } from '@shopify/cli-kit/node/github';
|
|
7
7
|
import { fileExists, mkdir, rmdir } from '@shopify/cli-kit/node/fs';
|
|
8
8
|
import { AbortError } from '@shopify/cli-kit/node/error';
|
|
9
|
-
import { getSkeletonSourceDir, getAssetsDir } from './build.js';
|
|
9
|
+
import { isHydrogenMonorepo, getSkeletonSourceDir, getAssetsDir } from './build.js';
|
|
10
10
|
import { joinPath } from '@shopify/cli-kit/node/path';
|
|
11
11
|
import { downloadGitRepository } from '@shopify/cli-kit/node/git';
|
|
12
12
|
|
|
@@ -53,7 +53,7 @@ async function downloadMonorepoTarball(url, storageDir, signal) {
|
|
|
53
53
|
async function downloadMonorepoTemplates({
|
|
54
54
|
signal
|
|
55
55
|
} = {}) {
|
|
56
|
-
if (process.env.
|
|
56
|
+
if (isHydrogenMonorepo && process.env.FORCE_TEMPLATES_SOURCE !== "remote") {
|
|
57
57
|
const templatesDir = path.dirname(getSkeletonSourceDir());
|
|
58
58
|
return {
|
|
59
59
|
version: "local",
|
|
@@ -53,8 +53,7 @@ function generateParameterDocumentation(functionNode, docNode) {
|
|
|
53
53
|
paramTags.forEach((tag) => tag.remove());
|
|
54
54
|
for (const param of params) {
|
|
55
55
|
const paramType = sanitizeType(param.getTypeNode()?.getText());
|
|
56
|
-
if (!paramType)
|
|
57
|
-
continue;
|
|
56
|
+
if (!paramType) continue;
|
|
58
57
|
const paramName = param.compilerNode.name?.getText();
|
|
59
58
|
const isOptional = param.isOptional();
|
|
60
59
|
const isRest = param.isRestParameter();
|
|
@@ -65,8 +64,7 @@ function generateParameterDocumentation(functionNode, docNode) {
|
|
|
65
64
|
defaultValue = paramInitializer?.getText().replaceAll(/(\s|\t)*\n(\s|\t)*/g, " ");
|
|
66
65
|
}
|
|
67
66
|
let paramNameOut = paramName;
|
|
68
|
-
if (paramNameOut.match(/[{},]/))
|
|
69
|
-
paramNameOut = "";
|
|
67
|
+
if (paramNameOut.match(/[{},]/)) paramNameOut = "";
|
|
70
68
|
if (paramNameOut && isOptional) {
|
|
71
69
|
const defaultValueOut = defaultValue !== void 0 ? `=${defaultValue}` : "";
|
|
72
70
|
paramNameOut = `[${paramNameOut}${defaultValueOut}]`;
|
|
@@ -82,8 +80,7 @@ function generateParameterDocumentation(functionNode, docNode) {
|
|
|
82
80
|
function getOutputJsDocNodeOrCreate(functionNode, docNode) {
|
|
83
81
|
if (docNode) {
|
|
84
82
|
const funcNodeDocs = functionNode.getJsDocs();
|
|
85
|
-
if (funcNodeDocs.length)
|
|
86
|
-
return functionNode;
|
|
83
|
+
if (funcNodeDocs.length) return functionNode;
|
|
87
84
|
getJsDocOrCreate(docNode);
|
|
88
85
|
return docNode;
|
|
89
86
|
}
|
|
@@ -42,8 +42,7 @@ function transpileTsWithJSDocs(src, filepath, compilerOptions = {}) {
|
|
|
42
42
|
sourceFile.getFunctions().forEach((node) => generateFunctionDocumentation(node));
|
|
43
43
|
sourceFile.getVariableDeclarations().forEach((varDeclaration) => {
|
|
44
44
|
const initializer = varDeclaration.getInitializerIfKind(SyntaxKind.ArrowFunction) || varDeclaration.getInitializerIfKind(SyntaxKind.FunctionExpression);
|
|
45
|
-
if (!initializer)
|
|
46
|
-
return void 0;
|
|
45
|
+
if (!initializer) return void 0;
|
|
47
46
|
generateFunctionDocumentation(
|
|
48
47
|
initializer,
|
|
49
48
|
varDeclaration.getVariableStatement()
|
|
@@ -57,8 +56,7 @@ function transpileTsWithJSDocs(src, filepath, compilerOptions = {}) {
|
|
|
57
56
|
let result = project.emitToMemory()?.getFiles()?.find(
|
|
58
57
|
(file) => file.filePath.slice(0, -3) === sourceFile.getFilePath().slice(0, -3)
|
|
59
58
|
)?.text;
|
|
60
|
-
if (!result)
|
|
61
|
-
throw new Error("Could not emit output to memory.");
|
|
59
|
+
if (!result) throw new Error("Could not emit output to memory.");
|
|
62
60
|
result = restoreCode(result);
|
|
63
61
|
result = generateTypeDefs(sourceFile, result);
|
|
64
62
|
return result.replace(/^\s*\/\*[*\s]+\*\/$\n/gm, "\n").trim() + "\n";
|
|
@@ -94,8 +94,7 @@ function generateInterfaceDocumentation(interfaceNode) {
|
|
|
94
94
|
function generateTypedefDocumentation(typeNode, sourceFile) {
|
|
95
95
|
const name = typeNode.getName();
|
|
96
96
|
let { type } = typeNode.getStructure();
|
|
97
|
-
if (typeof type !== "string")
|
|
98
|
-
return "";
|
|
97
|
+
if (typeof type !== "string") return "";
|
|
99
98
|
type = sanitizeType(type);
|
|
100
99
|
const dummyNode = sourceFile.addVariableStatement({
|
|
101
100
|
declarations: [{ name: `__dummy${name}`, initializer: "null" }]
|
|
@@ -129,15 +128,13 @@ function getChildProperties(node) {
|
|
|
129
128
|
}
|
|
130
129
|
function generateObjectPropertyDocumentation(node, jsDoc, name = "", topLevelCall = true) {
|
|
131
130
|
name = name || node.getName();
|
|
132
|
-
if (!topLevelCall)
|
|
133
|
-
name = `${name}.${node.getName()}`;
|
|
131
|
+
if (!topLevelCall) name = `${name}.${node.getName()}`;
|
|
134
132
|
let propType = node.getTypeNode()?.getText()?.replace(/\n/g, "")?.replace(/\s/g, "");
|
|
135
133
|
propType = sanitizeType(propType);
|
|
136
134
|
const isOptional = node.hasQuestionToken() || node.getJsDocs()?.[0]?.getTags()?.some((tag) => tag.getTagName() === "optional");
|
|
137
135
|
const existingPropDocs = node.getJsDocs()?.[0]?.getDescription() || "";
|
|
138
136
|
const children = getChildProperties(node);
|
|
139
|
-
if (children.length)
|
|
140
|
-
propType = "Object";
|
|
137
|
+
if (children.length) propType = "Object";
|
|
141
138
|
jsDoc.addTag({
|
|
142
139
|
tagName: "property",
|
|
143
140
|
text: `{${propType}} ${isOptional ? `[${name}]` : name} ${existingPropDocs}`
|
|
@@ -2,13 +2,11 @@ function getJsDocOrCreate(node) {
|
|
|
2
2
|
return node.getJsDocs().at(-1) || node.addJsDoc({ description: "\n" });
|
|
3
3
|
}
|
|
4
4
|
function sanitizeType(str) {
|
|
5
|
-
if (!str)
|
|
6
|
-
return str;
|
|
5
|
+
if (!str) return str;
|
|
7
6
|
const extractedClassFromTypeof = /{*typeof\s+([^(?:}|\s);]*)/gm.exec(
|
|
8
7
|
str
|
|
9
8
|
)?.[1];
|
|
10
|
-
if (!extractedClassFromTypeof)
|
|
11
|
-
return str;
|
|
9
|
+
if (!extractedClassFromTypeof) return str;
|
|
12
10
|
return `Class<${extractedClassFromTypeof}>`;
|
|
13
11
|
}
|
|
14
12
|
|
|
@@ -46,13 +46,14 @@ function convertConfigToJS(tsConfig, keepTypes = false) {
|
|
|
46
46
|
async function transpileProject(projectDir, keepTypes = true) {
|
|
47
47
|
const entries = await glob("**/*.+(ts|tsx)", {
|
|
48
48
|
absolute: true,
|
|
49
|
-
cwd: projectDir
|
|
49
|
+
cwd: projectDir,
|
|
50
|
+
dot: true,
|
|
51
|
+
ignore: ["**/node_modules/**"]
|
|
50
52
|
});
|
|
51
53
|
const formatConfig = await getCodeFormatOptions();
|
|
52
54
|
for (const entry of entries) {
|
|
53
55
|
if (entry.endsWith(".d.ts")) {
|
|
54
|
-
if (!keepTypes)
|
|
55
|
-
await removeFile(entry);
|
|
56
|
+
if (!keepTypes) await removeFile(entry);
|
|
56
57
|
continue;
|
|
57
58
|
}
|
|
58
59
|
const tsx = await readFile(entry);
|
package/oclif.manifest.json
CHANGED
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"type": "boolean"
|
|
77
77
|
},
|
|
78
78
|
"bundle-stats": {
|
|
79
|
-
"description": "
|
|
79
|
+
"description": "Show a bundle size summary after building. Defaults to true, use `--no-bundle-stats` to disable.",
|
|
80
80
|
"name": "bundle-stats",
|
|
81
81
|
"allowNo": true,
|
|
82
82
|
"type": "boolean"
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"pluginName": "@shopify/cli-hydrogen",
|
|
90
90
|
"pluginType": "core",
|
|
91
91
|
"strict": true,
|
|
92
|
+
"enableJsonFlag": false,
|
|
92
93
|
"descriptionWithMarkdown": "Builds a Hydrogen storefront for production. The client and app worker files are compiled to a `/dist` folder in your Hydrogen project directory.",
|
|
93
94
|
"isESM": true,
|
|
94
95
|
"relativePath": [
|
|
@@ -128,6 +129,7 @@
|
|
|
128
129
|
"pluginName": "@shopify/cli-hydrogen",
|
|
129
130
|
"pluginType": "core",
|
|
130
131
|
"strict": true,
|
|
132
|
+
"enableJsonFlag": false,
|
|
131
133
|
"descriptionWithMarkdown": "Checks whether your Hydrogen app includes a set of standard Shopify routes.",
|
|
132
134
|
"isESM": true,
|
|
133
135
|
"relativePath": [
|
|
@@ -181,6 +183,7 @@
|
|
|
181
183
|
"pluginName": "@shopify/cli-hydrogen",
|
|
182
184
|
"pluginType": "core",
|
|
183
185
|
"strict": true,
|
|
186
|
+
"enableJsonFlag": false,
|
|
184
187
|
"descriptionWithMarkdown": "Automatically generates GraphQL types for your project’s Storefront API queries.",
|
|
185
188
|
"isESM": true,
|
|
186
189
|
"relativePath": [
|
|
@@ -240,6 +243,7 @@
|
|
|
240
243
|
"pluginName": "@shopify/cli-hydrogen",
|
|
241
244
|
"pluginType": "core",
|
|
242
245
|
"strict": true,
|
|
246
|
+
"enableJsonFlag": false,
|
|
243
247
|
"isESM": true,
|
|
244
248
|
"relativePath": [
|
|
245
249
|
"dist",
|
|
@@ -295,6 +299,7 @@
|
|
|
295
299
|
"pluginName": "@shopify/cli-hydrogen",
|
|
296
300
|
"pluginType": "core",
|
|
297
301
|
"strict": true,
|
|
302
|
+
"enableJsonFlag": false,
|
|
298
303
|
"descriptionWithMarkdown": "Builds the app and runs the resulting code to profile the server startup time, watching for changes. This command can be used to [debug slow app startup times](https://shopify.dev/docs/custom-storefronts/hydrogen/debugging/cpu-startup) that cause failed deployments in Oxygen.\n\n The profiling results are written to a `.cpuprofile` file that can be viewed with certain tools such as [Flame Chart Visualizer for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-js-profile-flame).",
|
|
299
304
|
"isESM": true,
|
|
300
305
|
"relativePath": [
|
|
@@ -373,11 +378,24 @@
|
|
|
373
378
|
},
|
|
374
379
|
"auth-bypass-token": {
|
|
375
380
|
"description": "Generate an authentication bypass token, which can be used to perform end-to-end tests against the deployment.",
|
|
381
|
+
"env": "AUTH_BYPASS_TOKEN",
|
|
376
382
|
"name": "auth-bypass-token",
|
|
377
383
|
"required": false,
|
|
378
384
|
"allowNo": false,
|
|
379
385
|
"type": "boolean"
|
|
380
386
|
},
|
|
387
|
+
"auth-bypass-token-duration": {
|
|
388
|
+
"dependsOn": [
|
|
389
|
+
"auth-bypass-token"
|
|
390
|
+
],
|
|
391
|
+
"description": "Specify the duration (in hours) up to 12 hours for the authentication bypass token. Defaults to `2`",
|
|
392
|
+
"env": "AUTH_BYPASS_TOKEN_DURATION",
|
|
393
|
+
"name": "auth-bypass-token-duration",
|
|
394
|
+
"required": false,
|
|
395
|
+
"hasDynamicHelp": false,
|
|
396
|
+
"multiple": false,
|
|
397
|
+
"type": "option"
|
|
398
|
+
},
|
|
381
399
|
"build-command": {
|
|
382
400
|
"description": "Specify a build command to run before deploying. If not specified, `shopify hydrogen build` will be used.",
|
|
383
401
|
"name": "build-command",
|
|
@@ -479,6 +497,7 @@
|
|
|
479
497
|
"pluginName": "@shopify/cli-hydrogen",
|
|
480
498
|
"pluginType": "core",
|
|
481
499
|
"strict": true,
|
|
500
|
+
"enableJsonFlag": false,
|
|
482
501
|
"descriptionWithMarkdown": "Builds and deploys your Hydrogen storefront to Oxygen. Requires an Oxygen deployment token to be set with the `--token` flag or an environment variable (`SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN`). If the storefront is [linked](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-link) then the Oxygen deployment token for the linked storefront will be used automatically.",
|
|
483
502
|
"isESM": true,
|
|
484
503
|
"relativePath": [
|
|
@@ -653,6 +672,7 @@
|
|
|
653
672
|
"pluginName": "@shopify/cli-hydrogen",
|
|
654
673
|
"pluginType": "core",
|
|
655
674
|
"strict": true,
|
|
675
|
+
"enableJsonFlag": false,
|
|
656
676
|
"descriptionWithMarkdown": "Runs a Hydrogen storefront in a local runtime that emulates an Oxygen worker for development.\n\n If your project is [linked](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-link) to a Hydrogen storefront, then its environment variables will be loaded with the runtime.",
|
|
657
677
|
"isESM": true,
|
|
658
678
|
"relativePath": [
|
|
@@ -683,6 +703,7 @@
|
|
|
683
703
|
"pluginName": "@shopify/cli-hydrogen",
|
|
684
704
|
"pluginType": "core",
|
|
685
705
|
"strict": true,
|
|
706
|
+
"enableJsonFlag": false,
|
|
686
707
|
"descriptionWithMarkdown": "Lists all environments available on the linked Hydrogen storefront.",
|
|
687
708
|
"isESM": true,
|
|
688
709
|
"relativePath": [
|
|
@@ -744,6 +765,7 @@
|
|
|
744
765
|
"pluginName": "@shopify/cli-hydrogen",
|
|
745
766
|
"pluginType": "core",
|
|
746
767
|
"strict": true,
|
|
768
|
+
"enableJsonFlag": false,
|
|
747
769
|
"descriptionWithMarkdown": "Pulls environment variables from the linked Hydrogen storefront and writes them to an `.env` file.",
|
|
748
770
|
"isESM": true,
|
|
749
771
|
"relativePath": [
|
|
@@ -792,6 +814,7 @@
|
|
|
792
814
|
"pluginName": "@shopify/cli-hydrogen",
|
|
793
815
|
"pluginType": "core",
|
|
794
816
|
"strict": true,
|
|
817
|
+
"enableJsonFlag": false,
|
|
795
818
|
"isESM": true,
|
|
796
819
|
"relativePath": [
|
|
797
820
|
"dist",
|
|
@@ -814,6 +837,7 @@
|
|
|
814
837
|
"pluginName": "@shopify/cli-hydrogen",
|
|
815
838
|
"pluginType": "core",
|
|
816
839
|
"strict": false,
|
|
840
|
+
"enableJsonFlag": false,
|
|
817
841
|
"isESM": true,
|
|
818
842
|
"relativePath": [
|
|
819
843
|
"dist",
|
|
@@ -894,6 +918,7 @@
|
|
|
894
918
|
"pluginName": "@shopify/cli-hydrogen",
|
|
895
919
|
"pluginType": "core",
|
|
896
920
|
"strict": true,
|
|
921
|
+
"enableJsonFlag": false,
|
|
897
922
|
"descriptionWithMarkdown": "Generates a set of default routes from the starter template.",
|
|
898
923
|
"isESM": true,
|
|
899
924
|
"relativePath": [
|
|
@@ -956,6 +981,7 @@
|
|
|
956
981
|
"pluginName": "@shopify/cli-hydrogen",
|
|
957
982
|
"pluginType": "core",
|
|
958
983
|
"strict": true,
|
|
984
|
+
"enableJsonFlag": false,
|
|
959
985
|
"isESM": true,
|
|
960
986
|
"relativePath": [
|
|
961
987
|
"dist",
|
|
@@ -1016,6 +1042,14 @@
|
|
|
1016
1042
|
"allowNo": false,
|
|
1017
1043
|
"type": "boolean"
|
|
1018
1044
|
},
|
|
1045
|
+
"styling": {
|
|
1046
|
+
"description": "Sets the styling strategy to use. One of `tailwind`, `vanilla-extract`, `css-modules`, `postcss`, `none`.",
|
|
1047
|
+
"env": "SHOPIFY_HYDROGEN_FLAG_STYLING",
|
|
1048
|
+
"name": "styling",
|
|
1049
|
+
"hasDynamicHelp": false,
|
|
1050
|
+
"multiple": false,
|
|
1051
|
+
"type": "option"
|
|
1052
|
+
},
|
|
1019
1053
|
"markets": {
|
|
1020
1054
|
"description": "Sets the URL structure to support multiple markets. Must be one of: `subfolders`, `domains`, `subdomains`, `none`. Example: `--markets subfolders`.",
|
|
1021
1055
|
"env": "SHOPIFY_HYDROGEN_FLAG_I18N",
|
|
@@ -1074,6 +1108,7 @@
|
|
|
1074
1108
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1075
1109
|
"pluginType": "core",
|
|
1076
1110
|
"strict": true,
|
|
1111
|
+
"enableJsonFlag": false,
|
|
1077
1112
|
"descriptionWithMarkdown": "Creates a new Hydrogen storefront.",
|
|
1078
1113
|
"isESM": true,
|
|
1079
1114
|
"relativePath": [
|
|
@@ -1120,6 +1155,7 @@
|
|
|
1120
1155
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1121
1156
|
"pluginType": "core",
|
|
1122
1157
|
"strict": true,
|
|
1158
|
+
"enableJsonFlag": false,
|
|
1123
1159
|
"descriptionWithMarkdown": "Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.\n\n Linking to a Hydrogen storefront enables you to run [dev](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-dev) and automatically inject your linked Hydrogen storefront's environment variables directly into the server runtime.\n\n After you run the `link` command, you can access the [env list](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-list), [env pull](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-pull), and [unlink](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-unlink) commands.",
|
|
1124
1160
|
"isESM": true,
|
|
1125
1161
|
"relativePath": [
|
|
@@ -1150,6 +1186,7 @@
|
|
|
1150
1186
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1151
1187
|
"pluginType": "core",
|
|
1152
1188
|
"strict": true,
|
|
1189
|
+
"enableJsonFlag": false,
|
|
1153
1190
|
"descriptionWithMarkdown": "Lists all remote Hydrogen storefronts available to link to your local development environment.",
|
|
1154
1191
|
"isESM": true,
|
|
1155
1192
|
"relativePath": [
|
|
@@ -1189,6 +1226,7 @@
|
|
|
1189
1226
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1190
1227
|
"pluginType": "core",
|
|
1191
1228
|
"strict": true,
|
|
1229
|
+
"enableJsonFlag": false,
|
|
1192
1230
|
"descriptionWithMarkdown": "Logs in to the specified shop and saves the shop domain to the project.",
|
|
1193
1231
|
"isESM": true,
|
|
1194
1232
|
"relativePath": [
|
|
@@ -1219,6 +1257,7 @@
|
|
|
1219
1257
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1220
1258
|
"pluginType": "core",
|
|
1221
1259
|
"strict": true,
|
|
1260
|
+
"enableJsonFlag": false,
|
|
1222
1261
|
"descriptionWithMarkdown": "Log out from the current shop.",
|
|
1223
1262
|
"isESM": true,
|
|
1224
1263
|
"relativePath": [
|
|
@@ -1372,6 +1411,7 @@
|
|
|
1372
1411
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1373
1412
|
"pluginType": "core",
|
|
1374
1413
|
"strict": true,
|
|
1414
|
+
"enableJsonFlag": false,
|
|
1375
1415
|
"descriptionWithMarkdown": "Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.",
|
|
1376
1416
|
"isESM": true,
|
|
1377
1417
|
"relativePath": [
|
|
@@ -1432,6 +1472,7 @@
|
|
|
1432
1472
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1433
1473
|
"pluginType": "core",
|
|
1434
1474
|
"strict": true,
|
|
1475
|
+
"enableJsonFlag": false,
|
|
1435
1476
|
"isESM": true,
|
|
1436
1477
|
"relativePath": [
|
|
1437
1478
|
"dist",
|
|
@@ -1444,12 +1485,12 @@
|
|
|
1444
1485
|
"aliases": [],
|
|
1445
1486
|
"args": {
|
|
1446
1487
|
"strategy": {
|
|
1447
|
-
"description": "The CSS strategy to setup. One of tailwind,css-modules,
|
|
1488
|
+
"description": "The CSS strategy to setup. One of tailwind,vanilla-extract,css-modules,postcss",
|
|
1448
1489
|
"name": "strategy",
|
|
1449
1490
|
"options": [
|
|
1450
1491
|
"tailwind",
|
|
1451
|
-
"css-modules",
|
|
1452
1492
|
"vanilla-extract",
|
|
1493
|
+
"css-modules",
|
|
1453
1494
|
"postcss"
|
|
1454
1495
|
]
|
|
1455
1496
|
}
|
|
@@ -1487,6 +1528,7 @@
|
|
|
1487
1528
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1488
1529
|
"pluginType": "core",
|
|
1489
1530
|
"strict": true,
|
|
1531
|
+
"enableJsonFlag": false,
|
|
1490
1532
|
"descriptionWithMarkdown": "Adds support for certain CSS strategies to your project.",
|
|
1491
1533
|
"isESM": true,
|
|
1492
1534
|
"relativePath": [
|
|
@@ -1528,6 +1570,7 @@
|
|
|
1528
1570
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1529
1571
|
"pluginType": "core",
|
|
1530
1572
|
"strict": true,
|
|
1573
|
+
"enableJsonFlag": false,
|
|
1531
1574
|
"descriptionWithMarkdown": "Adds support for multiple [markets](https://shopify.dev/docs/custom-storefronts/hydrogen/markets) to your project by using the URL structure.",
|
|
1532
1575
|
"isESM": true,
|
|
1533
1576
|
"relativePath": [
|
|
@@ -1559,6 +1602,7 @@
|
|
|
1559
1602
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1560
1603
|
"pluginType": "core",
|
|
1561
1604
|
"strict": true,
|
|
1605
|
+
"enableJsonFlag": false,
|
|
1562
1606
|
"isESM": true,
|
|
1563
1607
|
"relativePath": [
|
|
1564
1608
|
"dist",
|
|
@@ -1580,6 +1624,7 @@
|
|
|
1580
1624
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1581
1625
|
"pluginType": "core",
|
|
1582
1626
|
"strict": true,
|
|
1627
|
+
"enableJsonFlag": false,
|
|
1583
1628
|
"descriptionWithMarkdown": "Creates a global h2 shortcut for Shopify CLI using shell aliases.\n\n The following shells are supported:\n\n - Bash (using `~/.bashrc`)\n - ZSH (using `~/.zshrc`)\n - Fish (using `~/.config/fish/functions`)\n - PowerShell (added to `$PROFILE`)\n\n After the alias is created, you can call Shopify CLI from anywhere in your project using `h2 <command>`.",
|
|
1584
1629
|
"isESM": true,
|
|
1585
1630
|
"relativePath": [
|
|
@@ -1610,6 +1655,7 @@
|
|
|
1610
1655
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1611
1656
|
"pluginType": "core",
|
|
1612
1657
|
"strict": true,
|
|
1658
|
+
"enableJsonFlag": false,
|
|
1613
1659
|
"descriptionWithMarkdown": "Unlinks your local development environment from a remote Hydrogen storefront.",
|
|
1614
1660
|
"isESM": true,
|
|
1615
1661
|
"relativePath": [
|
|
@@ -1657,6 +1703,7 @@
|
|
|
1657
1703
|
"pluginName": "@shopify/cli-hydrogen",
|
|
1658
1704
|
"pluginType": "core",
|
|
1659
1705
|
"strict": true,
|
|
1706
|
+
"enableJsonFlag": false,
|
|
1660
1707
|
"descriptionWithMarkdown": "Upgrade Hydrogen project dependencies, preview features, fixes and breaking changes. The command also generates an instruction file for each upgrade.",
|
|
1661
1708
|
"isESM": true,
|
|
1662
1709
|
"relativePath": [
|
|
@@ -1667,5 +1714,5 @@
|
|
|
1667
1714
|
]
|
|
1668
1715
|
}
|
|
1669
1716
|
},
|
|
1670
|
-
"version": "8.
|
|
1717
|
+
"version": "8.2.0"
|
|
1671
1718
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"@shopify:registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
7
|
-
"version": "8.
|
|
7
|
+
"version": "8.2.0",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"scripts": {
|
|
@@ -12,13 +12,12 @@
|
|
|
12
12
|
"dev": "tsup --watch ./src --watch ../../templates/skeleton",
|
|
13
13
|
"typecheck": "tsc --noEmit",
|
|
14
14
|
"generate:manifest": "node scripts/generate-manifest.mjs",
|
|
15
|
-
"test": "cross-env SHOPIFY_UNIT_TEST=1 vitest run --test-timeout=
|
|
16
|
-
"test:watch": "cross-env SHOPIFY_UNIT_TEST=1 vitest --test-timeout=
|
|
15
|
+
"test": "cross-env SHOPIFY_UNIT_TEST=1 vitest run --test-timeout=60000",
|
|
16
|
+
"test:watch": "cross-env SHOPIFY_UNIT_TEST=1 vitest --test-timeout=60000"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@remix-run/dev": "^2.
|
|
19
|
+
"@remix-run/dev": "^2.10.1",
|
|
20
20
|
"@types/diff": "^5.0.2",
|
|
21
|
-
"@types/fs-extra": "^11.0.1",
|
|
22
21
|
"@types/gunzip-maybe": "^1.4.0",
|
|
23
22
|
"@types/prettier": "^2.7.2",
|
|
24
23
|
"@types/source-map-support": "^0.5.10",
|
|
@@ -35,13 +34,13 @@
|
|
|
35
34
|
"dependencies": {
|
|
36
35
|
"@ast-grep/napi": "0.11.0",
|
|
37
36
|
"@oclif/core": "3.26.5",
|
|
38
|
-
"@shopify/cli-kit": "3.
|
|
37
|
+
"@shopify/cli-kit": "3.63.2",
|
|
39
38
|
"@shopify/oxygen-cli": "4.4.9",
|
|
40
|
-
"@shopify/plugin-cloudflare": "3.
|
|
39
|
+
"@shopify/plugin-cloudflare": "3.63.2",
|
|
41
40
|
"ansi-escapes": "^6.2.0",
|
|
41
|
+
"chokidar": "3.5.3",
|
|
42
42
|
"cli-truncate": "^4.0.0",
|
|
43
43
|
"diff": "^5.1.0",
|
|
44
|
-
"fs-extra": "^11.1.0",
|
|
45
44
|
"get-port": "^7.0.0",
|
|
46
45
|
"gunzip-maybe": "^1.4.2",
|
|
47
46
|
"prettier": "^2.8.4",
|
|
@@ -53,14 +52,11 @@
|
|
|
53
52
|
"ts-morph": "20.0.0",
|
|
54
53
|
"use-resize-observer": "^9.1.0"
|
|
55
54
|
},
|
|
56
|
-
"optionalDependencies": {
|
|
57
|
-
"@parcel/watcher": "^2.3.0"
|
|
58
|
-
},
|
|
59
55
|
"peerDependencies": {
|
|
60
56
|
"@graphql-codegen/cli": "^5.0.2",
|
|
61
57
|
"@remix-run/dev": "^2.1.0",
|
|
62
58
|
"@shopify/hydrogen-codegen": "^0.3.1",
|
|
63
|
-
"@shopify/mini-oxygen": "^3.0.
|
|
59
|
+
"@shopify/mini-oxygen": "^3.0.4",
|
|
64
60
|
"graphql-config": "^5.0.3",
|
|
65
61
|
"vite": "^5.1.0"
|
|
66
62
|
},
|