@vercel/hydrogen 1.0.0 → 1.0.2

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/index.js CHANGED
@@ -1,21 +1,171 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ build: () => build,
24
+ prepareCache: () => prepareCache,
25
+ version: () => version
26
+ });
27
+ module.exports = __toCommonJS(src_exports);
28
+
29
+ // src/build.ts
30
+ var import_fs = require("fs");
31
+ var import_path = require("path");
32
+ var import_build_utils = require("@vercel/build-utils");
33
+ var import_static_config = require("@vercel/static-config");
34
+ var import_ts_morph = require("ts-morph");
35
+ var build = async ({
36
+ entrypoint,
37
+ files,
38
+ workPath,
39
+ config,
40
+ meta = {}
41
+ }) => {
42
+ const { installCommand, buildCommand } = config;
43
+ await (0, import_build_utils.download)(files, workPath, meta);
44
+ const prefixedEnvs = (0, import_build_utils.getPrefixedEnvVars)({
45
+ envPrefix: "PUBLIC_",
46
+ envs: process.env
47
+ });
48
+ for (const [key, value] of Object.entries(prefixedEnvs)) {
49
+ process.env[key] = value;
50
+ }
51
+ const mountpoint = (0, import_path.dirname)(entrypoint);
52
+ const entrypointDir = (0, import_path.join)(workPath, mountpoint);
53
+ const nodeVersion = await (0, import_build_utils.getNodeVersion)(
54
+ entrypointDir,
55
+ void 0,
56
+ config,
57
+ meta
58
+ );
59
+ const spawnOpts = (0, import_build_utils.getSpawnOptions)(meta, nodeVersion);
60
+ const { cliType, lockfileVersion } = await (0, import_build_utils.scanParentDirs)(entrypointDir);
61
+ spawnOpts.env = (0, import_build_utils.getEnvForPackageManager)({
62
+ cliType,
63
+ lockfileVersion,
64
+ nodeVersion,
65
+ env: spawnOpts.env || {}
66
+ });
67
+ if (typeof installCommand === "string") {
68
+ if (installCommand.trim()) {
69
+ console.log(`Running "install" command: \`${installCommand}\`...`);
70
+ await (0, import_build_utils.execCommand)(installCommand, {
71
+ ...spawnOpts,
72
+ cwd: entrypointDir
73
+ });
74
+ } else {
75
+ console.log(`Skipping "install" command...`);
76
+ }
77
+ } else {
78
+ await (0, import_build_utils.runNpmInstall)(entrypointDir, [], spawnOpts, meta, nodeVersion);
79
+ }
80
+ const edgeEntryDir = (0, import_path.join)(workPath, ".vercel/cache/hydrogen");
81
+ const edgeEntryRelative = (0, import_path.relative)(edgeEntryDir, workPath);
82
+ const edgeEntryDest = (0, import_path.join)(edgeEntryDir, "edge-entry.js");
83
+ let edgeEntryContents = await import_fs.promises.readFile(
84
+ (0, import_path.join)(__dirname, "..", "edge-entry.js"),
85
+ "utf8"
86
+ );
87
+ edgeEntryContents = edgeEntryContents.replace(
88
+ /__RELATIVE__/g,
89
+ edgeEntryRelative
90
+ );
91
+ await import_fs.promises.mkdir(edgeEntryDir, { recursive: true });
92
+ await import_fs.promises.writeFile(edgeEntryDest, edgeEntryContents);
93
+ spawnOpts.env.SHOPIFY_FLAG_BUILD_TARGET = "worker";
94
+ spawnOpts.env.SHOPIFY_FLAG_BUILD_SSR_ENTRY = edgeEntryDest;
95
+ if (buildCommand) {
96
+ (0, import_build_utils.debug)(`Executing build command "${buildCommand}"`);
97
+ await (0, import_build_utils.execCommand)(buildCommand, {
98
+ ...spawnOpts,
99
+ cwd: entrypointDir
100
+ });
101
+ } else {
102
+ const pkg = await (0, import_build_utils.readConfigFile)(
103
+ (0, import_path.join)(entrypointDir, "package.json")
104
+ );
105
+ if (hasScript("vercel-build", pkg)) {
106
+ (0, import_build_utils.debug)(`Executing "yarn vercel-build"`);
107
+ await (0, import_build_utils.runPackageJsonScript)(entrypointDir, "vercel-build", spawnOpts);
108
+ } else if (hasScript("build", pkg)) {
109
+ (0, import_build_utils.debug)(`Executing "yarn build"`);
110
+ await (0, import_build_utils.runPackageJsonScript)(entrypointDir, "build", spawnOpts);
111
+ } else {
112
+ await (0, import_build_utils.execCommand)("shopify hydrogen build", {
113
+ ...spawnOpts,
114
+ cwd: entrypointDir
115
+ });
7
116
  }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
117
+ }
118
+ const [staticFiles, edgeFunctionFiles] = await Promise.all([
119
+ (0, import_build_utils.glob)("**", (0, import_path.join)(entrypointDir, "dist/client")),
120
+ (0, import_build_utils.glob)("**", (0, import_path.join)(entrypointDir, "dist/worker"))
121
+ ]);
122
+ const edgeFunction = new import_build_utils.EdgeFunction({
123
+ deploymentTarget: "v8-worker",
124
+ entrypoint: "index.js",
125
+ files: edgeFunctionFiles,
126
+ regions: (() => {
127
+ try {
128
+ const project = new import_ts_morph.Project();
129
+ const config2 = (0, import_static_config.getConfig)(project, edgeFunctionFiles["index.js"].fsPath);
130
+ return config2?.regions;
131
+ } catch {
132
+ return void 0;
133
+ }
134
+ })()
135
+ });
136
+ delete staticFiles["index.html"];
137
+ return {
138
+ routes: [
139
+ {
140
+ handle: "filesystem"
141
+ },
142
+ {
143
+ src: "/(.*)",
144
+ dest: "/hydrogen"
145
+ }
146
+ ],
147
+ output: {
148
+ hydrogen: edgeFunction,
149
+ ...staticFiles
150
+ }
151
+ };
152
+ };
153
+ function hasScript(scriptName, pkg) {
154
+ const scripts = pkg?.scripts || {};
155
+ return typeof scripts[scriptName] === "string";
156
+ }
157
+
158
+ // src/prepare-cache.ts
159
+ var import_build_utils2 = require("@vercel/build-utils");
160
+ var prepareCache = ({ repoRootPath, workPath }) => {
161
+ return (0, import_build_utils2.glob)("**/node_modules/**", repoRootPath || workPath);
15
162
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.version = void 0;
18
- exports.version = 2;
19
- __exportStar(require("./build"), exports);
20
- __exportStar(require("./prepare-cache"), exports);
21
- //# sourceMappingURL=index.js.map
163
+
164
+ // src/index.ts
165
+ var version = 2;
166
+ // Annotate the CommonJS export names for ESM import in node:
167
+ 0 && (module.exports = {
168
+ build,
169
+ prepareCache,
170
+ version
171
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/hydrogen",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "homepage": "https://vercel.com/docs",
@@ -13,19 +13,22 @@
13
13
  "dist",
14
14
  "edge-entry.js"
15
15
  ],
16
+ "dependencies": {
17
+ "@vercel/static-config": "3.0.0",
18
+ "ts-morph": "12.0.0"
19
+ },
16
20
  "devDependencies": {
17
21
  "@types/jest": "27.5.1",
18
22
  "@types/node": "14.18.33",
19
- "@vercel/build-utils": "7.0.0",
20
- "@vercel/static-config": "3.0.0",
23
+ "@vercel/build-utils": "7.5.0",
21
24
  "execa": "3.2.0",
22
25
  "fs-extra": "11.1.0",
23
- "jest-junit": "16.0.0",
24
- "ts-morph": "12.0.0"
26
+ "jest-junit": "16.0.0"
25
27
  },
26
28
  "scripts": {
27
- "build": "node build.js",
29
+ "build": "node ../../utils/build-builder.mjs",
28
30
  "test-e2e": "pnpm test test/test.js",
29
- "test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail --runInBand"
31
+ "test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail --runInBand",
32
+ "type-check": "tsc --noEmit"
30
33
  }
31
34
  }
package/dist/build.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import type { BuildV2 } from '@vercel/build-utils';
2
- export declare const build: BuildV2;
package/dist/build.js DELETED
@@ -1,127 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.build = void 0;
4
- const fs_1 = require("fs");
5
- const path_1 = require("path");
6
- const build_utils_1 = require("@vercel/build-utils");
7
- const static_config_1 = require("@vercel/static-config");
8
- const ts_morph_1 = require("ts-morph");
9
- const build = async ({ entrypoint, files, workPath, config, meta = {}, }) => {
10
- const { installCommand, buildCommand } = config;
11
- await (0, build_utils_1.download)(files, workPath, meta);
12
- const prefixedEnvs = (0, build_utils_1.getPrefixedEnvVars)({
13
- envPrefix: 'PUBLIC_',
14
- envs: process.env,
15
- });
16
- for (const [key, value] of Object.entries(prefixedEnvs)) {
17
- process.env[key] = value;
18
- }
19
- const mountpoint = (0, path_1.dirname)(entrypoint);
20
- const entrypointDir = (0, path_1.join)(workPath, mountpoint);
21
- // Run "Install Command"
22
- const nodeVersion = await (0, build_utils_1.getNodeVersion)(entrypointDir, undefined, config, meta);
23
- const spawnOpts = (0, build_utils_1.getSpawnOptions)(meta, nodeVersion);
24
- const { cliType, lockfileVersion } = await (0, build_utils_1.scanParentDirs)(entrypointDir);
25
- spawnOpts.env = (0, build_utils_1.getEnvForPackageManager)({
26
- cliType,
27
- lockfileVersion,
28
- nodeVersion,
29
- env: spawnOpts.env || {},
30
- });
31
- if (typeof installCommand === 'string') {
32
- if (installCommand.trim()) {
33
- console.log(`Running "install" command: \`${installCommand}\`...`);
34
- await (0, build_utils_1.execCommand)(installCommand, {
35
- ...spawnOpts,
36
- cwd: entrypointDir,
37
- });
38
- }
39
- else {
40
- console.log(`Skipping "install" command...`);
41
- }
42
- }
43
- else {
44
- await (0, build_utils_1.runNpmInstall)(entrypointDir, [], spawnOpts, meta, nodeVersion);
45
- }
46
- // Copy the edge entrypoint file into `.vercel/cache`
47
- const edgeEntryDir = (0, path_1.join)(workPath, '.vercel/cache/hydrogen');
48
- const edgeEntryRelative = (0, path_1.relative)(edgeEntryDir, workPath);
49
- const edgeEntryDest = (0, path_1.join)(edgeEntryDir, 'edge-entry.js');
50
- let edgeEntryContents = await fs_1.promises.readFile((0, path_1.join)(__dirname, '..', 'edge-entry.js'), 'utf8');
51
- edgeEntryContents = edgeEntryContents.replace(/__RELATIVE__/g, edgeEntryRelative);
52
- await fs_1.promises.mkdir(edgeEntryDir, { recursive: true });
53
- await fs_1.promises.writeFile(edgeEntryDest, edgeEntryContents);
54
- // Make `shopify hydrogen build` output a Edge Function compatible bundle
55
- spawnOpts.env.SHOPIFY_FLAG_BUILD_TARGET = 'worker';
56
- // Use this file as the entrypoint for the Edge Function bundle build
57
- spawnOpts.env.SHOPIFY_FLAG_BUILD_SSR_ENTRY = edgeEntryDest;
58
- // Run "Build Command"
59
- if (buildCommand) {
60
- (0, build_utils_1.debug)(`Executing build command "${buildCommand}"`);
61
- await (0, build_utils_1.execCommand)(buildCommand, {
62
- ...spawnOpts,
63
- cwd: entrypointDir,
64
- });
65
- }
66
- else {
67
- const pkg = await (0, build_utils_1.readConfigFile)((0, path_1.join)(entrypointDir, 'package.json'));
68
- if (hasScript('vercel-build', pkg)) {
69
- (0, build_utils_1.debug)(`Executing "yarn vercel-build"`);
70
- await (0, build_utils_1.runPackageJsonScript)(entrypointDir, 'vercel-build', spawnOpts);
71
- }
72
- else if (hasScript('build', pkg)) {
73
- (0, build_utils_1.debug)(`Executing "yarn build"`);
74
- await (0, build_utils_1.runPackageJsonScript)(entrypointDir, 'build', spawnOpts);
75
- }
76
- else {
77
- await (0, build_utils_1.execCommand)('shopify hydrogen build', {
78
- ...spawnOpts,
79
- cwd: entrypointDir,
80
- });
81
- }
82
- }
83
- const [staticFiles, edgeFunctionFiles] = await Promise.all([
84
- (0, build_utils_1.glob)('**', (0, path_1.join)(entrypointDir, 'dist/client')),
85
- (0, build_utils_1.glob)('**', (0, path_1.join)(entrypointDir, 'dist/worker')),
86
- ]);
87
- const edgeFunction = new build_utils_1.EdgeFunction({
88
- name: 'hydrogen',
89
- deploymentTarget: 'v8-worker',
90
- entrypoint: 'index.js',
91
- files: edgeFunctionFiles,
92
- regions: (() => {
93
- try {
94
- const project = new ts_morph_1.Project();
95
- const config = (0, static_config_1.getConfig)(project, edgeFunctionFiles['index.js'].fsPath);
96
- return config?.regions;
97
- }
98
- catch {
99
- return undefined;
100
- }
101
- })(),
102
- });
103
- // The `index.html` file is a template, but we want to serve the
104
- // SSR version instead, so omit this static file from the output
105
- delete staticFiles['index.html'];
106
- return {
107
- routes: [
108
- {
109
- handle: 'filesystem',
110
- },
111
- {
112
- src: '/(.*)',
113
- dest: '/hydrogen',
114
- },
115
- ],
116
- output: {
117
- hydrogen: edgeFunction,
118
- ...staticFiles,
119
- },
120
- };
121
- };
122
- exports.build = build;
123
- function hasScript(scriptName, pkg) {
124
- const scripts = pkg?.scripts || {};
125
- return typeof scripts[scriptName] === 'string';
126
- }
127
- //# sourceMappingURL=build.js.map
package/dist/build.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":";;;AAAA,2BAAoC;AACpC,+BAA+C;AAC/C,qDAc6B;AAE7B,yDAAkD;AAClD,uCAAmC;AAE5B,MAAM,KAAK,GAAY,KAAK,EAAE,EACnC,UAAU,EACV,KAAK,EACL,QAAQ,EAC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AC,MAAM;gBACN,OAAO,SAAS,CAAC;aAClB;QACH,CAAC,CAAC,EAAE;KACL,CAAC,CAAC;IAEH,gEAAgE;IAChE,gEAAgE;IAChE,OAAO,WAAW,CAAC,YAAY,CAAC,CAAC;IAEjC,OAAO;QACL,MAAM,EAAE;YACN;gBACE,MAAM,EAAE,YAAY;aACrB;YACD;gBACE,GAAG,EAAE,OAAO;gBACZ,IAAI,EAAE,WAAW;aAClB;SACF;QACD,MAAM,EAAE;YACN,QAAQ,EAAE,YAAY;YACtB,GAAG,WAAW;SACf;KACF,CAAC;AACJ,CAAC,CAAC;AA7IW,QAAA,KAAK,SA6IhB;AAEF,SAAS,SAAS,CAAC,UAAkB,EAAE,GAAuB;IAC5D,MAAM,OAAO,GAAG,GAAG,EAAE,OAAO,IAAI,EAAE,CAAC;IACnC,OAAO,OAAO,OAAO,CAAC,UAAU,CAAC,KAAK,QAAQ,CAAC;AACjD,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export declare const version = 2;
2
- export * from './build';
3
- export * from './prepare-cache';
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAa,QAAA,OAAO,GAAG,CAAC,CAAC;AACzB,0CAAwB;AACxB,kDAAgC"}
@@ -1,2 +0,0 @@
1
- import type { PrepareCache } from '@vercel/build-utils';
2
- export declare const prepareCache: PrepareCache;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.prepareCache = void 0;
4
- const build_utils_1 = require("@vercel/build-utils");
5
- const prepareCache = ({ repoRootPath, workPath }) => {
6
- return (0, build_utils_1.glob)('**/node_modules/**', repoRootPath || workPath);
7
- };
8
- exports.prepareCache = prepareCache;
9
- //# sourceMappingURL=prepare-cache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prepare-cache.js","sourceRoot":"","sources":["../src/prepare-cache.ts"],"names":[],"mappings":";;;AAAA,qDAA2C;AAGpC,MAAM,YAAY,GAAiB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE;IACvE,OAAO,IAAA,kBAAI,EAAC,oBAAoB,EAAE,YAAY,IAAI,QAAQ,CAAC,CAAC;AAC9D,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}