@vercel/remix-builder 5.2.1 → 5.2.3
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 +138 -86
- package/package.json +3 -4
package/dist/index.js
CHANGED
|
@@ -2442,12 +2442,11 @@ var require_semver2 = __commonJS({
|
|
|
2442
2442
|
}
|
|
2443
2443
|
});
|
|
2444
2444
|
|
|
2445
|
-
// ../../node_modules/.pnpm/path-to-regexp@6.
|
|
2445
|
+
// ../../node_modules/.pnpm/path-to-regexp@6.1.0/node_modules/path-to-regexp/dist/index.js
|
|
2446
2446
|
var require_dist = __commonJS({
|
|
2447
|
-
"../../node_modules/.pnpm/path-to-regexp@6.
|
|
2447
|
+
"../../node_modules/.pnpm/path-to-regexp@6.1.0/node_modules/path-to-regexp/dist/index.js"(exports) {
|
|
2448
2448
|
"use strict";
|
|
2449
2449
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2450
|
-
exports.pathToRegexp = exports.tokensToRegexp = exports.regexpToFunction = exports.match = exports.tokensToFunction = exports.compile = exports.parse = void 0;
|
|
2451
2450
|
function lexer(str) {
|
|
2452
2451
|
var tokens = [];
|
|
2453
2452
|
var i = 0;
|
|
@@ -2487,7 +2486,7 @@ var require_dist = __commonJS({
|
|
|
2487
2486
|
break;
|
|
2488
2487
|
}
|
|
2489
2488
|
if (!name)
|
|
2490
|
-
throw new TypeError("Missing parameter name at "
|
|
2489
|
+
throw new TypeError("Missing parameter name at " + i);
|
|
2491
2490
|
tokens.push({ type: "NAME", index: i, value: name });
|
|
2492
2491
|
i = j;
|
|
2493
2492
|
continue;
|
|
@@ -2497,7 +2496,7 @@ var require_dist = __commonJS({
|
|
|
2497
2496
|
var pattern = "";
|
|
2498
2497
|
var j = i + 1;
|
|
2499
2498
|
if (str[j] === "?") {
|
|
2500
|
-
throw new TypeError('Pattern cannot start with "?" at '
|
|
2499
|
+
throw new TypeError('Pattern cannot start with "?" at ' + j);
|
|
2501
2500
|
}
|
|
2502
2501
|
while (j < str.length) {
|
|
2503
2502
|
if (str[j] === "\\") {
|
|
@@ -2513,15 +2512,15 @@ var require_dist = __commonJS({
|
|
|
2513
2512
|
} else if (str[j] === "(") {
|
|
2514
2513
|
count++;
|
|
2515
2514
|
if (str[j + 1] !== "?") {
|
|
2516
|
-
throw new TypeError("Capturing groups are not allowed at "
|
|
2515
|
+
throw new TypeError("Capturing groups are not allowed at " + j);
|
|
2517
2516
|
}
|
|
2518
2517
|
}
|
|
2519
2518
|
pattern += str[j++];
|
|
2520
2519
|
}
|
|
2521
2520
|
if (count)
|
|
2522
|
-
throw new TypeError("Unbalanced pattern at "
|
|
2521
|
+
throw new TypeError("Unbalanced pattern at " + i);
|
|
2523
2522
|
if (!pattern)
|
|
2524
|
-
throw new TypeError("Missing pattern at "
|
|
2523
|
+
throw new TypeError("Missing pattern at " + i);
|
|
2525
2524
|
tokens.push({ type: "PATTERN", index: i, value: pattern });
|
|
2526
2525
|
i = j;
|
|
2527
2526
|
continue;
|
|
@@ -2537,7 +2536,7 @@ var require_dist = __commonJS({
|
|
|
2537
2536
|
}
|
|
2538
2537
|
var tokens = lexer(str);
|
|
2539
2538
|
var _a = options.prefixes, prefixes = _a === void 0 ? "./" : _a;
|
|
2540
|
-
var defaultPattern = "[^"
|
|
2539
|
+
var defaultPattern = "[^" + escapeString(options.delimiter || "/#?") + "]+?";
|
|
2541
2540
|
var result = [];
|
|
2542
2541
|
var key = 0;
|
|
2543
2542
|
var i = 0;
|
|
@@ -2551,7 +2550,7 @@ var require_dist = __commonJS({
|
|
|
2551
2550
|
if (value2 !== void 0)
|
|
2552
2551
|
return value2;
|
|
2553
2552
|
var _a2 = tokens[i], nextType = _a2.type, index = _a2.index;
|
|
2554
|
-
throw new TypeError("Unexpected "
|
|
2553
|
+
throw new TypeError("Unexpected " + nextType + " at " + index + ", expected " + type);
|
|
2555
2554
|
};
|
|
2556
2555
|
var consumeText = function() {
|
|
2557
2556
|
var result2 = "";
|
|
@@ -2628,7 +2627,7 @@ var require_dist = __commonJS({
|
|
|
2628
2627
|
} : _a, _b = options.validate, validate = _b === void 0 ? true : _b;
|
|
2629
2628
|
var matches = tokens.map(function(token) {
|
|
2630
2629
|
if (typeof token === "object") {
|
|
2631
|
-
return new RegExp("^(?:"
|
|
2630
|
+
return new RegExp("^(?:" + token.pattern + ")$", reFlags);
|
|
2632
2631
|
}
|
|
2633
2632
|
});
|
|
2634
2633
|
return function(data) {
|
|
@@ -2644,17 +2643,17 @@ var require_dist = __commonJS({
|
|
|
2644
2643
|
var repeat = token.modifier === "*" || token.modifier === "+";
|
|
2645
2644
|
if (Array.isArray(value)) {
|
|
2646
2645
|
if (!repeat) {
|
|
2647
|
-
throw new TypeError('Expected "'
|
|
2646
|
+
throw new TypeError('Expected "' + token.name + '" to not repeat, but got an array');
|
|
2648
2647
|
}
|
|
2649
2648
|
if (value.length === 0) {
|
|
2650
2649
|
if (optional)
|
|
2651
2650
|
continue;
|
|
2652
|
-
throw new TypeError('Expected "'
|
|
2651
|
+
throw new TypeError('Expected "' + token.name + '" to not be empty');
|
|
2653
2652
|
}
|
|
2654
2653
|
for (var j = 0; j < value.length; j++) {
|
|
2655
2654
|
var segment = encode(value[j], token);
|
|
2656
2655
|
if (validate && !matches[i].test(segment)) {
|
|
2657
|
-
throw new TypeError('Expected all "'
|
|
2656
|
+
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
|
|
2658
2657
|
}
|
|
2659
2658
|
path += token.prefix + segment + token.suffix;
|
|
2660
2659
|
}
|
|
@@ -2663,7 +2662,7 @@ var require_dist = __commonJS({
|
|
|
2663
2662
|
if (typeof value === "string" || typeof value === "number") {
|
|
2664
2663
|
var segment = encode(String(value), token);
|
|
2665
2664
|
if (validate && !matches[i].test(segment)) {
|
|
2666
|
-
throw new TypeError('Expected "'
|
|
2665
|
+
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
|
|
2667
2666
|
}
|
|
2668
2667
|
path += token.prefix + segment + token.suffix;
|
|
2669
2668
|
continue;
|
|
@@ -2671,7 +2670,7 @@ var require_dist = __commonJS({
|
|
|
2671
2670
|
if (optional)
|
|
2672
2671
|
continue;
|
|
2673
2672
|
var typeOfMessage = repeat ? "an array" : "a string";
|
|
2674
|
-
throw new TypeError('Expected "'
|
|
2673
|
+
throw new TypeError('Expected "' + token.name + '" to be ' + typeOfMessage);
|
|
2675
2674
|
}
|
|
2676
2675
|
return path;
|
|
2677
2676
|
};
|
|
@@ -2724,19 +2723,17 @@ var require_dist = __commonJS({
|
|
|
2724
2723
|
function regexpToRegexp(path, keys) {
|
|
2725
2724
|
if (!keys)
|
|
2726
2725
|
return path;
|
|
2727
|
-
var
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
});
|
|
2739
|
-
execResult = groupsRegex.exec(path.source);
|
|
2726
|
+
var groups = path.source.match(/\((?!\?)/g);
|
|
2727
|
+
if (groups) {
|
|
2728
|
+
for (var i = 0; i < groups.length; i++) {
|
|
2729
|
+
keys.push({
|
|
2730
|
+
name: i,
|
|
2731
|
+
prefix: "",
|
|
2732
|
+
suffix: "",
|
|
2733
|
+
modifier: "",
|
|
2734
|
+
pattern: ""
|
|
2735
|
+
});
|
|
2736
|
+
}
|
|
2740
2737
|
}
|
|
2741
2738
|
return path;
|
|
2742
2739
|
}
|
|
@@ -2744,7 +2741,7 @@ var require_dist = __commonJS({
|
|
|
2744
2741
|
var parts = paths.map(function(path) {
|
|
2745
2742
|
return pathToRegexp2(path, keys, options).source;
|
|
2746
2743
|
});
|
|
2747
|
-
return new RegExp("(?:"
|
|
2744
|
+
return new RegExp("(?:" + parts.join("|") + ")", flags(options));
|
|
2748
2745
|
}
|
|
2749
2746
|
function stringToRegexp(path, keys, options) {
|
|
2750
2747
|
return tokensToRegexp(parse(path, options), keys, options);
|
|
@@ -2755,9 +2752,9 @@ var require_dist = __commonJS({
|
|
|
2755
2752
|
}
|
|
2756
2753
|
var _a = options.strict, strict = _a === void 0 ? false : _a, _b = options.start, start = _b === void 0 ? true : _b, _c = options.end, end = _c === void 0 ? true : _c, _d = options.encode, encode = _d === void 0 ? function(x) {
|
|
2757
2754
|
return x;
|
|
2758
|
-
} : _d
|
|
2759
|
-
var
|
|
2760
|
-
var
|
|
2755
|
+
} : _d;
|
|
2756
|
+
var endsWith = "[" + escapeString(options.endsWith || "") + "]|$";
|
|
2757
|
+
var delimiter = "[" + escapeString(options.delimiter || "/#?") + "]";
|
|
2761
2758
|
var route = start ? "^" : "";
|
|
2762
2759
|
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
|
|
2763
2760
|
var token = tokens_1[_i];
|
|
@@ -2772,34 +2769,33 @@ var require_dist = __commonJS({
|
|
|
2772
2769
|
if (prefix || suffix) {
|
|
2773
2770
|
if (token.modifier === "+" || token.modifier === "*") {
|
|
2774
2771
|
var mod = token.modifier === "*" ? "?" : "";
|
|
2775
|
-
route += "(?:"
|
|
2772
|
+
route += "(?:" + prefix + "((?:" + token.pattern + ")(?:" + suffix + prefix + "(?:" + token.pattern + "))*)" + suffix + ")" + mod;
|
|
2776
2773
|
} else {
|
|
2777
|
-
route += "(?:"
|
|
2774
|
+
route += "(?:" + prefix + "(" + token.pattern + ")" + suffix + ")" + token.modifier;
|
|
2778
2775
|
}
|
|
2779
2776
|
} else {
|
|
2780
|
-
|
|
2781
|
-
route += "((?:".concat(token.pattern, ")").concat(token.modifier, ")");
|
|
2782
|
-
} else {
|
|
2783
|
-
route += "(".concat(token.pattern, ")").concat(token.modifier);
|
|
2784
|
-
}
|
|
2777
|
+
route += "(" + token.pattern + ")" + token.modifier;
|
|
2785
2778
|
}
|
|
2786
2779
|
} else {
|
|
2787
|
-
route += "(?:"
|
|
2780
|
+
route += "(?:" + prefix + suffix + ")" + token.modifier;
|
|
2788
2781
|
}
|
|
2789
2782
|
}
|
|
2790
2783
|
}
|
|
2791
2784
|
if (end) {
|
|
2792
2785
|
if (!strict)
|
|
2793
|
-
route +=
|
|
2794
|
-
route += !options.endsWith ? "$" : "(?="
|
|
2786
|
+
route += delimiter + "?";
|
|
2787
|
+
route += !options.endsWith ? "$" : "(?=" + endsWith + ")";
|
|
2795
2788
|
} else {
|
|
2796
2789
|
var endToken = tokens[tokens.length - 1];
|
|
2797
|
-
var isEndDelimited = typeof endToken === "string" ?
|
|
2790
|
+
var isEndDelimited = typeof endToken === "string" ? delimiter.indexOf(endToken[endToken.length - 1]) > -1 : (
|
|
2791
|
+
// tslint:disable-next-line
|
|
2792
|
+
endToken === void 0
|
|
2793
|
+
);
|
|
2798
2794
|
if (!strict) {
|
|
2799
|
-
route += "(?:"
|
|
2795
|
+
route += "(?:" + delimiter + "(?=" + endsWith + "))?";
|
|
2800
2796
|
}
|
|
2801
2797
|
if (!isEndDelimited) {
|
|
2802
|
-
route += "(?="
|
|
2798
|
+
route += "(?=" + delimiter + "|" + endsWith + ")";
|
|
2803
2799
|
}
|
|
2804
2800
|
}
|
|
2805
2801
|
return new RegExp(route, flags(options));
|
|
@@ -3206,6 +3202,66 @@ var require_dist2 = __commonJS({
|
|
|
3206
3202
|
}
|
|
3207
3203
|
});
|
|
3208
3204
|
|
|
3205
|
+
// ../../internals/path-to-regexp/dist/index.js
|
|
3206
|
+
var require_dist3 = __commonJS({
|
|
3207
|
+
"../../internals/path-to-regexp/dist/index.js"(exports) {
|
|
3208
|
+
"use strict";
|
|
3209
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3210
|
+
exports.compile = exports.pathToRegexp = void 0;
|
|
3211
|
+
var path_to_regexp_1 = require_dist();
|
|
3212
|
+
Object.defineProperty(exports, "compile", { enumerable: true, get: function() {
|
|
3213
|
+
return path_to_regexp_1.compile;
|
|
3214
|
+
} });
|
|
3215
|
+
var path_to_regexp_updated_1 = require_dist2();
|
|
3216
|
+
function cloneKeys(keys) {
|
|
3217
|
+
if (typeof keys === "undefined") {
|
|
3218
|
+
return void 0;
|
|
3219
|
+
}
|
|
3220
|
+
return keys.slice(0);
|
|
3221
|
+
}
|
|
3222
|
+
function compareKeys(left, right) {
|
|
3223
|
+
const leftSerialized = typeof left === "undefined" ? "undefined" : left.toString();
|
|
3224
|
+
const rightSerialized = typeof right === "undefined" ? "undefined" : right.toString();
|
|
3225
|
+
return leftSerialized === rightSerialized;
|
|
3226
|
+
}
|
|
3227
|
+
function pathToRegexp2(callerId, path, keys, options) {
|
|
3228
|
+
const newKeys = cloneKeys(keys);
|
|
3229
|
+
const currentRegExp = (0, path_to_regexp_1.pathToRegexp)(path, keys, options);
|
|
3230
|
+
try {
|
|
3231
|
+
const currentKeys = keys;
|
|
3232
|
+
const newRegExp = (0, path_to_regexp_updated_1.pathToRegexp)(path, newKeys, options);
|
|
3233
|
+
const isDiffRegExp = currentRegExp.toString() !== newRegExp.toString();
|
|
3234
|
+
if (process.env.FORCE_PATH_TO_REGEXP_LOG || isDiffRegExp) {
|
|
3235
|
+
const message = JSON.stringify({
|
|
3236
|
+
path,
|
|
3237
|
+
currentRegExp: currentRegExp.toString(),
|
|
3238
|
+
newRegExp: newRegExp.toString()
|
|
3239
|
+
});
|
|
3240
|
+
console.error(`[vc] PATH TO REGEXP PATH DIFF @ #${callerId}: ${message}`);
|
|
3241
|
+
}
|
|
3242
|
+
const isDiffKeys = !compareKeys(keys, newKeys);
|
|
3243
|
+
if (process.env.FORCE_PATH_TO_REGEXP_LOG || isDiffKeys) {
|
|
3244
|
+
const message = JSON.stringify({
|
|
3245
|
+
isDiffKeys,
|
|
3246
|
+
currentKeys,
|
|
3247
|
+
newKeys
|
|
3248
|
+
});
|
|
3249
|
+
console.error(`[vc] PATH TO REGEXP KEYS DIFF @ #${callerId}: ${message}`);
|
|
3250
|
+
}
|
|
3251
|
+
} catch (err) {
|
|
3252
|
+
const error = err;
|
|
3253
|
+
const message = JSON.stringify({
|
|
3254
|
+
path,
|
|
3255
|
+
error: error.message
|
|
3256
|
+
});
|
|
3257
|
+
console.error(`[vc] PATH TO REGEXP ERROR @ #${callerId}: ${message}`);
|
|
3258
|
+
}
|
|
3259
|
+
return currentRegExp;
|
|
3260
|
+
}
|
|
3261
|
+
exports.pathToRegexp = pathToRegexp2;
|
|
3262
|
+
}
|
|
3263
|
+
});
|
|
3264
|
+
|
|
3209
3265
|
// src/index.ts
|
|
3210
3266
|
var src_exports = {};
|
|
3211
3267
|
__export(src_exports, {
|
|
@@ -3226,41 +3282,10 @@ var import_build_utils3 = require("@vercel/build-utils");
|
|
|
3226
3282
|
var import_semver = __toESM(require_semver2());
|
|
3227
3283
|
var import_fs = require("fs");
|
|
3228
3284
|
var import_path = require("path");
|
|
3229
|
-
var import_path_to_regexp = __toESM(
|
|
3230
|
-
var import_path_to_regexp_updated = __toESM(require_dist2());
|
|
3285
|
+
var import_path_to_regexp = __toESM(require_dist3());
|
|
3231
3286
|
var import_build_utils = require("@vercel/build-utils");
|
|
3232
3287
|
var import_build_utils2 = require("@vercel/build-utils");
|
|
3233
3288
|
var import_module = require("module");
|
|
3234
|
-
function pathToRegexp(callerId, path, keys, options) {
|
|
3235
|
-
const currentRegExp = (0, import_path_to_regexp.pathToRegexp)(path, keys, options);
|
|
3236
|
-
try {
|
|
3237
|
-
const currentKeys = keys;
|
|
3238
|
-
const newKeys = [];
|
|
3239
|
-
const newRegExp = (0, import_path_to_regexp_updated.pathToRegexp)(path, newKeys, options);
|
|
3240
|
-
const isDiffRegExp = currentRegExp.toString() !== newRegExp.toString();
|
|
3241
|
-
if (process.env.FORCE_PATH_TO_REGEXP_LOG || isDiffRegExp) {
|
|
3242
|
-
const message = JSON.stringify({
|
|
3243
|
-
path,
|
|
3244
|
-
currentRegExp: currentRegExp.toString(),
|
|
3245
|
-
newRegExp: newRegExp.toString()
|
|
3246
|
-
});
|
|
3247
|
-
console.error(`[vc] PATH TO REGEXP PATH DIFF @ #${callerId}: ${message}`);
|
|
3248
|
-
}
|
|
3249
|
-
const isDiffKeys = keys?.toString() !== newKeys?.toString();
|
|
3250
|
-
if (process.env.FORCE_PATH_TO_REGEXP_LOG || isDiffKeys) {
|
|
3251
|
-
const message = JSON.stringify({
|
|
3252
|
-
isDiffKeys,
|
|
3253
|
-
currentKeys,
|
|
3254
|
-
newKeys
|
|
3255
|
-
});
|
|
3256
|
-
console.error(`[vc] PATH TO REGEXP KEYS DIFF @ #${callerId}: ${message}`);
|
|
3257
|
-
}
|
|
3258
|
-
} catch (err) {
|
|
3259
|
-
const error = err;
|
|
3260
|
-
console.error(`[vc] PATH TO REGEXP ERROR @ #${callerId}: ${error.message}`);
|
|
3261
|
-
}
|
|
3262
|
-
return currentRegExp;
|
|
3263
|
-
}
|
|
3264
3289
|
var require_ = (0, import_module.createRequire)(__filename);
|
|
3265
3290
|
var SPLAT_PATH = "/:params*";
|
|
3266
3291
|
var entryExts = [".js", ".jsx", ".ts", ".tsx"];
|
|
@@ -3371,7 +3396,7 @@ function getPathFromRoute(route, routes) {
|
|
|
3371
3396
|
}
|
|
3372
3397
|
function getRegExpFromPath(rePath) {
|
|
3373
3398
|
const keys = [];
|
|
3374
|
-
const re = pathToRegexp("923", rePath, keys);
|
|
3399
|
+
const re = (0, import_path_to_regexp.pathToRegexp)("923", rePath, keys);
|
|
3375
3400
|
return keys.length > 0 ? re : false;
|
|
3376
3401
|
}
|
|
3377
3402
|
async function chdirAndReadConfig(remixRunDevPath, dir, packageJsonPath) {
|
|
@@ -3566,6 +3591,15 @@ var REMIX_FRAMEWORK_SETTINGS = {
|
|
|
3566
3591
|
buildResultFilePath: ".vercel/remix-build-result.json",
|
|
3567
3592
|
slug: "remix",
|
|
3568
3593
|
sourceSearchValue: "@remix-run/dev/server-build",
|
|
3594
|
+
edge: {
|
|
3595
|
+
serverSourcePromise: edgeServerSrcPromise,
|
|
3596
|
+
traceWarningTag: "@remix-run/server-runtime"
|
|
3597
|
+
},
|
|
3598
|
+
node: {
|
|
3599
|
+
serverSourcePromise: nodeServerSrcPromise,
|
|
3600
|
+
traceWarningTag: "@remix-run/node",
|
|
3601
|
+
options: {}
|
|
3602
|
+
},
|
|
3569
3603
|
createRenderFunction({
|
|
3570
3604
|
nodeVersion,
|
|
3571
3605
|
entrypointDir,
|
|
@@ -3602,6 +3636,16 @@ var REACT_ROUTER_FRAMEWORK_SETTINGS = {
|
|
|
3602
3636
|
buildResultFilePath: ".vercel/react-router-build-result.json",
|
|
3603
3637
|
slug: "react-router",
|
|
3604
3638
|
sourceSearchValue: "ENTRYPOINT_PLACEHOLDER",
|
|
3639
|
+
// React Router uses the same server source for both node and edge
|
|
3640
|
+
edge: {
|
|
3641
|
+
serverSourcePromise: reactRouterServerSrcPromise,
|
|
3642
|
+
traceWarningTag: "react-router"
|
|
3643
|
+
},
|
|
3644
|
+
node: {
|
|
3645
|
+
serverSourcePromise: reactRouterServerSrcPromise,
|
|
3646
|
+
traceWarningTag: "react-router",
|
|
3647
|
+
options: { useWebApi: true }
|
|
3648
|
+
},
|
|
3605
3649
|
createRenderFunction({
|
|
3606
3650
|
nodeVersion,
|
|
3607
3651
|
entrypointDir,
|
|
@@ -3894,7 +3938,11 @@ async function createRenderReactRouterFunction(nodeVersion, entrypointDir, rootD
|
|
|
3894
3938
|
rootDir,
|
|
3895
3939
|
serverBuildPath,
|
|
3896
3940
|
serverEntryPoint,
|
|
3897
|
-
serverSourcePromise:
|
|
3941
|
+
serverSourcePromise: (
|
|
3942
|
+
// React Router has the same promise for both edge and node
|
|
3943
|
+
// so this chooses edge out of convenience
|
|
3944
|
+
REACT_ROUTER_FRAMEWORK_SETTINGS.edge.serverSourcePromise
|
|
3945
|
+
),
|
|
3898
3946
|
sourceSearchValue: REACT_ROUTER_FRAMEWORK_SETTINGS.sourceSearchValue
|
|
3899
3947
|
});
|
|
3900
3948
|
let conditions;
|
|
@@ -3909,7 +3957,10 @@ async function createRenderReactRouterFunction(nodeVersion, entrypointDir, rootD
|
|
|
3909
3957
|
conditions,
|
|
3910
3958
|
readFile
|
|
3911
3959
|
});
|
|
3912
|
-
logNftWarnings(
|
|
3960
|
+
logNftWarnings(
|
|
3961
|
+
trace.warnings,
|
|
3962
|
+
REACT_ROUTER_FRAMEWORK_SETTINGS.edge.traceWarningTag
|
|
3963
|
+
);
|
|
3913
3964
|
const files = await getFilesFromTrace({ fileList: trace.fileList, rootDir });
|
|
3914
3965
|
let fn;
|
|
3915
3966
|
if (isEdgeFunction) {
|
|
@@ -3929,7 +3980,7 @@ async function createRenderReactRouterFunction(nodeVersion, entrypointDir, rootD
|
|
|
3929
3980
|
files,
|
|
3930
3981
|
handler,
|
|
3931
3982
|
runtime: nodeVersion.runtime,
|
|
3932
|
-
useWebApi:
|
|
3983
|
+
useWebApi: REACT_ROUTER_FRAMEWORK_SETTINGS.node.options.useWebApi,
|
|
3933
3984
|
regions: config.regions,
|
|
3934
3985
|
memory: config.memory,
|
|
3935
3986
|
maxDuration: config.maxDuration,
|
|
@@ -3946,14 +3997,14 @@ async function createRenderNodeFunction(nodeVersion, entrypointDir, rootDir, ser
|
|
|
3946
3997
|
rootDir,
|
|
3947
3998
|
serverBuildPath,
|
|
3948
3999
|
serverEntryPoint,
|
|
3949
|
-
serverSourcePromise:
|
|
4000
|
+
serverSourcePromise: REMIX_FRAMEWORK_SETTINGS.node.serverSourcePromise,
|
|
3950
4001
|
sourceSearchValue: REMIX_FRAMEWORK_SETTINGS.sourceSearchValue
|
|
3951
4002
|
});
|
|
3952
4003
|
const trace = await (0, import_nft.nodeFileTrace)([handlerPath], {
|
|
3953
4004
|
base: rootDir,
|
|
3954
4005
|
processCwd: entrypointDir
|
|
3955
4006
|
});
|
|
3956
|
-
logNftWarnings(trace.warnings,
|
|
4007
|
+
logNftWarnings(trace.warnings, REMIX_FRAMEWORK_SETTINGS.node.traceWarningTag);
|
|
3957
4008
|
const files = await getFilesFromTrace({ fileList: trace.fileList, rootDir });
|
|
3958
4009
|
const fn = new import_build_utils3.NodejsLambda({
|
|
3959
4010
|
...COMMON_NODE_FUNCTION_OPTIONS,
|
|
@@ -3963,6 +4014,7 @@ async function createRenderNodeFunction(nodeVersion, entrypointDir, rootDir, ser
|
|
|
3963
4014
|
regions: config.regions,
|
|
3964
4015
|
memory: config.memory,
|
|
3965
4016
|
maxDuration: config.maxDuration,
|
|
4017
|
+
useWebApi: REMIX_FRAMEWORK_SETTINGS.node.options.useWebApi,
|
|
3966
4018
|
framework: {
|
|
3967
4019
|
slug: REMIX_FRAMEWORK_SETTINGS.slug,
|
|
3968
4020
|
version: frameworkVersion
|
|
@@ -3975,7 +4027,7 @@ async function createRenderEdgeFunction(entrypointDir, rootDir, serverBuildPath,
|
|
|
3975
4027
|
rootDir,
|
|
3976
4028
|
serverBuildPath,
|
|
3977
4029
|
serverEntryPoint,
|
|
3978
|
-
serverSourcePromise:
|
|
4030
|
+
serverSourcePromise: REMIX_FRAMEWORK_SETTINGS.edge.serverSourcePromise,
|
|
3979
4031
|
sourceSearchValue: REMIX_FRAMEWORK_SETTINGS.sourceSearchValue
|
|
3980
4032
|
});
|
|
3981
4033
|
const trace = await (0, import_nft.nodeFileTrace)([handlerPath], {
|
|
@@ -3984,7 +4036,7 @@ async function createRenderEdgeFunction(entrypointDir, rootDir, serverBuildPath,
|
|
|
3984
4036
|
conditions: EDGE_TRACE_CONDITIONS,
|
|
3985
4037
|
readFile: edgeReadFile
|
|
3986
4038
|
});
|
|
3987
|
-
logNftWarnings(trace.warnings,
|
|
4039
|
+
logNftWarnings(trace.warnings, REMIX_FRAMEWORK_SETTINGS.edge.traceWarningTag);
|
|
3988
4040
|
const files = await getFilesFromTrace({ fileList: trace.fileList, rootDir });
|
|
3989
4041
|
const fn = new import_build_utils3.EdgeFunction({
|
|
3990
4042
|
...COMMON_EDGE_FUNCTION_OPTIONS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/remix-builder",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -24,11 +24,10 @@
|
|
|
24
24
|
"@types/jest": "27.5.1",
|
|
25
25
|
"@types/node": "14.18.33",
|
|
26
26
|
"@types/semver": "7.3.13",
|
|
27
|
-
"@vercel/build-utils": "9.2.
|
|
27
|
+
"@vercel/build-utils": "9.2.1",
|
|
28
|
+
"@vercel-internals/path-to-regexp": "1.0.0",
|
|
28
29
|
"glob": "10.3.16",
|
|
29
30
|
"jest-junit": "16.0.0",
|
|
30
|
-
"path-to-regexp": "6.2.1",
|
|
31
|
-
"path-to-regexp-updated": "npm:path-to-regexp@6.3.0",
|
|
32
31
|
"semver": "7.5.2",
|
|
33
32
|
"vitest": "2.0.1"
|
|
34
33
|
},
|