@chainpatrol/cli 0.18.0 → 0.20.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/CHANGELOG.md +78 -0
- package/dist/{breakdown-ETSF2BZ3.js → breakdown-3LJBT3JQ.js} +1 -1
- package/dist/{check-EMGFDXUO.js → check-G64UQCEL.js} +1 -1
- package/dist/{chunk-HGAQBGGL.js → chunk-2JZAPTY6.js} +1 -1
- package/dist/{chunk-MDDC4F6Q.js → chunk-3LJTWYT6.js} +250 -2
- package/dist/{chunk-NQT77IB7.js → chunk-6VTWWGNV.js} +2 -1
- package/dist/{chunk-DPLUSURP.js → chunk-O7TMOF4W.js} +3 -0
- package/dist/cli.js +81 -40
- package/dist/{completions-6C6KG5DH.js → completions-ILC76OX5.js} +1 -1
- package/dist/{configs-update-EKNLIRA6.js → configs-update-MVX7Q5NW.js} +1 -1
- package/dist/{create-M4PV5VVU.js → create-ANCO4FXB.js} +1 -1
- package/dist/{drift-RQKTGJWB.js → drift-SHPMEJDU.js} +1 -1
- package/dist/{found-LVYBEOS6.js → found-OPL4HWOW.js} +1 -1
- package/dist/{get-YFYSJFBC.js → get-K7VHV5X2.js} +1 -1
- package/dist/{healthcheck-J6BIZEG7.js → healthcheck-QNLFKAXM.js} +1 -1
- package/dist/list-4VKMEKZS.js +64 -0
- package/dist/{list-CNF2FGLN.js → list-AQ7E23T3.js} +1 -1
- package/dist/{list-JCJHIJM4.js → list-FJBWSGTD.js} +2 -2
- package/dist/{list-O36VWTWR.js → list-FVFF4VW3.js} +1 -1
- package/dist/{list-S5Y6GW43.js → list-FWXQUOCP.js} +1 -1
- package/dist/{list-E2JVJNHV.js → list-Q5PRMAN5.js} +1 -1
- package/dist/{list-O62BZKQ5.js → list-QHEFB4KE.js} +1 -1
- package/dist/{list-XUYCZG7S.js → list-QXA6GLCV.js} +1 -1
- package/dist/{list-LKNCICLT.js → list-SWHKM5R6.js} +1 -1
- package/dist/{list-44BQZHJD.js → list-WPPNX7G3.js} +1 -1
- package/dist/{list-AEM2KSO4.js → list-X4Z3CPO7.js} +1 -1
- package/dist/{list-2ENAEZVP.js → list-XSIXAHOG.js} +1 -1
- package/dist/{list-json-ZTS5GXNA.js → list-json-B5L5PXKH.js} +1 -1
- package/dist/{organization-PFPBZXJZ.js → organization-SOMHMGTM.js} +1 -1
- package/dist/{run-R3RR6XQF.js → run-J5TQ2YC2.js} +1 -1
- package/dist/{run-HS2EEOM6.js → run-RV6P2OCD.js} +1 -1
- package/dist/{run-LKPKTH3W.js → run-YAAMSWKK.js} +2 -2
- package/dist/{search-EBXEP7XC.js → search-FQUR75WR.js} +1 -1
- package/dist/{setup-skill-Z6SBI6GC.js → setup-skill-A36WQLMU.js} +2 -2
- package/dist/{snapshot-GNZMYTXT.js → snapshot-2GDJMN3L.js} +1 -1
- package/dist/{summary-POVQC6B7.js → summary-LF53KXRR.js} +1 -1
- package/dist/types-PTMFLYUV.js +271 -0
- package/dist/{validate-QE2F4PYY.js → validate-UYKOMUEI.js} +1 -1
- package/dist/{whoami-24KUJUN4.js → whoami-OYOG63BX.js} +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
getCliVersion,
|
|
14
14
|
isSkillInstalled,
|
|
15
15
|
readInstalledSkillVersion
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-3LJTWYT6.js";
|
|
17
|
+
import "./chunk-6VTWWGNV.js";
|
|
18
18
|
import {
|
|
19
19
|
DateTime
|
|
20
20
|
} from "./chunk-TFCNKBRC.js";
|
|
@@ -92,14 +92,25 @@ var HELP = {
|
|
|
92
92
|
usage: "chainpatrol logout"
|
|
93
93
|
},
|
|
94
94
|
asset: {
|
|
95
|
-
description: "Check asset status
|
|
96
|
-
usage: "chainpatrol asset <check|list>",
|
|
95
|
+
description: "Check asset status, list blocked/allowed assets across the global ChainPatrol blocklist, or list every supported asset type.",
|
|
96
|
+
usage: "chainpatrol asset <check|list|types>",
|
|
97
97
|
examples: [
|
|
98
98
|
"chainpatrol asset check https://phish.example",
|
|
99
99
|
"chainpatrol asset list --asset-type URL --from 2026-05-01",
|
|
100
|
+
"chainpatrol asset types",
|
|
100
101
|
"chainpatrol --json asset check 0xabc123\u2026"
|
|
101
102
|
]
|
|
102
103
|
},
|
|
104
|
+
"asset types": {
|
|
105
|
+
description: "List every asset type supported by ChainPatrol and what each enum value means (e.g. ARCHIVE_ORG \u2192 Archive.org Wayback snapshot, PAGE \u2192 standalone web page). Reads from a static map bundled with the CLI \u2014 no API or auth required. Useful for picking the right --asset-type value for `asset list`, `threats list`, `takedowns list`, etc.",
|
|
106
|
+
usage: "chainpatrol asset types",
|
|
107
|
+
examples: [
|
|
108
|
+
"chainpatrol asset types",
|
|
109
|
+
"chainpatrol --json asset types",
|
|
110
|
+
"chainpatrol asset types --output markdown",
|
|
111
|
+
"chainpatrol asset types --output csv > asset-types.csv"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
103
114
|
"asset list": {
|
|
104
115
|
description: "List assets in the global ChainPatrol blocklist for a given asset type. Defaults to BLOCKED assets updated in the last day. Use --from and --to to widen the window.",
|
|
105
116
|
usage: "chainpatrol asset list --asset-type <type> [--from ISO --to ISO] [filters]",
|
|
@@ -636,7 +647,7 @@ function getTopLevelHelp() {
|
|
|
636
647
|
" login Authenticate with ChainPatrol",
|
|
637
648
|
" logout Clear stored credentials",
|
|
638
649
|
" whoami Show the current authenticated identity",
|
|
639
|
-
" asset Check or list assets
|
|
650
|
+
" asset Check or list assets, or list supported asset types",
|
|
640
651
|
" configs Manage detection configs",
|
|
641
652
|
" detections Validate, run, list, update detection configs and results",
|
|
642
653
|
" healthchecks List and run organization healthchecks",
|
|
@@ -819,6 +830,7 @@ var COMMANDS = [
|
|
|
819
830
|
"takedowns",
|
|
820
831
|
"threats",
|
|
821
832
|
"orgs",
|
|
833
|
+
"brands",
|
|
822
834
|
"presets",
|
|
823
835
|
"setup",
|
|
824
836
|
"uninstall",
|
|
@@ -1054,12 +1066,12 @@ function parseAttachmentUrls() {
|
|
|
1054
1066
|
}
|
|
1055
1067
|
async function handleConfigsList(org) {
|
|
1056
1068
|
if (jsonMode) {
|
|
1057
|
-
const { listConfigsJson } = await import("./list-json-
|
|
1069
|
+
const { listConfigsJson } = await import("./list-json-B5L5PXKH.js");
|
|
1058
1070
|
await listConfigsJson({ org });
|
|
1059
1071
|
return;
|
|
1060
1072
|
}
|
|
1061
1073
|
const { render } = await import("ink");
|
|
1062
|
-
const { default: ConfigsList } = await import("./list-
|
|
1074
|
+
const { default: ConfigsList } = await import("./list-X4Z3CPO7.js");
|
|
1063
1075
|
const { default: React } = await import("react");
|
|
1064
1076
|
render(React.createElement(ConfigsList, { org }));
|
|
1065
1077
|
}
|
|
@@ -1159,7 +1171,7 @@ async function main() {
|
|
|
1159
1171
|
const positionals = cli.input.slice(2);
|
|
1160
1172
|
const flagAssets = parseAssetInputs();
|
|
1161
1173
|
const contents = [...positionals, ...flagAssets];
|
|
1162
|
-
const { runAssetCheck } = await import("./check-
|
|
1174
|
+
const { runAssetCheck } = await import("./check-G64UQCEL.js");
|
|
1163
1175
|
await runAssetCheck({
|
|
1164
1176
|
contents,
|
|
1165
1177
|
json: jsonMode,
|
|
@@ -1169,7 +1181,7 @@ async function main() {
|
|
|
1169
1181
|
break;
|
|
1170
1182
|
}
|
|
1171
1183
|
if (subcommand === "list") {
|
|
1172
|
-
const { runAssetList } = await import("./list-
|
|
1184
|
+
const { runAssetList } = await import("./list-XSIXAHOG.js");
|
|
1173
1185
|
await runAssetList({
|
|
1174
1186
|
type: cli.flags.type ?? cli.flags.assetType,
|
|
1175
1187
|
status: cli.flags.assetStatus ?? cli.flags.status,
|
|
@@ -1182,15 +1194,23 @@ async function main() {
|
|
|
1182
1194
|
});
|
|
1183
1195
|
break;
|
|
1184
1196
|
}
|
|
1185
|
-
|
|
1197
|
+
if (subcommand === "types") {
|
|
1198
|
+
const { runAssetTypes } = await import("./types-PTMFLYUV.js");
|
|
1199
|
+
runAssetTypes({
|
|
1200
|
+
json: jsonMode,
|
|
1201
|
+
outputFormat: cliContext.outputFormat
|
|
1202
|
+
});
|
|
1203
|
+
break;
|
|
1204
|
+
}
|
|
1205
|
+
const hint = subcommand ? suggest(subcommand, ["check", "list", "types"]) : null;
|
|
1186
1206
|
throw new Error(
|
|
1187
|
-
subcommand ? `Unknown subcommand: asset ${subcommand}${hint ? `. Did you mean "asset ${hint}"?` : ""}` : "Usage: chainpatrol asset <check|list>"
|
|
1207
|
+
subcommand ? `Unknown subcommand: asset ${subcommand}${hint ? `. Did you mean "asset ${hint}"?` : ""}` : "Usage: chainpatrol asset <check|list|types>"
|
|
1188
1208
|
);
|
|
1189
1209
|
}
|
|
1190
1210
|
case "detections": {
|
|
1191
1211
|
const org = await resolveOrg();
|
|
1192
1212
|
if (subcommand === "healthcheck") {
|
|
1193
|
-
const { runDetectionsHealthcheck } = await import("./healthcheck-
|
|
1213
|
+
const { runDetectionsHealthcheck } = await import("./healthcheck-QNLFKAXM.js");
|
|
1194
1214
|
await runDetectionsHealthcheck({
|
|
1195
1215
|
org,
|
|
1196
1216
|
source: cli.flags.source,
|
|
@@ -1205,7 +1225,7 @@ async function main() {
|
|
|
1205
1225
|
break;
|
|
1206
1226
|
}
|
|
1207
1227
|
if (subcommand === "validate") {
|
|
1208
|
-
const { runDetectionsValidate } = await import("./validate-
|
|
1228
|
+
const { runDetectionsValidate } = await import("./validate-UYKOMUEI.js");
|
|
1209
1229
|
await runDetectionsValidate({
|
|
1210
1230
|
org,
|
|
1211
1231
|
source: cli.flags.source,
|
|
@@ -1220,7 +1240,7 @@ async function main() {
|
|
|
1220
1240
|
break;
|
|
1221
1241
|
}
|
|
1222
1242
|
if (subcommand === "drift") {
|
|
1223
|
-
const { runDetectionsDrift } = await import("./drift-
|
|
1243
|
+
const { runDetectionsDrift } = await import("./drift-SHPMEJDU.js");
|
|
1224
1244
|
await runDetectionsDrift({
|
|
1225
1245
|
org,
|
|
1226
1246
|
source: cli.flags.source,
|
|
@@ -1234,7 +1254,7 @@ async function main() {
|
|
|
1234
1254
|
break;
|
|
1235
1255
|
}
|
|
1236
1256
|
if (subcommand === "run") {
|
|
1237
|
-
const { runDetectionsRun } = await import("./run-
|
|
1257
|
+
const { runDetectionsRun } = await import("./run-RV6P2OCD.js");
|
|
1238
1258
|
await runDetectionsRun({
|
|
1239
1259
|
org,
|
|
1240
1260
|
configId: cli.flags.configId,
|
|
@@ -1248,7 +1268,7 @@ async function main() {
|
|
|
1248
1268
|
break;
|
|
1249
1269
|
}
|
|
1250
1270
|
if (subcommand === "list") {
|
|
1251
|
-
const { runDetectionsList } = await import("./list-
|
|
1271
|
+
const { runDetectionsList } = await import("./list-SWHKM5R6.js");
|
|
1252
1272
|
await runDetectionsList({
|
|
1253
1273
|
org,
|
|
1254
1274
|
cursor: cli.flags.cursor,
|
|
@@ -1277,7 +1297,7 @@ async function main() {
|
|
|
1277
1297
|
break;
|
|
1278
1298
|
}
|
|
1279
1299
|
if (action === "run") {
|
|
1280
|
-
const { runDetectionsRun } = await import("./run-
|
|
1300
|
+
const { runDetectionsRun } = await import("./run-RV6P2OCD.js");
|
|
1281
1301
|
await runDetectionsRun({
|
|
1282
1302
|
org,
|
|
1283
1303
|
configId: cli.flags.configId,
|
|
@@ -1295,7 +1315,7 @@ async function main() {
|
|
|
1295
1315
|
throw new Error("detections configs update requires --config-id");
|
|
1296
1316
|
}
|
|
1297
1317
|
const configPatch = getConfigPatchFromSetFlags();
|
|
1298
|
-
const { runDetectionsConfigsUpdate } = await import("./configs-update-
|
|
1318
|
+
const { runDetectionsConfigsUpdate } = await import("./configs-update-MVX7Q5NW.js");
|
|
1299
1319
|
await runDetectionsConfigsUpdate({
|
|
1300
1320
|
org,
|
|
1301
1321
|
configId: cli.flags.configId,
|
|
@@ -1331,7 +1351,7 @@ async function main() {
|
|
|
1331
1351
|
const slugs = parseCsvList(cli.flags.slugs);
|
|
1332
1352
|
const allMyOrgs = cli.flags.allMyOrgs;
|
|
1333
1353
|
const org2 = slugs && slugs.length > 0 || allMyOrgs ? void 0 : await tryResolveOrg();
|
|
1334
|
-
const { runMetricsOrganization } = await import("./organization-
|
|
1354
|
+
const { runMetricsOrganization } = await import("./organization-SOMHMGTM.js");
|
|
1335
1355
|
await runMetricsOrganization({
|
|
1336
1356
|
org: org2,
|
|
1337
1357
|
slugs,
|
|
@@ -1350,7 +1370,7 @@ async function main() {
|
|
|
1350
1370
|
}
|
|
1351
1371
|
const org = await resolveOrg();
|
|
1352
1372
|
if (subcommand === "summary") {
|
|
1353
|
-
const { runMetricsSummary } = await import("./summary-
|
|
1373
|
+
const { runMetricsSummary } = await import("./summary-LF53KXRR.js");
|
|
1354
1374
|
await runMetricsSummary({
|
|
1355
1375
|
org,
|
|
1356
1376
|
from: cli.flags.from,
|
|
@@ -1363,7 +1383,7 @@ async function main() {
|
|
|
1363
1383
|
break;
|
|
1364
1384
|
}
|
|
1365
1385
|
if (subcommand === "found") {
|
|
1366
|
-
const { runMetricsFound } = await import("./found-
|
|
1386
|
+
const { runMetricsFound } = await import("./found-OPL4HWOW.js");
|
|
1367
1387
|
await runMetricsFound({
|
|
1368
1388
|
org,
|
|
1369
1389
|
from: cli.flags.from,
|
|
@@ -1380,7 +1400,7 @@ async function main() {
|
|
|
1380
1400
|
if (!by || !["day", "type", "brand"].includes(by)) {
|
|
1381
1401
|
throw new Error("metrics breakdown requires --by <day|type|brand>");
|
|
1382
1402
|
}
|
|
1383
|
-
const { runMetricsBreakdown } = await import("./breakdown-
|
|
1403
|
+
const { runMetricsBreakdown } = await import("./breakdown-3LJBT3JQ.js");
|
|
1384
1404
|
await runMetricsBreakdown({
|
|
1385
1405
|
org,
|
|
1386
1406
|
by,
|
|
@@ -1401,7 +1421,7 @@ async function main() {
|
|
|
1401
1421
|
case "reports": {
|
|
1402
1422
|
if (subcommand === "list") {
|
|
1403
1423
|
const org = await resolveOrg();
|
|
1404
|
-
const { runReportsList } = await import("./list-
|
|
1424
|
+
const { runReportsList } = await import("./list-WPPNX7G3.js");
|
|
1405
1425
|
await runReportsList({
|
|
1406
1426
|
org,
|
|
1407
1427
|
limit: cli.flags.limit,
|
|
@@ -1429,7 +1449,7 @@ async function main() {
|
|
|
1429
1449
|
}
|
|
1430
1450
|
if (subcommand === "create") {
|
|
1431
1451
|
const org = await tryResolveOrg();
|
|
1432
|
-
const { runReportsCreate } = await import("./create-
|
|
1452
|
+
const { runReportsCreate } = await import("./create-ANCO4FXB.js");
|
|
1433
1453
|
await runReportsCreate({
|
|
1434
1454
|
org,
|
|
1435
1455
|
title: cli.flags.title,
|
|
@@ -1450,7 +1470,7 @@ async function main() {
|
|
|
1450
1470
|
const positionals = cli.input.slice(2);
|
|
1451
1471
|
const flagAssets = parseAssetInputs();
|
|
1452
1472
|
const assetContents = [...positionals, ...flagAssets];
|
|
1453
|
-
const { runReportsSearch } = await import("./search-
|
|
1473
|
+
const { runReportsSearch } = await import("./search-FQUR75WR.js");
|
|
1454
1474
|
await runReportsSearch({
|
|
1455
1475
|
assetContents,
|
|
1456
1476
|
reportedByCustomer: cli.flags.reportedByCustomer,
|
|
@@ -1466,7 +1486,7 @@ async function main() {
|
|
|
1466
1486
|
}
|
|
1467
1487
|
case "threats": {
|
|
1468
1488
|
if (subcommand === "list") {
|
|
1469
|
-
const { runThreatsList } = await import("./list-
|
|
1489
|
+
const { runThreatsList } = await import("./list-Q5PRMAN5.js");
|
|
1470
1490
|
await runThreatsList({
|
|
1471
1491
|
query: cli.flags.query,
|
|
1472
1492
|
from: cli.flags.from,
|
|
@@ -1489,7 +1509,7 @@ async function main() {
|
|
|
1489
1509
|
case "takedowns": {
|
|
1490
1510
|
if (subcommand === "list") {
|
|
1491
1511
|
const org = await tryResolveOrg();
|
|
1492
|
-
const { runTakedownsList } = await import("./list-
|
|
1512
|
+
const { runTakedownsList } = await import("./list-FWXQUOCP.js");
|
|
1493
1513
|
await runTakedownsList({
|
|
1494
1514
|
org,
|
|
1495
1515
|
query: cli.flags.query,
|
|
@@ -1520,7 +1540,7 @@ async function main() {
|
|
|
1520
1540
|
}
|
|
1521
1541
|
case "queues": {
|
|
1522
1542
|
if (subcommand === "snapshot") {
|
|
1523
|
-
const { runQueuesSnapshot } = await import("./snapshot-
|
|
1543
|
+
const { runQueuesSnapshot } = await import("./snapshot-2GDJMN3L.js");
|
|
1524
1544
|
await runQueuesSnapshot({
|
|
1525
1545
|
org: cli.flags.org,
|
|
1526
1546
|
all: cli.flags.all,
|
|
@@ -1538,7 +1558,7 @@ async function main() {
|
|
|
1538
1558
|
}
|
|
1539
1559
|
case "orgs": {
|
|
1540
1560
|
if (subcommand === "list") {
|
|
1541
|
-
const { runOrgsList } = await import("./list-
|
|
1561
|
+
const { runOrgsList } = await import("./list-QXA6GLCV.js");
|
|
1542
1562
|
await runOrgsList({
|
|
1543
1563
|
query: cli.flags.query,
|
|
1544
1564
|
subscriptionStatus: cli.flags.subscriptionStatus,
|
|
@@ -1554,7 +1574,7 @@ async function main() {
|
|
|
1554
1574
|
if (subcommand === "get") {
|
|
1555
1575
|
const positionalSlug = action;
|
|
1556
1576
|
const slug = positionalSlug ?? await tryResolveOrg();
|
|
1557
|
-
const { runOrgsGet } = await import("./get-
|
|
1577
|
+
const { runOrgsGet } = await import("./get-K7VHV5X2.js");
|
|
1558
1578
|
await runOrgsGet({
|
|
1559
1579
|
slug,
|
|
1560
1580
|
json: jsonMode,
|
|
@@ -1564,7 +1584,7 @@ async function main() {
|
|
|
1564
1584
|
}
|
|
1565
1585
|
if (subcommand === "assets") {
|
|
1566
1586
|
if (action === "list") {
|
|
1567
|
-
const { runOrgsAssetsList } = await import("./list-
|
|
1587
|
+
const { runOrgsAssetsList } = await import("./list-QHEFB4KE.js");
|
|
1568
1588
|
await runOrgsAssetsList({
|
|
1569
1589
|
type: cli.flags.type ?? cli.flags.assetType,
|
|
1570
1590
|
groupId: cli.flags.groupId,
|
|
@@ -1580,7 +1600,7 @@ async function main() {
|
|
|
1580
1600
|
}
|
|
1581
1601
|
if (subcommand === "asset-groups") {
|
|
1582
1602
|
if (action === "list") {
|
|
1583
|
-
const { runOrgsAssetGroupsList } = await import("./list-
|
|
1603
|
+
const { runOrgsAssetGroupsList } = await import("./list-FVFF4VW3.js");
|
|
1584
1604
|
await runOrgsAssetGroupsList({
|
|
1585
1605
|
json: jsonMode,
|
|
1586
1606
|
outputFormat: cliContext.outputFormat
|
|
@@ -1594,8 +1614,29 @@ async function main() {
|
|
|
1594
1614
|
subcommand ? `Unknown subcommand: orgs ${subcommand}${hint ? `. Did you mean "orgs ${hint}"?` : ""}` : "Usage: chainpatrol orgs <list|get <slug>|assets list|asset-groups list> [filters]"
|
|
1595
1615
|
);
|
|
1596
1616
|
}
|
|
1617
|
+
case "brands": {
|
|
1618
|
+
if (subcommand === "list") {
|
|
1619
|
+
const rawType = cli.flags.type?.toUpperCase();
|
|
1620
|
+
if (rawType && rawType !== "ORGANIZATION" && rawType !== "INDIVIDUAL") {
|
|
1621
|
+
throw new Error(
|
|
1622
|
+
"brands list --type must be ORGANIZATION or INDIVIDUAL (case-insensitive)."
|
|
1623
|
+
);
|
|
1624
|
+
}
|
|
1625
|
+
const { runBrandsList } = await import("./list-4VKMEKZS.js");
|
|
1626
|
+
await runBrandsList({
|
|
1627
|
+
type: rawType,
|
|
1628
|
+
json: jsonMode,
|
|
1629
|
+
outputFormat: cliContext.outputFormat
|
|
1630
|
+
});
|
|
1631
|
+
break;
|
|
1632
|
+
}
|
|
1633
|
+
const hint = subcommand ? suggest(subcommand, ["list"]) : null;
|
|
1634
|
+
throw new Error(
|
|
1635
|
+
subcommand ? `Unknown subcommand: brands ${subcommand}${hint ? `. Did you mean "brands ${hint}"?` : ""}` : "Usage: chainpatrol brands list [--type ORGANIZATION|INDIVIDUAL]"
|
|
1636
|
+
);
|
|
1637
|
+
}
|
|
1597
1638
|
case "whoami": {
|
|
1598
|
-
const { runWhoami } = await import("./whoami-
|
|
1639
|
+
const { runWhoami } = await import("./whoami-OYOG63BX.js");
|
|
1599
1640
|
await runWhoami({
|
|
1600
1641
|
json: jsonMode,
|
|
1601
1642
|
outputFormat: cliContext.outputFormat
|
|
@@ -1604,7 +1645,7 @@ async function main() {
|
|
|
1604
1645
|
}
|
|
1605
1646
|
case "healthchecks": {
|
|
1606
1647
|
if (subcommand === "list") {
|
|
1607
|
-
const { runHealthchecksList } = await import("./list-
|
|
1648
|
+
const { runHealthchecksList } = await import("./list-AQ7E23T3.js");
|
|
1608
1649
|
await runHealthchecksList({
|
|
1609
1650
|
json: jsonMode,
|
|
1610
1651
|
outputFormat: cliContext.outputFormat
|
|
@@ -1618,7 +1659,7 @@ async function main() {
|
|
|
1618
1659
|
thresholds.minResults = cli.flags.minResults;
|
|
1619
1660
|
if (cli.flags.lookbackHours !== void 0)
|
|
1620
1661
|
thresholds.lookbackHours = cli.flags.lookbackHours;
|
|
1621
|
-
const { runHealthchecksRun } = await import("./run-
|
|
1662
|
+
const { runHealthchecksRun } = await import("./run-J5TQ2YC2.js");
|
|
1622
1663
|
await runHealthchecksRun({
|
|
1623
1664
|
org,
|
|
1624
1665
|
id: action,
|
|
@@ -1636,7 +1677,7 @@ async function main() {
|
|
|
1636
1677
|
}
|
|
1637
1678
|
case "presets": {
|
|
1638
1679
|
if (subcommand === "list") {
|
|
1639
|
-
const { runPresetsList } = await import("./list-
|
|
1680
|
+
const { runPresetsList } = await import("./list-FJBWSGTD.js");
|
|
1640
1681
|
await runPresetsList({ outputFormat: cliContext.outputFormat });
|
|
1641
1682
|
break;
|
|
1642
1683
|
}
|
|
@@ -1647,7 +1688,7 @@ async function main() {
|
|
|
1647
1688
|
);
|
|
1648
1689
|
}
|
|
1649
1690
|
const org = await resolveOrg();
|
|
1650
|
-
const { runPresetsRun } = await import("./run-
|
|
1691
|
+
const { runPresetsRun } = await import("./run-YAAMSWKK.js");
|
|
1651
1692
|
await runPresetsRun({
|
|
1652
1693
|
presetId: action,
|
|
1653
1694
|
org,
|
|
@@ -1664,17 +1705,17 @@ async function main() {
|
|
|
1664
1705
|
case "setup":
|
|
1665
1706
|
case "install":
|
|
1666
1707
|
case "i": {
|
|
1667
|
-
const { setupSkill } = await import("./setup-skill-
|
|
1708
|
+
const { setupSkill } = await import("./setup-skill-A36WQLMU.js");
|
|
1668
1709
|
setupSkill({ json: jsonMode, cloud: cli.flags.cloud });
|
|
1669
1710
|
break;
|
|
1670
1711
|
}
|
|
1671
1712
|
case "uninstall": {
|
|
1672
|
-
const { uninstallSkill } = await import("./setup-skill-
|
|
1713
|
+
const { uninstallSkill } = await import("./setup-skill-A36WQLMU.js");
|
|
1673
1714
|
uninstallSkill({ json: jsonMode });
|
|
1674
1715
|
break;
|
|
1675
1716
|
}
|
|
1676
1717
|
case "completions": {
|
|
1677
|
-
const { printCompletions } = await import("./completions-
|
|
1718
|
+
const { printCompletions } = await import("./completions-ILC76OX5.js");
|
|
1678
1719
|
printCompletions(subcommand);
|
|
1679
1720
|
break;
|
|
1680
1721
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
printOutput,
|
|
3
|
+
toCsvRows
|
|
4
|
+
} from "./chunk-VFT3TD3E.js";
|
|
5
|
+
import {
|
|
6
|
+
createApiClient
|
|
7
|
+
} from "./chunk-O7TMOF4W.js";
|
|
8
|
+
import "./chunk-EGWK6SRQ.js";
|
|
9
|
+
import "./chunk-TFCNKBRC.js";
|
|
10
|
+
import "./chunk-U73SABXK.js";
|
|
11
|
+
|
|
12
|
+
// src/commands/brands/list.ts
|
|
13
|
+
function toRow(brand) {
|
|
14
|
+
return {
|
|
15
|
+
id: brand.id,
|
|
16
|
+
slug: brand.slug,
|
|
17
|
+
name: brand.name,
|
|
18
|
+
type: brand.type,
|
|
19
|
+
description: brand.description ?? "",
|
|
20
|
+
brandGroupId: brand.brandGroupId,
|
|
21
|
+
createdAt: brand.createdAt
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
async function runBrandsList(options) {
|
|
25
|
+
const outputFormat = options.outputFormat ?? (options.json ? "json" : "human");
|
|
26
|
+
const client = options.apiClient ?? createApiClient();
|
|
27
|
+
const result = await client.listOrganizationBrands();
|
|
28
|
+
const brands = options.type ? result.brands.filter((brand) => brand.type === options.type) : result.brands;
|
|
29
|
+
const rows = brands.map(toRow);
|
|
30
|
+
printOutput({
|
|
31
|
+
outputFormat,
|
|
32
|
+
json: options.type ? { ...result, brands } : result,
|
|
33
|
+
markdown: [
|
|
34
|
+
"# Organization brands",
|
|
35
|
+
"",
|
|
36
|
+
`- Returned: ${brands.length}${options.type ? ` (filtered to type=${options.type})` : ""}`,
|
|
37
|
+
"",
|
|
38
|
+
...rows.map(
|
|
39
|
+
(row) => `- #${row.id} ${row.name} (slug=${row.slug}, type=${row.type}${row.brandGroupId !== null ? `, groupId=${row.brandGroupId}` : ""})`
|
|
40
|
+
)
|
|
41
|
+
].join("\n"),
|
|
42
|
+
csv: toCsvRows(rows),
|
|
43
|
+
human: () => {
|
|
44
|
+
if (brands.length === 0) {
|
|
45
|
+
console.log(
|
|
46
|
+
options.type ? `No brands of type ${options.type} found.` : "No brands found."
|
|
47
|
+
);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
console.log(
|
|
51
|
+
`Organization brands \u2014 returned ${brands.length}${options.type ? ` (type=${options.type})` : ""}`
|
|
52
|
+
);
|
|
53
|
+
for (const row of rows) {
|
|
54
|
+
const group = row.brandGroupId !== null ? ` groupId=${row.brandGroupId}` : "";
|
|
55
|
+
console.log(
|
|
56
|
+
`#${row.id} ${row.name} (slug=${row.slug}, type=${row.type}${group})`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
runBrandsList
|
|
64
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PRESETS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2JZAPTY6.js";
|
|
4
4
|
import "./chunk-E2LAMILJ.js";
|
|
5
5
|
import {
|
|
6
6
|
printOutput,
|
|
7
7
|
toCsvRows
|
|
8
8
|
} from "./chunk-VFT3TD3E.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-O7TMOF4W.js";
|
|
10
10
|
import "./chunk-EGWK6SRQ.js";
|
|
11
11
|
import "./chunk-TFCNKBRC.js";
|
|
12
12
|
import "./chunk-U73SABXK.js";
|