vercel 59.11.2 → 59.12.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-BKSHWTPX.js → add-OO3JGLZW.js} +23 -18
- package/dist/chunks/{add-HPLJZFM2.js → add-RTXDASSS.js} +23 -18
- package/dist/chunks/add-XGO6LHMD.js +221 -0
- package/dist/chunks/{build-V4ZLAJWB.js → build-JINV2UD4.js} +23 -18
- package/dist/chunks/{chunk-NGGLYKNU.js → chunk-26CU4Q3C.js} +3 -115
- package/dist/chunks/{chunk-QFAS4OVW.js → chunk-2JIX6UMI.js} +3 -84
- package/dist/chunks/chunk-2NIDTSQJ.js +305 -0
- package/dist/chunks/chunk-32XSMM3W.js +49 -0
- package/dist/chunks/chunk-332LMJLZ.js +16014 -0
- package/dist/chunks/{chunk-RO44KX6Y.js → chunk-3BB2HOO2.js} +12 -7
- package/dist/chunks/{chunk-HDBQPBL6.js → chunk-3F25W3GA.js} +13 -9
- package/dist/chunks/{chunk-AYLY3ZVL.js → chunk-3VM7HWF6.js} +2 -2
- package/dist/chunks/chunk-4IALDGB7.js +22 -0
- package/dist/chunks/{chunk-MTWHQEXI.js → chunk-4TUMNBEE.js} +7 -5
- package/dist/chunks/{chunk-5XECIWME.js → chunk-5NF5HOBJ.js} +5 -3
- package/dist/chunks/chunk-6E6KPBXY.js +43 -0
- package/dist/chunks/{chunk-ASBP32T6.js → chunk-7MRDIPJY.js} +1 -1
- package/dist/chunks/chunk-ABSZNJQO.js +522 -0
- package/dist/chunks/{chunk-7ST552E3.js → chunk-AKLTIZCU.js} +1 -1
- package/dist/chunks/{chunk-ONRLTUP2.js → chunk-AV747POV.js} +43 -36
- package/dist/chunks/chunk-B5XLQKHI.js +849 -0
- package/dist/chunks/{chunk-BMKU5KEL.js → chunk-CV5YC2EN.js} +1 -1
- package/dist/chunks/{chunk-TPATD2MM.js → chunk-CZ5QQRXD.js} +14 -6
- package/dist/chunks/{chunk-2EAIC3SH.js → chunk-E47NARDE.js} +8 -8
- package/dist/chunks/{chunk-XM3LOQIX.js → chunk-EDMW7SBH.js} +76 -92
- package/dist/chunks/{chunk-QAT3CW4G.js → chunk-EFYMIIER.js} +2 -2
- package/dist/chunks/chunk-ELZ6WQQA.js +81 -0
- package/dist/chunks/{chunk-FKDO3CM4.js → chunk-EOLGLGXJ.js} +17 -13
- package/dist/chunks/chunk-FRVG4OW3.js +7438 -0
- package/dist/chunks/chunk-G5FBSUL4.js +822 -0
- package/dist/chunks/chunk-GDOUDU6O.js +74 -0
- package/dist/chunks/{chunk-OQ3C5VXZ.js → chunk-GVNCVKCI.js} +4 -2
- package/dist/chunks/chunk-HB4UKFDO.js +1295 -0
- package/dist/chunks/{chunk-FRAXI2WT.js → chunk-HD4DR3DA.js} +4 -3
- package/dist/chunks/{chunk-DWIC7MRV.js → chunk-HKHXKSXQ.js} +1 -1
- package/dist/chunks/{chunk-6JPVTPTU.js → chunk-HM24ZWQL.js} +4 -4
- package/dist/chunks/chunk-HR2MP4XF.js +324 -0
- package/dist/chunks/chunk-HRXRELD3.js +338 -0
- package/dist/chunks/{chunk-IJ4X426J.js → chunk-IIMSID24.js} +1 -1
- package/dist/chunks/{chunk-B4TXCKXE.js → chunk-JOXNBQ7W.js} +10 -8
- package/dist/chunks/{chunk-O75LSD3C.js → chunk-JSD4EZL3.js} +1 -1
- package/dist/chunks/{chunk-7AEEQOD4.js → chunk-K3RED3VO.js} +1 -1
- package/dist/chunks/chunk-KAF4WFF3.js +257 -0
- package/dist/chunks/{chunk-3T7WSWZH.js → chunk-KFWQ3EFH.js} +1 -1
- package/dist/chunks/{chunk-6CZZ3SH3.js → chunk-KNO327AW.js} +2 -2
- package/dist/chunks/{chunk-L3UXB2CW.js → chunk-KW7BS25T.js} +1 -1
- package/dist/chunks/{chunk-2NJJ2K5S.js → chunk-L6B6BRHH.js} +6 -6
- package/dist/chunks/{chunk-FZRBF25Y.js → chunk-LDV2R4P4.js} +4 -4
- package/dist/chunks/chunk-MADFAH3O.js +14059 -0
- package/dist/chunks/{chunk-OO3OF6MK.js → chunk-MDGPZHSM.js} +151 -26
- package/dist/chunks/{chunk-XRWOTCDO.js → chunk-ND5CF2H3.js} +1 -1
- package/dist/chunks/{chunk-6TBDHUXK.js → chunk-NDY3JDOU.js} +21 -15
- package/dist/chunks/{chunk-RKDCNQ4S.js → chunk-NW34PW6V.js} +3 -105
- package/dist/chunks/{chunk-C5HKWXRR.js → chunk-OAMU5QO6.js} +1 -1
- package/dist/chunks/{chunk-RSJBU3ON.js → chunk-OJHDGHOB.js} +35 -27
- package/dist/chunks/chunk-P7VSBDR4.js +827 -0
- package/dist/chunks/chunk-PEC3CQSK.js +90 -0
- package/dist/chunks/{chunk-KJBZ5ZST.js → chunk-PIMIVJYK.js} +1 -0
- package/dist/chunks/chunk-PNGVSHR3.js +40 -0
- package/dist/chunks/chunk-PP5GKSIX.js +137 -0
- package/dist/chunks/chunk-QB2UHSUB.js +58 -0
- package/dist/chunks/chunk-QIUK4Z7Q.js +79 -0
- package/dist/chunks/chunk-RN6V5ODW.js +114 -0
- package/dist/chunks/chunk-RNK3LXLR.js +1288 -0
- package/dist/chunks/chunk-RVBZ64EQ.js +52 -0
- package/dist/chunks/{chunk-WA2SJE5S.js → chunk-SWO66HE2.js} +4 -4
- package/dist/chunks/{chunk-NBW3BWOJ.js → chunk-TDGK45FB.js} +2 -2
- package/dist/chunks/{chunk-WNAKOXGK.js → chunk-TO7QZGYK.js} +1 -1
- package/dist/chunks/{chunk-QDV5LZ4Q.js → chunk-UA55I7M6.js} +12 -8
- package/dist/chunks/{chunk-FWKSJYDV.js → chunk-UG2WOB5L.js} +1 -1
- package/dist/chunks/chunk-UJPVHLL5.js +233 -0
- package/dist/chunks/chunk-V4RMJKQP.js +36 -0
- package/dist/chunks/chunk-VJSREJVM.js +875 -0
- package/dist/chunks/chunk-VUS2JQB2.js +121 -0
- package/dist/chunks/{chunk-4KVJ2M4J.js → chunk-WPBCUXMZ.js} +582 -37
- package/dist/chunks/chunk-WSZ5E4WH.js +92 -0
- package/dist/chunks/{chunk-Q5K5DEOK.js → chunk-WT2Y7FRD.js} +42 -28
- package/dist/chunks/chunk-WT6C2ALC.js +18188 -0
- package/dist/chunks/chunk-X6TGUHFD.js +59 -0
- package/dist/chunks/{chunk-ZSFEACZU.js → chunk-XFF5TGRA.js} +1 -1
- package/dist/chunks/chunk-XNIZGCN5.js +58 -0
- package/dist/chunks/chunk-XPJLPUKO.js +117 -0
- package/dist/chunks/{chunk-FXD67VN5.js → chunk-XUAWTW4W.js} +1 -1
- package/dist/chunks/chunk-YPMFZRTN.js +417 -0
- package/dist/chunks/chunk-YRESLJCW.js +1536 -0
- package/dist/chunks/{chunk-I526H4AS.js → chunk-YS76T533.js} +2 -2
- package/dist/chunks/{chunk-52QYYTM5.js → chunk-ZDU2NODC.js} +3 -127
- package/dist/chunks/chunk-ZW6HETRE.js +97 -0
- package/dist/chunks/{clear-IYGWCNXT.js → clear-GQTDYSKJ.js} +23 -18
- package/dist/chunks/{compile-vercel-config-NEEBZRUJ.js → compile-vercel-config-URVMKDVW.js} +8 -11
- package/dist/chunks/{config-6DS6BBR2.js → config-MSVQR5T6.js} +23 -18
- package/dist/chunks/{config-NTB5EMV4.js → config-OAXY4J6P.js} +23 -18
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{delete-LSGID5FV.js → delete-57QO64HD.js} +19 -14
- package/dist/chunks/{delete-LLC2OGHA.js → delete-XN6ESD7C.js} +16 -12
- package/dist/chunks/detect-projects-ODNU4PK2.js +18 -0
- package/dist/chunks/detect-services-UPY4LTBZ.js +40 -0
- package/dist/chunks/{disable-H4EXEQK7.js → disable-BYI46V7B.js} +17 -13
- package/dist/chunks/{discard-FG6VKHWN.js → discard-IIQL44ZZ.js} +17 -13
- package/dist/chunks/{edit-BZJSGUHT.js → edit-BRNS3OR4.js} +19 -15
- package/dist/chunks/{edit-YE7D3CPJ.js → edit-JTW7XZH7.js} +17 -13
- package/dist/chunks/{enable-6ESD4QTE.js → enable-CH5FSQMR.js} +17 -13
- package/dist/chunks/{exec-XH4K34JM.js → exec-4IPHZ55G.js} +9 -5
- package/dist/chunks/{export-QWSJROLG.js → export-6WHQOWKM.js} +16 -13
- package/dist/chunks/{image-LTHQMKFG.js → image-ZSLYATWG.js} +11 -8
- package/dist/chunks/{import-builders-6O7ILGQJ.js → import-builders-FNMYJZGG.js} +18 -13
- package/dist/chunks/{inspect-2C4ZSNYC.js → inspect-4RDZSYWU.js} +27 -23
- package/dist/chunks/{inspect-N6SMHV3Z.js → inspect-7WQXZWET.js} +18 -14
- package/dist/chunks/{inspect-F7KCTHIL.js → inspect-CGXTNMMO.js} +19 -15
- package/dist/chunks/{inspect-ICKNCDMT.js → inspect-XJ7BYLZ5.js} +18 -14
- package/dist/chunks/{inspect-TWDPMXZ5.js → inspect-Z2MBTTB7.js} +18 -14
- package/dist/chunks/{list-NWTIJF3L.js → list-65LW6OTM.js} +20 -16
- package/dist/chunks/{list-DS7ZOUXA.js → list-7W3PHRB6.js} +25 -21
- package/dist/chunks/{list-IPGQVBJO.js → list-KS22Y57L.js} +16 -14
- package/dist/chunks/{login-F7A7ONKC.js → login-NXULVQZ2.js} +23 -18
- package/dist/chunks/{ls-2QW3ZSM6.js → ls-35EOVEIQ.js} +24 -18
- package/dist/chunks/{ls-XINES6PL.js → ls-5GKS5QRW.js} +24 -18
- package/dist/chunks/ls-ADYFYYIW.js +204 -0
- package/dist/chunks/{ls-D4TUDBIH.js → ls-DZYN3SNS.js} +24 -18
- package/dist/chunks/{ls-LSJEUPFX.js → ls-HVQOGBGV.js} +23 -16
- package/dist/chunks/{ls-NBDX3MKN.js → ls-I2PWG7YN.js} +24 -18
- package/dist/chunks/{open-VRQDWZAW.js → open-H34HXJHP.js} +18 -13
- package/dist/chunks/{permissions-6C5C7TEV.js → permissions-ZPPEPKVE.js} +14 -11
- package/dist/chunks/{publish-GVIZPNLN.js → publish-NRMKXHAU.js} +17 -13
- package/dist/chunks/pull-WUT3XTZX.js +45 -0
- package/dist/chunks/{push-EFZ5P5Z6.js → push-WFNCEA5J.js} +23 -18
- package/dist/chunks/{query-GBS2PIT4.js → query-2FQM3F7N.js} +23 -20
- package/dist/chunks/{reorder-TN65IFRL.js → reorder-GYCT7L3C.js} +17 -13
- package/dist/chunks/{reply-DYVEV3PY.js → reply-RFEXNYZ7.js} +17 -13
- package/dist/chunks/{resolve-JAWFBPUM.js → resolve-ZFGT7W6Z.js} +16 -12
- package/dist/chunks/resolve-deployment-framework-preset-NPE6RLV3.js +36 -0
- package/dist/chunks/{restore-TJVMHUBQ.js → restore-JAXPMYL5.js} +17 -13
- package/dist/chunks/rm-CLKQN5E4.js +162 -0
- package/dist/chunks/{rm-HQ5CYNJA.js → rm-JPV5V2SH.js} +23 -18
- package/dist/chunks/{rm-7XACNZ2U.js → rm-N7SGFQOA.js} +23 -18
- package/dist/chunks/{rm-REJVXALW.js → rm-UQJ4CZJH.js} +23 -18
- package/dist/chunks/{rm-CBPNMSRP.js → rm-ZUQ4U454.js} +24 -17
- package/dist/chunks/{routes-2OLIBRYX.js → routes-QVMBXOSX.js} +7 -3
- package/dist/chunks/rule-inspect-HI3YY7OY.js +123 -0
- package/dist/chunks/{rules-VGV4M4KY.js → rules-DA3Q64M4.js} +15 -12
- package/dist/chunks/{schema-GMTQOQCV.js → schema-R3C4CXJ6.js} +20 -18
- package/dist/chunks/schema-UYYFV3JB.js +381 -0
- package/dist/chunks/{set-Z5FO2FCC.js → set-TOJPGW4J.js} +21 -14
- package/dist/chunks/setup-and-link-DRYXQOH4.js +65 -0
- package/dist/chunks/{tags-SDRXWJ63.js → tags-TNLVFNVI.js} +10 -7
- package/dist/chunks/{types-JGANJ5EQ.js → types-4GAJ7XQQ.js} +9 -7
- package/dist/chunks/update-X6JB3NPI.js +224 -0
- package/dist/chunks/vlt-builder-importer-USCFHWPL.js +322 -0
- package/dist/commands/build/index.js +86 -49
- package/dist/commands/deploy/index.js +76 -67
- package/dist/commands/dev/index.js +98 -52
- package/dist/commands/env/index.js +68 -44
- package/dist/commands/link/index.js +49 -28
- package/dist/commands/list/index.js +33 -22
- package/dist/commands-bulk.js +8715 -3581
- package/dist/help.js +1 -1
- package/dist/index.js +74 -42
- 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-RBW7QITR.js +0 -219
- package/dist/chunks/chunk-26XDDLXM.js +0 -144
- package/dist/chunks/chunk-5GGUB4EO.js +0 -31
- package/dist/chunks/chunk-MXLA3VQS.js +0 -20
- package/dist/chunks/chunk-OTXE7MHI.js +0 -96
- package/dist/chunks/chunk-RSEAADCE.js +0 -138
- package/dist/chunks/chunk-WYU64FLP.js +0 -62123
- package/dist/chunks/chunk-XNFHNTS2.js +0 -2939
- package/dist/chunks/ls-RNGO257R.js +0 -193
- package/dist/chunks/rm-5B5VHWWN.js +0 -170
- package/dist/chunks/rule-inspect-ZSTDDFID.js +0 -281
- package/dist/chunks/schema-45SJNY5L.js +0 -427
- package/dist/chunks/update-JBQBC3IV.js +0 -233
|
@@ -0,0 +1,381 @@
|
|
|
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
|
+
handleRulesApiError,
|
|
9
|
+
outputRulesError,
|
|
10
|
+
resolveRulesTeam,
|
|
11
|
+
rulesSchemaPath
|
|
12
|
+
} from "./chunk-HR2MP4XF.js";
|
|
13
|
+
import "./chunk-3BB2HOO2.js";
|
|
14
|
+
import {
|
|
15
|
+
indent_default
|
|
16
|
+
} from "./chunk-A3NYPUKZ.js";
|
|
17
|
+
import "./chunk-KFWQ3EFH.js";
|
|
18
|
+
import "./chunk-WT2Y7FRD.js";
|
|
19
|
+
import "./chunk-AINIBIP4.js";
|
|
20
|
+
import "./chunk-QB2UHSUB.js";
|
|
21
|
+
import {
|
|
22
|
+
formatTable
|
|
23
|
+
} from "./chunk-GVNCVKCI.js";
|
|
24
|
+
import {
|
|
25
|
+
validateJsonOutput
|
|
26
|
+
} from "./chunk-KXDWXXJH.js";
|
|
27
|
+
import "./chunk-V4RMJKQP.js";
|
|
28
|
+
import {
|
|
29
|
+
rulesSchemaSubcommand
|
|
30
|
+
} from "./chunk-EDMW7SBH.js";
|
|
31
|
+
import "./chunk-WT6C2ALC.js";
|
|
32
|
+
import "./chunk-P7VSBDR4.js";
|
|
33
|
+
import "./chunk-YPMFZRTN.js";
|
|
34
|
+
import "./chunk-ZDU2NODC.js";
|
|
35
|
+
import "./chunk-PEC3CQSK.js";
|
|
36
|
+
import "./chunk-GGP5R3FU.js";
|
|
37
|
+
import "./chunk-VUS2JQB2.js";
|
|
38
|
+
import "./chunk-KAF4WFF3.js";
|
|
39
|
+
import "./chunk-HRXRELD3.js";
|
|
40
|
+
import "./chunk-B5XLQKHI.js";
|
|
41
|
+
import "./chunk-ABSZNJQO.js";
|
|
42
|
+
import "./chunk-XNIZGCN5.js";
|
|
43
|
+
import "./chunk-NW34PW6V.js";
|
|
44
|
+
import {
|
|
45
|
+
printError
|
|
46
|
+
} from "./chunk-3VM7HWF6.js";
|
|
47
|
+
import {
|
|
48
|
+
parseArguments
|
|
49
|
+
} from "./chunk-57RHXXXG.js";
|
|
50
|
+
import "./chunk-MADFAH3O.js";
|
|
51
|
+
import "./chunk-G5FBSUL4.js";
|
|
52
|
+
import "./chunk-26CU4Q3C.js";
|
|
53
|
+
import "./chunk-XPJLPUKO.js";
|
|
54
|
+
import {
|
|
55
|
+
isAPIError
|
|
56
|
+
} from "./chunk-CV5YC2EN.js";
|
|
57
|
+
import {
|
|
58
|
+
getFlagsSpecification,
|
|
59
|
+
packageName
|
|
60
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
61
|
+
import {
|
|
62
|
+
output_manager_default
|
|
63
|
+
} from "./chunk-2JIX6UMI.js";
|
|
64
|
+
import "./chunk-P4QNYOFB.js";
|
|
65
|
+
import "./chunk-ZW6HETRE.js";
|
|
66
|
+
import "./chunk-S7KYDPEM.js";
|
|
67
|
+
import "./chunk-TZ2YI2VH.js";
|
|
68
|
+
|
|
69
|
+
// src/commands/alerts/rules/schema.ts
|
|
70
|
+
async function schema(client, argv) {
|
|
71
|
+
let parsedArgs;
|
|
72
|
+
try {
|
|
73
|
+
parsedArgs = parseArguments(
|
|
74
|
+
argv,
|
|
75
|
+
getFlagsSpecification(rulesSchemaSubcommand.options)
|
|
76
|
+
);
|
|
77
|
+
} catch (error) {
|
|
78
|
+
printError(error);
|
|
79
|
+
return 1;
|
|
80
|
+
}
|
|
81
|
+
const format = validateJsonOutput(parsedArgs.flags);
|
|
82
|
+
if (!format.valid) {
|
|
83
|
+
return outputRulesError(client, false, "INVALID_ARGUMENTS", format.error);
|
|
84
|
+
}
|
|
85
|
+
const value = parsedArgs.flags["--type"];
|
|
86
|
+
if (value !== void 0 && value !== "built-in" && value !== "custom") {
|
|
87
|
+
const suggestion = value === "custom_alert" ? " Use custom; alert rule types are built-in and custom." : "";
|
|
88
|
+
return outputRulesError(
|
|
89
|
+
client,
|
|
90
|
+
format.jsonOutput,
|
|
91
|
+
"INVALID_RULE_TYPE",
|
|
92
|
+
`Invalid rule type "${String(value)}".${suggestion} Expected built-in or custom.`
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
const type = value;
|
|
96
|
+
const scope = await resolveRulesTeam(client, format.jsonOutput);
|
|
97
|
+
if (typeof scope === "number")
|
|
98
|
+
return scope;
|
|
99
|
+
output_manager_default.spinner("Fetching alert rule schema\u2026");
|
|
100
|
+
try {
|
|
101
|
+
const document = await client.fetch(
|
|
102
|
+
rulesSchemaPath(scope.teamId, type)
|
|
103
|
+
);
|
|
104
|
+
if (format.jsonOutput) {
|
|
105
|
+
client.stdout.write(`${JSON.stringify(document, null, 2)}
|
|
106
|
+
`);
|
|
107
|
+
return 0;
|
|
108
|
+
}
|
|
109
|
+
if (!type) {
|
|
110
|
+
printSchemaIndex(document.ruleTypes);
|
|
111
|
+
return 0;
|
|
112
|
+
}
|
|
113
|
+
const ruleSchema = document.ruleTypes.find((item) => item.type === type);
|
|
114
|
+
if (!ruleSchema) {
|
|
115
|
+
return outputRulesError(
|
|
116
|
+
client,
|
|
117
|
+
false,
|
|
118
|
+
"INVALID_SCHEMA_RESPONSE",
|
|
119
|
+
`The API did not return the ${type} alert rule schema.`
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
printSchema(ruleSchema);
|
|
123
|
+
return 0;
|
|
124
|
+
} catch (error) {
|
|
125
|
+
if (isAPIError(error)) {
|
|
126
|
+
return handleRulesApiError(client, error, format.jsonOutput);
|
|
127
|
+
}
|
|
128
|
+
throw error;
|
|
129
|
+
} finally {
|
|
130
|
+
output_manager_default.stopSpinner();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function printSchemaIndex(ruleTypes) {
|
|
134
|
+
output_manager_default.log("Alert rule schemas");
|
|
135
|
+
output_manager_default.print(
|
|
136
|
+
`${formatRows(
|
|
137
|
+
["Type", "Description"],
|
|
138
|
+
ruleTypes.map((item) => [item.type, item.description])
|
|
139
|
+
)}
|
|
140
|
+
Run \`${packageName} alerts rules schema --type <type>\` for fields and examples.
|
|
141
|
+
`
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function printSchema(schema2) {
|
|
145
|
+
output_manager_default.log(`Alert rule schema: ${schema2.type}`);
|
|
146
|
+
output_manager_default.print(`${schema2.description}
|
|
147
|
+
|
|
148
|
+
`);
|
|
149
|
+
printCliScope(schema2.type);
|
|
150
|
+
printFields(schema2);
|
|
151
|
+
if (schema2.metricDiscovery) {
|
|
152
|
+
output_manager_default.print("Metric discovery\n\n");
|
|
153
|
+
output_manager_default.print(`${indent_default(schema2.metricDiscovery.command, 2)}
|
|
154
|
+
`);
|
|
155
|
+
output_manager_default.print(`${indent_default(schema2.metricDiscovery.description, 4)}
|
|
156
|
+
|
|
157
|
+
`);
|
|
158
|
+
}
|
|
159
|
+
printConstraints(schema2.constraints);
|
|
160
|
+
printExamples("Create examples", "create", schema2.create.examples);
|
|
161
|
+
printExamples("Update examples", "update", schema2.update.examples);
|
|
162
|
+
}
|
|
163
|
+
function printCliScope(type) {
|
|
164
|
+
output_manager_default.print("CLI scope flags\n\n");
|
|
165
|
+
output_manager_default.print(`${indent_default("--project <name-or-id>", 2)}
|
|
166
|
+
`);
|
|
167
|
+
output_manager_default.print(
|
|
168
|
+
`${indent_default(
|
|
169
|
+
type === "built-in" ? "Apply the rule only to the resolved project" : "Set the project evaluated by the rule",
|
|
170
|
+
4
|
|
171
|
+
)}
|
|
172
|
+
`
|
|
173
|
+
);
|
|
174
|
+
if (type === "built-in") {
|
|
175
|
+
output_manager_default.print(`${indent_default("--all", 2)}
|
|
176
|
+
`);
|
|
177
|
+
output_manager_default.print(`${indent_default("Apply the rule to every team project", 4)}
|
|
178
|
+
`);
|
|
179
|
+
}
|
|
180
|
+
output_manager_default.print(
|
|
181
|
+
`${indent_default("Use a scope flag or ruleScope in the body, not both.", 2)}
|
|
182
|
+
|
|
183
|
+
`
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
function printFields(schema2) {
|
|
187
|
+
const createFields = collectFields(schema2.create.jsonSchema);
|
|
188
|
+
const updateFields = collectFields(schema2.update.jsonSchema);
|
|
189
|
+
const paths = [
|
|
190
|
+
...createFields.keys(),
|
|
191
|
+
...[...updateFields.keys()].filter((path) => !createFields.has(path))
|
|
192
|
+
];
|
|
193
|
+
output_manager_default.print("Fields\n\n");
|
|
194
|
+
for (const path of paths) {
|
|
195
|
+
const create = createFields.get(path);
|
|
196
|
+
const update = updateFields.get(path);
|
|
197
|
+
const types = unique([...create?.types ?? [], ...update?.types ?? []]);
|
|
198
|
+
const descriptions = unique([
|
|
199
|
+
...create?.descriptions ?? [],
|
|
200
|
+
...update?.descriptions ?? []
|
|
201
|
+
]);
|
|
202
|
+
output_manager_default.print(`${indent_default(path, 2)}
|
|
203
|
+
`);
|
|
204
|
+
output_manager_default.print(
|
|
205
|
+
`${indent_default(
|
|
206
|
+
`${types.join(" | ") || "value"} \xB7 create ${create?.requirement ?? "not accepted"} \xB7 update ${update?.requirement ?? "not accepted"}`,
|
|
207
|
+
4
|
|
208
|
+
)}
|
|
209
|
+
`
|
|
210
|
+
);
|
|
211
|
+
if (descriptions[0]) {
|
|
212
|
+
output_manager_default.print(`${indent_default(descriptions[0], 4)}
|
|
213
|
+
`);
|
|
214
|
+
}
|
|
215
|
+
output_manager_default.print("\n");
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function collectFields(schema2) {
|
|
219
|
+
const fields = /* @__PURE__ */ new Map();
|
|
220
|
+
visitObjectSchema(schema2, "", false, fields);
|
|
221
|
+
return fields;
|
|
222
|
+
}
|
|
223
|
+
function visitObjectSchema(schema2, prefix, conditional, fields) {
|
|
224
|
+
const properties = asSchemaRecord(schema2.properties);
|
|
225
|
+
const required = new Set(
|
|
226
|
+
Array.isArray(schema2.required) ? schema2.required.filter(
|
|
227
|
+
(item) => typeof item === "string"
|
|
228
|
+
) : []
|
|
229
|
+
);
|
|
230
|
+
for (const [name, propertySchema] of Object.entries(properties)) {
|
|
231
|
+
const path = prefix ? `${prefix}.${name}` : name;
|
|
232
|
+
const requirement = conditional ? "conditional" : required.has(name) ? "required" : "optional";
|
|
233
|
+
addField(fields, path, propertySchema, requirement);
|
|
234
|
+
visitNestedSchema(propertySchema, path, requirement !== "required", fields);
|
|
235
|
+
}
|
|
236
|
+
for (const variant of schemaVariants(schema2)) {
|
|
237
|
+
visitObjectSchema(variant, prefix, true, fields);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function visitNestedSchema(schema2, path, conditional, fields) {
|
|
241
|
+
if (schema2.properties || schema2.oneOf || schema2.anyOf || schema2.allOf) {
|
|
242
|
+
visitObjectSchema(schema2, path, conditional, fields);
|
|
243
|
+
}
|
|
244
|
+
const additionalProperties = asSchema(schema2.additionalProperties);
|
|
245
|
+
if (additionalProperties) {
|
|
246
|
+
const entryPath = `${path}.<key>`;
|
|
247
|
+
addField(fields, entryPath, additionalProperties, "conditional");
|
|
248
|
+
visitNestedSchema(additionalProperties, entryPath, true, fields);
|
|
249
|
+
}
|
|
250
|
+
const items = asSchema(schema2.items);
|
|
251
|
+
if (items) {
|
|
252
|
+
visitNestedSchema(items, `${path}[]`, true, fields);
|
|
253
|
+
}
|
|
254
|
+
if (Array.isArray(schema2.prefixItems)) {
|
|
255
|
+
for (const item of schema2.prefixItems) {
|
|
256
|
+
const itemSchema = asSchema(item);
|
|
257
|
+
if (itemSchema)
|
|
258
|
+
visitNestedSchema(itemSchema, `${path}[]`, true, fields);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
function addField(fields, path, schema2, requirement) {
|
|
263
|
+
const current = fields.get(path);
|
|
264
|
+
const type = describeSchemaType(schema2);
|
|
265
|
+
const description = typeof schema2.description === "string" ? schema2.description : void 0;
|
|
266
|
+
if (!current) {
|
|
267
|
+
fields.set(path, {
|
|
268
|
+
requirement,
|
|
269
|
+
types: type ? [type] : [],
|
|
270
|
+
descriptions: description ? [description] : []
|
|
271
|
+
});
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
current.types = unique([...current.types, ...type ? [type] : []]);
|
|
275
|
+
current.descriptions = unique([
|
|
276
|
+
...current.descriptions,
|
|
277
|
+
...description ? [description] : []
|
|
278
|
+
]);
|
|
279
|
+
if (current.requirement !== requirement)
|
|
280
|
+
current.requirement = "conditional";
|
|
281
|
+
}
|
|
282
|
+
function describeSchemaType(schema2) {
|
|
283
|
+
if ("const" in schema2)
|
|
284
|
+
return formatLiteral(schema2.const);
|
|
285
|
+
if (Array.isArray(schema2.enum)) {
|
|
286
|
+
return schema2.enum.map(formatLiteral).join(" | ");
|
|
287
|
+
}
|
|
288
|
+
const variants = schemaVariants(schema2).map(describeSchemaType).filter(Boolean);
|
|
289
|
+
if (variants.length > 0)
|
|
290
|
+
return unique(variants).join(" | ");
|
|
291
|
+
if (schema2.type === "array" || schema2.prefixItems || schema2.items) {
|
|
292
|
+
if (Array.isArray(schema2.prefixItems)) {
|
|
293
|
+
const tuple = schema2.prefixItems.map(asSchema).filter((item2) => item2 !== void 0).map(describeSchemaType).join(", ");
|
|
294
|
+
return `[${tuple || "value"}]`;
|
|
295
|
+
}
|
|
296
|
+
const item = asSchema(schema2.items);
|
|
297
|
+
return `${item ? describeSchemaType(item) : "value"}[]`;
|
|
298
|
+
}
|
|
299
|
+
if (schema2.type === "object" || schema2.properties) {
|
|
300
|
+
const value = asSchema(schema2.additionalProperties);
|
|
301
|
+
return value ? `record<string, ${describeSchemaType(value)}>` : "object";
|
|
302
|
+
}
|
|
303
|
+
return typeof schema2.type === "string" ? schema2.type : "value";
|
|
304
|
+
}
|
|
305
|
+
function schemaVariants(schema2) {
|
|
306
|
+
return ["oneOf", "anyOf", "allOf"].flatMap((key) => {
|
|
307
|
+
const value = schema2[key];
|
|
308
|
+
if (!Array.isArray(value))
|
|
309
|
+
return [];
|
|
310
|
+
return value.map(asSchema).filter((item) => item !== void 0);
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
function asSchema(value) {
|
|
314
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
315
|
+
}
|
|
316
|
+
function asSchemaRecord(value) {
|
|
317
|
+
const schema2 = asSchema(value);
|
|
318
|
+
if (!schema2)
|
|
319
|
+
return {};
|
|
320
|
+
return Object.fromEntries(
|
|
321
|
+
Object.entries(schema2).filter(
|
|
322
|
+
(entry) => asSchema(entry[1]) !== void 0
|
|
323
|
+
)
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
function formatLiteral(value) {
|
|
327
|
+
return typeof value === "string" ? value : JSON.stringify(value) ?? String(value);
|
|
328
|
+
}
|
|
329
|
+
function unique(values) {
|
|
330
|
+
return [...new Set(values)];
|
|
331
|
+
}
|
|
332
|
+
function printConstraints(constraints) {
|
|
333
|
+
if (constraints.length === 0)
|
|
334
|
+
return;
|
|
335
|
+
output_manager_default.print("Constraints\n\n");
|
|
336
|
+
for (const constraint of constraints) {
|
|
337
|
+
const operations = constraint.appliesTo.join("/");
|
|
338
|
+
const kind = constraint.kind === "request" ? "" : ` \xB7 ${humanize(constraint.kind)}`;
|
|
339
|
+
output_manager_default.print(
|
|
340
|
+
`${indent_default(`${humanize(constraint.code)} \xB7 ${operations}${kind}`, 2)}
|
|
341
|
+
`
|
|
342
|
+
);
|
|
343
|
+
output_manager_default.print(`${indent_default(`Paths: ${constraint.paths.join(", ")}`, 4)}
|
|
344
|
+
`);
|
|
345
|
+
output_manager_default.print(`${indent_default(constraint.description, 4)}
|
|
346
|
+
|
|
347
|
+
`);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function humanize(value) {
|
|
351
|
+
const words = value.replace(/[-_]/g, " ");
|
|
352
|
+
return `${words.charAt(0).toUpperCase()}${words.slice(1)}`;
|
|
353
|
+
}
|
|
354
|
+
function printExamples(title, operation, examples) {
|
|
355
|
+
output_manager_default.print(`${title}
|
|
356
|
+
|
|
357
|
+
`);
|
|
358
|
+
for (const example of examples) {
|
|
359
|
+
const fileName = operation === "create" ? "rule.json" : "patch.json";
|
|
360
|
+
const command = operation === "create" ? `${packageName} alerts rules add --body ./${fileName}` : `${packageName} alerts rules update <rule-id> --body ./${fileName}`;
|
|
361
|
+
output_manager_default.print(`${indent_default(example.name, 2)}
|
|
362
|
+
`);
|
|
363
|
+
output_manager_default.print(`${indent_default(`Body (${fileName}):`, 4)}
|
|
364
|
+
`);
|
|
365
|
+
output_manager_default.print(`${indent_default(JSON.stringify(example.body, null, 2), 6)}
|
|
366
|
+
`);
|
|
367
|
+
output_manager_default.print(`${indent_default(command, 4)}
|
|
368
|
+
|
|
369
|
+
`);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
function formatRows(headers, rows) {
|
|
373
|
+
return formatTable(
|
|
374
|
+
headers,
|
|
375
|
+
headers.map(() => "l"),
|
|
376
|
+
[{ rows }]
|
|
377
|
+
).trim();
|
|
378
|
+
}
|
|
379
|
+
export {
|
|
380
|
+
schema as default
|
|
381
|
+
};
|
|
@@ -23,8 +23,8 @@ import {
|
|
|
23
23
|
toRule,
|
|
24
24
|
writeConfigJson,
|
|
25
25
|
writeSamplingRules
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-3F25W3GA.js";
|
|
27
|
+
import "./chunk-QIUK4Z7Q.js";
|
|
28
28
|
import {
|
|
29
29
|
validateJsonOutput
|
|
30
30
|
} from "./chunk-KXDWXXJH.js";
|
|
@@ -34,34 +34,41 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
setSubcommand
|
|
36
36
|
} from "./chunk-GY5I4AYD.js";
|
|
37
|
+
import "./chunk-X6TGUHFD.js";
|
|
38
|
+
import "./chunk-ELZ6WQQA.js";
|
|
39
|
+
import "./chunk-VUS2JQB2.js";
|
|
37
40
|
import {
|
|
38
41
|
help
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-WYU64FLP.js";
|
|
41
|
-
import "./chunk-FXD67VN5.js";
|
|
42
|
+
} from "./chunk-YS76T533.js";
|
|
42
43
|
import {
|
|
43
44
|
TelemetryClient
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
45
|
+
} from "./chunk-HB4UKFDO.js";
|
|
46
|
+
import "./chunk-B5XLQKHI.js";
|
|
47
|
+
import "./chunk-ABSZNJQO.js";
|
|
48
|
+
import "./chunk-XNIZGCN5.js";
|
|
49
|
+
import "./chunk-NW34PW6V.js";
|
|
47
50
|
import {
|
|
48
51
|
printError
|
|
49
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-3VM7HWF6.js";
|
|
50
53
|
import {
|
|
51
54
|
parseArguments
|
|
52
55
|
} from "./chunk-57RHXXXG.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-4IALDGB7.js";
|
|
57
|
+
import "./chunk-MADFAH3O.js";
|
|
58
|
+
import "./chunk-G5FBSUL4.js";
|
|
59
|
+
import "./chunk-26CU4Q3C.js";
|
|
60
|
+
import "./chunk-XPJLPUKO.js";
|
|
61
|
+
import "./chunk-CV5YC2EN.js";
|
|
55
62
|
import {
|
|
56
63
|
getCommandName,
|
|
57
64
|
getCommandNamePlain,
|
|
58
65
|
getFlagsSpecification
|
|
59
66
|
} from "./chunk-Q2DGFCO7.js";
|
|
60
|
-
import "./chunk-P4QNYOFB.js";
|
|
61
|
-
import "./chunk-52QYYTM5.js";
|
|
62
67
|
import {
|
|
63
68
|
output_manager_default
|
|
64
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-2JIX6UMI.js";
|
|
70
|
+
import "./chunk-P4QNYOFB.js";
|
|
71
|
+
import "./chunk-ZW6HETRE.js";
|
|
65
72
|
import {
|
|
66
73
|
require_source
|
|
67
74
|
} from "./chunk-S7KYDPEM.js";
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
applyGitConnectIntent,
|
|
9
|
+
connectGitRepository,
|
|
10
|
+
resolveGitConnectIntent,
|
|
11
|
+
setupAndLink,
|
|
12
|
+
shouldPromptForRootDirectory
|
|
13
|
+
} from "./chunk-YRESLJCW.js";
|
|
14
|
+
import "./chunk-UJPVHLL5.js";
|
|
15
|
+
import "./chunk-RVBZ64EQ.js";
|
|
16
|
+
import "./chunk-WSZ5E4WH.js";
|
|
17
|
+
import "./chunk-QB2UHSUB.js";
|
|
18
|
+
import "./chunk-V4RMJKQP.js";
|
|
19
|
+
import "./chunk-VJSREJVM.js";
|
|
20
|
+
import "./chunk-332LMJLZ.js";
|
|
21
|
+
import "./chunk-32XSMM3W.js";
|
|
22
|
+
import "./chunk-WT6C2ALC.js";
|
|
23
|
+
import "./chunk-P7VSBDR4.js";
|
|
24
|
+
import "./chunk-YPMFZRTN.js";
|
|
25
|
+
import "./chunk-ZDU2NODC.js";
|
|
26
|
+
import "./chunk-PEC3CQSK.js";
|
|
27
|
+
import "./chunk-GGP5R3FU.js";
|
|
28
|
+
import "./chunk-RNK3LXLR.js";
|
|
29
|
+
import "./chunk-X6TGUHFD.js";
|
|
30
|
+
import "./chunk-FRVG4OW3.js";
|
|
31
|
+
import "./chunk-6E6KPBXY.js";
|
|
32
|
+
import "./chunk-PP5GKSIX.js";
|
|
33
|
+
import "./chunk-ELZ6WQQA.js";
|
|
34
|
+
import "./chunk-VUS2JQB2.js";
|
|
35
|
+
import "./chunk-XUAWTW4W.js";
|
|
36
|
+
import "./chunk-KAF4WFF3.js";
|
|
37
|
+
import "./chunk-HRXRELD3.js";
|
|
38
|
+
import "./chunk-PNGVSHR3.js";
|
|
39
|
+
import "./chunk-RN6V5ODW.js";
|
|
40
|
+
import "./chunk-HB4UKFDO.js";
|
|
41
|
+
import "./chunk-B5XLQKHI.js";
|
|
42
|
+
import "./chunk-ABSZNJQO.js";
|
|
43
|
+
import "./chunk-XNIZGCN5.js";
|
|
44
|
+
import "./chunk-NW34PW6V.js";
|
|
45
|
+
import "./chunk-3VM7HWF6.js";
|
|
46
|
+
import "./chunk-57RHXXXG.js";
|
|
47
|
+
import "./chunk-4IALDGB7.js";
|
|
48
|
+
import "./chunk-MADFAH3O.js";
|
|
49
|
+
import "./chunk-G5FBSUL4.js";
|
|
50
|
+
import "./chunk-26CU4Q3C.js";
|
|
51
|
+
import "./chunk-XPJLPUKO.js";
|
|
52
|
+
import "./chunk-CV5YC2EN.js";
|
|
53
|
+
import "./chunk-Q2DGFCO7.js";
|
|
54
|
+
import "./chunk-2JIX6UMI.js";
|
|
55
|
+
import "./chunk-P4QNYOFB.js";
|
|
56
|
+
import "./chunk-ZW6HETRE.js";
|
|
57
|
+
import "./chunk-S7KYDPEM.js";
|
|
58
|
+
import "./chunk-TZ2YI2VH.js";
|
|
59
|
+
export {
|
|
60
|
+
applyGitConnectIntent,
|
|
61
|
+
connectGitRepository,
|
|
62
|
+
setupAndLink as default,
|
|
63
|
+
resolveGitConnectIntent,
|
|
64
|
+
shouldPromptForRootDirectory
|
|
65
|
+
};
|
|
@@ -11,16 +11,19 @@ import {
|
|
|
11
11
|
getSubcommand
|
|
12
12
|
} from "./chunk-YPQSDAEW.js";
|
|
13
13
|
import {
|
|
14
|
-
AGENT_REASON
|
|
14
|
+
AGENT_REASON
|
|
15
|
+
} from "./chunk-VUS2JQB2.js";
|
|
16
|
+
import {
|
|
15
17
|
buildCommandWithGlobalFlags,
|
|
16
18
|
outputAgentError
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-26CU4Q3C.js";
|
|
20
|
+
import "./chunk-CV5YC2EN.js";
|
|
19
21
|
import "./chunk-Q2DGFCO7.js";
|
|
20
|
-
import "./chunk-P4QNYOFB.js";
|
|
21
22
|
import {
|
|
22
23
|
output_manager_default
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2JIX6UMI.js";
|
|
25
|
+
import "./chunk-P4QNYOFB.js";
|
|
26
|
+
import "./chunk-ZW6HETRE.js";
|
|
24
27
|
import "./chunk-S7KYDPEM.js";
|
|
25
28
|
import "./chunk-TZ2YI2VH.js";
|
|
26
29
|
|
|
@@ -53,9 +56,9 @@ async function tags(client, argv, telemetry) {
|
|
|
53
56
|
}
|
|
54
57
|
switch (subcommand) {
|
|
55
58
|
case "ls":
|
|
56
|
-
return (await import("./ls-
|
|
59
|
+
return (await import("./ls-DZYN3SNS.js")).default(client, args, telemetry);
|
|
57
60
|
case "inspect":
|
|
58
|
-
return (await import("./inspect-
|
|
61
|
+
return (await import("./inspect-XJ7BYLZ5.js")).default(client, args, telemetry);
|
|
59
62
|
default:
|
|
60
63
|
output_manager_default.error(`Unhandled tags subcommand: ${subcommand}`);
|
|
61
64
|
return 1;
|
|
@@ -10,25 +10,27 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
typesSubcommand
|
|
12
12
|
} from "./chunk-4KD5BYHB.js";
|
|
13
|
+
import {
|
|
14
|
+
table
|
|
15
|
+
} from "./chunk-NW34PW6V.js";
|
|
13
16
|
import {
|
|
14
17
|
printError
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3VM7HWF6.js";
|
|
16
19
|
import {
|
|
17
20
|
parseArguments
|
|
18
21
|
} from "./chunk-57RHXXXG.js";
|
|
19
|
-
import
|
|
20
|
-
table
|
|
21
|
-
} from "./chunk-RKDCNQ4S.js";
|
|
22
|
+
import "./chunk-XPJLPUKO.js";
|
|
22
23
|
import {
|
|
23
24
|
isAPIError
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-CV5YC2EN.js";
|
|
25
26
|
import {
|
|
26
27
|
getFlagsSpecification
|
|
27
28
|
} from "./chunk-Q2DGFCO7.js";
|
|
28
|
-
import "./chunk-P4QNYOFB.js";
|
|
29
29
|
import {
|
|
30
30
|
output_manager_default
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2JIX6UMI.js";
|
|
32
|
+
import "./chunk-P4QNYOFB.js";
|
|
33
|
+
import "./chunk-ZW6HETRE.js";
|
|
32
34
|
import {
|
|
33
35
|
require_source
|
|
34
36
|
} from "./chunk-S7KYDPEM.js";
|