@vercel/static-build 9.0.3 → 10.0.1
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 +33 -22
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -34582,6 +34582,24 @@ var require_merge3 = __commonJS({
|
|
|
34582
34582
|
}
|
|
34583
34583
|
return builderRoutes;
|
|
34584
34584
|
}
|
|
34585
|
+
function addToHandleMap(path6, routesMapping, handleMap) {
|
|
34586
|
+
const br = routesMapping[path6];
|
|
34587
|
+
Object.keys(br).sort().forEach((use) => {
|
|
34588
|
+
let prevHandle = null;
|
|
34589
|
+
br[use].forEach((route) => {
|
|
34590
|
+
if ((0, import_index.isHandler)(route)) {
|
|
34591
|
+
prevHandle = route.handle;
|
|
34592
|
+
} else {
|
|
34593
|
+
const routes = handleMap.get(prevHandle);
|
|
34594
|
+
if (!routes) {
|
|
34595
|
+
handleMap.set(prevHandle, [route]);
|
|
34596
|
+
} else {
|
|
34597
|
+
routes.push(route);
|
|
34598
|
+
}
|
|
34599
|
+
}
|
|
34600
|
+
});
|
|
34601
|
+
});
|
|
34602
|
+
}
|
|
34585
34603
|
function getCheckAndContinue(routes) {
|
|
34586
34604
|
const checks = [];
|
|
34587
34605
|
const continues = [];
|
|
@@ -34618,43 +34636,36 @@ var require_merge3 = __commonJS({
|
|
|
34618
34636
|
}
|
|
34619
34637
|
}
|
|
34620
34638
|
});
|
|
34639
|
+
const projectHandleMap = /* @__PURE__ */ new Map();
|
|
34640
|
+
const projectMiddlewareRoutes = getBuilderRoutesMapping(
|
|
34641
|
+
builds.filter((b) => b.projectMiddleware)
|
|
34642
|
+
);
|
|
34643
|
+
Object.keys(projectMiddlewareRoutes).sort().forEach(
|
|
34644
|
+
(path6) => addToHandleMap(path6, projectMiddlewareRoutes, projectHandleMap)
|
|
34645
|
+
);
|
|
34621
34646
|
const builderHandleMap = /* @__PURE__ */ new Map();
|
|
34622
|
-
const builderRoutes = getBuilderRoutesMapping(
|
|
34623
|
-
|
|
34624
|
-
|
|
34625
|
-
|
|
34626
|
-
const sortedBuilders = Object.keys(br).sort();
|
|
34627
|
-
sortedBuilders.forEach((use) => {
|
|
34628
|
-
let builderPrevHandle = null;
|
|
34629
|
-
br[use].forEach((route) => {
|
|
34630
|
-
if ((0, import_index.isHandler)(route)) {
|
|
34631
|
-
builderPrevHandle = route.handle;
|
|
34632
|
-
} else {
|
|
34633
|
-
const routes = builderHandleMap.get(builderPrevHandle);
|
|
34634
|
-
if (!routes) {
|
|
34635
|
-
builderHandleMap.set(builderPrevHandle, [route]);
|
|
34636
|
-
} else {
|
|
34637
|
-
routes.push(route);
|
|
34638
|
-
}
|
|
34639
|
-
}
|
|
34640
|
-
});
|
|
34641
|
-
});
|
|
34642
|
-
});
|
|
34647
|
+
const builderRoutes = getBuilderRoutesMapping(
|
|
34648
|
+
builds.filter((b) => !b.projectMiddleware)
|
|
34649
|
+
);
|
|
34650
|
+
Object.keys(builderRoutes).sort().forEach((path6) => addToHandleMap(path6, builderRoutes, builderHandleMap));
|
|
34643
34651
|
const outputRoutes = [];
|
|
34644
34652
|
const uniqueHandleValues = /* @__PURE__ */ new Set([
|
|
34645
34653
|
null,
|
|
34646
34654
|
...userHandleMap.keys(),
|
|
34655
|
+
...projectHandleMap.keys(),
|
|
34647
34656
|
...builderHandleMap.keys()
|
|
34648
34657
|
]);
|
|
34649
34658
|
for (const handle of uniqueHandleValues) {
|
|
34650
34659
|
const userRoutes2 = userHandleMap.get(handle) || [];
|
|
34660
|
+
const projectRoutes = projectHandleMap.get(handle) || [];
|
|
34651
34661
|
const builderRoutes2 = builderHandleMap.get(handle) || [];
|
|
34652
34662
|
const builderSorted = getCheckAndContinue(builderRoutes2);
|
|
34653
|
-
if (handle !== null && (userRoutes2.length > 0 || builderRoutes2.length > 0)) {
|
|
34663
|
+
if (handle !== null && (userRoutes2.length > 0 || projectRoutes.length > 0 || builderRoutes2.length > 0)) {
|
|
34654
34664
|
outputRoutes.push({ handle });
|
|
34655
34665
|
}
|
|
34656
34666
|
outputRoutes.push(...builderSorted.continues);
|
|
34657
34667
|
outputRoutes.push(...userRoutes2);
|
|
34668
|
+
outputRoutes.push(...projectRoutes);
|
|
34658
34669
|
outputRoutes.push(...builderSorted.checks);
|
|
34659
34670
|
outputRoutes.push(...builderSorted.others);
|
|
34660
34671
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ts-morph": "12.0.0",
|
|
17
17
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.12",
|
|
18
|
-
"@vercel/
|
|
19
|
-
"@vercel/
|
|
18
|
+
"@vercel/static-config": "3.4.3",
|
|
19
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.2.57"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@vercel/build-utils": "14.
|
|
22
|
+
"@vercel/build-utils": "14.10.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/aws-lambda": "8.10.64",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"tree-kill": "1.2.2",
|
|
42
42
|
"vitest": "4.1.10",
|
|
43
43
|
"@vercel/error-utils": "2.2.1",
|
|
44
|
-
"@vercel/build-utils": "14.
|
|
44
|
+
"@vercel/build-utils": "14.10.1",
|
|
45
45
|
"@vercel/frameworks": "3.34.0",
|
|
46
|
-
"@vercel/
|
|
47
|
-
"@vercel/
|
|
46
|
+
"@vercel/routing-utils": "6.6.0",
|
|
47
|
+
"@vercel/fs-detectors": "7.2.5"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node ../../utils/build-builder.mjs",
|