vercel 56.2.1 → 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-YIAPBLSF.js → add-CF5SQESQ.js} +10 -13
- package/dist/chunks/{add-ZAQLTF5W.js → add-DMRGZN3Z.js} +9 -12
- package/dist/chunks/{chunk-75PKWYOS.js → chunk-22G26AIX.js} +99 -74
- package/dist/chunks/{chunk-7OJJKCSW.js → chunk-2C2JJTAM.js} +6 -10
- package/dist/chunks/{chunk-DDEPCAGE.js → chunk-2MXGTALG.js} +529 -164
- 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-NULWLKT7.js → chunk-4YOCOUDN.js} +4 -4
- package/dist/chunks/{chunk-GXBDQRHJ.js → chunk-4Z5LC2CI.js} +1 -1
- package/dist/chunks/{chunk-CMJMYVQM.js → chunk-6OMC3HOW.js} +1 -1
- package/dist/chunks/{chunk-JF7LPEBD.js → chunk-A6LE5VAN.js} +1 -1
- package/dist/chunks/{chunk-QY63UKTP.js → chunk-DMSLNAVH.js} +2 -2
- package/dist/chunks/{chunk-52V5NDUN.js → chunk-DZHRFBKE.js} +2 -2
- package/dist/chunks/{chunk-MYD7N6MH.js → chunk-ERPZJ4SX.js} +13 -3
- package/dist/chunks/{chunk-YKJA5TVC.js → chunk-EYNXG3FO.js} +3 -5
- package/dist/chunks/{chunk-RLJA2KI7.js → chunk-FYQPTH5C.js} +2 -4
- package/dist/chunks/{chunk-7TJLLZPN.js → chunk-G4PG5HVE.js} +6 -10
- package/dist/chunks/{chunk-7C7MMT4J.js → chunk-GIL3VAUR.js} +2 -4
- package/dist/chunks/{chunk-GPVU6JRS.js → chunk-HUKYQKVQ.js} +9 -7
- package/dist/chunks/{chunk-EPBUWIAO.js → chunk-I2IICWBW.js} +48 -24
- package/dist/chunks/{chunk-KXVQEPTA.js → chunk-ICSIFPXG.js} +3 -5
- package/dist/chunks/{chunk-P6AK7SVK.js → chunk-KSSNLCL4.js} +360 -25
- package/dist/chunks/{chunk-HIO4M75R.js → chunk-KXKQQIUS.js} +6 -10
- package/dist/chunks/{chunk-HA7C7SDO.js → chunk-LHFNIZ2P.js} +2 -4
- package/dist/chunks/{chunk-2I34TRQZ.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-PASZMRTZ.js → chunk-PRO4S2KV.js} +5 -5
- package/dist/chunks/{chunk-DD6D5J7E.js → chunk-Q5ADSH7D.js} +8 -12
- package/dist/chunks/{chunk-6ZVIC6FL.js → chunk-QP3C5YS5.js} +8 -8
- package/dist/chunks/{chunk-5HNYJHOB.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-VOBBH2SB.js → chunk-W346YNDN.js} +0 -49
- package/dist/chunks/{chunk-7S3QUMIG.js → chunk-YS6EDZHB.js} +3 -5
- package/dist/chunks/{chunk-UESEGACQ.js → chunk-ZDCS54ZZ.js} +3 -3
- package/dist/chunks/{chunk-4RGSUV5C.js → chunk-ZVLPUREX.js} +2 -2
- package/dist/chunks/{compile-vercel-config-4NKPN3EG.js → compile-vercel-config-RPPL7W56.js} +4 -4
- package/dist/chunks/{delete-NCMDC3IU.js → delete-QBVZ5X6B.js} +14 -14
- package/dist/chunks/{disable-Z7DXY4AY.js → disable-YYGXPXBI.js} +14 -13
- package/dist/chunks/{discard-4ILK3ULP.js → discard-X2MSUFGI.js} +13 -12
- package/dist/chunks/{edit-ROJQCTWR.js → edit-3ABZQYUU.js} +17 -18
- package/dist/chunks/{enable-TAVCLAEC.js → enable-HUMYCGKA.js} +14 -13
- package/dist/chunks/{export-YTSIGJFX.js → export-KGHH4WAT.js} +15 -14
- package/dist/chunks/{image-LORSHERP.js → image-OO3WWKZV.js} +6 -8
- package/dist/chunks/{inspect-5C4UHSCT.js → inspect-5TNHHD2M.js} +10 -12
- package/dist/chunks/{inspect-OHDU2SVS.js → inspect-FNUCB7Y3.js} +8 -10
- package/dist/chunks/{inspect-L4UIWOXO.js → inspect-KSSQEAW7.js} +11 -15
- package/dist/chunks/{inspect-A2X7RTP4.js → inspect-Z6SSD2SR.js} +8 -10
- package/dist/chunks/{list-FGVDMSFN.js → list-TXNYRVJG.js} +8 -10
- package/dist/chunks/{list-P2B5MHON.js → list-X2AD3HCX.js} +10 -13
- package/dist/chunks/{login-4BK3VGII.js → login-SLPCZ2OF.js} +11 -14
- package/dist/chunks/{ls-YXKRRYTL.js → ls-2YSINRJ3.js} +10 -13
- package/dist/chunks/{ls-NU4D6TLG.js → ls-4QMJLQQL.js} +10 -13
- package/dist/chunks/{ls-WDRFGE2J.js → ls-C7MNQ4IK.js} +12 -15
- package/dist/chunks/{ls-RAC5LMTR.js → ls-QLTOY23G.js} +9 -12
- package/dist/chunks/{publish-DGF2TQCQ.js → publish-GV4LLLXP.js} +13 -12
- package/dist/chunks/{query-NWW6RDHK.js → query-3AHRMAPA.js} +10 -12
- package/dist/chunks/{reorder-TTZBKCEB.js → reorder-VSVOPNM4.js} +17 -16
- package/dist/chunks/{restore-DG3LZMHQ.js → restore-FKYCF73P.js} +19 -18
- package/dist/chunks/{rm-7WXXLTXF.js → rm-4QCXZRC2.js} +10 -13
- package/dist/chunks/{rm-U2DFRDKE.js → rm-UTFG42FN.js} +8 -11
- package/dist/chunks/{rm-2VBE4C2V.js → rm-YV5WQKQM.js} +9 -12
- package/dist/chunks/{rule-inspect-4NL3GGDB.js → rule-inspect-IONN4MTP.js} +9 -12
- package/dist/chunks/{rules-DABNOUNG.js → rules-S2KPV7HY.js} +9 -11
- package/dist/chunks/{schema-4RRRUUOO.js → schema-3LX3V2HE.js} +11 -12
- package/dist/chunks/{tags-MLX3AHHK.js → tags-CQ4FRIJ4.js} +5 -7
- package/dist/chunks/{types-2TPA6J4G.js → types-QKLIFDDP.js} +5 -5
- package/dist/chunks/{update-YXH7WWTN.js → update-U7OGHCP5.js} +9 -12
- package/dist/commands/build/index.js +26 -31
- package/dist/commands/deploy/index.js +57 -75
- package/dist/commands/dev/index.js +193 -159
- package/dist/commands/env/index.js +70 -47
- package/dist/commands/link/index.js +25 -29
- package/dist/commands/list/index.js +13 -17
- package/dist/commands-bulk.js +637 -620
- package/dist/index.js +23 -25
- package/dist/version.mjs +1 -1
- package/package.json +20 -20
- package/dist/chunks/chunk-DWU7JOO6.js +0 -158
- package/dist/chunks/chunk-IC4YEIGW.js +0 -101
- package/dist/chunks/chunk-IMUF5MGV.js +0 -81
- package/dist/chunks/chunk-SGL3NMOP.js +0 -86
|
@@ -5,42 +5,55 @@ const require = __createRequire(import.meta.url);
|
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
|
+
AGENT_REASON,
|
|
9
|
+
AGENT_STATUS,
|
|
10
|
+
buildCommandWithGlobalFlags,
|
|
8
11
|
buildCommandWithYes,
|
|
9
12
|
getPreservedArgsForEnvPull,
|
|
13
|
+
omitGlobalFlagsFromArgs,
|
|
10
14
|
outputActionRequired,
|
|
11
|
-
outputAgentError
|
|
12
|
-
|
|
15
|
+
outputAgentError,
|
|
16
|
+
shouldEmitNonInteractiveCommandError
|
|
17
|
+
} from "./chunk-UDWRZXIT.js";
|
|
13
18
|
import {
|
|
14
19
|
TelemetryClient,
|
|
15
20
|
require_dist as require_dist2,
|
|
16
21
|
require_graceful_fs
|
|
17
22
|
} from "./chunk-ECCWJHC6.js";
|
|
18
23
|
import {
|
|
19
|
-
forceOption,
|
|
20
|
-
formatOption,
|
|
21
|
-
getFlagsSpecification,
|
|
22
24
|
parseArguments,
|
|
23
25
|
printError,
|
|
24
|
-
projectOption,
|
|
25
26
|
require_string_width,
|
|
26
|
-
require_strip_ansi
|
|
27
|
-
|
|
28
|
-
} from "./chunk-EHTPDXTS.js";
|
|
27
|
+
require_strip_ansi
|
|
28
|
+
} from "./chunk-SZXT3PDQ.js";
|
|
29
29
|
import {
|
|
30
30
|
APIError,
|
|
31
31
|
CantParseJSONFile,
|
|
32
|
+
CertConfigurationError,
|
|
33
|
+
CertError,
|
|
32
34
|
ConflictingConfigFiles,
|
|
35
|
+
DeploymentNotFound,
|
|
36
|
+
DeploymentPermissionDenied,
|
|
33
37
|
DeprecatedNowJson,
|
|
38
|
+
DomainNotFound,
|
|
39
|
+
InvalidDeploymentId,
|
|
34
40
|
InvalidToken,
|
|
35
41
|
MissingUser,
|
|
36
42
|
ProjectNotFound,
|
|
43
|
+
TeamDeleted,
|
|
44
|
+
TooManyRequests,
|
|
37
45
|
code,
|
|
46
|
+
forceOption,
|
|
47
|
+
formatOption,
|
|
38
48
|
getCommandName,
|
|
39
49
|
getCommandNamePlain,
|
|
50
|
+
getFlagsSpecification,
|
|
40
51
|
isAPIError,
|
|
41
52
|
packageName,
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
projectOption,
|
|
54
|
+
require_lib,
|
|
55
|
+
yesOption
|
|
56
|
+
} from "./chunk-KSSNLCL4.js";
|
|
44
57
|
import {
|
|
45
58
|
pkg_default
|
|
46
59
|
} from "./chunk-P4QNYOFB.js";
|
|
@@ -835,51 +848,51 @@ var require_uri_all = __commonJS({
|
|
|
835
848
|
}
|
|
836
849
|
return uriTokens.join("");
|
|
837
850
|
}
|
|
838
|
-
function resolveComponents(base2,
|
|
851
|
+
function resolveComponents(base2, relative3) {
|
|
839
852
|
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
840
853
|
var skipNormalization = arguments[3];
|
|
841
854
|
var target = {};
|
|
842
855
|
if (!skipNormalization) {
|
|
843
856
|
base2 = parse3(serialize(base2, options), options);
|
|
844
|
-
|
|
857
|
+
relative3 = parse3(serialize(relative3, options), options);
|
|
845
858
|
}
|
|
846
859
|
options = options || {};
|
|
847
|
-
if (!options.tolerant &&
|
|
848
|
-
target.scheme =
|
|
849
|
-
target.userinfo =
|
|
850
|
-
target.host =
|
|
851
|
-
target.port =
|
|
852
|
-
target.path = removeDotSegments(
|
|
853
|
-
target.query =
|
|
860
|
+
if (!options.tolerant && relative3.scheme) {
|
|
861
|
+
target.scheme = relative3.scheme;
|
|
862
|
+
target.userinfo = relative3.userinfo;
|
|
863
|
+
target.host = relative3.host;
|
|
864
|
+
target.port = relative3.port;
|
|
865
|
+
target.path = removeDotSegments(relative3.path || "");
|
|
866
|
+
target.query = relative3.query;
|
|
854
867
|
} else {
|
|
855
|
-
if (
|
|
856
|
-
target.userinfo =
|
|
857
|
-
target.host =
|
|
858
|
-
target.port =
|
|
859
|
-
target.path = removeDotSegments(
|
|
860
|
-
target.query =
|
|
868
|
+
if (relative3.userinfo !== void 0 || relative3.host !== void 0 || relative3.port !== void 0) {
|
|
869
|
+
target.userinfo = relative3.userinfo;
|
|
870
|
+
target.host = relative3.host;
|
|
871
|
+
target.port = relative3.port;
|
|
872
|
+
target.path = removeDotSegments(relative3.path || "");
|
|
873
|
+
target.query = relative3.query;
|
|
861
874
|
} else {
|
|
862
|
-
if (!
|
|
875
|
+
if (!relative3.path) {
|
|
863
876
|
target.path = base2.path;
|
|
864
|
-
if (
|
|
865
|
-
target.query =
|
|
877
|
+
if (relative3.query !== void 0) {
|
|
878
|
+
target.query = relative3.query;
|
|
866
879
|
} else {
|
|
867
880
|
target.query = base2.query;
|
|
868
881
|
}
|
|
869
882
|
} else {
|
|
870
|
-
if (
|
|
871
|
-
target.path = removeDotSegments(
|
|
883
|
+
if (relative3.path.charAt(0) === "/") {
|
|
884
|
+
target.path = removeDotSegments(relative3.path);
|
|
872
885
|
} else {
|
|
873
886
|
if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) {
|
|
874
|
-
target.path = "/" +
|
|
887
|
+
target.path = "/" + relative3.path;
|
|
875
888
|
} else if (!base2.path) {
|
|
876
|
-
target.path =
|
|
889
|
+
target.path = relative3.path;
|
|
877
890
|
} else {
|
|
878
|
-
target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) +
|
|
891
|
+
target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative3.path;
|
|
879
892
|
}
|
|
880
893
|
target.path = removeDotSegments(target.path);
|
|
881
894
|
}
|
|
882
|
-
target.query =
|
|
895
|
+
target.query = relative3.query;
|
|
883
896
|
}
|
|
884
897
|
target.userinfo = base2.userinfo;
|
|
885
898
|
target.host = base2.host;
|
|
@@ -887,7 +900,7 @@ var require_uri_all = __commonJS({
|
|
|
887
900
|
}
|
|
888
901
|
target.scheme = base2.scheme;
|
|
889
902
|
}
|
|
890
|
-
target.fragment =
|
|
903
|
+
target.fragment = relative3.fragment;
|
|
891
904
|
return target;
|
|
892
905
|
}
|
|
893
906
|
function resolve4(baseURI, relativeURI, options) {
|
|
@@ -7877,11 +7890,11 @@ var require_symlink = __commonJS({
|
|
|
7877
7890
|
});
|
|
7878
7891
|
}
|
|
7879
7892
|
function _createSymlink(srcpath, dstpath, type, callback) {
|
|
7880
|
-
symlinkPaths(srcpath, dstpath, (err,
|
|
7893
|
+
symlinkPaths(srcpath, dstpath, (err, relative3) => {
|
|
7881
7894
|
if (err)
|
|
7882
7895
|
return callback(err);
|
|
7883
|
-
srcpath =
|
|
7884
|
-
symlinkType(
|
|
7896
|
+
srcpath = relative3.toDst;
|
|
7897
|
+
symlinkType(relative3.toCwd, type, (err2, type2) => {
|
|
7885
7898
|
if (err2)
|
|
7886
7899
|
return callback(err2);
|
|
7887
7900
|
const dir = path.dirname(dstpath);
|
|
@@ -7911,9 +7924,9 @@ var require_symlink = __commonJS({
|
|
|
7911
7924
|
if (areIdentical(srcStat, dstStat))
|
|
7912
7925
|
return;
|
|
7913
7926
|
}
|
|
7914
|
-
const
|
|
7915
|
-
srcpath =
|
|
7916
|
-
type = symlinkTypeSync(
|
|
7927
|
+
const relative3 = symlinkPathsSync(srcpath, dstpath);
|
|
7928
|
+
srcpath = relative3.toDst;
|
|
7929
|
+
type = symlinkTypeSync(relative3.toCwd, type);
|
|
7917
7930
|
const dir = path.dirname(dstpath);
|
|
7918
7931
|
const exists = fs5.existsSync(dir);
|
|
7919
7932
|
if (exists)
|
|
@@ -13821,7 +13834,7 @@ var require_frameworks = __commonJS({
|
|
|
13821
13834
|
frameworks: () => frameworks
|
|
13822
13835
|
});
|
|
13823
13836
|
module.exports = __toCommonJS2(frameworks_exports);
|
|
13824
|
-
var
|
|
13837
|
+
var import_path13 = __require("path");
|
|
13825
13838
|
var import_fs4 = __require("fs");
|
|
13826
13839
|
var import_read_config_file = require_read_config_file();
|
|
13827
13840
|
__reExport(frameworks_exports, require_types(), module.exports);
|
|
@@ -13992,7 +14005,7 @@ var require_frameworks = __commonJS({
|
|
|
13992
14005
|
getOutputDirName: async () => "public",
|
|
13993
14006
|
defaultRoutes: async (dirPrefix) => {
|
|
13994
14007
|
try {
|
|
13995
|
-
const nowRoutesPath = (0,
|
|
14008
|
+
const nowRoutesPath = (0, import_path13.join)(
|
|
13996
14009
|
dirPrefix,
|
|
13997
14010
|
"public",
|
|
13998
14011
|
"__now_routes_g4t5bY.json"
|
|
@@ -14280,10 +14293,10 @@ var require_frameworks = __commonJS({
|
|
|
14280
14293
|
getOutputDirName: async (dirPrefix) => {
|
|
14281
14294
|
const base = "build";
|
|
14282
14295
|
try {
|
|
14283
|
-
const location = (0,
|
|
14296
|
+
const location = (0, import_path13.join)(dirPrefix, base);
|
|
14284
14297
|
const content = await readdir(location, { withFileTypes: true });
|
|
14285
14298
|
if (content.length === 1 && content[0].isDirectory()) {
|
|
14286
|
-
return (0,
|
|
14299
|
+
return (0, import_path13.join)(base, content[0].name);
|
|
14287
14300
|
}
|
|
14288
14301
|
} catch (error) {
|
|
14289
14302
|
console.error(`Error detecting output directory: `, error);
|
|
@@ -14361,10 +14374,10 @@ var require_frameworks = __commonJS({
|
|
|
14361
14374
|
getOutputDirName: async (dirPrefix) => {
|
|
14362
14375
|
const base = "build";
|
|
14363
14376
|
try {
|
|
14364
|
-
const location = (0,
|
|
14377
|
+
const location = (0, import_path13.join)(dirPrefix, base);
|
|
14365
14378
|
const content = await readdir(location, { withFileTypes: true });
|
|
14366
14379
|
if (content.length === 1 && content[0].isDirectory()) {
|
|
14367
|
-
return (0,
|
|
14380
|
+
return (0, import_path13.join)(base, content[0].name);
|
|
14368
14381
|
}
|
|
14369
14382
|
} catch (error) {
|
|
14370
14383
|
console.error(`Error detecting output directory: `, error);
|
|
@@ -14525,7 +14538,7 @@ var require_frameworks = __commonJS({
|
|
|
14525
14538
|
}
|
|
14526
14539
|
},
|
|
14527
14540
|
dependency: "@dojo/cli",
|
|
14528
|
-
getOutputDirName: async () => (0,
|
|
14541
|
+
getOutputDirName: async () => (0, import_path13.join)("output", "dist"),
|
|
14529
14542
|
defaultRoutes: [
|
|
14530
14543
|
{
|
|
14531
14544
|
handle: "filesystem"
|
|
@@ -14760,11 +14773,11 @@ var require_frameworks = __commonJS({
|
|
|
14760
14773
|
getOutputDirName: async (dirPrefix) => {
|
|
14761
14774
|
const base = "dist";
|
|
14762
14775
|
try {
|
|
14763
|
-
const location = (0,
|
|
14776
|
+
const location = (0, import_path13.join)(dirPrefix, base);
|
|
14764
14777
|
const content = await readdir(location, { withFileTypes: true });
|
|
14765
14778
|
if (content.length === 1 && content[0].isDirectory()) {
|
|
14766
|
-
const potentialOutDir = (0,
|
|
14767
|
-
const potentialOutDirWithBrowser = (0,
|
|
14779
|
+
const potentialOutDir = (0, import_path13.join)(base, content[0].name);
|
|
14780
|
+
const potentialOutDirWithBrowser = (0, import_path13.join)(potentialOutDir, "browser");
|
|
14768
14781
|
return (0, import_fs4.existsSync)(potentialOutDirWithBrowser) ? potentialOutDirWithBrowser : potentialOutDir;
|
|
14769
14782
|
}
|
|
14770
14783
|
} catch (error) {
|
|
@@ -14817,10 +14830,10 @@ var require_frameworks = __commonJS({
|
|
|
14817
14830
|
getOutputDirName: async (dirPrefix) => {
|
|
14818
14831
|
const base = "build";
|
|
14819
14832
|
try {
|
|
14820
|
-
const location = (0,
|
|
14833
|
+
const location = (0, import_path13.join)(dirPrefix, base);
|
|
14821
14834
|
const content = await readdir(location);
|
|
14822
14835
|
const paths = content.filter((item) => !item.includes("."));
|
|
14823
|
-
return (0,
|
|
14836
|
+
return (0, import_path13.join)(base, paths[0]);
|
|
14824
14837
|
} catch (error) {
|
|
14825
14838
|
console.error(`Error detecting output directory: `, error);
|
|
14826
14839
|
}
|
|
@@ -15438,7 +15451,7 @@ var require_frameworks = __commonJS({
|
|
|
15438
15451
|
getOutputDirName: async (dirPrefix) => {
|
|
15439
15452
|
const config = await (0, import_read_config_file.readConfigFile)(
|
|
15440
15453
|
["config.json", "config.yaml", "config.toml"].map((fileName) => {
|
|
15441
|
-
return (0,
|
|
15454
|
+
return (0, import_path13.join)(dirPrefix, fileName);
|
|
15442
15455
|
})
|
|
15443
15456
|
);
|
|
15444
15457
|
return config && config.publishDir || "public";
|
|
@@ -15479,7 +15492,7 @@ var require_frameworks = __commonJS({
|
|
|
15479
15492
|
},
|
|
15480
15493
|
getOutputDirName: async (dirPrefix) => {
|
|
15481
15494
|
const config = await (0, import_read_config_file.readConfigFile)(
|
|
15482
|
-
(0,
|
|
15495
|
+
(0, import_path13.join)(dirPrefix, "_config.yml")
|
|
15483
15496
|
);
|
|
15484
15497
|
return config && config.destination || "_site";
|
|
15485
15498
|
},
|
|
@@ -23615,7 +23628,7 @@ var require_resolve2 = __commonJS({
|
|
|
23615
23628
|
validateServiceEntrypoint: () => validateServiceEntrypoint
|
|
23616
23629
|
});
|
|
23617
23630
|
module.exports = __toCommonJS2(resolve_exports);
|
|
23618
|
-
var
|
|
23631
|
+
var import_path13 = __require("path");
|
|
23619
23632
|
var import_build_utils7 = __require("@vercel/build-utils");
|
|
23620
23633
|
var import_types = require_types3();
|
|
23621
23634
|
var import_utils4 = require_utils3();
|
|
@@ -23652,7 +23665,7 @@ var require_resolve2 = __commonJS({
|
|
|
23652
23665
|
if (!root) {
|
|
23653
23666
|
return { fs: fs5 };
|
|
23654
23667
|
}
|
|
23655
|
-
const normalizedRoot = (0, import_utils4.stripTrailingSlash)(
|
|
23668
|
+
const normalizedRoot = (0, import_utils4.stripTrailingSlash)(import_path13.posix.normalize(root));
|
|
23656
23669
|
if (!await fs5.hasPath(normalizedRoot)) {
|
|
23657
23670
|
return {
|
|
23658
23671
|
fs: fs5,
|
|
@@ -23676,7 +23689,7 @@ var require_resolve2 = __commonJS({
|
|
|
23676
23689
|
return { fs: fs5.chdir(normalizedRoot) };
|
|
23677
23690
|
}
|
|
23678
23691
|
function normalizeServiceEntrypoint(entrypoint) {
|
|
23679
|
-
const normalized =
|
|
23692
|
+
const normalized = import_path13.posix.normalize(entrypoint);
|
|
23680
23693
|
return normalized === "" ? "." : normalized;
|
|
23681
23694
|
}
|
|
23682
23695
|
function getEffectiveServiceTrigger(config) {
|
|
@@ -23734,11 +23747,11 @@ var require_resolve2 = __commonJS({
|
|
|
23734
23747
|
};
|
|
23735
23748
|
}
|
|
23736
23749
|
function isDockerfileEntrypoint(entrypoint) {
|
|
23737
|
-
const base =
|
|
23750
|
+
const base = import_path13.posix.basename(entrypoint).toLowerCase();
|
|
23738
23751
|
return base === "dockerfile" || base === "containerfile" || base.endsWith(".dockerfile");
|
|
23739
23752
|
}
|
|
23740
23753
|
function toWorkspaceRelativeEntrypoint(entrypoint, workspace) {
|
|
23741
|
-
const normalizedEntrypoint =
|
|
23754
|
+
const normalizedEntrypoint = import_path13.posix.normalize(entrypoint);
|
|
23742
23755
|
if (workspace === ".") {
|
|
23743
23756
|
return normalizedEntrypoint;
|
|
23744
23757
|
}
|
|
@@ -23746,7 +23759,7 @@ var require_resolve2 = __commonJS({
|
|
|
23746
23759
|
if (normalizedEntrypoint.startsWith(workspacePrefix)) {
|
|
23747
23760
|
return normalizedEntrypoint.slice(workspacePrefix.length);
|
|
23748
23761
|
}
|
|
23749
|
-
const relativeEntrypoint =
|
|
23762
|
+
const relativeEntrypoint = import_path13.posix.relative(
|
|
23750
23763
|
workspace,
|
|
23751
23764
|
normalizedEntrypoint
|
|
23752
23765
|
);
|
|
@@ -23767,14 +23780,14 @@ var require_resolve2 = __commonJS({
|
|
|
23767
23780
|
if (!manifests || manifests.length === 0) {
|
|
23768
23781
|
return void 0;
|
|
23769
23782
|
}
|
|
23770
|
-
let dir =
|
|
23783
|
+
let dir = import_path13.posix.dirname(import_path13.posix.normalize(entrypoint)) || ".";
|
|
23771
23784
|
if (dir === "") {
|
|
23772
23785
|
dir = ".";
|
|
23773
23786
|
}
|
|
23774
23787
|
let reachedRoot = false;
|
|
23775
23788
|
while (!reachedRoot) {
|
|
23776
23789
|
for (const manifest of manifests) {
|
|
23777
|
-
const manifestPath = dir === "." ? manifest :
|
|
23790
|
+
const manifestPath = dir === "." ? manifest : import_path13.posix.join(dir, manifest);
|
|
23778
23791
|
if (await (0, import_utils4.hasFile)(fs5, manifestPath)) {
|
|
23779
23792
|
return dir;
|
|
23780
23793
|
}
|
|
@@ -23782,7 +23795,7 @@ var require_resolve2 = __commonJS({
|
|
|
23782
23795
|
if (dir === "." || dir === "/") {
|
|
23783
23796
|
reachedRoot = true;
|
|
23784
23797
|
} else {
|
|
23785
|
-
const parent =
|
|
23798
|
+
const parent = import_path13.posix.dirname(dir);
|
|
23786
23799
|
if (!parent || parent === dir) {
|
|
23787
23800
|
reachedRoot = true;
|
|
23788
23801
|
} else {
|
|
@@ -24009,7 +24022,7 @@ var require_resolve2 = __commonJS({
|
|
|
24009
24022
|
};
|
|
24010
24023
|
}
|
|
24011
24024
|
if (config.root !== void 0) {
|
|
24012
|
-
const normalizedRoot =
|
|
24025
|
+
const normalizedRoot = import_path13.posix.normalize(config.root);
|
|
24013
24026
|
if (normalizedRoot.startsWith("/")) {
|
|
24014
24027
|
return {
|
|
24015
24028
|
code: "INVALID_ROOT",
|
|
@@ -24163,7 +24176,7 @@ var require_resolve2 = __commonJS({
|
|
|
24163
24176
|
const configuredSubdomain = routingResult.routing?.subdomain;
|
|
24164
24177
|
const routePrefixWasConfigured = routingResult.routing?.routePrefixConfigured ?? false;
|
|
24165
24178
|
const containerEntrypoint = isContainerRuntime(config) && typeof rawEntrypoint === "string" ? rawEntrypoint : void 0;
|
|
24166
|
-
const containerDockerfile = containerEntrypoint && isDockerfileEntrypoint(containerEntrypoint) ?
|
|
24179
|
+
const containerDockerfile = containerEntrypoint && isDockerfileEntrypoint(containerEntrypoint) ? import_path13.posix.normalize(containerEntrypoint) : void 0;
|
|
24167
24180
|
const containerImage = containerEntrypoint && !containerDockerfile ? containerEntrypoint : void 0;
|
|
24168
24181
|
let resolvedEntrypointPath = resolvedEntrypoint;
|
|
24169
24182
|
if (!containerEntrypoint && !resolvedEntrypointPath && typeof rawEntrypoint === "string") {
|
|
@@ -24207,9 +24220,9 @@ var require_resolve2 = __commonJS({
|
|
|
24207
24220
|
}
|
|
24208
24221
|
}
|
|
24209
24222
|
if (root) {
|
|
24210
|
-
const normalizedRoot =
|
|
24223
|
+
const normalizedRoot = import_path13.posix.normalize(root);
|
|
24211
24224
|
if (normalizedRoot !== ".") {
|
|
24212
|
-
workspace = workspace === "." ? normalizedRoot :
|
|
24225
|
+
workspace = workspace === "." ? normalizedRoot : import_path13.posix.join(normalizedRoot, workspace);
|
|
24213
24226
|
}
|
|
24214
24227
|
}
|
|
24215
24228
|
const topics = type === "worker" ? (0, import_build_utils7.getServiceQueueTopics)({ type, topics: config.topics }) : trigger === "queue" ? config.topics : trigger === "workflow" ? ["__wkf_*"] : void 0;
|
|
@@ -24247,7 +24260,7 @@ var require_resolve2 = __commonJS({
|
|
|
24247
24260
|
const resolvedRoutePrefixSource = type === "web" && typeof routePrefix === "string" ? routePrefixWasConfigured ? routePrefixSource : "generated" : void 0;
|
|
24248
24261
|
const isRoot = workspace === ".";
|
|
24249
24262
|
if (!isRoot) {
|
|
24250
|
-
builderSrc =
|
|
24263
|
+
builderSrc = import_path13.posix.join(workspace, builderSrc);
|
|
24251
24264
|
}
|
|
24252
24265
|
const builderConfig = { zeroConfig: true };
|
|
24253
24266
|
if (builderUse === "@vercel/backends") {
|
|
@@ -24403,7 +24416,7 @@ var require_resolve2 = __commonJS({
|
|
|
24403
24416
|
entrypoint: resolvedEntrypoint.normalized,
|
|
24404
24417
|
runtime: inferredRuntime
|
|
24405
24418
|
});
|
|
24406
|
-
const workspace = inferredWorkspace ??
|
|
24419
|
+
const workspace = inferredWorkspace ?? import_path13.posix.dirname(resolvedEntrypoint.normalized);
|
|
24407
24420
|
const detection = await detectFrameworkFromWorkspace({
|
|
24408
24421
|
fs: serviceFs,
|
|
24409
24422
|
workspace,
|
|
@@ -24517,7 +24530,7 @@ var require_resolve_v2 = __commonJS({
|
|
|
24517
24530
|
validateServiceConfigV2: () => validateServiceConfigV22
|
|
24518
24531
|
});
|
|
24519
24532
|
module.exports = __toCommonJS2(resolve_v2_exports);
|
|
24520
|
-
var
|
|
24533
|
+
var import_path13 = __require("path");
|
|
24521
24534
|
var import_build_utils7 = __require("@vercel/build-utils");
|
|
24522
24535
|
var import_frameworks2 = require_frameworks();
|
|
24523
24536
|
var import_types = require_types3();
|
|
@@ -24543,7 +24556,7 @@ var require_resolve_v2 = __commonJS({
|
|
|
24543
24556
|
);
|
|
24544
24557
|
function isDockerfileEntrypoint(entrypoint) {
|
|
24545
24558
|
return CONTAINER_ENTRYPOINT_BASENAMES.has(
|
|
24546
|
-
|
|
24559
|
+
import_path13.posix.basename(entrypoint).toLowerCase()
|
|
24547
24560
|
);
|
|
24548
24561
|
}
|
|
24549
24562
|
async function detectContainerEntrypoint(serviceFs) {
|
|
@@ -24574,7 +24587,7 @@ var require_resolve_v2 = __commonJS({
|
|
|
24574
24587
|
}
|
|
24575
24588
|
};
|
|
24576
24589
|
}
|
|
24577
|
-
dockerfile =
|
|
24590
|
+
dockerfile = import_path13.posix.normalize(entrypoint);
|
|
24578
24591
|
} else {
|
|
24579
24592
|
dockerfile = await detectContainerEntrypoint(serviceFs);
|
|
24580
24593
|
if (!dockerfile) {
|
|
@@ -24589,7 +24602,7 @@ var require_resolve_v2 = __commonJS({
|
|
|
24589
24602
|
};
|
|
24590
24603
|
}
|
|
24591
24604
|
}
|
|
24592
|
-
const builderSrc = isRoot ? dockerfile :
|
|
24605
|
+
const builderSrc = isRoot ? dockerfile : import_path13.posix.join(normalizedRoot, dockerfile);
|
|
24593
24606
|
const builderConfig = { zeroConfig: true };
|
|
24594
24607
|
if (!isRoot) {
|
|
24595
24608
|
builderConfig.workspace = normalizedRoot;
|
|
@@ -24644,7 +24657,7 @@ var require_resolve_v2 = __commonJS({
|
|
|
24644
24657
|
serviceName: name
|
|
24645
24658
|
};
|
|
24646
24659
|
}
|
|
24647
|
-
const normalizedRoot =
|
|
24660
|
+
const normalizedRoot = import_path13.posix.normalize(config.root);
|
|
24648
24661
|
if (normalizedRoot.startsWith("/")) {
|
|
24649
24662
|
return {
|
|
24650
24663
|
code: "INVALID_ROOT",
|
|
@@ -24686,7 +24699,7 @@ var require_resolve_v2 = __commonJS({
|
|
|
24686
24699
|
return null;
|
|
24687
24700
|
}
|
|
24688
24701
|
async function resolveConfiguredServiceV22(name, config, fs5) {
|
|
24689
|
-
const normalizedRoot = (0, import_utils4.stripTrailingSlash)(
|
|
24702
|
+
const normalizedRoot = (0, import_utils4.stripTrailingSlash)(import_path13.posix.normalize(config.root));
|
|
24690
24703
|
const serviceFsResult = normalizedRoot === "." ? { fs: fs5 } : await (0, import_resolve.getServiceFs)(fs5, name, normalizedRoot);
|
|
24691
24704
|
if (serviceFsResult.error) {
|
|
24692
24705
|
return { error: serviceFsResult.error };
|
|
@@ -24772,7 +24785,7 @@ var require_resolve_v2 = __commonJS({
|
|
|
24772
24785
|
builderSrc = "package.json";
|
|
24773
24786
|
} else {
|
|
24774
24787
|
builderUse = "@vercel/static";
|
|
24775
|
-
builderSrc = config.outputDirectory ?
|
|
24788
|
+
builderSrc = config.outputDirectory ? import_path13.posix.join(config.outputDirectory, "**") : "**";
|
|
24776
24789
|
}
|
|
24777
24790
|
} else {
|
|
24778
24791
|
if (!entrypointFile) {
|
|
@@ -24789,7 +24802,7 @@ var require_resolve_v2 = __commonJS({
|
|
|
24789
24802
|
}
|
|
24790
24803
|
}
|
|
24791
24804
|
const isRoot = normalizedRoot === ".";
|
|
24792
|
-
const projectRelativeSrc = isRoot ? builderSrc :
|
|
24805
|
+
const projectRelativeSrc = isRoot ? builderSrc : import_path13.posix.join(normalizedRoot, builderSrc);
|
|
24793
24806
|
const builderConfig = { zeroConfig: true };
|
|
24794
24807
|
if (builderUse === "@vercel/backends") {
|
|
24795
24808
|
builderConfig.serviceName = name;
|
|
@@ -24977,8 +24990,8 @@ var require_auto_detect = __commonJS({
|
|
|
24977
24990
|
warnings: [],
|
|
24978
24991
|
errors: [
|
|
24979
24992
|
{
|
|
24980
|
-
code: "
|
|
24981
|
-
message: "No services detected. Configure `
|
|
24993
|
+
code: "NO_SERVICES_CONFIGURED",
|
|
24994
|
+
message: "No services detected. Configure `services` in vercel.json or ensure a framework exists at project root, frontend/, or apps/web/."
|
|
24982
24995
|
}
|
|
24983
24996
|
]
|
|
24984
24997
|
};
|
|
@@ -25190,7 +25203,7 @@ var require_detect_railway = __commonJS({
|
|
|
25190
25203
|
detectRailwayServices: () => detectRailwayServices
|
|
25191
25204
|
});
|
|
25192
25205
|
module.exports = __toCommonJS2(detect_railway_exports);
|
|
25193
|
-
var
|
|
25206
|
+
var import_path13 = __require("path");
|
|
25194
25207
|
var import_smol_toml3 = __toESM2(__require("smol-toml"));
|
|
25195
25208
|
var import_detect_framework = require_detect_framework();
|
|
25196
25209
|
var import_utils4 = require_utils3();
|
|
@@ -25337,7 +25350,7 @@ var require_detect_railway = __commonJS({
|
|
|
25337
25350
|
if (entry.type !== "dir" || SKIP_DIRS.has(entry.name)) {
|
|
25338
25351
|
continue;
|
|
25339
25352
|
}
|
|
25340
|
-
const childPath = dirPath === "." ? entry.name :
|
|
25353
|
+
const childPath = dirPath === "." ? entry.name : import_path13.posix.join(dirPath, entry.name);
|
|
25341
25354
|
const child = await findRailwayConfigs(fs5, childPath, depth + 1);
|
|
25342
25355
|
configs.push(...child.configs);
|
|
25343
25356
|
warnings.push(...child.warnings);
|
|
@@ -25347,7 +25360,7 @@ var require_detect_railway = __commonJS({
|
|
|
25347
25360
|
async function readRailwayConfigRaw(fs5, dirPath) {
|
|
25348
25361
|
const warnings = [];
|
|
25349
25362
|
for (const filename of [RAILWAY_JSON, RAILWAY_TOML]) {
|
|
25350
|
-
const filePath = dirPath === "." ? filename :
|
|
25363
|
+
const filePath = dirPath === "." ? filename : import_path13.posix.join(dirPath, filename);
|
|
25351
25364
|
try {
|
|
25352
25365
|
const exists = await fs5.isFile(filePath);
|
|
25353
25366
|
if (!exists)
|
|
@@ -28414,7 +28427,7 @@ var require_detect_render = __commonJS({
|
|
|
28414
28427
|
if (frameworks.length === 0) {
|
|
28415
28428
|
warnings.push({
|
|
28416
28429
|
code: "SERVICE_SKIPPED",
|
|
28417
|
-
message: `Skipped Render service "${serviceName}": no framework detected. Configure it manually in
|
|
28430
|
+
message: `Skipped Render service "${serviceName}": no framework detected. Configure it manually in services.`
|
|
28418
28431
|
});
|
|
28419
28432
|
continue;
|
|
28420
28433
|
}
|
|
@@ -28422,7 +28435,7 @@ var require_detect_render = __commonJS({
|
|
|
28422
28435
|
const names = frameworks.map((f) => f.name).join(", ");
|
|
28423
28436
|
errors.push({
|
|
28424
28437
|
code: "MULTIPLE_FRAMEWORKS_SERVICE",
|
|
28425
|
-
message: `Multiple frameworks detected for Render service "${serviceName}": ${names}. Use explicit
|
|
28438
|
+
message: `Multiple frameworks detected for Render service "${serviceName}": ${names}. Use explicit services config.`,
|
|
28426
28439
|
serviceName
|
|
28427
28440
|
});
|
|
28428
28441
|
continue;
|
|
@@ -28590,7 +28603,7 @@ var require_detect_procfile = __commonJS({
|
|
|
28590
28603
|
errors: [
|
|
28591
28604
|
{
|
|
28592
28605
|
code: "MULTIPLE_FRAMEWORKS_SERVICE",
|
|
28593
|
-
message: `Multiple frameworks detected: ${names}. Use explicit
|
|
28606
|
+
message: `Multiple frameworks detected: ${names}. Use explicit services config.`
|
|
28594
28607
|
}
|
|
28595
28608
|
],
|
|
28596
28609
|
warnings
|
|
@@ -28628,7 +28641,7 @@ var require_detect_procfile = __commonJS({
|
|
|
28628
28641
|
if (!detectedFramework && !entrypoint) {
|
|
28629
28642
|
warnings.push({
|
|
28630
28643
|
code: "SERVICE_SKIPPED",
|
|
28631
|
-
message: `Skipped Procfile process "${processType}": no framework detected and could not infer entrypoint from command "${command}". Configure it manually in
|
|
28644
|
+
message: `Skipped Procfile process "${processType}": no framework detected and could not infer entrypoint from command "${command}". Configure it manually in services.`
|
|
28632
28645
|
});
|
|
28633
28646
|
continue;
|
|
28634
28647
|
}
|
|
@@ -28934,8 +28947,8 @@ var require_detect_services = __commonJS({
|
|
|
28934
28947
|
rewrites: [],
|
|
28935
28948
|
errors: [
|
|
28936
28949
|
{
|
|
28937
|
-
code: "
|
|
28938
|
-
message: "No services configured. Add `
|
|
28950
|
+
code: "NO_SERVICES_CONFIGURED",
|
|
28951
|
+
message: "No services configured. Add `services` to vercel.json."
|
|
28939
28952
|
}
|
|
28940
28953
|
],
|
|
28941
28954
|
warnings: []
|
|
@@ -29195,7 +29208,7 @@ var require_filesystem = __commonJS({
|
|
|
29195
29208
|
DetectorFilesystem: () => DetectorFilesystem2
|
|
29196
29209
|
});
|
|
29197
29210
|
module.exports = __toCommonJS2(filesystem_exports);
|
|
29198
|
-
var
|
|
29211
|
+
var import_path13 = __require("path");
|
|
29199
29212
|
var DetectorFilesystem2 = class {
|
|
29200
29213
|
constructor() {
|
|
29201
29214
|
this.hasPath = async (path) => {
|
|
@@ -29239,13 +29252,13 @@ var require_filesystem = __commonJS({
|
|
|
29239
29252
|
}
|
|
29240
29253
|
if (options?.potentialFiles) {
|
|
29241
29254
|
const filesInReaddirDir = options.potentialFiles.filter(
|
|
29242
|
-
(path) => (0,
|
|
29255
|
+
(path) => (0, import_path13.basename)(path) === path
|
|
29243
29256
|
);
|
|
29244
29257
|
const filesThatDoNotExist = filesInReaddirDir.filter(
|
|
29245
29258
|
(path) => !directoryFiles.has(path)
|
|
29246
29259
|
);
|
|
29247
29260
|
for (const filePath of filesThatDoNotExist) {
|
|
29248
|
-
const fullFilePath = dirPath === "/" ? filePath :
|
|
29261
|
+
const fullFilePath = dirPath === "/" ? filePath : import_path13.posix.join(dirPath, filePath);
|
|
29249
29262
|
this.fileCache.set(fullFilePath, Promise.resolve(false));
|
|
29250
29263
|
this.pathCache.set(fullFilePath, Promise.resolve(false));
|
|
29251
29264
|
}
|
|
@@ -29306,7 +29319,7 @@ var require_local_file_system_detector = __commonJS({
|
|
|
29306
29319
|
});
|
|
29307
29320
|
module.exports = __toCommonJS2(local_file_system_detector_exports);
|
|
29308
29321
|
var import_promises4 = __toESM2(__require("fs/promises"));
|
|
29309
|
-
var
|
|
29322
|
+
var import_path13 = __require("path");
|
|
29310
29323
|
var import_filesystem = require_filesystem();
|
|
29311
29324
|
var import_error_utils5 = require_dist();
|
|
29312
29325
|
var LocalFileSystemDetector4 = class _LocalFileSystemDetector extends import_filesystem.DetectorFilesystem {
|
|
@@ -29347,7 +29360,7 @@ var require_local_file_system_detector = __commonJS({
|
|
|
29347
29360
|
}
|
|
29348
29361
|
result.push({
|
|
29349
29362
|
name: entry.name,
|
|
29350
|
-
path: (0,
|
|
29363
|
+
path: (0, import_path13.join)(this.getRelativeFilePath(dir), entry.name),
|
|
29351
29364
|
type
|
|
29352
29365
|
});
|
|
29353
29366
|
}
|
|
@@ -29357,10 +29370,10 @@ var require_local_file_system_detector = __commonJS({
|
|
|
29357
29370
|
return new _LocalFileSystemDetector(this.getFilePath(name));
|
|
29358
29371
|
}
|
|
29359
29372
|
getRelativeFilePath(name) {
|
|
29360
|
-
return name.startsWith(this.rootPath) ? (0,
|
|
29373
|
+
return name.startsWith(this.rootPath) ? (0, import_path13.relative)(this.rootPath, name) : name;
|
|
29361
29374
|
}
|
|
29362
29375
|
getFilePath(name) {
|
|
29363
|
-
return (0,
|
|
29376
|
+
return (0, import_path13.join)(this.rootPath, this.getRelativeFilePath(name));
|
|
29364
29377
|
}
|
|
29365
29378
|
};
|
|
29366
29379
|
}
|
|
@@ -29412,8 +29425,8 @@ var require_get_services_builders = __commonJS({
|
|
|
29412
29425
|
builders: null,
|
|
29413
29426
|
errors: [
|
|
29414
29427
|
{
|
|
29415
|
-
code: "
|
|
29416
|
-
message: 'Project framework is set to "services", but no services are declared. Add `
|
|
29428
|
+
code: "MISSING_SERVICES",
|
|
29429
|
+
message: 'Project framework is set to "services", but no services are declared. Add `services` to vercel.json with at least one service, or change the project framework setting.'
|
|
29417
29430
|
}
|
|
29418
29431
|
],
|
|
29419
29432
|
warnings: [],
|
|
@@ -29474,8 +29487,8 @@ var require_get_services_builders = __commonJS({
|
|
|
29474
29487
|
builders: null,
|
|
29475
29488
|
errors: [
|
|
29476
29489
|
{
|
|
29477
|
-
code: "
|
|
29478
|
-
message: "No services configured. Add `
|
|
29490
|
+
code: "NO_SERVICES_CONFIGURED",
|
|
29491
|
+
message: "No services configured. Add `services` to vercel.json."
|
|
29479
29492
|
}
|
|
29480
29493
|
],
|
|
29481
29494
|
warnings: warningResponses,
|
|
@@ -29519,7 +29532,7 @@ var require_get_services_builders = __commonJS({
|
|
|
29519
29532
|
if (!serviceCoversApi) {
|
|
29520
29533
|
warnings.push({
|
|
29521
29534
|
code: "api_dir_ignored",
|
|
29522
|
-
message: "The `api/` directory will not be built because
|
|
29535
|
+
message: "The `api/` directory will not be built because services are configured. To serve these files, declare them as a service in your `vercel.json`."
|
|
29523
29536
|
});
|
|
29524
29537
|
}
|
|
29525
29538
|
}
|
|
@@ -29573,7 +29586,7 @@ var require_detect_builders = __commonJS({
|
|
|
29573
29586
|
module.exports = __toCommonJS2(detect_builders_exports);
|
|
29574
29587
|
var import_minimatch = __toESM2(require_minimatch());
|
|
29575
29588
|
var import_semver = require_semver();
|
|
29576
|
-
var
|
|
29589
|
+
var import_path13 = __require("path");
|
|
29577
29590
|
var import_frameworks2 = require_frameworks();
|
|
29578
29591
|
var import_is_official_runtime = require_is_official_runtime();
|
|
29579
29592
|
var import_build_utils7 = __require("@vercel/build-utils");
|
|
@@ -29603,7 +29616,7 @@ var require_detect_builders = __commonJS({
|
|
|
29603
29616
|
return new Set(
|
|
29604
29617
|
builders.filter(
|
|
29605
29618
|
(b) => Boolean(b.config && b.config.zeroConfig && b.src?.startsWith("api/"))
|
|
29606
|
-
).map((b) => (0,
|
|
29619
|
+
).map((b) => (0, import_path13.extname)(b.src)).filter(Boolean)
|
|
29607
29620
|
);
|
|
29608
29621
|
}
|
|
29609
29622
|
function detectApiDirectory2(builders) {
|
|
@@ -29882,7 +29895,7 @@ var require_detect_builders = __commonJS({
|
|
|
29882
29895
|
return null;
|
|
29883
29896
|
}
|
|
29884
29897
|
if (fileName.endsWith(".py") && options.workPath) {
|
|
29885
|
-
const fsPath = (0,
|
|
29898
|
+
const fsPath = (0, import_path13.join)(options.workPath, fileName);
|
|
29886
29899
|
const isEntrypoint = await (0, import_build_utils7.isPythonEntrypoint)({ fsPath });
|
|
29887
29900
|
if (!isEntrypoint) {
|
|
29888
29901
|
return null;
|
|
@@ -29890,7 +29903,7 @@ var require_detect_builders = __commonJS({
|
|
|
29890
29903
|
}
|
|
29891
29904
|
const nodeExtensions = [".js", ".mjs", ".ts", ".tsx"];
|
|
29892
29905
|
if (fileName.startsWith("api/") && process.env.VERCEL_NODE_FILTER_ENTRYPOINTS === "1" && nodeExtensions.some((ext) => fileName.endsWith(ext)) && options.workPath) {
|
|
29893
|
-
const fsPath = (0,
|
|
29906
|
+
const fsPath = (0, import_path13.join)(options.workPath, fileName);
|
|
29894
29907
|
const isEntrypoint = await (0, import_build_utils7.isNodeEntrypoint)({ fsPath });
|
|
29895
29908
|
if (!isEntrypoint) {
|
|
29896
29909
|
return null;
|
|
@@ -30180,14 +30193,14 @@ var require_detect_builders = __commonJS({
|
|
|
30180
30193
|
return null;
|
|
30181
30194
|
}
|
|
30182
30195
|
function getSegmentName(segment) {
|
|
30183
|
-
const { name } = (0,
|
|
30196
|
+
const { name } = (0, import_path13.parse)(segment);
|
|
30184
30197
|
if (name.startsWith("[") && name.endsWith("]")) {
|
|
30185
30198
|
return name.slice(1, -1);
|
|
30186
30199
|
}
|
|
30187
30200
|
return null;
|
|
30188
30201
|
}
|
|
30189
30202
|
function getAbsolutePath(unresolvedPath) {
|
|
30190
|
-
const { dir, name } = (0,
|
|
30203
|
+
const { dir, name } = (0, import_path13.parse)(unresolvedPath);
|
|
30191
30204
|
const parts = joinPath(dir, name).split("/");
|
|
30192
30205
|
return parts.map((part) => part.replace(/\[.*\]/, "1")).join("/");
|
|
30193
30206
|
}
|
|
@@ -30266,7 +30279,7 @@ var require_detect_builders = __commonJS({
|
|
|
30266
30279
|
isDynamic = true;
|
|
30267
30280
|
return `([^/]+)`;
|
|
30268
30281
|
} else if (isLast) {
|
|
30269
|
-
const { name: fileName2, ext: ext2 } = (0,
|
|
30282
|
+
const { name: fileName2, ext: ext2 } = (0, import_path13.parse)(segment);
|
|
30270
30283
|
const isIndex2 = fileName2 === "index";
|
|
30271
30284
|
const prefix = isIndex2 ? "/" : "";
|
|
30272
30285
|
const names = [
|
|
@@ -30278,7 +30291,7 @@ var require_detect_builders = __commonJS({
|
|
|
30278
30291
|
}
|
|
30279
30292
|
return segment;
|
|
30280
30293
|
});
|
|
30281
|
-
const { name: fileName, ext } = (0,
|
|
30294
|
+
const { name: fileName, ext } = (0, import_path13.parse)(filePath);
|
|
30282
30295
|
const isIndex = fileName === "index";
|
|
30283
30296
|
const queryString = `${query.length ? "?" : ""}${query.join("&")}`;
|
|
30284
30297
|
const src = isIndex ? `^/${srcParts.slice(0, -1).join("/")}${srcParts.slice(-1)[0]}$` : `^/${srcParts.join("/")}$`;
|
|
@@ -30806,11 +30819,11 @@ var require_get_workspaces = __commonJS({
|
|
|
30806
30819
|
getWorkspaces: () => getWorkspaces3
|
|
30807
30820
|
});
|
|
30808
30821
|
module.exports = __toCommonJS2(get_workspaces_exports);
|
|
30809
|
-
var
|
|
30822
|
+
var import_path13 = __toESM2(__require("path"));
|
|
30810
30823
|
var import_workspace_managers = require_workspace_managers();
|
|
30811
30824
|
var import_detect_framework = require_detect_framework();
|
|
30812
30825
|
var MAX_DEPTH_TRAVERSE = 3;
|
|
30813
|
-
var posixPath =
|
|
30826
|
+
var posixPath = import_path13.default.posix;
|
|
30814
30827
|
async function getWorkspaces3({
|
|
30815
30828
|
fs: fs5,
|
|
30816
30829
|
depth = MAX_DEPTH_TRAVERSE,
|
|
@@ -34263,12 +34276,12 @@ var require_get_workspace_package_paths = __commonJS({
|
|
|
34263
34276
|
getWorkspacePackagePaths: () => getWorkspacePackagePaths3
|
|
34264
34277
|
});
|
|
34265
34278
|
module.exports = __toCommonJS2(get_workspace_package_paths_exports);
|
|
34266
|
-
var
|
|
34279
|
+
var import_path13 = __toESM2(__require("path"));
|
|
34267
34280
|
var import_js_yaml = __toESM2(require_js_yaml3());
|
|
34268
34281
|
var import_glob = __toESM2(require_glob());
|
|
34269
34282
|
var import_json5 = __toESM2(require_lib4());
|
|
34270
34283
|
var import_get_glob_fs = require_get_glob_fs();
|
|
34271
|
-
var posixPath =
|
|
34284
|
+
var posixPath = import_path13.default.posix;
|
|
34272
34285
|
async function getWorkspacePackagePaths3({
|
|
34273
34286
|
fs: fs5,
|
|
34274
34287
|
workspace
|
|
@@ -34635,7 +34648,7 @@ var require_get_monorepo_default_settings = __commonJS({
|
|
|
34635
34648
|
getMonorepoDefaultSettings: () => getMonorepoDefaultSettings
|
|
34636
34649
|
});
|
|
34637
34650
|
module.exports = __toCommonJS2(get_monorepo_default_settings_exports);
|
|
34638
|
-
var
|
|
34651
|
+
var import_path13 = __require("path");
|
|
34639
34652
|
var import_monorepo_managers = require_monorepo_managers();
|
|
34640
34653
|
var import_package_managers = require_package_managers();
|
|
34641
34654
|
var import_detect_framework = require_detect_framework();
|
|
@@ -34739,8 +34752,8 @@ var require_get_monorepo_default_settings = __commonJS({
|
|
|
34739
34752
|
const nxJSON = import_json5.default.parse(nxJSONBuf.toString("utf-8"));
|
|
34740
34753
|
if (!nxJSON?.targetDefaults?.build) {
|
|
34741
34754
|
const [projectJSONBuf, packageJSONBuf] = await Promise.all([
|
|
34742
|
-
detectorFilesystem.readFile((0,
|
|
34743
|
-
detectorFilesystem.readFile((0,
|
|
34755
|
+
detectorFilesystem.readFile((0, import_path13.join)(projectPath, "project.json")).catch(() => null),
|
|
34756
|
+
detectorFilesystem.readFile((0, import_path13.join)(projectPath, "package.json")).catch(() => null)
|
|
34744
34757
|
]);
|
|
34745
34758
|
let hasBuildTarget = false;
|
|
34746
34759
|
if (projectJSONBuf) {
|
|
@@ -36814,11 +36827,11 @@ var require_symlink2 = __commonJS({
|
|
|
36814
36827
|
return callback(err);
|
|
36815
36828
|
if (destinationExists)
|
|
36816
36829
|
return callback(null);
|
|
36817
|
-
symlinkPaths(srcpath, dstpath, (err2,
|
|
36830
|
+
symlinkPaths(srcpath, dstpath, (err2, relative3) => {
|
|
36818
36831
|
if (err2)
|
|
36819
36832
|
return callback(err2);
|
|
36820
|
-
srcpath =
|
|
36821
|
-
symlinkType(
|
|
36833
|
+
srcpath = relative3.toDst;
|
|
36834
|
+
symlinkType(relative3.toCwd, type, (err3, type2) => {
|
|
36822
36835
|
if (err3)
|
|
36823
36836
|
return callback(err3);
|
|
36824
36837
|
const dir = path.dirname(dstpath);
|
|
@@ -36841,9 +36854,9 @@ var require_symlink2 = __commonJS({
|
|
|
36841
36854
|
const destinationExists = fs5.existsSync(dstpath);
|
|
36842
36855
|
if (destinationExists)
|
|
36843
36856
|
return void 0;
|
|
36844
|
-
const
|
|
36845
|
-
srcpath =
|
|
36846
|
-
type = symlinkTypeSync(
|
|
36857
|
+
const relative3 = symlinkPathsSync(srcpath, dstpath);
|
|
36858
|
+
srcpath = relative3.toDst;
|
|
36859
|
+
type = symlinkTypeSync(relative3.toCwd, type);
|
|
36847
36860
|
const dir = path.dirname(dstpath);
|
|
36848
36861
|
const exists = fs5.existsSync(dir);
|
|
36849
36862
|
if (exists)
|
|
@@ -37988,7 +38001,7 @@ var require_package = __commonJS({
|
|
|
37988
38001
|
"../client/package.json"(exports, module) {
|
|
37989
38002
|
module.exports = {
|
|
37990
38003
|
name: "@vercel/client",
|
|
37991
|
-
version: "18.
|
|
38004
|
+
version: "18.1.0",
|
|
37992
38005
|
main: "dist/index.js",
|
|
37993
38006
|
typings: "dist/index.d.ts",
|
|
37994
38007
|
homepage: "https://vercel.com",
|
|
@@ -38109,7 +38122,7 @@ var require_readdir_recursive = __commonJS({
|
|
|
38109
38122
|
});
|
|
38110
38123
|
module.exports = __toCommonJS2(readdir_recursive_exports);
|
|
38111
38124
|
var import_fs4 = __toESM2(__require("fs"));
|
|
38112
|
-
var
|
|
38125
|
+
var import_path13 = __toESM2(__require("path"));
|
|
38113
38126
|
var import_minimatch = __toESM2(require_minimatch2());
|
|
38114
38127
|
function patternMatcher(pattern) {
|
|
38115
38128
|
return function(path, stats) {
|
|
@@ -38137,7 +38150,7 @@ var require_readdir_recursive = __commonJS({
|
|
|
38137
38150
|
return resolve4(list2);
|
|
38138
38151
|
}
|
|
38139
38152
|
files.forEach(function(file) {
|
|
38140
|
-
const filePath =
|
|
38153
|
+
const filePath = import_path13.default.join(path, file);
|
|
38141
38154
|
import_fs4.default.lstat(filePath, function(_err, stats) {
|
|
38142
38155
|
if (_err) {
|
|
38143
38156
|
return reject(_err);
|
|
@@ -43314,15 +43327,15 @@ var require_pattern2 = __commonJS({
|
|
|
43314
43327
|
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
43315
43328
|
function partitionAbsoluteAndRelative(patterns) {
|
|
43316
43329
|
const absolute = [];
|
|
43317
|
-
const
|
|
43330
|
+
const relative3 = [];
|
|
43318
43331
|
for (const pattern of patterns) {
|
|
43319
43332
|
if (isAbsolute(pattern)) {
|
|
43320
43333
|
absolute.push(pattern);
|
|
43321
43334
|
} else {
|
|
43322
|
-
|
|
43335
|
+
relative3.push(pattern);
|
|
43323
43336
|
}
|
|
43324
43337
|
}
|
|
43325
|
-
return [absolute,
|
|
43338
|
+
return [absolute, relative3];
|
|
43326
43339
|
}
|
|
43327
43340
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
43328
43341
|
function isAbsolute(pattern) {
|
|
@@ -45902,7 +45915,7 @@ var require_utils9 = __commonJS({
|
|
|
45902
45915
|
prepareFiles: () => prepareFiles
|
|
45903
45916
|
});
|
|
45904
45917
|
module.exports = __toCommonJS2(utils_exports);
|
|
45905
|
-
var
|
|
45918
|
+
var import_path13 = __require("path");
|
|
45906
45919
|
var import_stream = __require("stream");
|
|
45907
45920
|
var import_url4 = __require("url");
|
|
45908
45921
|
var import_ignore = __toESM2(require_ignore());
|
|
@@ -45979,7 +45992,7 @@ var require_utils9 = __commonJS({
|
|
|
45979
45992
|
debug("Building file tree...");
|
|
45980
45993
|
if (isDirectory2 && !Array.isArray(path)) {
|
|
45981
45994
|
const ignores2 = (absPath) => {
|
|
45982
|
-
const rel = (0,
|
|
45995
|
+
const rel = (0, import_path13.relative)(path, absPath);
|
|
45983
45996
|
const ignored = ig.ignores(rel);
|
|
45984
45997
|
if (ignored) {
|
|
45985
45998
|
ignoreList.push(rel);
|
|
@@ -45990,7 +46003,7 @@ var require_utils9 = __commonJS({
|
|
|
45990
46003
|
const refs = /* @__PURE__ */ new Set();
|
|
45991
46004
|
if (prebuilt) {
|
|
45992
46005
|
const vcConfigFilePaths = fileList.filter(
|
|
45993
|
-
(file) => (0,
|
|
46006
|
+
(file) => (0, import_path13.basename)(file) === ".vc-config.json"
|
|
45994
46007
|
);
|
|
45995
46008
|
await Promise.all(
|
|
45996
46009
|
vcConfigFilePaths.map(async (p) => {
|
|
@@ -45999,13 +46012,13 @@ var require_utils9 = __commonJS({
|
|
|
45999
46012
|
if (!config.filePathMap)
|
|
46000
46013
|
return;
|
|
46001
46014
|
for (const v of Object.values(config.filePathMap)) {
|
|
46002
|
-
refs.add((0,
|
|
46015
|
+
refs.add((0, import_path13.join)(path, v));
|
|
46003
46016
|
}
|
|
46004
46017
|
})
|
|
46005
46018
|
);
|
|
46006
46019
|
try {
|
|
46007
46020
|
let microfrontendConfigPath = (0, import_utils4.findConfig)({
|
|
46008
|
-
dir: (0,
|
|
46021
|
+
dir: (0, import_path13.join)(path, rootDirectory || "")
|
|
46009
46022
|
});
|
|
46010
46023
|
if (!microfrontendConfigPath && !rootDirectory && projectName) {
|
|
46011
46024
|
microfrontendConfigPath = (0, import_utils4.findConfig)({
|
|
@@ -46023,7 +46036,7 @@ var require_utils9 = __commonJS({
|
|
|
46023
46036
|
}
|
|
46024
46037
|
}
|
|
46025
46038
|
try {
|
|
46026
|
-
const routesJsonPath = (0,
|
|
46039
|
+
const routesJsonPath = (0, import_path13.join)(path, ".vercel", "routes.json");
|
|
46027
46040
|
const routesJsonContent = await maybeRead(routesJsonPath, null);
|
|
46028
46041
|
if (routesJsonContent !== null) {
|
|
46029
46042
|
refs.add(routesJsonPath);
|
|
@@ -46035,12 +46048,12 @@ var require_utils9 = __commonJS({
|
|
|
46035
46048
|
if (prebuilt && bulkRedirectsPath) {
|
|
46036
46049
|
try {
|
|
46037
46050
|
const projectRoot = path;
|
|
46038
|
-
const bulkRedirectsFullPath = (0,
|
|
46051
|
+
const bulkRedirectsFullPath = (0, import_path13.join)(
|
|
46039
46052
|
projectRoot,
|
|
46040
46053
|
rootDirectory || "",
|
|
46041
46054
|
bulkRedirectsPath
|
|
46042
46055
|
);
|
|
46043
|
-
const relativeFromRoot = (0,
|
|
46056
|
+
const relativeFromRoot = (0, import_path13.relative)(projectRoot, bulkRedirectsFullPath);
|
|
46044
46057
|
if (relativeFromRoot.startsWith("..")) {
|
|
46045
46058
|
debug(
|
|
46046
46059
|
`Skipping bulk redirects path "${bulkRedirectsPath}" - path traversal detected (resolves outside project root)`
|
|
@@ -46095,9 +46108,9 @@ var require_utils9 = __commonJS({
|
|
|
46095
46108
|
if (typeof cwd !== "string") {
|
|
46096
46109
|
throw new Error(`\`cwd\` must be a "string"`);
|
|
46097
46110
|
}
|
|
46098
|
-
const relOutputDir = (0,
|
|
46111
|
+
const relOutputDir = (0, import_path13.relative)(cwd, vercelOutputDir);
|
|
46099
46112
|
ignores = ["*"];
|
|
46100
|
-
const parts = relOutputDir.split(
|
|
46113
|
+
const parts = relOutputDir.split(import_path13.sep);
|
|
46101
46114
|
parts.forEach((_, i) => {
|
|
46102
46115
|
const level = parts.slice(0, i + 1).join("/");
|
|
46103
46116
|
ignores.push(`!${level}`);
|
|
@@ -46137,8 +46150,8 @@ var require_utils9 = __commonJS({
|
|
|
46137
46150
|
const files = await Promise.all(
|
|
46138
46151
|
cwds.map(async (cwd2) => {
|
|
46139
46152
|
const [vercelignore, nowignore] = await Promise.all([
|
|
46140
|
-
maybeRead((0,
|
|
46141
|
-
maybeRead((0,
|
|
46153
|
+
maybeRead((0, import_path13.join)(cwd2, ".vercelignore"), ""),
|
|
46154
|
+
maybeRead((0, import_path13.join)(cwd2, ".nowignore"), "")
|
|
46142
46155
|
]);
|
|
46143
46156
|
if (vercelignore && nowignore) {
|
|
46144
46157
|
throw new import_build_utils7.NowBuildError({
|
|
@@ -46150,6 +46163,10 @@ var require_utils9 = __commonJS({
|
|
|
46150
46163
|
return vercelignore || nowignore;
|
|
46151
46164
|
})
|
|
46152
46165
|
);
|
|
46166
|
+
const isRustProject = (await Promise.all(cwds.map((cwd2) => (0, import_fs_extra9.pathExists)((0, import_path13.join)(cwd2, "Cargo.toml"))))).some(Boolean);
|
|
46167
|
+
if (isRustProject) {
|
|
46168
|
+
ignores.push("/target");
|
|
46169
|
+
}
|
|
46153
46170
|
const ignoreFile = files.join("\n");
|
|
46154
46171
|
ig.add(`${ignores.join("\n")}
|
|
46155
46172
|
${clearRelative(ignoreFile)}`);
|
|
@@ -46203,9 +46220,9 @@ ${clearRelative(ignoreFile)}`);
|
|
|
46203
46220
|
for (const name of file.names) {
|
|
46204
46221
|
let fileName;
|
|
46205
46222
|
if (clientOptions.isDirectory) {
|
|
46206
|
-
fileName = typeof clientOptions.path === "string" ? (0,
|
|
46223
|
+
fileName = typeof clientOptions.path === "string" ? (0, import_path13.relative)(clientOptions.path, name) : name;
|
|
46207
46224
|
} else {
|
|
46208
|
-
const segments = name.split(
|
|
46225
|
+
const segments = name.split(import_path13.sep);
|
|
46209
46226
|
fileName = segments[segments.length - 1];
|
|
46210
46227
|
}
|
|
46211
46228
|
preparedFiles.push({
|
|
@@ -52762,7 +52779,7 @@ var require_collect_deployment_files = __commonJS({
|
|
|
52762
52779
|
module.exports = __toCommonJS2(collect_deployment_files_exports);
|
|
52763
52780
|
var import_error_utils5 = require_dist();
|
|
52764
52781
|
var import_fs_extra9 = require_lib5();
|
|
52765
|
-
var
|
|
52782
|
+
var import_path13 = __require("path");
|
|
52766
52783
|
var import_errors3 = require_errors();
|
|
52767
52784
|
var import_utils4 = require_utils9();
|
|
52768
52785
|
var import_archive = require_archive();
|
|
@@ -52784,14 +52801,14 @@ var require_collect_deployment_files = __commonJS({
|
|
|
52784
52801
|
clientOptions.isDirectory = isDirectory2;
|
|
52785
52802
|
if (Array.isArray(path)) {
|
|
52786
52803
|
for (const filePath of path) {
|
|
52787
|
-
if (!(0,
|
|
52804
|
+
if (!(0, import_path13.isAbsolute)(filePath)) {
|
|
52788
52805
|
throw new import_errors3.DeploymentError({
|
|
52789
52806
|
code: "invalid_path",
|
|
52790
52807
|
message: `Provided path ${filePath} is not absolute`
|
|
52791
52808
|
});
|
|
52792
52809
|
}
|
|
52793
52810
|
}
|
|
52794
|
-
} else if (!(0,
|
|
52811
|
+
} else if (!(0, import_path13.isAbsolute)(path)) {
|
|
52795
52812
|
throw new import_errors3.DeploymentError({
|
|
52796
52813
|
code: "invalid_path",
|
|
52797
52814
|
message: `Provided path ${path} is not absolute`
|
|
@@ -52815,9 +52832,9 @@ var require_collect_deployment_files = __commonJS({
|
|
|
52815
52832
|
filesMap = clientOptions.archive === "tgz" ? await (0, import_archive.createTgzFiles)(workPath, fileList, debug) : await (0, import_hashes.hashes)(fileList);
|
|
52816
52833
|
} catch (err) {
|
|
52817
52834
|
if (clientOptions.prebuilt && (0, import_error_utils5.isErrnoException)(err) && err.code === "ENOENT" && err.path) {
|
|
52818
|
-
const errPath = (0,
|
|
52819
|
-
err.message = `File does not exist: "${(0,
|
|
52820
|
-
if (errPath.split(
|
|
52835
|
+
const errPath = (0, import_path13.relative)(workPath, err.path);
|
|
52836
|
+
err.message = `File does not exist: "${(0, import_path13.relative)(workPath, errPath)}"`;
|
|
52837
|
+
if (errPath.split(import_path13.sep).includes("node_modules")) {
|
|
52821
52838
|
err.message = `Please ensure project dependencies have been installed:
|
|
52822
52839
|
${err.message}`;
|
|
52823
52840
|
}
|
|
@@ -52960,7 +52977,7 @@ var require_continue = __commonJS({
|
|
|
52960
52977
|
continueDeployment: () => continueDeployment2
|
|
52961
52978
|
});
|
|
52962
52979
|
module.exports = __toCommonJS2(continue_exports);
|
|
52963
|
-
var
|
|
52980
|
+
var import_path13 = __require("path");
|
|
52964
52981
|
var import_fs_extra9 = __toESM2(require_lib5());
|
|
52965
52982
|
var import_check_deployment_status = require_check_deployment_status();
|
|
52966
52983
|
var import_utils4 = require_utils9();
|
|
@@ -52972,7 +52989,7 @@ var require_continue = __commonJS({
|
|
|
52972
52989
|
async function* continueDeployment2(options) {
|
|
52973
52990
|
const debug = (0, import_utils4.createDebug)(options.debug);
|
|
52974
52991
|
debug(`Continuing deployment: ${options.deploymentId}`);
|
|
52975
|
-
const outputDir = options.vercelOutputDir || (0,
|
|
52992
|
+
const outputDir = options.vercelOutputDir || (0, import_path13.join)(options.path, ".vercel", "output");
|
|
52976
52993
|
if (!await import_fs_extra9.default.pathExists(outputDir)) {
|
|
52977
52994
|
return yield {
|
|
52978
52995
|
type: "error",
|
|
@@ -52987,7 +53004,7 @@ var require_continue = __commonJS({
|
|
|
52987
53004
|
{ isDirectory: true, prebuilt: true, vercelOutputDir: outputDir },
|
|
52988
53005
|
debug
|
|
52989
53006
|
);
|
|
52990
|
-
const provisionJsonPath = (0,
|
|
53007
|
+
const provisionJsonPath = (0, import_path13.join)(outputDir, "provision.json");
|
|
52991
53008
|
const unbundledFiles = fileList.filter((f) => f === provisionJsonPath);
|
|
52992
53009
|
let files;
|
|
52993
53010
|
if (options.archive === "tgz") {
|
|
@@ -53176,7 +53193,7 @@ var require_inspect_deployment_files = __commonJS({
|
|
|
53176
53193
|
inspectDeploymentFiles: () => inspectDeploymentFiles2
|
|
53177
53194
|
});
|
|
53178
53195
|
module.exports = __toCommonJS2(inspect_deployment_files_exports);
|
|
53179
|
-
var
|
|
53196
|
+
var import_path13 = __require("path");
|
|
53180
53197
|
var import_collect_deployment_files = require_collect_deployment_files();
|
|
53181
53198
|
var import_utils4 = require_utils9();
|
|
53182
53199
|
async function inspectDeploymentFiles2(clientOptions) {
|
|
@@ -53188,8 +53205,8 @@ var require_inspect_deployment_files = __commonJS({
|
|
|
53188
53205
|
for (const [sha, file] of filesMap) {
|
|
53189
53206
|
const size = file.data?.byteLength || file.data?.length || 0;
|
|
53190
53207
|
for (const name of file.names) {
|
|
53191
|
-
const pathName = isDirectory2 ? (0,
|
|
53192
|
-
const normalizedPath = pathName.split(
|
|
53208
|
+
const pathName = isDirectory2 ? (0, import_path13.relative)(workPath, name) : name.split(import_path13.sep).at(-1) || name;
|
|
53209
|
+
const normalizedPath = pathName.split(import_path13.sep).join("/");
|
|
53193
53210
|
const deploymentFile = {
|
|
53194
53211
|
path: normalizedPath,
|
|
53195
53212
|
size,
|
|
@@ -53313,7 +53330,7 @@ import { parse as tomlParse2 } from "smol-toml";
|
|
|
53313
53330
|
var import_ajv2 = __toESM(require_ajv(), 1);
|
|
53314
53331
|
var import_fs_extra8 = __toESM(require_lib2(), 1);
|
|
53315
53332
|
import fs4 from "fs";
|
|
53316
|
-
import { join as join9, relative } from "path";
|
|
53333
|
+
import { join as join9, relative as relative2 } from "path";
|
|
53317
53334
|
import { promisify } from "util";
|
|
53318
53335
|
|
|
53319
53336
|
// src/util/projects/get-project-by-id-or-name.ts
|
|
@@ -56324,6 +56341,7 @@ var addSubcommand = {
|
|
|
56324
56341
|
}
|
|
56325
56342
|
],
|
|
56326
56343
|
options: [
|
|
56344
|
+
projectOption,
|
|
56327
56345
|
{
|
|
56328
56346
|
name: "sensitive",
|
|
56329
56347
|
description: "Store the value as sensitive for Production or Preview",
|
|
@@ -56429,6 +56447,7 @@ var removeSubcommand = {
|
|
|
56429
56447
|
}
|
|
56430
56448
|
],
|
|
56431
56449
|
options: [
|
|
56450
|
+
projectOption,
|
|
56432
56451
|
{
|
|
56433
56452
|
...yesOption,
|
|
56434
56453
|
description: "Skip the confirmation prompt when removing an Environment Variable"
|
|
@@ -56469,6 +56488,7 @@ var pullSubcommand = {
|
|
|
56469
56488
|
}
|
|
56470
56489
|
],
|
|
56471
56490
|
options: [
|
|
56491
|
+
projectOption,
|
|
56472
56492
|
{
|
|
56473
56493
|
name: "environment",
|
|
56474
56494
|
description: "Set the Environment when pulling Environment Variables",
|
|
@@ -56524,6 +56544,7 @@ var runSubcommand = {
|
|
|
56524
56544
|
}
|
|
56525
56545
|
],
|
|
56526
56546
|
options: [
|
|
56547
|
+
projectOption,
|
|
56527
56548
|
{
|
|
56528
56549
|
name: "environment",
|
|
56529
56550
|
description: "Specify the environment to pull variables from (default: development)",
|
|
@@ -56567,6 +56588,7 @@ var updateSubcommand = {
|
|
|
56567
56588
|
}
|
|
56568
56589
|
],
|
|
56569
56590
|
options: [
|
|
56591
|
+
projectOption,
|
|
56570
56592
|
{
|
|
56571
56593
|
name: "sensitive",
|
|
56572
56594
|
description: "Update to a sensitive Environment Variable",
|
|
@@ -56669,6 +56691,295 @@ function parseTarget({
|
|
|
56669
56691
|
return void 0;
|
|
56670
56692
|
}
|
|
56671
56693
|
|
|
56694
|
+
// src/util/get-scope.ts
|
|
56695
|
+
import { relative } from "path";
|
|
56696
|
+
async function getScope(client, opts = {}) {
|
|
56697
|
+
const user = await getUser(client);
|
|
56698
|
+
let contextName = user.username || user.email;
|
|
56699
|
+
let team = null;
|
|
56700
|
+
const defaultTeamId = user.version === "northstar" ? user.defaultTeamId : void 0;
|
|
56701
|
+
const currentTeamOrDefaultTeamId = client.config.currentTeam || defaultTeamId;
|
|
56702
|
+
if (!client.config.currentTeam && defaultTeamId) {
|
|
56703
|
+
client.config.currentTeam = defaultTeamId;
|
|
56704
|
+
}
|
|
56705
|
+
if (currentTeamOrDefaultTeamId && opts.getTeam !== false) {
|
|
56706
|
+
team = await getTeamById(client, currentTeamOrDefaultTeamId);
|
|
56707
|
+
if (!team) {
|
|
56708
|
+
throw new TeamDeleted();
|
|
56709
|
+
}
|
|
56710
|
+
contextName = team.slug;
|
|
56711
|
+
}
|
|
56712
|
+
if (!opts.resolveLocalScope) {
|
|
56713
|
+
return { contextName, team, user };
|
|
56714
|
+
}
|
|
56715
|
+
const explicitScopeProvided = detectExplicitScope(client);
|
|
56716
|
+
const globalTeamId = client.config.currentTeam;
|
|
56717
|
+
const globalTeam = team;
|
|
56718
|
+
const cwd = client.cwd;
|
|
56719
|
+
let projectLink = null;
|
|
56720
|
+
try {
|
|
56721
|
+
projectLink = await getLinkFromDir(getVercelDirectory(cwd));
|
|
56722
|
+
} catch (_error) {
|
|
56723
|
+
projectLink = null;
|
|
56724
|
+
}
|
|
56725
|
+
let repoLink = null;
|
|
56726
|
+
try {
|
|
56727
|
+
repoLink = await getRepoLink(client, cwd);
|
|
56728
|
+
} catch (_error) {
|
|
56729
|
+
repoLink = null;
|
|
56730
|
+
}
|
|
56731
|
+
let localOrgId;
|
|
56732
|
+
if (projectLink) {
|
|
56733
|
+
localOrgId = projectLink.orgId;
|
|
56734
|
+
} else if (repoLink?.repoConfig) {
|
|
56735
|
+
const repoConfig = repoLink.repoConfig;
|
|
56736
|
+
const projects = findProjectsFromPath(
|
|
56737
|
+
repoConfig.projects,
|
|
56738
|
+
relative(repoLink.rootPath, cwd)
|
|
56739
|
+
);
|
|
56740
|
+
if (projects.length === 1) {
|
|
56741
|
+
localOrgId = projects[0].orgId ?? repoLink.repoConfig.orgId ?? void 0;
|
|
56742
|
+
} else if (projects.length > 1) {
|
|
56743
|
+
const orgIds = new Set(
|
|
56744
|
+
projects.map((p) => p.orgId ?? repoConfig.orgId ?? "")
|
|
56745
|
+
);
|
|
56746
|
+
if (orgIds.size === 1) {
|
|
56747
|
+
const [singleOrgId] = orgIds;
|
|
56748
|
+
if (singleOrgId) {
|
|
56749
|
+
localOrgId = singleOrgId;
|
|
56750
|
+
}
|
|
56751
|
+
}
|
|
56752
|
+
}
|
|
56753
|
+
}
|
|
56754
|
+
const isCrossTeamRepo = detectCrossTeamRepo(repoLink?.repoConfig);
|
|
56755
|
+
const scopeMismatch = Boolean(
|
|
56756
|
+
localOrgId && globalTeamId && globalTeamId !== localOrgId
|
|
56757
|
+
);
|
|
56758
|
+
let resolvedOrg;
|
|
56759
|
+
let resolvedContextName = contextName;
|
|
56760
|
+
let resolvedTeam = team;
|
|
56761
|
+
let linkedRepoResult = null;
|
|
56762
|
+
if (repoLink?.repoConfig) {
|
|
56763
|
+
linkedRepoResult = {
|
|
56764
|
+
repoConfig: repoLink.repoConfig,
|
|
56765
|
+
rootPath: repoLink.rootPath
|
|
56766
|
+
};
|
|
56767
|
+
}
|
|
56768
|
+
if (explicitScopeProvided) {
|
|
56769
|
+
resolvedOrg = team ? { type: "team", id: team.id, slug: team.slug } : { type: "user", id: user.id, slug: user.username };
|
|
56770
|
+
} else if (localOrgId) {
|
|
56771
|
+
client.config.currentTeam = localOrgId.startsWith("team_") ? localOrgId : void 0;
|
|
56772
|
+
const correctedTeam = client.config.currentTeam ? await getTeamById(client, client.config.currentTeam) : null;
|
|
56773
|
+
const correctedUser = await getUser(client);
|
|
56774
|
+
resolvedOrg = correctedTeam ? { type: "team", id: correctedTeam.id, slug: correctedTeam.slug } : {
|
|
56775
|
+
type: "user",
|
|
56776
|
+
id: correctedUser.id,
|
|
56777
|
+
slug: correctedUser.username
|
|
56778
|
+
};
|
|
56779
|
+
resolvedContextName = correctedTeam ? correctedTeam.slug : correctedUser.username || correctedUser.email;
|
|
56780
|
+
resolvedTeam = correctedTeam;
|
|
56781
|
+
} else {
|
|
56782
|
+
if (isCrossTeamRepo) {
|
|
56783
|
+
output_manager_default.warn(
|
|
56784
|
+
`This repository has projects across multiple teams. Use \`--scope\` to specify which team, or \`cd\` into a project directory.`
|
|
56785
|
+
);
|
|
56786
|
+
}
|
|
56787
|
+
resolvedOrg = team ? { type: "team", id: team.id, slug: team.slug } : { type: "user", id: user.id, slug: user.username };
|
|
56788
|
+
}
|
|
56789
|
+
return {
|
|
56790
|
+
org: resolvedOrg,
|
|
56791
|
+
contextName: resolvedContextName,
|
|
56792
|
+
user,
|
|
56793
|
+
team: resolvedTeam,
|
|
56794
|
+
globalTeam,
|
|
56795
|
+
linkedRepo: linkedRepoResult,
|
|
56796
|
+
isCrossTeamRepo,
|
|
56797
|
+
scopeMismatch,
|
|
56798
|
+
explicitScopeProvided
|
|
56799
|
+
};
|
|
56800
|
+
}
|
|
56801
|
+
function detectExplicitScope(client) {
|
|
56802
|
+
const argv = client.argv;
|
|
56803
|
+
for (const arg of argv) {
|
|
56804
|
+
if (arg === "--") {
|
|
56805
|
+
break;
|
|
56806
|
+
}
|
|
56807
|
+
if (arg === "--scope" || arg === "--team" || arg.startsWith("--scope=") || arg.startsWith("--team=") || arg === "-S" || arg === "-T") {
|
|
56808
|
+
return true;
|
|
56809
|
+
}
|
|
56810
|
+
}
|
|
56811
|
+
if (client.localConfig?.scope) {
|
|
56812
|
+
return true;
|
|
56813
|
+
}
|
|
56814
|
+
return false;
|
|
56815
|
+
}
|
|
56816
|
+
function detectCrossTeamRepo(repoConfig) {
|
|
56817
|
+
if (!repoConfig?.projects || repoConfig.projects.length < 2) {
|
|
56818
|
+
return false;
|
|
56819
|
+
}
|
|
56820
|
+
const orgIds = /* @__PURE__ */ new Set();
|
|
56821
|
+
for (const project of repoConfig.projects) {
|
|
56822
|
+
const orgId = project.orgId ?? repoConfig.orgId;
|
|
56823
|
+
if (orgId) {
|
|
56824
|
+
orgIds.add(orgId);
|
|
56825
|
+
}
|
|
56826
|
+
}
|
|
56827
|
+
return orgIds.size > 1;
|
|
56828
|
+
}
|
|
56829
|
+
|
|
56830
|
+
// src/util/projects/project-not-found-error.ts
|
|
56831
|
+
async function printProjectNotFoundError(client, projectNameOrId, commandName, orgId) {
|
|
56832
|
+
let contextName;
|
|
56833
|
+
try {
|
|
56834
|
+
if (orgId) {
|
|
56835
|
+
const org = await getOrgById(client, orgId);
|
|
56836
|
+
contextName = org?.slug ?? orgId;
|
|
56837
|
+
} else {
|
|
56838
|
+
const scope = await getScope(client);
|
|
56839
|
+
contextName = scope.contextName;
|
|
56840
|
+
}
|
|
56841
|
+
} catch (err) {
|
|
56842
|
+
contextName = orgId;
|
|
56843
|
+
output_manager_default.debug(`Scope lookup failed during error reporting: ${err}`);
|
|
56844
|
+
}
|
|
56845
|
+
const scopeClause = contextName ? ` (${contextName})` : "";
|
|
56846
|
+
const headline = `Project "${projectNameOrId}" was not found in the current scope${scopeClause}.`;
|
|
56847
|
+
output_manager_default.error(
|
|
56848
|
+
`${headline}
|
|
56849
|
+
|
|
56850
|
+
If it lives in a different team or account:
|
|
56851
|
+
\u2022 Retry with \`--scope <team-slug|your-username>\`, or
|
|
56852
|
+
\u2022 Run \`vercel switch <team-slug|your-username>\` to change scope.
|
|
56853
|
+
|
|
56854
|
+
List accessible teams with \`vercel teams ls\`.`
|
|
56855
|
+
);
|
|
56856
|
+
if (!shouldEmitNonInteractiveCommandError(client)) {
|
|
56857
|
+
return;
|
|
56858
|
+
}
|
|
56859
|
+
const retryWithScope = buildCommandWithGlobalFlags(
|
|
56860
|
+
client.argv,
|
|
56861
|
+
`${commandName} --project ${projectNameOrId} --scope <team-slug>`
|
|
56862
|
+
);
|
|
56863
|
+
outputAgentError(
|
|
56864
|
+
client,
|
|
56865
|
+
{
|
|
56866
|
+
status: AGENT_STATUS.ERROR,
|
|
56867
|
+
reason: AGENT_REASON.PROJECT_NOT_FOUND,
|
|
56868
|
+
message: `${headline} If it lives in a different team or account, retry with --scope <team-slug|your-username> or run \`vercel switch <team-slug|your-username>\` to change scope.`,
|
|
56869
|
+
...contextName ? { scope: contextName } : {},
|
|
56870
|
+
next: [
|
|
56871
|
+
{ command: "vercel teams ls", when: "list accessible teams" },
|
|
56872
|
+
{ command: retryWithScope, when: "retry with a specific team" },
|
|
56873
|
+
{
|
|
56874
|
+
command: "vercel switch <team-slug>",
|
|
56875
|
+
when: "change the default scope"
|
|
56876
|
+
}
|
|
56877
|
+
]
|
|
56878
|
+
},
|
|
56879
|
+
1
|
|
56880
|
+
);
|
|
56881
|
+
}
|
|
56882
|
+
|
|
56883
|
+
// src/util/projects/resolve-project-context.ts
|
|
56884
|
+
function getInvokingCommandFromArgv(argv) {
|
|
56885
|
+
const args = omitGlobalFlagsFromArgs(argv.slice(2));
|
|
56886
|
+
const positionals = [];
|
|
56887
|
+
for (const arg of args) {
|
|
56888
|
+
if (arg.startsWith("-")) {
|
|
56889
|
+
break;
|
|
56890
|
+
}
|
|
56891
|
+
positionals.push(arg);
|
|
56892
|
+
}
|
|
56893
|
+
return positionals.join(" ");
|
|
56894
|
+
}
|
|
56895
|
+
async function resolveProjectContext({
|
|
56896
|
+
client,
|
|
56897
|
+
cwd = client.cwd,
|
|
56898
|
+
projectNameOrId,
|
|
56899
|
+
commandName = ""
|
|
56900
|
+
}) {
|
|
56901
|
+
const context = await getLinkedProject(client, {
|
|
56902
|
+
cwd,
|
|
56903
|
+
projectName: projectNameOrId,
|
|
56904
|
+
projectNameIsExplicit: Boolean(projectNameOrId),
|
|
56905
|
+
scopeIsExplicit: detectExplicitScope(client)
|
|
56906
|
+
});
|
|
56907
|
+
if (context.status === "not_linked" && projectNameOrId) {
|
|
56908
|
+
await printProjectNotFoundError(
|
|
56909
|
+
client,
|
|
56910
|
+
projectNameOrId,
|
|
56911
|
+
commandName || getInvokingCommandFromArgv(client.argv),
|
|
56912
|
+
context.orgId
|
|
56913
|
+
);
|
|
56914
|
+
return { status: "error", exitCode: 1, orgId: context.orgId };
|
|
56915
|
+
}
|
|
56916
|
+
return context;
|
|
56917
|
+
}
|
|
56918
|
+
|
|
56919
|
+
// src/util/certs/map-cert-error.ts
|
|
56920
|
+
function mapCertError(error, cns) {
|
|
56921
|
+
const errorCode = error.code;
|
|
56922
|
+
if (errorCode === "too_many_requests") {
|
|
56923
|
+
const retryAfter = typeof error.retryAfterMs === "number" ? error.retryAfterMs : 0;
|
|
56924
|
+
return new TooManyRequests("certificates", retryAfter);
|
|
56925
|
+
}
|
|
56926
|
+
if (errorCode === "not_found") {
|
|
56927
|
+
return new DomainNotFound(error.domain);
|
|
56928
|
+
}
|
|
56929
|
+
if (errorCode === "configuration_error") {
|
|
56930
|
+
return new CertConfigurationError({
|
|
56931
|
+
cns: cns || error.cns || [],
|
|
56932
|
+
message: error.message,
|
|
56933
|
+
external: error.external,
|
|
56934
|
+
helpUrl: error.helpUrl,
|
|
56935
|
+
type: error.statusCode === 449 ? "http-01" : "dns-01"
|
|
56936
|
+
});
|
|
56937
|
+
}
|
|
56938
|
+
if (errorCode === "bad_domains" || errorCode === "challenge_still_pending" || errorCode === "common_name_domain_name_mismatch" || errorCode === "conflicting_caa_record" || errorCode === "domain_not_verified" || errorCode === "invalid_cn" || errorCode === "invalid_domain" || errorCode === "rate_limited" || errorCode === "should_share_root_domain" || errorCode === "unauthorized_request_error" || errorCode === "unsupported_challenge_priority" || errorCode === "wildcard_not_allowed" || errorCode === "validation_running" || errorCode === "dns_error" || errorCode === "challenge_error" || errorCode === "txt_record_not_found") {
|
|
56939
|
+
return new CertError({
|
|
56940
|
+
cns: cns || error.cns || [],
|
|
56941
|
+
code: errorCode,
|
|
56942
|
+
message: error.message,
|
|
56943
|
+
helpUrl: error.helpUrl
|
|
56944
|
+
});
|
|
56945
|
+
}
|
|
56946
|
+
return null;
|
|
56947
|
+
}
|
|
56948
|
+
|
|
56949
|
+
// src/util/to-host.ts
|
|
56950
|
+
function toHost(url) {
|
|
56951
|
+
return url.replace(/^(?:.*?\/\/)?([^/]+).*/, "$1");
|
|
56952
|
+
}
|
|
56953
|
+
|
|
56954
|
+
// src/util/get-deployment.ts
|
|
56955
|
+
async function getDeployment(client, contextName, hostOrId) {
|
|
56956
|
+
if (hostOrId.includes(".")) {
|
|
56957
|
+
hostOrId = toHost(hostOrId);
|
|
56958
|
+
}
|
|
56959
|
+
try {
|
|
56960
|
+
return await client.fetch(
|
|
56961
|
+
`/v13/deployments/${encodeURIComponent(hostOrId)}`
|
|
56962
|
+
);
|
|
56963
|
+
} catch (err) {
|
|
56964
|
+
if (isAPIError(err)) {
|
|
56965
|
+
if (err.status === 404) {
|
|
56966
|
+
throw new DeploymentNotFound({ id: hostOrId, context: contextName });
|
|
56967
|
+
}
|
|
56968
|
+
if (err.status === 403) {
|
|
56969
|
+
throw new DeploymentPermissionDenied(hostOrId, contextName);
|
|
56970
|
+
}
|
|
56971
|
+
if (err.status === 400 && err.message.includes("`id`")) {
|
|
56972
|
+
throw new InvalidDeploymentId(hostOrId);
|
|
56973
|
+
}
|
|
56974
|
+
const certError = mapCertError(err);
|
|
56975
|
+
if (certError) {
|
|
56976
|
+
throw certError;
|
|
56977
|
+
}
|
|
56978
|
+
}
|
|
56979
|
+
throw err;
|
|
56980
|
+
}
|
|
56981
|
+
}
|
|
56982
|
+
|
|
56672
56983
|
// src/commands/login/future.ts
|
|
56673
56984
|
var import_chalk12 = __toESM(require_source(), 1);
|
|
56674
56985
|
var open = __toESM(require_open(), 1);
|
|
@@ -57115,6 +57426,25 @@ var VARIABLES_TO_IGNORE = [
|
|
|
57115
57426
|
"VERCEL_SPEED_INSIGHTS_ID",
|
|
57116
57427
|
"VERCEL_WEB_ANALYTICS_ID"
|
|
57117
57428
|
];
|
|
57429
|
+
var SENSITIVE_PLACEHOLDER = "[SENSITIVE]";
|
|
57430
|
+
async function getRedactedSensitiveKeys(client, projectId, source, target, gitBranch, records) {
|
|
57431
|
+
const emptyKeys = Object.keys(records).filter((key) => !records[key]);
|
|
57432
|
+
if (!projectId || emptyKeys.length === 0) {
|
|
57433
|
+
return /* @__PURE__ */ new Set();
|
|
57434
|
+
}
|
|
57435
|
+
try {
|
|
57436
|
+
const { envs } = await getEnvRecords(client, projectId, source, {
|
|
57437
|
+
target,
|
|
57438
|
+
gitBranch
|
|
57439
|
+
});
|
|
57440
|
+
const sensitiveKeys = new Set(
|
|
57441
|
+
envs.filter((env) => env.type === "sensitive").map((env) => env.key)
|
|
57442
|
+
);
|
|
57443
|
+
return new Set(emptyKeys.filter((key) => sensitiveKeys.has(key)));
|
|
57444
|
+
} catch {
|
|
57445
|
+
return /* @__PURE__ */ new Set();
|
|
57446
|
+
}
|
|
57447
|
+
}
|
|
57118
57448
|
async function pull(client, argv, source = "vercel-cli:env:pull", options = {}) {
|
|
57119
57449
|
const telemetryClient = new EnvPullTelemetryClient({
|
|
57120
57450
|
opts: {
|
|
@@ -57145,7 +57475,11 @@ async function pull(client, argv, source = "vercel-cli:env:pull", options = {})
|
|
|
57145
57475
|
telemetryClient.trackCliOptionGitBranch(gitBranch);
|
|
57146
57476
|
telemetryClient.trackCliOptionEnvironment(opts["--environment"]);
|
|
57147
57477
|
telemetryClient.trackCliOptionId(opts["--id"]);
|
|
57148
|
-
|
|
57478
|
+
telemetryClient.trackCliOptionProject(opts["--project"]);
|
|
57479
|
+
const link = await resolveProjectContext({
|
|
57480
|
+
client,
|
|
57481
|
+
projectNameOrId: opts["--project"]
|
|
57482
|
+
});
|
|
57149
57483
|
if (link.status === "error") {
|
|
57150
57484
|
return link.exitCode;
|
|
57151
57485
|
} else if (link.status === "not_linked") {
|
|
@@ -57183,6 +57517,15 @@ async function pull(client, argv, source = "vercel-cli:env:pull", options = {})
|
|
|
57183
57517
|
}
|
|
57184
57518
|
client.config.currentTeam = link.org.type === "team" ? link.org.id : void 0;
|
|
57185
57519
|
const deploymentId = opts["--id"];
|
|
57520
|
+
if (deploymentId && opts["--project"]) {
|
|
57521
|
+
const deployment = await getDeployment(client, link.org.slug, deploymentId);
|
|
57522
|
+
if (deployment.projectId && deployment.projectId !== link.project.id) {
|
|
57523
|
+
output_manager_default.error(
|
|
57524
|
+
`Deployment ${import_chalk13.default.bold(deploymentId)} does not belong to project ${import_chalk13.default.bold(link.project.name)}.`
|
|
57525
|
+
);
|
|
57526
|
+
return 1;
|
|
57527
|
+
}
|
|
57528
|
+
}
|
|
57186
57529
|
const environment = parseTarget({
|
|
57187
57530
|
flagName: "environment",
|
|
57188
57531
|
flags: opts
|
|
@@ -57209,17 +57552,21 @@ async function envPullCommandLogic(client, filename, skipConfirmation, environme
|
|
|
57209
57552
|
output_manager_default.log(`Overwriting existing ${import_chalk13.default.bold(filename)} file`);
|
|
57210
57553
|
} else if (exists && !skipConfirmation && !oidcTokenOnly) {
|
|
57211
57554
|
if (client.nonInteractive) {
|
|
57555
|
+
const preserved = getPreservedArgsForEnvPull(client.argv).filter(
|
|
57556
|
+
(arg) => arg !== "--yes" && arg !== "-y"
|
|
57557
|
+
);
|
|
57558
|
+
const suffix = preserved.length > 0 ? ` ${preserved.join(" ")}` : "";
|
|
57212
57559
|
outputActionRequired(client, {
|
|
57213
57560
|
status: "action_required",
|
|
57214
57561
|
reason: "env_file_exists",
|
|
57215
57562
|
message: `File ${param(filename)} already exists and was not created by Vercel CLI. Use --yes to overwrite or specify a different filename.`,
|
|
57216
57563
|
next: [
|
|
57217
57564
|
{
|
|
57218
|
-
command: getCommandNamePlain(`env pull ${filename} --yes`),
|
|
57565
|
+
command: getCommandNamePlain(`env pull ${filename} --yes${suffix}`),
|
|
57219
57566
|
when: "Overwrite this file"
|
|
57220
57567
|
},
|
|
57221
57568
|
{
|
|
57222
|
-
command: getCommandNamePlain(
|
|
57569
|
+
command: getCommandNamePlain(`env pull <filename>${suffix}`),
|
|
57223
57570
|
when: "Use a different filename"
|
|
57224
57571
|
}
|
|
57225
57572
|
]
|
|
@@ -57267,7 +57614,18 @@ async function envPullCommandLogic(client, filename, skipConfirmation, environme
|
|
|
57267
57614
|
);
|
|
57268
57615
|
fileChanged = contents !== existingContents;
|
|
57269
57616
|
} else {
|
|
57617
|
+
const sensitiveKeys = await getRedactedSensitiveKeys(
|
|
57618
|
+
client,
|
|
57619
|
+
deploymentId ? void 0 : link.project.id,
|
|
57620
|
+
source,
|
|
57621
|
+
environment,
|
|
57622
|
+
gitBranch,
|
|
57623
|
+
records
|
|
57624
|
+
);
|
|
57270
57625
|
const mergedRecords = { ...records };
|
|
57626
|
+
for (const key of sensitiveKeys) {
|
|
57627
|
+
mergedRecords[key] = SENSITIVE_PLACEHOLDER;
|
|
57628
|
+
}
|
|
57271
57629
|
if (oldEnv) {
|
|
57272
57630
|
for (const [key, value] of Object.entries(oldEnv)) {
|
|
57273
57631
|
if (!(key in mergedRecords) && key !== VERCEL_OIDC_TOKEN && !VARIABLES_TO_IGNORE.includes(key)) {
|
|
@@ -58155,7 +58513,7 @@ async function tryDetectServices(cwd) {
|
|
|
58155
58513
|
detectEntrypoint: createDetectEntrypoint(cwd)
|
|
58156
58514
|
});
|
|
58157
58515
|
const hasNoServicesError = result.errors.some(
|
|
58158
|
-
(e) => e.code === "
|
|
58516
|
+
(e) => e.code === "NO_SERVICES_CONFIGURED"
|
|
58159
58517
|
);
|
|
58160
58518
|
if (hasNoServicesError) {
|
|
58161
58519
|
return null;
|
|
@@ -58178,10 +58536,12 @@ async function getServicesConfigWriteBlocker(cwd, config) {
|
|
|
58178
58536
|
function toProjectServicesConfigPatch(config) {
|
|
58179
58537
|
const services = {};
|
|
58180
58538
|
for (const [name, svc] of Object.entries(config)) {
|
|
58539
|
+
const buildCommand = svc.preDeployCommand && svc.buildCommand ? `${svc.buildCommand} && ${svc.preDeployCommand}` : svc.preDeployCommand || svc.buildCommand;
|
|
58181
58540
|
services[name] = {
|
|
58182
58541
|
root: svc.root,
|
|
58183
58542
|
...svc.framework ? { framework: svc.framework } : {},
|
|
58184
|
-
...svc.entrypoint ? { entrypoint: svc.entrypoint } : {}
|
|
58543
|
+
...svc.entrypoint ? { entrypoint: svc.entrypoint } : {},
|
|
58544
|
+
...buildCommand ? { buildCommand } : {}
|
|
58185
58545
|
};
|
|
58186
58546
|
}
|
|
58187
58547
|
const rewrites = Object.entries(config).filter(
|
|
@@ -58388,7 +58748,7 @@ async function getProjectLinkFromRepoLink(client, path, projectName, projectName
|
|
|
58388
58748
|
}
|
|
58389
58749
|
const projects = findProjectsFromPath(
|
|
58390
58750
|
repoLink.repoConfig.projects,
|
|
58391
|
-
|
|
58751
|
+
relative2(repoLink.rootPath, path)
|
|
58392
58752
|
);
|
|
58393
58753
|
let project;
|
|
58394
58754
|
if (projectName && projectNameIsExplicit) {
|
|
@@ -59103,7 +59463,6 @@ export {
|
|
|
59103
59463
|
require_fast_deep_equal,
|
|
59104
59464
|
require_ajv,
|
|
59105
59465
|
getProjectByNameOrId,
|
|
59106
|
-
getOrgById,
|
|
59107
59466
|
isDirectory,
|
|
59108
59467
|
require_pluralize,
|
|
59109
59468
|
require_slugify,
|
|
@@ -59126,7 +59485,6 @@ export {
|
|
|
59126
59485
|
printRemoteUrls,
|
|
59127
59486
|
selectAndParseRemoteUrl,
|
|
59128
59487
|
checkExistsAndConnect,
|
|
59129
|
-
getRepoLink,
|
|
59130
59488
|
resolveGitRemote,
|
|
59131
59489
|
fetchProjectsForRepoUrl,
|
|
59132
59490
|
linkRepoProject,
|
|
@@ -59143,6 +59501,13 @@ export {
|
|
|
59143
59501
|
formatProject,
|
|
59144
59502
|
STANDARD_ENVIRONMENTS,
|
|
59145
59503
|
parseTarget,
|
|
59504
|
+
getScope,
|
|
59505
|
+
detectExplicitScope,
|
|
59506
|
+
printProjectNotFoundError,
|
|
59507
|
+
resolveProjectContext,
|
|
59508
|
+
mapCertError,
|
|
59509
|
+
toHost,
|
|
59510
|
+
getDeployment,
|
|
59146
59511
|
pull,
|
|
59147
59512
|
envPullCommandLogic,
|
|
59148
59513
|
require_main,
|