vercel 54.21.1 → 56.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-UMB55BRR.js → add-MD247HM7.js} +6 -6
- package/dist/chunks/{add-NKDLTZ3B.js → add-YN76XNHI.js} +6 -6
- package/dist/chunks/{chunk-MLY3KGVY.js → chunk-2BZVY6SF.js} +4 -4
- package/dist/chunks/{chunk-TLKTTWDA.js → chunk-36OUS2KE.js} +1 -1
- package/dist/chunks/{chunk-43I5EAPY.js → chunk-3JOLICSO.js} +1 -1
- package/dist/chunks/{chunk-3EMRC44D.js → chunk-5OT26JZN.js} +32 -0
- package/dist/chunks/{chunk-TRQJQXKD.js → chunk-75HDPY6N.js} +82 -19
- package/dist/chunks/chunk-7PZWVZN6.js +105 -0
- package/dist/chunks/{chunk-DKE73NGN.js → chunk-C6E2RJS7.js} +29 -2
- package/dist/chunks/{chunk-2QBF3ZL3.js → chunk-CB3I3QIT.js} +3 -4
- package/dist/chunks/{chunk-I3HGCZ4E.js → chunk-CMJMYVQM.js} +1 -0
- package/dist/chunks/{chunk-IMTOXXTF.js → chunk-DO3V6PZD.js} +6 -4
- package/dist/chunks/{chunk-QKR7GNAK.js → chunk-DREO3DFB.js} +6 -6
- package/dist/chunks/{chunk-GAJ2ESDD.js → chunk-FN36GZDS.js} +100 -36
- package/dist/chunks/{chunk-4UZF3U4N.js → chunk-HA7C7SDO.js} +2 -0
- package/dist/chunks/{chunk-QH7WYDEP.js → chunk-IC4YEIGW.js} +7 -0
- package/dist/chunks/{chunk-H3KWN2KA.js → chunk-JHZG2MPW.js} +4 -4
- package/dist/chunks/{chunk-QMZO4CEP.js → chunk-KODCUW77.js} +353 -403
- package/dist/chunks/{chunk-RO5JIUOI.js → chunk-KSJ4FNUG.js} +3 -3
- package/dist/chunks/{chunk-KNSDQCVQ.js → chunk-MBH4DFF7.js} +51 -9
- package/dist/chunks/{chunk-MV65GD4L.js → chunk-N4VWB5RV.js} +1 -1
- package/dist/chunks/{chunk-AUYY7RD3.js → chunk-NZ73KKYG.js} +550 -191
- package/dist/chunks/{chunk-ADTCIFMD.js → chunk-ORKY33ZK.js} +69 -16
- package/dist/chunks/{chunk-XMJAKLQQ.js → chunk-T7EIXPC5.js} +1 -1
- package/dist/chunks/{chunk-I4NRKN2Z.js → chunk-THMFJODG.js} +480 -277
- package/dist/chunks/{chunk-2ZXLLEEZ.js → chunk-TNDFVAZV.js} +4 -4
- package/dist/chunks/{chunk-OVE2GAHC.js → chunk-VPDJOK2C.js} +3 -3
- package/dist/chunks/{chunk-HMFUXSD7.js → chunk-VSD5BID5.js} +1 -1
- package/dist/chunks/{chunk-ZZIAWRCX.js → chunk-W346YNDN.js} +18 -0
- package/dist/chunks/chunk-WGGABYO5.js +31 -0
- package/dist/chunks/{chunk-XCL7I6W5.js → chunk-ZHDXN5V3.js} +3 -3
- package/dist/chunks/{compile-vercel-config-OKONVGZI.js → compile-vercel-config-65QWHKPO.js} +2 -2
- package/dist/chunks/{delete-L7TN5GNZ.js → delete-NPEJGNTV.js} +5 -5
- package/dist/chunks/{disable-7NVU4H2N.js → disable-RH3MH7PH.js} +5 -5
- package/dist/chunks/{discard-SJ2TDPS2.js → discard-IJBFO24S.js} +5 -5
- package/dist/chunks/{edit-SW4MF4Q3.js → edit-GMLOKGHO.js} +6 -6
- package/dist/chunks/{enable-FOKEO6J2.js → enable-QCTL7ISO.js} +5 -5
- package/dist/chunks/{exec-UKMIYIF6.js → exec-G4AUF3KG.js} +4 -90
- package/dist/chunks/{export-3DSHT2FD.js → export-6ERWU54A.js} +9 -8
- package/dist/chunks/{image-T6I7BZSC.js → image-XUMTOUQS.js} +5 -5
- package/dist/chunks/{inspect-RV444SBC.js → inspect-7UPFOAJO.js} +5 -5
- package/dist/chunks/{inspect-EP24WN4I.js → inspect-F6LEST4Y.js} +10 -10
- package/dist/chunks/{inspect-2MY25CMN.js → inspect-OKOUOOWW.js} +10 -10
- package/dist/chunks/{inspect-DJ7OGHBK.js → inspect-ZS4U24NA.js} +9 -9
- package/dist/chunks/{list-CCG2NVLL.js → list-BTMO3CXU.js} +5 -5
- package/dist/chunks/{list-OMJ7EDKA.js → list-ZK7Q3UHB.js} +3 -3
- package/dist/chunks/login-POFRYQZ6.js +247 -0
- package/dist/chunks/{ls-VXZGEJJD.js → ls-D5Z4IWMU.js} +6 -6
- package/dist/chunks/{ls-VCTHIVI7.js → ls-EXRMNZUT.js} +9 -9
- package/dist/chunks/{ls-33Z3R2KY.js → ls-JGNNPYUA.js} +9 -9
- package/dist/chunks/{ls-5KN5FKAQ.js → ls-Z2TCQW5W.js} +9 -9
- package/dist/chunks/{publish-RZ2DIYRU.js → publish-ED2XVYSE.js} +5 -5
- package/dist/chunks/{query-2MIBB7C5.js → query-6XMBJTPX.js} +3 -3
- package/dist/chunks/{reorder-FEZIPHNW.js → reorder-7B6HZCOZ.js} +5 -5
- package/dist/chunks/{restore-JHH6CW2S.js → restore-47ZDRYQT.js} +5 -5
- package/dist/chunks/{rm-EKPVQYGH.js → rm-4IY6QGHF.js} +6 -6
- package/dist/chunks/{rm-3KAXICHP.js → rm-AA7WYBZ5.js} +5 -5
- package/dist/chunks/{rm-ULQHII4K.js → rm-NGTPTPZK.js} +6 -6
- package/dist/chunks/{rule-inspect-FOZOCOUO.js → rule-inspect-FNX6P4LZ.js} +6 -6
- package/dist/chunks/{rules-RJD4S7JA.js → rules-MMCCBGQJ.js} +10 -10
- package/dist/chunks/{schema-CDXFJU72.js → schema-JSK7S7HL.js} +3 -3
- package/dist/chunks/{tags-BLBAPEWV.js → tags-KNCSBTIH.js} +4 -4
- package/dist/chunks/{update-2NW6NKG6.js → update-JEFLJ3TH.js} +6 -6
- package/dist/commands/build/index.js +47 -16
- package/dist/commands/deploy/index.js +24 -46
- package/dist/commands/dev/index.js +202 -59
- package/dist/commands/env/index.js +10 -20
- package/dist/commands/link/index.js +33 -16
- package/dist/commands/list/index.js +26 -11
- package/dist/commands-bulk.js +13722 -10599
- package/dist/index.js +14 -24
- package/dist/version.mjs +1 -1
- package/package.json +24 -23
- package/dist/chunks/chunk-Y4JJYHUG.js +0 -16
|
@@ -9,25 +9,25 @@ import {
|
|
|
9
9
|
handleVcrApiError,
|
|
10
10
|
resolveVcrScope,
|
|
11
11
|
validateVcrJsonOutput
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TNDFVAZV.js";
|
|
13
13
|
import {
|
|
14
14
|
outputError
|
|
15
15
|
} from "./chunk-BUZRVER7.js";
|
|
16
16
|
import "./chunk-XPKWKPWA.js";
|
|
17
17
|
import {
|
|
18
18
|
addSubcommand
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5OT26JZN.js";
|
|
20
20
|
import "./chunk-7C7MMT4J.js";
|
|
21
21
|
import "./chunk-RLJA2KI7.js";
|
|
22
22
|
import {
|
|
23
23
|
AGENT_REASON
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-IC4YEIGW.js";
|
|
25
|
+
import "./chunk-VSD5BID5.js";
|
|
26
|
+
import "./chunk-THMFJODG.js";
|
|
27
27
|
import {
|
|
28
28
|
buildCommandWithGlobalFlags,
|
|
29
29
|
outputAgentError
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CB3I3QIT.js";
|
|
31
31
|
import "./chunk-ECCWJHC6.js";
|
|
32
32
|
import {
|
|
33
33
|
getFlagsSpecification,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesCollectionPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-KSJ4FNUG.js";
|
|
13
|
+
import "./chunk-JHZG2MPW.js";
|
|
14
14
|
import "./chunk-BUZRVER7.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
} from "./chunk-22GUZ5KG.js";
|
|
21
21
|
import {
|
|
22
22
|
AGENT_REASON
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-IC4YEIGW.js";
|
|
24
|
+
import "./chunk-VSD5BID5.js";
|
|
25
|
+
import "./chunk-THMFJODG.js";
|
|
26
26
|
import {
|
|
27
27
|
buildCommandWithGlobalFlags,
|
|
28
28
|
outputAgentError
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CB3I3QIT.js";
|
|
30
30
|
import "./chunk-ECCWJHC6.js";
|
|
31
31
|
import {
|
|
32
32
|
getFlagsSpecification,
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
writeProjectSettings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-N4VWB5RV.js";
|
|
10
10
|
import {
|
|
11
11
|
autoInstallVercelPlugin
|
|
12
12
|
} from "./chunk-NJUPUGOE.js";
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
} from "./chunk-64IF634X.js";
|
|
16
16
|
import {
|
|
17
17
|
ensureLink
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZHDXN5V3.js";
|
|
19
19
|
import {
|
|
20
20
|
pullCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3JOLICSO.js";
|
|
22
22
|
import {
|
|
23
23
|
help
|
|
24
24
|
} from "./chunk-QY63UKTP.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
envPullCommandLogic,
|
|
29
29
|
humanizePath,
|
|
30
30
|
parseTarget
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-THMFJODG.js";
|
|
32
32
|
import {
|
|
33
33
|
TelemetryClient
|
|
34
34
|
} from "./chunk-ECCWJHC6.js";
|
|
@@ -109,6 +109,36 @@ var removeSubcommand = {
|
|
|
109
109
|
}
|
|
110
110
|
]
|
|
111
111
|
};
|
|
112
|
+
var loginSubcommand = {
|
|
113
|
+
name: "login",
|
|
114
|
+
aliases: [],
|
|
115
|
+
description: "Authenticate a container tool (docker, podman, or buildah) with the Vercel Container Registry",
|
|
116
|
+
arguments: [
|
|
117
|
+
{
|
|
118
|
+
name: "engine",
|
|
119
|
+
required: true
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
options: [projectScopeOption, formatOption],
|
|
123
|
+
examples: [
|
|
124
|
+
{
|
|
125
|
+
name: "Log in with Docker",
|
|
126
|
+
value: `${packageName} vcr login docker`
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "Log in with Podman",
|
|
130
|
+
value: `${packageName} vcr login podman`
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "Log in with Buildah",
|
|
134
|
+
value: `${packageName} vcr login buildah`
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "Log in for a specific project",
|
|
138
|
+
value: `${packageName} vcr login docker --project my-app`
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
};
|
|
112
142
|
var vcrCommand = {
|
|
113
143
|
name: "vcr",
|
|
114
144
|
aliases: [],
|
|
@@ -119,6 +149,7 @@ var vcrCommand = {
|
|
|
119
149
|
inspectSubcommand,
|
|
120
150
|
addSubcommand,
|
|
121
151
|
removeSubcommand,
|
|
152
|
+
loginSubcommand,
|
|
122
153
|
tagsAggregateCommand,
|
|
123
154
|
imageAggregateCommand
|
|
124
155
|
],
|
|
@@ -144,5 +175,6 @@ export {
|
|
|
144
175
|
inspectSubcommand,
|
|
145
176
|
addSubcommand,
|
|
146
177
|
removeSubcommand,
|
|
178
|
+
loginSubcommand,
|
|
147
179
|
vcrCommand
|
|
148
180
|
};
|
|
@@ -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-C6E2RJS7.js";
|
|
13
15
|
import {
|
|
14
16
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
15
17
|
VERCEL_CONFIG_EXTENSIONS,
|
|
@@ -36,7 +38,7 @@ import {
|
|
|
36
38
|
useKeypress,
|
|
37
39
|
usePrefix,
|
|
38
40
|
useState
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-THMFJODG.js";
|
|
40
42
|
import {
|
|
41
43
|
require_load_json_file
|
|
42
44
|
} from "./chunk-ECCWJHC6.js";
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import {
|
|
8
|
+
require_isexe
|
|
9
|
+
} from "./chunk-24FCBXI4.js";
|
|
10
|
+
import {
|
|
11
|
+
__commonJS,
|
|
12
|
+
__require
|
|
13
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
14
|
+
|
|
15
|
+
// ../../node_modules/.pnpm/which@3.0.0/node_modules/which/lib/index.js
|
|
16
|
+
var require_lib = __commonJS({
|
|
17
|
+
"../../node_modules/.pnpm/which@3.0.0/node_modules/which/lib/index.js"(exports, module) {
|
|
18
|
+
var isexe = require_isexe();
|
|
19
|
+
var { join, delimiter, sep, posix } = __require("path");
|
|
20
|
+
var isWindows = process.platform === "win32";
|
|
21
|
+
var rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? "" : sep}]`.replace(/(\\)/g, "\\$1"));
|
|
22
|
+
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
23
|
+
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
24
|
+
var getPathInfo = (cmd, {
|
|
25
|
+
path: optPath = process.env.PATH,
|
|
26
|
+
pathExt: optPathExt = process.env.PATHEXT,
|
|
27
|
+
delimiter: optDelimiter = delimiter
|
|
28
|
+
}) => {
|
|
29
|
+
const pathEnv = cmd.match(rSlash) ? [""] : [
|
|
30
|
+
// windows always checks the cwd first
|
|
31
|
+
...isWindows ? [process.cwd()] : [],
|
|
32
|
+
...(optPath || /* istanbul ignore next: very unusual */
|
|
33
|
+
"").split(optDelimiter)
|
|
34
|
+
];
|
|
35
|
+
if (isWindows) {
|
|
36
|
+
const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter);
|
|
37
|
+
const pathExt = pathExtExe.split(optDelimiter);
|
|
38
|
+
if (cmd.includes(".") && pathExt[0] !== "") {
|
|
39
|
+
pathExt.unshift("");
|
|
40
|
+
}
|
|
41
|
+
return { pathEnv, pathExt, pathExtExe };
|
|
42
|
+
}
|
|
43
|
+
return { pathEnv, pathExt: [""] };
|
|
44
|
+
};
|
|
45
|
+
var getPathPart = (raw, cmd) => {
|
|
46
|
+
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
47
|
+
const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
|
|
48
|
+
return prefix + join(pathPart, cmd);
|
|
49
|
+
};
|
|
50
|
+
var which = async (cmd, opt = {}) => {
|
|
51
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
52
|
+
const found = [];
|
|
53
|
+
for (const envPart of pathEnv) {
|
|
54
|
+
const p = getPathPart(envPart, cmd);
|
|
55
|
+
for (const ext of pathExt) {
|
|
56
|
+
const withExt = p + ext;
|
|
57
|
+
const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
|
|
58
|
+
if (is) {
|
|
59
|
+
if (!opt.all) {
|
|
60
|
+
return withExt;
|
|
61
|
+
}
|
|
62
|
+
found.push(withExt);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (opt.all && found.length) {
|
|
67
|
+
return found;
|
|
68
|
+
}
|
|
69
|
+
if (opt.nothrow) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
throw getNotFoundError(cmd);
|
|
73
|
+
};
|
|
74
|
+
var whichSync = (cmd, opt = {}) => {
|
|
75
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
76
|
+
const found = [];
|
|
77
|
+
for (const pathEnvPart of pathEnv) {
|
|
78
|
+
const p = getPathPart(pathEnvPart, cmd);
|
|
79
|
+
for (const ext of pathExt) {
|
|
80
|
+
const withExt = p + ext;
|
|
81
|
+
const is = isexe.sync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
|
|
82
|
+
if (is) {
|
|
83
|
+
if (!opt.all) {
|
|
84
|
+
return withExt;
|
|
85
|
+
}
|
|
86
|
+
found.push(withExt);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (opt.all && found.length) {
|
|
91
|
+
return found;
|
|
92
|
+
}
|
|
93
|
+
if (opt.nothrow) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
throw getNotFoundError(cmd);
|
|
97
|
+
};
|
|
98
|
+
module.exports = which;
|
|
99
|
+
which.sync = whichSync;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export {
|
|
104
|
+
require_lib
|
|
105
|
+
};
|
|
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
VERCEL_DIR,
|
|
9
9
|
isVercelTomlEnabled
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-THMFJODG.js";
|
|
11
11
|
import {
|
|
12
12
|
parseArguments
|
|
13
13
|
} from "./chunk-EHTPDXTS.js";
|
|
@@ -17,6 +17,29 @@ import {
|
|
|
17
17
|
InvalidLocalConfig
|
|
18
18
|
} from "./chunk-P6AK7SVK.js";
|
|
19
19
|
|
|
20
|
+
// src/util/input/prompt-cancellation.ts
|
|
21
|
+
var PromptCanceledError = class extends Error {
|
|
22
|
+
constructor() {
|
|
23
|
+
super("Prompt canceled");
|
|
24
|
+
this.name = "PromptCanceledError";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var PromptBackError = class extends Error {
|
|
28
|
+
constructor() {
|
|
29
|
+
super("Prompt back");
|
|
30
|
+
this.name = "PromptBackError";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
function isPromptBackError(error) {
|
|
34
|
+
return error instanceof PromptBackError;
|
|
35
|
+
}
|
|
36
|
+
function isPromptCanceledError(error) {
|
|
37
|
+
if (error instanceof PromptCanceledError) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
return error instanceof Error && error.message.includes("User force closed the prompt");
|
|
41
|
+
}
|
|
42
|
+
|
|
20
43
|
// src/util/config/local-path.ts
|
|
21
44
|
import path from "path";
|
|
22
45
|
import { existsSync } from "fs";
|
|
@@ -55,5 +78,9 @@ function getLocalPathConfig(prefix) {
|
|
|
55
78
|
}
|
|
56
79
|
|
|
57
80
|
export {
|
|
58
|
-
getLocalPathConfig
|
|
81
|
+
getLocalPathConfig,
|
|
82
|
+
PromptCanceledError,
|
|
83
|
+
PromptBackError,
|
|
84
|
+
isPromptBackError,
|
|
85
|
+
isPromptCanceledError
|
|
59
86
|
};
|
|
@@ -38,7 +38,7 @@ var GLOBAL_FLAG_NAMES = /* @__PURE__ */ new Set([
|
|
|
38
38
|
"-T"
|
|
39
39
|
// --token/-t are intentionally excluded and stripped via stripSensitiveAuthArgs.
|
|
40
40
|
]);
|
|
41
|
-
var
|
|
41
|
+
var GLOBAL_FLAGS_BOOLEAN = /* @__PURE__ */ new Set(["--yes", "-y", "--non-interactive"]);
|
|
42
42
|
var GLOBAL_FLAG_SHORTHANDS = {
|
|
43
43
|
"-y": "--yes",
|
|
44
44
|
"-S": "--scope",
|
|
@@ -55,7 +55,7 @@ function getGlobalFlagsFromArgv(argv) {
|
|
|
55
55
|
const name = arg.startsWith("--") ? arg.split("=")[0] : arg;
|
|
56
56
|
if (GLOBAL_FLAG_NAMES.has(name)) {
|
|
57
57
|
out.push(arg);
|
|
58
|
-
const takesSeparateValue = !
|
|
58
|
+
const takesSeparateValue = !GLOBAL_FLAGS_BOOLEAN.has(name) && !arg.includes("=") && i + 1 < args.length && !args[i + 1].startsWith("-");
|
|
59
59
|
if (takesSeparateValue) {
|
|
60
60
|
out.push(args[i + 1]);
|
|
61
61
|
i++;
|
|
@@ -71,7 +71,7 @@ function omitGlobalFlagsFromArgs(args) {
|
|
|
71
71
|
const arg = safeArgs[i];
|
|
72
72
|
const name = arg.startsWith("--") ? arg.split("=")[0] : arg;
|
|
73
73
|
if (GLOBAL_FLAG_NAMES.has(name)) {
|
|
74
|
-
const skipSeparateValue = !
|
|
74
|
+
const skipSeparateValue = !GLOBAL_FLAGS_BOOLEAN.has(name) && !arg.includes("=") && i + 1 < safeArgs.length && !safeArgs[i + 1].startsWith("-");
|
|
75
75
|
if (skipSeparateValue) {
|
|
76
76
|
i++;
|
|
77
77
|
}
|
|
@@ -529,7 +529,6 @@ function openUrlInBrowserCommand(url) {
|
|
|
529
529
|
|
|
530
530
|
export {
|
|
531
531
|
buildCommandWithYes,
|
|
532
|
-
getGlobalFlagsFromArgv,
|
|
533
532
|
omitGlobalFlagsFromArgs,
|
|
534
533
|
buildIntegrationCommandTailFromArgv,
|
|
535
534
|
buildCommandWithGlobalFlags,
|
|
@@ -7,17 +7,17 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getUpdateCommandInfo,
|
|
9
9
|
isGlobal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MBH4DFF7.js";
|
|
11
11
|
import {
|
|
12
12
|
getGlobalPathConfig,
|
|
13
13
|
progress,
|
|
14
14
|
writeToConfigFile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-75HDPY6N.js";
|
|
16
16
|
import {
|
|
17
17
|
apiCommand,
|
|
18
18
|
listSubcommand3 as listSubcommand,
|
|
19
19
|
loginCommand
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NZ73KKYG.js";
|
|
21
21
|
import {
|
|
22
22
|
require_semver
|
|
23
23
|
} from "./chunk-IB5L4LKZ.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-QY63UKTP.js";
|
|
27
27
|
import {
|
|
28
28
|
login
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-THMFJODG.js";
|
|
30
30
|
import {
|
|
31
31
|
TelemetryClient,
|
|
32
32
|
isNativeBinaryInstall
|
|
@@ -2957,9 +2957,11 @@ async function executeUpgrade(targetVersion) {
|
|
|
2957
2957
|
});
|
|
2958
2958
|
upgradeProcess.stdout?.on("data", (data) => {
|
|
2959
2959
|
stdout.push(Uint8Array.from(data));
|
|
2960
|
+
output_manager_default.debug(`[upgrade stdout] ${data.toString().trimEnd()}`);
|
|
2960
2961
|
});
|
|
2961
2962
|
upgradeProcess.stderr?.on("data", (data) => {
|
|
2962
2963
|
stderr.push(Uint8Array.from(data));
|
|
2964
|
+
output_manager_default.debug(`[upgrade stderr] ${data.toString().trimEnd()}`);
|
|
2963
2965
|
});
|
|
2964
2966
|
upgradeProcess.on("error", (err) => {
|
|
2965
2967
|
output_manager_default.stopSpinner();
|
|
@@ -828,7 +828,7 @@ var editSubcommand = {
|
|
|
828
828
|
var exportSubcommand = {
|
|
829
829
|
name: "export",
|
|
830
830
|
aliases: [],
|
|
831
|
-
description: "Export routes
|
|
831
|
+
description: "Export routes to a vercel.json or vercel.ts file",
|
|
832
832
|
arguments: [
|
|
833
833
|
{
|
|
834
834
|
name: "name-or-id",
|
|
@@ -837,11 +837,11 @@ var exportSubcommand = {
|
|
|
837
837
|
],
|
|
838
838
|
options: [
|
|
839
839
|
{
|
|
840
|
-
name: "
|
|
841
|
-
description: "Output format: json (default) or ts",
|
|
842
|
-
shorthand:
|
|
840
|
+
name: "output",
|
|
841
|
+
description: "Output file format: .json (default) or .ts",
|
|
842
|
+
shorthand: "o",
|
|
843
843
|
type: String,
|
|
844
|
-
argument: "
|
|
844
|
+
argument: "json|ts",
|
|
845
845
|
deprecated: false
|
|
846
846
|
}
|
|
847
847
|
],
|
|
@@ -852,7 +852,7 @@ var exportSubcommand = {
|
|
|
852
852
|
},
|
|
853
853
|
{
|
|
854
854
|
name: "Export as vercel.ts format",
|
|
855
|
-
value: `${packageName} routes export --
|
|
855
|
+
value: `${packageName} routes export --output ts`
|
|
856
856
|
},
|
|
857
857
|
{
|
|
858
858
|
name: "Export a specific route",
|