vercel 56.2.0 → 56.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{add-YQRDKWJH.js → add-CF5SQESQ.js} +11 -14
- package/dist/chunks/{add-T6ZTAEU2.js → add-DMRGZN3Z.js} +10 -13
- package/dist/chunks/{chunk-LSPZHWWP.js → chunk-22G26AIX.js} +99 -74
- package/dist/chunks/{chunk-HMMPJ3VD.js → chunk-2C2JJTAM.js} +6 -10
- package/dist/chunks/{chunk-YGSTSVXS.js → chunk-2MXGTALG.js} +1076 -3627
- package/dist/chunks/{chunk-5AJNUXWP.js → chunk-3PKFXNJZ.js} +2 -4
- package/dist/chunks/{chunk-5OT26JZN.js → chunk-3VS4DTAU.js} +4 -6
- package/dist/chunks/{chunk-JJWESW5Y.js → chunk-4G6QZSBL.js} +2 -4
- package/dist/chunks/{chunk-HR6VI6UV.js → chunk-4YOCOUDN.js} +5 -6
- package/dist/chunks/{chunk-GXBDQRHJ.js → chunk-4Z5LC2CI.js} +1 -1
- package/dist/chunks/{chunk-2RVK3DDN.js → chunk-52QYYTM5.js} +4 -0
- package/dist/chunks/{chunk-CMJMYVQM.js → chunk-6OMC3HOW.js} +1 -1
- package/dist/chunks/{chunk-SRJTYE5U.js → chunk-A6LE5VAN.js} +1 -1
- package/dist/chunks/{chunk-QY63UKTP.js → chunk-DMSLNAVH.js} +2 -2
- package/dist/chunks/{chunk-PN2GJKM5.js → chunk-DZHRFBKE.js} +2 -2
- package/dist/chunks/{chunk-SHT5IY3Q.js → chunk-ERPZJ4SX.js} +14 -4
- package/dist/chunks/{chunk-K2THP63Z.js → chunk-EYNXG3FO.js} +3 -5
- package/dist/chunks/{chunk-RLJA2KI7.js → chunk-FYQPTH5C.js} +2 -4
- package/dist/chunks/{chunk-RLXBXRU2.js → chunk-G4PG5HVE.js} +6 -10
- package/dist/chunks/{chunk-7PZWVZN6.js → chunk-G75NFPIT.js} +1 -1
- package/dist/chunks/{chunk-7C7MMT4J.js → chunk-GIL3VAUR.js} +2 -4
- package/dist/chunks/{chunk-EKIKD7RS.js → chunk-HUKYQKVQ.js} +9 -7
- package/dist/chunks/{chunk-AVLGVZJ5.js → chunk-I2IICWBW.js} +190 -29
- package/dist/chunks/{chunk-E3Y4SDXF.js → chunk-ICSIFPXG.js} +3 -5
- package/dist/chunks/{chunk-P6AK7SVK.js → chunk-KSSNLCL4.js} +360 -25
- package/dist/chunks/{chunk-WOA4Z45Z.js → chunk-KXKQQIUS.js} +18 -12
- package/dist/chunks/{chunk-HA7C7SDO.js → chunk-LHFNIZ2P.js} +2 -4
- package/dist/chunks/{chunk-B6SCQUDV.js → chunk-NP32PAKT.js} +2 -2
- package/dist/chunks/{chunk-QEEGXNFK.js → chunk-NZRWTCRM.js} +1 -1
- package/dist/chunks/{chunk-IDMKFYEA.js → chunk-OGG6UBXK.js} +2 -4
- package/dist/chunks/{chunk-XFMTSTYT.js → chunk-PRO4S2KV.js} +8 -68
- package/dist/chunks/{chunk-NQEAHRBI.js → chunk-Q5ADSH7D.js} +11 -16
- package/dist/chunks/{chunk-AEENIITE.js → chunk-QP3C5YS5.js} +8 -8
- package/dist/chunks/{chunk-24FCBXI4.js → chunk-R6IGDGX3.js} +1 -1
- package/dist/chunks/{chunk-PQK4YU22.js → chunk-SDK7R4WO.js} +1 -1
- package/dist/chunks/{chunk-22GUZ5KG.js → chunk-STJJ3DFO.js} +2 -4
- package/dist/chunks/{chunk-EHTPDXTS.js → chunk-SZXT3PDQ.js} +3 -294
- package/dist/chunks/{chunk-CB3I3QIT.js → chunk-UDWRZXIT.js} +193 -85
- package/dist/chunks/{chunk-DREO3DFB.js → chunk-VZSZBD4V.js} +16 -6
- package/dist/chunks/{chunk-7S3QUMIG.js → chunk-YS6EDZHB.js} +3 -5
- package/dist/chunks/{chunk-EI555LUJ.js → chunk-ZDCS54ZZ.js} +3 -3
- package/dist/chunks/{chunk-4RGSUV5C.js → chunk-ZVLPUREX.js} +2 -2
- package/dist/chunks/{compile-vercel-config-3AG4VKHZ.js → compile-vercel-config-RPPL7W56.js} +5 -5
- package/dist/chunks/{delete-JLJ753B4.js → delete-QBVZ5X6B.js} +15 -15
- package/dist/chunks/{disable-AXFGDOYN.js → disable-YYGXPXBI.js} +15 -14
- package/dist/chunks/{discard-557SDKVO.js → discard-X2MSUFGI.js} +14 -13
- package/dist/chunks/{edit-ITGNF7S5.js → edit-3ABZQYUU.js} +18 -19
- package/dist/chunks/{enable-6RMJPNW5.js → enable-HUMYCGKA.js} +15 -14
- package/dist/chunks/{exec-G4AUF3KG.js → exec-CNBOV577.js} +3 -3
- package/dist/chunks/{export-3NC3DPRR.js → export-KGHH4WAT.js} +16 -15
- package/dist/chunks/{image-FGP5UVA5.js → image-OO3WWKZV.js} +6 -8
- package/dist/chunks/{inspect-FDF5WZMM.js → inspect-5TNHHD2M.js} +11 -13
- package/dist/chunks/{inspect-N5DHCKLZ.js → inspect-FNUCB7Y3.js} +9 -11
- package/dist/chunks/{inspect-AF5J3QDV.js → inspect-KSSQEAW7.js} +12 -16
- package/dist/chunks/{inspect-56OMR6RC.js → inspect-Z6SSD2SR.js} +9 -11
- package/dist/chunks/{list-PLG2ZHBA.js → list-TXNYRVJG.js} +9 -11
- package/dist/chunks/{list-F2AW7L3D.js → list-X2AD3HCX.js} +11 -14
- package/dist/chunks/{login-LQRR64K7.js → login-SLPCZ2OF.js} +14 -17
- package/dist/chunks/{ls-FWPYY7GH.js → ls-2YSINRJ3.js} +11 -14
- package/dist/chunks/{ls-EKNQN3V4.js → ls-4QMJLQQL.js} +11 -14
- package/dist/chunks/{ls-HZDBJLMG.js → ls-C7MNQ4IK.js} +13 -16
- package/dist/chunks/{ls-E7FYH3DW.js → ls-QLTOY23G.js} +10 -13
- package/dist/chunks/{publish-PDGTM3M7.js → publish-GV4LLLXP.js} +14 -13
- package/dist/chunks/{query-MUQKKYXI.js → query-3AHRMAPA.js} +11 -13
- package/dist/chunks/{reorder-B76HXU6D.js → reorder-VSVOPNM4.js} +18 -17
- package/dist/chunks/{restore-2PYXS4NP.js → restore-FKYCF73P.js} +20 -19
- package/dist/chunks/{rm-GZW2IDWX.js → rm-4QCXZRC2.js} +11 -14
- package/dist/chunks/{rm-SD3EJRXY.js → rm-UTFG42FN.js} +9 -12
- package/dist/chunks/{rm-SFC67P5U.js → rm-YV5WQKQM.js} +10 -13
- package/dist/chunks/{rule-inspect-MSPP3V4O.js → rule-inspect-IONN4MTP.js} +10 -13
- package/dist/chunks/{rules-AN32QRP7.js → rules-S2KPV7HY.js} +9 -11
- package/dist/chunks/{schema-2GYFHMCN.js → schema-3LX3V2HE.js} +12 -13
- package/dist/chunks/{tags-ULDC3YLP.js → tags-CQ4FRIJ4.js} +5 -7
- package/dist/chunks/{types-2TPA6J4G.js → types-QKLIFDDP.js} +5 -5
- package/dist/chunks/{update-NE62WKTZ.js → update-U7OGHCP5.js} +10 -13
- package/dist/commands/build/index.js +43 -38
- package/dist/commands/deploy/index.js +58 -75
- package/dist/commands/dev/index.js +206 -163
- package/dist/commands/env/index.js +77 -44
- package/dist/commands/link/index.js +26 -29
- package/dist/commands/list/index.js +15 -19
- package/dist/commands-bulk.js +3103 -1872
- package/dist/index.js +30 -33
- package/dist/version.mjs +1 -1
- package/package.json +22 -23
- package/dist/chunks/chunk-IC4YEIGW.js +0 -101
- package/dist/chunks/chunk-LXF3AXHM.js +0 -158
- package/dist/chunks/chunk-SGL3NMOP.js +0 -86
|
@@ -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-DZHRFBKE.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-OGG6UBXK.js";
|
|
22
22
|
import {
|
|
23
23
|
OUTPUT_DIR,
|
|
24
24
|
getStaticServiceSchedules,
|
|
@@ -26,34 +26,33 @@ import {
|
|
|
26
26
|
require_mime_types,
|
|
27
27
|
require_npa,
|
|
28
28
|
staticFiles
|
|
29
|
-
} from "../../chunks/chunk-
|
|
29
|
+
} from "../../chunks/chunk-ERPZJ4SX.js";
|
|
30
30
|
import "../../chunks/chunk-IB5L4LKZ.js";
|
|
31
31
|
import {
|
|
32
32
|
pickOverrides
|
|
33
|
-
} from "../../chunks/chunk-
|
|
34
|
-
import "../../chunks/chunk-
|
|
33
|
+
} from "../../chunks/chunk-A6LE5VAN.js";
|
|
34
|
+
import "../../chunks/chunk-R6IGDGX3.js";
|
|
35
35
|
import {
|
|
36
36
|
displayDetectedServices,
|
|
37
|
-
printProjectNotFoundError,
|
|
38
37
|
readConfig,
|
|
39
38
|
setupAndLink
|
|
40
|
-
} from "../../chunks/chunk-
|
|
41
|
-
import "../../chunks/chunk-IC4YEIGW.js";
|
|
39
|
+
} from "../../chunks/chunk-PRO4S2KV.js";
|
|
42
40
|
import {
|
|
43
41
|
getLocalPathConfig
|
|
44
|
-
} from "../../chunks/chunk-
|
|
45
|
-
import "../../chunks/chunk-LXF3AXHM.js";
|
|
42
|
+
} from "../../chunks/chunk-ZDCS54ZZ.js";
|
|
46
43
|
import {
|
|
47
44
|
help
|
|
48
|
-
} from "../../chunks/chunk-
|
|
49
|
-
import "../../chunks/chunk-
|
|
45
|
+
} from "../../chunks/chunk-DMSLNAVH.js";
|
|
46
|
+
import "../../chunks/chunk-NZRWTCRM.js";
|
|
50
47
|
import {
|
|
51
48
|
VERCEL_DIR,
|
|
52
49
|
VERCEL_OIDC_TOKEN,
|
|
50
|
+
detectExplicitScope,
|
|
53
51
|
findRepoRoot,
|
|
54
52
|
getLinkedProject,
|
|
55
53
|
getVercelDirectory,
|
|
56
54
|
param,
|
|
55
|
+
printProjectNotFoundError,
|
|
57
56
|
pullEnvRecords,
|
|
58
57
|
readJSONFile,
|
|
59
58
|
require_brace_expansion,
|
|
@@ -71,19 +70,18 @@ import {
|
|
|
71
70
|
resolveProjectCwd,
|
|
72
71
|
tryDetectServices,
|
|
73
72
|
validateConfig
|
|
74
|
-
} from "../../chunks/chunk-
|
|
73
|
+
} from "../../chunks/chunk-2MXGTALG.js";
|
|
75
74
|
import {
|
|
76
75
|
buildCommandWithYes,
|
|
77
76
|
outputActionRequired
|
|
78
|
-
} from "../../chunks/chunk-
|
|
77
|
+
} from "../../chunks/chunk-UDWRZXIT.js";
|
|
79
78
|
import {
|
|
80
79
|
TelemetryClient
|
|
81
80
|
} from "../../chunks/chunk-ECCWJHC6.js";
|
|
82
81
|
import {
|
|
83
|
-
getFlagsSpecification,
|
|
84
82
|
parseArguments,
|
|
85
83
|
printError
|
|
86
|
-
} from "../../chunks/chunk-
|
|
84
|
+
} from "../../chunks/chunk-SZXT3PDQ.js";
|
|
87
85
|
import {
|
|
88
86
|
CantParseJSONFile,
|
|
89
87
|
LambdaSizeExceededError,
|
|
@@ -92,15 +90,16 @@ import {
|
|
|
92
90
|
cmd,
|
|
93
91
|
getCommandName,
|
|
94
92
|
getCommandNamePlain,
|
|
93
|
+
getFlagsSpecification,
|
|
95
94
|
getTitleName,
|
|
96
95
|
packageName,
|
|
97
96
|
require_bytes
|
|
98
|
-
} from "../../chunks/chunk-
|
|
97
|
+
} from "../../chunks/chunk-KSSNLCL4.js";
|
|
99
98
|
import "../../chunks/chunk-P4QNYOFB.js";
|
|
100
99
|
import {
|
|
101
100
|
Headers,
|
|
102
101
|
directFetch
|
|
103
|
-
} from "../../chunks/chunk-
|
|
102
|
+
} from "../../chunks/chunk-52QYYTM5.js";
|
|
104
103
|
import {
|
|
105
104
|
link_default,
|
|
106
105
|
output_manager_default,
|
|
@@ -7111,13 +7110,13 @@ var require_urlparser = __commonJS({
|
|
|
7111
7110
|
this.pathname = prePath === "" ? "/" : prePath;
|
|
7112
7111
|
return;
|
|
7113
7112
|
}
|
|
7114
|
-
var
|
|
7113
|
+
var path7;
|
|
7115
7114
|
if (escape2) {
|
|
7116
|
-
|
|
7115
|
+
path7 = this._getComponentEscaped(str, pathStart, pathEnd, false);
|
|
7117
7116
|
} else {
|
|
7118
|
-
|
|
7117
|
+
path7 = str.slice(pathStart, pathEnd + 1);
|
|
7119
7118
|
}
|
|
7120
|
-
this.pathname = prePath === "" ? this._prependSlash ? "/" +
|
|
7119
|
+
this.pathname = prePath === "" ? this._prependSlash ? "/" + path7 : path7 : prePath + path7;
|
|
7121
7120
|
};
|
|
7122
7121
|
Url.prototype._parseQuery = function Url$_parseQuery(str, start, end, disableAutoEscapeChars) {
|
|
7123
7122
|
var queryStart = start;
|
|
@@ -7420,8 +7419,8 @@ var require_urlparser = __commonJS({
|
|
|
7420
7419
|
// ../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/glob-slash.js
|
|
7421
7420
|
var require_glob_slash = __commonJS({
|
|
7422
7421
|
"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/glob-slash.js"(exports2, module2) {
|
|
7423
|
-
var
|
|
7424
|
-
var normalize = (value) =>
|
|
7422
|
+
var path7 = __require("path");
|
|
7423
|
+
var normalize = (value) => path7.posix.normalize(path7.posix.join("/", value));
|
|
7425
7424
|
module2.exports = (value) => value.charAt(0) === "!" ? `!${normalize(value.substr(1))}` : normalize(value);
|
|
7426
7425
|
module2.exports.normalize = normalize;
|
|
7427
7426
|
}
|
|
@@ -7432,9 +7431,9 @@ var require_minimatch2 = __commonJS({
|
|
|
7432
7431
|
"../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js"(exports2, module2) {
|
|
7433
7432
|
module2.exports = minimatch3;
|
|
7434
7433
|
minimatch3.Minimatch = Minimatch;
|
|
7435
|
-
var
|
|
7434
|
+
var path7 = { sep: "/" };
|
|
7436
7435
|
try {
|
|
7437
|
-
|
|
7436
|
+
path7 = __require("path");
|
|
7438
7437
|
} catch (er) {
|
|
7439
7438
|
}
|
|
7440
7439
|
var GLOBSTAR = minimatch3.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
@@ -7517,8 +7516,8 @@ var require_minimatch2 = __commonJS({
|
|
|
7517
7516
|
if (!options)
|
|
7518
7517
|
options = {};
|
|
7519
7518
|
pattern = pattern.trim();
|
|
7520
|
-
if (
|
|
7521
|
-
pattern = pattern.split(
|
|
7519
|
+
if (path7.sep !== "/") {
|
|
7520
|
+
pattern = pattern.split(path7.sep).join("/");
|
|
7522
7521
|
}
|
|
7523
7522
|
this.options = options;
|
|
7524
7523
|
this.set = [];
|
|
@@ -7885,8 +7884,8 @@ var require_minimatch2 = __commonJS({
|
|
|
7885
7884
|
if (f === "/" && partial)
|
|
7886
7885
|
return true;
|
|
7887
7886
|
var options = this.options;
|
|
7888
|
-
if (
|
|
7889
|
-
f = f.split(
|
|
7887
|
+
if (path7.sep !== "/") {
|
|
7888
|
+
f = f.split(path7.sep).join("/");
|
|
7890
7889
|
}
|
|
7891
7890
|
f = f.split(slashSplit);
|
|
7892
7891
|
this.debug(this.pattern, "split", f);
|
|
@@ -8023,7 +8022,7 @@ var require_path_to_regexp = __commonJS({
|
|
|
8023
8022
|
var tokens = [];
|
|
8024
8023
|
var key = 0;
|
|
8025
8024
|
var index = 0;
|
|
8026
|
-
var
|
|
8025
|
+
var path7 = "";
|
|
8027
8026
|
var defaultDelimiter = options && options.delimiter || DEFAULT_DELIMITER;
|
|
8028
8027
|
var delimiters = options && options.delimiters || DEFAULT_DELIMITERS;
|
|
8029
8028
|
var pathEscaped = false;
|
|
@@ -8032,10 +8031,10 @@ var require_path_to_regexp = __commonJS({
|
|
|
8032
8031
|
var m = res[0];
|
|
8033
8032
|
var escaped = res[1];
|
|
8034
8033
|
var offset = res.index;
|
|
8035
|
-
|
|
8034
|
+
path7 += str.slice(index, offset);
|
|
8036
8035
|
index = offset + m.length;
|
|
8037
8036
|
if (escaped) {
|
|
8038
|
-
|
|
8037
|
+
path7 += escaped[1];
|
|
8039
8038
|
pathEscaped = true;
|
|
8040
8039
|
continue;
|
|
8041
8040
|
}
|
|
@@ -8045,16 +8044,16 @@ var require_path_to_regexp = __commonJS({
|
|
|
8045
8044
|
var capture = res[3];
|
|
8046
8045
|
var group = res[4];
|
|
8047
8046
|
var modifier = res[5];
|
|
8048
|
-
if (!pathEscaped &&
|
|
8049
|
-
var k =
|
|
8050
|
-
if (delimiters.indexOf(
|
|
8051
|
-
prev =
|
|
8052
|
-
|
|
8047
|
+
if (!pathEscaped && path7.length) {
|
|
8048
|
+
var k = path7.length - 1;
|
|
8049
|
+
if (delimiters.indexOf(path7[k]) > -1) {
|
|
8050
|
+
prev = path7[k];
|
|
8051
|
+
path7 = path7.slice(0, k);
|
|
8053
8052
|
}
|
|
8054
8053
|
}
|
|
8055
|
-
if (
|
|
8056
|
-
tokens.push(
|
|
8057
|
-
|
|
8054
|
+
if (path7) {
|
|
8055
|
+
tokens.push(path7);
|
|
8056
|
+
path7 = "";
|
|
8058
8057
|
pathEscaped = false;
|
|
8059
8058
|
}
|
|
8060
8059
|
var partial = prev !== "" && next !== void 0 && next !== prev;
|
|
@@ -8072,8 +8071,8 @@ var require_path_to_regexp = __commonJS({
|
|
|
8072
8071
|
pattern: pattern ? escapeGroup(pattern) : "[^" + escapeString(delimiter2) + "]+?"
|
|
8073
8072
|
});
|
|
8074
8073
|
}
|
|
8075
|
-
if (
|
|
8076
|
-
tokens.push(
|
|
8074
|
+
if (path7 || index < str.length) {
|
|
8075
|
+
tokens.push(path7 + str.substr(index));
|
|
8077
8076
|
}
|
|
8078
8077
|
return tokens;
|
|
8079
8078
|
}
|
|
@@ -8088,12 +8087,12 @@ var require_path_to_regexp = __commonJS({
|
|
|
8088
8087
|
}
|
|
8089
8088
|
}
|
|
8090
8089
|
return function(data, options) {
|
|
8091
|
-
var
|
|
8090
|
+
var path7 = "";
|
|
8092
8091
|
var encode = options && options.encode || encodeURIComponent;
|
|
8093
8092
|
for (var i2 = 0; i2 < tokens.length; i2++) {
|
|
8094
8093
|
var token = tokens[i2];
|
|
8095
8094
|
if (typeof token === "string") {
|
|
8096
|
-
|
|
8095
|
+
path7 += token;
|
|
8097
8096
|
continue;
|
|
8098
8097
|
}
|
|
8099
8098
|
var value = data ? data[token.name] : void 0;
|
|
@@ -8112,7 +8111,7 @@ var require_path_to_regexp = __commonJS({
|
|
|
8112
8111
|
if (!matches[i2].test(segment)) {
|
|
8113
8112
|
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '"');
|
|
8114
8113
|
}
|
|
8115
|
-
|
|
8114
|
+
path7 += (j === 0 ? token.prefix : token.delimiter) + segment;
|
|
8116
8115
|
}
|
|
8117
8116
|
continue;
|
|
8118
8117
|
}
|
|
@@ -8121,17 +8120,17 @@ var require_path_to_regexp = __commonJS({
|
|
|
8121
8120
|
if (!matches[i2].test(segment)) {
|
|
8122
8121
|
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
|
|
8123
8122
|
}
|
|
8124
|
-
|
|
8123
|
+
path7 += token.prefix + segment;
|
|
8125
8124
|
continue;
|
|
8126
8125
|
}
|
|
8127
8126
|
if (token.optional) {
|
|
8128
8127
|
if (token.partial)
|
|
8129
|
-
|
|
8128
|
+
path7 += token.prefix;
|
|
8130
8129
|
continue;
|
|
8131
8130
|
}
|
|
8132
8131
|
throw new TypeError('Expected "' + token.name + '" to be ' + (token.repeat ? "an array" : "a string"));
|
|
8133
8132
|
}
|
|
8134
|
-
return
|
|
8133
|
+
return path7;
|
|
8135
8134
|
};
|
|
8136
8135
|
}
|
|
8137
8136
|
function escapeString(str) {
|
|
@@ -8143,10 +8142,10 @@ var require_path_to_regexp = __commonJS({
|
|
|
8143
8142
|
function flags(options) {
|
|
8144
8143
|
return options && options.sensitive ? "" : "i";
|
|
8145
8144
|
}
|
|
8146
|
-
function regexpToRegexp(
|
|
8145
|
+
function regexpToRegexp(path7, keys) {
|
|
8147
8146
|
if (!keys)
|
|
8148
|
-
return
|
|
8149
|
-
var groups =
|
|
8147
|
+
return path7;
|
|
8148
|
+
var groups = path7.source.match(/\((?!\?)/g);
|
|
8150
8149
|
if (groups) {
|
|
8151
8150
|
for (var i = 0; i < groups.length; i++) {
|
|
8152
8151
|
keys.push({
|
|
@@ -8160,17 +8159,17 @@ var require_path_to_regexp = __commonJS({
|
|
|
8160
8159
|
});
|
|
8161
8160
|
}
|
|
8162
8161
|
}
|
|
8163
|
-
return
|
|
8162
|
+
return path7;
|
|
8164
8163
|
}
|
|
8165
|
-
function arrayToRegexp(
|
|
8164
|
+
function arrayToRegexp(path7, keys, options) {
|
|
8166
8165
|
var parts = [];
|
|
8167
|
-
for (var i = 0; i <
|
|
8168
|
-
parts.push(pathToRegexp(
|
|
8166
|
+
for (var i = 0; i < path7.length; i++) {
|
|
8167
|
+
parts.push(pathToRegexp(path7[i], keys, options).source);
|
|
8169
8168
|
}
|
|
8170
8169
|
return new RegExp("(?:" + parts.join("|") + ")", flags(options));
|
|
8171
8170
|
}
|
|
8172
|
-
function stringToRegexp(
|
|
8173
|
-
return tokensToRegExp(parse2(
|
|
8171
|
+
function stringToRegexp(path7, keys, options) {
|
|
8172
|
+
return tokensToRegExp(parse2(path7, options), keys, options);
|
|
8174
8173
|
}
|
|
8175
8174
|
function tokensToRegExp(tokens, keys, options) {
|
|
8176
8175
|
options = options || {};
|
|
@@ -8214,21 +8213,21 @@ var require_path_to_regexp = __commonJS({
|
|
|
8214
8213
|
}
|
|
8215
8214
|
return new RegExp("^" + route, flags(options));
|
|
8216
8215
|
}
|
|
8217
|
-
function pathToRegexp(
|
|
8218
|
-
if (
|
|
8219
|
-
return regexpToRegexp(
|
|
8216
|
+
function pathToRegexp(path7, keys, options) {
|
|
8217
|
+
if (path7 instanceof RegExp) {
|
|
8218
|
+
return regexpToRegexp(path7, keys);
|
|
8220
8219
|
}
|
|
8221
|
-
if (Array.isArray(
|
|
8220
|
+
if (Array.isArray(path7)) {
|
|
8222
8221
|
return arrayToRegexp(
|
|
8223
8222
|
/** @type {!Array} */
|
|
8224
|
-
|
|
8223
|
+
path7,
|
|
8225
8224
|
keys,
|
|
8226
8225
|
options
|
|
8227
8226
|
);
|
|
8228
8227
|
}
|
|
8229
8228
|
return stringToRegexp(
|
|
8230
8229
|
/** @type {string} */
|
|
8231
|
-
|
|
8230
|
+
path7,
|
|
8232
8231
|
keys,
|
|
8233
8232
|
options
|
|
8234
8233
|
);
|
|
@@ -15393,11 +15392,11 @@ var require_mime_types2 = __commonJS({
|
|
|
15393
15392
|
}
|
|
15394
15393
|
return exts[0];
|
|
15395
15394
|
}
|
|
15396
|
-
function lookup(
|
|
15397
|
-
if (!
|
|
15395
|
+
function lookup(path7) {
|
|
15396
|
+
if (!path7 || typeof path7 !== "string") {
|
|
15398
15397
|
return false;
|
|
15399
15398
|
}
|
|
15400
|
-
var extension2 = extname2("x." +
|
|
15399
|
+
var extension2 = extname2("x." + path7).toLowerCase().substr(1);
|
|
15401
15400
|
if (!extension2) {
|
|
15402
15401
|
return false;
|
|
15403
15402
|
}
|
|
@@ -15595,7 +15594,7 @@ var require_content_disposition = __commonJS({
|
|
|
15595
15594
|
var require_path_is_inside = __commonJS({
|
|
15596
15595
|
"../../node_modules/.pnpm/path-is-inside@1.0.2/node_modules/path-is-inside/lib/path-is-inside.js"(exports2, module2) {
|
|
15597
15596
|
"use strict";
|
|
15598
|
-
var
|
|
15597
|
+
var path7 = __require("path");
|
|
15599
15598
|
module2.exports = function(thePath, potentialParent) {
|
|
15600
15599
|
thePath = stripTrailingSep(thePath);
|
|
15601
15600
|
potentialParent = stripTrailingSep(potentialParent);
|
|
@@ -15603,10 +15602,10 @@ var require_path_is_inside = __commonJS({
|
|
|
15603
15602
|
thePath = thePath.toLowerCase();
|
|
15604
15603
|
potentialParent = potentialParent.toLowerCase();
|
|
15605
15604
|
}
|
|
15606
|
-
return thePath.lastIndexOf(potentialParent, 0) === 0 && (thePath[potentialParent.length] ===
|
|
15605
|
+
return thePath.lastIndexOf(potentialParent, 0) === 0 && (thePath[potentialParent.length] === path7.sep || thePath[potentialParent.length] === void 0);
|
|
15607
15606
|
};
|
|
15608
15607
|
function stripTrailingSep(thePath) {
|
|
15609
|
-
if (thePath[thePath.length - 1] ===
|
|
15608
|
+
if (thePath[thePath.length - 1] === path7.sep) {
|
|
15610
15609
|
return thePath.slice(0, -1);
|
|
15611
15610
|
}
|
|
15612
15611
|
return thePath;
|
|
@@ -15782,7 +15781,7 @@ var require_error = __commonJS({
|
|
|
15782
15781
|
var require_src2 = __commonJS({
|
|
15783
15782
|
"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/index.js"(exports2, module2) {
|
|
15784
15783
|
var { promisify } = __require("util");
|
|
15785
|
-
var
|
|
15784
|
+
var path7 = __require("path");
|
|
15786
15785
|
var { createHash } = __require("crypto");
|
|
15787
15786
|
var { realpath, lstat, createReadStream, readdir } = __require("fs");
|
|
15788
15787
|
var url4 = require_urlparser();
|
|
@@ -15799,7 +15798,7 @@ var require_src2 = __commonJS({
|
|
|
15799
15798
|
var etags = /* @__PURE__ */ new Map();
|
|
15800
15799
|
var calculateSha = (handlers, absolutePath) => new Promise((resolve2, reject) => {
|
|
15801
15800
|
const hash = createHash("sha1");
|
|
15802
|
-
hash.update(
|
|
15801
|
+
hash.update(path7.extname(absolutePath));
|
|
15803
15802
|
hash.update("-");
|
|
15804
15803
|
const rs = handlers.createReadStream(absolutePath);
|
|
15805
15804
|
rs.on("error", reject);
|
|
@@ -15812,7 +15811,7 @@ var require_src2 = __commonJS({
|
|
|
15812
15811
|
var sourceMatches = (source, requestPath, allowSegments) => {
|
|
15813
15812
|
const keys = [];
|
|
15814
15813
|
const slashed = slasher(source);
|
|
15815
|
-
const resolvedPath =
|
|
15814
|
+
const resolvedPath = path7.posix.resolve(requestPath);
|
|
15816
15815
|
let results = null;
|
|
15817
15816
|
if (allowSegments) {
|
|
15818
15817
|
const normalized = slashed.replace("*", "(.*)");
|
|
@@ -15876,7 +15875,7 @@ var require_src2 = __commonJS({
|
|
|
15876
15875
|
cleanedUrl = true;
|
|
15877
15876
|
}
|
|
15878
15877
|
if (slashing) {
|
|
15879
|
-
const { ext, name } =
|
|
15878
|
+
const { ext, name } = path7.parse(decodedPath);
|
|
15880
15879
|
const isTrailed = decodedPath.endsWith("/");
|
|
15881
15880
|
const isDotfile = name.startsWith(".");
|
|
15882
15881
|
let target = null;
|
|
@@ -15922,8 +15921,8 @@ var require_src2 = __commonJS({
|
|
|
15922
15921
|
var getHeaders = async (handlers, config, current, absolutePath, stats) => {
|
|
15923
15922
|
const { headers: customHeaders = [], etag = false } = config;
|
|
15924
15923
|
const related = {};
|
|
15925
|
-
const { base } =
|
|
15926
|
-
const relativePath =
|
|
15924
|
+
const { base } = path7.parse(absolutePath);
|
|
15925
|
+
const relativePath = path7.relative(current, absolutePath);
|
|
15927
15926
|
if (customHeaders.length > 0) {
|
|
15928
15927
|
for (let index = 0; index < customHeaders.length; index++) {
|
|
15929
15928
|
const { source, headers: headers2 } = customHeaders[index];
|
|
@@ -15983,15 +15982,15 @@ var require_src2 = __commonJS({
|
|
|
15983
15982
|
return true;
|
|
15984
15983
|
};
|
|
15985
15984
|
var getPossiblePaths = (relativePath, extension) => [
|
|
15986
|
-
|
|
15985
|
+
path7.join(relativePath, `index${extension}`),
|
|
15987
15986
|
relativePath.endsWith("/") ? relativePath.replace(/\/$/g, extension) : relativePath + extension
|
|
15988
|
-
].filter((item) =>
|
|
15987
|
+
].filter((item) => path7.basename(item) !== extension);
|
|
15989
15988
|
var findRelated = async (current, relativePath, rewrittenPath, originalStat) => {
|
|
15990
15989
|
const possible = rewrittenPath ? [rewrittenPath] : getPossiblePaths(relativePath, ".html");
|
|
15991
15990
|
let stats = null;
|
|
15992
15991
|
for (let index = 0; index < possible.length; index++) {
|
|
15993
15992
|
const related = possible[index];
|
|
15994
|
-
const absolutePath =
|
|
15993
|
+
const absolutePath = path7.join(current, related);
|
|
15995
15994
|
try {
|
|
15996
15995
|
stats = await originalStat(absolutePath);
|
|
15997
15996
|
} catch (err) {
|
|
@@ -16036,15 +16035,15 @@ var require_src2 = __commonJS({
|
|
|
16036
16035
|
const canRenderSingle = renderSingle && files.length === 1;
|
|
16037
16036
|
for (let index = 0; index < files.length; index++) {
|
|
16038
16037
|
const file = files[index];
|
|
16039
|
-
const filePath =
|
|
16040
|
-
const details =
|
|
16038
|
+
const filePath = path7.resolve(absolutePath, file);
|
|
16039
|
+
const details = path7.parse(filePath);
|
|
16041
16040
|
let stats = null;
|
|
16042
16041
|
if (methods.lstat) {
|
|
16043
16042
|
stats = await handlers.lstat(filePath, true);
|
|
16044
16043
|
} else {
|
|
16045
16044
|
stats = await handlers.lstat(filePath);
|
|
16046
16045
|
}
|
|
16047
|
-
details.relative =
|
|
16046
|
+
details.relative = path7.join(relativePath, details.base);
|
|
16048
16047
|
if (stats.isDirectory()) {
|
|
16049
16048
|
details.base += slashSuffix;
|
|
16050
16049
|
details.relative += slashSuffix;
|
|
@@ -16071,9 +16070,9 @@ var require_src2 = __commonJS({
|
|
|
16071
16070
|
delete files[index];
|
|
16072
16071
|
}
|
|
16073
16072
|
}
|
|
16074
|
-
const toRoot =
|
|
16075
|
-
const directory =
|
|
16076
|
-
const pathParts = directory.split(
|
|
16073
|
+
const toRoot = path7.relative(current, absolutePath);
|
|
16074
|
+
const directory = path7.join(path7.basename(current), toRoot, slashSuffix);
|
|
16075
|
+
const pathParts = directory.split(path7.sep).filter(Boolean);
|
|
16077
16076
|
files = files.sort((a, b) => {
|
|
16078
16077
|
const aIsDir = a.type === "directory";
|
|
16079
16078
|
const bIsDir = b.type === "directory";
|
|
@@ -16090,7 +16089,7 @@ var require_src2 = __commonJS({
|
|
|
16090
16089
|
}).filter(Boolean);
|
|
16091
16090
|
if (toRoot.length > 0) {
|
|
16092
16091
|
const directoryPath = [...pathParts].slice(1);
|
|
16093
|
-
const relative3 =
|
|
16092
|
+
const relative3 = path7.join("/", ...directoryPath, "..", slashSuffix);
|
|
16094
16093
|
files.unshift({
|
|
16095
16094
|
type: "directory",
|
|
16096
16095
|
base: "..",
|
|
@@ -16139,7 +16138,7 @@ var require_src2 = __commonJS({
|
|
|
16139
16138
|
return;
|
|
16140
16139
|
}
|
|
16141
16140
|
let stats = null;
|
|
16142
|
-
const errorPage =
|
|
16141
|
+
const errorPage = path7.join(current, `${statusCode}.html`);
|
|
16143
16142
|
try {
|
|
16144
16143
|
stats = await handlers.lstat(errorPage);
|
|
16145
16144
|
} catch (err) {
|
|
@@ -16184,7 +16183,7 @@ var require_src2 = __commonJS({
|
|
|
16184
16183
|
}, methods);
|
|
16185
16184
|
module2.exports = async (request, response, config = {}, methods = {}) => {
|
|
16186
16185
|
const cwd = process.cwd();
|
|
16187
|
-
const current = config.public ?
|
|
16186
|
+
const current = config.public ? path7.resolve(cwd, config.public) : cwd;
|
|
16188
16187
|
const handlers = getHandlers(methods);
|
|
16189
16188
|
let relativePath = null;
|
|
16190
16189
|
let acceptsJSON = null;
|
|
@@ -16200,7 +16199,7 @@ var require_src2 = __commonJS({
|
|
|
16200
16199
|
message: "Bad Request"
|
|
16201
16200
|
});
|
|
16202
16201
|
}
|
|
16203
|
-
let absolutePath =
|
|
16202
|
+
let absolutePath = path7.join(current, relativePath);
|
|
16204
16203
|
if (!isPathInside(absolutePath, current)) {
|
|
16205
16204
|
return sendError(absolutePath, response, acceptsJSON, current, handlers, config, {
|
|
16206
16205
|
statusCode: 400,
|
|
@@ -16218,7 +16217,7 @@ var require_src2 = __commonJS({
|
|
|
16218
16217
|
return;
|
|
16219
16218
|
}
|
|
16220
16219
|
let stats = null;
|
|
16221
|
-
if (
|
|
16220
|
+
if (path7.extname(relativePath) !== "") {
|
|
16222
16221
|
try {
|
|
16223
16222
|
stats = await handlers.lstat(absolutePath);
|
|
16224
16223
|
} catch (err) {
|
|
@@ -16748,7 +16747,7 @@ var require_escape_html = __commonJS({
|
|
|
16748
16747
|
|
|
16749
16748
|
// src/commands/dev/index.ts
|
|
16750
16749
|
var import_chalk4 = __toESM(require_source(), 1);
|
|
16751
|
-
import
|
|
16750
|
+
import path6 from "path";
|
|
16752
16751
|
|
|
16753
16752
|
// src/commands/dev/dev.ts
|
|
16754
16753
|
var import_chalk3 = __toESM(require_source(), 1);
|
|
@@ -16776,7 +16775,7 @@ var import_get_port2 = __toESM(require_get_port(), 1);
|
|
|
16776
16775
|
var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
|
|
16777
16776
|
import { randomBytes as randomBytes2 } from "crypto";
|
|
16778
16777
|
import { watch } from "chokidar";
|
|
16779
|
-
import
|
|
16778
|
+
import path5, { isAbsolute, basename, dirname as dirname2, extname, join as join2 } from "path";
|
|
16780
16779
|
|
|
16781
16780
|
// src/util/dev/port-utils.ts
|
|
16782
16781
|
var import_is_port_reachable = __toESM(require_is_port_reachable(), 1);
|
|
@@ -17050,18 +17049,18 @@ function applyTransform(data, transform, isHeader) {
|
|
|
17050
17049
|
break;
|
|
17051
17050
|
}
|
|
17052
17051
|
}
|
|
17053
|
-
function isValidRequestPath(
|
|
17054
|
-
if (
|
|
17052
|
+
function isValidRequestPath(path7) {
|
|
17053
|
+
if (path7 === "" || path7.length > 2048) {
|
|
17055
17054
|
return false;
|
|
17056
17055
|
}
|
|
17057
|
-
if (
|
|
17056
|
+
if (path7[0] !== "/" || path7.startsWith("//")) {
|
|
17058
17057
|
return false;
|
|
17059
17058
|
}
|
|
17060
|
-
if (/[?#]/.test(
|
|
17059
|
+
if (/[?#]/.test(path7)) {
|
|
17061
17060
|
return false;
|
|
17062
17061
|
}
|
|
17063
|
-
for (let i = 0; i <
|
|
17064
|
-
const code =
|
|
17062
|
+
for (let i = 0; i < path7.length; i++) {
|
|
17063
|
+
const code = path7.charCodeAt(i);
|
|
17065
17064
|
if (code <= 32 || code === 127) {
|
|
17066
17065
|
return false;
|
|
17067
17066
|
}
|
|
@@ -17069,13 +17068,13 @@ function isValidRequestPath(path6) {
|
|
|
17069
17068
|
return true;
|
|
17070
17069
|
}
|
|
17071
17070
|
function getRequestPath(transforms) {
|
|
17072
|
-
let
|
|
17071
|
+
let path7;
|
|
17073
17072
|
for (const transform of transforms) {
|
|
17074
17073
|
if (transform.type === "request.path" && transform.op === "set" && typeof transform.args === "string" && isValidRequestPath(transform.args)) {
|
|
17075
|
-
|
|
17074
|
+
path7 = transform.args;
|
|
17076
17075
|
}
|
|
17077
17076
|
}
|
|
17078
|
-
return
|
|
17077
|
+
return path7;
|
|
17079
17078
|
}
|
|
17080
17079
|
function findMatchingKeys(data, keyPattern) {
|
|
17081
17080
|
const matched = [];
|
|
@@ -17693,18 +17692,18 @@ Please run \`${await getUpdateCommand()}\` to update to the latest CLI.`
|
|
|
17693
17692
|
const { output: buildOutput } = result;
|
|
17694
17693
|
const { cleanUrls } = vercelConfig;
|
|
17695
17694
|
for (const [originalPath, value] of Object.entries(buildOutput)) {
|
|
17696
|
-
let
|
|
17697
|
-
if (cleanUrls &&
|
|
17698
|
-
|
|
17695
|
+
let path7 = normalizePath2(originalPath);
|
|
17696
|
+
if (cleanUrls && path7.endsWith(".html")) {
|
|
17697
|
+
path7 = path7.slice(0, -5);
|
|
17699
17698
|
if (value.type === "FileBlob" || value.type === "FileFsRef") {
|
|
17700
17699
|
value.contentType = value.contentType || "text/html; charset=utf-8";
|
|
17701
17700
|
}
|
|
17702
17701
|
}
|
|
17703
|
-
const extensionless = devServer.getExtensionlessFile(
|
|
17702
|
+
const extensionless = devServer.getExtensionlessFile(path7);
|
|
17704
17703
|
if (extensionless) {
|
|
17705
|
-
|
|
17704
|
+
path7 = extensionless;
|
|
17706
17705
|
}
|
|
17707
|
-
buildOutput[
|
|
17706
|
+
buildOutput[path7] = value;
|
|
17708
17707
|
}
|
|
17709
17708
|
const deserializedOutput = await deserializeBuildOutputs(
|
|
17710
17709
|
buildOutput
|
|
@@ -17735,10 +17734,10 @@ Please run \`${await getUpdateCommand()}\` to update to the latest CLI.`
|
|
|
17735
17734
|
}
|
|
17736
17735
|
await Promise.all(
|
|
17737
17736
|
Object.entries(result.output).map(async (entry) => {
|
|
17738
|
-
const
|
|
17737
|
+
const path7 = entry[0];
|
|
17739
17738
|
const asset = entry[1];
|
|
17740
17739
|
if (asset.type === "Lambda" && asset.runtime !== "container") {
|
|
17741
|
-
const oldAsset = match.buildOutput && match.buildOutput[
|
|
17740
|
+
const oldAsset = match.buildOutput && match.buildOutput[path7];
|
|
17742
17741
|
if (oldAsset && oldAsset.type === "Lambda" && oldAsset.fn) {
|
|
17743
17742
|
await oldAsset.fn.destroy();
|
|
17744
17743
|
}
|
|
@@ -17804,7 +17803,7 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
|
|
|
17804
17803
|
if (buildConfig.config?.framework === "node" && !fileList.includes(src)) {
|
|
17805
17804
|
const originalSrc = src;
|
|
17806
17805
|
const existing = fileList.find(
|
|
17807
|
-
(
|
|
17806
|
+
(path7) => /^(?:src\/)?server\.[cm]?[jt]s$/.test(path7)
|
|
17808
17807
|
);
|
|
17809
17808
|
if (existing) {
|
|
17810
17809
|
src = existing;
|
|
@@ -18681,6 +18680,13 @@ var ServicesOrchestrator = class {
|
|
|
18681
18680
|
effectiveProcessEnv,
|
|
18682
18681
|
perServiceEnv
|
|
18683
18682
|
);
|
|
18683
|
+
if (this.hasQueueServices && service.runtime === "python" && env.VERCEL_HAS_WORKER_SERVICES === void 0) {
|
|
18684
|
+
env.VERCEL_HAS_WORKER_SERVICES = "1";
|
|
18685
|
+
}
|
|
18686
|
+
if (this.hasQueueServices) {
|
|
18687
|
+
env.VERCEL_QUEUE_BASE_URL = `${this.proxyOrigin}/_svc/_queues`;
|
|
18688
|
+
env.VERCEL_QUEUE_TOKEN = "vc-dev-token";
|
|
18689
|
+
}
|
|
18684
18690
|
const root = service.root || ".";
|
|
18685
18691
|
return {
|
|
18686
18692
|
rootPath: path3.join(this.cwd, root),
|
|
@@ -19387,6 +19393,7 @@ var QueueBroker = class {
|
|
|
19387
19393
|
};
|
|
19388
19394
|
|
|
19389
19395
|
// src/util/dev/dev-sidecars.ts
|
|
19396
|
+
import path4 from "path";
|
|
19390
19397
|
function toOrchestratorService(sidecar) {
|
|
19391
19398
|
const { type: _type, ...subscriber } = sidecar;
|
|
19392
19399
|
return {
|
|
@@ -19398,17 +19405,34 @@ function toOrchestratorService(sidecar) {
|
|
|
19398
19405
|
}
|
|
19399
19406
|
async function collectBuilderDevSidecars({
|
|
19400
19407
|
builds,
|
|
19401
|
-
workPath
|
|
19408
|
+
workPath,
|
|
19409
|
+
services = []
|
|
19402
19410
|
}) {
|
|
19403
19411
|
const builderSpecs = new Set(builds.map((build) => build.use));
|
|
19404
19412
|
const buildersWithPkgs = await importBuilders(builderSpecs, workPath);
|
|
19413
|
+
const servicesByBuilder = new Map(
|
|
19414
|
+
services.map((service) => [service.builder, service])
|
|
19415
|
+
);
|
|
19405
19416
|
const nestedSidecars = await Promise.all(
|
|
19406
|
-
builds.map((build) => {
|
|
19417
|
+
builds.map(async (build) => {
|
|
19407
19418
|
const builder = buildersWithPkgs.get(build.use)?.builder;
|
|
19408
19419
|
if (!builder) {
|
|
19409
19420
|
throw new Error(`Failed to load Builder "${build.use}"`);
|
|
19410
19421
|
}
|
|
19411
|
-
|
|
19422
|
+
const service = servicesByBuilder.get(build);
|
|
19423
|
+
const serviceRoot = service?.root ?? ".";
|
|
19424
|
+
const sidecars2 = await builder.getDevSidecars?.({
|
|
19425
|
+
workPath: path4.join(workPath, serviceRoot),
|
|
19426
|
+
build,
|
|
19427
|
+
...service ? { service } : {}
|
|
19428
|
+
}) ?? [];
|
|
19429
|
+
return service ? sidecars2.map((sidecar) => ({
|
|
19430
|
+
...sidecar,
|
|
19431
|
+
// Process names must be project-wide unique. Keep the consumer
|
|
19432
|
+
// name unchanged so local delivery matches the deployment build.
|
|
19433
|
+
name: `${service.name}-${sidecar.name}`,
|
|
19434
|
+
workspace: serviceRoot
|
|
19435
|
+
})) : sidecars2;
|
|
19412
19436
|
})
|
|
19413
19437
|
);
|
|
19414
19438
|
const sidecars = nestedSidecars.flat();
|
|
@@ -19537,11 +19561,15 @@ function replaceLocalhost(address) {
|
|
|
19537
19561
|
}
|
|
19538
19562
|
|
|
19539
19563
|
// src/util/dev/server.ts
|
|
19540
|
-
var frontendRuntimeSet = new Set(
|
|
19541
|
-
import_frameworks2.frameworkList.map((f) => f.useRuntime?.use || "@vercel/static-build")
|
|
19542
|
-
);
|
|
19543
19564
|
var DEV_SERVER_PORT_BIND_TIMEOUT = (0, import_ms4.default)("5m");
|
|
19544
19565
|
var DEV_QUEUES_DEFAULT_VISIBILITY_TIMEOUT_SECONDS = 60;
|
|
19566
|
+
var frameworkRuntimeSet = new Set(
|
|
19567
|
+
import_frameworks2.frameworkList.map((f) => f.useRuntime?.use || "@vercel/static-build")
|
|
19568
|
+
);
|
|
19569
|
+
function isApiDirBuild(build) {
|
|
19570
|
+
const src = build.src?.replace(/^\.\//, "");
|
|
19571
|
+
return typeof src === "string" && src.startsWith("api/");
|
|
19572
|
+
}
|
|
19545
19573
|
function sortBuilders(buildA, buildB) {
|
|
19546
19574
|
if (buildA && buildA.use && (0, import_fs_detectors3.isOfficialRuntime)("static-build", buildA.use)) {
|
|
19547
19575
|
return 1;
|
|
@@ -19562,13 +19590,20 @@ var DevServer = class {
|
|
|
19562
19590
|
constructor(cwd, options) {
|
|
19563
19591
|
this.initialDevCommandStarted = false;
|
|
19564
19592
|
this.responseTransformsByReq = /* @__PURE__ */ new WeakMap();
|
|
19593
|
+
this.shouldBuildInDev = (build) => {
|
|
19594
|
+
if (!this.shouldUseServicesOrchestrator() && isApiDirBuild(build)) {
|
|
19595
|
+
return true;
|
|
19596
|
+
}
|
|
19597
|
+
const { name } = (0, import_npm_package_arg.default)(build.use);
|
|
19598
|
+
return !frameworkRuntimeSet.has(name || "");
|
|
19599
|
+
};
|
|
19565
19600
|
this.clearVercelConfigPromise = () => {
|
|
19566
19601
|
this.getVercelConfigPromise = null;
|
|
19567
19602
|
};
|
|
19568
|
-
this.getExtensionlessFile = (
|
|
19569
|
-
const ext = extname(
|
|
19570
|
-
if (this.apiDir &&
|
|
19571
|
-
return
|
|
19603
|
+
this.getExtensionlessFile = (path7) => {
|
|
19604
|
+
const ext = extname(path7);
|
|
19605
|
+
if (this.apiDir && path7.startsWith(this.apiDir + "/") && this.apiExtensions.has(ext)) {
|
|
19606
|
+
return path7.slice(0, -ext.length);
|
|
19572
19607
|
}
|
|
19573
19608
|
return null;
|
|
19574
19609
|
};
|
|
@@ -20430,12 +20465,12 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20430
20465
|
search: origUrl.search
|
|
20431
20466
|
});
|
|
20432
20467
|
applyRequestTransforms(req, requestTransforms);
|
|
20433
|
-
const
|
|
20468
|
+
const path7 = req.url || "/";
|
|
20434
20469
|
const body = await (0, import_raw_body.default)(req);
|
|
20435
20470
|
const payload = {
|
|
20436
20471
|
method: req.method || "GET",
|
|
20437
20472
|
host: req.headers.host,
|
|
20438
|
-
path:
|
|
20473
|
+
path: path7,
|
|
20439
20474
|
headers: {
|
|
20440
20475
|
...req.headers,
|
|
20441
20476
|
...this.getProxyHeaders(req, requestId, true)
|
|
@@ -20443,7 +20478,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20443
20478
|
encoding: "base64",
|
|
20444
20479
|
body: body.toString("base64")
|
|
20445
20480
|
};
|
|
20446
|
-
debug(`Invoking lambda: "${assetKey}" with ${
|
|
20481
|
+
debug(`Invoking lambda: "${assetKey}" with ${path7}`);
|
|
20447
20482
|
let result;
|
|
20448
20483
|
try {
|
|
20449
20484
|
result = await asset.fn({
|
|
@@ -20536,7 +20571,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20536
20571
|
this.watchAggregationId = null;
|
|
20537
20572
|
this.watchAggregationEvents = [];
|
|
20538
20573
|
this.watchAggregationTimeout = 500;
|
|
20539
|
-
this.filter = (
|
|
20574
|
+
this.filter = (path7) => Boolean(path7);
|
|
20540
20575
|
this.podId = Math.random().toString(32).slice(-5);
|
|
20541
20576
|
this.shutdownCallbacks = /* @__PURE__ */ new Map();
|
|
20542
20577
|
}
|
|
@@ -20616,8 +20651,8 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20616
20651
|
await this.stop(code);
|
|
20617
20652
|
process.exit(code);
|
|
20618
20653
|
}
|
|
20619
|
-
enqueueFsEvent(type,
|
|
20620
|
-
this.watchAggregationEvents.push({ type, path:
|
|
20654
|
+
enqueueFsEvent(type, path7) {
|
|
20655
|
+
this.watchAggregationEvents.push({ type, path: path7 });
|
|
20621
20656
|
if (this.watchAggregationId === null) {
|
|
20622
20657
|
this.watchAggregationId = setTimeout(() => {
|
|
20623
20658
|
const events = this.watchAggregationEvents.slice();
|
|
@@ -20874,7 +20909,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20874
20909
|
return void 0;
|
|
20875
20910
|
}
|
|
20876
20911
|
async _getVercelConfig() {
|
|
20877
|
-
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-
|
|
20912
|
+
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-RPPL7W56.js");
|
|
20878
20913
|
await compileVercelConfig(this.cwd);
|
|
20879
20914
|
const configPath = getLocalPathConfig(this.cwd);
|
|
20880
20915
|
const [
|
|
@@ -20897,6 +20932,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20897
20932
|
await this.exit();
|
|
20898
20933
|
}
|
|
20899
20934
|
vercelConfig.routes = maybeRoutes || [];
|
|
20935
|
+
const hasServices = (this.services?.length ?? 0) > 0;
|
|
20900
20936
|
const hasResolvedServices = !!this.services && this.services.length > 0;
|
|
20901
20937
|
if (!vercelConfig.experimentalServices && !hasResolvedServices && (!vercelConfig.builds || vercelConfig.builds.length === 0)) {
|
|
20902
20938
|
const featHandleMiss = true;
|
|
@@ -20965,14 +21001,16 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20965
21001
|
vercelConfig.routes = routes;
|
|
20966
21002
|
}
|
|
20967
21003
|
if (this.sidecars === void 0) {
|
|
20968
|
-
|
|
20969
|
-
|
|
20970
|
-
|
|
21004
|
+
const services = (this.services ?? []).filter(import_fs_detectors3.isExperimentalServiceV2);
|
|
21005
|
+
this.sidecars = await collectBuilderDevSidecars({
|
|
21006
|
+
builds: this.shouldUseServicesOrchestrator() ? services.map((service) => service.builder) : vercelConfig.builds ?? [],
|
|
21007
|
+
workPath: this.cwd,
|
|
21008
|
+
services
|
|
20971
21009
|
});
|
|
20972
21010
|
}
|
|
20973
21011
|
if (Array.isArray(vercelConfig.builds)) {
|
|
20974
|
-
if (this.devCommand ||
|
|
20975
|
-
vercelConfig.builds = vercelConfig.builds.filter(
|
|
21012
|
+
if (this.devCommand || hasServices) {
|
|
21013
|
+
vercelConfig.builds = vercelConfig.builds.filter(this.shouldBuildInDev);
|
|
20976
21014
|
}
|
|
20977
21015
|
vercelConfig.builds.sort(sortBuilders);
|
|
20978
21016
|
}
|
|
@@ -21042,7 +21080,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21042
21080
|
async readJsonFile(filePath) {
|
|
21043
21081
|
let rel, abs;
|
|
21044
21082
|
if (isAbsolute(filePath)) {
|
|
21045
|
-
rel =
|
|
21083
|
+
rel = path5.relative(this.cwd, filePath);
|
|
21046
21084
|
abs = filePath;
|
|
21047
21085
|
} else {
|
|
21048
21086
|
rel = filePath;
|
|
@@ -21189,8 +21227,12 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21189
21227
|
});
|
|
21190
21228
|
};
|
|
21191
21229
|
if (this.shouldUseServicesOrchestrator()) {
|
|
21230
|
+
const orchestratorServices = [
|
|
21231
|
+
...this.services || [],
|
|
21232
|
+
...(this.sidecars || []).map(toOrchestratorService)
|
|
21233
|
+
];
|
|
21192
21234
|
this.orchestrator = new ServicesOrchestrator({
|
|
21193
|
-
services:
|
|
21235
|
+
services: orchestratorServices,
|
|
21194
21236
|
cwd: this.cwd,
|
|
21195
21237
|
repoRoot: this.repoRoot,
|
|
21196
21238
|
env: this.envConfigs.allEnv,
|
|
@@ -21199,7 +21241,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21199
21241
|
});
|
|
21200
21242
|
devCommandPromise = this.orchestrator.startAll();
|
|
21201
21243
|
this.devProcessOrigin = void 0;
|
|
21202
|
-
const queueServices =
|
|
21244
|
+
const queueServices = orchestratorServices.filter(import_fs_detectors3.isExperimentalService).filter(isQueueBackedService3);
|
|
21203
21245
|
if (queueServices.length > 0) {
|
|
21204
21246
|
this.queueBroker = new QueueBroker(
|
|
21205
21247
|
queueServices,
|
|
@@ -21230,10 +21272,10 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21230
21272
|
const files = await staticFiles(this.cwd, {});
|
|
21231
21273
|
this.files = {};
|
|
21232
21274
|
for (const fsPath of files) {
|
|
21233
|
-
const
|
|
21275
|
+
const path7 = relative2(this.cwd, fsPath);
|
|
21234
21276
|
const { mode } = await import_fs_extra.default.stat(fsPath);
|
|
21235
|
-
this.files[
|
|
21236
|
-
const extensionless = this.getExtensionlessFile(
|
|
21277
|
+
this.files[path7] = new FileFsRef2({ mode, fsPath });
|
|
21278
|
+
const extensionless = this.getExtensionlessFile(path7);
|
|
21237
21279
|
if (extensionless) {
|
|
21238
21280
|
this.files[extensionless] = new FileFsRef2({ mode, fsPath });
|
|
21239
21281
|
}
|
|
@@ -21255,19 +21297,19 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21255
21297
|
}
|
|
21256
21298
|
await import_fs_extra.default.mkdirp(this.devCacheDir);
|
|
21257
21299
|
this.watcher = watch(this.cwd, {
|
|
21258
|
-
ignored: (
|
|
21300
|
+
ignored: (path7) => !this.filter(path7),
|
|
21259
21301
|
ignoreInitial: true,
|
|
21260
21302
|
usePolling: false,
|
|
21261
21303
|
persistent: true
|
|
21262
21304
|
});
|
|
21263
|
-
this.watcher.on("add", (
|
|
21264
|
-
this.enqueueFsEvent("add",
|
|
21305
|
+
this.watcher.on("add", (path7) => {
|
|
21306
|
+
this.enqueueFsEvent("add", path7);
|
|
21265
21307
|
});
|
|
21266
|
-
this.watcher.on("change", (
|
|
21267
|
-
this.enqueueFsEvent("change",
|
|
21308
|
+
this.watcher.on("change", (path7) => {
|
|
21309
|
+
this.enqueueFsEvent("change", path7);
|
|
21268
21310
|
});
|
|
21269
|
-
this.watcher.on("unlink", (
|
|
21270
|
-
this.enqueueFsEvent("unlink",
|
|
21311
|
+
this.watcher.on("unlink", (path7) => {
|
|
21312
|
+
this.enqueueFsEvent("unlink", path7);
|
|
21271
21313
|
});
|
|
21272
21314
|
this.watcher.on("error", (err) => {
|
|
21273
21315
|
output_manager_default.error(`Watcher error: ${err}`);
|
|
@@ -21841,8 +21883,8 @@ ${error_code}
|
|
|
21841
21883
|
}
|
|
21842
21884
|
);
|
|
21843
21885
|
const nodeBinPaths = getNodeBinPaths2({ base: this.repoRoot, start: cwd });
|
|
21844
|
-
const nodeBinPath = nodeBinPaths.join(
|
|
21845
|
-
env.PATH = `${nodeBinPath}${
|
|
21886
|
+
const nodeBinPath = nodeBinPaths.join(path5.delimiter);
|
|
21887
|
+
env.PATH = `${nodeBinPath}${path5.delimiter}${env.PATH}`;
|
|
21846
21888
|
const command = devCommand2.replace(/\$PORT/g, `${port}`).replace(/%PORT%/g, `${port}`);
|
|
21847
21889
|
injectNextDevWebSocketShimIfNeeded(env, command, this.projectSettings);
|
|
21848
21890
|
output_manager_default.debug(
|
|
@@ -22041,16 +22083,16 @@ function findAsset(match, requestPath, vercelConfig) {
|
|
|
22041
22083
|
return { asset, assetKey };
|
|
22042
22084
|
}
|
|
22043
22085
|
}
|
|
22044
|
-
function dirnameWithoutDot(
|
|
22045
|
-
let dir = dirname2(
|
|
22086
|
+
function dirnameWithoutDot(path7) {
|
|
22087
|
+
let dir = dirname2(path7);
|
|
22046
22088
|
if (dir === ".") {
|
|
22047
22089
|
dir = "";
|
|
22048
22090
|
}
|
|
22049
22091
|
return dir;
|
|
22050
22092
|
}
|
|
22051
|
-
function isIndex(
|
|
22052
|
-
const ext = extname(
|
|
22053
|
-
const name = basename(
|
|
22093
|
+
function isIndex(path7) {
|
|
22094
|
+
const ext = extname(path7);
|
|
22095
|
+
const name = basename(path7, ext);
|
|
22054
22096
|
return name === "index";
|
|
22055
22097
|
}
|
|
22056
22098
|
function minimatches(files, pattern) {
|
|
@@ -22071,10 +22113,6 @@ function needsBlockingBuild(buildMatch) {
|
|
|
22071
22113
|
const { builder } = buildMatch.builderWithPkg;
|
|
22072
22114
|
return typeof builder.shouldServe !== "function";
|
|
22073
22115
|
}
|
|
22074
|
-
function filterFrontendBuilds(build) {
|
|
22075
|
-
const { name } = (0, import_npm_package_arg.default)(build.use);
|
|
22076
|
-
return !frontendRuntimeSet.has(name || "");
|
|
22077
|
-
}
|
|
22078
22116
|
function hasNewRoutingProperties(vercelConfig) {
|
|
22079
22117
|
return typeof vercelConfig.cleanUrls !== void 0 || typeof vercelConfig.headers !== void 0 || typeof vercelConfig.redirects !== void 0 || typeof vercelConfig.rewrites !== void 0 || typeof vercelConfig.trailingSlash !== void 0;
|
|
22080
22118
|
}
|
|
@@ -22291,12 +22329,12 @@ async function dev(client, opts, args2, telemetry) {
|
|
|
22291
22329
|
const listen2 = parseListen(opts["--listen"] || "3000");
|
|
22292
22330
|
cwd = await resolveProjectCwd(cwd);
|
|
22293
22331
|
const projectNameOrId = opts["--project"];
|
|
22294
|
-
let link = await getLinkedProject(
|
|
22295
|
-
client,
|
|
22332
|
+
let link = await getLinkedProject(client, {
|
|
22296
22333
|
cwd,
|
|
22297
|
-
projectNameOrId,
|
|
22298
|
-
|
|
22299
|
-
|
|
22334
|
+
projectName: projectNameOrId,
|
|
22335
|
+
projectNameIsExplicit: Boolean(projectNameOrId),
|
|
22336
|
+
scopeIsExplicit: detectExplicitScope(client)
|
|
22337
|
+
});
|
|
22300
22338
|
if (link.status === "not_linked" && !process.env.__VERCEL_SKIP_DEV_CMD) {
|
|
22301
22339
|
if (opts["--local"]) {
|
|
22302
22340
|
output_manager_default.warn(
|
|
@@ -22307,7 +22345,12 @@ async function dev(client, opts, args2, telemetry) {
|
|
|
22307
22345
|
To link your project, run ${getCommandName("dev")} without \`-L\` or \`--local\` or ${getCommandName("link")}.`
|
|
22308
22346
|
);
|
|
22309
22347
|
} else if (projectNameOrId) {
|
|
22310
|
-
await printProjectNotFoundError(
|
|
22348
|
+
await printProjectNotFoundError(
|
|
22349
|
+
client,
|
|
22350
|
+
projectNameOrId,
|
|
22351
|
+
"dev",
|
|
22352
|
+
link.orgId
|
|
22353
|
+
);
|
|
22311
22354
|
return 1;
|
|
22312
22355
|
} else {
|
|
22313
22356
|
link = await setupAndLink(client, cwd, {
|
|
@@ -22619,7 +22662,7 @@ async function main(client) {
|
|
|
22619
22662
|
}
|
|
22620
22663
|
const hasBuilds = vercelConfig && "builds" in vercelConfig && vercelConfig.builds && vercelConfig.builds.length > 0;
|
|
22621
22664
|
if (!vercelConfig || !hasBuilds) {
|
|
22622
|
-
const pkg = await readJSONFile(
|
|
22665
|
+
const pkg = await readJSONFile(path6.join(dir, "package.json"));
|
|
22623
22666
|
if (pkg instanceof CantParseJSONFile) {
|
|
22624
22667
|
output_manager_default.error(pkg.message);
|
|
22625
22668
|
return 1;
|