vercel 54.14.1 → 54.14.5
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/chunks/{add-INSQH24S.js → add-5Z2AAQMM.js} +6 -6
- package/dist/chunks/{chunk-YQPAAXUU.js → chunk-25XEQWUS.js} +1 -1
- package/dist/chunks/{chunk-MKB32SJZ.js → chunk-2GOVUIMY.js} +1 -1
- package/dist/chunks/{chunk-TVBXGFEL.js → chunk-2N7NBUQX.js} +1 -1
- package/dist/chunks/{chunk-5QKYBWW2.js → chunk-45S2Y3TD.js} +1 -1
- package/dist/chunks/{chunk-FMN3NXRC.js → chunk-56AJHIQC.js} +1 -1
- package/dist/chunks/{chunk-467YGYFK.js → chunk-6ABEFMPX.js} +1 -1
- package/dist/chunks/{chunk-74VEZPM6.js → chunk-6H2YVMJJ.js} +2 -2
- package/dist/chunks/{chunk-F4WXNECT.js → chunk-6R3YPU76.js} +257 -32
- package/dist/chunks/{chunk-UPI3OHBK.js → chunk-AWD3IGXU.js} +2 -2
- package/dist/chunks/chunk-BRQ6PX3U.js +593 -0
- package/dist/chunks/{chunk-IQQJHYW4.js → chunk-DPS62LHL.js} +2 -2
- package/dist/chunks/{chunk-NMGGBH7K.js → chunk-EBIX223X.js} +2 -11
- package/dist/chunks/{chunk-DAKMPPIS.js → chunk-ETVOM3IR.js} +1 -1
- package/dist/chunks/{chunk-WFRHKZFI.js → chunk-IB56QKCM.js} +1 -1
- package/dist/chunks/{chunk-ZTPOJE63.js → chunk-IJJOI63T.js} +1 -1
- package/dist/chunks/{chunk-P6VIXOWO.js → chunk-IXTKPQYW.js} +5 -5
- package/dist/chunks/{chunk-F6SCQ6XU.js → chunk-JLLN34XF.js} +92 -34
- package/dist/chunks/{chunk-4WQGP4Z4.js → chunk-KSSRTKN4.js} +9 -7
- package/dist/chunks/{chunk-4NDOMD3E.js → chunk-LYCSVJIX.js} +1 -1
- package/dist/chunks/{chunk-J4LCBXF2.js → chunk-MOVGWTDQ.js} +9 -19
- package/dist/chunks/{chunk-6IQZVQV6.js → chunk-MYWLF3BZ.js} +18 -0
- package/dist/chunks/{chunk-JFWE5ORG.js → chunk-P4KQ3FJ4.js} +1 -0
- package/dist/chunks/{chunk-UJ3ZCBUA.js → chunk-PSG6ZBGQ.js} +2 -2
- package/dist/chunks/{chunk-L7U3Z7E4.js → chunk-PXJA4KXE.js} +2 -2
- package/dist/chunks/{chunk-FKNOCLZU.js → chunk-R5MIXAJF.js} +2 -2
- package/dist/chunks/{chunk-NGRSQRSN.js → chunk-SGPBULVT.js} +1 -1
- package/dist/chunks/{chunk-RM4XGGZO.js → chunk-TSENBD7C.js} +2 -2
- package/dist/chunks/{chunk-O4C4A7HM.js → chunk-VKRW77HH.js} +1 -1
- package/dist/chunks/{chunk-UEFCAT3N.js → chunk-X23JL3ZL.js} +2 -2
- package/dist/chunks/{chunk-ZRJQY3VK.js → chunk-YE3C5CUX.js} +2 -2
- package/dist/chunks/{chunk-XLLAD5DR.js → chunk-YIAUEFUY.js} +212 -788
- package/dist/chunks/{chunk-P2AMQX7F.js → chunk-ZR4XADWC.js} +16 -4
- package/dist/chunks/{compile-vercel-config-VPPGDFKL.js → compile-vercel-config-UMUHH55E.js} +2 -2
- package/dist/chunks/{delete-O3EHQHYD.js → delete-NO2U3UGV.js} +4 -4
- package/dist/chunks/{disable-GJDQC34I.js → disable-AGDDHVKZ.js} +4 -4
- package/dist/chunks/{discard-UZT23XN2.js → discard-Q5HML52L.js} +4 -4
- package/dist/chunks/{edit-PEQIROSE.js → edit-HSHJAKHM.js} +5 -5
- package/dist/chunks/{enable-ACNEAJ5S.js → enable-YMJAXOGA.js} +4 -4
- package/dist/chunks/{export-ZICIQKHJ.js → export-RCACOTPE.js} +4 -4
- package/dist/chunks/{inspect-PUFF7LND.js → inspect-OJHOQHD2.js} +6 -6
- package/dist/chunks/{list-L2UFHHQ7.js → list-LLUDMAWA.js} +7 -7
- package/dist/chunks/{list-FWUV4NO4.js → list-R7V2P6TM.js} +4 -4
- package/dist/chunks/{ls-6HVFGIQS.js → ls-KAI6V7SU.js} +6 -6
- package/dist/chunks/{publish-HKTAQMYG.js → publish-KCYVRDAT.js} +4 -4
- package/dist/chunks/{query-VQ5HDMFO.js → query-MBJLAQRX.js} +5 -5
- package/dist/chunks/{reorder-CVMW6VL7.js → reorder-C5BJWFJM.js} +4 -4
- package/dist/chunks/{restore-32NXH4EH.js → restore-F63NO7XP.js} +4 -4
- package/dist/chunks/{rm-7TPDWMJZ.js → rm-HT7YO3JX.js} +6 -6
- package/dist/chunks/{rule-inspect-PQORU3SU.js → rule-inspect-IHEUI5JT.js} +6 -6
- package/dist/chunks/{rules-VIITOYFN.js → rules-ZUBTVSNC.js} +6 -6
- package/dist/chunks/{schema-AECGMSF5.js → schema-VAQSZY2H.js} +6 -6
- package/dist/chunks/{types-P6JKZFEY.js → types-3R7HKP57.js} +3 -3
- package/dist/chunks/{update-J4QCT3GS.js → update-BS5FBLIP.js} +6 -6
- package/dist/commands/build/index.js +56 -32
- package/dist/commands/deploy/index.js +21 -20
- package/dist/commands/dev/index.js +244 -142
- package/dist/commands/dev/next-dev-websocket-shim-preload.cjs +190 -0
- package/dist/commands/env/index.js +18 -16
- package/dist/commands/link/index.js +17 -24
- package/dist/commands/list/index.js +7 -7
- package/dist/commands-bulk.js +658 -121
- package/dist/help.js +1 -1
- package/dist/index.js +19 -19
- package/dist/version.mjs +1 -1
- package/package.json +12 -12
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "../../chunks/chunk-2HSQ7YUK.js";
|
|
10
10
|
import {
|
|
11
11
|
getUpdateCommand
|
|
12
|
-
} from "../../chunks/chunk-
|
|
12
|
+
} from "../../chunks/chunk-45S2Y3TD.js";
|
|
13
13
|
import {
|
|
14
14
|
highlight
|
|
15
15
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
19
19
|
import {
|
|
20
20
|
devCommand
|
|
21
|
-
} from "../../chunks/chunk-
|
|
21
|
+
} from "../../chunks/chunk-VKRW77HH.js";
|
|
22
22
|
import {
|
|
23
23
|
OUTPUT_DIR,
|
|
24
24
|
getStaticServiceSchedules,
|
|
@@ -26,26 +26,26 @@ import {
|
|
|
26
26
|
require_mime_types,
|
|
27
27
|
require_npa,
|
|
28
28
|
staticFiles
|
|
29
|
-
} from "../../chunks/chunk-
|
|
29
|
+
} from "../../chunks/chunk-EBIX223X.js";
|
|
30
30
|
import "../../chunks/chunk-IB5L4LKZ.js";
|
|
31
31
|
import {
|
|
32
32
|
pickOverrides
|
|
33
|
-
} from "../../chunks/chunk-
|
|
33
|
+
} from "../../chunks/chunk-6ABEFMPX.js";
|
|
34
34
|
import "../../chunks/chunk-YI3JV6GM.js";
|
|
35
35
|
import {
|
|
36
36
|
displayDetectedServices,
|
|
37
37
|
printProjectNotFoundError,
|
|
38
38
|
readConfig,
|
|
39
39
|
setupAndLink
|
|
40
|
-
} from "../../chunks/chunk-
|
|
40
|
+
} from "../../chunks/chunk-IXTKPQYW.js";
|
|
41
41
|
import "../../chunks/chunk-LJ5WXXG6.js";
|
|
42
42
|
import {
|
|
43
43
|
getLocalPathConfig
|
|
44
|
-
} from "../../chunks/chunk-
|
|
45
|
-
import "../../chunks/chunk-
|
|
44
|
+
} from "../../chunks/chunk-6H2YVMJJ.js";
|
|
45
|
+
import "../../chunks/chunk-25XEQWUS.js";
|
|
46
46
|
import {
|
|
47
47
|
help
|
|
48
|
-
} from "../../chunks/chunk-
|
|
48
|
+
} from "../../chunks/chunk-AWD3IGXU.js";
|
|
49
49
|
import {
|
|
50
50
|
VERCEL_DIR,
|
|
51
51
|
findRepoRoot,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
resolveProjectCwd,
|
|
70
70
|
tryDetectServices,
|
|
71
71
|
validateConfig
|
|
72
|
-
} from "../../chunks/chunk-
|
|
72
|
+
} from "../../chunks/chunk-YIAUEFUY.js";
|
|
73
73
|
import {
|
|
74
74
|
TelemetryClient
|
|
75
75
|
} from "../../chunks/chunk-HIYWSGI7.js";
|
|
@@ -83,12 +83,12 @@ import {
|
|
|
83
83
|
import {
|
|
84
84
|
require_ms
|
|
85
85
|
} from "../../chunks/chunk-GGP5R3FU.js";
|
|
86
|
-
import "../../chunks/chunk-
|
|
86
|
+
import "../../chunks/chunk-LYCSVJIX.js";
|
|
87
87
|
import {
|
|
88
88
|
getFlagsSpecification,
|
|
89
89
|
parseArguments,
|
|
90
90
|
printError
|
|
91
|
-
} from "../../chunks/chunk-
|
|
91
|
+
} from "../../chunks/chunk-MYWLF3BZ.js";
|
|
92
92
|
import {
|
|
93
93
|
CantParseJSONFile,
|
|
94
94
|
LambdaSizeExceededError,
|
|
@@ -7109,13 +7109,13 @@ var require_urlparser = __commonJS({
|
|
|
7109
7109
|
this.pathname = prePath === "" ? "/" : prePath;
|
|
7110
7110
|
return;
|
|
7111
7111
|
}
|
|
7112
|
-
var
|
|
7112
|
+
var path6;
|
|
7113
7113
|
if (escape2) {
|
|
7114
|
-
|
|
7114
|
+
path6 = this._getComponentEscaped(str, pathStart, pathEnd, false);
|
|
7115
7115
|
} else {
|
|
7116
|
-
|
|
7116
|
+
path6 = str.slice(pathStart, pathEnd + 1);
|
|
7117
7117
|
}
|
|
7118
|
-
this.pathname = prePath === "" ? this._prependSlash ? "/" +
|
|
7118
|
+
this.pathname = prePath === "" ? this._prependSlash ? "/" + path6 : path6 : prePath + path6;
|
|
7119
7119
|
};
|
|
7120
7120
|
Url.prototype._parseQuery = function Url$_parseQuery(str, start, end, disableAutoEscapeChars) {
|
|
7121
7121
|
var queryStart = start;
|
|
@@ -7418,8 +7418,8 @@ var require_urlparser = __commonJS({
|
|
|
7418
7418
|
// ../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/glob-slash.js
|
|
7419
7419
|
var require_glob_slash = __commonJS({
|
|
7420
7420
|
"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/glob-slash.js"(exports2, module2) {
|
|
7421
|
-
var
|
|
7422
|
-
var normalize = (value) =>
|
|
7421
|
+
var path6 = __require("path");
|
|
7422
|
+
var normalize = (value) => path6.posix.normalize(path6.posix.join("/", value));
|
|
7423
7423
|
module2.exports = (value) => value.charAt(0) === "!" ? `!${normalize(value.substr(1))}` : normalize(value);
|
|
7424
7424
|
module2.exports.normalize = normalize;
|
|
7425
7425
|
}
|
|
@@ -7430,9 +7430,9 @@ var require_minimatch2 = __commonJS({
|
|
|
7430
7430
|
"../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js"(exports2, module2) {
|
|
7431
7431
|
module2.exports = minimatch3;
|
|
7432
7432
|
minimatch3.Minimatch = Minimatch;
|
|
7433
|
-
var
|
|
7433
|
+
var path6 = { sep: "/" };
|
|
7434
7434
|
try {
|
|
7435
|
-
|
|
7435
|
+
path6 = __require("path");
|
|
7436
7436
|
} catch (er) {
|
|
7437
7437
|
}
|
|
7438
7438
|
var GLOBSTAR = minimatch3.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
@@ -7515,8 +7515,8 @@ var require_minimatch2 = __commonJS({
|
|
|
7515
7515
|
if (!options)
|
|
7516
7516
|
options = {};
|
|
7517
7517
|
pattern = pattern.trim();
|
|
7518
|
-
if (
|
|
7519
|
-
pattern = pattern.split(
|
|
7518
|
+
if (path6.sep !== "/") {
|
|
7519
|
+
pattern = pattern.split(path6.sep).join("/");
|
|
7520
7520
|
}
|
|
7521
7521
|
this.options = options;
|
|
7522
7522
|
this.set = [];
|
|
@@ -7883,8 +7883,8 @@ var require_minimatch2 = __commonJS({
|
|
|
7883
7883
|
if (f === "/" && partial)
|
|
7884
7884
|
return true;
|
|
7885
7885
|
var options = this.options;
|
|
7886
|
-
if (
|
|
7887
|
-
f = f.split(
|
|
7886
|
+
if (path6.sep !== "/") {
|
|
7887
|
+
f = f.split(path6.sep).join("/");
|
|
7888
7888
|
}
|
|
7889
7889
|
f = f.split(slashSplit);
|
|
7890
7890
|
this.debug(this.pattern, "split", f);
|
|
@@ -8021,7 +8021,7 @@ var require_path_to_regexp = __commonJS({
|
|
|
8021
8021
|
var tokens = [];
|
|
8022
8022
|
var key = 0;
|
|
8023
8023
|
var index = 0;
|
|
8024
|
-
var
|
|
8024
|
+
var path6 = "";
|
|
8025
8025
|
var defaultDelimiter = options && options.delimiter || DEFAULT_DELIMITER;
|
|
8026
8026
|
var delimiters = options && options.delimiters || DEFAULT_DELIMITERS;
|
|
8027
8027
|
var pathEscaped = false;
|
|
@@ -8030,10 +8030,10 @@ var require_path_to_regexp = __commonJS({
|
|
|
8030
8030
|
var m = res[0];
|
|
8031
8031
|
var escaped = res[1];
|
|
8032
8032
|
var offset = res.index;
|
|
8033
|
-
|
|
8033
|
+
path6 += str.slice(index, offset);
|
|
8034
8034
|
index = offset + m.length;
|
|
8035
8035
|
if (escaped) {
|
|
8036
|
-
|
|
8036
|
+
path6 += escaped[1];
|
|
8037
8037
|
pathEscaped = true;
|
|
8038
8038
|
continue;
|
|
8039
8039
|
}
|
|
@@ -8043,16 +8043,16 @@ var require_path_to_regexp = __commonJS({
|
|
|
8043
8043
|
var capture = res[3];
|
|
8044
8044
|
var group = res[4];
|
|
8045
8045
|
var modifier = res[5];
|
|
8046
|
-
if (!pathEscaped &&
|
|
8047
|
-
var k =
|
|
8048
|
-
if (delimiters.indexOf(
|
|
8049
|
-
prev =
|
|
8050
|
-
|
|
8046
|
+
if (!pathEscaped && path6.length) {
|
|
8047
|
+
var k = path6.length - 1;
|
|
8048
|
+
if (delimiters.indexOf(path6[k]) > -1) {
|
|
8049
|
+
prev = path6[k];
|
|
8050
|
+
path6 = path6.slice(0, k);
|
|
8051
8051
|
}
|
|
8052
8052
|
}
|
|
8053
|
-
if (
|
|
8054
|
-
tokens.push(
|
|
8055
|
-
|
|
8053
|
+
if (path6) {
|
|
8054
|
+
tokens.push(path6);
|
|
8055
|
+
path6 = "";
|
|
8056
8056
|
pathEscaped = false;
|
|
8057
8057
|
}
|
|
8058
8058
|
var partial = prev !== "" && next !== void 0 && next !== prev;
|
|
@@ -8070,8 +8070,8 @@ var require_path_to_regexp = __commonJS({
|
|
|
8070
8070
|
pattern: pattern ? escapeGroup(pattern) : "[^" + escapeString(delimiter2) + "]+?"
|
|
8071
8071
|
});
|
|
8072
8072
|
}
|
|
8073
|
-
if (
|
|
8074
|
-
tokens.push(
|
|
8073
|
+
if (path6 || index < str.length) {
|
|
8074
|
+
tokens.push(path6 + str.substr(index));
|
|
8075
8075
|
}
|
|
8076
8076
|
return tokens;
|
|
8077
8077
|
}
|
|
@@ -8086,12 +8086,12 @@ var require_path_to_regexp = __commonJS({
|
|
|
8086
8086
|
}
|
|
8087
8087
|
}
|
|
8088
8088
|
return function(data, options) {
|
|
8089
|
-
var
|
|
8089
|
+
var path6 = "";
|
|
8090
8090
|
var encode = options && options.encode || encodeURIComponent;
|
|
8091
8091
|
for (var i2 = 0; i2 < tokens.length; i2++) {
|
|
8092
8092
|
var token = tokens[i2];
|
|
8093
8093
|
if (typeof token === "string") {
|
|
8094
|
-
|
|
8094
|
+
path6 += token;
|
|
8095
8095
|
continue;
|
|
8096
8096
|
}
|
|
8097
8097
|
var value = data ? data[token.name] : void 0;
|
|
@@ -8110,7 +8110,7 @@ var require_path_to_regexp = __commonJS({
|
|
|
8110
8110
|
if (!matches[i2].test(segment)) {
|
|
8111
8111
|
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '"');
|
|
8112
8112
|
}
|
|
8113
|
-
|
|
8113
|
+
path6 += (j === 0 ? token.prefix : token.delimiter) + segment;
|
|
8114
8114
|
}
|
|
8115
8115
|
continue;
|
|
8116
8116
|
}
|
|
@@ -8119,17 +8119,17 @@ var require_path_to_regexp = __commonJS({
|
|
|
8119
8119
|
if (!matches[i2].test(segment)) {
|
|
8120
8120
|
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
|
|
8121
8121
|
}
|
|
8122
|
-
|
|
8122
|
+
path6 += token.prefix + segment;
|
|
8123
8123
|
continue;
|
|
8124
8124
|
}
|
|
8125
8125
|
if (token.optional) {
|
|
8126
8126
|
if (token.partial)
|
|
8127
|
-
|
|
8127
|
+
path6 += token.prefix;
|
|
8128
8128
|
continue;
|
|
8129
8129
|
}
|
|
8130
8130
|
throw new TypeError('Expected "' + token.name + '" to be ' + (token.repeat ? "an array" : "a string"));
|
|
8131
8131
|
}
|
|
8132
|
-
return
|
|
8132
|
+
return path6;
|
|
8133
8133
|
};
|
|
8134
8134
|
}
|
|
8135
8135
|
function escapeString(str) {
|
|
@@ -8141,10 +8141,10 @@ var require_path_to_regexp = __commonJS({
|
|
|
8141
8141
|
function flags(options) {
|
|
8142
8142
|
return options && options.sensitive ? "" : "i";
|
|
8143
8143
|
}
|
|
8144
|
-
function regexpToRegexp(
|
|
8144
|
+
function regexpToRegexp(path6, keys) {
|
|
8145
8145
|
if (!keys)
|
|
8146
|
-
return
|
|
8147
|
-
var groups =
|
|
8146
|
+
return path6;
|
|
8147
|
+
var groups = path6.source.match(/\((?!\?)/g);
|
|
8148
8148
|
if (groups) {
|
|
8149
8149
|
for (var i = 0; i < groups.length; i++) {
|
|
8150
8150
|
keys.push({
|
|
@@ -8158,17 +8158,17 @@ var require_path_to_regexp = __commonJS({
|
|
|
8158
8158
|
});
|
|
8159
8159
|
}
|
|
8160
8160
|
}
|
|
8161
|
-
return
|
|
8161
|
+
return path6;
|
|
8162
8162
|
}
|
|
8163
|
-
function arrayToRegexp(
|
|
8163
|
+
function arrayToRegexp(path6, keys, options) {
|
|
8164
8164
|
var parts = [];
|
|
8165
|
-
for (var i = 0; i <
|
|
8166
|
-
parts.push(pathToRegexp(
|
|
8165
|
+
for (var i = 0; i < path6.length; i++) {
|
|
8166
|
+
parts.push(pathToRegexp(path6[i], keys, options).source);
|
|
8167
8167
|
}
|
|
8168
8168
|
return new RegExp("(?:" + parts.join("|") + ")", flags(options));
|
|
8169
8169
|
}
|
|
8170
|
-
function stringToRegexp(
|
|
8171
|
-
return tokensToRegExp(parse2(
|
|
8170
|
+
function stringToRegexp(path6, keys, options) {
|
|
8171
|
+
return tokensToRegExp(parse2(path6, options), keys, options);
|
|
8172
8172
|
}
|
|
8173
8173
|
function tokensToRegExp(tokens, keys, options) {
|
|
8174
8174
|
options = options || {};
|
|
@@ -8212,21 +8212,21 @@ var require_path_to_regexp = __commonJS({
|
|
|
8212
8212
|
}
|
|
8213
8213
|
return new RegExp("^" + route, flags(options));
|
|
8214
8214
|
}
|
|
8215
|
-
function pathToRegexp(
|
|
8216
|
-
if (
|
|
8217
|
-
return regexpToRegexp(
|
|
8215
|
+
function pathToRegexp(path6, keys, options) {
|
|
8216
|
+
if (path6 instanceof RegExp) {
|
|
8217
|
+
return regexpToRegexp(path6, keys);
|
|
8218
8218
|
}
|
|
8219
|
-
if (Array.isArray(
|
|
8219
|
+
if (Array.isArray(path6)) {
|
|
8220
8220
|
return arrayToRegexp(
|
|
8221
8221
|
/** @type {!Array} */
|
|
8222
|
-
|
|
8222
|
+
path6,
|
|
8223
8223
|
keys,
|
|
8224
8224
|
options
|
|
8225
8225
|
);
|
|
8226
8226
|
}
|
|
8227
8227
|
return stringToRegexp(
|
|
8228
8228
|
/** @type {string} */
|
|
8229
|
-
|
|
8229
|
+
path6,
|
|
8230
8230
|
keys,
|
|
8231
8231
|
options
|
|
8232
8232
|
);
|
|
@@ -15391,11 +15391,11 @@ var require_mime_types2 = __commonJS({
|
|
|
15391
15391
|
}
|
|
15392
15392
|
return exts[0];
|
|
15393
15393
|
}
|
|
15394
|
-
function lookup(
|
|
15395
|
-
if (!
|
|
15394
|
+
function lookup(path6) {
|
|
15395
|
+
if (!path6 || typeof path6 !== "string") {
|
|
15396
15396
|
return false;
|
|
15397
15397
|
}
|
|
15398
|
-
var extension2 = extname2("x." +
|
|
15398
|
+
var extension2 = extname2("x." + path6).toLowerCase().substr(1);
|
|
15399
15399
|
if (!extension2) {
|
|
15400
15400
|
return false;
|
|
15401
15401
|
}
|
|
@@ -15593,7 +15593,7 @@ var require_content_disposition = __commonJS({
|
|
|
15593
15593
|
var require_path_is_inside = __commonJS({
|
|
15594
15594
|
"../../node_modules/.pnpm/path-is-inside@1.0.2/node_modules/path-is-inside/lib/path-is-inside.js"(exports2, module2) {
|
|
15595
15595
|
"use strict";
|
|
15596
|
-
var
|
|
15596
|
+
var path6 = __require("path");
|
|
15597
15597
|
module2.exports = function(thePath, potentialParent) {
|
|
15598
15598
|
thePath = stripTrailingSep(thePath);
|
|
15599
15599
|
potentialParent = stripTrailingSep(potentialParent);
|
|
@@ -15601,10 +15601,10 @@ var require_path_is_inside = __commonJS({
|
|
|
15601
15601
|
thePath = thePath.toLowerCase();
|
|
15602
15602
|
potentialParent = potentialParent.toLowerCase();
|
|
15603
15603
|
}
|
|
15604
|
-
return thePath.lastIndexOf(potentialParent, 0) === 0 && (thePath[potentialParent.length] ===
|
|
15604
|
+
return thePath.lastIndexOf(potentialParent, 0) === 0 && (thePath[potentialParent.length] === path6.sep || thePath[potentialParent.length] === void 0);
|
|
15605
15605
|
};
|
|
15606
15606
|
function stripTrailingSep(thePath) {
|
|
15607
|
-
if (thePath[thePath.length - 1] ===
|
|
15607
|
+
if (thePath[thePath.length - 1] === path6.sep) {
|
|
15608
15608
|
return thePath.slice(0, -1);
|
|
15609
15609
|
}
|
|
15610
15610
|
return thePath;
|
|
@@ -15780,7 +15780,7 @@ var require_error = __commonJS({
|
|
|
15780
15780
|
var require_src2 = __commonJS({
|
|
15781
15781
|
"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/index.js"(exports2, module2) {
|
|
15782
15782
|
var { promisify } = __require("util");
|
|
15783
|
-
var
|
|
15783
|
+
var path6 = __require("path");
|
|
15784
15784
|
var { createHash } = __require("crypto");
|
|
15785
15785
|
var { realpath, lstat, createReadStream, readdir } = __require("fs");
|
|
15786
15786
|
var url3 = require_urlparser();
|
|
@@ -15797,7 +15797,7 @@ var require_src2 = __commonJS({
|
|
|
15797
15797
|
var etags = /* @__PURE__ */ new Map();
|
|
15798
15798
|
var calculateSha = (handlers, absolutePath) => new Promise((resolve2, reject) => {
|
|
15799
15799
|
const hash = createHash("sha1");
|
|
15800
|
-
hash.update(
|
|
15800
|
+
hash.update(path6.extname(absolutePath));
|
|
15801
15801
|
hash.update("-");
|
|
15802
15802
|
const rs = handlers.createReadStream(absolutePath);
|
|
15803
15803
|
rs.on("error", reject);
|
|
@@ -15810,7 +15810,7 @@ var require_src2 = __commonJS({
|
|
|
15810
15810
|
var sourceMatches = (source, requestPath, allowSegments) => {
|
|
15811
15811
|
const keys = [];
|
|
15812
15812
|
const slashed = slasher(source);
|
|
15813
|
-
const resolvedPath =
|
|
15813
|
+
const resolvedPath = path6.posix.resolve(requestPath);
|
|
15814
15814
|
let results = null;
|
|
15815
15815
|
if (allowSegments) {
|
|
15816
15816
|
const normalized = slashed.replace("*", "(.*)");
|
|
@@ -15874,7 +15874,7 @@ var require_src2 = __commonJS({
|
|
|
15874
15874
|
cleanedUrl = true;
|
|
15875
15875
|
}
|
|
15876
15876
|
if (slashing) {
|
|
15877
|
-
const { ext, name } =
|
|
15877
|
+
const { ext, name } = path6.parse(decodedPath);
|
|
15878
15878
|
const isTrailed = decodedPath.endsWith("/");
|
|
15879
15879
|
const isDotfile = name.startsWith(".");
|
|
15880
15880
|
let target = null;
|
|
@@ -15920,8 +15920,8 @@ var require_src2 = __commonJS({
|
|
|
15920
15920
|
var getHeaders = async (handlers, config, current, absolutePath, stats) => {
|
|
15921
15921
|
const { headers: customHeaders = [], etag = false } = config;
|
|
15922
15922
|
const related = {};
|
|
15923
|
-
const { base } =
|
|
15924
|
-
const relativePath =
|
|
15923
|
+
const { base } = path6.parse(absolutePath);
|
|
15924
|
+
const relativePath = path6.relative(current, absolutePath);
|
|
15925
15925
|
if (customHeaders.length > 0) {
|
|
15926
15926
|
for (let index = 0; index < customHeaders.length; index++) {
|
|
15927
15927
|
const { source, headers: headers2 } = customHeaders[index];
|
|
@@ -15981,15 +15981,15 @@ var require_src2 = __commonJS({
|
|
|
15981
15981
|
return true;
|
|
15982
15982
|
};
|
|
15983
15983
|
var getPossiblePaths = (relativePath, extension) => [
|
|
15984
|
-
|
|
15984
|
+
path6.join(relativePath, `index${extension}`),
|
|
15985
15985
|
relativePath.endsWith("/") ? relativePath.replace(/\/$/g, extension) : relativePath + extension
|
|
15986
|
-
].filter((item) =>
|
|
15986
|
+
].filter((item) => path6.basename(item) !== extension);
|
|
15987
15987
|
var findRelated = async (current, relativePath, rewrittenPath, originalStat) => {
|
|
15988
15988
|
const possible = rewrittenPath ? [rewrittenPath] : getPossiblePaths(relativePath, ".html");
|
|
15989
15989
|
let stats = null;
|
|
15990
15990
|
for (let index = 0; index < possible.length; index++) {
|
|
15991
15991
|
const related = possible[index];
|
|
15992
|
-
const absolutePath =
|
|
15992
|
+
const absolutePath = path6.join(current, related);
|
|
15993
15993
|
try {
|
|
15994
15994
|
stats = await originalStat(absolutePath);
|
|
15995
15995
|
} catch (err) {
|
|
@@ -16034,15 +16034,15 @@ var require_src2 = __commonJS({
|
|
|
16034
16034
|
const canRenderSingle = renderSingle && files.length === 1;
|
|
16035
16035
|
for (let index = 0; index < files.length; index++) {
|
|
16036
16036
|
const file = files[index];
|
|
16037
|
-
const filePath =
|
|
16038
|
-
const details =
|
|
16037
|
+
const filePath = path6.resolve(absolutePath, file);
|
|
16038
|
+
const details = path6.parse(filePath);
|
|
16039
16039
|
let stats = null;
|
|
16040
16040
|
if (methods.lstat) {
|
|
16041
16041
|
stats = await handlers.lstat(filePath, true);
|
|
16042
16042
|
} else {
|
|
16043
16043
|
stats = await handlers.lstat(filePath);
|
|
16044
16044
|
}
|
|
16045
|
-
details.relative =
|
|
16045
|
+
details.relative = path6.join(relativePath, details.base);
|
|
16046
16046
|
if (stats.isDirectory()) {
|
|
16047
16047
|
details.base += slashSuffix;
|
|
16048
16048
|
details.relative += slashSuffix;
|
|
@@ -16069,9 +16069,9 @@ var require_src2 = __commonJS({
|
|
|
16069
16069
|
delete files[index];
|
|
16070
16070
|
}
|
|
16071
16071
|
}
|
|
16072
|
-
const toRoot =
|
|
16073
|
-
const directory =
|
|
16074
|
-
const pathParts = directory.split(
|
|
16072
|
+
const toRoot = path6.relative(current, absolutePath);
|
|
16073
|
+
const directory = path6.join(path6.basename(current), toRoot, slashSuffix);
|
|
16074
|
+
const pathParts = directory.split(path6.sep).filter(Boolean);
|
|
16075
16075
|
files = files.sort((a, b) => {
|
|
16076
16076
|
const aIsDir = a.type === "directory";
|
|
16077
16077
|
const bIsDir = b.type === "directory";
|
|
@@ -16088,7 +16088,7 @@ var require_src2 = __commonJS({
|
|
|
16088
16088
|
}).filter(Boolean);
|
|
16089
16089
|
if (toRoot.length > 0) {
|
|
16090
16090
|
const directoryPath = [...pathParts].slice(1);
|
|
16091
|
-
const relative3 =
|
|
16091
|
+
const relative3 = path6.join("/", ...directoryPath, "..", slashSuffix);
|
|
16092
16092
|
files.unshift({
|
|
16093
16093
|
type: "directory",
|
|
16094
16094
|
base: "..",
|
|
@@ -16137,7 +16137,7 @@ var require_src2 = __commonJS({
|
|
|
16137
16137
|
return;
|
|
16138
16138
|
}
|
|
16139
16139
|
let stats = null;
|
|
16140
|
-
const errorPage =
|
|
16140
|
+
const errorPage = path6.join(current, `${statusCode}.html`);
|
|
16141
16141
|
try {
|
|
16142
16142
|
stats = await handlers.lstat(errorPage);
|
|
16143
16143
|
} catch (err) {
|
|
@@ -16182,7 +16182,7 @@ var require_src2 = __commonJS({
|
|
|
16182
16182
|
}, methods);
|
|
16183
16183
|
module2.exports = async (request, response, config = {}, methods = {}) => {
|
|
16184
16184
|
const cwd = process.cwd();
|
|
16185
|
-
const current = config.public ?
|
|
16185
|
+
const current = config.public ? path6.resolve(cwd, config.public) : cwd;
|
|
16186
16186
|
const handlers = getHandlers(methods);
|
|
16187
16187
|
let relativePath = null;
|
|
16188
16188
|
let acceptsJSON = null;
|
|
@@ -16198,7 +16198,7 @@ var require_src2 = __commonJS({
|
|
|
16198
16198
|
message: "Bad Request"
|
|
16199
16199
|
});
|
|
16200
16200
|
}
|
|
16201
|
-
let absolutePath =
|
|
16201
|
+
let absolutePath = path6.join(current, relativePath);
|
|
16202
16202
|
if (!isPathInside(absolutePath, current)) {
|
|
16203
16203
|
return sendError(absolutePath, response, acceptsJSON, current, handlers, config, {
|
|
16204
16204
|
statusCode: 400,
|
|
@@ -16216,7 +16216,7 @@ var require_src2 = __commonJS({
|
|
|
16216
16216
|
return;
|
|
16217
16217
|
}
|
|
16218
16218
|
let stats = null;
|
|
16219
|
-
if (
|
|
16219
|
+
if (path6.extname(relativePath) !== "") {
|
|
16220
16220
|
try {
|
|
16221
16221
|
stats = await handlers.lstat(absolutePath);
|
|
16222
16222
|
} catch (err) {
|
|
@@ -16746,7 +16746,7 @@ var require_escape_html = __commonJS({
|
|
|
16746
16746
|
|
|
16747
16747
|
// src/commands/dev/index.ts
|
|
16748
16748
|
var import_chalk4 = __toESM(require_source(), 1);
|
|
16749
|
-
import
|
|
16749
|
+
import path5 from "path";
|
|
16750
16750
|
|
|
16751
16751
|
// src/commands/dev/dev.ts
|
|
16752
16752
|
var import_chalk3 = __toESM(require_source(), 1);
|
|
@@ -16775,7 +16775,7 @@ import url2, { URL } from "url";
|
|
|
16775
16775
|
import http from "http";
|
|
16776
16776
|
import { randomBytes as randomBytes2 } from "crypto";
|
|
16777
16777
|
import { watch } from "chokidar";
|
|
16778
|
-
import
|
|
16778
|
+
import path4, { isAbsolute, basename, dirname as dirname2, extname, join as join2 } from "path";
|
|
16779
16779
|
|
|
16780
16780
|
// src/util/dev/port-utils.ts
|
|
16781
16781
|
var import_is_port_reachable = __toESM(require_is_port_reachable(), 1);
|
|
@@ -17315,18 +17315,18 @@ Please run \`${await getUpdateCommand()}\` to update to the latest CLI.`
|
|
|
17315
17315
|
const { output: buildOutput } = result;
|
|
17316
17316
|
const { cleanUrls } = vercelConfig;
|
|
17317
17317
|
for (const [originalPath, value] of Object.entries(buildOutput)) {
|
|
17318
|
-
let
|
|
17319
|
-
if (cleanUrls &&
|
|
17320
|
-
|
|
17318
|
+
let path6 = normalizePath2(originalPath);
|
|
17319
|
+
if (cleanUrls && path6.endsWith(".html")) {
|
|
17320
|
+
path6 = path6.slice(0, -5);
|
|
17321
17321
|
if (value.type === "FileBlob" || value.type === "FileFsRef") {
|
|
17322
17322
|
value.contentType = value.contentType || "text/html; charset=utf-8";
|
|
17323
17323
|
}
|
|
17324
17324
|
}
|
|
17325
|
-
const extensionless = devServer.getExtensionlessFile(
|
|
17325
|
+
const extensionless = devServer.getExtensionlessFile(path6);
|
|
17326
17326
|
if (extensionless) {
|
|
17327
|
-
|
|
17327
|
+
path6 = extensionless;
|
|
17328
17328
|
}
|
|
17329
|
-
buildOutput[
|
|
17329
|
+
buildOutput[path6] = value;
|
|
17330
17330
|
}
|
|
17331
17331
|
const deserializedOutput = await deserializeBuildOutputs(
|
|
17332
17332
|
buildOutput
|
|
@@ -17354,10 +17354,10 @@ Please run \`${await getUpdateCommand()}\` to update to the latest CLI.`
|
|
|
17354
17354
|
}
|
|
17355
17355
|
await Promise.all(
|
|
17356
17356
|
Object.entries(result.output).map(async (entry) => {
|
|
17357
|
-
const
|
|
17357
|
+
const path6 = entry[0];
|
|
17358
17358
|
const asset = entry[1];
|
|
17359
17359
|
if (asset.type === "Lambda") {
|
|
17360
|
-
const oldAsset = match.buildOutput && match.buildOutput[
|
|
17360
|
+
const oldAsset = match.buildOutput && match.buildOutput[path6];
|
|
17361
17361
|
if (oldAsset && oldAsset.type === "Lambda" && oldAsset.fn) {
|
|
17362
17362
|
await oldAsset.fn.destroy();
|
|
17363
17363
|
}
|
|
@@ -17420,6 +17420,19 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
|
|
|
17420
17420
|
mapToEntrypoint.set(src, originalSrc);
|
|
17421
17421
|
}
|
|
17422
17422
|
}
|
|
17423
|
+
if (buildConfig.config?.framework === "go" && !fileList.includes(src)) {
|
|
17424
|
+
const originalSrc = src;
|
|
17425
|
+
const goEntrypoints = [
|
|
17426
|
+
"main.go",
|
|
17427
|
+
"cmd/api/main.go",
|
|
17428
|
+
"cmd/server/main.go"
|
|
17429
|
+
];
|
|
17430
|
+
const existing = goEntrypoints.filter((p) => fileList.includes(p));
|
|
17431
|
+
if (existing.length > 0) {
|
|
17432
|
+
src = existing[0];
|
|
17433
|
+
mapToEntrypoint.set(src, originalSrc);
|
|
17434
|
+
}
|
|
17435
|
+
}
|
|
17423
17436
|
const extensionless = devServer.getExtensionlessFile(src);
|
|
17424
17437
|
if (extensionless) {
|
|
17425
17438
|
mapToEntrypoint.set(extensionless, src);
|
|
@@ -17615,7 +17628,7 @@ var import_get_port = __toESM(require_get_port(), 1);
|
|
|
17615
17628
|
var import_chalk = __toESM(require_source(), 1);
|
|
17616
17629
|
var import_fs_detectors2 = __toESM(require_dist4(), 1);
|
|
17617
17630
|
var import_frameworks = __toESM(require_frameworks(), 1);
|
|
17618
|
-
import
|
|
17631
|
+
import path3 from "path";
|
|
17619
17632
|
import { Transform, Writable } from "stream";
|
|
17620
17633
|
|
|
17621
17634
|
// src/util/dev/cron.ts
|
|
@@ -17741,6 +17754,32 @@ import {
|
|
|
17741
17754
|
getServiceUrlEnvVars,
|
|
17742
17755
|
getExperimentalServiceUrlEnvVars
|
|
17743
17756
|
} from "@vercel/build-utils";
|
|
17757
|
+
|
|
17758
|
+
// src/util/dev/next-dev-websocket-shim-injection.ts
|
|
17759
|
+
import path2 from "path";
|
|
17760
|
+
var NEXT_DEV_WEBSOCKET_SHIM = path2.join(
|
|
17761
|
+
__dirname,
|
|
17762
|
+
"next-dev-websocket-shim-preload.cjs"
|
|
17763
|
+
);
|
|
17764
|
+
function injectNextDevWebSocketShimIfNeeded(env, command, projectSettings) {
|
|
17765
|
+
if (!shouldInjectNextDevWebSocketShim(command, projectSettings)) {
|
|
17766
|
+
return void 0;
|
|
17767
|
+
}
|
|
17768
|
+
env.NODE_OPTIONS = prependNodeRequireOption(
|
|
17769
|
+
env.NODE_OPTIONS,
|
|
17770
|
+
NEXT_DEV_WEBSOCKET_SHIM
|
|
17771
|
+
);
|
|
17772
|
+
return NEXT_DEV_WEBSOCKET_SHIM;
|
|
17773
|
+
}
|
|
17774
|
+
function shouldInjectNextDevWebSocketShim(command, projectSettings) {
|
|
17775
|
+
return projectSettings?.framework === "nextjs" || /(?:^|\s)(?:next|next\.js)(?:\s+dev)?(?:\s+-|\s*$|$)/.test(command);
|
|
17776
|
+
}
|
|
17777
|
+
function prependNodeRequireOption(nodeOptions, requirePath) {
|
|
17778
|
+
const requireOption = `--require ${JSON.stringify(requirePath)}`;
|
|
17779
|
+
return nodeOptions ? `${requireOption} ${nodeOptions}` : requireOption;
|
|
17780
|
+
}
|
|
17781
|
+
|
|
17782
|
+
// src/util/dev/services-orchestrator.ts
|
|
17744
17783
|
var STARTUP_TIMEOUT = (0, import_ms2.default)("5m");
|
|
17745
17784
|
var ServiceStartError = class extends Error {
|
|
17746
17785
|
constructor(failures) {
|
|
@@ -18103,6 +18142,7 @@ var ServicesOrchestrator = class {
|
|
|
18103
18142
|
return this.spawnDevCommandProcess({
|
|
18104
18143
|
name: service.name,
|
|
18105
18144
|
devCommand: devCommand2,
|
|
18145
|
+
framework: spec.framework,
|
|
18106
18146
|
workspacePath: spec.rootPath,
|
|
18107
18147
|
env: spec.env,
|
|
18108
18148
|
logger,
|
|
@@ -18157,7 +18197,7 @@ var ServicesOrchestrator = class {
|
|
|
18157
18197
|
}
|
|
18158
18198
|
const workspace = service.workspace || ".";
|
|
18159
18199
|
return {
|
|
18160
|
-
rootPath:
|
|
18200
|
+
rootPath: path3.join(this.cwd, workspace),
|
|
18161
18201
|
rootLabel: workspace,
|
|
18162
18202
|
framework,
|
|
18163
18203
|
// Prefer the framework's useRuntime, falling back to the resolved builder.
|
|
@@ -18193,7 +18233,7 @@ var ServicesOrchestrator = class {
|
|
|
18193
18233
|
);
|
|
18194
18234
|
const root = service.root || ".";
|
|
18195
18235
|
return {
|
|
18196
|
-
rootPath:
|
|
18236
|
+
rootPath: path3.join(this.cwd, root),
|
|
18197
18237
|
rootLabel: root,
|
|
18198
18238
|
framework,
|
|
18199
18239
|
builderSpec: framework?.useRuntime?.use || service.builder?.use,
|
|
@@ -18228,6 +18268,11 @@ var ServicesOrchestrator = class {
|
|
|
18228
18268
|
output_manager_default.debug(
|
|
18229
18269
|
`Starting ${import_chalk.default.bold(name)} using ${import_chalk.default.cyan.bold(spec.builderSpec)}`
|
|
18230
18270
|
);
|
|
18271
|
+
injectNextDevWebSocketShimIfNeeded(
|
|
18272
|
+
spec.env,
|
|
18273
|
+
spec.framework?.settings.devCommand?.value || "",
|
|
18274
|
+
{ framework: spec.framework?.slug }
|
|
18275
|
+
);
|
|
18231
18276
|
const result = await builder.startDevServer({
|
|
18232
18277
|
entrypoint: spec.entrypoint,
|
|
18233
18278
|
workPath: spec.rootPath,
|
|
@@ -18277,6 +18322,7 @@ var ServicesOrchestrator = class {
|
|
|
18277
18322
|
const {
|
|
18278
18323
|
name,
|
|
18279
18324
|
devCommand: devCommand2,
|
|
18325
|
+
framework,
|
|
18280
18326
|
workspacePath,
|
|
18281
18327
|
env,
|
|
18282
18328
|
logger,
|
|
@@ -18291,14 +18337,17 @@ var ServicesOrchestrator = class {
|
|
|
18291
18337
|
base: this.repoRoot,
|
|
18292
18338
|
start: workspacePath
|
|
18293
18339
|
});
|
|
18294
|
-
const nodeBinPath = nodeBinPaths.join(
|
|
18295
|
-
env.PATH = `${nodeBinPath}${
|
|
18340
|
+
const nodeBinPath = nodeBinPaths.join(path3.delimiter);
|
|
18341
|
+
env.PATH = `${nodeBinPath}${path3.delimiter}${env.PATH}`;
|
|
18296
18342
|
output_manager_default.debug(
|
|
18297
18343
|
`Starting ${import_chalk.default.bold(name)} with ${import_chalk.default.cyan.bold(`"${devCommand2}"`)}`
|
|
18298
18344
|
);
|
|
18299
18345
|
if (process.stdout.columns) {
|
|
18300
18346
|
env.COLUMNS = `${process.stdout.columns}`;
|
|
18301
18347
|
}
|
|
18348
|
+
injectNextDevWebSocketShimIfNeeded(env, devCommand2, {
|
|
18349
|
+
framework: framework?.slug
|
|
18350
|
+
});
|
|
18302
18351
|
const child = spawnCommand(devCommand2, {
|
|
18303
18352
|
cwd: workspacePath,
|
|
18304
18353
|
env,
|
|
@@ -18964,10 +19013,10 @@ var DevServer = class {
|
|
|
18964
19013
|
this.clearVercelConfigPromise = () => {
|
|
18965
19014
|
this.getVercelConfigPromise = null;
|
|
18966
19015
|
};
|
|
18967
|
-
this.getExtensionlessFile = (
|
|
18968
|
-
const ext = extname(
|
|
18969
|
-
if (this.apiDir &&
|
|
18970
|
-
return
|
|
19016
|
+
this.getExtensionlessFile = (path6) => {
|
|
19017
|
+
const ext = extname(path6);
|
|
19018
|
+
if (this.apiDir && path6.startsWith(this.apiDir + "/") && this.apiExtensions.has(ext)) {
|
|
19019
|
+
return path6.slice(0, -ext.length);
|
|
18971
19020
|
}
|
|
18972
19021
|
return null;
|
|
18973
19022
|
};
|
|
@@ -19753,7 +19802,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
19753
19802
|
const origQuery = parseQueryString(origUrl.search);
|
|
19754
19803
|
Object.assign(origQuery, query);
|
|
19755
19804
|
origUrl.search = formatQueryString(origQuery);
|
|
19756
|
-
const
|
|
19805
|
+
const path6 = url2.format({
|
|
19757
19806
|
pathname: origUrl.pathname,
|
|
19758
19807
|
search: origUrl.search
|
|
19759
19808
|
});
|
|
@@ -19761,7 +19810,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
19761
19810
|
const payload = {
|
|
19762
19811
|
method: req.method || "GET",
|
|
19763
19812
|
host: req.headers.host,
|
|
19764
|
-
path:
|
|
19813
|
+
path: path6,
|
|
19765
19814
|
headers: {
|
|
19766
19815
|
...req.headers,
|
|
19767
19816
|
...this.getProxyHeaders(req, requestId, true)
|
|
@@ -19769,7 +19818,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
19769
19818
|
encoding: "base64",
|
|
19770
19819
|
body: body.toString("base64")
|
|
19771
19820
|
};
|
|
19772
|
-
debug(`Invoking lambda: "${assetKey}" with ${
|
|
19821
|
+
debug(`Invoking lambda: "${assetKey}" with ${path6}`);
|
|
19773
19822
|
let result;
|
|
19774
19823
|
try {
|
|
19775
19824
|
result = await asset.fn({
|
|
@@ -19824,6 +19873,24 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
19824
19873
|
this.proxy.on("proxyRes", (proxyRes) => {
|
|
19825
19874
|
proxyRes.headers["server"] = "Vercel";
|
|
19826
19875
|
});
|
|
19876
|
+
this.proxy.on("error", (err, req, res) => {
|
|
19877
|
+
output_manager_default.debug(
|
|
19878
|
+
`Proxy error for ${req?.url ?? "unknown request"}: ${(0, import_error_utils.errorToString)(err)}`
|
|
19879
|
+
);
|
|
19880
|
+
if (!res) {
|
|
19881
|
+
return;
|
|
19882
|
+
}
|
|
19883
|
+
if ("destroy" in res && typeof res.destroy === "function") {
|
|
19884
|
+
res.destroy();
|
|
19885
|
+
return;
|
|
19886
|
+
}
|
|
19887
|
+
if (res instanceof http.ServerResponse) {
|
|
19888
|
+
if (!res.headersSent) {
|
|
19889
|
+
res.writeHead(502);
|
|
19890
|
+
}
|
|
19891
|
+
res.end();
|
|
19892
|
+
}
|
|
19893
|
+
});
|
|
19827
19894
|
this.server = http.createServer(this.devServerHandler);
|
|
19828
19895
|
this.server.timeout = 0;
|
|
19829
19896
|
this.stopping = false;
|
|
@@ -19837,7 +19904,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
19837
19904
|
this.watchAggregationId = null;
|
|
19838
19905
|
this.watchAggregationEvents = [];
|
|
19839
19906
|
this.watchAggregationTimeout = 500;
|
|
19840
|
-
this.filter = (
|
|
19907
|
+
this.filter = (path6) => Boolean(path6);
|
|
19841
19908
|
this.podId = Math.random().toString(32).slice(-5);
|
|
19842
19909
|
this.shutdownCallbacks = /* @__PURE__ */ new Map();
|
|
19843
19910
|
}
|
|
@@ -19859,8 +19926,8 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
19859
19926
|
await this.stop(code);
|
|
19860
19927
|
process.exit(code);
|
|
19861
19928
|
}
|
|
19862
|
-
enqueueFsEvent(type,
|
|
19863
|
-
this.watchAggregationEvents.push({ type, path:
|
|
19929
|
+
enqueueFsEvent(type, path6) {
|
|
19930
|
+
this.watchAggregationEvents.push({ type, path: path6 });
|
|
19864
19931
|
if (this.watchAggregationId === null) {
|
|
19865
19932
|
this.watchAggregationId = setTimeout(() => {
|
|
19866
19933
|
const events = this.watchAggregationEvents.slice();
|
|
@@ -20117,7 +20184,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20117
20184
|
return void 0;
|
|
20118
20185
|
}
|
|
20119
20186
|
async _getVercelConfig() {
|
|
20120
|
-
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-
|
|
20187
|
+
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-UMUHH55E.js");
|
|
20121
20188
|
await compileVercelConfig(this.cwd);
|
|
20122
20189
|
const configPath = getLocalPathConfig(this.cwd);
|
|
20123
20190
|
const [
|
|
@@ -20271,7 +20338,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20271
20338
|
async readJsonFile(filePath) {
|
|
20272
20339
|
let rel, abs;
|
|
20273
20340
|
if (isAbsolute(filePath)) {
|
|
20274
|
-
rel =
|
|
20341
|
+
rel = path4.relative(this.cwd, filePath);
|
|
20275
20342
|
abs = filePath;
|
|
20276
20343
|
} else {
|
|
20277
20344
|
rel = filePath;
|
|
@@ -20453,10 +20520,10 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20453
20520
|
const files = await staticFiles(this.cwd, {});
|
|
20454
20521
|
this.files = {};
|
|
20455
20522
|
for (const fsPath of files) {
|
|
20456
|
-
const
|
|
20523
|
+
const path6 = relative2(this.cwd, fsPath);
|
|
20457
20524
|
const { mode } = await import_fs_extra.default.stat(fsPath);
|
|
20458
|
-
this.files[
|
|
20459
|
-
const extensionless = this.getExtensionlessFile(
|
|
20525
|
+
this.files[path6] = new FileFsRef2({ mode, fsPath });
|
|
20526
|
+
const extensionless = this.getExtensionlessFile(path6);
|
|
20460
20527
|
if (extensionless) {
|
|
20461
20528
|
this.files[extensionless] = new FileFsRef2({ mode, fsPath });
|
|
20462
20529
|
}
|
|
@@ -20474,19 +20541,19 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20474
20541
|
}
|
|
20475
20542
|
await import_fs_extra.default.mkdirp(this.devCacheDir);
|
|
20476
20543
|
this.watcher = watch(this.cwd, {
|
|
20477
|
-
ignored: (
|
|
20544
|
+
ignored: (path6) => !this.filter(path6),
|
|
20478
20545
|
ignoreInitial: true,
|
|
20479
20546
|
usePolling: false,
|
|
20480
20547
|
persistent: true
|
|
20481
20548
|
});
|
|
20482
|
-
this.watcher.on("add", (
|
|
20483
|
-
this.enqueueFsEvent("add",
|
|
20549
|
+
this.watcher.on("add", (path6) => {
|
|
20550
|
+
this.enqueueFsEvent("add", path6);
|
|
20484
20551
|
});
|
|
20485
|
-
this.watcher.on("change", (
|
|
20486
|
-
this.enqueueFsEvent("change",
|
|
20552
|
+
this.watcher.on("change", (path6) => {
|
|
20553
|
+
this.enqueueFsEvent("change", path6);
|
|
20487
20554
|
});
|
|
20488
|
-
this.watcher.on("unlink", (
|
|
20489
|
-
this.enqueueFsEvent("unlink",
|
|
20555
|
+
this.watcher.on("unlink", (path6) => {
|
|
20556
|
+
this.enqueueFsEvent("unlink", path6);
|
|
20490
20557
|
});
|
|
20491
20558
|
this.watcher.on("error", (err) => {
|
|
20492
20559
|
output_manager_default.error(`Watcher error: ${err}`);
|
|
@@ -20495,32 +20562,66 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20495
20562
|
this.server.on("upgrade", async (req, socket, head) => {
|
|
20496
20563
|
await this.startPromise;
|
|
20497
20564
|
if (this.orchestrator) {
|
|
20498
|
-
const
|
|
20499
|
-
const service = this.orchestrator.getServiceForRoute(
|
|
20565
|
+
const pathname2 = url2.parse(req.url || "/").pathname || "/";
|
|
20566
|
+
const service = this.orchestrator.getServiceForRoute(pathname2);
|
|
20500
20567
|
if (service) {
|
|
20501
|
-
const
|
|
20568
|
+
const target = `http://${service.host}:${service.port}`;
|
|
20502
20569
|
output_manager_default.debug(
|
|
20503
|
-
`Detected "upgrade" event, proxying to service "${service.name}" at ${
|
|
20570
|
+
`Detected "upgrade" event, proxying to service "${service.name}" at ${target}`
|
|
20504
20571
|
);
|
|
20505
|
-
this.proxy.ws(req, socket, head, { target
|
|
20572
|
+
this.proxy.ws(req, socket, head, { target });
|
|
20506
20573
|
return;
|
|
20507
20574
|
}
|
|
20508
20575
|
output_manager_default.debug(
|
|
20509
|
-
`Detected "upgrade" event, but no matching service found for ${
|
|
20576
|
+
`Detected "upgrade" event, but no matching service found for ${pathname2}`
|
|
20510
20577
|
);
|
|
20511
20578
|
socket.destroy();
|
|
20512
20579
|
return;
|
|
20513
20580
|
}
|
|
20514
|
-
if (
|
|
20515
|
-
|
|
20516
|
-
|
|
20517
|
-
);
|
|
20518
|
-
socket.destroy();
|
|
20581
|
+
if (this.devProcessOrigin) {
|
|
20582
|
+
const target = this.devProcessOrigin;
|
|
20583
|
+
output_manager_default.debug(`Detected "upgrade" event, proxying to ${target}`);
|
|
20584
|
+
this.proxy.ws(req, socket, head, { target });
|
|
20519
20585
|
return;
|
|
20520
20586
|
}
|
|
20521
|
-
const
|
|
20522
|
-
|
|
20523
|
-
|
|
20587
|
+
const pathname = url2.parse(req.url || "/").pathname || "/";
|
|
20588
|
+
for (const match of this.buildMatches.values()) {
|
|
20589
|
+
const { builder } = match.builderWithPkg;
|
|
20590
|
+
if ((builder.version === 3 || builder.version === -1) && typeof builder.startDevServer === "function") {
|
|
20591
|
+
try {
|
|
20592
|
+
const result = await builder.startDevServer({
|
|
20593
|
+
files: this.files,
|
|
20594
|
+
entrypoint: match.entrypoint,
|
|
20595
|
+
workPath: this.cwd,
|
|
20596
|
+
config: match.config || {},
|
|
20597
|
+
repoRootPath: this.repoRoot,
|
|
20598
|
+
meta: {
|
|
20599
|
+
isDev: true,
|
|
20600
|
+
requestPath: pathname,
|
|
20601
|
+
devCacheDir: this.devCacheDir,
|
|
20602
|
+
env: { ...this.envConfigs.runEnv },
|
|
20603
|
+
buildEnv: { ...this.envConfigs.buildEnv }
|
|
20604
|
+
}
|
|
20605
|
+
});
|
|
20606
|
+
if (result) {
|
|
20607
|
+
const { port, pid, shutdown } = result;
|
|
20608
|
+
this.shutdownCallbacks.set(pid, shutdown);
|
|
20609
|
+
const target = `http://127.0.0.1:${port}`;
|
|
20610
|
+
output_manager_default.debug(
|
|
20611
|
+
`Detected "upgrade" event, proxying to builder dev server at ${target}`
|
|
20612
|
+
);
|
|
20613
|
+
this.proxy.ws(req, socket, head, { target });
|
|
20614
|
+
return;
|
|
20615
|
+
}
|
|
20616
|
+
} catch (err) {
|
|
20617
|
+
output_manager_default.debug(`Failed to start dev server for upgrade: ${err}`);
|
|
20618
|
+
}
|
|
20619
|
+
}
|
|
20620
|
+
}
|
|
20621
|
+
output_manager_default.debug(
|
|
20622
|
+
`Detected "upgrade" event, but no backend available for ${pathname}`
|
|
20623
|
+
);
|
|
20624
|
+
socket.destroy();
|
|
20524
20625
|
});
|
|
20525
20626
|
await devCommandPromise;
|
|
20526
20627
|
if (!this.orchestrator?.hasServices()) {
|
|
@@ -20965,9 +21066,10 @@ ${error_code}
|
|
|
20965
21066
|
}
|
|
20966
21067
|
);
|
|
20967
21068
|
const nodeBinPaths = getNodeBinPaths2({ base: this.repoRoot, start: cwd });
|
|
20968
|
-
const nodeBinPath = nodeBinPaths.join(
|
|
20969
|
-
env.PATH = `${nodeBinPath}${
|
|
21069
|
+
const nodeBinPath = nodeBinPaths.join(path4.delimiter);
|
|
21070
|
+
env.PATH = `${nodeBinPath}${path4.delimiter}${env.PATH}`;
|
|
20970
21071
|
const command = devCommand2.replace(/\$PORT/g, `${port}`).replace(/%PORT%/g, `${port}`);
|
|
21072
|
+
injectNextDevWebSocketShimIfNeeded(env, command, this.projectSettings);
|
|
20971
21073
|
output_manager_default.debug(
|
|
20972
21074
|
`Starting dev command with parameters: ${JSON.stringify({
|
|
20973
21075
|
cwd,
|
|
@@ -21163,16 +21265,16 @@ function findAsset(match, requestPath, vercelConfig) {
|
|
|
21163
21265
|
return { asset, assetKey };
|
|
21164
21266
|
}
|
|
21165
21267
|
}
|
|
21166
|
-
function dirnameWithoutDot(
|
|
21167
|
-
let dir = dirname2(
|
|
21268
|
+
function dirnameWithoutDot(path6) {
|
|
21269
|
+
let dir = dirname2(path6);
|
|
21168
21270
|
if (dir === ".") {
|
|
21169
21271
|
dir = "";
|
|
21170
21272
|
}
|
|
21171
21273
|
return dir;
|
|
21172
21274
|
}
|
|
21173
|
-
function isIndex(
|
|
21174
|
-
const ext = extname(
|
|
21175
|
-
const name = basename(
|
|
21275
|
+
function isIndex(path6) {
|
|
21276
|
+
const ext = extname(path6);
|
|
21277
|
+
const name = basename(path6, ext);
|
|
21176
21278
|
return name === "index";
|
|
21177
21279
|
}
|
|
21178
21280
|
function minimatches(files, pattern) {
|
|
@@ -21746,7 +21848,7 @@ async function main(client) {
|
|
|
21746
21848
|
}
|
|
21747
21849
|
const hasBuilds = vercelConfig && "builds" in vercelConfig && vercelConfig.builds && vercelConfig.builds.length > 0;
|
|
21748
21850
|
if (!vercelConfig || !hasBuilds) {
|
|
21749
|
-
const pkg = await readJSONFile(
|
|
21851
|
+
const pkg = await readJSONFile(path5.join(dir, "package.json"));
|
|
21750
21852
|
if (pkg instanceof CantParseJSONFile) {
|
|
21751
21853
|
output_manager_default.error(pkg.message);
|
|
21752
21854
|
return 1;
|