vercel 51.2.0 → 51.3.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-3MIOUOZC.js +180 -0
- package/dist/chunks/{chunk-K4IC7LFB.js → chunk-2JQVASXJ.js} +13 -8
- 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-V23RAVWV.js → chunk-4VP55L4V.js} +211 -504
- package/dist/chunks/{chunk-TBW2XDGN.js → chunk-4WRHMYCG.js} +6 -6
- package/dist/chunks/chunk-4ZWTYJSP.js +139 -0
- package/dist/chunks/{chunk-7IDNCLTM.js → chunk-APGVHLAW.js} +2 -2
- package/dist/chunks/{chunk-UZIEJEMY.js → chunk-BAUYQ7AR.js} +1 -1
- package/dist/chunks/{chunk-BUBUVE23.js → chunk-BJQTGP42.js} +4 -2
- package/dist/chunks/{chunk-WOFF2NEI.js → chunk-BU3JMDDH.js} +3 -3
- package/dist/chunks/chunk-CGTXAXZ4.js +484 -0
- package/dist/chunks/{chunk-BQUQ5F7R.js → chunk-CRZM5WM2.js} +4 -2
- package/dist/chunks/{chunk-RQTDTSAX.js → chunk-CZXW3DJH.js} +2 -2
- package/dist/chunks/chunk-DVQ4SIWF.js +183 -0
- package/dist/chunks/{chunk-TWZWQGBN.js → chunk-E3NE4SKN.js} +3 -0
- package/dist/chunks/{chunk-A4NVECX5.js → chunk-ECRBC4HL.js} +4 -581
- package/dist/chunks/{chunk-65IHMJX4.js → chunk-FNFZO3WQ.js} +7 -5
- 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-D7SZ3DXR.js → chunk-GYBFQLYR.js} +6 -4
- package/dist/chunks/{chunk-ZL5SYUAG.js → chunk-JEON5XEH.js} +44 -13
- 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-YKKQGGLZ.js → chunk-NCQBQGI6.js} +2 -2
- package/dist/chunks/chunk-NE34PEHL.js +167 -0
- package/dist/chunks/{chunk-A5XRYFVO.js → chunk-OFUQPP26.js} +10 -6
- package/dist/chunks/{chunk-NYO5XRBQ.js → chunk-R2BVH5SQ.js} +1 -1
- package/dist/chunks/chunk-RFMC2QXQ.js +602 -0
- package/dist/chunks/{chunk-XHMU7WUB.js → chunk-RHXEHBO3.js} +8 -6
- package/dist/chunks/{chunk-5CRSHCRD.js → chunk-RRYVGOVK.js} +1 -1
- package/dist/chunks/{chunk-3PEFANXY.js → chunk-T7CL42FK.js} +5 -5
- package/dist/chunks/{chunk-WXNT7WJO.js → chunk-TAOVG4PS.js} +49 -4
- package/dist/chunks/{chunk-6DIXPIXB.js → chunk-UB325PS7.js} +1 -1
- 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/{chunk-F2ROYUW2.js → chunk-VMTOBGCO.js} +425 -28
- package/dist/chunks/{chunk-XMVSCINT.js → chunk-ZS5VKEZL.js} +5 -3
- package/dist/chunks/{compile-vercel-config-6FEECIZK.js → compile-vercel-config-A2SLMCWK.js} +4 -2
- package/dist/chunks/{delete-J2N2QXMP.js → delete-SEQBCYWT.js} +8 -6
- package/dist/chunks/{disable-QGYXQKAM.js → disable-GRM5DJGU.js} +8 -6
- package/dist/chunks/{discard-ZDGJB5US.js → discard-IVQWWSPI.js} +8 -6
- package/dist/chunks/{edit-RJWDA5KJ.js → edit-YTMZBT4Y.js} +9 -7
- package/dist/chunks/{enable-L33HPTXB.js → enable-SSU3MG6J.js} +8 -6
- package/dist/chunks/{export-Z5C4BJ2U.js → export-INCDZTYW.js} +8 -6
- package/dist/chunks/inspect-QMY2ZE6J.js +353 -0
- package/dist/chunks/{list-HXN64DKX.js → list-FF4VGSZ2.js} +115 -85
- package/dist/chunks/{list-4P2TW77C.js → list-MMIBPSB3.js} +10 -7
- package/dist/chunks/ls-TYEDISJD.js +114 -0
- package/dist/chunks/{publish-TLVHQB2H.js → publish-OJQCVDL5.js} +8 -6
- package/dist/chunks/{query-SDKQTWN2.js → query-LACPOOBL.js} +15 -12
- package/dist/chunks/{reorder-UHMUFYIW.js → reorder-TBFWHFQZ.js} +8 -6
- package/dist/chunks/{restore-762GO6HU.js → restore-5LUZRUME.js} +8 -6
- package/dist/chunks/rm-LDXY2G45.js +164 -0
- package/dist/chunks/rule-inspect-THIN6POX.js +142 -0
- package/dist/chunks/rules-4ZH7VTGC.js +83 -0
- package/dist/chunks/{schema-WBOIQRP4.js → schema-OK4OOI2N.js} +9 -7
- package/dist/chunks/{types-A4EAQ6F6.js → types-QNN5CDCB.js} +6 -4
- package/dist/chunks/update-EXPUPEH6.js +196 -0
- package/dist/commands/build/index.js +28 -24
- package/dist/commands/deploy/index.js +172 -33
- package/dist/commands/dev/index.js +21 -17
- 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 +4566 -1816
- package/dist/index.js +38 -24
- package/dist/version.mjs +1 -1
- package/package.json +18 -18
|
@@ -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-UB325PS7.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureLink
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FNFZO3WQ.js";
|
|
13
13
|
import {
|
|
14
14
|
pullCommand
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZS5VKEZL.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-4VP55L4V.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,
|
|
@@ -0,0 +1,139 @@
|
|
|
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
|
+
resolveAlertsScope
|
|
9
|
+
} from "./chunk-NE34PEHL.js";
|
|
10
|
+
import {
|
|
11
|
+
handleValidationError,
|
|
12
|
+
outputError,
|
|
13
|
+
validateAllProjectMutualExclusivity
|
|
14
|
+
} from "./chunk-HTOH3MSD.js";
|
|
15
|
+
import {
|
|
16
|
+
AGENT_REASON
|
|
17
|
+
} from "./chunk-E3NE4SKN.js";
|
|
18
|
+
import {
|
|
19
|
+
buildCommandWithGlobalFlags,
|
|
20
|
+
outputAgentError
|
|
21
|
+
} from "./chunk-CGTXAXZ4.js";
|
|
22
|
+
|
|
23
|
+
// src/commands/alerts/rules/parse-scope.ts
|
|
24
|
+
async function parseRulesFlagsAndScope(client, flags, jsonOutput) {
|
|
25
|
+
const mutual = validateAllProjectMutualExclusivity(
|
|
26
|
+
flags["--all"],
|
|
27
|
+
flags["--project"]
|
|
28
|
+
);
|
|
29
|
+
if (!mutual.valid) {
|
|
30
|
+
outputAgentError(
|
|
31
|
+
client,
|
|
32
|
+
{
|
|
33
|
+
status: "error",
|
|
34
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
35
|
+
message: mutual.message,
|
|
36
|
+
next: [
|
|
37
|
+
{
|
|
38
|
+
command: buildCommandWithGlobalFlags(
|
|
39
|
+
client.argv,
|
|
40
|
+
"alerts rules --help"
|
|
41
|
+
),
|
|
42
|
+
when: "Use either `--project` or `--all`, not both"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
1
|
|
47
|
+
);
|
|
48
|
+
return handleValidationError(mutual, jsonOutput, client);
|
|
49
|
+
}
|
|
50
|
+
return resolveAlertsScope(client, {
|
|
51
|
+
project: flags["--project"],
|
|
52
|
+
all: flags["--all"],
|
|
53
|
+
jsonOutput
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// src/commands/alerts/rules/util.ts
|
|
58
|
+
function buildRulesQuery(scope) {
|
|
59
|
+
const query = new URLSearchParams({ teamId: scope.teamId });
|
|
60
|
+
if (scope.projectId) {
|
|
61
|
+
query.set("projectId", scope.projectId);
|
|
62
|
+
}
|
|
63
|
+
return query;
|
|
64
|
+
}
|
|
65
|
+
function rulesCollectionPath(scope) {
|
|
66
|
+
return `/alerts/v2/alert-rules?${buildRulesQuery(scope).toString()}`;
|
|
67
|
+
}
|
|
68
|
+
function rulesItemPath(scope, ruleId) {
|
|
69
|
+
const query = new URLSearchParams({ teamId: scope.teamId });
|
|
70
|
+
return `/alerts/v2/alert-rules/${encodeURIComponent(ruleId)}?${query.toString()}`;
|
|
71
|
+
}
|
|
72
|
+
function handleRulesApiError(client, err, jsonOutput) {
|
|
73
|
+
const message = err.status === 401 || err.status === 403 ? "You do not have access to alert rules in this scope. Ensure your role can manage Alert Rules, or pass --token and --scope." : 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}).`;
|
|
74
|
+
const 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;
|
|
75
|
+
outputAgentError(
|
|
76
|
+
client,
|
|
77
|
+
{
|
|
78
|
+
status: "error",
|
|
79
|
+
reason,
|
|
80
|
+
message,
|
|
81
|
+
...err.status === 401 || err.status === 403 ? {
|
|
82
|
+
hint: "Confirm team scope with whoami; use --scope <team-slug> if the rule lives under another team.",
|
|
83
|
+
next: [
|
|
84
|
+
{
|
|
85
|
+
command: buildCommandWithGlobalFlags(client.argv, "whoami"),
|
|
86
|
+
when: "See current user and team"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
command: buildCommandWithGlobalFlags(
|
|
90
|
+
client.argv,
|
|
91
|
+
"alerts rules ls"
|
|
92
|
+
),
|
|
93
|
+
when: "Retry listing rules after fixing scope or permissions"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
} : {}
|
|
97
|
+
},
|
|
98
|
+
1
|
|
99
|
+
);
|
|
100
|
+
return outputError(client, jsonOutput, err.code || "API_ERROR", message);
|
|
101
|
+
}
|
|
102
|
+
function emitRulesArgParseError(client, err, recoverWithProjectFlag) {
|
|
103
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
104
|
+
const projectFlagMissingArg = msg.includes("--project") && msg.includes("requires argument");
|
|
105
|
+
outputAgentError(
|
|
106
|
+
client,
|
|
107
|
+
{
|
|
108
|
+
status: "error",
|
|
109
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
110
|
+
message: projectFlagMissingArg ? "`--project` requires a project name or id (for example `--project my-app`)." : msg,
|
|
111
|
+
next: projectFlagMissingArg ? [
|
|
112
|
+
{
|
|
113
|
+
command: buildCommandWithGlobalFlags(
|
|
114
|
+
client.argv,
|
|
115
|
+
recoverWithProjectFlag
|
|
116
|
+
),
|
|
117
|
+
when: "Re-run with a project name or id (replace placeholder)"
|
|
118
|
+
}
|
|
119
|
+
] : [
|
|
120
|
+
{
|
|
121
|
+
command: buildCommandWithGlobalFlags(
|
|
122
|
+
client.argv,
|
|
123
|
+
"alerts rules --help"
|
|
124
|
+
),
|
|
125
|
+
when: "See valid `alerts rules` subcommands"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
1
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export {
|
|
134
|
+
parseRulesFlagsAndScope,
|
|
135
|
+
rulesCollectionPath,
|
|
136
|
+
rulesItemPath,
|
|
137
|
+
handleRulesApiError,
|
|
138
|
+
emitRulesArgParseError
|
|
139
|
+
};
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
getTeamById,
|
|
12
12
|
getUser,
|
|
13
13
|
getVercelDirectory
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4VP55L4V.js";
|
|
15
15
|
import {
|
|
16
16
|
TeamDeleted
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ECRBC4HL.js";
|
|
18
18
|
import {
|
|
19
19
|
output_manager_default
|
|
20
20
|
} 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 = {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-IB5L4LKZ.js";
|
|
10
10
|
import {
|
|
11
11
|
require_execa
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BAUYQ7AR.js";
|
|
13
13
|
import {
|
|
14
14
|
VERCEL_DIR,
|
|
15
15
|
readJSONFile,
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
require_lib,
|
|
19
19
|
require_minimatch,
|
|
20
20
|
require_pluralize
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4VP55L4V.js";
|
|
22
22
|
import {
|
|
23
23
|
CantParseJSONFile,
|
|
24
24
|
cmd,
|
|
25
25
|
code
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ECRBC4HL.js";
|
|
27
27
|
import {
|
|
28
28
|
output_manager_default,
|
|
29
29
|
require_dist
|