vercel 54.17.2 → 54.18.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-ADMRKNTV.js → add-6IFGG2TY.js} +9 -9
- package/dist/chunks/chunk-2RVK3DDN.js +224 -0
- package/dist/chunks/{chunk-FR2CJ7AV.js → chunk-5ACKBNHW.js} +8 -8
- package/dist/chunks/{chunk-CQRLZB3Y.js → chunk-AQIWBG3Y.js} +8 -8
- package/dist/chunks/{chunk-U7HYX4V6.js → chunk-AWAUGLOM.js} +4 -4
- package/dist/chunks/{chunk-AZP6TNVD.js → chunk-B3VMTJM2.js} +1 -1
- package/dist/chunks/{chunk-UZZBWCU2.js → chunk-C6H4BP2L.js} +58 -6
- package/dist/chunks/{chunk-YI3JV6GM.js → chunk-CT3OCODK.js} +1 -1
- package/dist/chunks/{chunk-3ESVKDUA.js → chunk-DZ65TDY4.js} +1 -1
- package/dist/chunks/{chunk-PEJCJXGI.js → chunk-F57GYOKZ.js} +1 -1
- package/dist/chunks/{chunk-A6I3RGAN.js → chunk-FOPFOSQM.js} +3 -3
- package/dist/chunks/{chunk-RL7DANWP.js → chunk-GZ5KF7HK.js} +5 -5
- package/dist/chunks/{chunk-NG53DNDG.js → chunk-HMWVVA4B.js} +1 -1
- package/dist/chunks/{chunk-KAICYGS4.js → chunk-IBJBNVZV.js} +1 -1
- package/dist/chunks/{chunk-52DDM5F6.js → chunk-JJKW6J63.js} +2 -2
- package/dist/chunks/{chunk-WR6JALPR.js → chunk-JWQ37WLT.js} +4 -3
- package/dist/chunks/{chunk-64KT5RVX.js → chunk-KQDEJE65.js} +3 -3
- package/dist/chunks/{chunk-7CTNFMKH.js → chunk-MUDZFSZC.js} +1 -1
- package/dist/chunks/{chunk-ZKAWVYGP.js → chunk-UNIIXDM2.js} +56 -56
- package/dist/chunks/{chunk-LUORN5H7.js → chunk-VUVQO3LF.js} +3607 -514
- package/dist/chunks/{chunk-NHGCQRK5.js → chunk-X5UROEGN.js} +12 -0
- package/dist/chunks/{chunk-2YIEJRSL.js → chunk-X7KGEDKQ.js} +10 -9
- package/dist/chunks/{chunk-P4KQ3FJ4.js → chunk-XQQXV6ZZ.js} +1 -0
- package/dist/chunks/{chunk-JYTOXUQJ.js → chunk-YHFZKOKK.js} +1 -1
- package/dist/chunks/{compile-vercel-config-7IAWGVM7.js → compile-vercel-config-CZH5GU3R.js} +4 -4
- package/dist/chunks/{delete-DHYJ7ZYD.js → delete-KZJPJUTT.js} +6 -6
- package/dist/chunks/{disable-A4D7SZ6G.js → disable-XXKGGPR5.js} +6 -6
- package/dist/chunks/{discard-PRE343AI.js → discard-VFWCCRDF.js} +6 -6
- package/dist/chunks/{edit-MWFKADR7.js → edit-RY2KAHX2.js} +7 -7
- package/dist/chunks/{enable-6P6TDM6D.js → enable-M2PSCPZH.js} +6 -6
- package/dist/chunks/{exec-HI4HF4GY.js → exec-CGBHRYWG.js} +14 -9
- package/dist/chunks/{export-WISO5LBX.js → export-U3ZPYBWC.js} +6 -6
- package/dist/chunks/fetch-proxy-R3JZNXBZ.js +99 -0
- package/dist/chunks/{inspect-EBIQ5XF3.js → inspect-HI7DLEJ2.js} +8 -8
- package/dist/chunks/{list-755IMC6Y.js → list-KLZIIRGS.js} +13 -13
- package/dist/chunks/{list-OD7KO5BB.js → list-TUYF4LRT.js} +6 -6
- package/dist/chunks/{ls-ZSVMQVZX.js → ls-6PFY2I7Q.js} +9 -9
- package/dist/chunks/{publish-LMGSRL3X.js → publish-GXWEL4UA.js} +6 -6
- package/dist/chunks/{query-WZTKABE4.js → query-SLLJ6OJT.js} +11 -11
- package/dist/chunks/{reorder-QK5QJ6TW.js → reorder-VRC6BLJM.js} +6 -6
- package/dist/chunks/{restore-VF3HDGON.js → restore-SMXHUGVC.js} +6 -6
- package/dist/chunks/{rm-QP57BPQO.js → rm-V7DGLIHX.js} +9 -9
- package/dist/chunks/{rule-inspect-ZZJ7SQJF.js → rule-inspect-7AZGYZDI.js} +9 -9
- package/dist/chunks/{rules-SUBKFNPR.js → rules-MQBE2RMP.js} +7 -7
- package/dist/chunks/{schema-FSQEAUMR.js → schema-EMHEFUMV.js} +6 -6
- package/dist/chunks/{update-DDCJ2EDT.js → update-GSQ26HZG.js} +9 -9
- package/dist/commands/build/index.js +28 -18
- package/dist/commands/deploy/index.js +22 -22
- package/dist/commands/dev/index.js +47 -39
- package/dist/commands/env/index.js +16 -16
- package/dist/commands/link/index.js +13 -13
- package/dist/commands/list/index.js +12 -12
- package/dist/commands-bulk.js +576 -292
- package/dist/fetch-dist-tags.cjs +60 -0
- package/dist/get-latest-worker.cjs +6 -56
- package/dist/help.js +1 -1
- package/dist/index.js +200 -61
- package/dist/version.mjs +1 -1
- package/package.json +15 -17
- package/dist/chunks/chunk-N2T234LO.js +0 -3144
- package/dist/chunks/{chunk-3NR6OYDV.js → chunk-LWJWW6ZY.js} +3 -3
- package/dist/chunks/{chunk-D7MGZH35.js → chunk-U5FVI3MF.js} +3 -3
|
@@ -289,6 +289,17 @@ function outputAgentError(client, payload, exitCode = 1) {
|
|
|
289
289
|
`);
|
|
290
290
|
process.exit(exitCode);
|
|
291
291
|
}
|
|
292
|
+
function outputAgentSuccess(client, payload, exitCode = 0) {
|
|
293
|
+
if (!shouldEmitNonInteractiveCommandError(client)) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
if (!payload.hint && payload.next?.length) {
|
|
297
|
+
payload.hint = "Follow up with one of the commands in next[].";
|
|
298
|
+
}
|
|
299
|
+
client.stdout.write(`${JSON.stringify(payload, null, 2)}
|
|
300
|
+
`);
|
|
301
|
+
process.exit(exitCode);
|
|
302
|
+
}
|
|
292
303
|
function buildNextStepsForEdgeConfig(client) {
|
|
293
304
|
return [
|
|
294
305
|
{
|
|
@@ -483,6 +494,7 @@ export {
|
|
|
483
494
|
argvHasNonInteractive,
|
|
484
495
|
shouldEmitNonInteractiveCommandError,
|
|
485
496
|
outputAgentError,
|
|
497
|
+
outputAgentSuccess,
|
|
486
498
|
exitWithNonInteractiveError,
|
|
487
499
|
openUrlInBrowserCommand
|
|
488
500
|
};
|
|
@@ -10,10 +10,13 @@ import {
|
|
|
10
10
|
} from "./chunk-QH7WYDEP.js";
|
|
11
11
|
import {
|
|
12
12
|
getLocalPathConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-B3VMTJM2.js";
|
|
14
14
|
import {
|
|
15
15
|
getScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MUDZFSZC.js";
|
|
17
|
+
import {
|
|
18
|
+
table
|
|
19
|
+
} from "./chunk-LYCSVJIX.js";
|
|
17
20
|
import {
|
|
18
21
|
VERCEL_DIR_PROJECT,
|
|
19
22
|
VERCEL_DIR_README,
|
|
@@ -48,15 +51,12 @@ import {
|
|
|
48
51
|
selectAndParseRemoteUrl,
|
|
49
52
|
selectOrg,
|
|
50
53
|
writeServicesConfig
|
|
51
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-VUVQO3LF.js";
|
|
52
55
|
import {
|
|
53
56
|
buildCommandWithGlobalFlags,
|
|
54
57
|
outputAgentError,
|
|
55
58
|
shouldEmitNonInteractiveCommandError
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import {
|
|
58
|
-
table
|
|
59
|
-
} from "./chunk-LYCSVJIX.js";
|
|
59
|
+
} from "./chunk-X5UROEGN.js";
|
|
60
60
|
import {
|
|
61
61
|
printError
|
|
62
62
|
} from "./chunk-MYWLF3BZ.js";
|
|
@@ -745,7 +745,7 @@ async function promptForInferredServicesSetup({
|
|
|
745
745
|
choice = { type: "services" };
|
|
746
746
|
} else if (!nonInteractive) {
|
|
747
747
|
const webServices = inferred.services.filter(
|
|
748
|
-
(service) => service.type === "web"
|
|
748
|
+
(service) => (0, import_fs_detectors.isExperimentalService)(service) ? service.type === "web" : true
|
|
749
749
|
);
|
|
750
750
|
const choices = [
|
|
751
751
|
{
|
|
@@ -777,9 +777,10 @@ async function promptForInferredServicesSetup({
|
|
|
777
777
|
const index = Number.parseInt(selected.slice("single-app:".length), 10);
|
|
778
778
|
const service = webServices[index];
|
|
779
779
|
if (service) {
|
|
780
|
+
const serviceRoot = (0, import_fs_detectors.isExperimentalServiceV2)(service) ? service.root : service.workspace;
|
|
780
781
|
choice = {
|
|
781
782
|
type: "single-app",
|
|
782
|
-
selectedPath:
|
|
783
|
+
selectedPath: serviceRoot === "." ? workPath : join(workPath, serviceRoot)
|
|
783
784
|
};
|
|
784
785
|
}
|
|
785
786
|
}
|
|
@@ -68,6 +68,7 @@ var help = () => `
|
|
|
68
68
|
dns [name] Manages your DNS records
|
|
69
69
|
domains [name] Manages your domain names
|
|
70
70
|
firewall [cmd] Manages Vercel Firewall configuration and custom rules
|
|
71
|
+
flags [cmd] Manage feature flags for a Vercel project
|
|
71
72
|
httpstat path Visualize HTTP timing statistics for deployments
|
|
72
73
|
logs [url] Displays the logs for a deployment
|
|
73
74
|
metrics <metric> Queries observability metrics for your project or team
|
|
@@ -11,15 +11,15 @@ import {
|
|
|
11
11
|
findSourceVercelConfigFile,
|
|
12
12
|
getVercelConfigPath,
|
|
13
13
|
normalizeConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VUVQO3LF.js";
|
|
15
|
+
import "./chunk-X5UROEGN.js";
|
|
15
16
|
import "./chunk-Q77ALSXR.js";
|
|
16
|
-
import "./chunk-NHGCQRK5.js";
|
|
17
|
-
import "./chunk-N2T234LO.js";
|
|
18
|
-
import "./chunk-GGP5R3FU.js";
|
|
19
17
|
import "./chunk-MYWLF3BZ.js";
|
|
20
18
|
import "./chunk-LN6B7ZI3.js";
|
|
21
19
|
import "./chunk-P4QNYOFB.js";
|
|
20
|
+
import "./chunk-2RVK3DDN.js";
|
|
22
21
|
import "./chunk-Z5SBJH6L.js";
|
|
22
|
+
import "./chunk-GGP5R3FU.js";
|
|
23
23
|
import "./chunk-S7KYDPEM.js";
|
|
24
24
|
import "./chunk-TZ2YI2VH.js";
|
|
25
25
|
export {
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
parseSubcommandArgs,
|
|
16
16
|
resolveRoutes,
|
|
17
17
|
withGlobalFlags
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JJKW6J63.js";
|
|
19
19
|
import {
|
|
20
20
|
deleteSubcommand
|
|
21
21
|
} from "./chunk-IB56QKCM.js";
|
|
@@ -27,21 +27,21 @@ import {
|
|
|
27
27
|
AGENT_REASON,
|
|
28
28
|
AGENT_STATUS
|
|
29
29
|
} from "./chunk-QH7WYDEP.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-Q77ALSXR.js";
|
|
30
|
+
import "./chunk-VUVQO3LF.js";
|
|
32
31
|
import {
|
|
33
32
|
outputAgentError
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-GGP5R3FU.js";
|
|
33
|
+
} from "./chunk-X5UROEGN.js";
|
|
34
|
+
import "./chunk-Q77ALSXR.js";
|
|
37
35
|
import "./chunk-MYWLF3BZ.js";
|
|
38
36
|
import {
|
|
39
37
|
getCommandName
|
|
40
38
|
} from "./chunk-LN6B7ZI3.js";
|
|
41
39
|
import "./chunk-P4QNYOFB.js";
|
|
40
|
+
import "./chunk-2RVK3DDN.js";
|
|
42
41
|
import {
|
|
43
42
|
output_manager_default
|
|
44
43
|
} from "./chunk-Z5SBJH6L.js";
|
|
44
|
+
import "./chunk-GGP5R3FU.js";
|
|
45
45
|
import {
|
|
46
46
|
require_source
|
|
47
47
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
parseSubcommandArgs,
|
|
18
18
|
resolveRoute,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JJKW6J63.js";
|
|
21
21
|
import {
|
|
22
22
|
disableSubcommand
|
|
23
23
|
} from "./chunk-IB56QKCM.js";
|
|
@@ -26,21 +26,21 @@ import {
|
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
28
|
import "./chunk-QH7WYDEP.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-Q77ALSXR.js";
|
|
29
|
+
import "./chunk-VUVQO3LF.js";
|
|
31
30
|
import {
|
|
32
31
|
outputAgentError
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-GGP5R3FU.js";
|
|
32
|
+
} from "./chunk-X5UROEGN.js";
|
|
33
|
+
import "./chunk-Q77ALSXR.js";
|
|
36
34
|
import "./chunk-MYWLF3BZ.js";
|
|
37
35
|
import {
|
|
38
36
|
getCommandName
|
|
39
37
|
} from "./chunk-LN6B7ZI3.js";
|
|
40
38
|
import "./chunk-P4QNYOFB.js";
|
|
39
|
+
import "./chunk-2RVK3DDN.js";
|
|
41
40
|
import {
|
|
42
41
|
output_manager_default
|
|
43
42
|
} from "./chunk-Z5SBJH6L.js";
|
|
43
|
+
import "./chunk-GGP5R3FU.js";
|
|
44
44
|
import {
|
|
45
45
|
require_source
|
|
46
46
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
parseSubcommandArgs,
|
|
18
18
|
printDiffSummary,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JJKW6J63.js";
|
|
21
21
|
import {
|
|
22
22
|
discardSubcommand
|
|
23
23
|
} from "./chunk-IB56QKCM.js";
|
|
@@ -26,21 +26,21 @@ import {
|
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
28
|
import "./chunk-QH7WYDEP.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-Q77ALSXR.js";
|
|
29
|
+
import "./chunk-VUVQO3LF.js";
|
|
31
30
|
import {
|
|
32
31
|
outputAgentError
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-GGP5R3FU.js";
|
|
32
|
+
} from "./chunk-X5UROEGN.js";
|
|
33
|
+
import "./chunk-Q77ALSXR.js";
|
|
36
34
|
import "./chunk-MYWLF3BZ.js";
|
|
37
35
|
import {
|
|
38
36
|
getCommandName
|
|
39
37
|
} from "./chunk-LN6B7ZI3.js";
|
|
40
38
|
import "./chunk-P4QNYOFB.js";
|
|
39
|
+
import "./chunk-2RVK3DDN.js";
|
|
41
40
|
import {
|
|
42
41
|
output_manager_default
|
|
43
42
|
} from "./chunk-Z5SBJH6L.js";
|
|
43
|
+
import "./chunk-GGP5R3FU.js";
|
|
44
44
|
import {
|
|
45
45
|
require_source
|
|
46
46
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
printRouteConfig,
|
|
20
20
|
routingRuleToCurrentRoute,
|
|
21
21
|
runInteractiveEditLoop
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-F57GYOKZ.js";
|
|
23
23
|
import {
|
|
24
24
|
getRouteVersions
|
|
25
25
|
} from "./chunk-AHU7WNL2.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
resolveRoute,
|
|
32
32
|
shellQuoteRouteIdentifierForSuggestion,
|
|
33
33
|
withGlobalFlags
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JJKW6J63.js";
|
|
35
35
|
import {
|
|
36
36
|
editSubcommand
|
|
37
37
|
} from "./chunk-IB56QKCM.js";
|
|
@@ -40,21 +40,21 @@ import {
|
|
|
40
40
|
} from "./chunk-64IF634X.js";
|
|
41
41
|
import "./chunk-VXYGCOKL.js";
|
|
42
42
|
import "./chunk-QH7WYDEP.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-Q77ALSXR.js";
|
|
43
|
+
import "./chunk-VUVQO3LF.js";
|
|
45
44
|
import {
|
|
46
45
|
outputAgentError
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-GGP5R3FU.js";
|
|
46
|
+
} from "./chunk-X5UROEGN.js";
|
|
47
|
+
import "./chunk-Q77ALSXR.js";
|
|
50
48
|
import "./chunk-MYWLF3BZ.js";
|
|
51
49
|
import {
|
|
52
50
|
getCommandName
|
|
53
51
|
} from "./chunk-LN6B7ZI3.js";
|
|
54
52
|
import "./chunk-P4QNYOFB.js";
|
|
53
|
+
import "./chunk-2RVK3DDN.js";
|
|
55
54
|
import {
|
|
56
55
|
output_manager_default
|
|
57
56
|
} from "./chunk-Z5SBJH6L.js";
|
|
57
|
+
import "./chunk-GGP5R3FU.js";
|
|
58
58
|
import {
|
|
59
59
|
require_source
|
|
60
60
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
parseSubcommandArgs,
|
|
18
18
|
resolveRoute,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JJKW6J63.js";
|
|
21
21
|
import {
|
|
22
22
|
enableSubcommand
|
|
23
23
|
} from "./chunk-IB56QKCM.js";
|
|
@@ -26,21 +26,21 @@ import {
|
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
28
|
import "./chunk-QH7WYDEP.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-Q77ALSXR.js";
|
|
29
|
+
import "./chunk-VUVQO3LF.js";
|
|
31
30
|
import {
|
|
32
31
|
outputAgentError
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-GGP5R3FU.js";
|
|
32
|
+
} from "./chunk-X5UROEGN.js";
|
|
33
|
+
import "./chunk-Q77ALSXR.js";
|
|
36
34
|
import "./chunk-MYWLF3BZ.js";
|
|
37
35
|
import {
|
|
38
36
|
getCommandName
|
|
39
37
|
} from "./chunk-LN6B7ZI3.js";
|
|
40
38
|
import "./chunk-P4QNYOFB.js";
|
|
39
|
+
import "./chunk-2RVK3DDN.js";
|
|
41
40
|
import {
|
|
42
41
|
output_manager_default
|
|
43
42
|
} from "./chunk-Z5SBJH6L.js";
|
|
43
|
+
import "./chunk-GGP5R3FU.js";
|
|
44
44
|
import {
|
|
45
45
|
require_source
|
|
46
46
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -10,10 +10,11 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
require_execa,
|
|
12
12
|
require_isexe
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CT3OCODK.js";
|
|
14
14
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
Headers,
|
|
16
|
+
toNodeReadable
|
|
17
|
+
} from "./chunk-2RVK3DDN.js";
|
|
17
18
|
import {
|
|
18
19
|
output_manager_default,
|
|
19
20
|
require_dist as require_dist2
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
} from "./chunk-TZ2YI2VH.js";
|
|
27
28
|
|
|
28
29
|
// ../../node_modules/.pnpm/which@3.0.0/node_modules/which/lib/index.js
|
|
29
|
-
var
|
|
30
|
+
var require_lib = __commonJS2({
|
|
30
31
|
"../../node_modules/.pnpm/which@3.0.0/node_modules/which/lib/index.js"(exports2, module2) {
|
|
31
32
|
var isexe = require_isexe();
|
|
32
33
|
var { join, delimiter, sep, posix } = __require("path");
|
|
@@ -1256,18 +1257,17 @@ var import_blob_polyfill = __toESM(require_Blob());
|
|
|
1256
1257
|
});
|
|
1257
1258
|
|
|
1258
1259
|
// src/util/extension/exec.ts
|
|
1259
|
-
var import_which = __toESM3(
|
|
1260
|
+
var import_which = __toESM3(require_lib(), 1);
|
|
1260
1261
|
var import_execa = __toESM3(require_execa(), 1);
|
|
1261
1262
|
var import_async_listen = __toESM3(require_dist3(), 1);
|
|
1262
1263
|
import { dirname } from "path";
|
|
1263
1264
|
import { scanParentDirs, walkParentDirs } from "@vercel/build-utils";
|
|
1264
1265
|
|
|
1265
1266
|
// src/util/extension/proxy.ts
|
|
1266
|
-
var import_node_fetch = __toESM3(require_lib(), 1);
|
|
1267
|
-
var import_node_utils = __toESM3(require_dist4(), 1);
|
|
1268
1267
|
import { createServer } from "http";
|
|
1268
|
+
var import_node_utils = __toESM3(require_dist4(), 1);
|
|
1269
1269
|
var toHeaders = (0, import_node_utils.buildToHeaders)({
|
|
1270
|
-
Headers
|
|
1270
|
+
Headers
|
|
1271
1271
|
});
|
|
1272
1272
|
function createProxy(client) {
|
|
1273
1273
|
return createServer(async (req, res) => {
|
|
@@ -1278,6 +1278,7 @@ function createProxy(client) {
|
|
|
1278
1278
|
headers,
|
|
1279
1279
|
method: req.method,
|
|
1280
1280
|
body: req.method === "GET" || req.method === "HEAD" ? void 0 : req,
|
|
1281
|
+
redirect: "manual",
|
|
1281
1282
|
useCurrentTeam: false,
|
|
1282
1283
|
json: false
|
|
1283
1284
|
});
|
|
@@ -1288,7 +1289,11 @@ function createProxy(client) {
|
|
|
1288
1289
|
delete outgoingHeaders["content-encoding"];
|
|
1289
1290
|
delete outgoingHeaders["content-length"];
|
|
1290
1291
|
(0, import_node_utils.mergeIntoServerResponse)(outgoingHeaders, res);
|
|
1291
|
-
fetchRes.body
|
|
1292
|
+
if (fetchRes.body) {
|
|
1293
|
+
toNodeReadable(fetchRes.body).pipe(res);
|
|
1294
|
+
} else {
|
|
1295
|
+
res.end();
|
|
1296
|
+
}
|
|
1292
1297
|
} catch (err) {
|
|
1293
1298
|
output_manager_default.prettyError(err);
|
|
1294
1299
|
if (!res.headersSent) {
|
|
@@ -9,26 +9,26 @@ import {
|
|
|
9
9
|
getRoutes,
|
|
10
10
|
parseSubcommandArgs,
|
|
11
11
|
withGlobalFlags
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JJKW6J63.js";
|
|
13
13
|
import {
|
|
14
14
|
exportSubcommand
|
|
15
15
|
} from "./chunk-IB56QKCM.js";
|
|
16
16
|
import "./chunk-QH7WYDEP.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-Q77ALSXR.js";
|
|
17
|
+
import "./chunk-VUVQO3LF.js";
|
|
19
18
|
import {
|
|
20
19
|
outputAgentError
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-GGP5R3FU.js";
|
|
20
|
+
} from "./chunk-X5UROEGN.js";
|
|
21
|
+
import "./chunk-Q77ALSXR.js";
|
|
24
22
|
import "./chunk-MYWLF3BZ.js";
|
|
25
23
|
import {
|
|
26
24
|
getCommandName
|
|
27
25
|
} from "./chunk-LN6B7ZI3.js";
|
|
28
26
|
import "./chunk-P4QNYOFB.js";
|
|
27
|
+
import "./chunk-2RVK3DDN.js";
|
|
29
28
|
import {
|
|
30
29
|
output_manager_default
|
|
31
30
|
} from "./chunk-Z5SBJH6L.js";
|
|
31
|
+
import "./chunk-GGP5R3FU.js";
|
|
32
32
|
import "./chunk-S7KYDPEM.js";
|
|
33
33
|
import "./chunk-TZ2YI2VH.js";
|
|
34
34
|
|
|
@@ -0,0 +1,99 @@
|
|
|
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 "./chunk-TZ2YI2VH.js";
|
|
8
|
+
|
|
9
|
+
// src/util/fetch-proxy.ts
|
|
10
|
+
import { Agent, ProxyAgent } from "undici";
|
|
11
|
+
var DEFAULT_PORTS = {
|
|
12
|
+
"http:": 80,
|
|
13
|
+
"https:": 443
|
|
14
|
+
};
|
|
15
|
+
function getEnv(name) {
|
|
16
|
+
return process.env[name.toLowerCase()] || process.env[name.toUpperCase()];
|
|
17
|
+
}
|
|
18
|
+
function normalizeProxyUrl(value) {
|
|
19
|
+
const proxyUrl = value.includes("://") ? value : `http://${value}`;
|
|
20
|
+
const protocol = new URL(proxyUrl).protocol;
|
|
21
|
+
if (protocol !== "http:" && protocol !== "https:") {
|
|
22
|
+
throw new TypeError(`Unsupported proxy protocol: ${protocol}`);
|
|
23
|
+
}
|
|
24
|
+
return proxyUrl;
|
|
25
|
+
}
|
|
26
|
+
var EnvProxyDispatcher = class {
|
|
27
|
+
constructor(options = {}) {
|
|
28
|
+
this.noProxyValue = "";
|
|
29
|
+
this.noProxyEntries = [];
|
|
30
|
+
const createProxyAgent = options.createProxyAgent || ((url) => new ProxyAgent(url));
|
|
31
|
+
const allProxy = getEnv("all_proxy");
|
|
32
|
+
const httpProxy = getEnv("http_proxy") || allProxy;
|
|
33
|
+
const httpsProxy = getEnv("https_proxy") || httpProxy || allProxy;
|
|
34
|
+
this.directAgent = options.directAgent || new Agent();
|
|
35
|
+
this.httpAgent = httpProxy ? createProxyAgent(normalizeProxyUrl(httpProxy)) : this.directAgent;
|
|
36
|
+
this.httpsAgent = httpsProxy ? createProxyAgent(normalizeProxyUrl(httpsProxy)) : this.httpAgent;
|
|
37
|
+
this.parseNoProxy();
|
|
38
|
+
}
|
|
39
|
+
dispatch(options, handler) {
|
|
40
|
+
const url = new URL(String(options.origin));
|
|
41
|
+
return this.getAgent(url).dispatch(options, handler);
|
|
42
|
+
}
|
|
43
|
+
async close() {
|
|
44
|
+
await Promise.all([...this.agents()].map((agent) => agent.close()));
|
|
45
|
+
}
|
|
46
|
+
async destroy(error) {
|
|
47
|
+
await Promise.all(
|
|
48
|
+
[...this.agents()].map((agent) => agent.destroy(error || null))
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
agents() {
|
|
52
|
+
return /* @__PURE__ */ new Set([this.directAgent, this.httpAgent, this.httpsAgent]);
|
|
53
|
+
}
|
|
54
|
+
getAgent(url) {
|
|
55
|
+
if (this.noProxyValue !== (getEnv("no_proxy") || "")) {
|
|
56
|
+
this.parseNoProxy();
|
|
57
|
+
}
|
|
58
|
+
const hostname = url.hostname.toLowerCase();
|
|
59
|
+
const port = Number.parseInt(url.port, 10) || DEFAULT_PORTS[url.protocol];
|
|
60
|
+
if (!this.shouldProxy(hostname, port)) {
|
|
61
|
+
return this.directAgent;
|
|
62
|
+
}
|
|
63
|
+
return url.protocol === "https:" ? this.httpsAgent : this.httpAgent;
|
|
64
|
+
}
|
|
65
|
+
shouldProxy(hostname, port) {
|
|
66
|
+
if (this.noProxyEntries.length === 0) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
if (this.noProxyValue === "*") {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
for (const entry of this.noProxyEntries) {
|
|
73
|
+
if (entry.port && entry.port !== port) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (!entry.hostname.startsWith(".") && !entry.hostname.startsWith("*")) {
|
|
77
|
+
if (hostname === entry.hostname) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
} else if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
parseNoProxy() {
|
|
87
|
+
this.noProxyValue = getEnv("no_proxy") || "";
|
|
88
|
+
this.noProxyEntries = this.noProxyValue.toLowerCase().split(/[,\s]/).filter(Boolean).map((value) => {
|
|
89
|
+
const parsed = value.match(/^(.+):(\d+)$/);
|
|
90
|
+
return {
|
|
91
|
+
hostname: parsed ? parsed[1] : value,
|
|
92
|
+
port: parsed ? Number.parseInt(parsed[2], 10) : 0
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
EnvProxyDispatcher
|
|
99
|
+
};
|
|
@@ -6,12 +6,12 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
emitAlertsScopeError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AWAUGLOM.js";
|
|
10
10
|
import {
|
|
11
11
|
handleValidationError,
|
|
12
12
|
outputError,
|
|
13
13
|
validateAllProjectMutualExclusivity
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U5FVI3MF.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
17
17
|
} from "./chunk-XPKWKPWA.js";
|
|
@@ -24,18 +24,16 @@ import {
|
|
|
24
24
|
} from "./chunk-QH7WYDEP.js";
|
|
25
25
|
import {
|
|
26
26
|
getScope
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MUDZFSZC.js";
|
|
28
28
|
import {
|
|
29
29
|
getLinkedProject,
|
|
30
30
|
getProjectByNameOrId
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-Q77ALSXR.js";
|
|
31
|
+
} from "./chunk-VUVQO3LF.js";
|
|
33
32
|
import {
|
|
34
33
|
buildCommandWithGlobalFlags,
|
|
35
34
|
outputAgentError
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-GGP5R3FU.js";
|
|
35
|
+
} from "./chunk-X5UROEGN.js";
|
|
36
|
+
import "./chunk-Q77ALSXR.js";
|
|
39
37
|
import {
|
|
40
38
|
getFlagsSpecification,
|
|
41
39
|
parseArguments,
|
|
@@ -47,9 +45,11 @@ import {
|
|
|
47
45
|
packageName
|
|
48
46
|
} from "./chunk-LN6B7ZI3.js";
|
|
49
47
|
import "./chunk-P4QNYOFB.js";
|
|
48
|
+
import "./chunk-2RVK3DDN.js";
|
|
50
49
|
import {
|
|
51
50
|
output_manager_default
|
|
52
51
|
} from "./chunk-Z5SBJH6L.js";
|
|
52
|
+
import "./chunk-GGP5R3FU.js";
|
|
53
53
|
import {
|
|
54
54
|
require_source
|
|
55
55
|
} from "./chunk-S7KYDPEM.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-AWAUGLOM.js";
|
|
10
10
|
import {
|
|
11
11
|
handleValidationError,
|
|
12
12
|
normalizeRepeatableStringFilters,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
validateOptionalIntegerRange,
|
|
16
16
|
validateTimeBound,
|
|
17
17
|
validateTimeOrder
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-U5FVI3MF.js";
|
|
19
19
|
import {
|
|
20
20
|
validateJsonOutput
|
|
21
21
|
} from "./chunk-XPKWKPWA.js";
|
|
@@ -26,21 +26,17 @@ import "./chunk-SGPBULVT.js";
|
|
|
26
26
|
import {
|
|
27
27
|
AGENT_REASON
|
|
28
28
|
} from "./chunk-QH7WYDEP.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import
|
|
31
|
-
|
|
29
|
+
import "./chunk-MUDZFSZC.js";
|
|
30
|
+
import {
|
|
31
|
+
table
|
|
32
|
+
} from "./chunk-LYCSVJIX.js";
|
|
33
|
+
import "./chunk-VUVQO3LF.js";
|
|
32
34
|
import {
|
|
33
35
|
buildCommandWithGlobalFlags,
|
|
34
36
|
outputAgentError,
|
|
35
37
|
shouldEmitNonInteractiveCommandError
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import {
|
|
39
|
-
require_ms
|
|
40
|
-
} from "./chunk-GGP5R3FU.js";
|
|
41
|
-
import {
|
|
42
|
-
table
|
|
43
|
-
} from "./chunk-LYCSVJIX.js";
|
|
38
|
+
} from "./chunk-X5UROEGN.js";
|
|
39
|
+
import "./chunk-Q77ALSXR.js";
|
|
44
40
|
import {
|
|
45
41
|
getFlagsSpecification,
|
|
46
42
|
parseArguments,
|
|
@@ -50,9 +46,13 @@ import {
|
|
|
50
46
|
isAPIError
|
|
51
47
|
} from "./chunk-LN6B7ZI3.js";
|
|
52
48
|
import "./chunk-P4QNYOFB.js";
|
|
49
|
+
import "./chunk-2RVK3DDN.js";
|
|
53
50
|
import {
|
|
54
51
|
output_manager_default
|
|
55
52
|
} from "./chunk-Z5SBJH6L.js";
|
|
53
|
+
import {
|
|
54
|
+
require_ms
|
|
55
|
+
} from "./chunk-GGP5R3FU.js";
|
|
56
56
|
import {
|
|
57
57
|
require_source
|
|
58
58
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
validateIntegerRangeWithDefault,
|
|
13
13
|
validateTimeBound,
|
|
14
14
|
validateTimeOrder
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-U5FVI3MF.js";
|
|
16
16
|
import {
|
|
17
17
|
getCommandFlags
|
|
18
18
|
} from "./chunk-EOZFDJSY.js";
|
|
@@ -24,15 +24,13 @@ import {
|
|
|
24
24
|
} from "./chunk-56AJHIQC.js";
|
|
25
25
|
import {
|
|
26
26
|
getScope
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MUDZFSZC.js";
|
|
28
28
|
import {
|
|
29
29
|
getLinkedProject,
|
|
30
30
|
getProjectByNameOrId
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-VUVQO3LF.js";
|
|
32
|
+
import "./chunk-X5UROEGN.js";
|
|
32
33
|
import "./chunk-Q77ALSXR.js";
|
|
33
|
-
import "./chunk-NHGCQRK5.js";
|
|
34
|
-
import "./chunk-N2T234LO.js";
|
|
35
|
-
import "./chunk-GGP5R3FU.js";
|
|
36
34
|
import {
|
|
37
35
|
getFlagsSpecification,
|
|
38
36
|
parseArguments,
|
|
@@ -44,9 +42,11 @@ import {
|
|
|
44
42
|
isAPIError
|
|
45
43
|
} from "./chunk-LN6B7ZI3.js";
|
|
46
44
|
import "./chunk-P4QNYOFB.js";
|
|
45
|
+
import "./chunk-2RVK3DDN.js";
|
|
47
46
|
import {
|
|
48
47
|
output_manager_default
|
|
49
48
|
} from "./chunk-Z5SBJH6L.js";
|
|
49
|
+
import "./chunk-GGP5R3FU.js";
|
|
50
50
|
import {
|
|
51
51
|
require_source
|
|
52
52
|
} from "./chunk-S7KYDPEM.js";
|