vercel 53.4.0 → 54.1.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-FYITUY65.js → add-XFFRWMRQ.js} +10 -8
- package/dist/chunks/{chunk-NF7HK5MP.js → chunk-2DFWEDF7.js} +2 -2
- package/dist/chunks/{chunk-GQLARSTH.js → chunk-4GQQJY5Y.js} +1 -1
- package/dist/chunks/{chunk-ONYQGA2O.js → chunk-4PSOOFYO.js} +2 -2
- package/dist/chunks/{chunk-KTULXE6M.js → chunk-4VPRHRPA.js} +3 -3
- package/dist/chunks/{chunk-WOWCXMTU.js → chunk-76ZNZKIN.js} +1 -3
- package/dist/chunks/{chunk-GCKUEAUE.js → chunk-CQANJIEC.js} +2 -2
- package/dist/chunks/{chunk-MW7BI4C2.js → chunk-CVDYWVCD.js} +2 -2
- package/dist/chunks/{chunk-KSIISCB2.js → chunk-DKD6GTQT.js} +1 -1
- package/dist/chunks/{chunk-IVC36JQ5.js → chunk-F2UPASLT.js} +9 -7
- package/dist/chunks/{chunk-Z2ES2XHU.js → chunk-FUBTAFL2.js} +2 -2
- package/dist/chunks/{chunk-PU7YKGJI.js → chunk-FXOKKAK2.js} +6 -6
- package/dist/chunks/{chunk-KM7WTYJ4.js → chunk-FXSXQHVF.js} +4 -4
- package/dist/chunks/{chunk-NIOGCTVR.js → chunk-IFATV36R.js} +2 -2
- package/dist/chunks/{chunk-KHDOCVQF.js → chunk-IIZO5JJ2.js} +1 -1
- package/dist/chunks/{chunk-YWCYZANP.js → chunk-J3BCJYPE.js} +6 -6
- package/dist/chunks/{chunk-4LDQIDKG.js → chunk-JFVGRFME.js} +2 -2
- package/dist/chunks/{chunk-3XU5UGVN.js → chunk-JFWE5ORG.js} +2 -2
- package/dist/chunks/{chunk-73EVSBLA.js → chunk-KWDV5FZH.js} +2 -2
- package/dist/chunks/{chunk-54T7XV3H.js → chunk-LVUE7LLE.js} +1 -1
- package/dist/chunks/{chunk-IS56OO2J.js → chunk-MMF4BVAP.js} +5 -5
- package/dist/chunks/chunk-N2T234LO.js +3144 -0
- package/dist/chunks/{chunk-5HTDIHTQ.js → chunk-N4WFAZKO.js} +4 -4
- package/dist/chunks/{chunk-ZY4YCCXG.js → chunk-N733ZD4W.js} +1 -1
- package/dist/chunks/{chunk-X7KU44KR.js → chunk-NYJXGEIR.js} +1 -1
- package/dist/chunks/chunk-P4QNYOFB.js +96 -0
- package/dist/chunks/{chunk-CMAHZSFA.js → chunk-PNA7EZB2.js} +6 -3
- package/dist/chunks/{chunk-WZO6BNJ7.js → chunk-PPIAHRII.js} +2 -2
- package/dist/chunks/{chunk-3NSIZGHP.js → chunk-TZMIHH5D.js} +3 -3
- package/dist/chunks/{chunk-EBEBY45K.js → chunk-UGXBNJMO.js} +5 -100
- package/dist/chunks/{chunk-AXQNAI65.js → chunk-ULXHXZCZ.js} +1 -1
- package/dist/chunks/{chunk-6EI6XOUG.js → chunk-UTXSTM52.js} +98 -64
- package/dist/chunks/{chunk-SLWOG5CX.js → chunk-UVFXUXOZ.js} +155 -84
- package/dist/chunks/{chunk-44EL4BJL.js → chunk-V6RCNEUA.js} +424 -2730
- package/dist/chunks/{chunk-LBP7YFBV.js → chunk-X775BOSL.js} +651 -3662
- package/dist/chunks/{chunk-7TCOOSFP.js → chunk-XNUHSM7I.js} +4 -4
- package/dist/chunks/{chunk-JZLADLMF.js → chunk-XVAEOG4L.js} +2 -2
- package/dist/chunks/{chunk-HAJ2XRTQ.js → chunk-ZAAKSLHC.js} +2 -2
- package/dist/chunks/{chunk-QGLS47RE.js → chunk-ZINNI4TC.js} +1 -1
- package/dist/chunks/{chunk-6447C5WV.js → chunk-ZKKIBUCU.js} +3 -3
- package/dist/chunks/cjs-DV4RM7XU.js +20743 -0
- package/dist/chunks/{compile-vercel-config-ED6WXKEL.js → compile-vercel-config-42PRUTEP.js} +6 -4
- package/dist/chunks/constants-3FSSR6E7.js +13 -0
- package/dist/chunks/{delete-FYRG67YL.js → delete-MXCXLO5L.js} +8 -6
- package/dist/chunks/{disable-T6JFY4LL.js → disable-LXQSUVY3.js} +8 -6
- package/dist/chunks/{discard-OLVACEPN.js → discard-CKMEANJI.js} +8 -6
- package/dist/chunks/{edit-JI2VCMGG.js → edit-PKYWQTN6.js} +9 -7
- package/dist/chunks/{enable-2W35HGRM.js → enable-IONDBJSL.js} +8 -6
- package/dist/chunks/exec-5MN7VTSE.js +1368 -0
- package/dist/chunks/{export-FFMFMPGE.js → export-YV3QFTMT.js} +8 -6
- package/dist/chunks/{inspect-RDRV6BUD.js → inspect-SF355FJC.js} +10 -8
- package/dist/chunks/{list-5WGQ7F6P.js → list-GEI7DMTS.js} +8 -6
- package/dist/chunks/{list-F2GP6UZ7.js → list-ZGR3WI5L.js} +13 -11
- package/dist/chunks/{ls-ZLHJPSZZ.js → ls-GYN5LXZK.js} +10 -8
- package/dist/chunks/pkg-56KRLZ5K.js +13 -0
- package/dist/chunks/{publish-S2PGRBDP.js → publish-3WCELCTS.js} +8 -6
- package/dist/chunks/{query-G5K7DLLJ.js → query-TP56OPX6.js} +12 -10
- package/dist/chunks/{reorder-K5VXZ7F5.js → reorder-QRNHPN5V.js} +8 -6
- package/dist/chunks/{restore-QJYBYUIZ.js → restore-IGN4HUFX.js} +8 -6
- package/dist/chunks/{rm-WCHM3XXB.js → rm-55RGOT4O.js} +10 -8
- package/dist/chunks/{rule-inspect-VMWUI4WH.js → rule-inspect-QVOVMKDK.js} +10 -8
- package/dist/chunks/{rules-SOQXK4AE.js → rules-KRCW5RQK.js} +9 -8
- package/dist/chunks/{schema-2H2WLFJN.js → schema-3J3IBIFA.js} +11 -9
- package/dist/chunks/{types-7VDI75PV.js → types-QAT6PCGL.js} +5 -4
- package/dist/chunks/{update-W6DZOFHV.js → update-E5UAD2DD.js} +10 -8
- package/dist/commands/build/index.js +71 -25
- package/dist/commands/deploy/index.js +66 -53
- package/dist/commands/dev/index.js +58 -30
- package/dist/commands/env/index.js +20 -18
- package/dist/commands/link/index.js +21 -19
- package/dist/commands/list/index.js +14 -12
- package/dist/commands-bulk.js +1817 -1449
- package/dist/help.js +1 -1
- package/dist/index.js +236 -22334
- package/dist/version.mjs +1 -1
- package/package.json +28 -24
|
@@ -11,35 +11,34 @@ import {
|
|
|
11
11
|
isLambda,
|
|
12
12
|
staticFiles,
|
|
13
13
|
writeBuildResult
|
|
14
|
-
} from "../../chunks/chunk-
|
|
14
|
+
} from "../../chunks/chunk-PNA7EZB2.js";
|
|
15
15
|
import {
|
|
16
16
|
require_semver
|
|
17
17
|
} from "../../chunks/chunk-IB5L4LKZ.js";
|
|
18
18
|
import {
|
|
19
19
|
pullCommandLogic
|
|
20
|
-
} from "../../chunks/chunk-
|
|
21
|
-
import {
|
|
22
|
-
pickOverrides,
|
|
23
|
-
readProjectSettings
|
|
24
|
-
} from "../../chunks/chunk-54T7XV3H.js";
|
|
20
|
+
} from "../../chunks/chunk-FXOKKAK2.js";
|
|
25
21
|
import {
|
|
26
22
|
AGENT_REASON,
|
|
27
23
|
AGENT_STATUS
|
|
28
24
|
} from "../../chunks/chunk-E3NE4SKN.js";
|
|
25
|
+
import {
|
|
26
|
+
pickOverrides,
|
|
27
|
+
readProjectSettings
|
|
28
|
+
} from "../../chunks/chunk-LVUE7LLE.js";
|
|
29
29
|
import {
|
|
30
30
|
ua_default
|
|
31
|
-
} from "../../chunks/chunk-
|
|
32
|
-
import "../../chunks/chunk-
|
|
33
|
-
import "../../chunks/chunk-
|
|
34
|
-
import "../../chunks/chunk-
|
|
35
|
-
import "../../chunks/chunk-
|
|
31
|
+
} from "../../chunks/chunk-76ZNZKIN.js";
|
|
32
|
+
import "../../chunks/chunk-N733ZD4W.js";
|
|
33
|
+
import "../../chunks/chunk-N4WFAZKO.js";
|
|
34
|
+
import "../../chunks/chunk-UTXSTM52.js";
|
|
35
|
+
import "../../chunks/chunk-4VPRHRPA.js";
|
|
36
36
|
import {
|
|
37
37
|
buildCommand
|
|
38
|
-
} from "../../chunks/chunk-
|
|
38
|
+
} from "../../chunks/chunk-ZKKIBUCU.js";
|
|
39
39
|
import {
|
|
40
40
|
help
|
|
41
|
-
} from "../../chunks/chunk-
|
|
42
|
-
import "../../chunks/chunk-KSIISCB2.js";
|
|
41
|
+
} from "../../chunks/chunk-MMF4BVAP.js";
|
|
43
42
|
import {
|
|
44
43
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
45
44
|
VERCEL_DIR,
|
|
@@ -59,33 +58,36 @@ import {
|
|
|
59
58
|
require_minimatch,
|
|
60
59
|
resolveProjectCwd,
|
|
61
60
|
validateConfig
|
|
62
|
-
} from "../../chunks/chunk-
|
|
61
|
+
} from "../../chunks/chunk-X775BOSL.js";
|
|
63
62
|
import {
|
|
64
63
|
TelemetryClient
|
|
65
64
|
} from "../../chunks/chunk-4OEA5ILS.js";
|
|
66
65
|
import {
|
|
67
66
|
outputAgentError
|
|
68
|
-
} from "../../chunks/chunk-
|
|
67
|
+
} from "../../chunks/chunk-ULXHXZCZ.js";
|
|
69
68
|
import {
|
|
70
69
|
stamp_default
|
|
71
70
|
} from "../../chunks/chunk-CO5D46AG.js";
|
|
71
|
+
import "../../chunks/chunk-N2T234LO.js";
|
|
72
|
+
import "../../chunks/chunk-DKD6GTQT.js";
|
|
72
73
|
import {
|
|
73
74
|
getFlagsSpecification,
|
|
74
75
|
getGlobalFlagsOnlyFromArgs,
|
|
75
76
|
parseArguments,
|
|
76
77
|
printError,
|
|
77
78
|
toEnumerableError
|
|
78
|
-
} from "../../chunks/chunk-
|
|
79
|
+
} from "../../chunks/chunk-4GQQJY5Y.js";
|
|
79
80
|
import {
|
|
80
81
|
CantParseJSONFile,
|
|
81
82
|
cmd,
|
|
82
83
|
getCommandName,
|
|
83
84
|
getCommandNamePlain,
|
|
84
|
-
init_pkg,
|
|
85
85
|
packageName,
|
|
86
|
-
pkg_default,
|
|
87
86
|
require_lib as require_lib2
|
|
88
|
-
} from "../../chunks/chunk-
|
|
87
|
+
} from "../../chunks/chunk-UGXBNJMO.js";
|
|
88
|
+
import {
|
|
89
|
+
pkg_default
|
|
90
|
+
} from "../../chunks/chunk-P4QNYOFB.js";
|
|
89
91
|
import {
|
|
90
92
|
emoji,
|
|
91
93
|
output_manager_default,
|
|
@@ -117,6 +119,7 @@ import {
|
|
|
117
119
|
getDiscontinuedNodeVersions,
|
|
118
120
|
getInstalledPackageVersion,
|
|
119
121
|
getServiceUrlEnvVars,
|
|
122
|
+
getExperimentalServiceUrlEnvVars,
|
|
120
123
|
normalizePath,
|
|
121
124
|
NowBuildError as NowBuildError2,
|
|
122
125
|
runNpmInstall,
|
|
@@ -314,9 +317,6 @@ function sortBuilders(builds) {
|
|
|
314
317
|
});
|
|
315
318
|
}
|
|
316
319
|
|
|
317
|
-
// src/commands/build/index.ts
|
|
318
|
-
init_pkg();
|
|
319
|
-
|
|
320
320
|
// src/util/telemetry/commands/build/index.ts
|
|
321
321
|
var BuildTelemetryClient = class extends TelemetryClient {
|
|
322
322
|
trackCliOptionOutput(path) {
|
|
@@ -858,8 +858,8 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
858
858
|
builds = [{ src: "**", use: "@vercel/static" }];
|
|
859
859
|
}
|
|
860
860
|
detectedServices = detectedBuilders.services;
|
|
861
|
-
if (detectedServices && detectedServices.length > 0) {
|
|
862
|
-
const serviceUrlEnvVars =
|
|
861
|
+
if (detectedBuilders.useImplicitEnvInjection && detectedServices && detectedServices.length > 0) {
|
|
862
|
+
const serviceUrlEnvVars = getExperimentalServiceUrlEnvVars({
|
|
863
863
|
services: detectedServices,
|
|
864
864
|
frameworkList: import_frameworks2.frameworkList,
|
|
865
865
|
currentEnv: process.env,
|
|
@@ -945,6 +945,7 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
945
945
|
serviceByBuilder.set(service.builder, service);
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
|
+
const preDeployEntries = [];
|
|
948
949
|
for (const build of sortedBuilders) {
|
|
949
950
|
if (typeof build.src !== "string")
|
|
950
951
|
continue;
|
|
@@ -1013,6 +1014,7 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1013
1014
|
},
|
|
1014
1015
|
installCommand: service.installCommand ?? void 0,
|
|
1015
1016
|
buildCommand: service.buildCommand ?? void 0,
|
|
1017
|
+
preDeployCommand: service.preDeployCommand ?? void 0,
|
|
1016
1018
|
framework: builderFramework,
|
|
1017
1019
|
nodeVersion: projectSettings.nodeVersion,
|
|
1018
1020
|
bunVersion: localConfig.bunVersion ?? void 0
|
|
@@ -1045,6 +1047,11 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1045
1047
|
});
|
|
1046
1048
|
const serviceRoutePrefix = build.config?.routePrefix;
|
|
1047
1049
|
const serviceWorkspace = build.config?.workspace;
|
|
1050
|
+
const preDeployCmd = service?.preDeployCommand?.trim();
|
|
1051
|
+
const preDeployEntry = preDeployCmd && service ? { service: service.name } : void 0;
|
|
1052
|
+
if (preDeployEntry) {
|
|
1053
|
+
preDeployEntries.push(preDeployEntry);
|
|
1054
|
+
}
|
|
1048
1055
|
const buildOptions = {
|
|
1049
1056
|
files: buildFiles,
|
|
1050
1057
|
entrypoint: buildEntrypoint,
|
|
@@ -1053,6 +1060,11 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1053
1060
|
config: buildConfig,
|
|
1054
1061
|
meta,
|
|
1055
1062
|
span: builderSpan,
|
|
1063
|
+
...preDeployCmd ? {
|
|
1064
|
+
registerPreDeploy: (callback) => {
|
|
1065
|
+
preDeployEntry.callback = callback;
|
|
1066
|
+
}
|
|
1067
|
+
} : void 0,
|
|
1056
1068
|
...service ? {
|
|
1057
1069
|
service: {
|
|
1058
1070
|
name: service.name,
|
|
@@ -1067,6 +1079,24 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1067
1079
|
output_manager_default.debug(
|
|
1068
1080
|
`Building entrypoint "${build.src}" with "${builderPkg.name}"`
|
|
1069
1081
|
);
|
|
1082
|
+
const restoreEnv = /* @__PURE__ */ new Map();
|
|
1083
|
+
if (detectedServices && service?.env) {
|
|
1084
|
+
const perServiceEnv = getServiceUrlEnvVars({
|
|
1085
|
+
requestedEnv: service.env,
|
|
1086
|
+
consumerService: service,
|
|
1087
|
+
services: detectedServices,
|
|
1088
|
+
frameworkList: import_frameworks2.frameworkList,
|
|
1089
|
+
currentEnv: process.env,
|
|
1090
|
+
deploymentUrl: process.env.VERCEL_URL
|
|
1091
|
+
});
|
|
1092
|
+
for (const [key, value] of Object.entries(perServiceEnv)) {
|
|
1093
|
+
if (key in process.env)
|
|
1094
|
+
continue;
|
|
1095
|
+
restoreEnv.set(key, process.env[key]);
|
|
1096
|
+
process.env[key] = value;
|
|
1097
|
+
output_manager_default.debug(`Injected service URL env var: ${key}=${value}`);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1070
1100
|
let buildResult;
|
|
1071
1101
|
let rawBuildResult;
|
|
1072
1102
|
try {
|
|
@@ -1090,6 +1120,13 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1090
1120
|
}
|
|
1091
1121
|
}
|
|
1092
1122
|
} finally {
|
|
1123
|
+
for (const [key, prior] of restoreEnv) {
|
|
1124
|
+
if (prior === void 0) {
|
|
1125
|
+
delete process.env[key];
|
|
1126
|
+
} else {
|
|
1127
|
+
process.env[key] = prior;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1093
1130
|
try {
|
|
1094
1131
|
const builderDiagnostics = await builderSpan.child("vc.builder.diagnostics").trace(async () => {
|
|
1095
1132
|
return await builder.diagnostics?.(buildOptions);
|
|
@@ -1292,6 +1329,15 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1292
1329
|
);
|
|
1293
1330
|
}
|
|
1294
1331
|
}
|
|
1332
|
+
for (const entry of preDeployEntries) {
|
|
1333
|
+
if (entry.callback) {
|
|
1334
|
+
await entry.callback();
|
|
1335
|
+
} else {
|
|
1336
|
+
output_manager_default.warn(
|
|
1337
|
+
`Service "${entry.service}" has a preDeployCommand but its builder does not support it. The command was not executed.`
|
|
1338
|
+
);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1295
1341
|
if (packageManifests.length > 0) {
|
|
1296
1342
|
const projectManifest = {};
|
|
1297
1343
|
for (const {
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
purchaseDomainIfAvailable,
|
|
15
15
|
require_cjs,
|
|
16
16
|
setupDomain
|
|
17
|
-
} from "../../chunks/chunk-
|
|
17
|
+
} from "../../chunks/chunk-V6RCNEUA.js";
|
|
18
18
|
import {
|
|
19
19
|
readLocalConfig
|
|
20
|
-
} from "../../chunks/chunk-
|
|
20
|
+
} from "../../chunks/chunk-F2UPASLT.js";
|
|
21
21
|
import {
|
|
22
22
|
highlight
|
|
23
23
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
getDeployment,
|
|
30
30
|
mapCertError
|
|
31
|
-
} from "../../chunks/chunk-
|
|
31
|
+
} from "../../chunks/chunk-NYJXGEIR.js";
|
|
32
32
|
import {
|
|
33
33
|
validateJsonOutput
|
|
34
34
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
@@ -41,60 +41,62 @@ import {
|
|
|
41
41
|
deprecatedArchiveSplitTgz,
|
|
42
42
|
getCommandAliases,
|
|
43
43
|
initSubcommand
|
|
44
|
-
} from "../../chunks/chunk-
|
|
45
|
-
import "../../chunks/chunk-
|
|
46
|
-
import "../../chunks/chunk-
|
|
47
|
-
import "../../chunks/chunk-
|
|
48
|
-
import "../../chunks/chunk-
|
|
49
|
-
import "../../chunks/chunk-
|
|
50
|
-
import "../../chunks/chunk-
|
|
51
|
-
import "../../chunks/chunk-
|
|
52
|
-
import "../../chunks/chunk-
|
|
53
|
-
import {
|
|
54
|
-
pickOverrides
|
|
55
|
-
} from "../../chunks/chunk-54T7XV3H.js";
|
|
44
|
+
} from "../../chunks/chunk-UVFXUXOZ.js";
|
|
45
|
+
import "../../chunks/chunk-IFATV36R.js";
|
|
46
|
+
import "../../chunks/chunk-JFVGRFME.js";
|
|
47
|
+
import "../../chunks/chunk-TZMIHH5D.js";
|
|
48
|
+
import "../../chunks/chunk-XVAEOG4L.js";
|
|
49
|
+
import "../../chunks/chunk-ZAAKSLHC.js";
|
|
50
|
+
import "../../chunks/chunk-CQANJIEC.js";
|
|
51
|
+
import "../../chunks/chunk-KWDV5FZH.js";
|
|
52
|
+
import "../../chunks/chunk-4PSOOFYO.js";
|
|
56
53
|
import {
|
|
57
54
|
AGENT_STATUS
|
|
58
55
|
} from "../../chunks/chunk-E3NE4SKN.js";
|
|
59
|
-
import
|
|
56
|
+
import {
|
|
57
|
+
pickOverrides
|
|
58
|
+
} from "../../chunks/chunk-LVUE7LLE.js";
|
|
59
|
+
import "../../chunks/chunk-76ZNZKIN.js";
|
|
60
60
|
import {
|
|
61
61
|
ensureLink
|
|
62
|
-
} from "../../chunks/chunk-
|
|
62
|
+
} from "../../chunks/chunk-N4WFAZKO.js";
|
|
63
63
|
import {
|
|
64
64
|
validatePaths,
|
|
65
65
|
validateRootDirectory
|
|
66
|
-
} from "../../chunks/chunk-
|
|
67
|
-
import "../../chunks/chunk-
|
|
68
|
-
import "../../chunks/chunk-
|
|
66
|
+
} from "../../chunks/chunk-UTXSTM52.js";
|
|
67
|
+
import "../../chunks/chunk-4VPRHRPA.js";
|
|
68
|
+
import "../../chunks/chunk-ZKKIBUCU.js";
|
|
69
69
|
import {
|
|
70
70
|
help
|
|
71
|
-
} from "../../chunks/chunk-
|
|
72
|
-
import "../../chunks/chunk-KSIISCB2.js";
|
|
71
|
+
} from "../../chunks/chunk-MMF4BVAP.js";
|
|
73
72
|
import {
|
|
74
73
|
compileVercelConfig,
|
|
75
74
|
createGitMeta,
|
|
76
75
|
param,
|
|
77
76
|
parseEnv,
|
|
78
77
|
parseTarget,
|
|
78
|
+
printAlignedLabel,
|
|
79
79
|
require_dist as require_dist2,
|
|
80
80
|
require_lib
|
|
81
|
-
} from "../../chunks/chunk-
|
|
81
|
+
} from "../../chunks/chunk-X775BOSL.js";
|
|
82
82
|
import {
|
|
83
83
|
TelemetryClient
|
|
84
84
|
} from "../../chunks/chunk-4OEA5ILS.js";
|
|
85
85
|
import {
|
|
86
86
|
outputAgentError
|
|
87
|
-
} from "../../chunks/chunk-
|
|
87
|
+
} from "../../chunks/chunk-ULXHXZCZ.js";
|
|
88
88
|
import {
|
|
89
89
|
require_ms,
|
|
90
90
|
stamp_default
|
|
91
91
|
} from "../../chunks/chunk-CO5D46AG.js";
|
|
92
|
+
import "../../chunks/chunk-N2T234LO.js";
|
|
93
|
+
import "../../chunks/chunk-DKD6GTQT.js";
|
|
92
94
|
import {
|
|
93
95
|
getCommandNameWithGlobalFlags,
|
|
94
96
|
getFlagsSpecification,
|
|
95
97
|
parseArguments,
|
|
96
98
|
printError
|
|
97
|
-
} from "../../chunks/chunk-
|
|
99
|
+
} from "../../chunks/chunk-4GQQJY5Y.js";
|
|
98
100
|
import {
|
|
99
101
|
AliasDomainConfigured,
|
|
100
102
|
BuildError,
|
|
@@ -120,7 +122,8 @@ import {
|
|
|
120
122
|
getCommandName,
|
|
121
123
|
isAPIError,
|
|
122
124
|
require_bytes
|
|
123
|
-
} from "../../chunks/chunk-
|
|
125
|
+
} from "../../chunks/chunk-UGXBNJMO.js";
|
|
126
|
+
import "../../chunks/chunk-P4QNYOFB.js";
|
|
124
127
|
import {
|
|
125
128
|
emoji,
|
|
126
129
|
output_manager_default,
|
|
@@ -688,7 +691,7 @@ async function handleInitDeployment(client, telemetryClient) {
|
|
|
688
691
|
const isV0 = cliMeta.v0 === "true";
|
|
689
692
|
const link = await ensureLink("deploy", client, cwd, {
|
|
690
693
|
autoConfirm,
|
|
691
|
-
setupMsg: "Set up
|
|
694
|
+
setupMsg: "Set up",
|
|
692
695
|
projectName: getProjectName({
|
|
693
696
|
nameParam: void 0,
|
|
694
697
|
nowConfig: localConfig,
|
|
@@ -848,7 +851,8 @@ async function handleInitDeployment(client, telemetryClient) {
|
|
|
848
851
|
autoAssignCustomDomains,
|
|
849
852
|
manual: true,
|
|
850
853
|
jsonOutput: asJson,
|
|
851
|
-
functionsBeta: functionsBeta || void 0
|
|
854
|
+
functionsBeta: functionsBeta || void 0,
|
|
855
|
+
linkedProject: project
|
|
852
856
|
};
|
|
853
857
|
if (!localConfig.builds || localConfig.builds.length === 0) {
|
|
854
858
|
createArgs.projectSettings = {
|
|
@@ -1179,7 +1183,7 @@ async function handleContinueSubcommand(client, telemetryClient) {
|
|
|
1179
1183
|
let { path: cwd } = pathValidation;
|
|
1180
1184
|
const link = await ensureLink("deploy", client, cwd, {
|
|
1181
1185
|
autoConfirm: true,
|
|
1182
|
-
setupMsg: "Set up
|
|
1186
|
+
setupMsg: "Set up",
|
|
1183
1187
|
projectName: getProjectName({
|
|
1184
1188
|
nameParam: void 0,
|
|
1185
1189
|
nowConfig: localConfig,
|
|
@@ -1423,7 +1427,7 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1423
1427
|
const isV0 = cliMeta.v0 === "true";
|
|
1424
1428
|
const link = await ensureLink("deploy", client, cwd, {
|
|
1425
1429
|
autoConfirm,
|
|
1426
|
-
setupMsg: "Set up
|
|
1430
|
+
setupMsg: "Set up",
|
|
1427
1431
|
projectName: getProjectName({
|
|
1428
1432
|
nameParam: parsedArguments.flags["--name"],
|
|
1429
1433
|
nowConfig: localConfig,
|
|
@@ -1629,7 +1633,8 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1629
1633
|
autoAssignCustomDomains,
|
|
1630
1634
|
agentName: client.agentName,
|
|
1631
1635
|
jsonOutput: asJson,
|
|
1632
|
-
functionsBeta: functionsBeta || void 0
|
|
1636
|
+
functionsBeta: functionsBeta || void 0,
|
|
1637
|
+
linkedProject: project
|
|
1633
1638
|
};
|
|
1634
1639
|
if (!localConfig.builds || localConfig.builds.length === 0) {
|
|
1635
1640
|
createArgs.projectSettings = {
|
|
@@ -1800,7 +1805,7 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1800
1805
|
}
|
|
1801
1806
|
return 1;
|
|
1802
1807
|
}
|
|
1803
|
-
if (!noWait) {
|
|
1808
|
+
if (!noWait && shouldReconcileFinalDeployment(deployment)) {
|
|
1804
1809
|
await getDeployment(client, contextName, deployment.id);
|
|
1805
1810
|
}
|
|
1806
1811
|
if (deployment === null) {
|
|
@@ -2211,7 +2216,7 @@ async function handleContinueDeployment({
|
|
|
2211
2216
|
error("Missing authentication token");
|
|
2212
2217
|
return 1;
|
|
2213
2218
|
}
|
|
2214
|
-
output_manager_default.spinner(`Continuing deployment
|
|
2219
|
+
output_manager_default.spinner(`Continuing deployment\u2026`, 0);
|
|
2215
2220
|
try {
|
|
2216
2221
|
let finalDeployment = null;
|
|
2217
2222
|
for await (const event of (0, import_client3.continueDeployment)({
|
|
@@ -2232,7 +2237,7 @@ async function handleContinueDeployment({
|
|
|
2232
2237
|
if (event.type === "file-count") {
|
|
2233
2238
|
const { total, missing } = event.payload;
|
|
2234
2239
|
output_manager_default.spinner(
|
|
2235
|
-
`Uploading ${missing.length} of ${total.size} files
|
|
2240
|
+
`Uploading ${missing.length} of ${total.size} files\u2026`,
|
|
2236
2241
|
0
|
|
2237
2242
|
);
|
|
2238
2243
|
}
|
|
@@ -2240,25 +2245,23 @@ async function handleContinueDeployment({
|
|
|
2240
2245
|
debug(`Uploaded: ${event.payload.file.names.join(" ")}`);
|
|
2241
2246
|
}
|
|
2242
2247
|
if (event.type === "all-files-uploaded") {
|
|
2243
|
-
output_manager_default.spinner("Continuing deployment
|
|
2248
|
+
output_manager_default.spinner("Continuing deployment\u2026", 0);
|
|
2244
2249
|
}
|
|
2245
2250
|
if (event.type === "created") {
|
|
2246
2251
|
finalDeployment = event.payload;
|
|
2247
2252
|
output_manager_default.stopSpinner();
|
|
2248
2253
|
if (finalDeployment.inspectorUrl) {
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
emoji("inspect")
|
|
2253
|
-
) + "\n"
|
|
2254
|
+
printAlignedLabel(
|
|
2255
|
+
"Inspect",
|
|
2256
|
+
import_chalk.default.cyan(finalDeployment.inspectorUrl)
|
|
2254
2257
|
);
|
|
2255
2258
|
}
|
|
2259
|
+
const isProdDeployment = finalDeployment.target === "production";
|
|
2256
2260
|
const previewUrl = `https://${finalDeployment.url}`;
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
) + "\n"
|
|
2261
|
+
printAlignedLabel(
|
|
2262
|
+
isProdDeployment ? "Production" : "Preview",
|
|
2263
|
+
import_chalk.default.cyan(previewUrl),
|
|
2264
|
+
isProdDeployment ? { gutter: "\u25B2" } : {}
|
|
2262
2265
|
);
|
|
2263
2266
|
if (noWait) {
|
|
2264
2267
|
return printDeploymentStatus(
|
|
@@ -2269,10 +2272,10 @@ async function handleContinueDeployment({
|
|
|
2269
2272
|
false
|
|
2270
2273
|
);
|
|
2271
2274
|
}
|
|
2272
|
-
output_manager_default.spinner("Building
|
|
2275
|
+
output_manager_default.spinner("Building\u2026", 0);
|
|
2273
2276
|
}
|
|
2274
2277
|
if (event.type === "building") {
|
|
2275
|
-
output_manager_default.spinner("Building
|
|
2278
|
+
output_manager_default.spinner("Building\u2026", 0);
|
|
2276
2279
|
}
|
|
2277
2280
|
if (event.type === "ready") {
|
|
2278
2281
|
finalDeployment = event.payload;
|
|
@@ -2284,12 +2287,7 @@ async function handleContinueDeployment({
|
|
|
2284
2287
|
if (finalDeployment.target === "production" && finalDeployment.alias && finalDeployment.alias.length > 0) {
|
|
2285
2288
|
const primaryDomain = finalDeployment.alias[0];
|
|
2286
2289
|
const prodUrl = `https://${primaryDomain}`;
|
|
2287
|
-
|
|
2288
|
-
prependEmoji(
|
|
2289
|
-
`Production: ${import_chalk.default.bold(prodUrl)} ${deployStamp()}`,
|
|
2290
|
-
emoji("link")
|
|
2291
|
-
) + "\n"
|
|
2292
|
-
);
|
|
2290
|
+
printAlignedLabel("Aliased", import_chalk.default.cyan(prodUrl), { gutter: "\u25B2" });
|
|
2293
2291
|
}
|
|
2294
2292
|
}
|
|
2295
2293
|
if (event.type === "checks-v2-failed") {
|
|
@@ -2337,6 +2335,21 @@ function getDeploymentOutputJson(deployment, apiUrl, error) {
|
|
|
2337
2335
|
...error ? { error } : {}
|
|
2338
2336
|
};
|
|
2339
2337
|
}
|
|
2338
|
+
function shouldReconcileFinalDeployment(deployment) {
|
|
2339
|
+
if (!deployment) {
|
|
2340
|
+
return false;
|
|
2341
|
+
}
|
|
2342
|
+
if (deployment.readyState !== "READY") {
|
|
2343
|
+
return true;
|
|
2344
|
+
}
|
|
2345
|
+
if (deployment.aliasError || !deployment.aliasAssigned) {
|
|
2346
|
+
return true;
|
|
2347
|
+
}
|
|
2348
|
+
if (deployment.checksConclusion === "failed" || deployment.checks?.["deployment-alias"]?.state === "failed") {
|
|
2349
|
+
return true;
|
|
2350
|
+
}
|
|
2351
|
+
return false;
|
|
2352
|
+
}
|
|
2340
2353
|
async function handleFailedCheckRuns(client, deployment, asJson) {
|
|
2341
2354
|
const { runs } = await getDeploymentCheckRuns(client, deployment.id);
|
|
2342
2355
|
const failedRuns = (runs ?? []).filter((run) => run.conclusion === "failed");
|