vercel 51.2.1 → 51.4.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-RNQLGEYS.js +180 -0
- package/dist/chunks/{chunk-XAVGWINL.js → chunk-3GDNTBCE.js} +44 -13
- package/dist/chunks/{chunk-SSOWPEZT.js → chunk-4DR2FV6O.js} +2 -2
- package/dist/chunks/{chunk-Q6BEDVOU.js → chunk-4PQA6H63.js} +1 -1
- package/dist/chunks/{chunk-IS2HEMF4.js → chunk-4RBF6ZDU.js} +4 -2
- package/dist/chunks/{chunk-7S7GE4BN.js → chunk-537JTK2U.js} +216 -523
- package/dist/chunks/{chunk-K5XJCQQO.js → chunk-5NTBJ33M.js} +1 -1
- package/dist/chunks/{chunk-5YQCJTZI.js → chunk-5VKKTHMP.js} +6 -6
- package/dist/chunks/{chunk-W6FW7CCT.js → chunk-6C33Y3DC.js} +13 -8
- package/dist/chunks/{chunk-5WHDQH2U.js → chunk-7MF47FW3.js} +1 -1
- package/dist/chunks/chunk-7ZDERWUW.js +167 -0
- package/dist/chunks/{chunk-RK4TKB3D.js → chunk-AUSDBXUD.js} +7 -5
- package/dist/chunks/{chunk-BUBUVE23.js → chunk-BJQTGP42.js} +4 -2
- package/dist/chunks/{chunk-57RLFBKC.js → chunk-BRQBLRFB.js} +1 -1
- package/dist/chunks/chunk-CGTXAXZ4.js +484 -0
- package/dist/chunks/{chunk-BQUQ5F7R.js → chunk-CRZM5WM2.js} +4 -2
- package/dist/chunks/{chunk-VTQNSCUG.js → chunk-D2D4FJ6S.js} +8 -6
- package/dist/chunks/{chunk-G6MVEB4W.js → chunk-DKFFXOHJ.js} +3 -3
- package/dist/chunks/chunk-DVQ4SIWF.js +183 -0
- package/dist/chunks/{chunk-A4NVECX5.js → chunk-ECRBC4HL.js} +4 -581
- package/dist/chunks/{chunk-L2BKVTHL.js → chunk-G6RXZLQ2.js} +2 -2
- package/dist/chunks/{chunk-4YZKA4FN.js → chunk-GE6G37P4.js} +1 -1
- package/dist/chunks/{chunk-NELCIT4M.js → chunk-GLDQ23LD.js} +1 -1
- package/dist/chunks/{chunk-QQTF2FEY.js → chunk-HNU5CXW4.js} +9 -5
- package/dist/chunks/chunk-HQXVCOH6.js +139 -0
- package/dist/chunks/{chunk-3FMFPD7F.js → chunk-L2JUC7NX.js} +2 -2
- package/dist/chunks/{chunk-Y5YCSB6X.js → chunk-LDXYSGPZ.js} +2 -2
- package/dist/chunks/{chunk-U5J73OA3.js → chunk-N45K6NXC.js} +1 -1
- package/dist/chunks/{chunk-5DLMAFQU.js → chunk-NKJC5SI4.js} +6 -4
- package/dist/chunks/{chunk-FSOFFJDV.js → chunk-O7SQKNIT.js} +1 -1
- package/dist/chunks/{chunk-XRR5HDB3.js → chunk-P56KWLXY.js} +2 -2
- package/dist/chunks/{chunk-EHZKWVK2.js → chunk-PBGN54ZH.js} +5 -5
- package/dist/chunks/chunk-RFMC2QXQ.js +602 -0
- package/dist/chunks/{chunk-W5K4YCTI.js → chunk-RJD5NYGF.js} +5 -3
- package/dist/chunks/{chunk-WXNT7WJO.js → chunk-TAOVG4PS.js} +49 -4
- package/dist/chunks/{chunk-4EGCWWSR.js → chunk-UJ4JXXED.js} +143 -16
- package/dist/chunks/{chunk-2IAZZEVQ.js → chunk-UWKTUK3W.js} +4 -2
- package/dist/chunks/{chunk-VE7MY76H.js → chunk-VGWGLBUC.js} +4 -2
- package/dist/chunks/{compile-vercel-config-2GV46IDP.js → compile-vercel-config-ZVY7LBE3.js} +4 -2
- package/dist/chunks/{delete-PXMYSQGR.js → delete-SKTJMJNP.js} +7 -5
- package/dist/chunks/{disable-2ZQ4OG4A.js → disable-AG7I6DPV.js} +7 -5
- package/dist/chunks/{discard-FQZTZ5HK.js → discard-LUK6LBLT.js} +7 -5
- package/dist/chunks/{edit-F3J7Q5SZ.js → edit-3BR5HP3U.js} +8 -6
- package/dist/chunks/{enable-ZW4W33H5.js → enable-4JNLOKSM.js} +7 -5
- package/dist/chunks/{export-ZZV6ESIW.js → export-YLZ6QSHG.js} +7 -5
- package/dist/chunks/inspect-HUJLUQAV.js +353 -0
- package/dist/chunks/{list-SSIMVNNN.js → list-EPU4SB3E.js} +10 -7
- package/dist/chunks/{list-VFPV4TUW.js → list-RMA56KYZ.js} +115 -85
- package/dist/chunks/ls-7HHDYE6F.js +114 -0
- package/dist/chunks/{publish-3K76MNS3.js → publish-6YE4OUDI.js} +7 -5
- package/dist/chunks/{query-CY7JJSSX.js → query-VNBKOI65.js} +15 -12
- package/dist/chunks/{reorder-6L7MENN5.js → reorder-VFM23ESC.js} +7 -5
- package/dist/chunks/{restore-XUYXOJQ2.js → restore-VX34SXVF.js} +7 -5
- package/dist/chunks/rm-5KXF2PY3.js +164 -0
- package/dist/chunks/rule-inspect-JG7AE5TI.js +142 -0
- package/dist/chunks/rules-XRJBT22L.js +83 -0
- package/dist/chunks/{schema-G5FSLZVA.js → schema-FUOKCZTW.js} +9 -7
- package/dist/chunks/{types-A4EAQ6F6.js → types-QNN5CDCB.js} +6 -4
- package/dist/chunks/update-4FMWTIJK.js +196 -0
- package/dist/commands/build/index.js +36 -43
- package/dist/commands/deploy/index.js +171 -32
- package/dist/commands/dev/index.js +36 -31
- package/dist/commands/env/index.js +32 -27
- package/dist/commands/link/index.js +21 -17
- package/dist/commands/list/index.js +14 -11
- package/dist/commands-bulk.js +1640 -884
- package/dist/index.js +28 -24
- package/dist/version.mjs +1 -1
- package/package.json +17 -17
|
@@ -6,23 +6,23 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
writeProjectSettings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BRQBLRFB.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureLink
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AUSDBXUD.js";
|
|
13
13
|
import {
|
|
14
14
|
pullCommand
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RJD5NYGF.js";
|
|
16
16
|
import {
|
|
17
17
|
help
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LDXYSGPZ.js";
|
|
19
19
|
import {
|
|
20
20
|
VERCEL_DIR,
|
|
21
21
|
VERCEL_DIR_PROJECT,
|
|
22
22
|
envPullCommandLogic,
|
|
23
23
|
humanizePath,
|
|
24
24
|
parseTarget
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-537JTK2U.js";
|
|
26
26
|
import {
|
|
27
27
|
TelemetryClient
|
|
28
28
|
} from "./chunk-U3WLEFHU.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
getFlagsSpecification,
|
|
34
34
|
parseArguments,
|
|
35
35
|
printError
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
37
37
|
import {
|
|
38
38
|
emoji,
|
|
39
39
|
output_manager_default,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-V5P25P7F.js";
|
|
10
10
|
import {
|
|
11
11
|
autoInstallAgentTooling
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O7SQKNIT.js";
|
|
13
13
|
import {
|
|
14
14
|
ua_default
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4PQA6H63.js";
|
|
16
16
|
import {
|
|
17
17
|
getLocalPathConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NKJC5SI4.js";
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
21
21
|
VERCEL_CONFIG_EXTENSIONS,
|
|
@@ -41,18 +41,20 @@ import {
|
|
|
41
41
|
useKeypress,
|
|
42
42
|
usePrefix,
|
|
43
43
|
useState
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-537JTK2U.js";
|
|
45
45
|
import {
|
|
46
46
|
require_load_json_file,
|
|
47
47
|
require_write_json_file
|
|
48
48
|
} from "./chunk-U3WLEFHU.js";
|
|
49
49
|
import {
|
|
50
|
-
APIError,
|
|
51
|
-
NowError,
|
|
52
|
-
getCommandName,
|
|
53
50
|
printError,
|
|
54
51
|
require_strip_ansi
|
|
55
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
53
|
+
import {
|
|
54
|
+
APIError,
|
|
55
|
+
NowError,
|
|
56
|
+
getCommandName
|
|
57
|
+
} from "./chunk-ECRBC4HL.js";
|
|
56
58
|
import {
|
|
57
59
|
emoji,
|
|
58
60
|
link_default,
|
|
@@ -2577,6 +2579,9 @@ Are you sure you want to proceed?`;
|
|
|
2577
2579
|
const res = await this._fetch(url, opts);
|
|
2578
2580
|
printIndications(res);
|
|
2579
2581
|
if (!res.ok) {
|
|
2582
|
+
if (opts.redirect === "manual" && res.status >= 300 && res.status < 400) {
|
|
2583
|
+
return res;
|
|
2584
|
+
}
|
|
2580
2585
|
const error = await responseError(res);
|
|
2581
2586
|
if (isSAMLError(error) && error.teamId) {
|
|
2582
2587
|
try {
|
|
@@ -0,0 +1,167 @@
|
|
|
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
|
+
outputError
|
|
9
|
+
} from "./chunk-HTOH3MSD.js";
|
|
10
|
+
import {
|
|
11
|
+
getScope
|
|
12
|
+
} from "./chunk-L2JUC7NX.js";
|
|
13
|
+
import {
|
|
14
|
+
AGENT_REASON
|
|
15
|
+
} from "./chunk-E3NE4SKN.js";
|
|
16
|
+
import {
|
|
17
|
+
getLinkedProject,
|
|
18
|
+
getProjectByNameOrId
|
|
19
|
+
} from "./chunk-537JTK2U.js";
|
|
20
|
+
import {
|
|
21
|
+
buildCommandWithGlobalFlags,
|
|
22
|
+
outputAgentError
|
|
23
|
+
} from "./chunk-CGTXAXZ4.js";
|
|
24
|
+
import {
|
|
25
|
+
ProjectNotFound,
|
|
26
|
+
isAPIError
|
|
27
|
+
} from "./chunk-ECRBC4HL.js";
|
|
28
|
+
|
|
29
|
+
// src/commands/alerts/resolve-alerts-scope.ts
|
|
30
|
+
function emitAlertsScopeError(client, jsonOutput, code, message, agent) {
|
|
31
|
+
outputAgentError(
|
|
32
|
+
client,
|
|
33
|
+
{
|
|
34
|
+
status: "error",
|
|
35
|
+
reason: agent.reason,
|
|
36
|
+
message,
|
|
37
|
+
hint: agent.hint,
|
|
38
|
+
next: agent.next
|
|
39
|
+
},
|
|
40
|
+
1
|
|
41
|
+
);
|
|
42
|
+
return outputError(client, jsonOutput, code, message);
|
|
43
|
+
}
|
|
44
|
+
async function resolveAlertsScope(client, opts) {
|
|
45
|
+
if (opts.all || opts.project) {
|
|
46
|
+
const { team } = await getScope(client);
|
|
47
|
+
if (!team) {
|
|
48
|
+
const msg = "No team context found. Run `vercel switch` to select a team, or use `vercel link` in a project directory.";
|
|
49
|
+
return emitAlertsScopeError(client, opts.jsonOutput, "NO_TEAM", msg, {
|
|
50
|
+
reason: AGENT_REASON.MISSING_SCOPE,
|
|
51
|
+
hint: "Select a team scope before using --project or --all with alerts.",
|
|
52
|
+
next: [
|
|
53
|
+
{
|
|
54
|
+
command: buildCommandWithGlobalFlags(client.argv, "whoami"),
|
|
55
|
+
when: "See current user and team"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
command: buildCommandWithGlobalFlags(client.argv, "teams switch"),
|
|
59
|
+
when: "Switch to a team that owns the project"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (opts.all) {
|
|
65
|
+
return {
|
|
66
|
+
teamId: team.id
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
let projectResult;
|
|
70
|
+
try {
|
|
71
|
+
projectResult = await getProjectByNameOrId(
|
|
72
|
+
client,
|
|
73
|
+
opts.project,
|
|
74
|
+
team.id
|
|
75
|
+
);
|
|
76
|
+
} catch (err) {
|
|
77
|
+
if (isAPIError(err)) {
|
|
78
|
+
const msg = err.serverMessage || (err.status === 403 ? `You do not have permission to access project "${opts.project}" in team "${team.slug}".` : `API error (${err.status}).`);
|
|
79
|
+
const reason = err.status === 401 ? "not_authorized" : err.status === 403 ? "forbidden" : AGENT_REASON.API_ERROR;
|
|
80
|
+
return emitAlertsScopeError(
|
|
81
|
+
client,
|
|
82
|
+
opts.jsonOutput,
|
|
83
|
+
err.code || "API_ERROR",
|
|
84
|
+
msg,
|
|
85
|
+
{
|
|
86
|
+
reason,
|
|
87
|
+
next: [
|
|
88
|
+
{
|
|
89
|
+
command: buildCommandWithGlobalFlags(
|
|
90
|
+
client.argv,
|
|
91
|
+
"alerts rules ls --project <name_or_id>"
|
|
92
|
+
),
|
|
93
|
+
when: "Retry with a project you can access (replace <name_or_id>)"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
throw err;
|
|
100
|
+
}
|
|
101
|
+
if (projectResult instanceof ProjectNotFound) {
|
|
102
|
+
const msg = `Project "${opts.project}" was not found in team "${team.slug}".`;
|
|
103
|
+
return emitAlertsScopeError(
|
|
104
|
+
client,
|
|
105
|
+
opts.jsonOutput,
|
|
106
|
+
"PROJECT_NOT_FOUND",
|
|
107
|
+
msg,
|
|
108
|
+
{
|
|
109
|
+
reason: AGENT_REASON.NOT_FOUND,
|
|
110
|
+
next: [
|
|
111
|
+
{
|
|
112
|
+
command: buildCommandWithGlobalFlags(
|
|
113
|
+
client.argv,
|
|
114
|
+
"alerts rules ls"
|
|
115
|
+
),
|
|
116
|
+
when: "List rules in the current linked project or adjust --project"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
teamId: team.id,
|
|
124
|
+
projectId: projectResult.id
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const linkedProject = await getLinkedProject(client);
|
|
128
|
+
if (linkedProject.status === "error") {
|
|
129
|
+
return linkedProject.exitCode;
|
|
130
|
+
}
|
|
131
|
+
if (linkedProject.status === "not_linked") {
|
|
132
|
+
const msg = "No linked project found. Run `vercel link` to link a project, or use --project <name> or --all.";
|
|
133
|
+
return emitAlertsScopeError(client, opts.jsonOutput, "NOT_LINKED", msg, {
|
|
134
|
+
reason: AGENT_REASON.NOT_LINKED,
|
|
135
|
+
hint: "Agents should pass --project or --all when no .vercel link exists in --cwd.",
|
|
136
|
+
next: [
|
|
137
|
+
{
|
|
138
|
+
command: buildCommandWithGlobalFlags(client.argv, "link"),
|
|
139
|
+
when: "Link this directory to a Vercel project"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
command: buildCommandWithGlobalFlags(
|
|
143
|
+
client.argv,
|
|
144
|
+
"alerts rules ls --project <name_or_id>"
|
|
145
|
+
),
|
|
146
|
+
when: "List rules for a project without linking (replace <name_or_id>)"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
command: buildCommandWithGlobalFlags(
|
|
150
|
+
client.argv,
|
|
151
|
+
"alerts rules ls --all"
|
|
152
|
+
),
|
|
153
|
+
when: "List team-wide rules without a linked project"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
teamId: linkedProject.org.id,
|
|
160
|
+
projectId: linkedProject.project.id
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export {
|
|
165
|
+
emitAlertsScopeError,
|
|
166
|
+
resolveAlertsScope
|
|
167
|
+
};
|
|
@@ -6,18 +6,20 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
setupAndLink
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-D2D4FJ6S.js";
|
|
10
10
|
import {
|
|
11
|
-
buildCommandWithYes,
|
|
12
11
|
getLinkedProject,
|
|
13
|
-
outputActionRequired,
|
|
14
12
|
param,
|
|
15
13
|
resolveProjectCwd
|
|
16
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-537JTK2U.js";
|
|
15
|
+
import {
|
|
16
|
+
buildCommandWithYes,
|
|
17
|
+
outputActionRequired
|
|
18
|
+
} from "./chunk-CGTXAXZ4.js";
|
|
17
19
|
import {
|
|
18
20
|
getCommandName,
|
|
19
21
|
getCommandNamePlain
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ECRBC4HL.js";
|
|
21
23
|
import {
|
|
22
24
|
output_manager_default
|
|
23
25
|
} from "./chunk-ZQKJVHXY.js";
|
|
@@ -6,9 +6,11 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
confirmOption,
|
|
9
|
-
packageName,
|
|
10
9
|
yesOption
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
11
|
+
import {
|
|
12
|
+
packageName
|
|
13
|
+
} from "./chunk-ECRBC4HL.js";
|
|
12
14
|
|
|
13
15
|
// src/commands/dev/command.ts
|
|
14
16
|
var devCommand = {
|