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
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
handleVcrApiError,
|
|
10
10
|
resolveVcrScope,
|
|
11
11
|
validateVcrJsonOutput
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KXTXGYG7.js";
|
|
13
13
|
import "./chunk-TO7QZGYK.js";
|
|
14
14
|
import {
|
|
15
15
|
outputError
|
|
@@ -28,7 +28,7 @@ import "./chunk-GGP5R3FU.js";
|
|
|
28
28
|
import {
|
|
29
29
|
AGENT_REASON
|
|
30
30
|
} from "./chunk-VUS2JQB2.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-76CB3CF2.js";
|
|
32
32
|
import "./chunk-XNIZGCN5.js";
|
|
33
33
|
import {
|
|
34
34
|
printError
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
parseArguments
|
|
38
38
|
} from "./chunk-57RHXXXG.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-7F5RNOTP.js";
|
|
40
40
|
import "./chunk-G5FBSUL4.js";
|
|
41
41
|
import {
|
|
42
42
|
buildCommandWithGlobalFlags,
|
|
@@ -0,0 +1,221 @@
|
|
|
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
|
+
printRuleMutationReceipt
|
|
9
|
+
} from "./chunk-DQ23J2KG.js";
|
|
10
|
+
import "./chunk-GDOUDU6O.js";
|
|
11
|
+
import {
|
|
12
|
+
emitRulesArgParseError,
|
|
13
|
+
getBodyType,
|
|
14
|
+
handleRulesApiError,
|
|
15
|
+
outputRulesError,
|
|
16
|
+
readRuleBody,
|
|
17
|
+
resolveRulesProject,
|
|
18
|
+
resolveRulesTeam,
|
|
19
|
+
rulesCollectionPath
|
|
20
|
+
} from "./chunk-LVCCV2YJ.js";
|
|
21
|
+
import "./chunk-2GXA4NGG.js";
|
|
22
|
+
import "./chunk-GZLPFESR.js";
|
|
23
|
+
import "./chunk-A3NYPUKZ.js";
|
|
24
|
+
import "./chunk-KFWQ3EFH.js";
|
|
25
|
+
import "./chunk-FGDKMNEN.js";
|
|
26
|
+
import "./chunk-PRWJUY5U.js";
|
|
27
|
+
import "./chunk-XEVKGAVI.js";
|
|
28
|
+
import "./chunk-AINIBIP4.js";
|
|
29
|
+
import "./chunk-EEV2LKFC.js";
|
|
30
|
+
import "./chunk-ND5CF2H3.js";
|
|
31
|
+
import {
|
|
32
|
+
validateJsonOutput
|
|
33
|
+
} from "./chunk-KXDWXXJH.js";
|
|
34
|
+
import "./chunk-V4RMJKQP.js";
|
|
35
|
+
import {
|
|
36
|
+
rulesAddSubcommand
|
|
37
|
+
} from "./chunk-EDMW7SBH.js";
|
|
38
|
+
import "./chunk-N6HP5BLI.js";
|
|
39
|
+
import "./chunk-P7VSBDR4.js";
|
|
40
|
+
import "./chunk-L4H3DP65.js";
|
|
41
|
+
import "./chunk-ZDU2NODC.js";
|
|
42
|
+
import "./chunk-PEC3CQSK.js";
|
|
43
|
+
import "./chunk-GGP5R3FU.js";
|
|
44
|
+
import "./chunk-VUS2JQB2.js";
|
|
45
|
+
import "./chunk-GQRG7VFK.js";
|
|
46
|
+
import "./chunk-HRXRELD3.js";
|
|
47
|
+
import "./chunk-B5XLQKHI.js";
|
|
48
|
+
import "./chunk-76CB3CF2.js";
|
|
49
|
+
import "./chunk-XNIZGCN5.js";
|
|
50
|
+
import "./chunk-NW34PW6V.js";
|
|
51
|
+
import {
|
|
52
|
+
printError
|
|
53
|
+
} from "./chunk-3VM7HWF6.js";
|
|
54
|
+
import {
|
|
55
|
+
parseArguments
|
|
56
|
+
} from "./chunk-57RHXXXG.js";
|
|
57
|
+
import "./chunk-7F5RNOTP.js";
|
|
58
|
+
import "./chunk-G5FBSUL4.js";
|
|
59
|
+
import "./chunk-26CU4Q3C.js";
|
|
60
|
+
import "./chunk-XPJLPUKO.js";
|
|
61
|
+
import {
|
|
62
|
+
isAPIError
|
|
63
|
+
} from "./chunk-CV5YC2EN.js";
|
|
64
|
+
import {
|
|
65
|
+
getFlagsSpecification
|
|
66
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
67
|
+
import {
|
|
68
|
+
output_manager_default
|
|
69
|
+
} from "./chunk-2JIX6UMI.js";
|
|
70
|
+
import "./chunk-P4QNYOFB.js";
|
|
71
|
+
import "./chunk-ZW6HETRE.js";
|
|
72
|
+
import "./chunk-S7KYDPEM.js";
|
|
73
|
+
import "./chunk-TZ2YI2VH.js";
|
|
74
|
+
|
|
75
|
+
// src/commands/alerts/rules/add.ts
|
|
76
|
+
function applyScopeFlag(client, body, type, scope, flags, jsonOutput) {
|
|
77
|
+
if (Object.hasOwn(body, "ruleScope")) {
|
|
78
|
+
if (flags["--project"] || flags["--all"]) {
|
|
79
|
+
return outputRulesError(
|
|
80
|
+
client,
|
|
81
|
+
jsonOutput,
|
|
82
|
+
"SCOPE_CONFLICT",
|
|
83
|
+
"Specify rule scope either in the body or with --project/--all, not both."
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
return void 0;
|
|
87
|
+
}
|
|
88
|
+
if (flags["--project"]) {
|
|
89
|
+
body.ruleScope = type === "custom" ? { type: "project", projectId: scope.projectId } : { type: "include", projectIds: [scope.projectId] };
|
|
90
|
+
return void 0;
|
|
91
|
+
}
|
|
92
|
+
if (flags["--all"]) {
|
|
93
|
+
if (type === "custom") {
|
|
94
|
+
return outputRulesError(
|
|
95
|
+
client,
|
|
96
|
+
jsonOutput,
|
|
97
|
+
"INVALID_SCOPE",
|
|
98
|
+
"Custom alert rules must target one project. Use --project <name-or-id>."
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
body.ruleScope = { type: "all" };
|
|
102
|
+
return void 0;
|
|
103
|
+
}
|
|
104
|
+
return outputRulesError(
|
|
105
|
+
client,
|
|
106
|
+
jsonOutput,
|
|
107
|
+
"MISSING_SCOPE",
|
|
108
|
+
"Missing rule scope. Add ruleScope to the body, or pass --project or --all."
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
async function resolveCreateScope(client, flags, jsonOutput) {
|
|
112
|
+
if (flags["--project"] && flags["--all"]) {
|
|
113
|
+
return outputRulesError(
|
|
114
|
+
client,
|
|
115
|
+
jsonOutput,
|
|
116
|
+
"MUTUAL_EXCLUSIVITY",
|
|
117
|
+
"Cannot specify both --all and --project. Use one or the other."
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
return flags["--project"] ? resolveRulesProject(
|
|
121
|
+
client,
|
|
122
|
+
flags["--project"],
|
|
123
|
+
jsonOutput,
|
|
124
|
+
"alerts rules add"
|
|
125
|
+
) : resolveRulesTeam(client, jsonOutput);
|
|
126
|
+
}
|
|
127
|
+
async function add(client, argv) {
|
|
128
|
+
let parsedArgs;
|
|
129
|
+
try {
|
|
130
|
+
parsedArgs = parseArguments(
|
|
131
|
+
argv,
|
|
132
|
+
getFlagsSpecification(rulesAddSubcommand.options)
|
|
133
|
+
);
|
|
134
|
+
} catch (error) {
|
|
135
|
+
emitRulesArgParseError(
|
|
136
|
+
client,
|
|
137
|
+
error,
|
|
138
|
+
"alerts rules add --project <name-or-id> --body <path>"
|
|
139
|
+
);
|
|
140
|
+
printError(error);
|
|
141
|
+
return 1;
|
|
142
|
+
}
|
|
143
|
+
const flags = parsedArgs.flags;
|
|
144
|
+
const format = validateJsonOutput(flags);
|
|
145
|
+
if (!format.valid) {
|
|
146
|
+
return outputRulesError(client, false, "INVALID_ARGUMENTS", format.error);
|
|
147
|
+
}
|
|
148
|
+
if (!flags["--body"]) {
|
|
149
|
+
return outputRulesError(
|
|
150
|
+
client,
|
|
151
|
+
format.jsonOutput,
|
|
152
|
+
"MISSING_ARGUMENTS",
|
|
153
|
+
"Missing required flag: --body <PATH>."
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
const body = readRuleBody(client, flags["--body"], format.jsonOutput);
|
|
157
|
+
if (typeof body === "number")
|
|
158
|
+
return body;
|
|
159
|
+
const type = getBodyType(body);
|
|
160
|
+
if (!type) {
|
|
161
|
+
return outputRulesError(
|
|
162
|
+
client,
|
|
163
|
+
format.jsonOutput,
|
|
164
|
+
"INVALID_RULE_TYPE",
|
|
165
|
+
"Create body must set type to built-in or custom."
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
if (Object.hasOwn(body, "ruleScope") && (flags["--project"] || flags["--all"])) {
|
|
169
|
+
return outputRulesError(
|
|
170
|
+
client,
|
|
171
|
+
format.jsonOutput,
|
|
172
|
+
"SCOPE_CONFLICT",
|
|
173
|
+
"Specify rule scope either in the body or with --project/--all, not both."
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
if (type === "custom" && flags["--all"]) {
|
|
177
|
+
return outputRulesError(
|
|
178
|
+
client,
|
|
179
|
+
format.jsonOutput,
|
|
180
|
+
"INVALID_SCOPE",
|
|
181
|
+
"Custom alert rules must target one project. Use --project <name-or-id>."
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
const scope = await resolveCreateScope(client, flags, format.jsonOutput);
|
|
185
|
+
if (typeof scope === "number")
|
|
186
|
+
return scope;
|
|
187
|
+
const scopeError = applyScopeFlag(
|
|
188
|
+
client,
|
|
189
|
+
body,
|
|
190
|
+
type,
|
|
191
|
+
scope,
|
|
192
|
+
flags,
|
|
193
|
+
format.jsonOutput
|
|
194
|
+
);
|
|
195
|
+
if (scopeError !== void 0)
|
|
196
|
+
return scopeError;
|
|
197
|
+
output_manager_default.spinner("Creating alert rule\u2026");
|
|
198
|
+
try {
|
|
199
|
+
const response = await client.fetch(
|
|
200
|
+
rulesCollectionPath(scope.teamId),
|
|
201
|
+
{ method: "POST", body }
|
|
202
|
+
);
|
|
203
|
+
if (format.jsonOutput) {
|
|
204
|
+
client.stdout.write(`${JSON.stringify(response, null, 2)}
|
|
205
|
+
`);
|
|
206
|
+
} else {
|
|
207
|
+
printRuleMutationReceipt("Created", response.rule, client.argv);
|
|
208
|
+
}
|
|
209
|
+
return 0;
|
|
210
|
+
} catch (error) {
|
|
211
|
+
if (isAPIError(error)) {
|
|
212
|
+
return handleRulesApiError(client, error, format.jsonOutput);
|
|
213
|
+
}
|
|
214
|
+
throw error;
|
|
215
|
+
} finally {
|
|
216
|
+
output_manager_default.stopSpinner();
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
export {
|
|
220
|
+
add as default
|
|
221
|
+
};
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
emitVcrArgParseError,
|
|
18
18
|
resolveVcrScope,
|
|
19
19
|
validateVcrJsonOutput
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KXTXGYG7.js";
|
|
21
21
|
import "./chunk-TO7QZGYK.js";
|
|
22
22
|
import {
|
|
23
23
|
outputError
|
|
@@ -33,7 +33,7 @@ import "./chunk-GGP5R3FU.js";
|
|
|
33
33
|
import {
|
|
34
34
|
AGENT_REASON
|
|
35
35
|
} from "./chunk-VUS2JQB2.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-76CB3CF2.js";
|
|
37
37
|
import "./chunk-XNIZGCN5.js";
|
|
38
38
|
import {
|
|
39
39
|
printError
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
parseArguments
|
|
43
43
|
} from "./chunk-57RHXXXG.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-7F5RNOTP.js";
|
|
45
45
|
import "./chunk-G5FBSUL4.js";
|
|
46
46
|
import {
|
|
47
47
|
buildCommandWithGlobalFlags,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
runEngine,
|
|
24
24
|
splitPassthrough,
|
|
25
25
|
validateVcrChoice
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KXTXGYG7.js";
|
|
27
27
|
import "./chunk-TO7QZGYK.js";
|
|
28
28
|
import {
|
|
29
29
|
outputError
|
|
@@ -42,7 +42,7 @@ import "./chunk-GGP5R3FU.js";
|
|
|
42
42
|
import {
|
|
43
43
|
AGENT_REASON
|
|
44
44
|
} from "./chunk-VUS2JQB2.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-76CB3CF2.js";
|
|
46
46
|
import "./chunk-XNIZGCN5.js";
|
|
47
47
|
import {
|
|
48
48
|
printError
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
import {
|
|
51
51
|
parseArguments
|
|
52
52
|
} from "./chunk-57RHXXXG.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-7F5RNOTP.js";
|
|
54
54
|
import "./chunk-G5FBSUL4.js";
|
|
55
55
|
import {
|
|
56
56
|
buildCommandWithGlobalFlags,
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
} from "./chunk-VUS2JQB2.js";
|
|
13
13
|
import {
|
|
14
14
|
getScope
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-76CB3CF2.js";
|
|
16
16
|
import {
|
|
17
17
|
getLinkedProject,
|
|
18
18
|
getProjectByNameOrId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7F5RNOTP.js";
|
|
20
20
|
import {
|
|
21
21
|
buildCommandWithGlobalFlags,
|
|
22
22
|
outputAgentError
|
|
@@ -158,5 +158,6 @@ async function resolveAlertsScope(client, opts) {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
export {
|
|
161
|
+
emitAlertsScopeError,
|
|
161
162
|
resolveAlertsScope
|
|
162
163
|
};
|
|
@@ -7,14 +7,14 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
getUpdateCommandInfo,
|
|
9
9
|
isGlobal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UXKNSAP2.js";
|
|
11
11
|
import {
|
|
12
12
|
progress,
|
|
13
13
|
require_ci_info
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LE5V7G2U.js";
|
|
15
15
|
import {
|
|
16
16
|
writeToConfigFile
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XEVKGAVI.js";
|
|
18
18
|
import {
|
|
19
19
|
getGlobalPathConfig
|
|
20
20
|
} from "./chunk-AINIBIP4.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
apiCommand,
|
|
26
26
|
listSubcommand4 as listSubcommand
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5ORMFNXL.js";
|
|
28
28
|
import {
|
|
29
29
|
require_semver
|
|
30
30
|
} from "./chunk-IB5L4LKZ.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
require_mkdirp,
|
|
34
34
|
require_pump,
|
|
35
35
|
require_tar_stream
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-N6HP5BLI.js";
|
|
37
37
|
import {
|
|
38
38
|
require_ms
|
|
39
39
|
} from "./chunk-GGP5R3FU.js";
|
|
@@ -3138,20 +3138,25 @@ async function fetchPrBuildSha(pr) {
|
|
|
3138
3138
|
const res = await fetch2(url);
|
|
3139
3139
|
if (res.status === 404) {
|
|
3140
3140
|
throw new Error(
|
|
3141
|
-
`
|
|
3141
|
+
`Couldn't find a binary for PR #${pr}. The current-sha pointer is not published yet.`
|
|
3142
3142
|
);
|
|
3143
3143
|
}
|
|
3144
3144
|
if (!res.ok) {
|
|
3145
3145
|
throw new Error(
|
|
3146
|
-
`Failed to fetch current build for PR #${pr} (HTTP ${res.status})
|
|
3146
|
+
`Failed to fetch the current build for PR #${pr} (HTTP ${res.status}).`
|
|
3147
3147
|
);
|
|
3148
3148
|
}
|
|
3149
3149
|
const sha = (await res.text()).trim().toLowerCase();
|
|
3150
3150
|
if (!/^[0-9a-f]{40}$/.test(sha)) {
|
|
3151
|
-
throw new Error(`Unexpected build SHA format for PR #${pr}
|
|
3151
|
+
throw new Error(`Unexpected build SHA format for PR #${pr}.`);
|
|
3152
3152
|
}
|
|
3153
3153
|
return sha;
|
|
3154
3154
|
}
|
|
3155
|
+
function missingPrPlatformMessage(pr, buildSha) {
|
|
3156
|
+
const platform = platformTarget();
|
|
3157
|
+
const shortSha = buildSha.slice(0, 12);
|
|
3158
|
+
return `Couldn't find a ${platform} binary for PR #${pr} (${shortSha}). This SHA exists, but this platform isn't ready yet.`;
|
|
3159
|
+
}
|
|
3155
3160
|
function getPrBinaryBaseUrl(pr, buildSha) {
|
|
3156
3161
|
return `${PR_BINARIES_URL}/${pr}/shas/${buildSha}`;
|
|
3157
3162
|
}
|
|
@@ -3159,19 +3164,17 @@ async function fetchPrChecksum(pr, buildSha) {
|
|
|
3159
3164
|
const url = `${getPrBinaryBaseUrl(pr, buildSha)}/vercel-${platformTarget()}.sha256`;
|
|
3160
3165
|
const res = await fetch2(url);
|
|
3161
3166
|
if (res.status === 404) {
|
|
3162
|
-
throw new Error(
|
|
3163
|
-
`No binary found for PR #${pr} on ${platformTarget()}. The PR may not have a build yet, or the build may still be running.`
|
|
3164
|
-
);
|
|
3167
|
+
throw new Error(missingPrPlatformMessage(pr, buildSha));
|
|
3165
3168
|
}
|
|
3166
3169
|
if (!res.ok) {
|
|
3167
3170
|
throw new Error(
|
|
3168
|
-
`Failed to fetch checksum for PR #${pr} (HTTP ${res.status})
|
|
3171
|
+
`Failed to fetch the checksum for PR #${pr} (HTTP ${res.status}).`
|
|
3169
3172
|
);
|
|
3170
3173
|
}
|
|
3171
3174
|
const text = (await res.text()).trim();
|
|
3172
3175
|
const sha = text.split(/\s+/)[0]?.toLowerCase();
|
|
3173
3176
|
if (!/^[0-9a-f]{64}$/.test(sha ?? "")) {
|
|
3174
|
-
throw new Error(`Unexpected checksum format for PR #${pr}
|
|
3177
|
+
throw new Error(`Unexpected checksum format for PR #${pr}.`);
|
|
3175
3178
|
}
|
|
3176
3179
|
return sha;
|
|
3177
3180
|
}
|
|
@@ -3182,9 +3185,7 @@ async function downloadPrBinary(pr, buildSha, expectedSha, destination) {
|
|
|
3182
3185
|
const url = `${getPrBinaryBaseUrl(pr, buildSha)}/vercel-${platformTarget()}`;
|
|
3183
3186
|
const res = await fetch2(url);
|
|
3184
3187
|
if (res.status === 404) {
|
|
3185
|
-
throw new Error(
|
|
3186
|
-
`No binary found for PR #${pr} on ${platformTarget()}. The PR may not have a build yet, or the build may still be running.`
|
|
3187
|
-
);
|
|
3188
|
+
throw new Error(missingPrPlatformMessage(pr, buildSha));
|
|
3188
3189
|
}
|
|
3189
3190
|
if (!res.ok) {
|
|
3190
3191
|
throw new Error(`Failed to download ${url} (HTTP ${res.status})`);
|
|
@@ -3222,11 +3223,15 @@ async function installAndLinkPrBinary(pr) {
|
|
|
3222
3223
|
const existing = await stat(binaryPath).catch(() => null);
|
|
3223
3224
|
const localSha = existing?.isFile() ? (await readFile4(shaPath, "utf8").catch(() => "")).trim().split(/\s+/)[0] : void 0;
|
|
3224
3225
|
if (existing?.isFile() && localSha === remoteSha) {
|
|
3226
|
+
await writeFile2(join2(versionDir, "build-sha"), `${buildSha}
|
|
3227
|
+
`);
|
|
3225
3228
|
await linkVersion(prVersionDirName(pr));
|
|
3226
3229
|
return { updated: false, buildSha };
|
|
3227
3230
|
}
|
|
3228
3231
|
output_manager_default.spinner(`Downloading Vercel CLI build for PR #${pr}\u2026`, 0);
|
|
3229
3232
|
await downloadPrBinary(pr, buildSha, remoteSha, versionDir);
|
|
3233
|
+
await writeFile2(join2(versionDir, "build-sha"), `${buildSha}
|
|
3234
|
+
`);
|
|
3230
3235
|
await linkVersion(prVersionDirName(pr));
|
|
3231
3236
|
return { updated: true, buildSha };
|
|
3232
3237
|
}
|
|
@@ -3286,9 +3291,9 @@ async function getPinnedVersion() {
|
|
|
3286
3291
|
return pinned === linked ? pinned : void 0;
|
|
3287
3292
|
}
|
|
3288
3293
|
async function getPrBuildSha(name) {
|
|
3289
|
-
const shaPath = join2(getInstallRoot(), "versions", name, "
|
|
3290
|
-
const sha = (await readFile4(shaPath, "utf8").catch(() => "")).trim().
|
|
3291
|
-
return /^[0-9a-f]{
|
|
3294
|
+
const shaPath = join2(getInstallRoot(), "versions", name, "build-sha");
|
|
3295
|
+
const sha = (await readFile4(shaPath, "utf8").catch(() => "")).trim().toLowerCase();
|
|
3296
|
+
return /^[0-9a-f]{40}$/.test(sha) ? sha : void 0;
|
|
3292
3297
|
}
|
|
3293
3298
|
function packageManagerRemovalCommand() {
|
|
3294
3299
|
const segments = process.execPath.split(sep);
|
|
@@ -6,13 +6,13 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
printProjectNotFoundError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TLPHZ7M4.js";
|
|
10
10
|
import {
|
|
11
11
|
detectExplicitScope
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-76CB3CF2.js";
|
|
13
13
|
import {
|
|
14
14
|
getLinkedProject
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7F5RNOTP.js";
|
|
16
16
|
import {
|
|
17
17
|
omitGlobalFlagsFromArgs
|
|
18
18
|
} from "./chunk-26CU4Q3C.js";
|
|
@@ -100,7 +100,7 @@ var metricsCommand = {
|
|
|
100
100
|
type: [String],
|
|
101
101
|
deprecated: false,
|
|
102
102
|
get description() {
|
|
103
|
-
return process.env.
|
|
103
|
+
return process.env.FF_LEGACY_METRICS ? "OData filter expression (repeatable, ANDed together)" : "KQL filter expression (repeatable, ANDed together)";
|
|
104
104
|
},
|
|
105
105
|
argument: "EXPR"
|
|
106
106
|
},
|
|
@@ -158,7 +158,7 @@ var metricsCommand = {
|
|
|
158
158
|
jsonOption
|
|
159
159
|
],
|
|
160
160
|
get examples() {
|
|
161
|
-
const canonical =
|
|
161
|
+
const canonical = !process.env.FF_LEGACY_METRICS;
|
|
162
162
|
const httpStatus = canonical ? "httpStatus" : "http_status";
|
|
163
163
|
const errorCode = canonical ? "errorCode" : "error_code";
|
|
164
164
|
const aiProvider = canonical ? "aiProvider" : "ai_provider";
|
|
@@ -4,40 +4,40 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import {
|
|
8
|
-
detectProjects
|
|
9
|
-
} from "./chunk-RVBZ64EQ.js";
|
|
10
7
|
import {
|
|
11
8
|
createDetectEntrypoint,
|
|
12
9
|
getServicesConfigWriteBlocker,
|
|
13
10
|
writeServicesConfig
|
|
14
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Z6YZMXVN.js";
|
|
12
|
+
import {
|
|
13
|
+
detectProjects
|
|
14
|
+
} from "./chunk-RVBZ64EQ.js";
|
|
15
15
|
import {
|
|
16
16
|
validateRootDirectory
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IUC3TR3S.js";
|
|
18
18
|
import {
|
|
19
19
|
getLocalPathConfig
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EEV2LKFC.js";
|
|
21
21
|
import {
|
|
22
22
|
isPromptBackError,
|
|
23
23
|
isPromptCanceledError
|
|
24
24
|
} from "./chunk-V4RMJKQP.js";
|
|
25
25
|
import {
|
|
26
26
|
require_dist as require_dist2
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7NRNFV77.js";
|
|
28
28
|
import {
|
|
29
29
|
require_dist2 as require_dist
|
|
30
30
|
} from "./chunk-332LMJLZ.js";
|
|
31
31
|
import {
|
|
32
32
|
readJSONFile
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-MUGF3SGQ.js";
|
|
34
34
|
import {
|
|
35
35
|
compileVercelConfig,
|
|
36
36
|
findSourceVercelConfigFile
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-L4H3DP65.js";
|
|
38
38
|
import {
|
|
39
39
|
pull
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-IK6PC2JA.js";
|
|
41
41
|
import {
|
|
42
42
|
require_frameworks
|
|
43
43
|
} from "./chunk-FRVG4OW3.js";
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
resolveGitRemote,
|
|
75
75
|
selectAndParseRemoteUrl,
|
|
76
76
|
selectOrg
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-7F5RNOTP.js";
|
|
78
78
|
import {
|
|
79
79
|
CantParseJSONFile,
|
|
80
80
|
ProjectNotFound,
|