vercel 54.21.0 → 55.0.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-KZSG7SVG.js → add-BQGGX36J.js} +8 -8
- package/dist/chunks/{add-UDJ45UVF.js → add-YRFK663I.js} +7 -7
- package/dist/chunks/{chunk-OGJB2GHI.js → chunk-22GUZ5KG.js} +1 -1
- package/dist/chunks/{chunk-DDS5Z2MB.js → chunk-2QBF3ZL3.js} +1 -0
- package/dist/chunks/{chunk-KGPSD6TA.js → chunk-2XTV2FM7.js} +100 -36
- package/dist/chunks/{chunk-ULKM3ZD4.js → chunk-4RGSUV5C.js} +2 -2
- package/dist/chunks/{chunk-UJ5UEAMC.js → chunk-5AJNUXWP.js} +1 -1
- package/dist/chunks/{chunk-KXGWAWRV.js → chunk-5OT26JZN.js} +35 -3
- package/dist/chunks/{chunk-JAUGUJR3.js → chunk-6CRRXESK.js} +1 -1
- package/dist/chunks/{chunk-RY3AVR6E.js → chunk-7C7MMT4J.js} +1 -1
- package/dist/chunks/chunk-7PZWVZN6.js +105 -0
- package/dist/chunks/{chunk-D2M77YVC.js → chunk-7S3QUMIG.js} +2 -2
- package/dist/chunks/{chunk-TYXSXFVM.js → chunk-A5QK4X3Z.js} +6 -6
- package/dist/chunks/{chunk-6SVPJXCO.js → chunk-AA3E7OLF.js} +30 -3
- package/dist/chunks/{chunk-VFXF4O4X.js → chunk-AW6V5LOC.js} +3 -3
- package/dist/chunks/{chunk-I3HGCZ4E.js → chunk-CMJMYVQM.js} +1 -0
- package/dist/chunks/{chunk-SCQAJO6E.js → chunk-D43MOSMZ.js} +425 -22
- package/dist/chunks/{chunk-EJ6GQI6F.js → chunk-EHTPDXTS.js} +1 -0
- package/dist/chunks/{chunk-JIX2UI23.js → chunk-EJV2KFOF.js} +3 -3
- package/dist/chunks/{chunk-FCYCUCLI.js → chunk-EUARKVCA.js} +83 -20
- package/dist/chunks/{chunk-HAZXLIKZ.js → chunk-GVZKC6PS.js} +1 -1
- package/dist/chunks/{chunk-FNRZFHFO.js → chunk-HA7C7SDO.js} +3 -1
- package/dist/chunks/{chunk-KS5FONWU.js → chunk-HOYOJUQZ.js} +70 -17
- package/dist/chunks/{chunk-DFEUWDGM.js → chunk-IDMKFYEA.js} +1 -1
- package/dist/chunks/{chunk-S2N7BLSM.js → chunk-IIUE7CDZ.js} +2 -2
- package/dist/chunks/{chunk-MAJWH2PD.js → chunk-JJWESW5Y.js} +1 -1
- package/dist/chunks/{chunk-DBA4N3OZ.js → chunk-LHY5EFII.js} +2 -2
- package/dist/chunks/{chunk-BEETD7P4.js → chunk-MGUQN3V3.js} +3 -3
- package/dist/chunks/{chunk-LVR7QUSG.js → chunk-OCEM4YAQ.js} +1 -1
- package/dist/chunks/{chunk-UDIFOPZL.js → chunk-OKWMOW2F.js} +354 -404
- package/dist/chunks/{chunk-VKBYAWTL.js → chunk-QEEGXNFK.js} +1 -1
- package/dist/chunks/{chunk-EFUR47FZ.js → chunk-QKR7GNAK.js} +1 -1
- package/dist/chunks/{chunk-YSIZGIDP.js → chunk-QY63UKTP.js} +2 -2
- package/dist/chunks/{chunk-AUECDTMX.js → chunk-RLJA2KI7.js} +1 -1
- package/dist/chunks/{chunk-DJ4JEVDI.js → chunk-SENGDDFO.js} +1 -1
- package/dist/chunks/{chunk-VDTSYCXY.js → chunk-VTA3KZUX.js} +3 -3
- package/dist/chunks/chunk-WGGABYO5.js +31 -0
- package/dist/chunks/{chunk-6W7I5IOO.js → chunk-X36ADWA5.js} +51 -9
- package/dist/chunks/{chunk-IR674PKY.js → chunk-XHC5YRFY.js} +451 -274
- package/dist/chunks/{chunk-BLWPQEED.js → chunk-ZQEZYHPJ.js} +8 -6
- package/dist/chunks/{compile-vercel-config-DY63NSZV.js → compile-vercel-config-3RYUGKGU.js} +3 -3
- package/dist/chunks/{delete-WVLC7FLA.js → delete-UQKVMHVV.js} +5 -5
- package/dist/chunks/{disable-VLYKCAM5.js → disable-GUK4VHQY.js} +5 -5
- package/dist/chunks/{discard-GGNJLKTH.js → discard-DTI36R2T.js} +5 -5
- package/dist/chunks/{edit-ZU5K7DM3.js → edit-ED4LM54G.js} +6 -6
- package/dist/chunks/{enable-G3MUGP3W.js → enable-RAWDG7GZ.js} +5 -5
- package/dist/chunks/{exec-UKMIYIF6.js → exec-G4AUF3KG.js} +4 -90
- package/dist/chunks/{export-QHSB2FON.js → export-U6OBSYVP.js} +5 -5
- package/dist/chunks/{image-CWHCW3N5.js → image-LIJI6QJY.js} +4 -4
- package/dist/chunks/{inspect-OVAC6PJK.js → inspect-25D5G5FX.js} +11 -11
- package/dist/chunks/{inspect-W6RHYESL.js → inspect-3SEYQNWT.js} +11 -11
- package/dist/chunks/{inspect-QJSREPM3.js → inspect-7LGTAPH3.js} +7 -7
- package/dist/chunks/{inspect-HFCKYQQ3.js → inspect-IQD2ULLP.js} +11 -11
- package/dist/chunks/{list-2XYQW3YA.js → list-2IJHE2AC.js} +8 -8
- package/dist/chunks/{list-R37YS5CX.js → list-I25HBKWF.js} +5 -5
- package/dist/chunks/login-N4DIZZWE.js +247 -0
- package/dist/chunks/{ls-HKVAT223.js → ls-2VXZPNMR.js} +12 -12
- package/dist/chunks/{ls-X7Y37IPT.js → ls-HN3SUOPA.js} +7 -7
- package/dist/chunks/{ls-7JNUKRV2.js → ls-S7YPR3OS.js} +11 -11
- package/dist/chunks/{ls-JJXUYZU7.js → ls-TFOKQKY3.js} +11 -11
- package/dist/chunks/{publish-MYVZ4UTW.js → publish-ZTGB4XE2.js} +5 -5
- package/dist/chunks/{query-ZH2YJPAC.js → query-2UK5BV4B.js} +6 -6
- package/dist/chunks/{reorder-VY53EYZJ.js → reorder-FM755TJK.js} +5 -5
- package/dist/chunks/{restore-F2AEG3WO.js → restore-NXQJMPMT.js} +5 -5
- package/dist/chunks/{rm-T6Z6WZZN.js → rm-III6VASE.js} +8 -8
- package/dist/chunks/{rm-VUL4FHMX.js → rm-MPC5DPOS.js} +7 -7
- package/dist/chunks/{rm-IDSOMXQR.js → rm-XJMPAJNP.js} +6 -6
- package/dist/chunks/{rule-inspect-ELB7P5YA.js → rule-inspect-BJGXMAO5.js} +7 -7
- package/dist/chunks/{rules-XR6U5U7F.js → rules-FSNWMWJH.js} +9 -9
- package/dist/chunks/{schema-WKPB25ZF.js → schema-NR6DGYCB.js} +7 -7
- package/dist/chunks/{tags-NSWTVGHE.js → tags-RVHMONZN.js} +3 -3
- package/dist/chunks/{types-EQD5UZOH.js → types-2TPA6J4G.js} +3 -3
- package/dist/chunks/{update-H4Q24DK4.js → update-55OM2454.js} +7 -7
- package/dist/commands/build/index.js +51 -13
- package/dist/commands/deploy/index.js +33 -55
- package/dist/commands/dev/index.js +205 -62
- package/dist/commands/env/index.js +19 -19
- package/dist/commands/link/index.js +42 -25
- package/dist/commands/list/index.js +29 -14
- package/dist/commands-bulk.js +3869 -2022
- package/dist/index.js +24 -24
- package/dist/version.mjs +1 -1
- package/package.json +21 -21
- package/dist/chunks/chunk-Y4JJYHUG.js +0 -16
|
@@ -7,16 +7,16 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
printProjectNotFoundError,
|
|
9
9
|
setupAndLink
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OKWMOW2F.js";
|
|
11
11
|
import {
|
|
12
12
|
getLinkedProject,
|
|
13
13
|
param,
|
|
14
14
|
resolveProjectCwd
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XHC5YRFY.js";
|
|
16
16
|
import {
|
|
17
17
|
buildCommandWithYes,
|
|
18
18
|
outputActionRequired
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2QBF3ZL3.js";
|
|
20
20
|
import {
|
|
21
21
|
getCommandName,
|
|
22
22
|
getCommandNamePlain
|
|
@@ -8,8 +8,10 @@ import {
|
|
|
8
8
|
highlight
|
|
9
9
|
} from "./chunk-V5P25P7F.js";
|
|
10
10
|
import {
|
|
11
|
+
PromptBackError,
|
|
12
|
+
PromptCanceledError,
|
|
11
13
|
getLocalPathConfig
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AA3E7OLF.js";
|
|
13
15
|
import {
|
|
14
16
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
15
17
|
VERCEL_CONFIG_EXTENSIONS,
|
|
@@ -36,14 +38,14 @@ import {
|
|
|
36
38
|
useKeypress,
|
|
37
39
|
usePrefix,
|
|
38
40
|
useState
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-XHC5YRFY.js";
|
|
40
42
|
import {
|
|
41
43
|
require_load_json_file
|
|
42
44
|
} from "./chunk-ECCWJHC6.js";
|
|
43
45
|
import {
|
|
44
46
|
parseArguments,
|
|
45
47
|
require_strip_ansi
|
|
46
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-EHTPDXTS.js";
|
|
47
49
|
import {
|
|
48
50
|
APIError,
|
|
49
51
|
NowError
|
|
@@ -1634,6 +1636,8 @@ var Client = class extends EventEmitter {
|
|
|
1634
1636
|
this._argv = [];
|
|
1635
1637
|
/** Track if we've already logged the token source debug message */
|
|
1636
1638
|
this._loggedTokenSource = false;
|
|
1639
|
+
this.escapePromptCancellationDepth = 0;
|
|
1640
|
+
this.promptBackNavigationDepth = 0;
|
|
1637
1641
|
this.reauthenticate = sharedPromise(async function(error) {
|
|
1638
1642
|
const result = await reauthenticate(this, error);
|
|
1639
1643
|
if (typeof result === "number") {
|
|
@@ -1672,30 +1676,89 @@ ${error.stack}`);
|
|
|
1672
1676
|
style: { answer: import_chalk4.gray }
|
|
1673
1677
|
};
|
|
1674
1678
|
this.input = {
|
|
1675
|
-
text: (opts2) =>
|
|
1676
|
-
|
|
1677
|
-
{ theme, ...opts2 },
|
|
1678
|
-
{ input: this.stdin, output: this.stderr }
|
|
1679
|
+
text: (opts2) => this.runPrompt(
|
|
1680
|
+
esm_default6({ theme, ...opts2 }, { input: this.stdin, output: this.stderr })
|
|
1679
1681
|
),
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1682
|
+
password: (opts2) => this.runPrompt(
|
|
1683
|
+
esm_default7(
|
|
1684
|
+
{ theme, ...opts2 },
|
|
1685
|
+
{ input: this.stdin, output: this.stderr }
|
|
1686
|
+
)
|
|
1687
|
+
),
|
|
1688
|
+
checkbox: (opts2) => this.runPrompt(
|
|
1689
|
+
esm_default2(
|
|
1690
|
+
{ theme, ...opts2 },
|
|
1691
|
+
{ input: this.stdin, output: this.stderr }
|
|
1692
|
+
)
|
|
1683
1693
|
),
|
|
1684
|
-
expand: (opts2) =>
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1694
|
+
expand: (opts2) => this.runPrompt(
|
|
1695
|
+
esm_default5({ theme, ...opts2 }, { input: this.stdin, output: this.stderr })
|
|
1696
|
+
),
|
|
1697
|
+
confirm: (message, default_value) => this.runPrompt(
|
|
1698
|
+
esm_default4(
|
|
1699
|
+
{ theme, message, default: default_value },
|
|
1700
|
+
{ input: this.stdin, output: this.stderr }
|
|
1701
|
+
)
|
|
1688
1702
|
),
|
|
1689
|
-
select: (opts2) =>
|
|
1690
|
-
|
|
1691
|
-
|
|
1703
|
+
select: (opts2) => this.runPrompt(
|
|
1704
|
+
esm_default3(
|
|
1705
|
+
{ theme, ...opts2 },
|
|
1706
|
+
{ input: this.stdin, output: this.stderr }
|
|
1707
|
+
)
|
|
1692
1708
|
),
|
|
1693
|
-
search: (opts2) =>
|
|
1694
|
-
|
|
1695
|
-
|
|
1709
|
+
search: (opts2) => this.runPrompt(
|
|
1710
|
+
esm_default8(
|
|
1711
|
+
{ theme, ...opts2 },
|
|
1712
|
+
{ input: this.stdin, output: this.stderr }
|
|
1713
|
+
)
|
|
1696
1714
|
)
|
|
1697
1715
|
};
|
|
1698
1716
|
}
|
|
1717
|
+
async withEscapePromptCancellation(run) {
|
|
1718
|
+
this.escapePromptCancellationDepth++;
|
|
1719
|
+
try {
|
|
1720
|
+
return await run();
|
|
1721
|
+
} finally {
|
|
1722
|
+
this.escapePromptCancellationDepth--;
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
async withPromptBackNavigation(run) {
|
|
1726
|
+
this.promptBackNavigationDepth++;
|
|
1727
|
+
try {
|
|
1728
|
+
return await run();
|
|
1729
|
+
} finally {
|
|
1730
|
+
this.promptBackNavigationDepth--;
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
runPrompt(prompt) {
|
|
1734
|
+
const escapeCancellationEnabled = this.escapePromptCancellationDepth > 0;
|
|
1735
|
+
const backNavigationEnabled = this.promptBackNavigationDepth > 0;
|
|
1736
|
+
if (!escapeCancellationEnabled && !backNavigationEnabled || !this.stdin.isTTY || !prompt.cancel) {
|
|
1737
|
+
return prompt;
|
|
1738
|
+
}
|
|
1739
|
+
let cancellation;
|
|
1740
|
+
const onKeypress = (_input, key) => {
|
|
1741
|
+
if (key?.name === "escape" && escapeCancellationEnabled && !cancellation) {
|
|
1742
|
+
cancellation = "escape";
|
|
1743
|
+
prompt.cancel?.();
|
|
1744
|
+
} else if (key?.name === "up" && backNavigationEnabled && !cancellation) {
|
|
1745
|
+
cancellation = "back";
|
|
1746
|
+
prompt.cancel?.();
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
this.stdin.on("keypress", onKeypress);
|
|
1750
|
+
return prompt.catch((error) => {
|
|
1751
|
+
if (cancellation === "escape") {
|
|
1752
|
+
throw new PromptCanceledError();
|
|
1753
|
+
}
|
|
1754
|
+
if (cancellation === "back") {
|
|
1755
|
+
throw new PromptBackError();
|
|
1756
|
+
}
|
|
1757
|
+
throw error;
|
|
1758
|
+
}).finally(() => {
|
|
1759
|
+
this.stdin.off("keypress", onKeypress);
|
|
1760
|
+
});
|
|
1761
|
+
}
|
|
1699
1762
|
get argv() {
|
|
1700
1763
|
return this._argv;
|
|
1701
1764
|
}
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
allOption,
|
|
9
9
|
confirmOption,
|
|
10
10
|
formatOption,
|
|
11
|
+
limitOption,
|
|
11
12
|
nextOption,
|
|
12
13
|
yesOption
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EHTPDXTS.js";
|
|
14
15
|
import {
|
|
15
16
|
packageName
|
|
16
17
|
} from "./chunk-P6AK7SVK.js";
|
|
@@ -61,6 +62,7 @@ var listCommand = {
|
|
|
61
62
|
deprecated: false
|
|
62
63
|
},
|
|
63
64
|
nextOption,
|
|
65
|
+
limitOption,
|
|
64
66
|
// this can be deprecated someday
|
|
65
67
|
{ name: "prod", shorthand: null, type: Boolean, deprecated: false },
|
|
66
68
|
yesOption,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
progress,
|
|
11
11
|
require_dist as require_dist2,
|
|
12
12
|
sleep
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EUARKVCA.js";
|
|
14
14
|
import {
|
|
15
15
|
suggestNextCommands
|
|
16
16
|
} from "./chunk-XBN2O34P.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-SGL3NMOP.js";
|
|
21
21
|
import {
|
|
22
22
|
CommandTimeout
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-D43MOSMZ.js";
|
|
24
24
|
import {
|
|
25
25
|
showPluginTipIfNeeded
|
|
26
26
|
} from "./chunk-NJUPUGOE.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-64IF634X.js";
|
|
30
30
|
import {
|
|
31
31
|
getScope
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-OCEM4YAQ.js";
|
|
33
33
|
import {
|
|
34
34
|
getProjectByNameOrId,
|
|
35
35
|
param,
|
|
@@ -37,11 +37,11 @@ import {
|
|
|
37
37
|
require_dist as require_dist3,
|
|
38
38
|
require_pluralize,
|
|
39
39
|
ua_default
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XHC5YRFY.js";
|
|
41
41
|
import {
|
|
42
42
|
require_strip_ansi,
|
|
43
43
|
responseError
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-EHTPDXTS.js";
|
|
45
45
|
import {
|
|
46
46
|
APIError,
|
|
47
47
|
BuildError,
|
|
@@ -1585,7 +1585,7 @@ var import_async_retry = __toESM(require_dist2(), 1);
|
|
|
1585
1585
|
var import_jsonlines = __toESM(require_jsonlines(), 1);
|
|
1586
1586
|
var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
|
|
1587
1587
|
import { URLSearchParams } from "url";
|
|
1588
|
-
async function printEvents(client, urlOrDeploymentId, { mode, onEvent, quiet, findOpts }, abortController) {
|
|
1588
|
+
async function printEvents(client, urlOrDeploymentId, { mode, onEvent, onAliasAssigned, quiet, findOpts }, abortController) {
|
|
1589
1589
|
const { log, debug } = output_manager_default;
|
|
1590
1590
|
const scope = mode === "deploy" ? await getScope(client) : null;
|
|
1591
1591
|
let o = 0;
|
|
@@ -1652,6 +1652,12 @@ async function printEvents(client, urlOrDeploymentId, { mode, onEvent, quiet, fi
|
|
|
1652
1652
|
}
|
|
1653
1653
|
let latestLogDate = 0;
|
|
1654
1654
|
const onData = (data) => {
|
|
1655
|
+
if (data.type === "alias-assigned") {
|
|
1656
|
+
if (data.deploymentId === urlOrDeploymentId) {
|
|
1657
|
+
onAliasAssigned?.(data);
|
|
1658
|
+
}
|
|
1659
|
+
return;
|
|
1660
|
+
}
|
|
1655
1661
|
const { event, payload, date } = data;
|
|
1656
1662
|
if (event === "state" && payload.value === "READY") {
|
|
1657
1663
|
if (mode === "deploy") {
|
|
@@ -1685,16 +1691,30 @@ async function printEvents(client, urlOrDeploymentId, { mode, onEvent, quiet, fi
|
|
|
1685
1691
|
...findOpts,
|
|
1686
1692
|
since: latestLogDate
|
|
1687
1693
|
};
|
|
1688
|
-
setTimeout(() => {
|
|
1694
|
+
const retryTimeout = setTimeout(() => {
|
|
1695
|
+
abortController?.signal.removeEventListener("abort", onAbort);
|
|
1689
1696
|
if (abortController?.signal.aborted)
|
|
1690
1697
|
return;
|
|
1691
|
-
printEvents(
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1698
|
+
printEvents(
|
|
1699
|
+
client,
|
|
1700
|
+
urlOrDeploymentId,
|
|
1701
|
+
{
|
|
1702
|
+
mode,
|
|
1703
|
+
onEvent,
|
|
1704
|
+
onAliasAssigned,
|
|
1705
|
+
quiet,
|
|
1706
|
+
findOpts: retryFindOpts
|
|
1707
|
+
},
|
|
1708
|
+
abortController
|
|
1709
|
+
).then(resolve, reject);
|
|
1697
1710
|
}, 2e3);
|
|
1711
|
+
const onAbort = () => {
|
|
1712
|
+
clearTimeout(retryTimeout);
|
|
1713
|
+
finish();
|
|
1714
|
+
};
|
|
1715
|
+
abortController?.signal.addEventListener("abort", onAbort, {
|
|
1716
|
+
once: true
|
|
1717
|
+
});
|
|
1698
1718
|
};
|
|
1699
1719
|
stream.on("end", finish);
|
|
1700
1720
|
stream.on("data", onData);
|
|
@@ -1717,6 +1737,10 @@ async function printEvents(client, urlOrDeploymentId, { mode, onEvent, quiet, fi
|
|
|
1717
1737
|
},
|
|
1718
1738
|
{
|
|
1719
1739
|
retries: 4,
|
|
1740
|
+
// Don't let deploy stream retry timers keep the CLI alive after polling
|
|
1741
|
+
// wins. Standalone log consumers await these retries, so their timers
|
|
1742
|
+
// must remain referenced.
|
|
1743
|
+
unref: Boolean(onAliasAssigned),
|
|
1720
1744
|
onRetry: (err) => {
|
|
1721
1745
|
if (!quiet && o) {
|
|
1722
1746
|
process.stdout.write((0, import_ansi_escapes.eraseLines)(o + 1));
|
|
@@ -1731,7 +1755,7 @@ var events_default = printEvents;
|
|
|
1731
1755
|
|
|
1732
1756
|
// src/util/logs.ts
|
|
1733
1757
|
var import_strip_ansi = __toESM(require_strip_ansi(), 1);
|
|
1734
|
-
function displayBuildLogs(client, deployment, follow = true) {
|
|
1758
|
+
function displayBuildLogs(client, deployment, follow = true, onAliasAssigned) {
|
|
1735
1759
|
const abortController = new AbortController();
|
|
1736
1760
|
const promise = events_default(
|
|
1737
1761
|
client,
|
|
@@ -1739,6 +1763,7 @@ function displayBuildLogs(client, deployment, follow = true) {
|
|
|
1739
1763
|
{
|
|
1740
1764
|
mode: "logs",
|
|
1741
1765
|
onEvent: (event) => printBuildLog(event, output_manager_default.print),
|
|
1766
|
+
onAliasAssigned,
|
|
1742
1767
|
quiet: false,
|
|
1743
1768
|
findOpts: { direction: "forward", follow }
|
|
1744
1769
|
},
|
|
@@ -1746,6 +1771,26 @@ function displayBuildLogs(client, deployment, follow = true) {
|
|
|
1746
1771
|
);
|
|
1747
1772
|
return { promise, abortController };
|
|
1748
1773
|
}
|
|
1774
|
+
function collectBuildLogs(client, deployment, follow = true) {
|
|
1775
|
+
const logs = [];
|
|
1776
|
+
const abortController = new AbortController();
|
|
1777
|
+
const promise = events_default(
|
|
1778
|
+
client,
|
|
1779
|
+
deployment.id,
|
|
1780
|
+
{
|
|
1781
|
+
mode: "logs",
|
|
1782
|
+
onEvent: (event) => {
|
|
1783
|
+
if (event.created) {
|
|
1784
|
+
logs.push(event);
|
|
1785
|
+
}
|
|
1786
|
+
},
|
|
1787
|
+
quiet: true,
|
|
1788
|
+
findOpts: { direction: "forward", follow }
|
|
1789
|
+
},
|
|
1790
|
+
abortController
|
|
1791
|
+
).then(() => logs);
|
|
1792
|
+
return { promise, abortController };
|
|
1793
|
+
}
|
|
1749
1794
|
async function displayBuildLogsUntilFinalError(client, deployment, error) {
|
|
1750
1795
|
const abortController = new AbortController();
|
|
1751
1796
|
return events_default(
|
|
@@ -1981,6 +2026,10 @@ async function processDeployment({
|
|
|
1981
2026
|
if (!token) {
|
|
1982
2027
|
throw new Error("Missing authentication token");
|
|
1983
2028
|
}
|
|
2029
|
+
const aliasAssignedController = new AbortController();
|
|
2030
|
+
const onAliasAssigned = (event) => {
|
|
2031
|
+
aliasAssignedController.abort(event);
|
|
2032
|
+
};
|
|
1984
2033
|
const clientOptions = {
|
|
1985
2034
|
teamId: org.type === "team" ? org.id : void 0,
|
|
1986
2035
|
apiUrl: now._apiUrl,
|
|
@@ -1998,7 +2047,8 @@ async function processDeployment({
|
|
|
1998
2047
|
agent,
|
|
1999
2048
|
projectName,
|
|
2000
2049
|
bulkRedirectsPath,
|
|
2001
|
-
manual
|
|
2050
|
+
manual,
|
|
2051
|
+
aliasAssignedSignal: aliasAssignedController.signal
|
|
2002
2052
|
};
|
|
2003
2053
|
const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${import_chalk2.default.bold(`${org.slug}/${projectName}`)}`;
|
|
2004
2054
|
output_manager_default.spinner(deployingSpinnerVal, 0);
|
|
@@ -2085,7 +2135,8 @@ async function processDeployment({
|
|
|
2085
2135
|
({ abortController, promise } = displayBuildLogs(
|
|
2086
2136
|
client,
|
|
2087
2137
|
deployment,
|
|
2088
|
-
true
|
|
2138
|
+
true,
|
|
2139
|
+
onAliasAssigned
|
|
2089
2140
|
));
|
|
2090
2141
|
promise.catch(
|
|
2091
2142
|
(error) => output_manager_default.warn(`Failed to read build logs: ${error}`)
|
|
@@ -2097,6 +2148,7 @@ async function processDeployment({
|
|
|
2097
2148
|
deployment.id,
|
|
2098
2149
|
{
|
|
2099
2150
|
mode: "logs",
|
|
2151
|
+
onAliasAssigned,
|
|
2100
2152
|
onEvent: (event2) => {
|
|
2101
2153
|
if (!event2.created)
|
|
2102
2154
|
return;
|
|
@@ -2137,7 +2189,7 @@ async function processDeployment({
|
|
|
2137
2189
|
if (event.type === "ready" && !withFullLogs) {
|
|
2138
2190
|
const v1ChecksPending = event.payload.checksState && event.payload.checksState !== "completed";
|
|
2139
2191
|
const v2ChecksPending = event.payload.checks?.["deployment-alias"]?.state === "pending";
|
|
2140
|
-
stopSpinner();
|
|
2192
|
+
output_manager_default.stopSpinner();
|
|
2141
2193
|
process.stderr.write(eraseLines(2));
|
|
2142
2194
|
const isProdDeployment = event.payload.target === "production";
|
|
2143
2195
|
const previewUrl = `https://${event.payload.url}`;
|
|
@@ -3061,6 +3113,7 @@ export {
|
|
|
3061
3113
|
require_format,
|
|
3062
3114
|
require_jsonlines,
|
|
3063
3115
|
displayBuildLogs,
|
|
3116
|
+
collectBuildLogs,
|
|
3064
3117
|
displayBuildLogsUntilFinalError,
|
|
3065
3118
|
displayRuntimeLogs,
|
|
3066
3119
|
UploadErrorMissingArchive,
|
|
@@ -6,11 +6,11 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
getEnvTargetPlaceholder
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XHC5YRFY.js";
|
|
10
10
|
import {
|
|
11
11
|
projectOption,
|
|
12
12
|
yesOption
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EHTPDXTS.js";
|
|
14
14
|
import {
|
|
15
15
|
packageName
|
|
16
16
|
} from "./chunk-P6AK7SVK.js";
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveAlertsScope
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AW6V5LOC.js";
|
|
10
10
|
import {
|
|
11
11
|
handleValidationError,
|
|
12
12
|
outputError,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
buildCommandWithGlobalFlags,
|
|
20
20
|
outputAgentError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2QBF3ZL3.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/alerts/rules/parse-scope.ts
|
|
24
24
|
async function parseRulesFlagsAndScope(client, flags, jsonOutput) {
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
} from "./chunk-QH7WYDEP.js";
|
|
16
16
|
import {
|
|
17
17
|
getScope
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OCEM4YAQ.js";
|
|
19
19
|
import {
|
|
20
20
|
getLinkedProject,
|
|
21
21
|
getProjectByNameOrId
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XHC5YRFY.js";
|
|
23
23
|
import {
|
|
24
24
|
buildCommandWithGlobalFlags,
|
|
25
25
|
outputAgentError
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2QBF3ZL3.js";
|
|
27
27
|
import {
|
|
28
28
|
ProjectNotFound,
|
|
29
29
|
isAPIError,
|