@vercel/hydrogen 1.3.8 → 1.4.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/index.js +28 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -21,10 +21,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
build: () => build,
|
|
24
|
+
diagnostics: () => diagnostics,
|
|
24
25
|
prepareCache: () => prepareCache,
|
|
25
26
|
version: () => version
|
|
26
27
|
});
|
|
27
28
|
module.exports = __toCommonJS(src_exports);
|
|
29
|
+
var import_build_utils3 = require("@vercel/build-utils");
|
|
28
30
|
|
|
29
31
|
// src/build.ts
|
|
30
32
|
var import_fs = require("fs");
|
|
@@ -37,7 +39,8 @@ var build = async ({
|
|
|
37
39
|
files,
|
|
38
40
|
workPath,
|
|
39
41
|
config,
|
|
40
|
-
meta = {}
|
|
42
|
+
meta = {},
|
|
43
|
+
service
|
|
41
44
|
}) => {
|
|
42
45
|
const { installCommand, buildCommand } = config;
|
|
43
46
|
await (0, import_build_utils.download)(files, workPath, meta);
|
|
@@ -50,8 +53,15 @@ var build = async ({
|
|
|
50
53
|
}
|
|
51
54
|
const mountpoint = (0, import_path.dirname)(entrypoint);
|
|
52
55
|
const entrypointDir = (0, import_path.join)(workPath, mountpoint);
|
|
56
|
+
const nodeVersion = await (0, import_build_utils.getNodeVersion)(
|
|
57
|
+
entrypointDir,
|
|
58
|
+
void 0,
|
|
59
|
+
config,
|
|
60
|
+
meta
|
|
61
|
+
);
|
|
53
62
|
const {
|
|
54
63
|
cliType,
|
|
64
|
+
lockfilePath,
|
|
55
65
|
lockfileVersion,
|
|
56
66
|
packageJsonPackageManager,
|
|
57
67
|
turboSupportsCorepackHome
|
|
@@ -83,6 +93,21 @@ var build = async ({
|
|
|
83
93
|
config.projectSettings?.createdAt
|
|
84
94
|
);
|
|
85
95
|
}
|
|
96
|
+
try {
|
|
97
|
+
await (0, import_build_utils.generateProjectManifest)({
|
|
98
|
+
workPath: entrypointDir,
|
|
99
|
+
nodeVersion,
|
|
100
|
+
cliType,
|
|
101
|
+
lockfilePath,
|
|
102
|
+
lockfileVersion,
|
|
103
|
+
framework: config.framework ?? void 0,
|
|
104
|
+
serviceType: service ? (0, import_build_utils.getReportedServiceType)(service) : void 0
|
|
105
|
+
});
|
|
106
|
+
} catch (err) {
|
|
107
|
+
(0, import_build_utils.debug)(
|
|
108
|
+
`Failed to write hydrogen manifest: ${err instanceof Error ? err.message : String(err)}`
|
|
109
|
+
);
|
|
110
|
+
}
|
|
86
111
|
const edgeEntryDir = (0, import_path.join)(workPath, ".vercel/cache/hydrogen");
|
|
87
112
|
const edgeEntryRelative = (0, import_path.relative)(edgeEntryDir, workPath);
|
|
88
113
|
const edgeEntryDest = (0, import_path.join)(edgeEntryDir, "edge-entry.js");
|
|
@@ -179,9 +204,11 @@ var prepareCache = ({ repoRootPath, workPath }) => {
|
|
|
179
204
|
|
|
180
205
|
// src/index.ts
|
|
181
206
|
var version = 2;
|
|
207
|
+
var diagnostics = (0, import_build_utils3.createDiagnostics)("node");
|
|
182
208
|
// Annotate the CommonJS export names for ESM import in node:
|
|
183
209
|
0 && (module.exports = {
|
|
184
210
|
build,
|
|
211
|
+
diagnostics,
|
|
185
212
|
prepareCache,
|
|
186
213
|
version
|
|
187
214
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/hydrogen",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"execa": "3.2.0",
|
|
23
23
|
"fs-extra": "11.1.0",
|
|
24
24
|
"vitest": "2.0.3",
|
|
25
|
-
"@vercel/build-utils": "13.
|
|
25
|
+
"@vercel/build-utils": "13.28.0"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "node ../../utils/build-builder.mjs",
|