vercel 54.16.0 → 54.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{add-ODBKI7EV.js → add-QQY6QOTO.js} +4 -4
- package/dist/chunks/{chunk-FBYYZKN3.js → chunk-2F6JT2OC.js} +1 -1
- package/dist/chunks/{chunk-O6YJBWWC.js → chunk-4D42VZRX.js} +1 -1
- package/dist/chunks/{chunk-7CTLNKAS.js → chunk-7AQDR2RX.js} +1 -1
- package/dist/chunks/{chunk-UI2T3GI4.js → chunk-7B44AIGE.js} +2 -2
- package/dist/chunks/{chunk-LJXYGWOY.js → chunk-A4B4JQVP.js} +2 -2
- package/dist/chunks/{chunk-NVITPK2U.js → chunk-DDTKG4J3.js} +1 -1
- package/dist/chunks/{chunk-RCUMYP4L.js → chunk-DWA63R5L.js} +5 -8
- package/dist/chunks/{chunk-HXAMK45D.js → chunk-E6FCE2XJ.js} +1 -1
- package/dist/chunks/{chunk-Q4ZRBN2A.js → chunk-HJ2TEW5Y.js} +1 -1
- package/dist/chunks/{chunk-INFYZRHS.js → chunk-KTX4RQFM.js} +235 -58
- package/dist/chunks/{chunk-YE3C5CUX.js → chunk-LCNEKTLC.js} +31 -4
- package/dist/chunks/{chunk-BGQPLZFA.js → chunk-LGR4JRFA.js} +4 -4
- package/dist/chunks/{chunk-HL5ZRVF2.js → chunk-MLVCDMCS.js} +4 -4
- package/dist/chunks/{chunk-ULNWA6GY.js → chunk-MS3WAXLU.js} +1 -1
- package/dist/chunks/{chunk-Z2MBXYZZ.js → chunk-NKU6QGO6.js} +17 -2
- package/dist/chunks/{chunk-MSWXRAHA.js → chunk-NRIXI6V5.js} +1 -1
- package/dist/chunks/{chunk-BIHRICRM.js → chunk-P5AZW6W6.js} +8 -2
- package/dist/chunks/{chunk-76QQSALN.js → chunk-V7JDSYIZ.js} +3 -3
- package/dist/chunks/{chunk-VLQBXXOQ.js → chunk-VO7PRFFG.js} +19 -4
- package/dist/chunks/{chunk-U2NYO6GP.js → chunk-WJPWCLMH.js} +1 -1
- package/dist/chunks/{chunk-KJMSI2CT.js → chunk-YW7AYO7N.js} +1 -1
- package/dist/chunks/{compile-vercel-config-7THB6MTJ.js → compile-vercel-config-D2OQCK4B.js} +1 -1
- package/dist/chunks/{delete-USWDARFF.js → delete-VMW7FORM.js} +2 -2
- package/dist/chunks/{disable-K6B26MC2.js → disable-BDFZELDL.js} +2 -2
- package/dist/chunks/{discard-2T7HZCGR.js → discard-WIN3BOXR.js} +2 -2
- package/dist/chunks/{edit-2CC2WAO4.js → edit-IZQX4XAG.js} +3 -3
- package/dist/chunks/{enable-KEZA6F4T.js → enable-RFODZ2L7.js} +2 -2
- package/dist/chunks/{export-PE2T4HYP.js → export-5CCLXZYT.js} +2 -2
- package/dist/chunks/{inspect-TQSHD4MH.js → inspect-GEUUTDBY.js} +3 -3
- package/dist/chunks/{list-IDTF5TWY.js → list-H35AGNO2.js} +2 -2
- package/dist/chunks/{list-AU6URG3E.js → list-JIYDXQDJ.js} +3 -3
- package/dist/chunks/{ls-XOAWRTNQ.js → ls-WPNFJAS6.js} +4 -4
- package/dist/chunks/{publish-G42C77TP.js → publish-K7OPKXYC.js} +2 -2
- package/dist/chunks/{query-YTBD7YLX.js → query-IIUJIRHR.js} +82 -10
- package/dist/chunks/{reorder-BDOOUURL.js → reorder-GQ7BOQA7.js} +2 -2
- package/dist/chunks/{restore-ENUHC25O.js → restore-MODYFJSP.js} +2 -2
- package/dist/chunks/{rm-ALWF3NBL.js → rm-A45OKS6U.js} +4 -4
- package/dist/chunks/{rule-inspect-BV6MC7PG.js → rule-inspect-HJCERQHK.js} +4 -4
- package/dist/chunks/{rules-IGG7M2AC.js → rules-UNL3IB4P.js} +6 -6
- package/dist/chunks/{schema-ZYJOJIGL.js → schema-EUH7PJEX.js} +4 -4
- package/dist/chunks/{update-I3WE3IQJ.js → update-MOM4T2RN.js} +4 -4
- package/dist/commands/build/index.js +20 -12
- package/dist/commands/deploy/index.js +159 -12
- package/dist/commands/dev/index.js +50 -17
- package/dist/commands/env/index.js +5 -5
- package/dist/commands/link/index.js +8 -8
- package/dist/commands/list/index.js +3 -3
- package/dist/commands-bulk.js +53 -32
- package/dist/index.js +9 -9
- package/dist/version.mjs +1 -1
- package/package.json +21 -21
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesItemPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-HJ2TEW5Y.js";
|
|
13
|
+
import "./chunk-7B44AIGE.js";
|
|
14
14
|
import "./chunk-D7MGZH35.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
AGENT_REASON
|
|
23
23
|
} from "./chunk-QH7WYDEP.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-2F6JT2OC.js";
|
|
25
|
+
import "./chunk-KTX4RQFM.js";
|
|
26
26
|
import "./chunk-Q77ALSXR.js";
|
|
27
27
|
import {
|
|
28
28
|
buildCommandWithGlobalFlags,
|
|
@@ -32,7 +32,7 @@ var RULES_CONFIG = {
|
|
|
32
32
|
};
|
|
33
33
|
async function rules(client, argv) {
|
|
34
34
|
if (argv.length === 0) {
|
|
35
|
-
const lsFn = (await import("./ls-
|
|
35
|
+
const lsFn = (await import("./ls-WPNFJAS6.js")).default;
|
|
36
36
|
return lsFn(client, []);
|
|
37
37
|
}
|
|
38
38
|
const { subcommand, args, subcommandOriginal } = getSubcommand(
|
|
@@ -65,15 +65,15 @@ async function rules(client, argv) {
|
|
|
65
65
|
}
|
|
66
66
|
switch (subcommand) {
|
|
67
67
|
case "ls":
|
|
68
|
-
return (await import("./ls-
|
|
68
|
+
return (await import("./ls-WPNFJAS6.js")).default(client, args);
|
|
69
69
|
case "add":
|
|
70
|
-
return (await import("./add-
|
|
70
|
+
return (await import("./add-QQY6QOTO.js")).default(client, args);
|
|
71
71
|
case "inspect":
|
|
72
|
-
return (await import("./rule-inspect-
|
|
72
|
+
return (await import("./rule-inspect-HJCERQHK.js")).default(client, args);
|
|
73
73
|
case "rm":
|
|
74
|
-
return (await import("./rm-
|
|
74
|
+
return (await import("./rm-A45OKS6U.js")).default(client, args);
|
|
75
75
|
case "update":
|
|
76
|
-
return (await import("./update-
|
|
76
|
+
return (await import("./update-MOM4T2RN.js")).default(client, args);
|
|
77
77
|
default:
|
|
78
78
|
output_manager_default.error(`Unhandled rules subcommand: ${String(subcommandOriginal)}`);
|
|
79
79
|
return 1;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
fetchMetricDetailOrExit,
|
|
9
9
|
fetchMetricListOrExit,
|
|
10
10
|
formatErrorJson
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NKU6QGO6.js";
|
|
12
12
|
import {
|
|
13
13
|
indent_default
|
|
14
14
|
} from "./chunk-A3NYPUKZ.js";
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
} from "./chunk-XPKWKPWA.js";
|
|
21
21
|
import {
|
|
22
22
|
schemaSubcommand
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LCNEKTLC.js";
|
|
24
24
|
import {
|
|
25
25
|
getScope
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2F6JT2OC.js";
|
|
27
27
|
import {
|
|
28
28
|
require_pluralize
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KTX4RQFM.js";
|
|
30
30
|
import "./chunk-Q77ALSXR.js";
|
|
31
31
|
import "./chunk-NHGCQRK5.js";
|
|
32
32
|
import "./chunk-N2T234LO.js";
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesItemPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-HJ2TEW5Y.js";
|
|
13
|
+
import "./chunk-7B44AIGE.js";
|
|
14
14
|
import "./chunk-D7MGZH35.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
AGENT_REASON
|
|
23
23
|
} from "./chunk-QH7WYDEP.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-2F6JT2OC.js";
|
|
25
|
+
import "./chunk-KTX4RQFM.js";
|
|
26
26
|
import "./chunk-Q77ALSXR.js";
|
|
27
27
|
import {
|
|
28
28
|
buildCommandWithGlobalFlags,
|
|
@@ -11,36 +11,36 @@ import {
|
|
|
11
11
|
isLambda,
|
|
12
12
|
staticFiles,
|
|
13
13
|
writeBuildResult
|
|
14
|
-
} from "../../chunks/chunk-
|
|
14
|
+
} from "../../chunks/chunk-7AQDR2RX.js";
|
|
15
15
|
import {
|
|
16
16
|
pullCommandLogic
|
|
17
|
-
} from "../../chunks/chunk-
|
|
17
|
+
} from "../../chunks/chunk-LGR4JRFA.js";
|
|
18
18
|
import {
|
|
19
19
|
require_semver
|
|
20
20
|
} from "../../chunks/chunk-IB5L4LKZ.js";
|
|
21
21
|
import {
|
|
22
22
|
pickOverrides,
|
|
23
23
|
readProjectSettings
|
|
24
|
-
} from "../../chunks/chunk-
|
|
24
|
+
} from "../../chunks/chunk-NRIXI6V5.js";
|
|
25
25
|
import "../../chunks/chunk-YI3JV6GM.js";
|
|
26
26
|
import "../../chunks/chunk-BRQ6PX3U.js";
|
|
27
27
|
import {
|
|
28
28
|
stamp_default
|
|
29
29
|
} from "../../chunks/chunk-64IF634X.js";
|
|
30
30
|
import "../../chunks/chunk-VXYGCOKL.js";
|
|
31
|
-
import "../../chunks/chunk-
|
|
31
|
+
import "../../chunks/chunk-P5AZW6W6.js";
|
|
32
32
|
import {
|
|
33
33
|
printProjectNotFoundError
|
|
34
|
-
} from "../../chunks/chunk-
|
|
34
|
+
} from "../../chunks/chunk-V7JDSYIZ.js";
|
|
35
35
|
import {
|
|
36
36
|
AGENT_REASON,
|
|
37
37
|
AGENT_STATUS
|
|
38
38
|
} from "../../chunks/chunk-QH7WYDEP.js";
|
|
39
|
-
import "../../chunks/chunk-
|
|
39
|
+
import "../../chunks/chunk-MS3WAXLU.js";
|
|
40
40
|
import {
|
|
41
41
|
buildCommand
|
|
42
|
-
} from "../../chunks/chunk-
|
|
43
|
-
import "../../chunks/chunk-
|
|
42
|
+
} from "../../chunks/chunk-YW7AYO7N.js";
|
|
43
|
+
import "../../chunks/chunk-2F6JT2OC.js";
|
|
44
44
|
import {
|
|
45
45
|
help
|
|
46
46
|
} from "../../chunks/chunk-3NR6OYDV.js";
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
resolveProjectCwd,
|
|
66
66
|
ua_default,
|
|
67
67
|
validateConfig
|
|
68
|
-
} from "../../chunks/chunk-
|
|
68
|
+
} from "../../chunks/chunk-KTX4RQFM.js";
|
|
69
69
|
import {
|
|
70
70
|
TelemetryClient
|
|
71
71
|
} from "../../chunks/chunk-Q77ALSXR.js";
|
|
@@ -975,6 +975,7 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
975
975
|
let zeroConfigFallbackRoutes = [];
|
|
976
976
|
let detectedServices;
|
|
977
977
|
let detectedResolvedServices;
|
|
978
|
+
let servicesToRecord;
|
|
978
979
|
const hasExperimentalServicesV1ConfiguredInVercelConfig = hasNonEmptyObject(
|
|
979
980
|
localConfig.experimentalServices
|
|
980
981
|
);
|
|
@@ -1017,6 +1018,7 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1017
1018
|
builds = [{ src: "**", use: "@vercel/static" }];
|
|
1018
1019
|
}
|
|
1019
1020
|
detectedResolvedServices = detectedBuilders.services;
|
|
1021
|
+
servicesToRecord = detectedResolvedServices;
|
|
1020
1022
|
detectedServices = detectedBuilders.services?.filter(isExperimentalService2);
|
|
1021
1023
|
if (detectedBuilders.useImplicitEnvInjection && detectedServices && detectedServices.length > 0) {
|
|
1022
1024
|
const serviceUrlEnvVars = getExperimentalServiceUrlEnvVars({
|
|
@@ -1675,14 +1677,16 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1675
1677
|
}
|
|
1676
1678
|
const buildsToRun = [];
|
|
1677
1679
|
const seenBuildsToRun = /* @__PURE__ */ new Set();
|
|
1680
|
+
const recordedServices = [];
|
|
1678
1681
|
for (const service of detectedResolvedServices || []) {
|
|
1679
1682
|
const alreadyExecutedBuild = getAlreadyExecutedBuild(service.builder);
|
|
1680
1683
|
if (alreadyExecutedBuild) {
|
|
1681
1684
|
if (generatedExperimentalServicesV2Config) {
|
|
1682
1685
|
output_manager_default.warn(getGeneratedServiceAlreadyBuiltWarning(service));
|
|
1683
|
-
|
|
1684
|
-
serviceByBuilder.set(alreadyExecutedBuild, service);
|
|
1686
|
+
continue;
|
|
1685
1687
|
}
|
|
1688
|
+
serviceByBuilder.set(alreadyExecutedBuild, service);
|
|
1689
|
+
recordedServices.push(service);
|
|
1686
1690
|
continue;
|
|
1687
1691
|
}
|
|
1688
1692
|
const serviceBuilderIdentity = getBuilderIdentity(service.builder);
|
|
@@ -1691,7 +1695,9 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1691
1695
|
seenBuildsToRun.add(serviceBuilderIdentity);
|
|
1692
1696
|
buildsToRun.push(service.builder);
|
|
1693
1697
|
}
|
|
1698
|
+
recordedServices.push(service);
|
|
1694
1699
|
}
|
|
1700
|
+
servicesToRecord = recordedServices.length > 0 ? recordedServices : void 0;
|
|
1695
1701
|
if (buildsToRun.length > 0) {
|
|
1696
1702
|
await runBuilders(buildsToRun);
|
|
1697
1703
|
}
|
|
@@ -1853,7 +1859,9 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1853
1859
|
...detectedExperimentalServicesV2Config && Object.keys(detectedExperimentalServicesV2Config).length > 0 && {
|
|
1854
1860
|
experimentalServicesV2: detectedExperimentalServicesV2Config
|
|
1855
1861
|
},
|
|
1856
|
-
...!detectedExperimentalServicesV1Config &&
|
|
1862
|
+
...!detectedExperimentalServicesV1Config && servicesToRecord && servicesToRecord.length > 0 && {
|
|
1863
|
+
services: servicesToRecord
|
|
1864
|
+
},
|
|
1857
1865
|
...mergedDeploymentId && { deploymentId: mergedDeploymentId }
|
|
1858
1866
|
};
|
|
1859
1867
|
await import_fs_extra2.default.writeJSON(join3(outputDir, "config.json"), config, { spaces: 2 });
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
purchaseDomainIfAvailable,
|
|
14
14
|
require_cjs,
|
|
15
15
|
setupDomain
|
|
16
|
-
} from "../../chunks/chunk-
|
|
16
|
+
} from "../../chunks/chunk-DWA63R5L.js";
|
|
17
17
|
import {
|
|
18
18
|
readLocalConfig
|
|
19
|
-
} from "../../chunks/chunk-
|
|
19
|
+
} from "../../chunks/chunk-A4B4JQVP.js";
|
|
20
20
|
import {
|
|
21
21
|
highlight
|
|
22
22
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -40,8 +40,8 @@ import {
|
|
|
40
40
|
deprecatedArchiveSplitTgz,
|
|
41
41
|
getCommandAliases,
|
|
42
42
|
initSubcommand
|
|
43
|
-
} from "../../chunks/chunk-
|
|
44
|
-
import "../../chunks/chunk-
|
|
43
|
+
} from "../../chunks/chunk-VO7PRFFG.js";
|
|
44
|
+
import "../../chunks/chunk-LCNEKTLC.js";
|
|
45
45
|
import "../../chunks/chunk-IB56QKCM.js";
|
|
46
46
|
import "../../chunks/chunk-DPS62LHL.js";
|
|
47
47
|
import "../../chunks/chunk-SGPBULVT.js";
|
|
@@ -50,7 +50,7 @@ import "../../chunks/chunk-56AJHIQC.js";
|
|
|
50
50
|
import "../../chunks/chunk-IJJOI63T.js";
|
|
51
51
|
import {
|
|
52
52
|
pickOverrides
|
|
53
|
-
} from "../../chunks/chunk-
|
|
53
|
+
} from "../../chunks/chunk-NRIXI6V5.js";
|
|
54
54
|
import "../../chunks/chunk-BRQ6PX3U.js";
|
|
55
55
|
import {
|
|
56
56
|
stamp_default
|
|
@@ -58,17 +58,17 @@ import {
|
|
|
58
58
|
import "../../chunks/chunk-VXYGCOKL.js";
|
|
59
59
|
import {
|
|
60
60
|
ensureLink
|
|
61
|
-
} from "../../chunks/chunk-
|
|
61
|
+
} from "../../chunks/chunk-P5AZW6W6.js";
|
|
62
62
|
import {
|
|
63
63
|
validatePaths,
|
|
64
64
|
validateRootDirectory
|
|
65
|
-
} from "../../chunks/chunk-
|
|
65
|
+
} from "../../chunks/chunk-V7JDSYIZ.js";
|
|
66
66
|
import {
|
|
67
67
|
AGENT_STATUS
|
|
68
68
|
} from "../../chunks/chunk-QH7WYDEP.js";
|
|
69
|
-
import "../../chunks/chunk-
|
|
70
|
-
import "../../chunks/chunk-
|
|
71
|
-
import "../../chunks/chunk-
|
|
69
|
+
import "../../chunks/chunk-MS3WAXLU.js";
|
|
70
|
+
import "../../chunks/chunk-YW7AYO7N.js";
|
|
71
|
+
import "../../chunks/chunk-2F6JT2OC.js";
|
|
72
72
|
import {
|
|
73
73
|
help
|
|
74
74
|
} from "../../chunks/chunk-3NR6OYDV.js";
|
|
@@ -80,8 +80,9 @@ import {
|
|
|
80
80
|
parseTarget,
|
|
81
81
|
printAlignedLabel,
|
|
82
82
|
require_dist as require_dist2,
|
|
83
|
+
require_frameworks,
|
|
83
84
|
require_lib
|
|
84
|
-
} from "../../chunks/chunk-
|
|
85
|
+
} from "../../chunks/chunk-KTX4RQFM.js";
|
|
85
86
|
import {
|
|
86
87
|
TelemetryClient
|
|
87
88
|
} from "../../chunks/chunk-Q77ALSXR.js";
|
|
@@ -92,7 +93,9 @@ import "../../chunks/chunk-N2T234LO.js";
|
|
|
92
93
|
import {
|
|
93
94
|
require_ms
|
|
94
95
|
} from "../../chunks/chunk-GGP5R3FU.js";
|
|
95
|
-
import
|
|
96
|
+
import {
|
|
97
|
+
table
|
|
98
|
+
} from "../../chunks/chunk-LYCSVJIX.js";
|
|
96
99
|
import {
|
|
97
100
|
getCommandNameWithGlobalFlags,
|
|
98
101
|
getFlagsSpecification,
|
|
@@ -142,6 +145,7 @@ import {
|
|
|
142
145
|
// src/commands/deploy/index.ts
|
|
143
146
|
var import_client3 = __toESM(require_dist2(), 1);
|
|
144
147
|
var import_error_utils = __toESM(require_dist(), 1);
|
|
148
|
+
var import_frameworks = __toESM(require_frameworks(), 1);
|
|
145
149
|
var import_bytes = __toESM(require_bytes(), 1);
|
|
146
150
|
var import_chalk = __toESM(require_source(), 1);
|
|
147
151
|
var import_fs_extra2 = __toESM(require_lib(), 1);
|
|
@@ -453,6 +457,11 @@ var DeployTelemetryClient = class extends TelemetryClient {
|
|
|
453
457
|
this.trackCliFlag("no-wait");
|
|
454
458
|
}
|
|
455
459
|
}
|
|
460
|
+
trackCliFlagDry(flag) {
|
|
461
|
+
if (flag) {
|
|
462
|
+
this.trackCliFlag("dry");
|
|
463
|
+
}
|
|
464
|
+
}
|
|
456
465
|
trackCliFlagPrebuilt(flag) {
|
|
457
466
|
if (flag) {
|
|
458
467
|
this.trackCliFlag("prebuilt");
|
|
@@ -1233,6 +1242,7 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1233
1242
|
telemetryClient.trackCliFlagPrebuilt(parsedArguments.flags["--prebuilt"]);
|
|
1234
1243
|
telemetryClient.trackCliOptionRegions(parsedArguments.flags["--regions"]);
|
|
1235
1244
|
telemetryClient.trackCliFlagNoWait(parsedArguments.flags["--no-wait"]);
|
|
1245
|
+
telemetryClient.trackCliFlagDry(parsedArguments.flags["--dry"]);
|
|
1236
1246
|
telemetryClient.trackCliFlagYes(parsedArguments.flags["--yes"]);
|
|
1237
1247
|
telemetryClient.trackCliOptionTarget(parsedArguments.flags["--target"]);
|
|
1238
1248
|
telemetryClient.trackCliFlagProd(parsedArguments.flags["--prod"]);
|
|
@@ -1375,6 +1385,7 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1375
1385
|
paths
|
|
1376
1386
|
}),
|
|
1377
1387
|
failIfNotFound: !!projectNameOrId,
|
|
1388
|
+
requireExistingLink: parsedArguments.flags["--dry"],
|
|
1378
1389
|
v0: isV0
|
|
1379
1390
|
});
|
|
1380
1391
|
if (typeof link === "number") {
|
|
@@ -1459,6 +1470,34 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1459
1470
|
}
|
|
1460
1471
|
}
|
|
1461
1472
|
localConfig = localConfig || {};
|
|
1473
|
+
if (parsedArguments.flags["--dry"]) {
|
|
1474
|
+
try {
|
|
1475
|
+
const summary = await (0, import_client3.inspectDeploymentFiles)({
|
|
1476
|
+
path: cwd,
|
|
1477
|
+
archive: parsedArchive ? "tgz" : void 0,
|
|
1478
|
+
debug: output_manager_default.isDebugEnabled(),
|
|
1479
|
+
prebuilt: parsedArguments.flags["--prebuilt"],
|
|
1480
|
+
vercelOutputDir,
|
|
1481
|
+
projectName: project.name,
|
|
1482
|
+
rootDirectory,
|
|
1483
|
+
bulkRedirectsPath: localConfig.bulkRedirectsPath
|
|
1484
|
+
});
|
|
1485
|
+
const framework = resolveDeploymentFrameworkPreset({
|
|
1486
|
+
localFramework: localConfig.framework,
|
|
1487
|
+
projectFramework: project.framework
|
|
1488
|
+
});
|
|
1489
|
+
printDeploymentDryRun(
|
|
1490
|
+
client,
|
|
1491
|
+
summary,
|
|
1492
|
+
framework,
|
|
1493
|
+
asJson || !client.stdout.isTTY
|
|
1494
|
+
);
|
|
1495
|
+
return 0;
|
|
1496
|
+
} catch (err) {
|
|
1497
|
+
printError(err);
|
|
1498
|
+
return 1;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1462
1501
|
if (localConfig.name) {
|
|
1463
1502
|
output_manager_default.print(
|
|
1464
1503
|
`${prependEmoji(
|
|
@@ -2068,6 +2107,114 @@ function handleCreateDeployError(error, localConfig) {
|
|
|
2068
2107
|
}
|
|
2069
2108
|
return error;
|
|
2070
2109
|
}
|
|
2110
|
+
function toDeploymentFramework(framework) {
|
|
2111
|
+
return {
|
|
2112
|
+
name: framework.name,
|
|
2113
|
+
slug: framework.slug
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
function resolveDeploymentFrameworkPreset({
|
|
2117
|
+
localFramework,
|
|
2118
|
+
projectFramework
|
|
2119
|
+
}) {
|
|
2120
|
+
const frameworkSlug = typeof localFramework === "undefined" ? projectFramework : localFramework;
|
|
2121
|
+
const frameworkPreset = import_frameworks.frameworkList.find(
|
|
2122
|
+
(framework) => framework.slug === frameworkSlug
|
|
2123
|
+
);
|
|
2124
|
+
const otherPreset = import_frameworks.frameworkList.find((framework) => framework.slug === null);
|
|
2125
|
+
return frameworkPreset ? toDeploymentFramework(frameworkPreset) : otherPreset ? toDeploymentFramework(otherPreset) : { name: "Other", slug: null };
|
|
2126
|
+
}
|
|
2127
|
+
function printDeploymentDryRun(client, summary, framework, asJson) {
|
|
2128
|
+
const directories = getDirectoryDistribution(summary.files);
|
|
2129
|
+
const largestFiles = [...summary.files].sort((a, b) => b.size - a.size || a.path.localeCompare(b.path)).slice(0, 10);
|
|
2130
|
+
if (asJson) {
|
|
2131
|
+
client.stdout.write(
|
|
2132
|
+
`${JSON.stringify(
|
|
2133
|
+
{
|
|
2134
|
+
framework,
|
|
2135
|
+
basePath: summary.basePath,
|
|
2136
|
+
fileCount: summary.fileCount,
|
|
2137
|
+
totalSize: summary.totalSize,
|
|
2138
|
+
ignoredCount: summary.ignoredCount,
|
|
2139
|
+
ignored: summary.ignored,
|
|
2140
|
+
directories,
|
|
2141
|
+
largestFiles,
|
|
2142
|
+
files: summary.files
|
|
2143
|
+
},
|
|
2144
|
+
null,
|
|
2145
|
+
2
|
|
2146
|
+
)}
|
|
2147
|
+
`
|
|
2148
|
+
);
|
|
2149
|
+
return;
|
|
2150
|
+
}
|
|
2151
|
+
const lines = [
|
|
2152
|
+
`${import_chalk.default.bold("Deployment Dry Run")}
|
|
2153
|
+
`,
|
|
2154
|
+
`${import_chalk.default.bold("Detected Framework Preset")}: ${framework.name}${framework.slug ? ` (${framework.slug})` : ""}`,
|
|
2155
|
+
`Included: ${summary.fileCount} ${pluralize(
|
|
2156
|
+
"file",
|
|
2157
|
+
summary.fileCount
|
|
2158
|
+
)}, ${formatBytes(summary.totalSize)}`,
|
|
2159
|
+
`Ignored: ${summary.ignoredCount} ${pluralize(
|
|
2160
|
+
"path",
|
|
2161
|
+
summary.ignoredCount
|
|
2162
|
+
)}
|
|
2163
|
+
`
|
|
2164
|
+
];
|
|
2165
|
+
if (directories.length > 0) {
|
|
2166
|
+
lines.push(
|
|
2167
|
+
table(
|
|
2168
|
+
[
|
|
2169
|
+
["Path", "Files", "Size"],
|
|
2170
|
+
...directories.map((item) => [
|
|
2171
|
+
item.path,
|
|
2172
|
+
String(item.fileCount),
|
|
2173
|
+
formatBytes(item.size)
|
|
2174
|
+
])
|
|
2175
|
+
],
|
|
2176
|
+
{ align: ["l", "r", "r"], hsep: 4 }
|
|
2177
|
+
),
|
|
2178
|
+
""
|
|
2179
|
+
);
|
|
2180
|
+
}
|
|
2181
|
+
if (largestFiles.length > 0) {
|
|
2182
|
+
lines.push(
|
|
2183
|
+
import_chalk.default.bold("Largest Files"),
|
|
2184
|
+
table(
|
|
2185
|
+
largestFiles.map((file) => [file.path, formatBytes(file.size)]),
|
|
2186
|
+
{ align: ["l", "r"], hsep: 4 }
|
|
2187
|
+
),
|
|
2188
|
+
""
|
|
2189
|
+
);
|
|
2190
|
+
}
|
|
2191
|
+
output_manager_default.print(`${lines.join("\n")}
|
|
2192
|
+
`);
|
|
2193
|
+
}
|
|
2194
|
+
function getDirectoryDistribution(files) {
|
|
2195
|
+
const directories = /* @__PURE__ */ new Map();
|
|
2196
|
+
for (const file of files) {
|
|
2197
|
+
const [segment] = file.path.split("/");
|
|
2198
|
+
const key = file.path.includes("/") ? segment : file.path;
|
|
2199
|
+
const current = directories.get(key) ?? {
|
|
2200
|
+
path: key,
|
|
2201
|
+
fileCount: 0,
|
|
2202
|
+
size: 0
|
|
2203
|
+
};
|
|
2204
|
+
current.fileCount += 1;
|
|
2205
|
+
current.size += file.size;
|
|
2206
|
+
directories.set(key, current);
|
|
2207
|
+
}
|
|
2208
|
+
return Array.from(directories.values()).sort(
|
|
2209
|
+
(a, b) => b.size - a.size || a.path.localeCompare(b.path)
|
|
2210
|
+
);
|
|
2211
|
+
}
|
|
2212
|
+
function formatBytes(size) {
|
|
2213
|
+
return import_bytes.default.format(size, { decimalPlaces: 1 });
|
|
2214
|
+
}
|
|
2215
|
+
function pluralize(word, count) {
|
|
2216
|
+
return count === 1 ? word : `${word}s`;
|
|
2217
|
+
}
|
|
2071
2218
|
var addProcessEnv = async (log, env) => {
|
|
2072
2219
|
let val;
|
|
2073
2220
|
for (const key of Object.keys(env)) {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "../../chunks/chunk-2HSQ7YUK.js";
|
|
10
10
|
import {
|
|
11
11
|
getUpdateCommand
|
|
12
|
-
} from "../../chunks/chunk-
|
|
12
|
+
} from "../../chunks/chunk-E6FCE2XJ.js";
|
|
13
13
|
import {
|
|
14
14
|
highlight
|
|
15
15
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -26,23 +26,23 @@ import {
|
|
|
26
26
|
require_mime_types,
|
|
27
27
|
require_npa,
|
|
28
28
|
staticFiles
|
|
29
|
-
} from "../../chunks/chunk-
|
|
29
|
+
} from "../../chunks/chunk-7AQDR2RX.js";
|
|
30
30
|
import "../../chunks/chunk-IB5L4LKZ.js";
|
|
31
31
|
import {
|
|
32
32
|
pickOverrides
|
|
33
|
-
} from "../../chunks/chunk-
|
|
33
|
+
} from "../../chunks/chunk-NRIXI6V5.js";
|
|
34
34
|
import "../../chunks/chunk-YI3JV6GM.js";
|
|
35
35
|
import {
|
|
36
36
|
displayDetectedServices,
|
|
37
37
|
printProjectNotFoundError,
|
|
38
38
|
readConfig,
|
|
39
39
|
setupAndLink
|
|
40
|
-
} from "../../chunks/chunk-
|
|
40
|
+
} from "../../chunks/chunk-V7JDSYIZ.js";
|
|
41
41
|
import "../../chunks/chunk-QH7WYDEP.js";
|
|
42
42
|
import {
|
|
43
43
|
getLocalPathConfig
|
|
44
|
-
} from "../../chunks/chunk-
|
|
45
|
-
import "../../chunks/chunk-
|
|
44
|
+
} from "../../chunks/chunk-MS3WAXLU.js";
|
|
45
|
+
import "../../chunks/chunk-2F6JT2OC.js";
|
|
46
46
|
import {
|
|
47
47
|
help
|
|
48
48
|
} from "../../chunks/chunk-3NR6OYDV.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
resolveProjectCwd,
|
|
71
71
|
tryDetectServices,
|
|
72
72
|
validateConfig
|
|
73
|
-
} from "../../chunks/chunk-
|
|
73
|
+
} from "../../chunks/chunk-KTX4RQFM.js";
|
|
74
74
|
import {
|
|
75
75
|
TelemetryClient
|
|
76
76
|
} from "../../chunks/chunk-Q77ALSXR.js";
|
|
@@ -17798,6 +17798,16 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
|
|
|
17798
17798
|
mapToEntrypoint.set(src, originalSrc);
|
|
17799
17799
|
}
|
|
17800
17800
|
}
|
|
17801
|
+
if (buildConfig.config?.framework === "node" && !fileList.includes(src)) {
|
|
17802
|
+
const originalSrc = src;
|
|
17803
|
+
const existing = fileList.find(
|
|
17804
|
+
(path6) => /^(?:src\/)?server\.[cm]?[jt]s$/.test(path6)
|
|
17805
|
+
);
|
|
17806
|
+
if (existing) {
|
|
17807
|
+
src = existing;
|
|
17808
|
+
mapToEntrypoint.set(src, originalSrc);
|
|
17809
|
+
}
|
|
17810
|
+
}
|
|
17801
17811
|
if (buildConfig.config?.framework === "go" && !fileList.includes(src)) {
|
|
17802
17812
|
const originalSrc = src;
|
|
17803
17813
|
const goEntrypoints = [
|
|
@@ -18640,7 +18650,7 @@ var ServicesOrchestrator = class {
|
|
|
18640
18650
|
if (targetPort === void 0) {
|
|
18641
18651
|
continue;
|
|
18642
18652
|
}
|
|
18643
|
-
perServiceEnv[binding.env] = `http://127.0.0.1:${targetPort}
|
|
18653
|
+
perServiceEnv[binding.env] = `http://127.0.0.1:${targetPort}`;
|
|
18644
18654
|
}
|
|
18645
18655
|
const env = cloneEnv(
|
|
18646
18656
|
{
|
|
@@ -19808,8 +19818,8 @@ ${partHeaders}\r
|
|
|
19808
19818
|
const { envConfigs, files, devCacheDir, cwd: workPath } = this;
|
|
19809
19819
|
try {
|
|
19810
19820
|
const { builder: builder2 } = middleware.builderWithPkg;
|
|
19811
|
-
if (
|
|
19812
|
-
startMiddlewareResult = await builder2.startDevServer
|
|
19821
|
+
if (typeof builder2.startDevServer === "function") {
|
|
19822
|
+
startMiddlewareResult = await builder2.startDevServer({
|
|
19813
19823
|
files,
|
|
19814
19824
|
entrypoint: middleware.entrypoint,
|
|
19815
19825
|
workPath,
|
|
@@ -20189,7 +20199,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20189
20199
|
}
|
|
20190
20200
|
}
|
|
20191
20201
|
const { builder, pkg: builderPkg } = match.builderWithPkg;
|
|
20192
|
-
if (
|
|
20202
|
+
if (typeof builder.startDevServer === "function") {
|
|
20193
20203
|
let devServerResult = null;
|
|
20194
20204
|
try {
|
|
20195
20205
|
const { envConfigs, files, devCacheDir, cwd: workPath } = this;
|
|
@@ -20231,11 +20241,13 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20231
20241
|
}
|
|
20232
20242
|
if (devServerResult) {
|
|
20233
20243
|
requestId = generateRequestId(this.podId, true);
|
|
20234
|
-
const { port, pid, shutdown } = devServerResult;
|
|
20244
|
+
const { port, pid, shutdown, persistent } = devServerResult;
|
|
20235
20245
|
this.shutdownCallbacks.set(pid, shutdown);
|
|
20236
|
-
|
|
20237
|
-
|
|
20238
|
-
|
|
20246
|
+
if (!persistent) {
|
|
20247
|
+
res.once("close", () => {
|
|
20248
|
+
this.killBuilderDevServer(pid);
|
|
20249
|
+
});
|
|
20250
|
+
}
|
|
20239
20251
|
debug(
|
|
20240
20252
|
`Proxying to "${builderPkg.name}" dev server (port=${port}, pid=${pid})`
|
|
20241
20253
|
);
|
|
@@ -20726,7 +20738,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
20726
20738
|
return void 0;
|
|
20727
20739
|
}
|
|
20728
20740
|
async _getVercelConfig() {
|
|
20729
|
-
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-
|
|
20741
|
+
const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-D2OQCK4B.js");
|
|
20730
20742
|
await compileVercelConfig(this.cwd);
|
|
20731
20743
|
const configPath = getLocalPathConfig(this.cwd);
|
|
20732
20744
|
const [
|
|
@@ -21115,6 +21127,27 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21115
21127
|
this.proxy.ws(req, socket, head, { target });
|
|
21116
21128
|
return;
|
|
21117
21129
|
}
|
|
21130
|
+
const vercelConfig2 = await this.getVercelConfig();
|
|
21131
|
+
if (vercelConfig2.experimentalServicesV2 || vercelConfig2.services) {
|
|
21132
|
+
const routeResult = await devRouter(
|
|
21133
|
+
req.url || "/",
|
|
21134
|
+
req.method,
|
|
21135
|
+
vercelConfig2.routes,
|
|
21136
|
+
this,
|
|
21137
|
+
vercelConfig2
|
|
21138
|
+
);
|
|
21139
|
+
if (isServiceDestination(routeResult.matched_route)) {
|
|
21140
|
+
const { service: serviceName } = routeResult.matched_route.destination;
|
|
21141
|
+
const origin = this.orchestrator.getServiceOrigin(serviceName);
|
|
21142
|
+
if (origin) {
|
|
21143
|
+
output_manager_default.debug(
|
|
21144
|
+
`Detected "upgrade" event, proxying to service "${serviceName}" at ${origin}`
|
|
21145
|
+
);
|
|
21146
|
+
this.proxy.ws(req, socket, head, { target: origin });
|
|
21147
|
+
return;
|
|
21148
|
+
}
|
|
21149
|
+
}
|
|
21150
|
+
}
|
|
21118
21151
|
output_manager_default.debug(
|
|
21119
21152
|
`Detected "upgrade" event, but no matching service found for ${pathname2}`
|
|
21120
21153
|
);
|
|
@@ -21130,7 +21163,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
21130
21163
|
const pathname = url3.parse(req.url || "/").pathname || "/";
|
|
21131
21164
|
for (const match of this.buildMatches.values()) {
|
|
21132
21165
|
const { builder } = match.builderWithPkg;
|
|
21133
|
-
if (
|
|
21166
|
+
if (typeof builder.startDevServer === "function") {
|
|
21134
21167
|
try {
|
|
21135
21168
|
const result = await builder.startDevServer({
|
|
21136
21169
|
files: this.files,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
formatEnvironment,
|
|
22
22
|
validateLsArgs
|
|
23
|
-
} from "../../chunks/chunk-
|
|
23
|
+
} from "../../chunks/chunk-DDTKG4J3.js";
|
|
24
24
|
import {
|
|
25
25
|
validateJsonOutput
|
|
26
26
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
@@ -29,8 +29,8 @@ import {
|
|
|
29
29
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
30
30
|
import {
|
|
31
31
|
getCommandAliases
|
|
32
|
-
} from "../../chunks/chunk-
|
|
33
|
-
import "../../chunks/chunk-
|
|
32
|
+
} from "../../chunks/chunk-VO7PRFFG.js";
|
|
33
|
+
import "../../chunks/chunk-LCNEKTLC.js";
|
|
34
34
|
import "../../chunks/chunk-IB56QKCM.js";
|
|
35
35
|
import "../../chunks/chunk-DPS62LHL.js";
|
|
36
36
|
import "../../chunks/chunk-SGPBULVT.js";
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
stamp_default
|
|
48
48
|
} from "../../chunks/chunk-64IF634X.js";
|
|
49
49
|
import "../../chunks/chunk-VXYGCOKL.js";
|
|
50
|
-
import "../../chunks/chunk-
|
|
50
|
+
import "../../chunks/chunk-YW7AYO7N.js";
|
|
51
51
|
import {
|
|
52
52
|
help
|
|
53
53
|
} from "../../chunks/chunk-3NR6OYDV.js";
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
require_frameworks,
|
|
73
73
|
runSubcommand,
|
|
74
74
|
updateSubcommand
|
|
75
|
-
} from "../../chunks/chunk-
|
|
75
|
+
} from "../../chunks/chunk-KTX4RQFM.js";
|
|
76
76
|
import {
|
|
77
77
|
TelemetryClient,
|
|
78
78
|
require_dist as require_dist2
|