vercel 59.4.0 → 59.6.2
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-FQMB3XPM.js → add-4GQZ22ZN.js} +20 -16
- package/dist/chunks/{add-73X2SKBH.js → add-HJSEM4YJ.js} +17 -13
- package/dist/chunks/{add-QJ3WT4FW.js → add-SIGUSM3Y.js} +21 -17
- package/dist/chunks/{build-YUYCLCXD.js → build-XOMJDX4M.js} +18 -15
- package/dist/chunks/{chunk-F7OXZLY2.js → chunk-26XDDLXM.js} +2 -2
- package/dist/chunks/{chunk-VCE6QKFE.js → chunk-2O5J3KMT.js} +4 -4
- package/dist/chunks/{chunk-XI6NJLI4.js → chunk-2YRAWYGE.js} +3 -3
- package/dist/chunks/{chunk-X6O6XJEA.js → chunk-37V5P4VO.js} +16 -14
- package/dist/chunks/{chunk-EB7NJKPL.js → chunk-3F5EGINT.js} +3 -3
- package/dist/chunks/{chunk-RIB4S2IB.js → chunk-3HZLXCVL.js} +1 -1
- package/dist/chunks/{chunk-KQRVZWJU.js → chunk-3T7WSWZH.js} +1 -1
- package/dist/chunks/{chunk-3KNPVXJ3.js → chunk-4KD5BYHB.js} +1 -1
- package/dist/chunks/{chunk-XLKFJPMT.js → chunk-57RHXXXG.js} +1 -1
- package/dist/chunks/chunk-5GGUB4EO.js +31 -0
- package/dist/chunks/{chunk-R6IGDGX3.js → chunk-5XECIWME.js} +1 -1
- package/dist/chunks/{chunk-KAYSW4CJ.js → chunk-6JPVTPTU.js} +3 -3
- package/dist/chunks/{chunk-ZFWNMVNR.js → chunk-6M2KZUED.js} +19 -8
- package/dist/chunks/{chunk-HT2XWSAJ.js → chunk-7AEEQOD4.js} +2 -29
- package/dist/chunks/{chunk-HURL5EBN.js → chunk-7HE63HCR.js} +124 -161
- package/dist/chunks/chunk-7Q45OKWR.js +149 -0
- package/dist/chunks/{chunk-RI7KKKII.js → chunk-7R6M3BHM.js} +4 -18
- package/dist/chunks/{chunk-XBN2O34P.js → chunk-7ST552E3.js} +17 -4
- package/dist/chunks/{chunk-JKQWQA2T.js → chunk-AINIBIP4.js} +1 -1
- package/dist/chunks/{chunk-CV4S27SS.js → chunk-ASBP32T6.js} +1 -1
- package/dist/chunks/chunk-AYLY3ZVL.js +104 -0
- package/dist/chunks/{chunk-SOFC4MLS.js → chunk-BMKU5KEL.js} +9 -569
- package/dist/chunks/{chunk-KDYRLN6H.js → chunk-C5HKWXRR.js} +1 -1
- package/dist/chunks/{chunk-2MF3ZAVW.js → chunk-CJV7J7B5.js} +6 -6
- package/dist/chunks/{chunk-HJVTLJHO.js → chunk-DE7MBNHQ.js} +6 -6
- package/dist/chunks/{chunk-3L2YLLHC.js → chunk-DWIC7MRV.js} +2 -2
- package/dist/chunks/{chunk-GFCTRJI5.js → chunk-EZKW5YJ2.js} +1 -1
- package/dist/chunks/{chunk-MWYQ24FO.js → chunk-FRAXI2WT.js} +3 -3
- package/dist/chunks/{chunk-DDIZGOCK.js → chunk-FRZULOVH.js} +8 -6
- package/dist/chunks/{chunk-Y3J4VU2H.js → chunk-FWKSJYDV.js} +2 -2
- package/dist/chunks/chunk-FXD67VN5.js +467 -0
- package/dist/chunks/{chunk-EB5NBVTV.js → chunk-GISTGGBO.js} +8 -8
- package/dist/chunks/chunk-GY5I4AYD.js +122 -0
- package/dist/chunks/{chunk-PD4DYNSB.js → chunk-GZQQNLF5.js} +5 -5
- package/dist/chunks/{chunk-PIMIKY4X.js → chunk-IJ4X426J.js} +1 -1
- package/dist/chunks/{chunk-KSZ4MNHO.js → chunk-JH4WQRIU.js} +2 -2
- package/dist/chunks/{chunk-TVXCXIRO.js → chunk-L3UXB2CW.js} +1 -1
- package/dist/chunks/{chunk-O5DLWLT7.js → chunk-LXZVOR6F.js} +9 -9
- package/dist/chunks/{chunk-EG5BSAXD.js → chunk-MTWHQEXI.js} +1 -1
- package/dist/chunks/{chunk-WC7IINFV.js → chunk-NFU4XJIR.js} +1 -1
- package/dist/chunks/{chunk-TH2XUVDP.js → chunk-NGGLYKNU.js} +30 -6
- package/dist/chunks/{chunk-2PX6N4FE.js → chunk-NGNN6WF2.js} +10 -10
- package/dist/chunks/{chunk-GGPE5377.js → chunk-O26N2UPI.js} +1 -1
- package/dist/chunks/chunk-O75LSD3C.js +34 -0
- package/dist/chunks/{chunk-BBSS3XIW.js → chunk-OQ3C5VXZ.js} +1 -1
- package/dist/chunks/{chunk-M22O6CYY.js → chunk-POOO7W47.js} +1 -1
- package/dist/chunks/{chunk-LKTQR5JE.js → chunk-PRH6KRUT.js} +2 -2
- package/dist/chunks/chunk-Q2DGFCO7.js +579 -0
- package/dist/chunks/{chunk-OX7KI3LF.js → chunk-QFAS4OVW.js} +18 -0
- package/dist/chunks/{chunk-CHEZBD7H.js → chunk-R5PULMHT.js} +3 -3
- package/dist/chunks/{chunk-VAFU7DXZ.js → chunk-RKDCNQ4S.js} +1 -91
- package/dist/chunks/{chunk-BLYBHFIE.js → chunk-SF3AYAIF.js} +61 -24
- package/dist/chunks/{chunk-GMWRTZVZ.js → chunk-SLPSPYVR.js} +1 -1
- package/dist/chunks/{chunk-J5Y2QGGU.js → chunk-SWI6F4X3.js} +2 -2
- package/dist/chunks/chunk-V3MDDR2X.js +249 -0
- package/dist/chunks/{chunk-HMJVUXE6.js → chunk-VJ5NAOWB.js} +867 -625
- package/dist/chunks/{chunk-O5GNPPTU.js → chunk-VP5Y3SZG.js} +1 -1
- package/dist/chunks/{chunk-G75NFPIT.js → chunk-WNAKOXGK.js} +1 -1
- package/dist/chunks/{chunk-NP6BQPCN.js → chunk-WZ2S3A2A.js} +8 -6
- package/dist/chunks/{chunk-7QVJTI5H.js → chunk-XDGOOW3K.js} +1 -1
- package/dist/chunks/{chunk-UMA66MKW.js → chunk-XM3LOQIX.js} +1 -1
- package/dist/chunks/{chunk-CYNB6LL4.js → chunk-XNFHNTS2.js} +1 -1
- package/dist/chunks/{chunk-VDJN4WKH.js → chunk-XRWOTCDO.js} +1 -1
- package/dist/chunks/{chunk-UV2ZMFVG.js → chunk-YJKZQEHS.js} +2 -2
- package/dist/chunks/{chunk-STPH4Y62.js → chunk-YJUO3EKH.js} +1 -1
- package/dist/chunks/{chunk-Y42SPI2H.js → chunk-ZNMTDLYH.js} +6 -6
- package/dist/chunks/{chunk-VLPLCJZC.js → chunk-ZSFEACZU.js} +1 -1
- package/dist/chunks/{clear-USQM5VW5.js → clear-BWT2FJY4.js} +17 -13
- package/dist/chunks/{compile-vercel-config-2JNYMI6W.js → compile-vercel-config-DGM4NISW.js} +10 -7
- package/dist/chunks/{config-VTRIDLY4.js → config-NJAN3RMU.js} +20 -16
- package/dist/chunks/config-RSE6Z4LB.js +122 -0
- package/dist/chunks/{constants-YMCRE6IG.js → constants-WEQVJSYS.js} +1 -1
- package/dist/chunks/{delete-ILLSBCVQ.js → delete-LROBRBAH.js} +15 -11
- package/dist/chunks/{delete-VTPHK3EB.js → delete-SSL2PK2F.js} +12 -9
- package/dist/chunks/{disable-VTOMO64V.js → disable-ASG5JDZR.js} +12 -9
- package/dist/chunks/{discard-ZIOZ34ZI.js → discard-PV47B6IL.js} +12 -9
- package/dist/chunks/{edit-E3AMR4KM.js → edit-5ATYIOLX.js} +14 -11
- package/dist/chunks/{edit-JMZ5XWVW.js → edit-REI7HXGG.js} +16 -12
- package/dist/chunks/{enable-A4PMZ7QZ.js → enable-LZXL7XAG.js} +12 -9
- package/dist/chunks/{exec-CNBOV577.js → exec-XH4K34JM.js} +3 -3
- package/dist/chunks/{export-Y6AJ3WRZ.js → export-ZAZFQU2E.js} +12 -9
- package/dist/chunks/{image-26BKPAUB.js → image-QPHN5V7L.js} +7 -6
- package/dist/chunks/{import-builders-3H7J2SEK.js → import-builders-W3YE2V6A.js} +12 -9
- package/dist/chunks/{inspect-7DGKYHKW.js → inspect-BFGK72WY.js} +18 -14
- package/dist/chunks/{inspect-OEY4DJRI.js → inspect-FRXJRM6T.js} +18 -14
- package/dist/chunks/{inspect-ZW5N6O5P.js → inspect-RDMC2Z3Q.js} +17 -13
- package/dist/chunks/{inspect-GJFVAZIJ.js → inspect-SJEZVGPK.js} +20 -16
- package/dist/chunks/{inspect-N3E2PO6K.js → inspect-SSOM3FXS.js} +17 -13
- package/dist/chunks/{list-MIQ5D6PM.js → list-2HTR7Q3J.js} +18 -14
- package/dist/chunks/{list-2VTCNQEB.js → list-PHDUZVMR.js} +15 -11
- package/dist/chunks/{list-DTJBW7OQ.js → list-W33GXKDA.js} +18 -14
- package/dist/chunks/{login-L34UHAU5.js → login-JWAFHVDG.js} +30 -17
- package/dist/chunks/{ls-OBUDC4SB.js → ls-3AN2DZHN.js} +20 -15
- package/dist/chunks/{ls-SXJFBLUT.js → ls-3MH2OCP3.js} +20 -15
- package/dist/chunks/ls-D2POUHI7.js +176 -0
- package/dist/chunks/{ls-VDYUFSSC.js → ls-KDFU224B.js} +20 -15
- package/dist/chunks/{ls-OKO4IHWB.js → ls-KX2VBOGV.js} +18 -14
- package/dist/chunks/{ls-NCPQY4FV.js → ls-RWKNJQNT.js} +23 -18
- package/dist/chunks/{open-V5JDGXUP.js → open-IEYRB6RL.js} +15 -11
- package/dist/chunks/{permissions-6CPRPPBY.js → permissions-ZWZUMEHR.js} +10 -9
- package/dist/chunks/{publish-R27DPHFO.js → publish-UWZYBDHK.js} +12 -9
- package/dist/chunks/{push-VLVTBS42.js → push-IAEQ3FBF.js} +18 -15
- package/dist/chunks/{query-IVVRYMJN.js → query-NNOZYSED.js} +18 -14
- package/dist/chunks/{reorder-LJ2RBZM2.js → reorder-TKBM244W.js} +12 -9
- package/dist/chunks/{reply-USAISZYC.js → reply-FLBSBMTW.js} +16 -12
- package/dist/chunks/{resolve-CRCJYVS5.js → resolve-GJYPMWUE.js} +15 -11
- package/dist/chunks/{restore-6PBPEAMU.js → restore-PNI3TM3U.js} +12 -9
- package/dist/chunks/{rm-HHELZB7R.js → rm-76CSSSSV.js} +17 -13
- package/dist/chunks/{rm-TWU3JR6Z.js → rm-FN7LTIIL.js} +17 -13
- package/dist/chunks/{rm-KGOEOWVK.js → rm-FTE33UHE.js} +16 -12
- package/dist/chunks/rm-FXA5DLXQ.js +315 -0
- package/dist/chunks/{rm-EOD7RDSO.js → rm-PGJ4KR6U.js} +20 -16
- package/dist/chunks/{routes-SZI2G4SE.js → routes-2OLIBRYX.js} +3 -3
- package/dist/chunks/{rule-inspect-WFTVRK6B.js → rule-inspect-LJIGPTWS.js} +18 -14
- package/dist/chunks/{rules-AQYTFJI6.js → rules-6BMNO6M5.js} +11 -10
- package/dist/chunks/{schema-LUVFYPWN.js → schema-45SJNY5L.js} +9 -7
- package/dist/chunks/{schema-ZCDCJC7E.js → schema-HATXEQDP.js} +14 -11
- package/dist/chunks/set-C3UQUQ42.js +243 -0
- package/dist/chunks/{tags-RCNRFX7U.js → tags-BTVDROFG.js} +6 -5
- package/dist/chunks/{types-AJHILHO5.js → types-JGANJ5EQ.js} +12 -8
- package/dist/chunks/{update-I7QGAOYF.js → update-B6PSOHUW.js} +19 -15
- package/dist/commands/build/builder-worker.cjs +281 -0
- package/dist/commands/build/index.js +695 -236
- package/dist/commands/deploy/index.js +131 -50
- package/dist/commands/dev/index.js +677 -144
- package/dist/commands/env/index.js +1199 -565
- package/dist/commands/link/index.js +27 -22
- package/dist/commands/list/index.js +21 -14
- package/dist/commands-bulk.js +2051 -1019
- package/dist/help.js +1 -1
- package/dist/index.js +39 -33
- package/dist/version.mjs +1 -1
- package/package.json +48 -48
|
@@ -9,36 +9,36 @@ import {
|
|
|
9
9
|
} from "../../chunks/chunk-2HSQ7YUK.js";
|
|
10
10
|
import {
|
|
11
11
|
getUpdateCommand
|
|
12
|
-
} from "../../chunks/chunk-
|
|
12
|
+
} from "../../chunks/chunk-3F5EGINT.js";
|
|
13
13
|
import {
|
|
14
14
|
getGlobalPathConfig,
|
|
15
15
|
highlight
|
|
16
|
-
} from "../../chunks/chunk-
|
|
16
|
+
} from "../../chunks/chunk-AINIBIP4.js";
|
|
17
17
|
import {
|
|
18
18
|
getSubcommand
|
|
19
19
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
20
20
|
import {
|
|
21
21
|
devCommand
|
|
22
|
-
} from "../../chunks/chunk-
|
|
22
|
+
} from "../../chunks/chunk-XDGOOW3K.js";
|
|
23
23
|
import {
|
|
24
24
|
import_write_build_result,
|
|
25
25
|
require_detect_builders_with_services,
|
|
26
26
|
require_get_files,
|
|
27
27
|
require_mime_types,
|
|
28
28
|
require_service_schedules
|
|
29
|
-
} from "../../chunks/chunk-
|
|
29
|
+
} from "../../chunks/chunk-SWI6F4X3.js";
|
|
30
30
|
import {
|
|
31
31
|
importBuilders,
|
|
32
32
|
require_npa
|
|
33
|
-
} from "../../chunks/chunk-
|
|
33
|
+
} from "../../chunks/chunk-WZ2S3A2A.js";
|
|
34
34
|
import "../../chunks/chunk-IB5L4LKZ.js";
|
|
35
35
|
import {
|
|
36
36
|
pickOverrides
|
|
37
|
-
} from "../../chunks/chunk-
|
|
38
|
-
import "../../chunks/chunk-
|
|
37
|
+
} from "../../chunks/chunk-JH4WQRIU.js";
|
|
38
|
+
import "../../chunks/chunk-5XECIWME.js";
|
|
39
39
|
import {
|
|
40
40
|
help
|
|
41
|
-
} from "../../chunks/chunk-
|
|
41
|
+
} from "../../chunks/chunk-2YRAWYGE.js";
|
|
42
42
|
import {
|
|
43
43
|
VERCEL_DIR,
|
|
44
44
|
VERCEL_OIDC_TOKEN,
|
|
@@ -69,36 +69,40 @@ import {
|
|
|
69
69
|
setupAndLink,
|
|
70
70
|
tryDetectServices,
|
|
71
71
|
validateConfig
|
|
72
|
-
} from "../../chunks/chunk-
|
|
72
|
+
} from "../../chunks/chunk-VJ5NAOWB.js";
|
|
73
|
+
import "../../chunks/chunk-FXD67VN5.js";
|
|
73
74
|
import {
|
|
74
75
|
TelemetryClient
|
|
75
|
-
} from "../../chunks/chunk-
|
|
76
|
+
} from "../../chunks/chunk-XNFHNTS2.js";
|
|
76
77
|
import {
|
|
77
78
|
buildCommandWithYes,
|
|
78
79
|
outputActionRequired
|
|
79
|
-
} from "../../chunks/chunk-
|
|
80
|
+
} from "../../chunks/chunk-NGGLYKNU.js";
|
|
80
81
|
import {
|
|
81
82
|
require_ms
|
|
82
83
|
} from "../../chunks/chunk-GGP5R3FU.js";
|
|
83
84
|
import {
|
|
84
85
|
printError
|
|
85
|
-
} from "../../chunks/chunk-
|
|
86
|
+
} from "../../chunks/chunk-AYLY3ZVL.js";
|
|
86
87
|
import {
|
|
87
88
|
parseArguments
|
|
88
|
-
} from "../../chunks/chunk-
|
|
89
|
+
} from "../../chunks/chunk-57RHXXXG.js";
|
|
90
|
+
import "../../chunks/chunk-RKDCNQ4S.js";
|
|
89
91
|
import {
|
|
90
92
|
CantParseJSONFile,
|
|
91
93
|
LambdaSizeExceededError,
|
|
92
94
|
MissingDotenvVarsError,
|
|
93
95
|
NowError,
|
|
96
|
+
require_bytes
|
|
97
|
+
} from "../../chunks/chunk-BMKU5KEL.js";
|
|
98
|
+
import {
|
|
94
99
|
cmd,
|
|
95
100
|
getCommandName,
|
|
96
101
|
getCommandNamePlain,
|
|
97
102
|
getFlagsSpecification,
|
|
98
103
|
getTitleName,
|
|
99
|
-
packageName
|
|
100
|
-
|
|
101
|
-
} from "../../chunks/chunk-SOFC4MLS.js";
|
|
104
|
+
packageName
|
|
105
|
+
} from "../../chunks/chunk-Q2DGFCO7.js";
|
|
102
106
|
import {
|
|
103
107
|
pkg_default
|
|
104
108
|
} from "../../chunks/chunk-P4QNYOFB.js";
|
|
@@ -110,7 +114,7 @@ import {
|
|
|
110
114
|
link_default,
|
|
111
115
|
output_manager_default,
|
|
112
116
|
require_dist
|
|
113
|
-
} from "../../chunks/chunk-
|
|
117
|
+
} from "../../chunks/chunk-QFAS4OVW.js";
|
|
114
118
|
import {
|
|
115
119
|
require_source,
|
|
116
120
|
require_supports_color
|
|
@@ -4491,11 +4495,11 @@ var require_raw_body = __commonJS({
|
|
|
4491
4495
|
if (done) {
|
|
4492
4496
|
return readStream(stream, encoding, length, limit, done);
|
|
4493
4497
|
}
|
|
4494
|
-
return new Promise(function executor(
|
|
4498
|
+
return new Promise(function executor(resolve3, reject) {
|
|
4495
4499
|
readStream(stream, encoding, length, limit, function onRead(err, buf) {
|
|
4496
4500
|
if (err)
|
|
4497
4501
|
return reject(err);
|
|
4498
|
-
|
|
4502
|
+
resolve3(buf);
|
|
4499
4503
|
});
|
|
4500
4504
|
});
|
|
4501
4505
|
}
|
|
@@ -5657,7 +5661,7 @@ var require_debug2 = __commonJS({
|
|
|
5657
5661
|
var require_follow_redirects = __commonJS({
|
|
5658
5662
|
"../../node_modules/.pnpm/follow-redirects@1.16.0_debug@3.1.0/node_modules/follow-redirects/index.js"(exports2, module2) {
|
|
5659
5663
|
var url4 = __require("url");
|
|
5660
|
-
var
|
|
5664
|
+
var URL3 = url4.URL;
|
|
5661
5665
|
var http2 = __require("http");
|
|
5662
5666
|
var https = __require("https");
|
|
5663
5667
|
var Writable2 = __require("stream").Writable;
|
|
@@ -5673,7 +5677,7 @@ var require_follow_redirects = __commonJS({
|
|
|
5673
5677
|
})();
|
|
5674
5678
|
var useNativeURL = false;
|
|
5675
5679
|
try {
|
|
5676
|
-
assert(new
|
|
5680
|
+
assert(new URL3(""));
|
|
5677
5681
|
} catch (error2) {
|
|
5678
5682
|
useNativeURL = error2.code === "ERR_INVALID_URL";
|
|
5679
5683
|
}
|
|
@@ -5984,7 +5988,7 @@ var require_follow_redirects = __commonJS({
|
|
|
5984
5988
|
removeMatchingHeaders(/^content-/i, this._options.headers);
|
|
5985
5989
|
}
|
|
5986
5990
|
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
|
|
5987
|
-
var currentUrlParts =
|
|
5991
|
+
var currentUrlParts = parseUrl2(this._currentUrl);
|
|
5988
5992
|
var currentHost = currentHostHeader || currentUrlParts.host;
|
|
5989
5993
|
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url4.format(Object.assign(currentUrlParts, { host: currentHost }));
|
|
5990
5994
|
var redirectUrl = resolveUrl(location, currentUrl);
|
|
@@ -6023,7 +6027,7 @@ var require_follow_redirects = __commonJS({
|
|
|
6023
6027
|
if (isURL2(input)) {
|
|
6024
6028
|
input = spreadUrlObject(input);
|
|
6025
6029
|
} else if (isString(input)) {
|
|
6026
|
-
input = spreadUrlObject(
|
|
6030
|
+
input = spreadUrlObject(parseUrl2(input));
|
|
6027
6031
|
} else {
|
|
6028
6032
|
callback = options;
|
|
6029
6033
|
options = validateUrl(input);
|
|
@@ -6059,10 +6063,10 @@ var require_follow_redirects = __commonJS({
|
|
|
6059
6063
|
}
|
|
6060
6064
|
function noop() {
|
|
6061
6065
|
}
|
|
6062
|
-
function
|
|
6066
|
+
function parseUrl2(input) {
|
|
6063
6067
|
var parsed;
|
|
6064
6068
|
if (useNativeURL) {
|
|
6065
|
-
parsed = new
|
|
6069
|
+
parsed = new URL3(input);
|
|
6066
6070
|
} else {
|
|
6067
6071
|
parsed = validateUrl(url4.parse(input));
|
|
6068
6072
|
if (!isString(parsed.protocol)) {
|
|
@@ -6071,8 +6075,8 @@ var require_follow_redirects = __commonJS({
|
|
|
6071
6075
|
}
|
|
6072
6076
|
return parsed;
|
|
6073
6077
|
}
|
|
6074
|
-
function resolveUrl(
|
|
6075
|
-
return useNativeURL ? new
|
|
6078
|
+
function resolveUrl(relative4, base) {
|
|
6079
|
+
return useNativeURL ? new URL3(relative4, base) : parseUrl2(url4.resolve(base, relative4));
|
|
6076
6080
|
}
|
|
6077
6081
|
function validateUrl(input) {
|
|
6078
6082
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -6154,7 +6158,7 @@ var require_follow_redirects = __commonJS({
|
|
|
6154
6158
|
return typeof value === "object" && "length" in value;
|
|
6155
6159
|
}
|
|
6156
6160
|
function isURL2(value) {
|
|
6157
|
-
return
|
|
6161
|
+
return URL3 && value instanceof URL3;
|
|
6158
6162
|
}
|
|
6159
6163
|
function escapeRegex(regex) {
|
|
6160
6164
|
return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
|
|
@@ -6656,8 +6660,8 @@ var require_urlparser = __commonJS({
|
|
|
6656
6660
|
this.query = Url.queryString.parse(search);
|
|
6657
6661
|
}
|
|
6658
6662
|
};
|
|
6659
|
-
Url.prototype.resolve = function Url$resolve(
|
|
6660
|
-
return this.resolveObject(Url.parse(
|
|
6663
|
+
Url.prototype.resolve = function Url$resolve(relative4) {
|
|
6664
|
+
return this.resolveObject(Url.parse(relative4, false, true)).format();
|
|
6661
6665
|
};
|
|
6662
6666
|
Url.prototype.format = function Url$format() {
|
|
6663
6667
|
var auth = this.auth || "";
|
|
@@ -6708,61 +6712,61 @@ var require_urlparser = __commonJS({
|
|
|
6708
6712
|
search = escapeSearch(search);
|
|
6709
6713
|
return scheme + (host === false ? "" : host) + pathname + search + hash;
|
|
6710
6714
|
};
|
|
6711
|
-
Url.prototype.resolveObject = function Url$resolveObject(
|
|
6712
|
-
if (typeof
|
|
6713
|
-
|
|
6715
|
+
Url.prototype.resolveObject = function Url$resolveObject(relative4) {
|
|
6716
|
+
if (typeof relative4 === "string")
|
|
6717
|
+
relative4 = Url.parse(relative4, false, true);
|
|
6714
6718
|
var result = this._clone();
|
|
6715
|
-
result.hash =
|
|
6716
|
-
if (!
|
|
6719
|
+
result.hash = relative4.hash;
|
|
6720
|
+
if (!relative4.href) {
|
|
6717
6721
|
result._href = "";
|
|
6718
6722
|
return result;
|
|
6719
6723
|
}
|
|
6720
|
-
if (
|
|
6721
|
-
|
|
6724
|
+
if (relative4.slashes && !relative4._protocol) {
|
|
6725
|
+
relative4._copyPropsTo(result, true);
|
|
6722
6726
|
if (slashProtocols[result._protocol] && result.hostname && !result.pathname) {
|
|
6723
6727
|
result.pathname = "/";
|
|
6724
6728
|
}
|
|
6725
6729
|
result._href = "";
|
|
6726
6730
|
return result;
|
|
6727
6731
|
}
|
|
6728
|
-
if (
|
|
6729
|
-
if (!slashProtocols[
|
|
6730
|
-
|
|
6732
|
+
if (relative4._protocol && relative4._protocol !== result._protocol) {
|
|
6733
|
+
if (!slashProtocols[relative4._protocol]) {
|
|
6734
|
+
relative4._copyPropsTo(result, false);
|
|
6731
6735
|
result._href = "";
|
|
6732
6736
|
return result;
|
|
6733
6737
|
}
|
|
6734
|
-
result._protocol =
|
|
6735
|
-
if (!
|
|
6736
|
-
var relPath = (
|
|
6737
|
-
while (relPath.length && !(
|
|
6738
|
+
result._protocol = relative4._protocol;
|
|
6739
|
+
if (!relative4.host && relative4._protocol !== "javascript") {
|
|
6740
|
+
var relPath = (relative4.pathname || "").split("/");
|
|
6741
|
+
while (relPath.length && !(relative4.host = relPath.shift()))
|
|
6738
6742
|
;
|
|
6739
|
-
if (!
|
|
6740
|
-
|
|
6741
|
-
if (!
|
|
6742
|
-
|
|
6743
|
+
if (!relative4.host)
|
|
6744
|
+
relative4.host = "";
|
|
6745
|
+
if (!relative4.hostname)
|
|
6746
|
+
relative4.hostname = "";
|
|
6743
6747
|
if (relPath[0] !== "")
|
|
6744
6748
|
relPath.unshift("");
|
|
6745
6749
|
if (relPath.length < 2)
|
|
6746
6750
|
relPath.unshift("");
|
|
6747
6751
|
result.pathname = relPath.join("/");
|
|
6748
6752
|
} else {
|
|
6749
|
-
result.pathname =
|
|
6750
|
-
}
|
|
6751
|
-
result.search =
|
|
6752
|
-
result.host =
|
|
6753
|
-
result.auth =
|
|
6754
|
-
result.hostname =
|
|
6755
|
-
result._port =
|
|
6756
|
-
result.slashes = result.slashes ||
|
|
6753
|
+
result.pathname = relative4.pathname;
|
|
6754
|
+
}
|
|
6755
|
+
result.search = relative4.search;
|
|
6756
|
+
result.host = relative4.host || "";
|
|
6757
|
+
result.auth = relative4.auth;
|
|
6758
|
+
result.hostname = relative4.hostname || relative4.host;
|
|
6759
|
+
result._port = relative4._port;
|
|
6760
|
+
result.slashes = result.slashes || relative4.slashes;
|
|
6757
6761
|
result._href = "";
|
|
6758
6762
|
return result;
|
|
6759
6763
|
}
|
|
6760
6764
|
var isSourceAbs = result.pathname && result.pathname.charCodeAt(0) === 47;
|
|
6761
|
-
var isRelAbs =
|
|
6762
|
-
var mustEndAbs = isRelAbs || isSourceAbs || result.host &&
|
|
6765
|
+
var isRelAbs = relative4.host || relative4.pathname && relative4.pathname.charCodeAt(0) === 47;
|
|
6766
|
+
var mustEndAbs = isRelAbs || isSourceAbs || result.host && relative4.pathname;
|
|
6763
6767
|
var removeAllDots = mustEndAbs;
|
|
6764
6768
|
var srcPath = result.pathname && result.pathname.split("/") || [];
|
|
6765
|
-
var relPath =
|
|
6769
|
+
var relPath = relative4.pathname && relative4.pathname.split("/") || [];
|
|
6766
6770
|
var psychotic = result._protocol && !slashProtocols[result._protocol];
|
|
6767
6771
|
if (psychotic) {
|
|
6768
6772
|
result.hostname = "";
|
|
@@ -6774,31 +6778,31 @@ var require_urlparser = __commonJS({
|
|
|
6774
6778
|
srcPath.unshift(result.host);
|
|
6775
6779
|
}
|
|
6776
6780
|
result.host = "";
|
|
6777
|
-
if (
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
if (
|
|
6781
|
+
if (relative4._protocol) {
|
|
6782
|
+
relative4.hostname = "";
|
|
6783
|
+
relative4._port = -1;
|
|
6784
|
+
if (relative4.host) {
|
|
6781
6785
|
if (relPath[0] === "")
|
|
6782
|
-
relPath[0] =
|
|
6786
|
+
relPath[0] = relative4.host;
|
|
6783
6787
|
else
|
|
6784
|
-
relPath.unshift(
|
|
6788
|
+
relPath.unshift(relative4.host);
|
|
6785
6789
|
}
|
|
6786
|
-
|
|
6790
|
+
relative4.host = "";
|
|
6787
6791
|
}
|
|
6788
6792
|
mustEndAbs = mustEndAbs && (relPath[0] === "" || srcPath[0] === "");
|
|
6789
6793
|
}
|
|
6790
6794
|
if (isRelAbs) {
|
|
6791
|
-
result.host =
|
|
6792
|
-
result.hostname =
|
|
6793
|
-
result.search =
|
|
6795
|
+
result.host = relative4.host ? relative4.host : result.host;
|
|
6796
|
+
result.hostname = relative4.hostname ? relative4.hostname : result.hostname;
|
|
6797
|
+
result.search = relative4.search;
|
|
6794
6798
|
srcPath = relPath;
|
|
6795
6799
|
} else if (relPath.length) {
|
|
6796
6800
|
if (!srcPath)
|
|
6797
6801
|
srcPath = [];
|
|
6798
6802
|
srcPath.pop();
|
|
6799
6803
|
srcPath = srcPath.concat(relPath);
|
|
6800
|
-
result.search =
|
|
6801
|
-
} else if (
|
|
6804
|
+
result.search = relative4.search;
|
|
6805
|
+
} else if (relative4.search) {
|
|
6802
6806
|
if (psychotic) {
|
|
6803
6807
|
result.hostname = result.host = srcPath.shift();
|
|
6804
6808
|
var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false;
|
|
@@ -6807,7 +6811,7 @@ var require_urlparser = __commonJS({
|
|
|
6807
6811
|
result.host = result.hostname = authInHost.shift();
|
|
6808
6812
|
}
|
|
6809
6813
|
}
|
|
6810
|
-
result.search =
|
|
6814
|
+
result.search = relative4.search;
|
|
6811
6815
|
result._href = "";
|
|
6812
6816
|
return result;
|
|
6813
6817
|
}
|
|
@@ -6817,7 +6821,7 @@ var require_urlparser = __commonJS({
|
|
|
6817
6821
|
return result;
|
|
6818
6822
|
}
|
|
6819
6823
|
var last = srcPath.slice(-1)[0];
|
|
6820
|
-
var hasTrailingSlash = (result.host ||
|
|
6824
|
+
var hasTrailingSlash = (result.host || relative4.host) && (last === "." || last === "..") || last === "";
|
|
6821
6825
|
var up = 0;
|
|
6822
6826
|
for (var i2 = srcPath.length; i2 >= 0; i2--) {
|
|
6823
6827
|
last = srcPath[i2];
|
|
@@ -6842,9 +6846,9 @@ var require_urlparser = __commonJS({
|
|
|
6842
6846
|
if (hasTrailingSlash && srcPath.join("/").substr(-1) !== "/") {
|
|
6843
6847
|
srcPath.push("");
|
|
6844
6848
|
}
|
|
6845
|
-
var
|
|
6849
|
+
var isAbsolute4 = srcPath[0] === "" || srcPath[0] && srcPath[0].charCodeAt(0) === 47;
|
|
6846
6850
|
if (psychotic) {
|
|
6847
|
-
result.hostname = result.host =
|
|
6851
|
+
result.hostname = result.host = isAbsolute4 ? "" : srcPath.length ? srcPath.shift() : "";
|
|
6848
6852
|
var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false;
|
|
6849
6853
|
if (authInHost) {
|
|
6850
6854
|
result.auth = authInHost.shift();
|
|
@@ -6852,12 +6856,12 @@ var require_urlparser = __commonJS({
|
|
|
6852
6856
|
}
|
|
6853
6857
|
}
|
|
6854
6858
|
mustEndAbs = mustEndAbs || result.host && srcPath.length;
|
|
6855
|
-
if (mustEndAbs && !
|
|
6859
|
+
if (mustEndAbs && !isAbsolute4) {
|
|
6856
6860
|
srcPath.unshift("");
|
|
6857
6861
|
}
|
|
6858
6862
|
result.pathname = srcPath.length === 0 ? null : srcPath.join("/");
|
|
6859
|
-
result.auth =
|
|
6860
|
-
result.slashes = result.slashes ||
|
|
6863
|
+
result.auth = relative4.auth || result.auth;
|
|
6864
|
+
result.slashes = result.slashes || relative4.slashes;
|
|
6861
6865
|
result._href = "";
|
|
6862
6866
|
return result;
|
|
6863
6867
|
};
|
|
@@ -7250,13 +7254,13 @@ var require_urlparser = __commonJS({
|
|
|
7250
7254
|
}
|
|
7251
7255
|
return obj.format();
|
|
7252
7256
|
};
|
|
7253
|
-
Url.resolve = function Url$Resolve(source,
|
|
7254
|
-
return Url.parse(source, false, true).resolve(
|
|
7257
|
+
Url.resolve = function Url$Resolve(source, relative4) {
|
|
7258
|
+
return Url.parse(source, false, true).resolve(relative4);
|
|
7255
7259
|
};
|
|
7256
|
-
Url.resolveObject = function Url$ResolveObject(source,
|
|
7260
|
+
Url.resolveObject = function Url$ResolveObject(source, relative4) {
|
|
7257
7261
|
if (!source)
|
|
7258
|
-
return
|
|
7259
|
-
return Url.parse(source, false, true).resolveObject(
|
|
7262
|
+
return relative4;
|
|
7263
|
+
return Url.parse(source, false, true).resolveObject(relative4);
|
|
7260
7264
|
};
|
|
7261
7265
|
function _escapePath(pathname) {
|
|
7262
7266
|
return pathname.replace(/[?#]/g, function(match) {
|
|
@@ -15344,7 +15348,7 @@ var require_mime_types2 = __commonJS({
|
|
|
15344
15348
|
"../../node_modules/.pnpm/mime-types@2.1.18/node_modules/mime-types/index.js"(exports2) {
|
|
15345
15349
|
"use strict";
|
|
15346
15350
|
var db = require_mime_db();
|
|
15347
|
-
var
|
|
15351
|
+
var extname3 = __require("path").extname;
|
|
15348
15352
|
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
15349
15353
|
var TEXT_TYPE_REGEXP = /^text\//i;
|
|
15350
15354
|
exports2.charset = charset;
|
|
@@ -15399,7 +15403,7 @@ var require_mime_types2 = __commonJS({
|
|
|
15399
15403
|
if (!path6 || typeof path6 !== "string") {
|
|
15400
15404
|
return false;
|
|
15401
15405
|
}
|
|
15402
|
-
var extension2 =
|
|
15406
|
+
var extension2 = extname3("x." + path6).toLowerCase().substr(1);
|
|
15403
15407
|
if (!extension2) {
|
|
15404
15408
|
return false;
|
|
15405
15409
|
}
|
|
@@ -15786,7 +15790,7 @@ var require_src2 = __commonJS({
|
|
|
15786
15790
|
var { promisify } = __require("util");
|
|
15787
15791
|
var path6 = __require("path");
|
|
15788
15792
|
var { createHash } = __require("crypto");
|
|
15789
|
-
var { realpath, lstat, createReadStream, readdir } = __require("fs");
|
|
15793
|
+
var { realpath, lstat: lstat2, createReadStream, readdir: readdir2 } = __require("fs");
|
|
15790
15794
|
var url4 = require_urlparser();
|
|
15791
15795
|
var slasher = require_glob_slash();
|
|
15792
15796
|
var minimatch3 = require_minimatch2();
|
|
@@ -15799,7 +15803,7 @@ var require_src2 = __commonJS({
|
|
|
15799
15803
|
var directoryTemplate2 = require_directory();
|
|
15800
15804
|
var errorTemplate = require_error();
|
|
15801
15805
|
var etags = /* @__PURE__ */ new Map();
|
|
15802
|
-
var calculateSha = (handlers, absolutePath) => new Promise((
|
|
15806
|
+
var calculateSha = (handlers, absolutePath) => new Promise((resolve3, reject) => {
|
|
15803
15807
|
const hash = createHash("sha1");
|
|
15804
15808
|
hash.update(path6.extname(absolutePath));
|
|
15805
15809
|
hash.update("-");
|
|
@@ -15808,7 +15812,7 @@ var require_src2 = __commonJS({
|
|
|
15808
15812
|
rs.on("data", (buf) => hash.update(buf));
|
|
15809
15813
|
rs.on("end", () => {
|
|
15810
15814
|
const sha = hash.digest("hex");
|
|
15811
|
-
|
|
15815
|
+
resolve3(sha);
|
|
15812
15816
|
});
|
|
15813
15817
|
});
|
|
15814
15818
|
var sourceMatches = (source, requestPath, allowSegments) => {
|
|
@@ -16092,12 +16096,12 @@ var require_src2 = __commonJS({
|
|
|
16092
16096
|
}).filter(Boolean);
|
|
16093
16097
|
if (toRoot.length > 0) {
|
|
16094
16098
|
const directoryPath = [...pathParts].slice(1);
|
|
16095
|
-
const
|
|
16099
|
+
const relative4 = path6.join("/", ...directoryPath, "..", slashSuffix);
|
|
16096
16100
|
files.unshift({
|
|
16097
16101
|
type: "directory",
|
|
16098
16102
|
base: "..",
|
|
16099
|
-
relative:
|
|
16100
|
-
title:
|
|
16103
|
+
relative: relative4,
|
|
16104
|
+
title: relative4,
|
|
16101
16105
|
ext: ""
|
|
16102
16106
|
});
|
|
16103
16107
|
}
|
|
@@ -16178,10 +16182,10 @@ var require_src2 = __commonJS({
|
|
|
16178
16182
|
return sendError(...args2);
|
|
16179
16183
|
};
|
|
16180
16184
|
var getHandlers = (methods) => Object.assign({
|
|
16181
|
-
lstat: promisify(
|
|
16185
|
+
lstat: promisify(lstat2),
|
|
16182
16186
|
realpath: promisify(realpath),
|
|
16183
16187
|
createReadStream,
|
|
16184
|
-
readdir: promisify(
|
|
16188
|
+
readdir: promisify(readdir2),
|
|
16185
16189
|
sendError
|
|
16186
16190
|
}, methods);
|
|
16187
16191
|
module2.exports = async (request, response, config = {}, methods = {}) => {
|
|
@@ -16446,7 +16450,7 @@ var require_dist7 = __commonJS({
|
|
|
16446
16450
|
(function(once3) {
|
|
16447
16451
|
function spread(emitter, name) {
|
|
16448
16452
|
let c = null;
|
|
16449
|
-
const p = new Promise((
|
|
16453
|
+
const p = new Promise((resolve3, reject) => {
|
|
16450
16454
|
function cancel() {
|
|
16451
16455
|
emitter.removeListener(name, onEvent);
|
|
16452
16456
|
emitter.removeListener("error", onError);
|
|
@@ -16454,7 +16458,7 @@ var require_dist7 = __commonJS({
|
|
|
16454
16458
|
}
|
|
16455
16459
|
function onEvent(...args2) {
|
|
16456
16460
|
cancel();
|
|
16457
|
-
|
|
16461
|
+
resolve3(args2);
|
|
16458
16462
|
}
|
|
16459
16463
|
function onError(err) {
|
|
16460
16464
|
cancel();
|
|
@@ -16492,14 +16496,14 @@ var require_get_port = __commonJS({
|
|
|
16492
16496
|
};
|
|
16493
16497
|
var releaseOldLockedPortsIntervalMs = 1e3 * 15;
|
|
16494
16498
|
var interval;
|
|
16495
|
-
var getAvailablePort = (options) => new Promise((
|
|
16499
|
+
var getAvailablePort = (options) => new Promise((resolve3, reject) => {
|
|
16496
16500
|
const server = net.createServer();
|
|
16497
16501
|
server.unref();
|
|
16498
16502
|
server.on("error", reject);
|
|
16499
16503
|
server.listen(options, () => {
|
|
16500
16504
|
const { port } = server.address();
|
|
16501
16505
|
server.close(() => {
|
|
16502
|
-
|
|
16506
|
+
resolve3(port);
|
|
16503
16507
|
});
|
|
16504
16508
|
});
|
|
16505
16509
|
});
|
|
@@ -16571,7 +16575,7 @@ var require_is_port_reachable = __commonJS({
|
|
|
16571
16575
|
"use strict";
|
|
16572
16576
|
var net = __require("net");
|
|
16573
16577
|
module2.exports = async (port, { timeout = 1e3, host } = {}) => {
|
|
16574
|
-
const promise = new Promise((
|
|
16578
|
+
const promise = new Promise((resolve3, reject) => {
|
|
16575
16579
|
const socket = new net.Socket();
|
|
16576
16580
|
const onError = () => {
|
|
16577
16581
|
socket.destroy();
|
|
@@ -16582,7 +16586,7 @@ var require_is_port_reachable = __commonJS({
|
|
|
16582
16586
|
socket.once("timeout", onError);
|
|
16583
16587
|
socket.connect(port, host, () => {
|
|
16584
16588
|
socket.end();
|
|
16585
|
-
|
|
16589
|
+
resolve3();
|
|
16586
16590
|
});
|
|
16587
16591
|
});
|
|
16588
16592
|
try {
|
|
@@ -16758,13 +16762,13 @@ var import_ms6 = __toESM(require_ms(), 1);
|
|
|
16758
16762
|
var import_fs_extra2 = __toESM(require_lib(), 1);
|
|
16759
16763
|
var import_fs_detectors3 = __toESM(require_dist3(), 1);
|
|
16760
16764
|
var import_frameworks3 = __toESM(require_frameworks(), 1);
|
|
16761
|
-
import { resolve, join as
|
|
16765
|
+
import { resolve as resolve2, join as join6 } from "path";
|
|
16762
16766
|
|
|
16763
16767
|
// src/util/dev/server.ts
|
|
16764
16768
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
16765
16769
|
var import_ms4 = __toESM(require_ms(), 1);
|
|
16766
16770
|
var import_chalk2 = __toESM(require_source(), 1);
|
|
16767
|
-
import url3, { URL } from "url";
|
|
16771
|
+
import url3, { URL as URL2 } from "url";
|
|
16768
16772
|
import http from "http";
|
|
16769
16773
|
var import_pluralize2 = __toESM(require_pluralize(), 1);
|
|
16770
16774
|
var import_raw_body = __toESM(require_raw_body(), 1);
|
|
@@ -16780,12 +16784,12 @@ var import_get_port2 = __toESM(require_get_port(), 1);
|
|
|
16780
16784
|
var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
|
|
16781
16785
|
import { randomBytes as randomBytes2 } from "crypto";
|
|
16782
16786
|
import { watch } from "chokidar";
|
|
16783
|
-
import path4, { isAbsolute as
|
|
16787
|
+
import path4, { isAbsolute as isAbsolute3, basename, dirname as dirname3, extname as extname2, join as join4, sep as sep2 } from "path";
|
|
16784
16788
|
|
|
16785
16789
|
// src/util/dev/port-utils.ts
|
|
16786
16790
|
var import_is_port_reachable = __toESM(require_is_port_reachable(), 1);
|
|
16787
16791
|
function sleep(ms7) {
|
|
16788
|
-
return new Promise((
|
|
16792
|
+
return new Promise((resolve3) => setTimeout(resolve3, ms7));
|
|
16789
16793
|
}
|
|
16790
16794
|
async function getReachableHostOnPort(port) {
|
|
16791
16795
|
const optsIpv4 = { host: "127.0.0.1" };
|
|
@@ -17475,12 +17479,12 @@ import {
|
|
|
17475
17479
|
// src/util/tree-kill.ts
|
|
17476
17480
|
var import_tree_kill = __toESM(require_tree_kill(), 1);
|
|
17477
17481
|
function treeKill(pid, signal = "SIGTERM") {
|
|
17478
|
-
return new Promise((
|
|
17482
|
+
return new Promise((resolve3, reject) => {
|
|
17479
17483
|
(0, import_tree_kill.default)(pid, signal, (err) => {
|
|
17480
17484
|
if (err)
|
|
17481
17485
|
reject(err);
|
|
17482
17486
|
else
|
|
17483
|
-
|
|
17487
|
+
resolve3();
|
|
17484
17488
|
});
|
|
17485
17489
|
});
|
|
17486
17490
|
}
|
|
@@ -17546,12 +17550,12 @@ async function createBuildProcess(match, envConfigs, workPath) {
|
|
|
17546
17550
|
);
|
|
17547
17551
|
match.buildProcess = void 0;
|
|
17548
17552
|
});
|
|
17549
|
-
return new Promise((
|
|
17553
|
+
return new Promise((resolve3, reject) => {
|
|
17550
17554
|
buildProcess.once("message", (data) => {
|
|
17551
17555
|
if (data !== null && typeof data === "object" && data.type !== "ready") {
|
|
17552
17556
|
reject(new Error('Did not get "ready" event from builder'));
|
|
17553
17557
|
} else {
|
|
17554
|
-
|
|
17558
|
+
resolve3(buildProcess);
|
|
17555
17559
|
}
|
|
17556
17560
|
});
|
|
17557
17561
|
});
|
|
@@ -17611,12 +17615,12 @@ async function executeBuild(vercelConfig, devServer, files, match, requestPath,
|
|
|
17611
17615
|
requirePath,
|
|
17612
17616
|
buildOptions
|
|
17613
17617
|
});
|
|
17614
|
-
buildResultOrOutputs = await new Promise((
|
|
17618
|
+
buildResultOrOutputs = await new Promise((resolve3, reject) => {
|
|
17615
17619
|
function onMessage({ type, result: result2, error: error2 }) {
|
|
17616
17620
|
cleanup();
|
|
17617
17621
|
if (type === "buildResult") {
|
|
17618
17622
|
if (result2) {
|
|
17619
|
-
|
|
17623
|
+
resolve3(result2);
|
|
17620
17624
|
} else if (error2) {
|
|
17621
17625
|
reject(Object.assign(new Error(), error2));
|
|
17622
17626
|
}
|
|
@@ -17845,6 +17849,13 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
|
|
|
17845
17849
|
mapToEntrypoint.set(src, originalSrc);
|
|
17846
17850
|
}
|
|
17847
17851
|
}
|
|
17852
|
+
if (buildConfig.config?.framework === "rust" && src === "src/main.rs" && !fileList.includes(src)) {
|
|
17853
|
+
const originalSrc = src;
|
|
17854
|
+
if (fileList.includes("Cargo.toml")) {
|
|
17855
|
+
src = "Cargo.toml";
|
|
17856
|
+
mapToEntrypoint.set(src, originalSrc);
|
|
17857
|
+
}
|
|
17858
|
+
}
|
|
17848
17859
|
if (buildConfig.config?.framework === "container" && !fileList.includes(src)) {
|
|
17849
17860
|
const originalSrc = src;
|
|
17850
17861
|
const dockerfileCandidates = [
|
|
@@ -18425,7 +18436,7 @@ function waitForExit(pid, proc, timeoutMs) {
|
|
|
18425
18436
|
if (!isProcessAlive(pid)) {
|
|
18426
18437
|
return Promise.resolve(true);
|
|
18427
18438
|
}
|
|
18428
|
-
return new Promise((
|
|
18439
|
+
return new Promise((resolve3) => {
|
|
18429
18440
|
let settled = false;
|
|
18430
18441
|
const finish = (died) => {
|
|
18431
18442
|
if (settled)
|
|
@@ -18435,7 +18446,7 @@ function waitForExit(pid, proc, timeoutMs) {
|
|
|
18435
18446
|
clearTimeout(deadline);
|
|
18436
18447
|
if (proc)
|
|
18437
18448
|
proc.removeListener("exit", onExit);
|
|
18438
|
-
|
|
18449
|
+
resolve3(died);
|
|
18439
18450
|
};
|
|
18440
18451
|
const onExit = () => finish(true);
|
|
18441
18452
|
if (proc)
|
|
@@ -18572,13 +18583,13 @@ var ServicesOrchestrator = class {
|
|
|
18572
18583
|
this.cronTimers = [];
|
|
18573
18584
|
let timedOut = false;
|
|
18574
18585
|
let timeoutHandle;
|
|
18575
|
-
const timeout = new Promise((
|
|
18586
|
+
const timeout = new Promise((resolve3) => {
|
|
18576
18587
|
timeoutHandle = setTimeout(() => {
|
|
18577
18588
|
timedOut = true;
|
|
18578
18589
|
output_manager_default.debug(
|
|
18579
18590
|
`stopAll timed out after ${STOP_ALL_TIMEOUT_MS}ms; remaining processes will be SIGKILLed on exit`
|
|
18580
18591
|
);
|
|
18581
|
-
|
|
18592
|
+
resolve3();
|
|
18582
18593
|
}, STOP_ALL_TIMEOUT_MS);
|
|
18583
18594
|
});
|
|
18584
18595
|
try {
|
|
@@ -19033,7 +19044,7 @@ var ServicesOrchestrator = class {
|
|
|
19033
19044
|
}
|
|
19034
19045
|
async runInstallCommand(command, workspacePath, logger) {
|
|
19035
19046
|
await this.runBuffered(logger, (stdout, stderr) => {
|
|
19036
|
-
return new Promise((
|
|
19047
|
+
return new Promise((resolve3, reject) => {
|
|
19037
19048
|
output_manager_default.debug(
|
|
19038
19049
|
`Running install command: "${command}" in ${workspacePath}`
|
|
19039
19050
|
);
|
|
@@ -19046,7 +19057,7 @@ var ServicesOrchestrator = class {
|
|
|
19046
19057
|
child.on("error", reject);
|
|
19047
19058
|
child.on("exit", (code, signal) => {
|
|
19048
19059
|
if (code === 0) {
|
|
19049
|
-
|
|
19060
|
+
resolve3();
|
|
19050
19061
|
} else {
|
|
19051
19062
|
reject(
|
|
19052
19063
|
new NowBuildError({
|
|
@@ -19762,6 +19773,458 @@ function replaceLocalhost(address) {
|
|
|
19762
19773
|
return address.replace("[::]", "localhost").replace("0.0.0.0", "localhost");
|
|
19763
19774
|
}
|
|
19764
19775
|
|
|
19776
|
+
// src/util/dev/bulk-redirects.ts
|
|
19777
|
+
import { lstat, readdir, readFile, stat } from "fs/promises";
|
|
19778
|
+
import { extname, isAbsolute as isAbsolute2, join as join3, relative as relative3, resolve } from "path";
|
|
19779
|
+
import { parse as parseUrl } from "url";
|
|
19780
|
+
var MAX_REDIRECTS = 1e6;
|
|
19781
|
+
var MAX_FILES = 100;
|
|
19782
|
+
var MAX_URL_LENGTH = 2048;
|
|
19783
|
+
var VALID_STATUS_CODES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
19784
|
+
var SUPPORTED_EXTENSIONS = /* @__PURE__ */ new Set([".csv", ".json", ".jsonl"]);
|
|
19785
|
+
var BulkRedirectTable = class {
|
|
19786
|
+
constructor() {
|
|
19787
|
+
this.caseSensitiveByHostPath = /* @__PURE__ */ new Map();
|
|
19788
|
+
this.caseInsensitiveByHostPath = /* @__PURE__ */ new Map();
|
|
19789
|
+
this.caseSensitiveByPath = /* @__PURE__ */ new Map();
|
|
19790
|
+
this.caseInsensitiveByPath = /* @__PURE__ */ new Map();
|
|
19791
|
+
}
|
|
19792
|
+
get size() {
|
|
19793
|
+
return this.caseSensitiveByHostPath.size + this.caseInsensitiveByHostPath.size + this.caseSensitiveByPath.size + this.caseInsensitiveByPath.size;
|
|
19794
|
+
}
|
|
19795
|
+
add(redirect2) {
|
|
19796
|
+
const { host, pathname } = parseSource(redirect2.source);
|
|
19797
|
+
const stored = {
|
|
19798
|
+
destination: redirect2.destination,
|
|
19799
|
+
statusCode: redirect2.statusCode,
|
|
19800
|
+
preserveQueryParams: redirect2.preserveQueryParams
|
|
19801
|
+
};
|
|
19802
|
+
if (host) {
|
|
19803
|
+
const key = hostPathKey(host, pathname);
|
|
19804
|
+
if (redirect2.caseSensitive) {
|
|
19805
|
+
this.caseSensitiveByHostPath.set(key, stored);
|
|
19806
|
+
} else {
|
|
19807
|
+
this.caseInsensitiveByHostPath.set(key.toLowerCase(), stored);
|
|
19808
|
+
}
|
|
19809
|
+
return;
|
|
19810
|
+
}
|
|
19811
|
+
if (redirect2.caseSensitive) {
|
|
19812
|
+
this.caseSensitiveByPath.set(pathname, stored);
|
|
19813
|
+
} else {
|
|
19814
|
+
this.caseInsensitiveByPath.set(pathname.toLowerCase(), stored);
|
|
19815
|
+
}
|
|
19816
|
+
}
|
|
19817
|
+
lookup(pathname, host) {
|
|
19818
|
+
const hostname = host ? hostnameFromHostHeader(host) : "";
|
|
19819
|
+
if (hostname) {
|
|
19820
|
+
const hostKey = hostPathKey(hostname, pathname);
|
|
19821
|
+
const hostMatch = this.caseSensitiveByHostPath.get(hostKey) || this.caseInsensitiveByHostPath.get(hostKey.toLowerCase());
|
|
19822
|
+
if (hostMatch) {
|
|
19823
|
+
return hostMatch;
|
|
19824
|
+
}
|
|
19825
|
+
}
|
|
19826
|
+
return this.caseSensitiveByPath.get(pathname) || this.caseInsensitiveByPath.get(pathname.toLowerCase());
|
|
19827
|
+
}
|
|
19828
|
+
};
|
|
19829
|
+
async function getBulkRedirectsSignature(cwd, bulkRedirectsPath) {
|
|
19830
|
+
if (!bulkRedirectsPath) {
|
|
19831
|
+
return "";
|
|
19832
|
+
}
|
|
19833
|
+
const resolved = resolveBulkRedirectsPath(cwd, bulkRedirectsPath);
|
|
19834
|
+
if (!resolved) {
|
|
19835
|
+
return `invalid:${bulkRedirectsPath}`;
|
|
19836
|
+
}
|
|
19837
|
+
try {
|
|
19838
|
+
const stats = await stat(resolved);
|
|
19839
|
+
if (stats.isFile()) {
|
|
19840
|
+
return `file:${resolved}:${stats.mtimeMs}:${stats.size}`;
|
|
19841
|
+
}
|
|
19842
|
+
if (!stats.isDirectory()) {
|
|
19843
|
+
return `other:${resolved}:${stats.mtimeMs}`;
|
|
19844
|
+
}
|
|
19845
|
+
const files = await listRedirectFiles(resolved);
|
|
19846
|
+
const parts = await Promise.all(
|
|
19847
|
+
files.map(async (file) => {
|
|
19848
|
+
try {
|
|
19849
|
+
const fileStats = await stat(file);
|
|
19850
|
+
return `${file}:${fileStats.mtimeMs}:${fileStats.size}`;
|
|
19851
|
+
} catch {
|
|
19852
|
+
return `${file}:missing`;
|
|
19853
|
+
}
|
|
19854
|
+
})
|
|
19855
|
+
);
|
|
19856
|
+
return `dir:${resolved}:${parts.join("|")}`;
|
|
19857
|
+
} catch {
|
|
19858
|
+
return `missing:${resolved}`;
|
|
19859
|
+
}
|
|
19860
|
+
}
|
|
19861
|
+
async function loadBulkRedirects(cwd, bulkRedirectsPath) {
|
|
19862
|
+
const warnings = [];
|
|
19863
|
+
const table = new BulkRedirectTable();
|
|
19864
|
+
const resolved = resolveBulkRedirectsPath(cwd, bulkRedirectsPath);
|
|
19865
|
+
if (!resolved) {
|
|
19866
|
+
warnings.push(
|
|
19867
|
+
`Skipping bulk redirects path "${bulkRedirectsPath}" because it resolves outside the project directory.`
|
|
19868
|
+
);
|
|
19869
|
+
return { table, redirectCount: 0, fileCount: 0, warnings };
|
|
19870
|
+
}
|
|
19871
|
+
let files;
|
|
19872
|
+
try {
|
|
19873
|
+
const stats = await stat(resolved);
|
|
19874
|
+
if (stats.isDirectory()) {
|
|
19875
|
+
files = await listRedirectFiles(resolved);
|
|
19876
|
+
if (files.length > MAX_FILES) {
|
|
19877
|
+
warnings.push(
|
|
19878
|
+
`Bulk redirects directory "${bulkRedirectsPath}" has ${files.length} files; only the first ${MAX_FILES} will be used.`
|
|
19879
|
+
);
|
|
19880
|
+
files = files.slice(0, MAX_FILES);
|
|
19881
|
+
}
|
|
19882
|
+
} else if (stats.isFile()) {
|
|
19883
|
+
const ext = extname(resolved).toLowerCase();
|
|
19884
|
+
if (!SUPPORTED_EXTENSIONS.has(ext)) {
|
|
19885
|
+
warnings.push(
|
|
19886
|
+
`Bulk redirects file "${bulkRedirectsPath}" must be a .csv, .json, or .jsonl file.`
|
|
19887
|
+
);
|
|
19888
|
+
return { table, redirectCount: 0, fileCount: 0, warnings };
|
|
19889
|
+
}
|
|
19890
|
+
files = [resolved];
|
|
19891
|
+
} else {
|
|
19892
|
+
warnings.push(
|
|
19893
|
+
`Bulk redirects path "${bulkRedirectsPath}" is not a file or directory.`
|
|
19894
|
+
);
|
|
19895
|
+
return { table, redirectCount: 0, fileCount: 0, warnings };
|
|
19896
|
+
}
|
|
19897
|
+
} catch (err) {
|
|
19898
|
+
if (isNotFound(err)) {
|
|
19899
|
+
warnings.push(
|
|
19900
|
+
`Bulk redirects path "${bulkRedirectsPath}" was not found.`
|
|
19901
|
+
);
|
|
19902
|
+
return { table, redirectCount: 0, fileCount: 0, warnings };
|
|
19903
|
+
}
|
|
19904
|
+
throw err;
|
|
19905
|
+
}
|
|
19906
|
+
let redirectCount = 0;
|
|
19907
|
+
for (const file of files) {
|
|
19908
|
+
if (redirectCount >= MAX_REDIRECTS) {
|
|
19909
|
+
warnings.push(
|
|
19910
|
+
`Bulk redirects limit of ${MAX_REDIRECTS} reached; remaining entries were skipped.`
|
|
19911
|
+
);
|
|
19912
|
+
break;
|
|
19913
|
+
}
|
|
19914
|
+
const remaining = MAX_REDIRECTS - redirectCount;
|
|
19915
|
+
const parsed = await parseRedirectFile(file, remaining, warnings, cwd);
|
|
19916
|
+
for (const redirect2 of parsed) {
|
|
19917
|
+
table.add(redirect2);
|
|
19918
|
+
redirectCount++;
|
|
19919
|
+
}
|
|
19920
|
+
}
|
|
19921
|
+
const duplicateCount = redirectCount - table.size;
|
|
19922
|
+
if (duplicateCount > 0) {
|
|
19923
|
+
warnings.push(
|
|
19924
|
+
`Bulk redirects contain ${duplicateCount} duplicate ${duplicateCount === 1 ? "source" : "sources"}; the last occurrence wins.`
|
|
19925
|
+
);
|
|
19926
|
+
}
|
|
19927
|
+
return {
|
|
19928
|
+
table,
|
|
19929
|
+
redirectCount,
|
|
19930
|
+
fileCount: files.length,
|
|
19931
|
+
warnings
|
|
19932
|
+
};
|
|
19933
|
+
}
|
|
19934
|
+
function resolveBulkRedirect(table, reqUrl, host) {
|
|
19935
|
+
const parsed = parseUrl(reqUrl);
|
|
19936
|
+
const match = table.lookup(parsed.pathname || "/", host);
|
|
19937
|
+
if (!match) {
|
|
19938
|
+
return void 0;
|
|
19939
|
+
}
|
|
19940
|
+
let location = match.destination;
|
|
19941
|
+
if (match.preserveQueryParams && parsed.search) {
|
|
19942
|
+
location = appendQueryParams(location, parsed.search);
|
|
19943
|
+
}
|
|
19944
|
+
return { location, statusCode: match.statusCode };
|
|
19945
|
+
}
|
|
19946
|
+
function appendQueryParams(destination, search) {
|
|
19947
|
+
const query = search.startsWith("?") ? search.slice(1) : search;
|
|
19948
|
+
if (!query) {
|
|
19949
|
+
return destination;
|
|
19950
|
+
}
|
|
19951
|
+
return destination.includes("?") ? `${destination}&${query}` : `${destination}?${query}`;
|
|
19952
|
+
}
|
|
19953
|
+
function resolveBulkRedirectsPath(cwd, bulkRedirectsPath) {
|
|
19954
|
+
const projectRoot = resolve(cwd);
|
|
19955
|
+
const resolved = resolve(projectRoot, bulkRedirectsPath);
|
|
19956
|
+
const relativeFromRoot = relative3(projectRoot, resolved);
|
|
19957
|
+
if (relativeFromRoot.startsWith("..") || isAbsolute2(relativeFromRoot)) {
|
|
19958
|
+
return null;
|
|
19959
|
+
}
|
|
19960
|
+
return resolved;
|
|
19961
|
+
}
|
|
19962
|
+
async function listRedirectFiles(dir) {
|
|
19963
|
+
const files = [];
|
|
19964
|
+
await walk(dir, files);
|
|
19965
|
+
files.sort();
|
|
19966
|
+
return files;
|
|
19967
|
+
}
|
|
19968
|
+
async function walk(dir, files) {
|
|
19969
|
+
const entries = await readdir(dir);
|
|
19970
|
+
for (const entry of entries) {
|
|
19971
|
+
const fullPath = join3(dir, entry);
|
|
19972
|
+
const stats = await lstat(fullPath);
|
|
19973
|
+
if (stats.isDirectory()) {
|
|
19974
|
+
await walk(fullPath, files);
|
|
19975
|
+
} else if (stats.isFile() && SUPPORTED_EXTENSIONS.has(extname(fullPath).toLowerCase())) {
|
|
19976
|
+
files.push(fullPath);
|
|
19977
|
+
}
|
|
19978
|
+
}
|
|
19979
|
+
}
|
|
19980
|
+
async function parseRedirectFile(file, remaining, warnings, cwd) {
|
|
19981
|
+
const rel = relative3(cwd, file) || file;
|
|
19982
|
+
const ext = extname(file).toLowerCase();
|
|
19983
|
+
let content;
|
|
19984
|
+
try {
|
|
19985
|
+
content = stripBom(await readFile(file, "utf8"));
|
|
19986
|
+
} catch (err) {
|
|
19987
|
+
warnings.push(
|
|
19988
|
+
`Failed to read bulk redirects file "${rel}": ${errorMessage(err)}`
|
|
19989
|
+
);
|
|
19990
|
+
return [];
|
|
19991
|
+
}
|
|
19992
|
+
try {
|
|
19993
|
+
if (ext === ".csv") {
|
|
19994
|
+
return parseCsvRedirects(content, remaining, warnings, rel);
|
|
19995
|
+
}
|
|
19996
|
+
if (ext === ".jsonl") {
|
|
19997
|
+
return parseJsonlRedirects(content, remaining, warnings, rel);
|
|
19998
|
+
}
|
|
19999
|
+
return parseJsonRedirects(content, remaining, warnings, rel);
|
|
20000
|
+
} catch (err) {
|
|
20001
|
+
warnings.push(
|
|
20002
|
+
`Failed to parse bulk redirects file "${rel}": ${errorMessage(err)}`
|
|
20003
|
+
);
|
|
20004
|
+
return [];
|
|
20005
|
+
}
|
|
20006
|
+
}
|
|
20007
|
+
function parseJsonRedirects(content, remaining, warnings, rel) {
|
|
20008
|
+
const parsed = JSON.parse(content);
|
|
20009
|
+
if (!Array.isArray(parsed)) {
|
|
20010
|
+
warnings.push(
|
|
20011
|
+
`Bulk redirects file "${rel}" must contain a JSON array of redirects.`
|
|
20012
|
+
);
|
|
20013
|
+
return [];
|
|
20014
|
+
}
|
|
20015
|
+
return normalizeRedirects(parsed, remaining, warnings, rel);
|
|
20016
|
+
}
|
|
20017
|
+
function parseJsonlRedirects(content, remaining, warnings, rel) {
|
|
20018
|
+
const rows = [];
|
|
20019
|
+
const lines = content.split(/\r?\n/);
|
|
20020
|
+
for (let i = 0; i < lines.length; i++) {
|
|
20021
|
+
const line = lines[i].trim();
|
|
20022
|
+
if (!line) {
|
|
20023
|
+
continue;
|
|
20024
|
+
}
|
|
20025
|
+
try {
|
|
20026
|
+
rows.push(JSON.parse(line));
|
|
20027
|
+
} catch {
|
|
20028
|
+
warnings.push(`Skipping invalid JSONL in "${rel}" at line ${i + 1}.`);
|
|
20029
|
+
}
|
|
20030
|
+
}
|
|
20031
|
+
return normalizeRedirects(rows, remaining, warnings, rel);
|
|
20032
|
+
}
|
|
20033
|
+
var CSV_HEADER_ALIASES = {
|
|
20034
|
+
source: "source",
|
|
20035
|
+
destination: "destination",
|
|
20036
|
+
permanent: "permanent",
|
|
20037
|
+
statuscode: "statusCode",
|
|
20038
|
+
casesensitive: "caseSensitive",
|
|
20039
|
+
preservequeryparams: "preserveQueryParams"
|
|
20040
|
+
};
|
|
20041
|
+
function parseCsvRedirects(content, remaining, warnings, rel) {
|
|
20042
|
+
const lines = content.split(/\r?\n/).filter((line) => line.trim().length > 0);
|
|
20043
|
+
if (lines.length === 0) {
|
|
20044
|
+
warnings.push(`Bulk redirects CSV "${rel}" is empty.`);
|
|
20045
|
+
return [];
|
|
20046
|
+
}
|
|
20047
|
+
const headers = parseCsvLine(lines[0]).map(
|
|
20048
|
+
(header) => CSV_HEADER_ALIASES[header.trim().toLowerCase()]
|
|
20049
|
+
);
|
|
20050
|
+
if (!headers.includes("source") || !headers.includes("destination")) {
|
|
20051
|
+
warnings.push(
|
|
20052
|
+
`Bulk redirects CSV "${rel}" must have "source" and "destination" columns.`
|
|
20053
|
+
);
|
|
20054
|
+
return [];
|
|
20055
|
+
}
|
|
20056
|
+
const rows = [];
|
|
20057
|
+
for (let i = 1; i < lines.length; i++) {
|
|
20058
|
+
const values = parseCsvLine(lines[i]);
|
|
20059
|
+
const row = {};
|
|
20060
|
+
for (let col = 0; col < headers.length; col++) {
|
|
20061
|
+
const header = headers[col];
|
|
20062
|
+
if (header) {
|
|
20063
|
+
row[header] = values[col] ?? "";
|
|
20064
|
+
}
|
|
20065
|
+
}
|
|
20066
|
+
rows.push(row);
|
|
20067
|
+
}
|
|
20068
|
+
return normalizeRedirects(rows, remaining, warnings, rel);
|
|
20069
|
+
}
|
|
20070
|
+
function normalizeRedirects(rows, remaining, warnings, rel) {
|
|
20071
|
+
const redirects = [];
|
|
20072
|
+
for (let i = 0; i < rows.length; i++) {
|
|
20073
|
+
if (redirects.length >= remaining) {
|
|
20074
|
+
warnings.push(
|
|
20075
|
+
`Bulk redirects limit of ${MAX_REDIRECTS} reached while reading "${rel}"; remaining entries were skipped.`
|
|
20076
|
+
);
|
|
20077
|
+
break;
|
|
20078
|
+
}
|
|
20079
|
+
const row = rows[i];
|
|
20080
|
+
if (!row || typeof row !== "object") {
|
|
20081
|
+
warnings.push(`Skipping invalid redirect in "${rel}" at index ${i}.`);
|
|
20082
|
+
continue;
|
|
20083
|
+
}
|
|
20084
|
+
const record = row;
|
|
20085
|
+
const source = asTrimmedString(record.source);
|
|
20086
|
+
const destination = asTrimmedString(record.destination);
|
|
20087
|
+
if (!source || !destination) {
|
|
20088
|
+
warnings.push(
|
|
20089
|
+
`Skipping redirect in "${rel}" at index ${i}: source and destination are required.`
|
|
20090
|
+
);
|
|
20091
|
+
continue;
|
|
20092
|
+
}
|
|
20093
|
+
if (source.length > MAX_URL_LENGTH || destination.length > MAX_URL_LENGTH) {
|
|
20094
|
+
warnings.push(
|
|
20095
|
+
`Skipping redirect in "${rel}" at index ${i}: source and destination must be at most ${MAX_URL_LENGTH} characters.`
|
|
20096
|
+
);
|
|
20097
|
+
continue;
|
|
20098
|
+
}
|
|
20099
|
+
let statusCode;
|
|
20100
|
+
if (record.statusCode !== void 0 && record.statusCode !== "") {
|
|
20101
|
+
const parsedStatus = parseStatusCode(record.statusCode);
|
|
20102
|
+
if (parsedStatus === void 0) {
|
|
20103
|
+
warnings.push(
|
|
20104
|
+
`Skipping redirect in "${rel}" at index ${i}: statusCode must be one of ${[...VALID_STATUS_CODES].join(", ")}.`
|
|
20105
|
+
);
|
|
20106
|
+
continue;
|
|
20107
|
+
}
|
|
20108
|
+
statusCode = parsedStatus;
|
|
20109
|
+
} else {
|
|
20110
|
+
const permanent = parseBoolean(record.permanent) ?? false;
|
|
20111
|
+
statusCode = permanent ? 308 : 307;
|
|
20112
|
+
}
|
|
20113
|
+
redirects.push({
|
|
20114
|
+
source,
|
|
20115
|
+
destination,
|
|
20116
|
+
statusCode,
|
|
20117
|
+
caseSensitive: parseBoolean(record.caseSensitive) ?? false,
|
|
20118
|
+
preserveQueryParams: parseBoolean(record.preserveQueryParams) ?? false
|
|
20119
|
+
});
|
|
20120
|
+
}
|
|
20121
|
+
return redirects;
|
|
20122
|
+
}
|
|
20123
|
+
function parseSource(source) {
|
|
20124
|
+
if (/^https?:\/\//i.test(source)) {
|
|
20125
|
+
try {
|
|
20126
|
+
const parsed = new URL(source);
|
|
20127
|
+
return {
|
|
20128
|
+
host: parsed.hostname.toLowerCase(),
|
|
20129
|
+
pathname: parsed.pathname || "/"
|
|
20130
|
+
};
|
|
20131
|
+
} catch {
|
|
20132
|
+
return { host: null, pathname: source };
|
|
20133
|
+
}
|
|
20134
|
+
}
|
|
20135
|
+
return { host: null, pathname: source || "/" };
|
|
20136
|
+
}
|
|
20137
|
+
function hostPathKey(host, pathname) {
|
|
20138
|
+
return `${host}\0${pathname}`;
|
|
20139
|
+
}
|
|
20140
|
+
function hostnameFromHostHeader(hostHeader) {
|
|
20141
|
+
const trimmed = hostHeader.trim();
|
|
20142
|
+
if (!trimmed) {
|
|
20143
|
+
return "";
|
|
20144
|
+
}
|
|
20145
|
+
if (trimmed.startsWith("[")) {
|
|
20146
|
+
const end = trimmed.indexOf("]");
|
|
20147
|
+
return end === -1 ? trimmed.toLowerCase() : trimmed.slice(1, end).toLowerCase();
|
|
20148
|
+
}
|
|
20149
|
+
const colon = trimmed.lastIndexOf(":");
|
|
20150
|
+
if (colon !== -1 && trimmed.indexOf(":") === colon) {
|
|
20151
|
+
return trimmed.slice(0, colon).toLowerCase();
|
|
20152
|
+
}
|
|
20153
|
+
return trimmed.toLowerCase();
|
|
20154
|
+
}
|
|
20155
|
+
function parseBoolean(value) {
|
|
20156
|
+
if (typeof value === "boolean") {
|
|
20157
|
+
return value;
|
|
20158
|
+
}
|
|
20159
|
+
if (typeof value === "number") {
|
|
20160
|
+
if (value === 1)
|
|
20161
|
+
return true;
|
|
20162
|
+
if (value === 0)
|
|
20163
|
+
return false;
|
|
20164
|
+
return void 0;
|
|
20165
|
+
}
|
|
20166
|
+
if (typeof value !== "string") {
|
|
20167
|
+
return void 0;
|
|
20168
|
+
}
|
|
20169
|
+
const normalized = value.trim().toLowerCase();
|
|
20170
|
+
if (normalized === "t" || normalized === "true") {
|
|
20171
|
+
return true;
|
|
20172
|
+
}
|
|
20173
|
+
if (normalized === "f" || normalized === "false") {
|
|
20174
|
+
return false;
|
|
20175
|
+
}
|
|
20176
|
+
return void 0;
|
|
20177
|
+
}
|
|
20178
|
+
function parseStatusCode(value) {
|
|
20179
|
+
const n = typeof value === "number" ? value : typeof value === "string" ? Number(value.trim()) : NaN;
|
|
20180
|
+
return VALID_STATUS_CODES.has(n) ? n : void 0;
|
|
20181
|
+
}
|
|
20182
|
+
function asTrimmedString(value) {
|
|
20183
|
+
if (typeof value !== "string") {
|
|
20184
|
+
return void 0;
|
|
20185
|
+
}
|
|
20186
|
+
const trimmed = value.trim();
|
|
20187
|
+
return trimmed ? trimmed : void 0;
|
|
20188
|
+
}
|
|
20189
|
+
function parseCsvLine(line) {
|
|
20190
|
+
const fields = [];
|
|
20191
|
+
let current = "";
|
|
20192
|
+
let inQuotes = false;
|
|
20193
|
+
for (let i = 0; i < line.length; i++) {
|
|
20194
|
+
const char = line[i];
|
|
20195
|
+
if (inQuotes) {
|
|
20196
|
+
if (char === '"') {
|
|
20197
|
+
if (line[i + 1] === '"') {
|
|
20198
|
+
current += '"';
|
|
20199
|
+
i++;
|
|
20200
|
+
} else {
|
|
20201
|
+
inQuotes = false;
|
|
20202
|
+
}
|
|
20203
|
+
} else {
|
|
20204
|
+
current += char;
|
|
20205
|
+
}
|
|
20206
|
+
} else if (char === '"') {
|
|
20207
|
+
inQuotes = true;
|
|
20208
|
+
} else if (char === ",") {
|
|
20209
|
+
fields.push(current);
|
|
20210
|
+
current = "";
|
|
20211
|
+
} else {
|
|
20212
|
+
current += char;
|
|
20213
|
+
}
|
|
20214
|
+
}
|
|
20215
|
+
fields.push(current);
|
|
20216
|
+
return fields;
|
|
20217
|
+
}
|
|
20218
|
+
function stripBom(content) {
|
|
20219
|
+
return content.charCodeAt(0) === 65279 ? content.slice(1) : content;
|
|
20220
|
+
}
|
|
20221
|
+
function isNotFound(err) {
|
|
20222
|
+
return typeof err === "object" && err !== null && "code" in err && err.code === "ENOENT";
|
|
20223
|
+
}
|
|
20224
|
+
function errorMessage(err) {
|
|
20225
|
+
return err instanceof Error ? err.message : String(err);
|
|
20226
|
+
}
|
|
20227
|
+
|
|
19765
20228
|
// src/util/dev/server.ts
|
|
19766
20229
|
var DEV_SERVER_PORT_BIND_TIMEOUT = (0, import_ms4.default)("5m");
|
|
19767
20230
|
var DEV_QUEUES_DEFAULT_VISIBILITY_TIMEOUT_SECONDS = 60;
|
|
@@ -19803,7 +20266,7 @@ var DevServer = class {
|
|
|
19803
20266
|
this.getVercelConfigPromise = null;
|
|
19804
20267
|
};
|
|
19805
20268
|
this.getExtensionlessFile = (path6) => {
|
|
19806
|
-
const ext =
|
|
20269
|
+
const ext = extname2(path6);
|
|
19807
20270
|
if (this.apiDir && path6.startsWith(this.apiDir + "/") && this.apiExtensions.has(ext)) {
|
|
19808
20271
|
return path6.slice(0, -ext.length);
|
|
19809
20272
|
}
|
|
@@ -20072,6 +20535,26 @@ ${partHeaders}\r
|
|
|
20072
20535
|
return;
|
|
20073
20536
|
}
|
|
20074
20537
|
}
|
|
20538
|
+
if (callLevel === 0 && this.bulkRedirects) {
|
|
20539
|
+
const bulkMatch = resolveBulkRedirect(
|
|
20540
|
+
this.bulkRedirects,
|
|
20541
|
+
req.url || "/",
|
|
20542
|
+
typeof req.headers.host === "string" ? req.headers.host : void 0
|
|
20543
|
+
);
|
|
20544
|
+
if (bulkMatch) {
|
|
20545
|
+
debug(
|
|
20546
|
+
`Bulk redirect ${bulkMatch.statusCode}: ${req.url} -> ${bulkMatch.location}`
|
|
20547
|
+
);
|
|
20548
|
+
await this.sendRedirect(
|
|
20549
|
+
req,
|
|
20550
|
+
res,
|
|
20551
|
+
requestId,
|
|
20552
|
+
bulkMatch.location,
|
|
20553
|
+
bulkMatch.statusCode
|
|
20554
|
+
);
|
|
20555
|
+
return;
|
|
20556
|
+
}
|
|
20557
|
+
}
|
|
20075
20558
|
if (callLevel === 0 && this.orchestrator) {
|
|
20076
20559
|
const pathname = parsed.pathname || "/";
|
|
20077
20560
|
const service = this.orchestrator.getServiceForRoute(pathname);
|
|
@@ -20135,7 +20618,11 @@ ${partHeaders}\r
|
|
|
20135
20618
|
entrypoint: middleware.entrypoint,
|
|
20136
20619
|
workPath,
|
|
20137
20620
|
repoRootPath: this.repoRoot,
|
|
20138
|
-
|
|
20621
|
+
// `projectSettings.createdAt` decides the default middleware runtime.
|
|
20622
|
+
config: {
|
|
20623
|
+
projectSettings: this.projectSettings,
|
|
20624
|
+
...middleware.config
|
|
20625
|
+
},
|
|
20139
20626
|
meta: {
|
|
20140
20627
|
isDev: true,
|
|
20141
20628
|
devCacheDir,
|
|
@@ -20220,7 +20707,7 @@ ${partHeaders}\r
|
|
|
20220
20707
|
prevUrl = rewritePath;
|
|
20221
20708
|
const beforeRewriteUrl = req.url || "/";
|
|
20222
20709
|
if (isURL(rewritePath)) {
|
|
20223
|
-
const rewriteUrlParsed = new
|
|
20710
|
+
const rewriteUrlParsed = new URL2(rewritePath);
|
|
20224
20711
|
if (this.address.origin === rewriteUrlParsed.origin) {
|
|
20225
20712
|
req.url = rewritePath.slice(rewriteUrlParsed.origin.length) || "/";
|
|
20226
20713
|
prevUrl = req.url;
|
|
@@ -20767,11 +21254,16 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20767
21254
|
this.stopping = false;
|
|
20768
21255
|
this.buildMatches = /* @__PURE__ */ new Map();
|
|
20769
21256
|
this.inProgressBuilds = /* @__PURE__ */ new Map();
|
|
20770
|
-
this.devCacheDir =
|
|
21257
|
+
this.devCacheDir = join4(getVercelDirectory(cwd), "cache");
|
|
20771
21258
|
this.vercelConfigWarning = false;
|
|
20772
21259
|
this.getVercelConfigPromise = null;
|
|
20773
21260
|
this.blockingBuildsPromise = null;
|
|
20774
21261
|
this.startPromise = null;
|
|
21262
|
+
this.bulkRedirects = null;
|
|
21263
|
+
this.bulkRedirectsSignature = null;
|
|
21264
|
+
this.bulkRedirectsLastPath = null;
|
|
21265
|
+
this.bulkRedirectsResolvedPath = null;
|
|
21266
|
+
this.bulkRedirectsDirty = true;
|
|
20775
21267
|
this.watchAggregationId = null;
|
|
20776
21268
|
this.watchAggregationEvents = [];
|
|
20777
21269
|
this.watchAggregationTimeout = 500;
|
|
@@ -20861,6 +21353,9 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20861
21353
|
process.exit(code);
|
|
20862
21354
|
}
|
|
20863
21355
|
enqueueFsEvent(type, path6) {
|
|
21356
|
+
if (this.bulkRedirectsResolvedPath && (path6 === this.bulkRedirectsResolvedPath || path6.startsWith(this.bulkRedirectsResolvedPath + sep2))) {
|
|
21357
|
+
this.bulkRedirectsDirty = true;
|
|
21358
|
+
}
|
|
20864
21359
|
this.watchAggregationEvents.push({ type, path: path6 });
|
|
20865
21360
|
if (this.watchAggregationId === null) {
|
|
20866
21361
|
this.watchAggregationId = setTimeout(() => {
|
|
@@ -21064,7 +21559,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21064
21559
|
);
|
|
21065
21560
|
}
|
|
21066
21561
|
async getLocalEnv(fileName, base) {
|
|
21067
|
-
const filePath =
|
|
21562
|
+
const filePath = join4(this.cwd, fileName);
|
|
21068
21563
|
let env = {};
|
|
21069
21564
|
try {
|
|
21070
21565
|
const dotenv = await import_fs_extra.default.readFile(filePath, "utf8");
|
|
@@ -21118,7 +21613,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21118
21613
|
return void 0;
|
|
21119
21614
|
}
|
|
21120
21615
|
async _getVercelConfig() {
|
|
21121
|
-
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-
|
|
21616
|
+
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-DGM4NISW.js");
|
|
21122
21617
|
await compileVercelConfig(this.cwd);
|
|
21123
21618
|
const configPath = getLocalPathConfig(this.cwd);
|
|
21124
21619
|
const [
|
|
@@ -21212,7 +21707,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21212
21707
|
vercelConfig.routes = routes;
|
|
21213
21708
|
} else if (hasResolvedServices && vercelConfig.proxy) {
|
|
21214
21709
|
const { entrypoint } = vercelConfig.proxy;
|
|
21215
|
-
if (!await import_fs_extra.default.pathExists(
|
|
21710
|
+
if (!await import_fs_extra.default.pathExists(join4(this.cwd, entrypoint))) {
|
|
21216
21711
|
output_manager_default.error(
|
|
21217
21712
|
`The proxy entrypoint \`${entrypoint}\` does not exist. Set \`proxy.entrypoint\` to an existing \`.js\` or \`.ts\` file.`
|
|
21218
21713
|
);
|
|
@@ -21297,16 +21792,54 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21297
21792
|
if (this.initialDevCommandStarted) {
|
|
21298
21793
|
await this.runDevCommand();
|
|
21299
21794
|
}
|
|
21795
|
+
await this.refreshBulkRedirects(vercelConfig.bulkRedirectsPath);
|
|
21300
21796
|
return vercelConfig;
|
|
21301
21797
|
}
|
|
21798
|
+
async refreshBulkRedirects(bulkRedirectsPath) {
|
|
21799
|
+
const configPath = bulkRedirectsPath ?? null;
|
|
21800
|
+
if (configPath === this.bulkRedirectsLastPath && !this.bulkRedirectsDirty) {
|
|
21801
|
+
return;
|
|
21802
|
+
}
|
|
21803
|
+
this.bulkRedirectsLastPath = configPath;
|
|
21804
|
+
this.bulkRedirectsDirty = false;
|
|
21805
|
+
this.bulkRedirectsResolvedPath = configPath ? resolveBulkRedirectsPath(this.cwd, configPath) : null;
|
|
21806
|
+
if (!configPath) {
|
|
21807
|
+
this.bulkRedirects = null;
|
|
21808
|
+
this.bulkRedirectsSignature = null;
|
|
21809
|
+
return;
|
|
21810
|
+
}
|
|
21811
|
+
const signature = await getBulkRedirectsSignature(this.cwd, configPath);
|
|
21812
|
+
if (signature === this.bulkRedirectsSignature) {
|
|
21813
|
+
return;
|
|
21814
|
+
}
|
|
21815
|
+
this.bulkRedirectsSignature = signature;
|
|
21816
|
+
try {
|
|
21817
|
+
const result = await loadBulkRedirects(this.cwd, configPath);
|
|
21818
|
+
this.bulkRedirects = result.table;
|
|
21819
|
+
for (const warning of result.warnings) {
|
|
21820
|
+
output_manager_default.warn(warning);
|
|
21821
|
+
}
|
|
21822
|
+
const count = result.table.size;
|
|
21823
|
+
if (count > 0) {
|
|
21824
|
+
output_manager_default.log(
|
|
21825
|
+
`Loaded ${count} bulk ${(0, import_pluralize2.default)("redirect", count)} from ${configPath}`
|
|
21826
|
+
);
|
|
21827
|
+
}
|
|
21828
|
+
} catch (err) {
|
|
21829
|
+
this.bulkRedirects = null;
|
|
21830
|
+
output_manager_default.warn(
|
|
21831
|
+
`Failed to load bulk redirects from "${configPath}": ${(0, import_error_utils.errorToString)(err)}`
|
|
21832
|
+
);
|
|
21833
|
+
}
|
|
21834
|
+
}
|
|
21302
21835
|
async readJsonFile(filePath) {
|
|
21303
21836
|
let rel, abs;
|
|
21304
|
-
if (
|
|
21837
|
+
if (isAbsolute3(filePath)) {
|
|
21305
21838
|
rel = path4.relative(this.cwd, filePath);
|
|
21306
21839
|
abs = filePath;
|
|
21307
21840
|
} else {
|
|
21308
21841
|
rel = filePath;
|
|
21309
|
-
abs =
|
|
21842
|
+
abs = join4(this.cwd, filePath);
|
|
21310
21843
|
}
|
|
21311
21844
|
output_manager_default.debug(`Reading \`${rel}\` file`);
|
|
21312
21845
|
try {
|
|
@@ -21451,7 +21984,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21451
21984
|
}
|
|
21452
21985
|
}
|
|
21453
21986
|
}
|
|
21454
|
-
this._address = new
|
|
21987
|
+
this._address = new URL2(replaceLocalhost(address));
|
|
21455
21988
|
const vercelConfig = await this.getVercelConfig();
|
|
21456
21989
|
let devCommandPromise;
|
|
21457
21990
|
const startDevCommand = () => {
|
|
@@ -21721,7 +22254,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21721
22254
|
this.setResponseHeaders(res, requestId, headers);
|
|
21722
22255
|
const http_status_description = generateHttpStatusDescription(statusCode);
|
|
21723
22256
|
const error_code = errorCode || http_status_description;
|
|
21724
|
-
const
|
|
22257
|
+
const errorMessage2 = generateErrorMessage(statusCode, error_code);
|
|
21725
22258
|
let body;
|
|
21726
22259
|
const { accept = "text/plain" } = req.headers;
|
|
21727
22260
|
if (accept.includes("json")) {
|
|
@@ -21729,7 +22262,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21729
22262
|
const json = JSON.stringify({
|
|
21730
22263
|
error: {
|
|
21731
22264
|
code: statusCode,
|
|
21732
|
-
message:
|
|
22265
|
+
message: errorMessage2.title
|
|
21733
22266
|
}
|
|
21734
22267
|
});
|
|
21735
22268
|
body = `${json}
|
|
@@ -21739,7 +22272,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21739
22272
|
let view;
|
|
21740
22273
|
if (statusCode === 404) {
|
|
21741
22274
|
view = error_404({
|
|
21742
|
-
...
|
|
22275
|
+
...errorMessage2,
|
|
21743
22276
|
http_status_code: statusCode,
|
|
21744
22277
|
http_status_description,
|
|
21745
22278
|
error_code,
|
|
@@ -21747,7 +22280,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21747
22280
|
});
|
|
21748
22281
|
} else if (statusCode === 502) {
|
|
21749
22282
|
view = error_502({
|
|
21750
|
-
...
|
|
22283
|
+
...errorMessage2,
|
|
21751
22284
|
http_status_code: statusCode,
|
|
21752
22285
|
http_status_description,
|
|
21753
22286
|
error_code,
|
|
@@ -21768,7 +22301,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21768
22301
|
});
|
|
21769
22302
|
} else {
|
|
21770
22303
|
res.setHeader("content-type", "text/plain; charset=utf-8");
|
|
21771
|
-
body = `${
|
|
22304
|
+
body = `${errorMessage2.title}
|
|
21772
22305
|
|
|
21773
22306
|
${error_code}
|
|
21774
22307
|
`;
|
|
@@ -22057,7 +22590,7 @@ ${error_code}
|
|
|
22057
22590
|
base = rel.split("/")[0];
|
|
22058
22591
|
href = `/${prefix}${base}/`;
|
|
22059
22592
|
} else {
|
|
22060
|
-
ext =
|
|
22593
|
+
ext = extname2(p).substring(1);
|
|
22061
22594
|
href = `/${prefix}${base}`;
|
|
22062
22595
|
}
|
|
22063
22596
|
return {
|
|
@@ -22224,12 +22757,12 @@ function serveStaticFile(req, res, cwd, opts) {
|
|
|
22224
22757
|
});
|
|
22225
22758
|
}
|
|
22226
22759
|
function close(server) {
|
|
22227
|
-
return new Promise((
|
|
22760
|
+
return new Promise((resolve3, reject) => {
|
|
22228
22761
|
server.close((err) => {
|
|
22229
22762
|
if (err) {
|
|
22230
22763
|
reject(err);
|
|
22231
22764
|
} else {
|
|
22232
|
-
|
|
22765
|
+
resolve3();
|
|
22233
22766
|
}
|
|
22234
22767
|
});
|
|
22235
22768
|
});
|
|
@@ -22261,7 +22794,7 @@ async function findBuildMatch(matches, files, requestPath, devServer, vercelConf
|
|
|
22261
22794
|
if (!isIndex(match.src)) {
|
|
22262
22795
|
return match;
|
|
22263
22796
|
} else {
|
|
22264
|
-
if (
|
|
22797
|
+
if (extname2(match.src) === ".html") {
|
|
22265
22798
|
return match;
|
|
22266
22799
|
}
|
|
22267
22800
|
bestIndexMatch = match;
|
|
@@ -22353,7 +22886,7 @@ function dirnameWithoutDot(path6) {
|
|
|
22353
22886
|
return dir;
|
|
22354
22887
|
}
|
|
22355
22888
|
function isIndex(path6) {
|
|
22356
|
-
const ext =
|
|
22889
|
+
const ext = extname2(path6);
|
|
22357
22890
|
const name = basename(path6, ext);
|
|
22358
22891
|
return name === "index";
|
|
22359
22892
|
}
|
|
@@ -22490,8 +23023,8 @@ function millisToSecs(millis) {
|
|
|
22490
23023
|
}
|
|
22491
23024
|
|
|
22492
23025
|
// src/util/dev/dev-lock.ts
|
|
22493
|
-
import { join as
|
|
22494
|
-
import { mkdir, open, unlink, readFile } from "fs/promises";
|
|
23026
|
+
import { join as join5 } from "path";
|
|
23027
|
+
import { mkdir, open, unlink, readFile as readFile2 } from "fs/promises";
|
|
22495
23028
|
import { unlinkSync as unlinkSync2, constants } from "fs";
|
|
22496
23029
|
var DEV_LOCK_FILE = "dev.lock";
|
|
22497
23030
|
function isProcessRunning(pid) {
|
|
@@ -22520,15 +23053,15 @@ async function tryCreateLockFile(lockPath, content) {
|
|
|
22520
23053
|
}
|
|
22521
23054
|
async function tryReadLockFile(lockPath) {
|
|
22522
23055
|
try {
|
|
22523
|
-
const content = await
|
|
23056
|
+
const content = await readFile2(lockPath, "utf8");
|
|
22524
23057
|
return JSON.parse(content);
|
|
22525
23058
|
} catch {
|
|
22526
23059
|
return null;
|
|
22527
23060
|
}
|
|
22528
23061
|
}
|
|
22529
23062
|
async function acquireDevLock(projectRoot, port) {
|
|
22530
|
-
const vercelDir =
|
|
22531
|
-
const lockPath =
|
|
23063
|
+
const vercelDir = join5(projectRoot, VERCEL_DIR);
|
|
23064
|
+
const lockPath = join5(vercelDir, DEV_LOCK_FILE);
|
|
22532
23065
|
await mkdir(vercelDir, { recursive: true });
|
|
22533
23066
|
const lockData = {
|
|
22534
23067
|
pid: process.pid,
|
|
@@ -22576,7 +23109,7 @@ async function acquireDevLock(projectRoot, port) {
|
|
|
22576
23109
|
};
|
|
22577
23110
|
}
|
|
22578
23111
|
function releaseDevLock(projectRoot) {
|
|
22579
|
-
const lockPath =
|
|
23112
|
+
const lockPath = join5(projectRoot, VERCEL_DIR, DEV_LOCK_FILE);
|
|
22580
23113
|
try {
|
|
22581
23114
|
unlinkSync2(lockPath);
|
|
22582
23115
|
} catch (err) {
|
|
@@ -22587,7 +23120,7 @@ function releaseDevLock(projectRoot) {
|
|
|
22587
23120
|
// src/commands/dev/dev.ts
|
|
22588
23121
|
async function dev(client, opts, args2, telemetry, localConfig) {
|
|
22589
23122
|
const [dir = "."] = args2;
|
|
22590
|
-
let cwd =
|
|
23123
|
+
let cwd = resolve2(dir);
|
|
22591
23124
|
const listen2 = parseListen(opts["--listen"] || "3000");
|
|
22592
23125
|
cwd = await resolveProjectCwd(cwd);
|
|
22593
23126
|
const projectNameOrId = opts["--project"];
|
|
@@ -22674,7 +23207,7 @@ To link your project, run ${getCommandName("dev")} without \`-L\` or \`--local\`
|
|
|
22674
23207
|
projectId = project.id;
|
|
22675
23208
|
orgId = org.id;
|
|
22676
23209
|
if (project.rootDirectory) {
|
|
22677
|
-
cwd =
|
|
23210
|
+
cwd = join6(cwd, project.rootDirectory);
|
|
22678
23211
|
}
|
|
22679
23212
|
envValues = (await pullEnvRecords(client, project.id, "vercel-cli:dev")).env;
|
|
22680
23213
|
}
|
|
@@ -22810,7 +23343,7 @@ To link your project, run ${getCommandName("dev")} without \`-L\` or \`--local\`
|
|
|
22810
23343
|
process.on("SIGINT", async () => await cleanup("SIGINT"));
|
|
22811
23344
|
process.on("SIGHUP", async () => await cleanup("SIGHUP"));
|
|
22812
23345
|
if (!devServer.devCommand) {
|
|
22813
|
-
const outputDir =
|
|
23346
|
+
const outputDir = join6(cwd, import_write_build_result.OUTPUT_DIR);
|
|
22814
23347
|
if (await import_fs_extra2.default.pathExists(outputDir)) {
|
|
22815
23348
|
output_manager_default.log(`Removing ${import_write_build_result.OUTPUT_DIR}`);
|
|
22816
23349
|
await import_fs_extra2.default.remove(outputDir);
|