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
|
@@ -0,0 +1,180 @@
|
|
|
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
|
+
emitRulesArgParseError,
|
|
9
|
+
handleRulesApiError,
|
|
10
|
+
parseRulesFlagsAndScope,
|
|
11
|
+
rulesCollectionPath
|
|
12
|
+
} from "./chunk-4ZWTYJSP.js";
|
|
13
|
+
import "./chunk-NE34PEHL.js";
|
|
14
|
+
import "./chunk-HTOH3MSD.js";
|
|
15
|
+
import "./chunk-APGVHLAW.js";
|
|
16
|
+
import {
|
|
17
|
+
validateJsonOutput
|
|
18
|
+
} from "./chunk-XPKWKPWA.js";
|
|
19
|
+
import {
|
|
20
|
+
rulesAddSubcommand
|
|
21
|
+
} from "./chunk-DVQ4SIWF.js";
|
|
22
|
+
import {
|
|
23
|
+
AGENT_REASON
|
|
24
|
+
} from "./chunk-E3NE4SKN.js";
|
|
25
|
+
import "./chunk-4VP55L4V.js";
|
|
26
|
+
import "./chunk-U3WLEFHU.js";
|
|
27
|
+
import {
|
|
28
|
+
buildCommandWithGlobalFlags,
|
|
29
|
+
outputAgentError
|
|
30
|
+
} from "./chunk-CGTXAXZ4.js";
|
|
31
|
+
import "./chunk-CO5D46AG.js";
|
|
32
|
+
import {
|
|
33
|
+
getFlagsSpecification,
|
|
34
|
+
parseArguments,
|
|
35
|
+
printError
|
|
36
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
37
|
+
import {
|
|
38
|
+
isAPIError,
|
|
39
|
+
packageName
|
|
40
|
+
} from "./chunk-ECRBC4HL.js";
|
|
41
|
+
import {
|
|
42
|
+
output_manager_default
|
|
43
|
+
} from "./chunk-ZQKJVHXY.js";
|
|
44
|
+
import "./chunk-S7KYDPEM.js";
|
|
45
|
+
import "./chunk-TZ2YI2VH.js";
|
|
46
|
+
|
|
47
|
+
// src/commands/alerts/rules/add.ts
|
|
48
|
+
import { readFileSync } from "fs";
|
|
49
|
+
import { resolve } from "path";
|
|
50
|
+
async function add(client, argv) {
|
|
51
|
+
let parsedArgs;
|
|
52
|
+
try {
|
|
53
|
+
parsedArgs = parseArguments(
|
|
54
|
+
argv,
|
|
55
|
+
getFlagsSpecification(rulesAddSubcommand.options)
|
|
56
|
+
);
|
|
57
|
+
} catch (e) {
|
|
58
|
+
emitRulesArgParseError(
|
|
59
|
+
client,
|
|
60
|
+
e,
|
|
61
|
+
"alerts rules add --project <name-or-id> --body <path>"
|
|
62
|
+
);
|
|
63
|
+
printError(e);
|
|
64
|
+
return 1;
|
|
65
|
+
}
|
|
66
|
+
const fr = validateJsonOutput(parsedArgs.flags);
|
|
67
|
+
if (!fr.valid) {
|
|
68
|
+
outputAgentError(
|
|
69
|
+
client,
|
|
70
|
+
{
|
|
71
|
+
status: "error",
|
|
72
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
73
|
+
message: fr.error
|
|
74
|
+
},
|
|
75
|
+
1
|
|
76
|
+
);
|
|
77
|
+
output_manager_default.error(fr.error);
|
|
78
|
+
return 1;
|
|
79
|
+
}
|
|
80
|
+
const bodyPath = parsedArgs.flags["--body"];
|
|
81
|
+
if (!bodyPath) {
|
|
82
|
+
outputAgentError(
|
|
83
|
+
client,
|
|
84
|
+
{
|
|
85
|
+
status: "error",
|
|
86
|
+
reason: AGENT_REASON.MISSING_ARGUMENTS,
|
|
87
|
+
message: `Missing required flag --body. Example: ${packageName} alerts rules add --body <file>`,
|
|
88
|
+
hint: "Provide a JSON file describing the new rule (id and teamId are assigned by the API).",
|
|
89
|
+
next: [
|
|
90
|
+
{
|
|
91
|
+
command: buildCommandWithGlobalFlags(
|
|
92
|
+
client.argv,
|
|
93
|
+
"alerts rules add --body <file>"
|
|
94
|
+
),
|
|
95
|
+
when: "Replace <file> with a path to rule JSON"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
1
|
|
100
|
+
);
|
|
101
|
+
output_manager_default.error(
|
|
102
|
+
"Missing required flag: --body <PATH> (JSON file for the new rule)."
|
|
103
|
+
);
|
|
104
|
+
return 1;
|
|
105
|
+
}
|
|
106
|
+
const scope = await parseRulesFlagsAndScope(
|
|
107
|
+
client,
|
|
108
|
+
{
|
|
109
|
+
"--project": parsedArgs.flags["--project"],
|
|
110
|
+
"--all": parsedArgs.flags["--all"]
|
|
111
|
+
},
|
|
112
|
+
fr.jsonOutput
|
|
113
|
+
);
|
|
114
|
+
if (typeof scope === "number") {
|
|
115
|
+
return scope;
|
|
116
|
+
}
|
|
117
|
+
let raw;
|
|
118
|
+
try {
|
|
119
|
+
raw = readFileSync(resolve(client.cwd, bodyPath), "utf8");
|
|
120
|
+
} catch {
|
|
121
|
+
outputAgentError(
|
|
122
|
+
client,
|
|
123
|
+
{
|
|
124
|
+
status: "error",
|
|
125
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
126
|
+
message: `Could not read --body file: ${bodyPath}`
|
|
127
|
+
},
|
|
128
|
+
1
|
|
129
|
+
);
|
|
130
|
+
output_manager_default.error(`Could not read --body file: ${bodyPath}`);
|
|
131
|
+
return 1;
|
|
132
|
+
}
|
|
133
|
+
let body;
|
|
134
|
+
try {
|
|
135
|
+
body = JSON.parse(raw);
|
|
136
|
+
} catch {
|
|
137
|
+
outputAgentError(
|
|
138
|
+
client,
|
|
139
|
+
{
|
|
140
|
+
status: "error",
|
|
141
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
142
|
+
message: "Invalid JSON in --body file."
|
|
143
|
+
},
|
|
144
|
+
1
|
|
145
|
+
);
|
|
146
|
+
output_manager_default.error("Invalid JSON in --body file.");
|
|
147
|
+
return 1;
|
|
148
|
+
}
|
|
149
|
+
delete body.id;
|
|
150
|
+
delete body.teamId;
|
|
151
|
+
if (scope.projectId !== void 0 && body.projectId === void 0) {
|
|
152
|
+
body.projectId = scope.projectId;
|
|
153
|
+
}
|
|
154
|
+
const path = rulesCollectionPath(scope);
|
|
155
|
+
output_manager_default.spinner("Creating alert rule...");
|
|
156
|
+
try {
|
|
157
|
+
const created = await client.fetch(path, {
|
|
158
|
+
method: "POST",
|
|
159
|
+
body
|
|
160
|
+
});
|
|
161
|
+
if (fr.jsonOutput) {
|
|
162
|
+
client.stdout.write(`${JSON.stringify({ rule: created }, null, 2)}
|
|
163
|
+
`);
|
|
164
|
+
} else {
|
|
165
|
+
const id = created?.id;
|
|
166
|
+
output_manager_default.success(`Created alert rule ${typeof id === "string" ? id : ""}`);
|
|
167
|
+
}
|
|
168
|
+
return 0;
|
|
169
|
+
} catch (err) {
|
|
170
|
+
if (isAPIError(err)) {
|
|
171
|
+
return handleRulesApiError(client, err, fr.jsonOutput);
|
|
172
|
+
}
|
|
173
|
+
throw err;
|
|
174
|
+
} finally {
|
|
175
|
+
output_manager_default.stopSpinner();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
export {
|
|
179
|
+
add as default
|
|
180
|
+
};
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-V5P25P7F.js";
|
|
10
10
|
import {
|
|
11
11
|
autoInstallAgentTooling
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R2BVH5SQ.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-GYBFQLYR.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-4VP55L4V.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 {
|
|
@@ -5,9 +5,11 @@ const require = __createRequire(import.meta.url);
|
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
|
-
formatOption
|
|
8
|
+
formatOption
|
|
9
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
10
|
+
import {
|
|
9
11
|
packageName
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ECRBC4HL.js";
|
|
11
13
|
|
|
12
14
|
// src/commands/metrics/command.ts
|
|
13
15
|
var schemaSubcommand = {
|