vercel 51.6.1 → 51.8.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-JALB3DKU.js → add-6TAGTCM2.js} +7 -7
- package/dist/chunks/{chunk-Z66S4G43.js → chunk-45TDB64X.js} +1 -1
- package/dist/chunks/{chunk-U73MZTAR.js → chunk-5VQMJCHT.js} +3 -3
- package/dist/chunks/{chunk-QFP6FEBN.js → chunk-6WHQFFN2.js} +1 -1
- package/dist/chunks/{chunk-FY3TMBQS.js → chunk-AQ4L3FS4.js} +1 -1
- package/dist/chunks/{chunk-DAOAZ2VQ.js → chunk-BHDZCUTT.js} +1 -1
- package/dist/chunks/{chunk-PVZBM6NU.js → chunk-BJQTGP42.js} +1 -1
- package/dist/chunks/{chunk-CHUU7VXC.js → chunk-BNVEZBEW.js} +75 -68
- package/dist/chunks/{chunk-MUJZV257.js → chunk-BQI2CW7A.js} +6 -6
- package/dist/chunks/{chunk-DED5G3HZ.js → chunk-CRZM5WM2.js} +1 -1
- package/dist/chunks/{chunk-MGJMZIIT.js → chunk-CUCRUPRY.js} +1 -1
- package/dist/chunks/{chunk-RW7LIX2Y.js → chunk-DQPDIHII.js} +2 -2
- package/dist/chunks/{chunk-LUCCJW67.js → chunk-DVQ4SIWF.js} +1 -1
- package/dist/chunks/{chunk-DF4AVQY3.js → chunk-G6RXZLQ2.js} +2 -2
- package/dist/chunks/{chunk-WCTFUOSJ.js → chunk-GE6G37P4.js} +1 -1
- package/dist/chunks/{chunk-3N3AYMMW.js → chunk-H2PHTCJL.js} +30 -17
- package/dist/chunks/{chunk-HUPHOH2F.js → chunk-HRVQZZ3Q.js} +1 -1
- package/dist/chunks/{chunk-553A6UFX.js → chunk-IHOJDWAH.js} +6 -6
- package/dist/chunks/{chunk-FH2OHGXG.js → chunk-KM6BIRA3.js} +3 -3
- package/dist/chunks/{chunk-LUJPLXGG.js → chunk-KUY7VLTK.js} +2 -2
- package/dist/chunks/{chunk-C7UTFMYF.js → chunk-LDXYSGPZ.js} +2 -2
- package/dist/chunks/{chunk-34IM6J7A.js → chunk-N5IS4YW4.js} +2 -2
- package/dist/chunks/{chunk-4X7GBE5B.js → chunk-R4ZPBOD7.js} +23 -23
- package/dist/chunks/{chunk-VDM5O3P6.js → chunk-RFMC2QXQ.js} +3 -3
- package/dist/chunks/{chunk-BBW6EGBQ.js → chunk-SKXUP3WW.js} +1 -1
- package/dist/chunks/{chunk-7L4XVUFK.js → chunk-TAOVG4PS.js} +2 -2
- package/dist/chunks/{chunk-UG4457SI.js → chunk-U7MQBM3F.js} +70 -57
- package/dist/chunks/{chunk-WYRFA4PX.js → chunk-UBOSX7RM.js} +2 -2
- package/dist/chunks/{chunk-QHXUBID6.js → chunk-UP2QQYRS.js} +3 -3
- package/dist/chunks/{chunk-XLKXWNRG.js → chunk-UWKTUK3W.js} +1 -1
- package/dist/chunks/{chunk-MCTAPJSL.js → chunk-VGWGLBUC.js} +1 -1
- package/dist/chunks/{chunk-CGTXAXZ4.js → chunk-XKHLPA6V.js} +3 -1
- package/dist/chunks/{chunk-5KFTN63Q.js → chunk-Y3HAJQCS.js} +4 -4
- package/dist/chunks/{compile-vercel-config-V2SHBZFW.js → compile-vercel-config-3LQ66C4J.js} +3 -3
- package/dist/chunks/{delete-5RI2PRIT.js → delete-57Y647IJ.js} +5 -5
- package/dist/chunks/{disable-JPKO7VCV.js → disable-E7QAIMBG.js} +5 -5
- package/dist/chunks/{discard-KXGXXDNX.js → discard-6JNSEHUD.js} +5 -5
- package/dist/chunks/{edit-VFUE5PVU.js → edit-XKOVDTOO.js} +6 -6
- package/dist/chunks/{enable-V2AX2FXX.js → enable-HXRMVTBB.js} +5 -5
- package/dist/chunks/{export-BG3TOT6G.js → export-MRADQNKX.js} +5 -5
- package/dist/chunks/{inspect-3QVCZVKV.js → inspect-AOOSX4VO.js} +7 -7
- package/dist/chunks/{list-Y2YMJWEY.js → list-LQ4BDCK7.js} +5 -5
- package/dist/chunks/{list-CWTYXKB5.js → list-YIDM3OOG.js} +8 -8
- package/dist/chunks/{ls-SY2CP56I.js → ls-7GZP6WNF.js} +7 -7
- package/dist/chunks/{publish-75IJ4PZS.js → publish-VPLDS2W7.js} +5 -5
- package/dist/chunks/{query-MLMGNGL2.js → query-SRFELIAP.js} +6 -6
- package/dist/chunks/{reorder-757V4BF5.js → reorder-UWAXWRXX.js} +5 -5
- package/dist/chunks/{restore-KV44XHFS.js → restore-YHQNMAGI.js} +5 -5
- package/dist/chunks/{rm-3EGKFLKW.js → rm-HA373E4I.js} +7 -7
- package/dist/chunks/{rule-inspect-AYUGCLVJ.js → rule-inspect-WMR7SVJY.js} +7 -7
- package/dist/chunks/{rules-FUFDJOIP.js → rules-CPRD5HRH.js} +7 -7
- package/dist/chunks/{schema-CI2XUYTW.js → schema-AGVIOWAU.js} +7 -7
- package/dist/chunks/{types-M7LVCA3E.js → types-QNN5CDCB.js} +3 -3
- package/dist/chunks/{update-6EM4XIDW.js → update-K5GTSDIT.js} +7 -7
- package/dist/commands/build/index.js +24 -15
- package/dist/commands/deploy/index.js +21 -21
- package/dist/commands/dev/index.js +35 -29
- package/dist/commands/env/index.js +146 -33
- package/dist/commands/link/index.js +17 -17
- package/dist/commands/list/index.js +8 -8
- package/dist/commands-bulk.js +215 -115
- package/dist/index.js +20 -20
- package/dist/version.mjs +1 -1
- package/package.json +18 -18
|
@@ -9,31 +9,31 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesCollectionPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-DQPDIHII.js";
|
|
13
|
+
import "./chunk-UP2QQYRS.js";
|
|
14
14
|
import "./chunk-HTOH3MSD.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-CUCRUPRY.js";
|
|
16
16
|
import {
|
|
17
17
|
validateJsonOutput
|
|
18
18
|
} from "./chunk-XPKWKPWA.js";
|
|
19
19
|
import {
|
|
20
20
|
rulesAddSubcommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DVQ4SIWF.js";
|
|
22
22
|
import {
|
|
23
23
|
AGENT_REASON
|
|
24
24
|
} from "./chunk-E3NE4SKN.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-U7MQBM3F.js";
|
|
26
26
|
import "./chunk-U3WLEFHU.js";
|
|
27
27
|
import {
|
|
28
28
|
buildCommandWithGlobalFlags,
|
|
29
29
|
outputAgentError
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-XKHLPA6V.js";
|
|
31
31
|
import "./chunk-CO5D46AG.js";
|
|
32
32
|
import {
|
|
33
33
|
getFlagsSpecification,
|
|
34
34
|
parseArguments,
|
|
35
35
|
printError
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
37
37
|
import {
|
|
38
38
|
isAPIError,
|
|
39
39
|
packageName
|
|
@@ -6,16 +6,16 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
setupAndLink
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H2PHTCJL.js";
|
|
10
10
|
import {
|
|
11
11
|
getLinkedProject,
|
|
12
12
|
param,
|
|
13
13
|
resolveProjectCwd
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U7MQBM3F.js";
|
|
15
15
|
import {
|
|
16
16
|
buildCommandWithYes,
|
|
17
17
|
outputActionRequired
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XKHLPA6V.js";
|
|
19
19
|
import {
|
|
20
20
|
getCommandName,
|
|
21
21
|
getCommandNamePlain
|
|
@@ -6,30 +6,33 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
getUpdateCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SKXUP3WW.js";
|
|
10
10
|
import {
|
|
11
11
|
login
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y3HAJQCS.js";
|
|
13
13
|
import {
|
|
14
14
|
apiCommand,
|
|
15
15
|
listSubcommand2 as listSubcommand,
|
|
16
16
|
loginCommand
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-R4ZPBOD7.js";
|
|
18
18
|
import {
|
|
19
19
|
help
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LDXYSGPZ.js";
|
|
21
21
|
import {
|
|
22
22
|
global_path_default
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-U7MQBM3F.js";
|
|
24
24
|
import {
|
|
25
25
|
TelemetryClient
|
|
26
26
|
} from "./chunk-U3WLEFHU.js";
|
|
27
|
+
import {
|
|
28
|
+
require_ms
|
|
29
|
+
} from "./chunk-CO5D46AG.js";
|
|
27
30
|
import {
|
|
28
31
|
getFlagsSpecification,
|
|
29
32
|
parseArguments,
|
|
30
33
|
printError,
|
|
31
34
|
require_strip_ansi
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
33
36
|
import {
|
|
34
37
|
packageName
|
|
35
38
|
} from "./chunk-ECRBC4HL.js";
|
|
@@ -450,7 +453,7 @@ async function resolveOpenApiTagForTeamsCli() {
|
|
|
450
453
|
}
|
|
451
454
|
|
|
452
455
|
// src/commands/api/index.ts
|
|
453
|
-
var
|
|
456
|
+
var import_chalk4 = __toESM(require_source(), 1);
|
|
454
457
|
|
|
455
458
|
// src/util/telemetry/commands/api/index.ts
|
|
456
459
|
var ApiTelemetryClient = class extends TelemetryClient {
|
|
@@ -945,6 +948,10 @@ async function buildRequestForResolvedOperation(endpoint, bodyFields, flags, pos
|
|
|
945
948
|
};
|
|
946
949
|
}
|
|
947
950
|
|
|
951
|
+
// src/util/openapi/vercel-cli-table.ts
|
|
952
|
+
var import_ms = __toESM(require_ms(), 1);
|
|
953
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
954
|
+
|
|
948
955
|
// src/util/openapi/resolve-by-tag-operation.ts
|
|
949
956
|
function resolveEndpointByTagAndOperationId(endpoints, tag, operationHint) {
|
|
950
957
|
const tagLower = tag.toLowerCase();
|
|
@@ -1050,19 +1057,19 @@ async function tryOpenApiFallback(client, cliArgs, resolveTag) {
|
|
|
1050
1057
|
var API_BASE_URL = "https://api.vercel.com";
|
|
1051
1058
|
|
|
1052
1059
|
// src/commands/api/format-utils.ts
|
|
1053
|
-
var
|
|
1060
|
+
var import_chalk2 = __toESM(require_source(), 1);
|
|
1054
1061
|
function colorizeMethod(method) {
|
|
1055
1062
|
switch (method) {
|
|
1056
1063
|
case "GET":
|
|
1057
|
-
return
|
|
1064
|
+
return import_chalk2.default.cyan(method);
|
|
1058
1065
|
case "POST":
|
|
1059
|
-
return
|
|
1066
|
+
return import_chalk2.default.green(method);
|
|
1060
1067
|
case "PUT":
|
|
1061
|
-
return
|
|
1068
|
+
return import_chalk2.default.yellow(method);
|
|
1062
1069
|
case "PATCH":
|
|
1063
|
-
return
|
|
1070
|
+
return import_chalk2.default.blue(method);
|
|
1064
1071
|
case "DELETE":
|
|
1065
|
-
return
|
|
1072
|
+
return import_chalk2.default.red(method);
|
|
1066
1073
|
default:
|
|
1067
1074
|
return method;
|
|
1068
1075
|
}
|
|
@@ -1073,19 +1080,19 @@ function colorizeMethodPadded(method, width = 7) {
|
|
|
1073
1080
|
return colored + padding;
|
|
1074
1081
|
}
|
|
1075
1082
|
function formatPathParam(paramName) {
|
|
1076
|
-
return
|
|
1083
|
+
return import_chalk2.default.cyan(`{${paramName}}`);
|
|
1077
1084
|
}
|
|
1078
1085
|
function formatTypeHint(type) {
|
|
1079
|
-
return
|
|
1086
|
+
return import_chalk2.default.dim(`[${type}]`);
|
|
1080
1087
|
}
|
|
1081
1088
|
function formatDescription(description) {
|
|
1082
1089
|
if (!description)
|
|
1083
1090
|
return "";
|
|
1084
|
-
return
|
|
1091
|
+
return import_chalk2.default.gray(` (${description})`);
|
|
1085
1092
|
}
|
|
1086
1093
|
|
|
1087
1094
|
// src/commands/api/display-columns.ts
|
|
1088
|
-
var
|
|
1095
|
+
var import_chalk3 = __toESM(require_source(), 1);
|
|
1089
1096
|
function getByPath(obj, path) {
|
|
1090
1097
|
let current = obj;
|
|
1091
1098
|
for (const segment of path.split(".")) {
|
|
@@ -1119,7 +1126,7 @@ function parseArrayColumns(data, columns) {
|
|
|
1119
1126
|
}
|
|
1120
1127
|
function formatValue(value) {
|
|
1121
1128
|
if (value === null || value === void 0)
|
|
1122
|
-
return
|
|
1129
|
+
return import_chalk3.default.dim("\u2013");
|
|
1123
1130
|
if (typeof value === "number") {
|
|
1124
1131
|
if (value > 1e12 && value < 2e12) {
|
|
1125
1132
|
return new Date(value).toISOString();
|
|
@@ -1137,7 +1144,7 @@ function renderCard(data, columns) {
|
|
|
1137
1144
|
const maxLabel = Math.max(...entries.map(([label]) => label.length));
|
|
1138
1145
|
const lines = entries.map(([label, path]) => {
|
|
1139
1146
|
const value = getByPath(data, path);
|
|
1140
|
-
return ` ${
|
|
1147
|
+
return ` ${import_chalk3.default.gray(label.padEnd(maxLabel))} ${formatValue(value)}`;
|
|
1141
1148
|
});
|
|
1142
1149
|
return lines.join("\n");
|
|
1143
1150
|
}
|
|
@@ -1154,7 +1161,7 @@ function renderTable(rows, columns) {
|
|
|
1154
1161
|
);
|
|
1155
1162
|
return Math.max(label.length, dataMax);
|
|
1156
1163
|
});
|
|
1157
|
-
const header = headerRow.map((h, i) =>
|
|
1164
|
+
const header = headerRow.map((h, i) => import_chalk3.default.bold(h.padEnd(widths[i]))).join(" ");
|
|
1158
1165
|
const body = dataRows.map(
|
|
1159
1166
|
(row) => row.map((cell, i) => {
|
|
1160
1167
|
const pad = widths[i] - stripAnsi(cell).length;
|
|
@@ -1338,14 +1345,14 @@ async function printOperationHelpForTagCommand(flags, tag, operationId) {
|
|
|
1338
1345
|
function printOperationHelpDetails(ep, bodyFields, tag) {
|
|
1339
1346
|
const lines = [];
|
|
1340
1347
|
lines.push("");
|
|
1341
|
-
lines.push(
|
|
1348
|
+
lines.push(import_chalk4.default.bold(ep.operationId || "(operation)"));
|
|
1342
1349
|
const blurb = ep.summary?.trim() || ep.description?.trim();
|
|
1343
1350
|
if (blurb) {
|
|
1344
1351
|
lines.push("");
|
|
1345
|
-
lines.push(
|
|
1352
|
+
lines.push(import_chalk4.default.dim(blurb));
|
|
1346
1353
|
}
|
|
1347
1354
|
lines.push("");
|
|
1348
|
-
lines.push(
|
|
1355
|
+
lines.push(import_chalk4.default.bold("Options"));
|
|
1349
1356
|
lines.push("");
|
|
1350
1357
|
const pathParams = ep.parameters.filter((p) => p.in === "path");
|
|
1351
1358
|
const orderedParams = [
|
|
@@ -1355,65 +1362,65 @@ function printOperationHelpDetails(ep, bodyFields, tag) {
|
|
|
1355
1362
|
...ep.parameters.filter((p) => p.in === "cookie")
|
|
1356
1363
|
];
|
|
1357
1364
|
for (const p of orderedParams) {
|
|
1358
|
-
const globalNote = p.in === "query" && GLOBAL_CLI_QUERY_PARAMS.has(p.name) ?
|
|
1365
|
+
const globalNote = p.in === "query" && GLOBAL_CLI_QUERY_PARAMS.has(p.name) ? import_chalk4.default.dim(" (often set via --scope)") : "";
|
|
1359
1366
|
let reqLabel;
|
|
1360
1367
|
if (p.in === "query") {
|
|
1361
|
-
reqLabel = p.required && !GLOBAL_CLI_QUERY_PARAMS.has(p.name) ?
|
|
1368
|
+
reqLabel = p.required && !GLOBAL_CLI_QUERY_PARAMS.has(p.name) ? import_chalk4.default.red("required") : import_chalk4.default.dim("optional");
|
|
1362
1369
|
} else if (p.in === "path") {
|
|
1363
|
-
reqLabel = p.required !== false ?
|
|
1370
|
+
reqLabel = p.required !== false ? import_chalk4.default.red("required") : import_chalk4.default.dim("optional");
|
|
1364
1371
|
} else if (p.in === "header") {
|
|
1365
|
-
reqLabel = p.required ?
|
|
1372
|
+
reqLabel = p.required ? import_chalk4.default.red("required") : import_chalk4.default.dim("optional");
|
|
1366
1373
|
} else {
|
|
1367
|
-
reqLabel = p.required ?
|
|
1374
|
+
reqLabel = p.required ? import_chalk4.default.red("required") : import_chalk4.default.dim("optional");
|
|
1368
1375
|
}
|
|
1369
1376
|
lines.push(
|
|
1370
|
-
` ${
|
|
1377
|
+
` ${import_chalk4.default.cyan(p.name)} ${reqLabel}${globalNote}${formatDescription(p.description)}`
|
|
1371
1378
|
);
|
|
1372
1379
|
}
|
|
1373
1380
|
for (const f of bodyFields) {
|
|
1374
|
-
const req = f.required ?
|
|
1381
|
+
const req = f.required ? import_chalk4.default.red("required") : import_chalk4.default.dim("optional");
|
|
1375
1382
|
const typeHint = f.type ? ` ${formatTypeHint(f.type)}` : "";
|
|
1376
1383
|
lines.push(
|
|
1377
|
-
` ${
|
|
1384
|
+
` ${import_chalk4.default.cyan(f.name)} ${req}${typeHint}${formatDescription(f.description)}`
|
|
1378
1385
|
);
|
|
1379
1386
|
}
|
|
1380
1387
|
if (orderedParams.length === 0 && bodyFields.length === 0) {
|
|
1381
|
-
lines.push(
|
|
1388
|
+
lines.push(import_chalk4.default.dim(" (none)"));
|
|
1382
1389
|
}
|
|
1383
1390
|
lines.push("");
|
|
1384
|
-
lines.push(
|
|
1391
|
+
lines.push(import_chalk4.default.bold("Example"));
|
|
1385
1392
|
const exampleSuffix = pathParams.length > 0 ? ` ${pathParams.map((p) => `${p.name}=<value>`).join(" ")}` : "";
|
|
1386
1393
|
lines.push(
|
|
1387
|
-
|
|
1394
|
+
import_chalk4.default.dim(` ${packageName} api ${tag} ${ep.operationId}${exampleSuffix}`)
|
|
1388
1395
|
);
|
|
1389
1396
|
lines.push("");
|
|
1390
1397
|
output_manager_default.print(lines.join("\n"));
|
|
1391
1398
|
}
|
|
1392
1399
|
function printMissingOperationParamsHelp(endpoint, missing) {
|
|
1393
1400
|
output_manager_default.error(
|
|
1394
|
-
`Missing required options for operation ${
|
|
1401
|
+
`Missing required options for operation ${import_chalk4.default.bold(endpoint.operationId)}.`
|
|
1395
1402
|
);
|
|
1396
1403
|
output_manager_default.log(
|
|
1397
|
-
|
|
1404
|
+
import_chalk4.default.dim(
|
|
1398
1405
|
`Pass each as key=value after the operationId, or use -F key=value. Example: \`${packageName} api ${endpoint.tags[0] ?? "tag"} ${endpoint.operationId} idOrName=my-project\``
|
|
1399
1406
|
)
|
|
1400
1407
|
);
|
|
1401
1408
|
output_manager_default.log("");
|
|
1402
|
-
output_manager_default.log(
|
|
1409
|
+
output_manager_default.log(import_chalk4.default.bold("Options"));
|
|
1403
1410
|
output_manager_default.log("");
|
|
1404
1411
|
for (const p of missing.path) {
|
|
1405
|
-
output_manager_default.log(` ${
|
|
1412
|
+
output_manager_default.log(` ${import_chalk4.default.cyan(p.name)}${formatDescription(p.description)}`);
|
|
1406
1413
|
}
|
|
1407
1414
|
for (const p of missing.header) {
|
|
1408
|
-
output_manager_default.log(` ${
|
|
1415
|
+
output_manager_default.log(` ${import_chalk4.default.cyan(p.name)}${formatDescription(p.description)}`);
|
|
1409
1416
|
}
|
|
1410
1417
|
for (const p of missing.query) {
|
|
1411
|
-
output_manager_default.log(` ${
|
|
1418
|
+
output_manager_default.log(` ${import_chalk4.default.cyan(p.name)}${formatDescription(p.description)}`);
|
|
1412
1419
|
}
|
|
1413
1420
|
for (const f of missing.body) {
|
|
1414
1421
|
const typeHint = f.type ? ` ${formatTypeHint(f.type)}` : "";
|
|
1415
1422
|
output_manager_default.log(
|
|
1416
|
-
` ${
|
|
1423
|
+
` ${import_chalk4.default.cyan(f.name)}${typeHint}${formatDescription(f.description)}`
|
|
1417
1424
|
);
|
|
1418
1425
|
}
|
|
1419
1426
|
output_manager_default.log("");
|
|
@@ -1455,14 +1462,14 @@ async function promptMissingParamsForTagOperation(client, endpoint, bodyFields,
|
|
|
1455
1462
|
}
|
|
1456
1463
|
for (const param of missing.header) {
|
|
1457
1464
|
const value = await client.input.text({
|
|
1458
|
-
message: `Enter value for header ${
|
|
1465
|
+
message: `Enter value for header ${import_chalk4.default.cyan(param.name)}${formatDescription(param.description)}:`,
|
|
1459
1466
|
validate: createRequiredValidator(param.name)
|
|
1460
1467
|
});
|
|
1461
1468
|
pos.push(`${param.name}=${value}`);
|
|
1462
1469
|
}
|
|
1463
1470
|
for (const param of missing.query) {
|
|
1464
1471
|
const value = await client.input.text({
|
|
1465
|
-
message: `Enter value for ${
|
|
1472
|
+
message: `Enter value for ${import_chalk4.default.cyan(param.name)}${formatDescription(param.description)}:`,
|
|
1466
1473
|
validate: createRequiredValidator(param.name)
|
|
1467
1474
|
});
|
|
1468
1475
|
pos.push(`${param.name}=${value}`);
|
|
@@ -1512,14 +1519,14 @@ async function promptUnsetOptionalParamsForTagOperation(client, endpoint, bodyFi
|
|
|
1512
1519
|
message: "Select optional query parameters to include:",
|
|
1513
1520
|
pageSize: 20,
|
|
1514
1521
|
choices: unset.query.map((p) => ({
|
|
1515
|
-
name: `${
|
|
1522
|
+
name: `${import_chalk4.default.cyan(p.name)}${GLOBAL_CLI_QUERY_PARAMS.has(p.name) ? import_chalk4.default.dim(" (team / scope; omit to use CLI default)") : ""}${formatDescription(p.description)}`,
|
|
1516
1523
|
value: p.name
|
|
1517
1524
|
}))
|
|
1518
1525
|
});
|
|
1519
1526
|
for (const paramName of selected) {
|
|
1520
1527
|
const param = unset.query.find((p) => p.name === paramName);
|
|
1521
1528
|
const value = await client.input.text({
|
|
1522
|
-
message: `Enter value for ${
|
|
1529
|
+
message: `Enter value for ${import_chalk4.default.cyan(param.name)}${formatDescription(param.description)}:`,
|
|
1523
1530
|
validate: createRequiredValidator(param.name)
|
|
1524
1531
|
});
|
|
1525
1532
|
pos.push(`${param.name}=${value}`);
|
|
@@ -1530,14 +1537,14 @@ async function promptUnsetOptionalParamsForTagOperation(client, endpoint, bodyFi
|
|
|
1530
1537
|
message: "Select optional header parameters to include:",
|
|
1531
1538
|
pageSize: 20,
|
|
1532
1539
|
choices: unset.header.map((p) => ({
|
|
1533
|
-
name: `${
|
|
1540
|
+
name: `${import_chalk4.default.cyan(p.name)}${formatDescription(p.description)}`,
|
|
1534
1541
|
value: p.name
|
|
1535
1542
|
}))
|
|
1536
1543
|
});
|
|
1537
1544
|
for (const paramName of selected) {
|
|
1538
1545
|
const param = unset.header.find((p) => p.name === paramName);
|
|
1539
1546
|
const value = await client.input.text({
|
|
1540
|
-
message: `Enter value for header ${
|
|
1547
|
+
message: `Enter value for header ${import_chalk4.default.cyan(param.name)}${formatDescription(param.description)}:`,
|
|
1541
1548
|
validate: createRequiredValidator(param.name)
|
|
1542
1549
|
});
|
|
1543
1550
|
pos.push(`${param.name}=${value}`);
|
|
@@ -1548,7 +1555,7 @@ async function promptUnsetOptionalParamsForTagOperation(client, endpoint, bodyFi
|
|
|
1548
1555
|
message: "Select optional body fields to include:",
|
|
1549
1556
|
pageSize: 20,
|
|
1550
1557
|
choices: unset.body.map((f) => ({
|
|
1551
|
-
name: `${
|
|
1558
|
+
name: `${import_chalk4.default.cyan(f.name)}${f.type ? ` ${formatTypeHint(f.type)}` : ""}${formatDescription(f.description)}`,
|
|
1552
1559
|
value: f.name
|
|
1553
1560
|
}))
|
|
1554
1561
|
});
|
|
@@ -1738,16 +1745,16 @@ function outputMutationResult(client, response, method, errorBody) {
|
|
|
1738
1745
|
const verb = method === "POST" ? "Created" : method === "PATCH" || method === "PUT" ? "Updated" : method === "DELETE" ? "Deleted" : "Done";
|
|
1739
1746
|
if (response.ok) {
|
|
1740
1747
|
client.stdout.write(
|
|
1741
|
-
`${
|
|
1748
|
+
`${import_chalk4.default.green("Success")} ${verb} ${import_chalk4.default.dim(`(${response.status})`)}
|
|
1742
1749
|
`
|
|
1743
1750
|
);
|
|
1744
1751
|
return 0;
|
|
1745
1752
|
}
|
|
1746
1753
|
const errorMessage = extractErrorMessage(errorBody);
|
|
1747
|
-
const statusLine = `${
|
|
1754
|
+
const statusLine = `${import_chalk4.default.red("Error")} ${response.status} ${response.statusText}`;
|
|
1748
1755
|
client.stdout.write(
|
|
1749
1756
|
errorMessage ? `${statusLine}
|
|
1750
|
-
${
|
|
1757
|
+
${import_chalk4.default.dim(errorMessage)}
|
|
1751
1758
|
` : `${statusLine}
|
|
1752
1759
|
`
|
|
1753
1760
|
);
|
|
@@ -1880,17 +1887,17 @@ function outputEndpointsAsTable(endpoints) {
|
|
|
1880
1887
|
const methodWidth = 7;
|
|
1881
1888
|
output_manager_default.log("");
|
|
1882
1889
|
for (const [path, methods] of grouped) {
|
|
1883
|
-
output_manager_default.log(
|
|
1890
|
+
output_manager_default.log(import_chalk4.default.bold(path));
|
|
1884
1891
|
for (const { method, summary } of methods) {
|
|
1885
1892
|
const coloredMethod = colorizeMethod(method);
|
|
1886
1893
|
const paddedMethod = method.padEnd(methodWidth);
|
|
1887
1894
|
const methodDisplay = coloredMethod + paddedMethod.slice(method.length);
|
|
1888
|
-
output_manager_default.log(` ${methodDisplay} ${
|
|
1895
|
+
output_manager_default.log(` ${methodDisplay} ${import_chalk4.default.gray(summary || "")}`);
|
|
1889
1896
|
}
|
|
1890
1897
|
output_manager_default.log("");
|
|
1891
1898
|
}
|
|
1892
1899
|
output_manager_default.log(
|
|
1893
|
-
`${
|
|
1900
|
+
`${import_chalk4.default.bold(grouped.size.toString())} routes, ${import_chalk4.default.bold(endpoints.length.toString())} endpoints`
|
|
1894
1901
|
);
|
|
1895
1902
|
return 0;
|
|
1896
1903
|
}
|
|
@@ -1927,7 +1934,7 @@ async function promptForParameters(client, path, parameters, bodyFieldsSpec) {
|
|
|
1927
1934
|
const queryValues = {};
|
|
1928
1935
|
for (const param of requiredQueryParams) {
|
|
1929
1936
|
queryValues[param.name] = await client.input.text({
|
|
1930
|
-
message: `Enter value for ${
|
|
1937
|
+
message: `Enter value for ${import_chalk4.default.cyan(param.name)}${formatDescription(param.description)}:`,
|
|
1931
1938
|
validate: createRequiredValidator(param.name)
|
|
1932
1939
|
});
|
|
1933
1940
|
}
|
|
@@ -1936,14 +1943,14 @@ async function promptForParameters(client, path, parameters, bodyFieldsSpec) {
|
|
|
1936
1943
|
message: "Select optional query parameters to include:",
|
|
1937
1944
|
pageSize: 20,
|
|
1938
1945
|
choices: optionalQueryParams.map((p) => ({
|
|
1939
|
-
name: `${
|
|
1946
|
+
name: `${import_chalk4.default.cyan(p.name)}${formatDescription(p.description)}`,
|
|
1940
1947
|
value: p.name
|
|
1941
1948
|
}))
|
|
1942
1949
|
});
|
|
1943
1950
|
for (const paramName of selectedOptionalParams) {
|
|
1944
1951
|
const param = optionalQueryParams.find((p) => p.name === paramName);
|
|
1945
1952
|
queryValues[param.name] = await client.input.text({
|
|
1946
|
-
message: `Enter value for ${
|
|
1953
|
+
message: `Enter value for ${import_chalk4.default.cyan(param.name)}${formatDescription(param.description)}:`,
|
|
1947
1954
|
validate: createRequiredValidator(param.name)
|
|
1948
1955
|
});
|
|
1949
1956
|
}
|
|
@@ -1958,7 +1965,7 @@ async function promptForParameters(client, path, parameters, bodyFieldsSpec) {
|
|
|
1958
1965
|
message: "Select optional body fields to include:",
|
|
1959
1966
|
pageSize: 20,
|
|
1960
1967
|
choices: optionalBodyFields.map((f) => ({
|
|
1961
|
-
name: `${
|
|
1968
|
+
name: `${import_chalk4.default.cyan(f.name)}${f.type ? ` ${formatTypeHint(f.type)}` : ""}${formatDescription(f.description)}`,
|
|
1962
1969
|
value: f.name
|
|
1963
1970
|
}))
|
|
1964
1971
|
});
|
|
@@ -1976,14 +1983,14 @@ async function promptForParameters(client, path, parameters, bodyFieldsSpec) {
|
|
|
1976
1983
|
}
|
|
1977
1984
|
async function promptForBodyField(client, field, required) {
|
|
1978
1985
|
const description = formatDescription(field.description);
|
|
1979
|
-
const optionalHint = required ? "" :
|
|
1986
|
+
const optionalHint = required ? "" : import_chalk4.default.dim(" (optional)");
|
|
1980
1987
|
if (field.type === "array" && field.enumValues && field.enumValues.length > 0) {
|
|
1981
1988
|
const choices = field.enumValues.map((v) => ({
|
|
1982
1989
|
name: String(v),
|
|
1983
1990
|
value: String(v)
|
|
1984
1991
|
}));
|
|
1985
1992
|
const selected = await client.input.checkbox({
|
|
1986
|
-
message: `Select values for ${
|
|
1993
|
+
message: `Select values for ${import_chalk4.default.cyan(field.name)}${optionalHint}${description}:`,
|
|
1987
1994
|
choices,
|
|
1988
1995
|
required
|
|
1989
1996
|
});
|
|
@@ -1995,16 +2002,16 @@ async function promptForBodyField(client, field, required) {
|
|
|
1995
2002
|
value: String(v)
|
|
1996
2003
|
}));
|
|
1997
2004
|
if (!required) {
|
|
1998
|
-
choices.unshift({ name:
|
|
2005
|
+
choices.unshift({ name: import_chalk4.default.dim("(skip)"), value: "" });
|
|
1999
2006
|
}
|
|
2000
2007
|
return client.input.select({
|
|
2001
|
-
message: `Select value for ${
|
|
2008
|
+
message: `Select value for ${import_chalk4.default.cyan(field.name)}${optionalHint}${description}:`,
|
|
2002
2009
|
choices
|
|
2003
2010
|
});
|
|
2004
2011
|
}
|
|
2005
2012
|
const typeHint = field.type ? ` ${formatTypeHint(field.type)}` : "";
|
|
2006
2013
|
return client.input.text({
|
|
2007
|
-
message: `Enter value for ${
|
|
2014
|
+
message: `Enter value for ${import_chalk4.default.cyan(field.name)}${optionalHint}${typeHint}${description}:`,
|
|
2008
2015
|
validate: required ? createRequiredValidator(field.name) : void 0
|
|
2009
2016
|
});
|
|
2010
2017
|
}
|
|
@@ -2167,7 +2174,7 @@ async function executeUpgrade() {
|
|
|
2167
2174
|
}
|
|
2168
2175
|
|
|
2169
2176
|
// src/commands/login/index.ts
|
|
2170
|
-
var
|
|
2177
|
+
var import_chalk5 = __toESM(require_source(), 1);
|
|
2171
2178
|
|
|
2172
2179
|
// src/util/telemetry/commands/login/index.ts
|
|
2173
2180
|
var LoginTelemetryClient = class extends TelemetryClient {
|
|
@@ -2218,12 +2225,12 @@ async function login2(client, options) {
|
|
|
2218
2225
|
return "deprecated" in option && option.deprecated;
|
|
2219
2226
|
});
|
|
2220
2227
|
if (obsoleteFlags.length) {
|
|
2221
|
-
const flags = obsoleteFlags.map((f) =>
|
|
2228
|
+
const flags = obsoleteFlags.map((f) => import_chalk5.default.bold(f)).join(", ");
|
|
2222
2229
|
output_manager_default.warn(`The following flags are deprecated: ${flags}`);
|
|
2223
2230
|
}
|
|
2224
2231
|
const obsoleteArguments = parsedArgs.args.slice(1);
|
|
2225
2232
|
if (obsoleteArguments.length) {
|
|
2226
|
-
const args = obsoleteArguments.map((a) =>
|
|
2233
|
+
const args = obsoleteArguments.map((a) => import_chalk5.default.bold(a)).join(", ");
|
|
2227
2234
|
output_manager_default.warn(`The following arguments are deprecated: ${args}`);
|
|
2228
2235
|
}
|
|
2229
2236
|
if (obsoleteArguments.length || obsoleteFlags.length) {
|
|
@@ -2238,7 +2245,7 @@ async function login2(client, options) {
|
|
|
2238
2245
|
}
|
|
2239
2246
|
|
|
2240
2247
|
// src/util/output/box.ts
|
|
2241
|
-
var
|
|
2248
|
+
var import_chalk6 = __toESM(require_source(), 1);
|
|
2242
2249
|
var import_strip_ansi = __toESM(require_strip_ansi(), 1);
|
|
2243
2250
|
var border = ["\u2500", "\u256D", "\u256E", "\u2502", "\u2502", "\u2570", "\u256F"];
|
|
2244
2251
|
var nothing = ["\u2500", "", "", "", "", "", ""];
|
|
@@ -2250,7 +2257,7 @@ function box(message, {
|
|
|
2250
2257
|
} = {}) {
|
|
2251
2258
|
const lines = message.split(/\r?\n/).map((line) => [line, (0, import_strip_ansi.default)(line).length]);
|
|
2252
2259
|
const maxLine = lines.reduce((p, [, len]) => Math.max(p, len), 0);
|
|
2253
|
-
const borderColorFn = borderColor &&
|
|
2260
|
+
const borderColorFn = borderColor && import_chalk6.default[borderColor] || import_chalk6.default.yellow;
|
|
2254
2261
|
const clampedSidePadding = Math.max(1, padding * 3);
|
|
2255
2262
|
const narrowMode = maxLine + 2 + clampedSidePadding * 2 > cols;
|
|
2256
2263
|
const sidePadding = narrowMode ? 0 : clampedSidePadding;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
printIndications,
|
|
10
10
|
require_dist as require_dist2,
|
|
11
11
|
sleep
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y3HAJQCS.js";
|
|
13
13
|
import {
|
|
14
14
|
suggestNextCommands
|
|
15
15
|
} from "./chunk-LOS7HHU3.js";
|
|
@@ -19,23 +19,23 @@ import {
|
|
|
19
19
|
} from "./chunk-N45K6NXC.js";
|
|
20
20
|
import {
|
|
21
21
|
getScope
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CUCRUPRY.js";
|
|
23
23
|
import {
|
|
24
24
|
CommandTimeout
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-R4ZPBOD7.js";
|
|
26
26
|
import {
|
|
27
27
|
ua_default
|
|
28
28
|
} from "./chunk-4PQA6H63.js";
|
|
29
29
|
import {
|
|
30
30
|
showPluginTipIfNeeded
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-UBOSX7RM.js";
|
|
32
32
|
import {
|
|
33
33
|
getProjectByNameOrId,
|
|
34
34
|
param,
|
|
35
35
|
require_dist as require_dist3,
|
|
36
36
|
require_lib3 as require_lib,
|
|
37
37
|
require_pluralize
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-U7MQBM3F.js";
|
|
39
39
|
import {
|
|
40
40
|
require_ms,
|
|
41
41
|
stamp_default
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
import {
|
|
44
44
|
require_strip_ansi,
|
|
45
45
|
responseError
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-RFMC2QXQ.js";
|
|
47
47
|
import {
|
|
48
48
|
APIError,
|
|
49
49
|
BuildError,
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveAlertsScope
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UP2QQYRS.js";
|
|
10
10
|
import {
|
|
11
11
|
handleValidationError,
|
|
12
12
|
outputError,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
buildCommandWithGlobalFlags,
|
|
20
20
|
outputAgentError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XKHLPA6V.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/alerts/rules/parse-scope.ts
|
|
24
24
|
async function parseRulesFlagsAndScope(client, flags, jsonOutput) {
|