vercel 59.11.7 → 59.13.1
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-WU2QYHYL.js → add-7OX6PBFD.js} +3 -3
- package/dist/chunks/add-7RYUFBZ3.js +221 -0
- package/dist/chunks/{add-KSJQYR5C.js → add-FX5WWUXU.js} +3 -3
- package/dist/chunks/{build-F3J6FLPD.js → build-Q3TR46K4.js} +3 -3
- package/dist/chunks/{chunk-N4QHMXOO.js → chunk-2GXA4NGG.js} +3 -2
- package/dist/chunks/{chunk-CNDPIHY5.js → chunk-2QFYCMKN.js} +24 -19
- package/dist/chunks/{chunk-7KROIXQM.js → chunk-3FIEWWMM.js} +3 -3
- package/dist/chunks/{chunk-OIH6FP5Y.js → chunk-4TUMNBEE.js} +2 -2
- package/dist/chunks/{chunk-FVT74RZ5.js → chunk-5JDX6XOS.js} +11 -11
- package/dist/chunks/{chunk-WL6QYSGD.js → chunk-5ORMFNXL.js} +586 -41
- package/dist/chunks/{chunk-C762AAVU.js → chunk-66LPM47Z.js} +4 -4
- package/dist/chunks/{chunk-4IVSM24H.js → chunk-76CB3CF2.js} +1 -1
- package/dist/chunks/{chunk-2TSBB22D.js → chunk-7F5RNOTP.js} +2 -2
- package/dist/chunks/{chunk-UARGTFCT.js → chunk-7NRNFV77.js} +1 -1
- package/dist/chunks/chunk-DQ23J2KG.js +305 -0
- package/dist/chunks/{chunk-XM3LOQIX.js → chunk-EDMW7SBH.js} +76 -92
- package/dist/chunks/{chunk-Z7JWYFOY.js → chunk-EEV2LKFC.js} +1 -1
- package/dist/chunks/{chunk-DSTNNQVV.js → chunk-EIBH6FCR.js} +3 -3
- package/dist/chunks/chunk-F4S6Q4OY.js +79 -0
- package/dist/chunks/chunk-GDOUDU6O.js +74 -0
- package/dist/chunks/{chunk-DBYHS3CK.js → chunk-GQRG7VFK.js} +2 -2
- package/dist/chunks/{chunk-GCVXKRR5.js → chunk-HD4DR3DA.js} +1 -0
- package/dist/chunks/{chunk-DWIC7MRV.js → chunk-HKHXKSXQ.js} +1 -1
- package/dist/chunks/{chunk-ZBEECGFD.js → chunk-HM24ZWQL.js} +1 -1
- package/dist/chunks/{chunk-GHKJAK5V.js → chunk-IK6PC2JA.js} +4 -4
- package/dist/chunks/{chunk-A5JZS6ZN.js → chunk-IUC3TR3S.js} +1 -1
- package/dist/chunks/{chunk-VYC45Q4Z.js → chunk-JIK2FUMT.js} +1 -1
- package/dist/chunks/{chunk-TGNEG57M.js → chunk-KU2WCB6G.js} +110 -14
- package/dist/chunks/{chunk-FVNJTRCE.js → chunk-KXTXGYG7.js} +2 -2
- package/dist/chunks/{chunk-QOPTXV4G.js → chunk-L4H3DP65.js} +1 -1
- package/dist/chunks/{chunk-FL4JLNT2.js → chunk-LE5V7G2U.js} +2 -2
- package/dist/chunks/chunk-LVCCV2YJ.js +324 -0
- package/dist/chunks/{chunk-SHFNEZVI.js → chunk-MUGF3SGQ.js} +1 -1
- package/dist/chunks/{chunk-G3PXSXIB.js → chunk-N6HP5BLI.js} +5 -3
- package/dist/chunks/{chunk-EZQDYIVB.js → chunk-NSGRICJ2.js} +1 -1
- package/dist/chunks/{chunk-KJBZ5ZST.js → chunk-PIMIVJYK.js} +1 -0
- package/dist/chunks/{chunk-X7DBBZQD.js → chunk-QRFRS2JH.js} +1 -1
- package/dist/chunks/{chunk-PFM75KY3.js → chunk-QSJ6Q5QP.js} +3 -3
- package/dist/chunks/{chunk-XD4DCYMX.js → chunk-S3HYE6ZE.js} +2 -2
- package/dist/chunks/{chunk-QHS645AZ.js → chunk-SPRQ4IBQ.js} +3 -3
- package/dist/chunks/{chunk-NSOYO6JQ.js → chunk-T3NB7VQG.js} +6 -6
- package/dist/chunks/{chunk-PJXMXMCO.js → chunk-TLPHZ7M4.js} +2 -2
- package/dist/chunks/{chunk-EPOLDWRA.js → chunk-TOXZAP5I.js} +1 -1
- package/dist/chunks/{chunk-XIFATBH5.js → chunk-U4ZLWJQD.js} +4 -4
- package/dist/chunks/{chunk-CEDN47PH.js → chunk-UXKNSAP2.js} +1 -1
- package/dist/chunks/{chunk-GUU4Z2AQ.js → chunk-XEVKGAVI.js} +6 -6
- package/dist/chunks/{chunk-VT3Z7HF6.js → chunk-Z6YZMXVN.js} +4 -4
- package/dist/chunks/{clear-XUQO4ZTK.js → clear-GIAFWC5X.js} +3 -3
- package/dist/chunks/{compile-vercel-config-D3ARNHTN.js → compile-vercel-config-QJGEQKK4.js} +2 -2
- package/dist/chunks/{config-MEDLXUVM.js → config-AOA2HS4R.js} +3 -3
- package/dist/chunks/{config-37OAE7QJ.js → config-HYBSW733.js} +7 -7
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{delete-VSWDZ2SW.js → delete-BBFI75A2.js} +5 -5
- package/dist/chunks/{delete-3N3YZZOF.js → delete-DJ7RI2NX.js} +5 -5
- package/dist/chunks/{detect-services-TESZCQWG.js → detect-services-Q2DVXVMH.js} +6 -6
- package/dist/chunks/{disable-A4FLFMC7.js → disable-P7X2V5LS.js} +5 -5
- package/dist/chunks/{discard-CHGFULBZ.js → discard-JNQBH4XU.js} +5 -5
- package/dist/chunks/{edit-JZ63AJYQ.js → edit-AXQEMBQC.js} +5 -5
- package/dist/chunks/{edit-MHSYAPDR.js → edit-BO3GXEKA.js} +6 -6
- package/dist/chunks/{enable-KD46SEC5.js → enable-NC4BN7EQ.js} +5 -5
- package/dist/chunks/{export-42QZLBSN.js → export-HQ42UNYD.js} +5 -5
- package/dist/chunks/{image-GP4H73A2.js → image-UM4FQYOA.js} +3 -3
- package/dist/chunks/{import-builders-6TBLMPL2.js → import-builders-F6SWNCHK.js} +4 -4
- package/dist/chunks/{inspect-MUVK6MMT.js → inspect-EXEA57MP.js} +3 -3
- package/dist/chunks/{inspect-5FMWMY3C.js → inspect-H3M3XJNB.js} +10 -10
- package/dist/chunks/{inspect-QFXAOUL4.js → inspect-MTNQOLNM.js} +3 -3
- package/dist/chunks/{inspect-RNTSYM6O.js → inspect-PYFF2K4X.js} +3 -3
- package/dist/chunks/{inspect-Q3DWW7MC.js → inspect-XF324IQ2.js} +9 -9
- package/dist/chunks/{list-JRNWLSO5.js → list-4JHZJUBS.js} +2 -2
- package/dist/chunks/{list-IHHIPXEC.js → list-YEN54SGY.js} +6 -6
- package/dist/chunks/{list-XHD5DLEX.js → list-ZKD2O4D2.js} +7 -7
- package/dist/chunks/{login-PCT6KFWY.js → login-56KGZQI2.js} +3 -3
- package/dist/chunks/{ls-SVOHC3XW.js → ls-ELYVF6EU.js} +4 -4
- package/dist/chunks/{ls-PQZ2RIDX.js → ls-HZEMZY2R.js} +4 -4
- package/dist/chunks/{ls-TGHCCARZ.js → ls-IJW74NG3.js} +4 -4
- package/dist/chunks/{ls-GPEHEFCF.js → ls-OAGYLILX.js} +4 -4
- package/dist/chunks/{ls-VRIH5WA3.js → ls-QNTHMTIH.js} +7 -7
- package/dist/chunks/ls-WW5UFH5B.js +204 -0
- package/dist/chunks/{open-E7DEKYDU.js → open-D2E5TEKN.js} +5 -5
- package/dist/chunks/{permissions-JKOONWVL.js → permissions-CFUXWXSK.js} +4 -4
- package/dist/chunks/{publish-EDDELDE5.js → publish-BP4IUYNM.js} +5 -5
- package/dist/chunks/{pull-646WEVDE.js → pull-DL72B6RW.js} +7 -7
- package/dist/chunks/{push-LTNW5OVD.js → push-6YCS4YQW.js} +3 -3
- package/dist/chunks/{query-LU4N6KPO.js → query-7N3YB4LE.js} +7 -7
- package/dist/chunks/{reorder-22PKJMZP.js → reorder-YJN36TPT.js} +5 -5
- package/dist/chunks/{reply-SF2EZMVZ.js → reply-3U3O7LNG.js} +5 -5
- package/dist/chunks/{resolve-ZCZGXTOT.js → resolve-TT75WCWT.js} +5 -5
- package/dist/chunks/{restore-VJAWZXB4.js → restore-6UF6W23A.js} +5 -5
- package/dist/chunks/rm-3QIDFPVA.js +162 -0
- package/dist/chunks/{rm-WNPGTUBH.js → rm-6MJ7ZPXQ.js} +3 -3
- package/dist/chunks/{rm-KVEAJPRE.js → rm-JZRS2NBH.js} +3 -3
- package/dist/chunks/{rm-OSZ5FZUM.js → rm-KI4W2HYP.js} +7 -7
- package/dist/chunks/{rm-KN2QFCKO.js → rm-QCQXVB54.js} +3 -3
- package/dist/chunks/rule-inspect-PX73J52Q.js +123 -0
- package/dist/chunks/{rules-65LKAQ35.js → rules-Q334NBUC.js} +7 -7
- package/dist/chunks/schema-GRTOHAZO.js +381 -0
- package/dist/chunks/{schema-NXCW4M75.js → schema-YV3XYL3A.js} +6 -6
- package/dist/chunks/{set-FYJVKMPV.js → set-J3AQKL6V.js} +7 -7
- package/dist/chunks/{setup-and-link-KXPZE32P.js → setup-and-link-R5N7WJ46.js} +16 -16
- package/dist/chunks/{tags-ANIRP5E3.js → tags-2VLJ4VIH.js} +2 -2
- package/dist/chunks/update-VMS45VF2.js +224 -0
- package/dist/chunks/vlt-builder-importer-USCFHWPL.js +322 -0
- package/dist/commands/build/index.js +19 -19
- package/dist/commands/deploy/index.js +19 -19
- package/dist/commands/dev/index.js +25 -25
- package/dist/commands/env/index.js +12 -12
- package/dist/commands/link/index.js +12 -12
- package/dist/commands/list/index.js +5 -5
- package/dist/commands-bulk.js +11343 -4386
- package/dist/help.js +1 -1
- package/dist/index.js +28 -18
- package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +6 -0
- package/dist/version.mjs +1 -1
- package/package.json +52 -48
- package/dist/chunks/add-PERLOALD.js +0 -233
- package/dist/chunks/chunk-5GGUB4EO.js +0 -31
- package/dist/chunks/chunk-ARU7VBKR.js +0 -144
- package/dist/chunks/chunk-KEKR7OCB.js +0 -140
- package/dist/chunks/chunk-MXLA3VQS.js +0 -20
- package/dist/chunks/chunk-QKX7WKIN.js +0 -98
- package/dist/chunks/ls-PF7F4PP4.js +0 -197
- package/dist/chunks/rm-W722Q2AO.js +0 -173
- package/dist/chunks/rule-inspect-25Z6SNX3.js +0 -285
- package/dist/chunks/schema-7D6IGJEJ.js +0 -429
- package/dist/chunks/update-UT6CTKVG.js +0 -246
|
@@ -0,0 +1,324 @@
|
|
|
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
|
+
emitAlertsScopeError,
|
|
9
|
+
resolveAlertsScope
|
|
10
|
+
} from "./chunk-2GXA4NGG.js";
|
|
11
|
+
import {
|
|
12
|
+
handleValidationError,
|
|
13
|
+
validateAllProjectMutualExclusivity
|
|
14
|
+
} from "./chunk-KFWQ3EFH.js";
|
|
15
|
+
import {
|
|
16
|
+
isJSONObject
|
|
17
|
+
} from "./chunk-XEVKGAVI.js";
|
|
18
|
+
import {
|
|
19
|
+
AGENT_REASON
|
|
20
|
+
} from "./chunk-VUS2JQB2.js";
|
|
21
|
+
import {
|
|
22
|
+
getScope
|
|
23
|
+
} from "./chunk-76CB3CF2.js";
|
|
24
|
+
import {
|
|
25
|
+
getProjectByNameOrId
|
|
26
|
+
} from "./chunk-7F5RNOTP.js";
|
|
27
|
+
import {
|
|
28
|
+
buildCommandWithGlobalFlags,
|
|
29
|
+
outputAgentError
|
|
30
|
+
} from "./chunk-26CU4Q3C.js";
|
|
31
|
+
import {
|
|
32
|
+
ProjectNotFound,
|
|
33
|
+
isAPIError
|
|
34
|
+
} from "./chunk-CV5YC2EN.js";
|
|
35
|
+
import {
|
|
36
|
+
output_manager_default
|
|
37
|
+
} from "./chunk-2JIX6UMI.js";
|
|
38
|
+
|
|
39
|
+
// src/commands/alerts/rules/parse-scope.ts
|
|
40
|
+
async function resolveRulesTeam(client, jsonOutput) {
|
|
41
|
+
const { team } = await getScope(client, { resolveLocalScope: true });
|
|
42
|
+
if (team) {
|
|
43
|
+
return { teamId: team.id };
|
|
44
|
+
}
|
|
45
|
+
const message = "No team context found. Run `vercel switch` to select a team, use `--scope <team>`, or link a team project.";
|
|
46
|
+
return emitAlertsScopeError(client, jsonOutput, "NO_TEAM", message, {
|
|
47
|
+
reason: AGENT_REASON.MISSING_SCOPE,
|
|
48
|
+
hint: "Alert rules belong to a team. Select the team before retrying.",
|
|
49
|
+
next: [
|
|
50
|
+
{
|
|
51
|
+
command: buildCommandWithGlobalFlags(client.argv, "teams switch"),
|
|
52
|
+
when: "Select a team"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
command: buildCommandWithGlobalFlags(client.argv, "whoami"),
|
|
56
|
+
when: "Inspect the current scope"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async function resolveRulesProject(client, projectNameOrId, jsonOutput, command) {
|
|
62
|
+
const teamScope = await resolveRulesTeam(client, jsonOutput);
|
|
63
|
+
if (typeof teamScope === "number") {
|
|
64
|
+
return teamScope;
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
const project = await getProjectByNameOrId(
|
|
68
|
+
client,
|
|
69
|
+
projectNameOrId,
|
|
70
|
+
teamScope.teamId
|
|
71
|
+
);
|
|
72
|
+
if (project instanceof ProjectNotFound) {
|
|
73
|
+
return emitAlertsScopeError(
|
|
74
|
+
client,
|
|
75
|
+
jsonOutput,
|
|
76
|
+
"PROJECT_NOT_FOUND",
|
|
77
|
+
`Project "${projectNameOrId}" was not found in the selected team.`,
|
|
78
|
+
{
|
|
79
|
+
reason: AGENT_REASON.NOT_FOUND,
|
|
80
|
+
next: [
|
|
81
|
+
{
|
|
82
|
+
command: buildCommandWithGlobalFlags(
|
|
83
|
+
client.argv,
|
|
84
|
+
`${command} --project <name_or_id>`
|
|
85
|
+
),
|
|
86
|
+
when: "Retry with a valid project"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
...teamScope,
|
|
94
|
+
projectId: project.id,
|
|
95
|
+
projectName: project.name
|
|
96
|
+
};
|
|
97
|
+
} catch (error) {
|
|
98
|
+
if (!isAPIError(error)) {
|
|
99
|
+
throw error;
|
|
100
|
+
}
|
|
101
|
+
return emitAlertsScopeError(
|
|
102
|
+
client,
|
|
103
|
+
jsonOutput,
|
|
104
|
+
error.code || "API_ERROR",
|
|
105
|
+
error.serverMessage || `API error (${error.status}).`,
|
|
106
|
+
{
|
|
107
|
+
reason: error.status === 401 ? "not_authorized" : error.status === 403 ? "forbidden" : AGENT_REASON.API_ERROR
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async function parseRulesFlagsAndScope(client, flags, jsonOutput, command = "alerts rules ls") {
|
|
113
|
+
const mutual = validateAllProjectMutualExclusivity(
|
|
114
|
+
flags["--all"],
|
|
115
|
+
flags["--project"]
|
|
116
|
+
);
|
|
117
|
+
if (!mutual.valid) {
|
|
118
|
+
outputAgentError(
|
|
119
|
+
client,
|
|
120
|
+
{
|
|
121
|
+
status: "error",
|
|
122
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
123
|
+
message: mutual.message,
|
|
124
|
+
next: [
|
|
125
|
+
{
|
|
126
|
+
command: buildCommandWithGlobalFlags(
|
|
127
|
+
client.argv,
|
|
128
|
+
"alerts rules --help"
|
|
129
|
+
),
|
|
130
|
+
when: "Use either `--project` or `--all`, not both"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
1
|
|
135
|
+
);
|
|
136
|
+
return handleValidationError(mutual, jsonOutput, client);
|
|
137
|
+
}
|
|
138
|
+
if (flags["--all"]) {
|
|
139
|
+
return resolveRulesTeam(client, jsonOutput);
|
|
140
|
+
}
|
|
141
|
+
if (flags["--project"]) {
|
|
142
|
+
return resolveRulesProject(client, flags["--project"], jsonOutput, command);
|
|
143
|
+
}
|
|
144
|
+
const linkedScope = await resolveAlertsScope(client, {
|
|
145
|
+
jsonOutput,
|
|
146
|
+
command
|
|
147
|
+
});
|
|
148
|
+
if (typeof linkedScope === "number")
|
|
149
|
+
return linkedScope;
|
|
150
|
+
const teamScope = await resolveRulesTeam(client, jsonOutput);
|
|
151
|
+
if (typeof teamScope === "number")
|
|
152
|
+
return teamScope;
|
|
153
|
+
return linkedScope.teamId === teamScope.teamId ? linkedScope : teamScope;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// src/commands/alerts/rules/util.ts
|
|
157
|
+
import { readFileSync } from "fs";
|
|
158
|
+
import { resolve } from "path";
|
|
159
|
+
function rulesCollectionPath(teamId, options = {}) {
|
|
160
|
+
const query = new URLSearchParams({ teamId });
|
|
161
|
+
if (options.limit !== void 0)
|
|
162
|
+
query.set("limit", String(options.limit));
|
|
163
|
+
if (options.cursor)
|
|
164
|
+
query.set("cursor", options.cursor);
|
|
165
|
+
if (options.projectId)
|
|
166
|
+
query.set("projectId", options.projectId);
|
|
167
|
+
if (options.type)
|
|
168
|
+
query.set("type", options.type);
|
|
169
|
+
return `/alerts/v3/alert-rules?${query.toString()}`;
|
|
170
|
+
}
|
|
171
|
+
function rulesItemPath(teamId, ruleId) {
|
|
172
|
+
const query = new URLSearchParams({ teamId });
|
|
173
|
+
return `/alerts/v3/alert-rules/${encodeURIComponent(ruleId)}?${query.toString()}`;
|
|
174
|
+
}
|
|
175
|
+
function rulesSchemaPath(teamId, type) {
|
|
176
|
+
const query = new URLSearchParams({ teamId });
|
|
177
|
+
if (type)
|
|
178
|
+
query.set("type", type);
|
|
179
|
+
return `/alerts/v3/alert-rules/schema?${query.toString()}`;
|
|
180
|
+
}
|
|
181
|
+
async function fetchRule(client, scope, ruleId) {
|
|
182
|
+
const response = await client.fetch(
|
|
183
|
+
rulesItemPath(scope.teamId, ruleId)
|
|
184
|
+
);
|
|
185
|
+
return response.rule;
|
|
186
|
+
}
|
|
187
|
+
function getIssues(error) {
|
|
188
|
+
if (!Array.isArray(error.issues))
|
|
189
|
+
return [];
|
|
190
|
+
return error.issues.filter(
|
|
191
|
+
(issue) => isJSONObject(issue) && typeof issue.path === "string" && typeof issue.message === "string"
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
function outputRulesError(client, jsonOutput, code, message, options = {}) {
|
|
195
|
+
const issues = options.issues ?? [];
|
|
196
|
+
const issueSummary = issues.slice(0, 5).map((issue) => `${issue.path || "body"}: ${issue.message}`).join("; ");
|
|
197
|
+
outputAgentError(
|
|
198
|
+
client,
|
|
199
|
+
{
|
|
200
|
+
status: "error",
|
|
201
|
+
reason: options.reason ?? AGENT_REASON.INVALID_ARGUMENTS,
|
|
202
|
+
message,
|
|
203
|
+
hint: options.hint ?? (issueSummary || void 0)
|
|
204
|
+
},
|
|
205
|
+
1
|
|
206
|
+
);
|
|
207
|
+
if (jsonOutput) {
|
|
208
|
+
client.stdout.write(
|
|
209
|
+
`${JSON.stringify(
|
|
210
|
+
{ error: { code, message, ...issues.length ? { issues } : {} } },
|
|
211
|
+
null,
|
|
212
|
+
2
|
|
213
|
+
)}
|
|
214
|
+
`
|
|
215
|
+
);
|
|
216
|
+
} else {
|
|
217
|
+
output_manager_default.fatal(
|
|
218
|
+
[
|
|
219
|
+
message,
|
|
220
|
+
...issues.map((issue) => ` ${issue.path}: ${issue.message}`)
|
|
221
|
+
].join("\n")
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
return 1;
|
|
225
|
+
}
|
|
226
|
+
function handleRulesApiError(client, err, jsonOutput) {
|
|
227
|
+
const message = err.status === 401 ? "You do not have access to alert rules in this team. Ensure your role can manage Alert Rules, or pass --token and --scope." : err.status === 403 ? err.serverMessage || "You do not have permission to manage alert rules in this team." : err.status >= 500 ? `The alert rules endpoint failed (${err.status}). Re-run with --debug and share the x-vercel-id from the failed request.` : err.serverMessage || `API error (${err.status}).`;
|
|
228
|
+
return outputRulesError(
|
|
229
|
+
client,
|
|
230
|
+
jsonOutput,
|
|
231
|
+
err.code || "API_ERROR",
|
|
232
|
+
message,
|
|
233
|
+
{
|
|
234
|
+
reason: err.status === 401 ? "not_authorized" : err.status === 403 ? "forbidden" : err.status === 404 ? AGENT_REASON.NOT_FOUND : err.status === 429 ? "rate_limited" : AGENT_REASON.API_ERROR,
|
|
235
|
+
issues: getIssues(err),
|
|
236
|
+
hint: err.status === 401 || err.status === 403 ? "Confirm the team with `vercel whoami`; use --scope <team-slug> if the rule belongs to another team." : void 0
|
|
237
|
+
}
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
var LEGACY_BODY_FIELDS = ["alertTypes", "customAlert", "queryJsonString"];
|
|
241
|
+
function readRuleBody(client, bodyPath, jsonOutput) {
|
|
242
|
+
let raw;
|
|
243
|
+
try {
|
|
244
|
+
raw = readFileSync(resolve(client.cwd, bodyPath), "utf8");
|
|
245
|
+
} catch {
|
|
246
|
+
return outputRulesError(
|
|
247
|
+
client,
|
|
248
|
+
jsonOutput,
|
|
249
|
+
"INVALID_ARGUMENTS",
|
|
250
|
+
`Could not read --body file: ${bodyPath}`
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
let parsed;
|
|
254
|
+
try {
|
|
255
|
+
parsed = JSON.parse(raw);
|
|
256
|
+
} catch {
|
|
257
|
+
return outputRulesError(
|
|
258
|
+
client,
|
|
259
|
+
jsonOutput,
|
|
260
|
+
"INVALID_ARGUMENTS",
|
|
261
|
+
"Invalid JSON in --body file."
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
if (!isJSONObject(parsed)) {
|
|
265
|
+
return outputRulesError(
|
|
266
|
+
client,
|
|
267
|
+
jsonOutput,
|
|
268
|
+
"INVALID_ARGUMENTS",
|
|
269
|
+
"The --body file must contain a JSON object."
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
if (LEGACY_BODY_FIELDS.some((field) => Object.hasOwn(parsed, field))) {
|
|
273
|
+
return outputRulesError(
|
|
274
|
+
client,
|
|
275
|
+
jsonOutput,
|
|
276
|
+
"LEGACY_ALERT_RULE_BODY",
|
|
277
|
+
"This body uses the previous alert-rules shape. Rewrite it using the built-in or custom schema.",
|
|
278
|
+
{
|
|
279
|
+
hint: "Run `vercel alerts rules schema --type built-in` or `vercel alerts rules schema --type custom` for examples."
|
|
280
|
+
}
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
return parsed;
|
|
284
|
+
}
|
|
285
|
+
function getBodyType(body) {
|
|
286
|
+
return body.type === "built-in" || body.type === "custom" ? body.type : void 0;
|
|
287
|
+
}
|
|
288
|
+
function emitRulesArgParseError(client, err, recoverWithProjectFlag) {
|
|
289
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
290
|
+
const projectFlagMissingArg = message.includes("--project") && message.includes("requires argument");
|
|
291
|
+
outputAgentError(
|
|
292
|
+
client,
|
|
293
|
+
{
|
|
294
|
+
status: "error",
|
|
295
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
296
|
+
message: projectFlagMissingArg ? "`--project` requires a project name or id (for example `--project my-app`)." : message,
|
|
297
|
+
next: [
|
|
298
|
+
{
|
|
299
|
+
command: buildCommandWithGlobalFlags(
|
|
300
|
+
client.argv,
|
|
301
|
+
projectFlagMissingArg ? recoverWithProjectFlag : "alerts rules --help"
|
|
302
|
+
),
|
|
303
|
+
when: projectFlagMissingArg ? "Retry with a project name or id" : "See valid `alerts rules` subcommands"
|
|
304
|
+
}
|
|
305
|
+
]
|
|
306
|
+
},
|
|
307
|
+
1
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export {
|
|
312
|
+
resolveRulesTeam,
|
|
313
|
+
resolveRulesProject,
|
|
314
|
+
parseRulesFlagsAndScope,
|
|
315
|
+
rulesCollectionPath,
|
|
316
|
+
rulesItemPath,
|
|
317
|
+
rulesSchemaPath,
|
|
318
|
+
fetchRule,
|
|
319
|
+
outputRulesError,
|
|
320
|
+
handleRulesApiError,
|
|
321
|
+
readRuleBody,
|
|
322
|
+
getBodyType,
|
|
323
|
+
emitRulesArgParseError
|
|
324
|
+
};
|
|
@@ -2716,7 +2716,7 @@ var require_package = __commonJS({
|
|
|
2716
2716
|
"../client/package.json"(exports, module) {
|
|
2717
2717
|
module.exports = {
|
|
2718
2718
|
name: "@vercel/client",
|
|
2719
|
-
version: "18.3.
|
|
2719
|
+
version: "18.3.3",
|
|
2720
2720
|
main: "dist/index.js",
|
|
2721
2721
|
typings: "dist/index.d.ts",
|
|
2722
2722
|
homepage: "https://vercel.com",
|
|
@@ -10364,9 +10364,9 @@ var require_out4 = __commonJS({
|
|
|
10364
10364
|
}
|
|
10365
10365
|
});
|
|
10366
10366
|
|
|
10367
|
-
// ../../node_modules/.pnpm/@vercel+microfrontends@1.2.2_next@16.2.6_@
|
|
10367
|
+
// ../../node_modules/.pnpm/@vercel+microfrontends@1.2.2_next@16.2.6_@opentelemetry+api@1.9.1_react-dom@18.3.1_reac_29d9de4a2668e6f26ed52d105d4b310d/node_modules/@vercel/microfrontends/dist/microfrontends/utils.cjs
|
|
10368
10368
|
var require_utils5 = __commonJS({
|
|
10369
|
-
"../../node_modules/.pnpm/@vercel+microfrontends@1.2.2_next@16.2.6_@
|
|
10369
|
+
"../../node_modules/.pnpm/@vercel+microfrontends@1.2.2_next@16.2.6_@opentelemetry+api@1.9.1_react-dom@18.3.1_reac_29d9de4a2668e6f26ed52d105d4b310d/node_modules/@vercel/microfrontends/dist/microfrontends/utils.cjs"(exports, module) {
|
|
10370
10370
|
"use strict";
|
|
10371
10371
|
var __create = Object.create;
|
|
10372
10372
|
var __defProp = Object.defineProperty;
|
|
@@ -18126,6 +18126,8 @@ var require_dist2 = __commonJS({
|
|
|
18126
18126
|
});
|
|
18127
18127
|
|
|
18128
18128
|
export {
|
|
18129
|
+
parse2 as parse,
|
|
18130
|
+
printParseErrorCode,
|
|
18129
18131
|
modify,
|
|
18130
18132
|
applyEdits,
|
|
18131
18133
|
init_main,
|
|
@@ -86,6 +86,7 @@ var help = () => `
|
|
|
86
86
|
rr | rolling-release [cmd] Manage rolling releases for gradual traffic shifting
|
|
87
87
|
sandbox Interact with Vercel Sandbox
|
|
88
88
|
skills [query] Discover agent skills relevant to your project
|
|
89
|
+
storage [cmd] Connect and manage storage resources for your Projects
|
|
89
90
|
target [cmd] Manage custom environments for your Project
|
|
90
91
|
teams Manages your teams
|
|
91
92
|
telemetry [cmd] Enable or disable telemetry collection
|
|
@@ -10,17 +10,17 @@ import {
|
|
|
10
10
|
} from "./chunk-KFWQ3EFH.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveProjectContext
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3FIEWWMM.js";
|
|
14
14
|
import {
|
|
15
15
|
detectExplicitScope,
|
|
16
16
|
getScope
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-76CB3CF2.js";
|
|
18
18
|
import {
|
|
19
19
|
printError
|
|
20
20
|
} from "./chunk-3VM7HWF6.js";
|
|
21
21
|
import {
|
|
22
22
|
getLinkedProject
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7F5RNOTP.js";
|
|
24
24
|
import {
|
|
25
25
|
isAPIError
|
|
26
26
|
} from "./chunk-CV5YC2EN.js";
|
|
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
login,
|
|
9
9
|
require_ci_info
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LE5V7G2U.js";
|
|
11
11
|
import {
|
|
12
12
|
getGlobalPathConfig
|
|
13
13
|
} from "./chunk-AINIBIP4.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
humanizePath,
|
|
19
19
|
param
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7F5RNOTP.js";
|
|
21
21
|
import {
|
|
22
22
|
getCommandName
|
|
23
23
|
} from "./chunk-Q2DGFCO7.js";
|
|
@@ -6,16 +6,16 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
require_dist as require_dist4
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7NRNFV77.js";
|
|
10
10
|
import {
|
|
11
11
|
require_dist2 as require_dist3
|
|
12
12
|
} from "./chunk-332LMJLZ.js";
|
|
13
13
|
import {
|
|
14
14
|
require_dist as require_dist2
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-N6HP5BLI.js";
|
|
16
16
|
import {
|
|
17
17
|
require_lib
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7F5RNOTP.js";
|
|
19
19
|
import {
|
|
20
20
|
output_manager_default
|
|
21
21
|
} from "./chunk-2JIX6UMI.js";
|
|
@@ -9,22 +9,22 @@ import {
|
|
|
9
9
|
} from "./chunk-PRWJUY5U.js";
|
|
10
10
|
import {
|
|
11
11
|
progress
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LE5V7G2U.js";
|
|
13
13
|
import {
|
|
14
14
|
isJSONObject,
|
|
15
15
|
printIndications,
|
|
16
16
|
require_dist as require_dist2,
|
|
17
17
|
sleep
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XEVKGAVI.js";
|
|
19
19
|
import {
|
|
20
20
|
suggestNextCommands
|
|
21
21
|
} from "./chunk-AKLTIZCU.js";
|
|
22
22
|
import {
|
|
23
23
|
CommandTimeout
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5ORMFNXL.js";
|
|
25
25
|
import {
|
|
26
26
|
require_dist as require_dist3
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-N6HP5BLI.js";
|
|
28
28
|
import {
|
|
29
29
|
stamp_default
|
|
30
30
|
} from "./chunk-64IF634X.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
getScope,
|
|
40
40
|
ua_default
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-76CB3CF2.js";
|
|
42
42
|
import {
|
|
43
43
|
Headers,
|
|
44
44
|
fetch,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
param,
|
|
54
54
|
printAlignedLabel,
|
|
55
55
|
require_pluralize
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-7F5RNOTP.js";
|
|
57
57
|
import {
|
|
58
58
|
withGlobalFlags
|
|
59
59
|
} from "./chunk-26CU4Q3C.js";
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
} from "./chunk-VUS2JQB2.js";
|
|
11
11
|
import {
|
|
12
12
|
getScope
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-76CB3CF2.js";
|
|
14
14
|
import {
|
|
15
15
|
getOrgById
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7F5RNOTP.js";
|
|
17
17
|
import {
|
|
18
18
|
buildCommandWithGlobalFlags,
|
|
19
19
|
outputAgentError,
|
|
@@ -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-TOXZAP5I.js";
|
|
10
10
|
import {
|
|
11
11
|
autoInstallVercelPlugin
|
|
12
12
|
} from "./chunk-K3RED3VO.js";
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
} from "./chunk-64IF634X.js";
|
|
16
16
|
import {
|
|
17
17
|
envPullCommandLogic
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IK6PC2JA.js";
|
|
19
19
|
import {
|
|
20
20
|
ensureLink
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-66LPM47Z.js";
|
|
22
22
|
import {
|
|
23
23
|
pullCommand
|
|
24
24
|
} from "./chunk-UG2WOB5L.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
VERCEL_DIR,
|
|
42
42
|
VERCEL_DIR_PROJECT,
|
|
43
43
|
humanizePath
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-7F5RNOTP.js";
|
|
45
45
|
import {
|
|
46
46
|
getFlagsSpecification
|
|
47
47
|
} from "./chunk-Q2DGFCO7.js";
|
|
@@ -10,21 +10,21 @@ import {
|
|
|
10
10
|
} from "./chunk-AINIBIP4.js";
|
|
11
11
|
import {
|
|
12
12
|
getLocalPathConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EEV2LKFC.js";
|
|
14
14
|
import {
|
|
15
15
|
PromptBackError,
|
|
16
16
|
PromptCanceledError
|
|
17
17
|
} from "./chunk-V4RMJKQP.js";
|
|
18
18
|
import {
|
|
19
19
|
require_dist as require_dist2
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-N6HP5BLI.js";
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
23
23
|
VERCEL_CONFIG_EXTENSIONS
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-L4H3DP65.js";
|
|
25
25
|
import {
|
|
26
26
|
performDeviceCodeFlow
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GQRG7VFK.js";
|
|
28
28
|
import {
|
|
29
29
|
require_load_json_file
|
|
30
30
|
} from "./chunk-B5XLQKHI.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
processTokenResponse,
|
|
34
34
|
refreshTokenRequest,
|
|
35
35
|
ua_default
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-76CB3CF2.js";
|
|
37
37
|
import {
|
|
38
38
|
Headers,
|
|
39
39
|
fetch
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
useKeypress,
|
|
60
60
|
usePrefix,
|
|
61
61
|
useState
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-7F5RNOTP.js";
|
|
63
63
|
import {
|
|
64
64
|
require_strip_ansi
|
|
65
65
|
} from "./chunk-XPJLPUKO.js";
|
|
@@ -7,16 +7,16 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
require_dist as require_dist2,
|
|
9
9
|
validateConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7NRNFV77.js";
|
|
11
11
|
import {
|
|
12
12
|
require_dist2 as require_dist
|
|
13
13
|
} from "./chunk-332LMJLZ.js";
|
|
14
14
|
import {
|
|
15
15
|
readJSONFile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MUGF3SGQ.js";
|
|
17
17
|
import {
|
|
18
18
|
compileVercelConfig
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-L4H3DP65.js";
|
|
20
20
|
import {
|
|
21
21
|
CantParseJSONFile
|
|
22
22
|
} from "./chunk-CV5YC2EN.js";
|
|
@@ -70,7 +70,7 @@ function createDetectEntrypoint(projectRoot) {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
async function loadBuilderDetectEntrypoint(name, projectRoot) {
|
|
73
|
-
const { importBuilders } = await import("./import-builders-
|
|
73
|
+
const { importBuilders } = await import("./import-builders-F6SWNCHK.js");
|
|
74
74
|
const builders = await importBuilders(/* @__PURE__ */ new Set([name]), projectRoot);
|
|
75
75
|
const loaded = builders.get(name);
|
|
76
76
|
if (!loaded) {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
requireVcrRepository,
|
|
14
14
|
resolveVcrScope,
|
|
15
15
|
validateVcrJsonOutput
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KXTXGYG7.js";
|
|
17
17
|
import "./chunk-TO7QZGYK.js";
|
|
18
18
|
import "./chunk-KFWQ3EFH.js";
|
|
19
19
|
import "./chunk-KXDWXXJH.js";
|
|
@@ -27,7 +27,7 @@ import "./chunk-GGP5R3FU.js";
|
|
|
27
27
|
import {
|
|
28
28
|
AGENT_REASON
|
|
29
29
|
} from "./chunk-VUS2JQB2.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-76CB3CF2.js";
|
|
31
31
|
import "./chunk-XNIZGCN5.js";
|
|
32
32
|
import {
|
|
33
33
|
printError
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
parseArguments
|
|
37
37
|
} from "./chunk-57RHXXXG.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-7F5RNOTP.js";
|
|
39
39
|
import "./chunk-G5FBSUL4.js";
|
|
40
40
|
import {
|
|
41
41
|
buildCommandWithYes,
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
findSourceVercelConfigFile,
|
|
12
12
|
getVercelConfigPath,
|
|
13
13
|
normalizeConfig
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-L4H3DP65.js";
|
|
15
|
+
import "./chunk-7F5RNOTP.js";
|
|
16
16
|
import "./chunk-G5FBSUL4.js";
|
|
17
17
|
import "./chunk-26CU4Q3C.js";
|
|
18
18
|
import "./chunk-XPJLPUKO.js";
|