@shopify/cli-hydrogen 4.0.6 → 4.0.8
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/commands/hydrogen/dev.js +40 -19
- package/dist/commands/hydrogen/init.js +12 -0
- package/dist/utils/check-version.d.ts +14 -1
- package/dist/utils/check-version.js +29 -24
- package/dist/utils/check-version.test.d.ts +1 -0
- package/dist/utils/check-version.test.js +60 -0
- package/dist/utils/template-downloader.js +3 -1
- package/dist/virtual-routes/assets/inter-variable-font.woff2 +0 -0
- package/dist/virtual-routes/assets/jetbrainsmono-variable-font.woff2 +0 -0
- package/dist/virtual-routes/assets/styles.css +5 -5
- package/dist/virtual-routes/routes/index.jsx +5 -4
- package/oclif.manifest.json +1 -1
- package/package.json +1 -2
- package/dist/virtual-routes/assets/inter-variable-font.ttf +0 -0
- package/dist/virtual-routes/assets/jetbrainsmono-variable-font.ttf +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import fs from 'fs/promises';
|
|
3
|
-
import { output } from '@shopify/cli-kit';
|
|
3
|
+
import { output, file } from '@shopify/cli-kit';
|
|
4
4
|
import { copyPublicFiles } from './build.js';
|
|
5
5
|
import { getProjectPaths, getRemixConfig } from '../../utils/config.js';
|
|
6
6
|
import { muteDevLogs } from '../../utils/log.js';
|
|
@@ -47,30 +47,47 @@ async function runDev({
|
|
|
47
47
|
const config = await getRemixConfig(root);
|
|
48
48
|
return disableVirtualRoutes ? config : addVirtualRoutes(config);
|
|
49
49
|
};
|
|
50
|
-
const getFilePaths = (
|
|
51
|
-
const fileRelative = path.relative(root,
|
|
50
|
+
const getFilePaths = (file2) => {
|
|
51
|
+
const fileRelative = path.relative(root, file2);
|
|
52
52
|
return [fileRelative, path.resolve(root, fileRelative)];
|
|
53
53
|
};
|
|
54
|
+
const serverBundleExists = () => file.exists(buildPathWorkerFile);
|
|
55
|
+
let miniOxygenStarted = false;
|
|
56
|
+
async function safeStartMiniOxygen() {
|
|
57
|
+
if (miniOxygenStarted)
|
|
58
|
+
return;
|
|
59
|
+
await startMiniOxygen({
|
|
60
|
+
root,
|
|
61
|
+
port,
|
|
62
|
+
watch: true,
|
|
63
|
+
buildPathWorkerFile,
|
|
64
|
+
buildPathClient
|
|
65
|
+
});
|
|
66
|
+
miniOxygenStarted = true;
|
|
67
|
+
const showUpgrade = await checkingHydrogenVersion;
|
|
68
|
+
if (showUpgrade)
|
|
69
|
+
showUpgrade();
|
|
70
|
+
}
|
|
54
71
|
const { watch } = await import('@remix-run/dev/dist/compiler/watch.js');
|
|
55
72
|
await watch(await reloadConfig(), {
|
|
56
73
|
reloadConfig,
|
|
57
74
|
mode: process.env.NODE_ENV,
|
|
58
75
|
async onInitialBuild() {
|
|
59
76
|
await copyingFiles;
|
|
77
|
+
if (!await serverBundleExists()) {
|
|
78
|
+
const { renderFatalError } = await import('@shopify/cli-kit/node/ui');
|
|
79
|
+
return renderFatalError({
|
|
80
|
+
name: "BuildError",
|
|
81
|
+
type: 0,
|
|
82
|
+
message: "MiniOxygen cannot start because the server bundle has not been generated.",
|
|
83
|
+
tryMessage: "This is likely due to an error in your app and Remix is unable to compile. Try fixing the app and MiniOxygen will start."
|
|
84
|
+
});
|
|
85
|
+
}
|
|
60
86
|
console.timeEnd(LOG_INITIAL_BUILD);
|
|
61
|
-
await
|
|
62
|
-
root,
|
|
63
|
-
port,
|
|
64
|
-
watch: true,
|
|
65
|
-
buildPathWorkerFile,
|
|
66
|
-
buildPathClient
|
|
67
|
-
});
|
|
68
|
-
const showUpgrade = await checkingHydrogenVersion;
|
|
69
|
-
if (showUpgrade)
|
|
70
|
-
showUpgrade();
|
|
87
|
+
await safeStartMiniOxygen();
|
|
71
88
|
},
|
|
72
|
-
async onFileCreated(
|
|
73
|
-
const [relative, absolute] = getFilePaths(
|
|
89
|
+
async onFileCreated(file2) {
|
|
90
|
+
const [relative, absolute] = getFilePaths(file2);
|
|
74
91
|
output.info(`
|
|
75
92
|
\u{1F4C4} File created: ${relative}`);
|
|
76
93
|
if (absolute.startsWith(publicPath)) {
|
|
@@ -80,8 +97,8 @@ async function runDev({
|
|
|
80
97
|
);
|
|
81
98
|
}
|
|
82
99
|
},
|
|
83
|
-
async onFileChanged(
|
|
84
|
-
const [relative, absolute] = getFilePaths(
|
|
100
|
+
async onFileChanged(file2) {
|
|
101
|
+
const [relative, absolute] = getFilePaths(file2);
|
|
85
102
|
output.info(`
|
|
86
103
|
\u{1F4C4} File changed: ${relative}`);
|
|
87
104
|
if (absolute.startsWith(publicPath)) {
|
|
@@ -91,8 +108,8 @@ async function runDev({
|
|
|
91
108
|
);
|
|
92
109
|
}
|
|
93
110
|
},
|
|
94
|
-
async onFileDeleted(
|
|
95
|
-
const [relative, absolute] = getFilePaths(
|
|
111
|
+
async onFileDeleted(file2) {
|
|
112
|
+
const [relative, absolute] = getFilePaths(file2);
|
|
96
113
|
output.info(`
|
|
97
114
|
\u{1F4C4} File deleted: ${relative}`);
|
|
98
115
|
if (absolute.startsWith(publicPath)) {
|
|
@@ -105,6 +122,10 @@ async function runDev({
|
|
|
105
122
|
},
|
|
106
123
|
async onRebuildFinish() {
|
|
107
124
|
console.timeEnd(LOG_REBUILT);
|
|
125
|
+
if (!miniOxygenStarted && await serverBundleExists()) {
|
|
126
|
+
console.log("");
|
|
127
|
+
await safeStartMiniOxygen();
|
|
128
|
+
}
|
|
108
129
|
}
|
|
109
130
|
});
|
|
110
131
|
}
|
|
@@ -6,7 +6,9 @@ import { output, path } from '@shopify/cli-kit';
|
|
|
6
6
|
import { commonFlags, parseProcessFlags } from '../../utils/flags.js';
|
|
7
7
|
import { transpileProject } from '../../utils/transpile-ts.js';
|
|
8
8
|
import { getLatestTemplates } from '../../utils/template-downloader.js';
|
|
9
|
+
import { checkHydrogenVersion } from '../../utils/check-version.js';
|
|
9
10
|
import { readdir } from 'fs/promises';
|
|
11
|
+
import { fileURLToPath } from 'url';
|
|
10
12
|
|
|
11
13
|
const STARTER_TEMPLATES = ["hello-world", "demo-store"];
|
|
12
14
|
const FLAG_MAP = { f: "force" };
|
|
@@ -41,6 +43,16 @@ class Init extends Command {
|
|
|
41
43
|
}
|
|
42
44
|
async function runInit(options = parseProcessFlags(process.argv, FLAG_MAP)) {
|
|
43
45
|
supressNodeExperimentalWarnings();
|
|
46
|
+
const showUpgrade = await checkHydrogenVersion(
|
|
47
|
+
fileURLToPath(new URL("../../../package.json", import.meta.url)),
|
|
48
|
+
"cli"
|
|
49
|
+
);
|
|
50
|
+
if (showUpgrade) {
|
|
51
|
+
const packageManager2 = await packageManagerUsedForCreating();
|
|
52
|
+
showUpgrade(
|
|
53
|
+
packageManager2 === "unknown" ? "" : `Please use the latest version with \`${packageManager2} create @shopify/hydrogen@latest\``
|
|
54
|
+
);
|
|
55
|
+
}
|
|
44
56
|
const templatesPromise = getLatestTemplates().catch((error) => {
|
|
45
57
|
output.info("\n\n\n");
|
|
46
58
|
renderFatalError(error);
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare const PACKAGE_NAMES: {
|
|
2
|
+
readonly main: "@shopify/hydrogen";
|
|
3
|
+
readonly cli: "@shopify/cli-hydrogen";
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param resolveFrom Path to a directory to resolve from, or directly the path to a package.json file.
|
|
8
|
+
* @param pkgKey Package to check for updates.
|
|
9
|
+
* @returns A function to show the update information if any update is available.
|
|
10
|
+
*/
|
|
11
|
+
declare function checkHydrogenVersion(resolveFrom: string, pkgKey?: keyof typeof PACKAGE_NAMES): Promise<((extraMessage?: string) => {
|
|
12
|
+
currentVersion: string;
|
|
13
|
+
newVersion: string;
|
|
14
|
+
}) | undefined>;
|
|
2
15
|
|
|
3
16
|
export { checkHydrogenVersion };
|
|
@@ -3,45 +3,50 @@ import { createRequire } from 'module';
|
|
|
3
3
|
import { checkForNewVersion } from '@shopify/cli-kit/node/node-package-manager';
|
|
4
4
|
import { renderInfo } from '@shopify/cli-kit/node/ui';
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const PACKAGE_NAMES = {
|
|
7
|
+
main: "@shopify/hydrogen",
|
|
8
|
+
cli: "@shopify/cli-hydrogen"
|
|
9
|
+
};
|
|
10
|
+
async function checkHydrogenVersion(resolveFrom, pkgKey = "main") {
|
|
8
11
|
if (process.env.LOCAL_DEV)
|
|
9
12
|
return;
|
|
13
|
+
const pkgName = PACKAGE_NAMES[pkgKey];
|
|
10
14
|
const require2 = createRequire(import.meta.url);
|
|
11
|
-
const pkgJsonPath = locateDependency(
|
|
15
|
+
const pkgJsonPath = resolveFrom.endsWith("package.json") ? locateDependency(require2, resolveFrom) : locateDependency(
|
|
12
16
|
require2,
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
path.join(pkgName, "package.json"),
|
|
18
|
+
resolveFrom
|
|
15
19
|
);
|
|
16
20
|
if (!pkgJsonPath)
|
|
17
21
|
return;
|
|
18
22
|
const currentVersion = require2(pkgJsonPath).version;
|
|
19
23
|
if (!currentVersion)
|
|
20
24
|
return;
|
|
21
|
-
const newVersionAvailable = await checkForNewVersion(
|
|
22
|
-
PACKAGE_NAME,
|
|
23
|
-
currentVersion
|
|
24
|
-
);
|
|
25
|
+
const newVersionAvailable = await checkForNewVersion(pkgName, currentVersion);
|
|
25
26
|
if (!newVersionAvailable)
|
|
26
27
|
return;
|
|
27
|
-
return () =>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
You are currently running v${currentVersion}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
return (extraMessage = "") => {
|
|
29
|
+
renderInfo({
|
|
30
|
+
headline: "Upgrade available",
|
|
31
|
+
body: `Version ${newVersionAvailable} of ${pkgName} is now available.
|
|
32
|
+
You are currently running v${currentVersion}.` + (extraMessage ? "\n\n" : "") + extraMessage,
|
|
33
|
+
reference: [
|
|
34
|
+
{
|
|
35
|
+
link: {
|
|
36
|
+
label: "Hydrogen releases",
|
|
37
|
+
url: "https://github.com/Shopify/hydrogen/releases"
|
|
38
|
+
}
|
|
37
39
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
return { currentVersion, newVersion: newVersionAvailable };
|
|
43
|
+
};
|
|
41
44
|
}
|
|
42
|
-
function locateDependency(require2,
|
|
45
|
+
function locateDependency(require2, nameToResolve, resolveFrom) {
|
|
43
46
|
try {
|
|
44
|
-
return require2.resolve(
|
|
47
|
+
return require2.resolve(nameToResolve, {
|
|
48
|
+
paths: [resolveFrom ?? process.cwd()]
|
|
49
|
+
});
|
|
45
50
|
} catch {
|
|
46
51
|
return;
|
|
47
52
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { checkHydrogenVersion } from './check-version.js';
|
|
2
|
+
import { vi, describe, afterEach, it, expect, beforeEach } from 'vitest';
|
|
3
|
+
import { outputMocker } from '@shopify/cli-kit';
|
|
4
|
+
import { checkForNewVersion } from '@shopify/cli-kit/node/node-package-manager';
|
|
5
|
+
|
|
6
|
+
vi.mock("@shopify/cli-kit/node/node-package-manager", () => {
|
|
7
|
+
return {
|
|
8
|
+
checkForNewVersion: vi.fn()
|
|
9
|
+
};
|
|
10
|
+
});
|
|
11
|
+
describe("checkHydrogenVersion()", () => {
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
vi.restoreAllMocks();
|
|
14
|
+
});
|
|
15
|
+
describe("when a current version is available", () => {
|
|
16
|
+
it("calls checkForNewVersion", async () => {
|
|
17
|
+
await checkHydrogenVersion("dir");
|
|
18
|
+
expect(checkForNewVersion).toHaveBeenCalledWith(
|
|
19
|
+
"@shopify/hydrogen",
|
|
20
|
+
expect.stringMatching(/20\d{2}\.\d{1,2}\.\d{1,3}/)
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
describe("and it is up to date", () => {
|
|
24
|
+
beforeEach(() => {
|
|
25
|
+
vi.mocked(checkForNewVersion).mockResolvedValue(void 0);
|
|
26
|
+
});
|
|
27
|
+
it("returns undefined", async () => {
|
|
28
|
+
expect(await checkHydrogenVersion("dir")).toBe(void 0);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
describe("and a new version is available", () => {
|
|
32
|
+
beforeEach(() => {
|
|
33
|
+
vi.mocked(checkForNewVersion).mockResolvedValue("2023.1.5");
|
|
34
|
+
});
|
|
35
|
+
it("returns a function", async () => {
|
|
36
|
+
expect(await checkHydrogenVersion("dir")).toBeInstanceOf(Function);
|
|
37
|
+
});
|
|
38
|
+
it("outputs a message to the user with the new version", async () => {
|
|
39
|
+
const outputMock = outputMocker.mockAndCaptureOutput();
|
|
40
|
+
const showUpgrade = await checkHydrogenVersion("dir");
|
|
41
|
+
const { currentVersion, newVersion } = showUpgrade();
|
|
42
|
+
expect(outputMock.info()).toMatch(
|
|
43
|
+
new RegExp(
|
|
44
|
+
` info .+ Upgrade available .+ Version ${newVersion.replaceAll(
|
|
45
|
+
".",
|
|
46
|
+
"\\."
|
|
47
|
+
)}.+ running v${currentVersion.replaceAll(".", "\\.")}`,
|
|
48
|
+
"is"
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
describe("when no current version can be found", () => {
|
|
55
|
+
it("returns undefined and does not call checkForNewVersion", async () => {
|
|
56
|
+
expect(await checkHydrogenVersion("/fake-absolute-dir")).toBe(void 0);
|
|
57
|
+
expect(checkForNewVersion).not.toHaveBeenCalled();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -10,7 +10,9 @@ async function getLatestReleaseDownloadUrl() {
|
|
|
10
10
|
const response = await http.fetch(REPO_RELEASES_URL);
|
|
11
11
|
if (!response.ok || response.status >= 400) {
|
|
12
12
|
throw new Error(
|
|
13
|
-
`Failed to fetch the latest release information. Status ${response.status} ${response.statusText}`
|
|
13
|
+
`Failed to fetch the latest release information. Status ${response.status} ${response.statusText.replace(/\.$/, "")}.` + (response.status === 403 ? `
|
|
14
|
+
|
|
15
|
+
If you are using a VPN, WARP, or similar service, consider disabling it momentarily.` : "")
|
|
14
16
|
);
|
|
15
17
|
}
|
|
16
18
|
const release = await response.json();
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'Inter';
|
|
3
|
-
src: url('../assets/inter-variable-font.
|
|
3
|
+
src: url('../assets/inter-variable-font.woff2') format('woff2-variations');
|
|
4
4
|
}
|
|
5
5
|
@font-face {
|
|
6
6
|
font-family: 'JetBrains Mono';
|
|
7
|
-
src: url('../assets/jetbrainsmono-variable-font.
|
|
8
|
-
format('
|
|
7
|
+
src: url('../assets/jetbrainsmono-variable-font.woff2')
|
|
8
|
+
format('woff2-variations');
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
* {
|
|
@@ -39,7 +39,7 @@ p {
|
|
|
39
39
|
body {
|
|
40
40
|
padding: 0;
|
|
41
41
|
margin: 0;
|
|
42
|
-
background: #
|
|
42
|
+
background: #fff;
|
|
43
43
|
font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
|
|
44
44
|
Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
45
45
|
-webkit-font-smoothing: antialiased;
|
|
@@ -214,7 +214,7 @@ main {
|
|
|
214
214
|
background: #fee9e8;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
.Banner.ErrorBanner
|
|
217
|
+
.Banner.ErrorBanner code {
|
|
218
218
|
background: #fef4f4;
|
|
219
219
|
border: 1px solid #fda9a5;
|
|
220
220
|
border-radius: 4px;
|
|
@@ -7,8 +7,8 @@ import { IconTwitter } from "../components/IconTwitter.jsx";
|
|
|
7
7
|
import { IconBanner } from "../components/IconBanner.jsx";
|
|
8
8
|
import { IconError } from "../components/IconError.jsx";
|
|
9
9
|
import favicon from "../assets/favicon.svg";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import interVariableFontWoff2 from "../assets/inter-variable-font.woff2";
|
|
11
|
+
import jetbrainsmonoVariableFontWoff2 from "../assets/jetbrainsmono-variable-font.woff2";
|
|
12
12
|
const meta = () => {
|
|
13
13
|
return {
|
|
14
14
|
title: "Hydrogen",
|
|
@@ -25,14 +25,14 @@ const links = () => [
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
rel: "preload",
|
|
28
|
-
href:
|
|
28
|
+
href: interVariableFontWoff2,
|
|
29
29
|
as: "font",
|
|
30
30
|
type: "font/ttf",
|
|
31
31
|
crossOrigin: "anonymous"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
rel: "preload",
|
|
35
|
-
href:
|
|
35
|
+
href: jetbrainsmonoVariableFontWoff2,
|
|
36
36
|
as: "font",
|
|
37
37
|
type: "font/ttf",
|
|
38
38
|
crossOrigin: "anonymous"
|
|
@@ -102,6 +102,7 @@ function ErrorPage() {
|
|
|
102
102
|
{"Check your domain and API token in your "}
|
|
103
103
|
<code>.env</code>
|
|
104
104
|
{" file. Learn more about"}
|
|
105
|
+
{` `}
|
|
105
106
|
<a target="_blank" rel="norefferer noopener" href="https://shopify.dev/docs/custom-storefronts/hydrogen/environment-variables">editing environment variables</a>
|
|
106
107
|
{"."}
|
|
107
108
|
</p>
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.0.
|
|
1
|
+
{"version":"4.0.8","commands":{"hydrogen:build":{"id":"hydrogen:build","description":"Builds a Hydrogen storefront for production.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false},"sourcemap":{"name":"sourcemap","type":"boolean","description":"Generate sourcemaps for the build.","allowNo":false},"disable-route-warning":{"name":"disable-route-warning","type":"boolean","description":"Disable warning about missing standard routes.","allowNo":false}},"args":[]},"hydrogen:check":{"id":"hydrogen:check","description":"Returns diagnostic information about a Hydrogen storefront.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false}},"args":[{"name":"resource","description":"The resource to check. Currently only 'routes' is supported.","required":true,"options":["routes"]}]},"hydrogen:dev":{"id":"hydrogen:dev","description":"Runs Hydrogen storefront in an Oxygen worker for development.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false},"port":{"name":"port","type":"option","description":"Port to run the server on.","multiple":false,"default":3000},"disable-virtual-routes":{"name":"disable-virtual-routes","type":"boolean","description":"Disable rendering fallback routes when a route file doesn't exist","allowNo":false}},"args":[]},"hydrogen:init":{"id":"hydrogen:init","description":"Creates a new Hydrogen storefront.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the destination directory and files if they already exist.","allowNo":false},"path":{"name":"path","type":"option","description":"The path to the directory of the new Hydrogen storefront.","multiple":false},"language":{"name":"language","type":"option","description":"Sets the template language to use. One of `js` or `ts`.","multiple":false},"template":{"name":"template","type":"option","description":"Sets the template to use. One of `demo-store` or `hello-world`.","multiple":false},"install-deps":{"name":"install-deps","type":"boolean","description":"Auto install dependencies using the active package manager","allowNo":true}},"args":[]},"hydrogen:preview":{"id":"hydrogen:preview","description":"Runs a Hydrogen storefront in an Oxygen worker for production.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false},"port":{"name":"port","type":"option","description":"Port to run the server on.","multiple":false,"default":3000}},"args":[]},"hydrogen:generate:route":{"id":"hydrogen:generate:route","description":"Generates a standard Shopify route.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"adapter":{"name":"adapter","type":"option","description":"Remix adapter used in the route. The default is `@shopify/remix-oxygen`.","multiple":false},"typescript":{"name":"typescript","type":"boolean","description":"Generate TypeScript files","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the destination directory and files if they already exist.","allowNo":false},"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false}},"args":[{"name":"route","description":"The route to generate. One of home,page,cart,products,collections,policies,robots,sitemap,account,all.","required":true,"options":["home","page","cart","products","collections","policies","robots","sitemap","account","all"]}]},"hydrogen:generate:routes":{"id":"hydrogen:generate:routes","description":"Generates all supported standard shopify routes.","strict":true,"pluginName":"@shopify/cli-hydrogen","pluginAlias":"@shopify/cli-hydrogen","pluginType":"core","aliases":[],"flags":{"adapter":{"name":"adapter","type":"option","description":"Remix adapter used in the route. The default is `@shopify/remix-oxygen`.","multiple":false},"typescript":{"name":"typescript","type":"boolean","description":"Generate TypeScript files","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Overwrite the destination directory and files if they already exist.","allowNo":false},"path":{"name":"path","type":"option","description":"The path to the directory of the Hydrogen storefront. The default is the current directory.","multiple":false}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"@shopify:registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
7
|
-
"version": "4.0.
|
|
7
|
+
"version": "4.0.8",
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"scripts": {
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"dev": "tsup --watch --config ./tsup.config.ts",
|
|
13
13
|
"typecheck": "tsc --noEmit",
|
|
14
14
|
"generate:manifest": "oclif manifest",
|
|
15
|
-
"prepack": "npm run build",
|
|
16
15
|
"test": "cross-env SHOPIFY_UNIT_TEST=1 vitest run",
|
|
17
16
|
"test:watch": "cross-env SHOPIFY_UNIT_TEST=1 vitest"
|
|
18
17
|
},
|
|
Binary file
|
|
Binary file
|