@vercel/remix-builder 5.1.0 → 5.1.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 +422 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -2816,6 +2816,396 @@ var require_dist = __commonJS({
|
|
|
2816
2816
|
}
|
|
2817
2817
|
});
|
|
2818
2818
|
|
|
2819
|
+
// ../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js
|
|
2820
|
+
var require_dist2 = __commonJS({
|
|
2821
|
+
"../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js"(exports) {
|
|
2822
|
+
"use strict";
|
|
2823
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2824
|
+
exports.pathToRegexp = exports.tokensToRegexp = exports.regexpToFunction = exports.match = exports.tokensToFunction = exports.compile = exports.parse = void 0;
|
|
2825
|
+
function lexer(str) {
|
|
2826
|
+
var tokens = [];
|
|
2827
|
+
var i = 0;
|
|
2828
|
+
while (i < str.length) {
|
|
2829
|
+
var char = str[i];
|
|
2830
|
+
if (char === "*" || char === "+" || char === "?") {
|
|
2831
|
+
tokens.push({ type: "MODIFIER", index: i, value: str[i++] });
|
|
2832
|
+
continue;
|
|
2833
|
+
}
|
|
2834
|
+
if (char === "\\") {
|
|
2835
|
+
tokens.push({ type: "ESCAPED_CHAR", index: i++, value: str[i++] });
|
|
2836
|
+
continue;
|
|
2837
|
+
}
|
|
2838
|
+
if (char === "{") {
|
|
2839
|
+
tokens.push({ type: "OPEN", index: i, value: str[i++] });
|
|
2840
|
+
continue;
|
|
2841
|
+
}
|
|
2842
|
+
if (char === "}") {
|
|
2843
|
+
tokens.push({ type: "CLOSE", index: i, value: str[i++] });
|
|
2844
|
+
continue;
|
|
2845
|
+
}
|
|
2846
|
+
if (char === ":") {
|
|
2847
|
+
var name = "";
|
|
2848
|
+
var j = i + 1;
|
|
2849
|
+
while (j < str.length) {
|
|
2850
|
+
var code = str.charCodeAt(j);
|
|
2851
|
+
if (
|
|
2852
|
+
// `0-9`
|
|
2853
|
+
code >= 48 && code <= 57 || // `A-Z`
|
|
2854
|
+
code >= 65 && code <= 90 || // `a-z`
|
|
2855
|
+
code >= 97 && code <= 122 || // `_`
|
|
2856
|
+
code === 95
|
|
2857
|
+
) {
|
|
2858
|
+
name += str[j++];
|
|
2859
|
+
continue;
|
|
2860
|
+
}
|
|
2861
|
+
break;
|
|
2862
|
+
}
|
|
2863
|
+
if (!name)
|
|
2864
|
+
throw new TypeError("Missing parameter name at ".concat(i));
|
|
2865
|
+
tokens.push({ type: "NAME", index: i, value: name });
|
|
2866
|
+
i = j;
|
|
2867
|
+
continue;
|
|
2868
|
+
}
|
|
2869
|
+
if (char === "(") {
|
|
2870
|
+
var count = 1;
|
|
2871
|
+
var pattern = "";
|
|
2872
|
+
var j = i + 1;
|
|
2873
|
+
if (str[j] === "?") {
|
|
2874
|
+
throw new TypeError('Pattern cannot start with "?" at '.concat(j));
|
|
2875
|
+
}
|
|
2876
|
+
while (j < str.length) {
|
|
2877
|
+
if (str[j] === "\\") {
|
|
2878
|
+
pattern += str[j++] + str[j++];
|
|
2879
|
+
continue;
|
|
2880
|
+
}
|
|
2881
|
+
if (str[j] === ")") {
|
|
2882
|
+
count--;
|
|
2883
|
+
if (count === 0) {
|
|
2884
|
+
j++;
|
|
2885
|
+
break;
|
|
2886
|
+
}
|
|
2887
|
+
} else if (str[j] === "(") {
|
|
2888
|
+
count++;
|
|
2889
|
+
if (str[j + 1] !== "?") {
|
|
2890
|
+
throw new TypeError("Capturing groups are not allowed at ".concat(j));
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
pattern += str[j++];
|
|
2894
|
+
}
|
|
2895
|
+
if (count)
|
|
2896
|
+
throw new TypeError("Unbalanced pattern at ".concat(i));
|
|
2897
|
+
if (!pattern)
|
|
2898
|
+
throw new TypeError("Missing pattern at ".concat(i));
|
|
2899
|
+
tokens.push({ type: "PATTERN", index: i, value: pattern });
|
|
2900
|
+
i = j;
|
|
2901
|
+
continue;
|
|
2902
|
+
}
|
|
2903
|
+
tokens.push({ type: "CHAR", index: i, value: str[i++] });
|
|
2904
|
+
}
|
|
2905
|
+
tokens.push({ type: "END", index: i, value: "" });
|
|
2906
|
+
return tokens;
|
|
2907
|
+
}
|
|
2908
|
+
function parse(str, options) {
|
|
2909
|
+
if (options === void 0) {
|
|
2910
|
+
options = {};
|
|
2911
|
+
}
|
|
2912
|
+
var tokens = lexer(str);
|
|
2913
|
+
var _a = options.prefixes, prefixes = _a === void 0 ? "./" : _a, _b = options.delimiter, delimiter = _b === void 0 ? "/#?" : _b;
|
|
2914
|
+
var result = [];
|
|
2915
|
+
var key = 0;
|
|
2916
|
+
var i = 0;
|
|
2917
|
+
var path = "";
|
|
2918
|
+
var tryConsume = function(type) {
|
|
2919
|
+
if (i < tokens.length && tokens[i].type === type)
|
|
2920
|
+
return tokens[i++].value;
|
|
2921
|
+
};
|
|
2922
|
+
var mustConsume = function(type) {
|
|
2923
|
+
var value2 = tryConsume(type);
|
|
2924
|
+
if (value2 !== void 0)
|
|
2925
|
+
return value2;
|
|
2926
|
+
var _a2 = tokens[i], nextType = _a2.type, index = _a2.index;
|
|
2927
|
+
throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index, ", expected ").concat(type));
|
|
2928
|
+
};
|
|
2929
|
+
var consumeText = function() {
|
|
2930
|
+
var result2 = "";
|
|
2931
|
+
var value2;
|
|
2932
|
+
while (value2 = tryConsume("CHAR") || tryConsume("ESCAPED_CHAR")) {
|
|
2933
|
+
result2 += value2;
|
|
2934
|
+
}
|
|
2935
|
+
return result2;
|
|
2936
|
+
};
|
|
2937
|
+
var isSafe = function(value2) {
|
|
2938
|
+
for (var _i = 0, delimiter_1 = delimiter; _i < delimiter_1.length; _i++) {
|
|
2939
|
+
var char2 = delimiter_1[_i];
|
|
2940
|
+
if (value2.indexOf(char2) > -1)
|
|
2941
|
+
return true;
|
|
2942
|
+
}
|
|
2943
|
+
return false;
|
|
2944
|
+
};
|
|
2945
|
+
var safePattern = function(prefix2) {
|
|
2946
|
+
var prev = result[result.length - 1];
|
|
2947
|
+
var prevText = prefix2 || (prev && typeof prev === "string" ? prev : "");
|
|
2948
|
+
if (prev && !prevText) {
|
|
2949
|
+
throw new TypeError('Must have text between two parameters, missing text after "'.concat(prev.name, '"'));
|
|
2950
|
+
}
|
|
2951
|
+
if (!prevText || isSafe(prevText))
|
|
2952
|
+
return "[^".concat(escapeString(delimiter), "]+?");
|
|
2953
|
+
return "(?:(?!".concat(escapeString(prevText), ")[^").concat(escapeString(delimiter), "])+?");
|
|
2954
|
+
};
|
|
2955
|
+
while (i < tokens.length) {
|
|
2956
|
+
var char = tryConsume("CHAR");
|
|
2957
|
+
var name = tryConsume("NAME");
|
|
2958
|
+
var pattern = tryConsume("PATTERN");
|
|
2959
|
+
if (name || pattern) {
|
|
2960
|
+
var prefix = char || "";
|
|
2961
|
+
if (prefixes.indexOf(prefix) === -1) {
|
|
2962
|
+
path += prefix;
|
|
2963
|
+
prefix = "";
|
|
2964
|
+
}
|
|
2965
|
+
if (path) {
|
|
2966
|
+
result.push(path);
|
|
2967
|
+
path = "";
|
|
2968
|
+
}
|
|
2969
|
+
result.push({
|
|
2970
|
+
name: name || key++,
|
|
2971
|
+
prefix,
|
|
2972
|
+
suffix: "",
|
|
2973
|
+
pattern: pattern || safePattern(prefix),
|
|
2974
|
+
modifier: tryConsume("MODIFIER") || ""
|
|
2975
|
+
});
|
|
2976
|
+
continue;
|
|
2977
|
+
}
|
|
2978
|
+
var value = char || tryConsume("ESCAPED_CHAR");
|
|
2979
|
+
if (value) {
|
|
2980
|
+
path += value;
|
|
2981
|
+
continue;
|
|
2982
|
+
}
|
|
2983
|
+
if (path) {
|
|
2984
|
+
result.push(path);
|
|
2985
|
+
path = "";
|
|
2986
|
+
}
|
|
2987
|
+
var open = tryConsume("OPEN");
|
|
2988
|
+
if (open) {
|
|
2989
|
+
var prefix = consumeText();
|
|
2990
|
+
var name_1 = tryConsume("NAME") || "";
|
|
2991
|
+
var pattern_1 = tryConsume("PATTERN") || "";
|
|
2992
|
+
var suffix = consumeText();
|
|
2993
|
+
mustConsume("CLOSE");
|
|
2994
|
+
result.push({
|
|
2995
|
+
name: name_1 || (pattern_1 ? key++ : ""),
|
|
2996
|
+
pattern: name_1 && !pattern_1 ? safePattern(prefix) : pattern_1,
|
|
2997
|
+
prefix,
|
|
2998
|
+
suffix,
|
|
2999
|
+
modifier: tryConsume("MODIFIER") || ""
|
|
3000
|
+
});
|
|
3001
|
+
continue;
|
|
3002
|
+
}
|
|
3003
|
+
mustConsume("END");
|
|
3004
|
+
}
|
|
3005
|
+
return result;
|
|
3006
|
+
}
|
|
3007
|
+
exports.parse = parse;
|
|
3008
|
+
function compile(str, options) {
|
|
3009
|
+
return tokensToFunction(parse(str, options), options);
|
|
3010
|
+
}
|
|
3011
|
+
exports.compile = compile;
|
|
3012
|
+
function tokensToFunction(tokens, options) {
|
|
3013
|
+
if (options === void 0) {
|
|
3014
|
+
options = {};
|
|
3015
|
+
}
|
|
3016
|
+
var reFlags = flags(options);
|
|
3017
|
+
var _a = options.encode, encode = _a === void 0 ? function(x) {
|
|
3018
|
+
return x;
|
|
3019
|
+
} : _a, _b = options.validate, validate = _b === void 0 ? true : _b;
|
|
3020
|
+
var matches = tokens.map(function(token) {
|
|
3021
|
+
if (typeof token === "object") {
|
|
3022
|
+
return new RegExp("^(?:".concat(token.pattern, ")$"), reFlags);
|
|
3023
|
+
}
|
|
3024
|
+
});
|
|
3025
|
+
return function(data) {
|
|
3026
|
+
var path = "";
|
|
3027
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
3028
|
+
var token = tokens[i];
|
|
3029
|
+
if (typeof token === "string") {
|
|
3030
|
+
path += token;
|
|
3031
|
+
continue;
|
|
3032
|
+
}
|
|
3033
|
+
var value = data ? data[token.name] : void 0;
|
|
3034
|
+
var optional = token.modifier === "?" || token.modifier === "*";
|
|
3035
|
+
var repeat = token.modifier === "*" || token.modifier === "+";
|
|
3036
|
+
if (Array.isArray(value)) {
|
|
3037
|
+
if (!repeat) {
|
|
3038
|
+
throw new TypeError('Expected "'.concat(token.name, '" to not repeat, but got an array'));
|
|
3039
|
+
}
|
|
3040
|
+
if (value.length === 0) {
|
|
3041
|
+
if (optional)
|
|
3042
|
+
continue;
|
|
3043
|
+
throw new TypeError('Expected "'.concat(token.name, '" to not be empty'));
|
|
3044
|
+
}
|
|
3045
|
+
for (var j = 0; j < value.length; j++) {
|
|
3046
|
+
var segment = encode(value[j], token);
|
|
3047
|
+
if (validate && !matches[i].test(segment)) {
|
|
3048
|
+
throw new TypeError('Expected all "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
|
|
3049
|
+
}
|
|
3050
|
+
path += token.prefix + segment + token.suffix;
|
|
3051
|
+
}
|
|
3052
|
+
continue;
|
|
3053
|
+
}
|
|
3054
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
3055
|
+
var segment = encode(String(value), token);
|
|
3056
|
+
if (validate && !matches[i].test(segment)) {
|
|
3057
|
+
throw new TypeError('Expected "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
|
|
3058
|
+
}
|
|
3059
|
+
path += token.prefix + segment + token.suffix;
|
|
3060
|
+
continue;
|
|
3061
|
+
}
|
|
3062
|
+
if (optional)
|
|
3063
|
+
continue;
|
|
3064
|
+
var typeOfMessage = repeat ? "an array" : "a string";
|
|
3065
|
+
throw new TypeError('Expected "'.concat(token.name, '" to be ').concat(typeOfMessage));
|
|
3066
|
+
}
|
|
3067
|
+
return path;
|
|
3068
|
+
};
|
|
3069
|
+
}
|
|
3070
|
+
exports.tokensToFunction = tokensToFunction;
|
|
3071
|
+
function match(str, options) {
|
|
3072
|
+
var keys = [];
|
|
3073
|
+
var re = pathToRegexp2(str, keys, options);
|
|
3074
|
+
return regexpToFunction(re, keys, options);
|
|
3075
|
+
}
|
|
3076
|
+
exports.match = match;
|
|
3077
|
+
function regexpToFunction(re, keys, options) {
|
|
3078
|
+
if (options === void 0) {
|
|
3079
|
+
options = {};
|
|
3080
|
+
}
|
|
3081
|
+
var _a = options.decode, decode = _a === void 0 ? function(x) {
|
|
3082
|
+
return x;
|
|
3083
|
+
} : _a;
|
|
3084
|
+
return function(pathname) {
|
|
3085
|
+
var m = re.exec(pathname);
|
|
3086
|
+
if (!m)
|
|
3087
|
+
return false;
|
|
3088
|
+
var path = m[0], index = m.index;
|
|
3089
|
+
var params = /* @__PURE__ */ Object.create(null);
|
|
3090
|
+
var _loop_1 = function(i2) {
|
|
3091
|
+
if (m[i2] === void 0)
|
|
3092
|
+
return "continue";
|
|
3093
|
+
var key = keys[i2 - 1];
|
|
3094
|
+
if (key.modifier === "*" || key.modifier === "+") {
|
|
3095
|
+
params[key.name] = m[i2].split(key.prefix + key.suffix).map(function(value) {
|
|
3096
|
+
return decode(value, key);
|
|
3097
|
+
});
|
|
3098
|
+
} else {
|
|
3099
|
+
params[key.name] = decode(m[i2], key);
|
|
3100
|
+
}
|
|
3101
|
+
};
|
|
3102
|
+
for (var i = 1; i < m.length; i++) {
|
|
3103
|
+
_loop_1(i);
|
|
3104
|
+
}
|
|
3105
|
+
return { path, index, params };
|
|
3106
|
+
};
|
|
3107
|
+
}
|
|
3108
|
+
exports.regexpToFunction = regexpToFunction;
|
|
3109
|
+
function escapeString(str) {
|
|
3110
|
+
return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
|
3111
|
+
}
|
|
3112
|
+
function flags(options) {
|
|
3113
|
+
return options && options.sensitive ? "" : "i";
|
|
3114
|
+
}
|
|
3115
|
+
function regexpToRegexp(path, keys) {
|
|
3116
|
+
if (!keys)
|
|
3117
|
+
return path;
|
|
3118
|
+
var groupsRegex = /\((?:\?<(.*?)>)?(?!\?)/g;
|
|
3119
|
+
var index = 0;
|
|
3120
|
+
var execResult = groupsRegex.exec(path.source);
|
|
3121
|
+
while (execResult) {
|
|
3122
|
+
keys.push({
|
|
3123
|
+
// Use parenthesized substring match if available, index otherwise
|
|
3124
|
+
name: execResult[1] || index++,
|
|
3125
|
+
prefix: "",
|
|
3126
|
+
suffix: "",
|
|
3127
|
+
modifier: "",
|
|
3128
|
+
pattern: ""
|
|
3129
|
+
});
|
|
3130
|
+
execResult = groupsRegex.exec(path.source);
|
|
3131
|
+
}
|
|
3132
|
+
return path;
|
|
3133
|
+
}
|
|
3134
|
+
function arrayToRegexp(paths, keys, options) {
|
|
3135
|
+
var parts = paths.map(function(path) {
|
|
3136
|
+
return pathToRegexp2(path, keys, options).source;
|
|
3137
|
+
});
|
|
3138
|
+
return new RegExp("(?:".concat(parts.join("|"), ")"), flags(options));
|
|
3139
|
+
}
|
|
3140
|
+
function stringToRegexp(path, keys, options) {
|
|
3141
|
+
return tokensToRegexp(parse(path, options), keys, options);
|
|
3142
|
+
}
|
|
3143
|
+
function tokensToRegexp(tokens, keys, options) {
|
|
3144
|
+
if (options === void 0) {
|
|
3145
|
+
options = {};
|
|
3146
|
+
}
|
|
3147
|
+
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) {
|
|
3148
|
+
return x;
|
|
3149
|
+
} : _d, _e = options.delimiter, delimiter = _e === void 0 ? "/#?" : _e, _f = options.endsWith, endsWith = _f === void 0 ? "" : _f;
|
|
3150
|
+
var endsWithRe = "[".concat(escapeString(endsWith), "]|$");
|
|
3151
|
+
var delimiterRe = "[".concat(escapeString(delimiter), "]");
|
|
3152
|
+
var route = start ? "^" : "";
|
|
3153
|
+
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
|
|
3154
|
+
var token = tokens_1[_i];
|
|
3155
|
+
if (typeof token === "string") {
|
|
3156
|
+
route += escapeString(encode(token));
|
|
3157
|
+
} else {
|
|
3158
|
+
var prefix = escapeString(encode(token.prefix));
|
|
3159
|
+
var suffix = escapeString(encode(token.suffix));
|
|
3160
|
+
if (token.pattern) {
|
|
3161
|
+
if (keys)
|
|
3162
|
+
keys.push(token);
|
|
3163
|
+
if (prefix || suffix) {
|
|
3164
|
+
if (token.modifier === "+" || token.modifier === "*") {
|
|
3165
|
+
var mod = token.modifier === "*" ? "?" : "";
|
|
3166
|
+
route += "(?:".concat(prefix, "((?:").concat(token.pattern, ")(?:").concat(suffix).concat(prefix, "(?:").concat(token.pattern, "))*)").concat(suffix, ")").concat(mod);
|
|
3167
|
+
} else {
|
|
3168
|
+
route += "(?:".concat(prefix, "(").concat(token.pattern, ")").concat(suffix, ")").concat(token.modifier);
|
|
3169
|
+
}
|
|
3170
|
+
} else {
|
|
3171
|
+
if (token.modifier === "+" || token.modifier === "*") {
|
|
3172
|
+
throw new TypeError('Can not repeat "'.concat(token.name, '" without a prefix and suffix'));
|
|
3173
|
+
}
|
|
3174
|
+
route += "(".concat(token.pattern, ")").concat(token.modifier);
|
|
3175
|
+
}
|
|
3176
|
+
} else {
|
|
3177
|
+
route += "(?:".concat(prefix).concat(suffix, ")").concat(token.modifier);
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3181
|
+
if (end) {
|
|
3182
|
+
if (!strict)
|
|
3183
|
+
route += "".concat(delimiterRe, "?");
|
|
3184
|
+
route += !options.endsWith ? "$" : "(?=".concat(endsWithRe, ")");
|
|
3185
|
+
} else {
|
|
3186
|
+
var endToken = tokens[tokens.length - 1];
|
|
3187
|
+
var isEndDelimited = typeof endToken === "string" ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1 : endToken === void 0;
|
|
3188
|
+
if (!strict) {
|
|
3189
|
+
route += "(?:".concat(delimiterRe, "(?=").concat(endsWithRe, "))?");
|
|
3190
|
+
}
|
|
3191
|
+
if (!isEndDelimited) {
|
|
3192
|
+
route += "(?=".concat(delimiterRe, "|").concat(endsWithRe, ")");
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
return new RegExp(route, flags(options));
|
|
3196
|
+
}
|
|
3197
|
+
exports.tokensToRegexp = tokensToRegexp;
|
|
3198
|
+
function pathToRegexp2(path, keys, options) {
|
|
3199
|
+
if (path instanceof RegExp)
|
|
3200
|
+
return regexpToRegexp(path, keys);
|
|
3201
|
+
if (Array.isArray(path))
|
|
3202
|
+
return arrayToRegexp(path, keys, options);
|
|
3203
|
+
return stringToRegexp(path, keys, options);
|
|
3204
|
+
}
|
|
3205
|
+
exports.pathToRegexp = pathToRegexp2;
|
|
3206
|
+
}
|
|
3207
|
+
});
|
|
3208
|
+
|
|
2819
3209
|
// src/index.ts
|
|
2820
3210
|
var src_exports = {};
|
|
2821
3211
|
__export(src_exports, {
|
|
@@ -2837,9 +3227,40 @@ var import_semver = __toESM(require_semver2());
|
|
|
2837
3227
|
var import_fs = require("fs");
|
|
2838
3228
|
var import_path = require("path");
|
|
2839
3229
|
var import_path_to_regexp = __toESM(require_dist());
|
|
3230
|
+
var import_path_to_regexp_updated = __toESM(require_dist2());
|
|
2840
3231
|
var import_build_utils = require("@vercel/build-utils");
|
|
2841
3232
|
var import_build_utils2 = require("@vercel/build-utils");
|
|
2842
3233
|
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
|
+
}
|
|
2843
3264
|
var require_ = (0, import_module.createRequire)(__filename);
|
|
2844
3265
|
var SPLAT_PATH = "/:params*";
|
|
2845
3266
|
var entryExts = [".js", ".jsx", ".ts", ".tsx"];
|
|
@@ -2950,7 +3371,7 @@ function getPathFromRoute(route, routes) {
|
|
|
2950
3371
|
}
|
|
2951
3372
|
function getRegExpFromPath(rePath) {
|
|
2952
3373
|
const keys = [];
|
|
2953
|
-
const re = (
|
|
3374
|
+
const re = pathToRegexp("923", rePath, keys);
|
|
2954
3375
|
return keys.length > 0 ? re : false;
|
|
2955
3376
|
}
|
|
2956
3377
|
async function chdirAndReadConfig(remixRunDevPath, dir, packageJsonPath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/remix-builder",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"glob": "10.3.16",
|
|
29
29
|
"jest-junit": "16.0.0",
|
|
30
30
|
"path-to-regexp": "6.2.1",
|
|
31
|
+
"path-to-regexp-updated": "npm:path-to-regexp@6.3.0",
|
|
31
32
|
"semver": "7.5.2",
|
|
32
33
|
"vitest": "2.0.1"
|
|
33
34
|
},
|