vercel 59.4.0 → 59.5.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-73X2SKBH.js → add-MH3WV6PV.js} +12 -8
- package/dist/chunks/{add-FQMB3XPM.js → add-W3FFMTX4.js} +15 -11
- package/dist/chunks/{add-QJ3WT4FW.js → add-Z5FM6TFI.js} +18 -14
- package/dist/chunks/{build-YUYCLCXD.js → build-VYYFBJL7.js} +13 -10
- package/dist/chunks/{chunk-F7OXZLY2.js → chunk-26XDDLXM.js} +2 -2
- package/dist/chunks/{chunk-RIB4S2IB.js → chunk-3HZLXCVL.js} +1 -1
- package/dist/chunks/{chunk-UV2ZMFVG.js → chunk-47VQ6H2S.js} +1 -1
- package/dist/chunks/{chunk-O5DLWLT7.js → chunk-4JTF6RD7.js} +7 -7
- package/dist/chunks/{chunk-3KNPVXJ3.js → chunk-4KD5BYHB.js} +1 -1
- package/dist/chunks/{chunk-XLKFJPMT.js → chunk-57RHXXXG.js} +1 -1
- package/dist/chunks/chunk-5GGUB4EO.js +31 -0
- package/dist/chunks/chunk-5LX2JDZP.js +34 -0
- package/dist/chunks/chunk-7Q45OKWR.js +149 -0
- package/dist/chunks/{chunk-Y3J4VU2H.js → chunk-7XX4ZEOV.js} +2 -2
- package/dist/chunks/{chunk-JKQWQA2T.js → chunk-AINIBIP4.js} +1 -1
- package/dist/chunks/{chunk-SOFC4MLS.js → chunk-AWCID36T.js} +8 -568
- package/dist/chunks/{chunk-KAYSW4CJ.js → chunk-AWSLWAOC.js} +1 -1
- package/dist/chunks/{chunk-KDYRLN6H.js → chunk-C5HKWXRR.js} +1 -1
- package/dist/chunks/{chunk-2MF3ZAVW.js → chunk-CJV7J7B5.js} +6 -6
- package/dist/chunks/chunk-CQJRLNTX.js +104 -0
- package/dist/chunks/{chunk-PD4DYNSB.js → chunk-CSCSGSQG.js} +4 -4
- package/dist/chunks/{chunk-3L2YLLHC.js → chunk-DWIC7MRV.js} +2 -2
- package/dist/chunks/{chunk-HMJVUXE6.js → chunk-E6LFKMI2.js} +82 -509
- package/dist/chunks/{chunk-GFCTRJI5.js → chunk-EZKW5YJ2.js} +1 -1
- package/dist/chunks/{chunk-DDIZGOCK.js → chunk-FA3MO56Q.js} +6 -4
- package/dist/chunks/{chunk-Y42SPI2H.js → chunk-GUWPUX2Y.js} +5 -5
- package/dist/chunks/chunk-GY5I4AYD.js +122 -0
- package/dist/chunks/chunk-HGRWPPYB.js +18 -0
- package/dist/chunks/{chunk-NP6BQPCN.js → chunk-JJQP3PYM.js} +5 -3
- package/dist/chunks/{chunk-X6O6XJEA.js → chunk-JNU3DTEV.js} +14 -12
- package/dist/chunks/{chunk-TH2XUVDP.js → chunk-L7CEMAJG.js} +4 -2
- package/dist/chunks/{chunk-EB7NJKPL.js → chunk-LLM3ZNXJ.js} +2 -2
- package/dist/chunks/{chunk-ZFWNMVNR.js → chunk-M3OSDZPY.js} +6 -4
- package/dist/chunks/{chunk-LKTQR5JE.js → chunk-MRMNMFMD.js} +2 -2
- package/dist/chunks/{chunk-EG5BSAXD.js → chunk-MTWHQEXI.js} +1 -1
- package/dist/chunks/{chunk-WC7IINFV.js → chunk-NFU4XJIR.js} +1 -1
- package/dist/chunks/{chunk-VCE6QKFE.js → chunk-NSU2BTRS.js} +3 -3
- package/dist/chunks/chunk-OHER4DGX.js +451 -0
- package/dist/chunks/{chunk-BBSS3XIW.js → chunk-OQ3C5VXZ.js} +1 -1
- package/dist/chunks/{chunk-CHEZBD7H.js → chunk-PBHBX6UL.js} +2 -2
- package/dist/chunks/{chunk-M22O6CYY.js → chunk-POOO7W47.js} +1 -1
- package/dist/chunks/{chunk-BLYBHFIE.js → chunk-PPUWG2UB.js} +12 -8
- package/dist/chunks/chunk-Q2DGFCO7.js +579 -0
- package/dist/chunks/{chunk-HURL5EBN.js → chunk-QG4PCM45.js} +24 -148
- package/dist/chunks/{chunk-VAFU7DXZ.js → chunk-RKDCNQ4S.js} +1 -91
- package/dist/chunks/{chunk-XI6NJLI4.js → chunk-RZ5NP6HN.js} +2 -2
- package/dist/chunks/{chunk-GMWRTZVZ.js → chunk-SLPSPYVR.js} +1 -1
- package/dist/chunks/{chunk-J5Y2QGGU.js → chunk-TAZ5ZAKG.js} +1 -1
- package/dist/chunks/{chunk-KSZ4MNHO.js → chunk-TDXNNIZ6.js} +1 -1
- package/dist/chunks/{chunk-EB5NBVTV.js → chunk-TIWAL2YU.js} +6 -6
- package/dist/chunks/{chunk-HJVTLJHO.js → chunk-UUVMIXT4.js} +5 -5
- package/dist/chunks/{chunk-RI7KKKII.js → chunk-V4YLY44R.js} +3 -17
- package/dist/chunks/{chunk-O5GNPPTU.js → chunk-VP5Y3SZG.js} +1 -1
- package/dist/chunks/{chunk-2PX6N4FE.js → chunk-VWYNSJXI.js} +7 -7
- package/dist/chunks/{chunk-7QVJTI5H.js → chunk-XDGOOW3K.js} +1 -1
- package/dist/chunks/{chunk-UMA66MKW.js → chunk-XM3LOQIX.js} +1 -1
- package/dist/chunks/{chunk-VDJN4WKH.js → chunk-XRWOTCDO.js} +1 -1
- package/dist/chunks/{chunk-MWYQ24FO.js → chunk-YIHOS3ZF.js} +2 -2
- package/dist/chunks/{chunk-STPH4Y62.js → chunk-YJUO3EKH.js} +1 -1
- package/dist/chunks/chunk-ZKUHCL6O.js +249 -0
- package/dist/chunks/{clear-USQM5VW5.js → clear-TNGRDA7D.js} +12 -8
- package/dist/chunks/{compile-vercel-config-2JNYMI6W.js → compile-vercel-config-ERLXKKWW.js} +8 -5
- package/dist/chunks/config-7EDKML5Q.js +122 -0
- package/dist/chunks/{config-VTRIDLY4.js → config-H22EE765.js} +15 -11
- package/dist/chunks/{delete-VTPHK3EB.js → delete-LORYIZHY.js} +10 -7
- package/dist/chunks/{delete-ILLSBCVQ.js → delete-Q4S5F2AI.js} +12 -8
- package/dist/chunks/{disable-VTOMO64V.js → disable-HKWCBDJC.js} +10 -7
- package/dist/chunks/{discard-ZIOZ34ZI.js → discard-UCCRF2JQ.js} +10 -7
- package/dist/chunks/{edit-JMZ5XWVW.js → edit-6IM6VRBR.js} +12 -8
- package/dist/chunks/{edit-E3AMR4KM.js → edit-AWL35PYQ.js} +11 -8
- package/dist/chunks/{enable-A4PMZ7QZ.js → enable-GN3D3L3V.js} +10 -7
- package/dist/chunks/{export-Y6AJ3WRZ.js → export-HHRVFALV.js} +10 -7
- package/dist/chunks/{image-26BKPAUB.js → image-4DCU4VPP.js} +6 -5
- package/dist/chunks/{import-builders-3H7J2SEK.js → import-builders-DVG3HOTF.js} +9 -6
- package/dist/chunks/{inspect-ZW5N6O5P.js → inspect-B3OWUFLH.js} +12 -8
- package/dist/chunks/{inspect-OEY4DJRI.js → inspect-TGOJDKIT.js} +15 -11
- package/dist/chunks/{inspect-7DGKYHKW.js → inspect-TUW67CFZ.js} +15 -11
- package/dist/chunks/{inspect-N3E2PO6K.js → inspect-VLGKNHJW.js} +12 -8
- package/dist/chunks/{inspect-GJFVAZIJ.js → inspect-VPME6UC7.js} +15 -11
- package/dist/chunks/{list-DTJBW7OQ.js → list-2DPKDHRV.js} +15 -11
- package/dist/chunks/{list-MIQ5D6PM.js → list-K552ITMK.js} +15 -11
- package/dist/chunks/{list-2VTCNQEB.js → list-TK2JO7BK.js} +12 -8
- package/dist/chunks/{login-L34UHAU5.js → login-HRWEKW5P.js} +15 -11
- package/dist/chunks/{ls-OKO4IHWB.js → ls-IOXGXEY4.js} +15 -11
- package/dist/chunks/{ls-VDYUFSSC.js → ls-JSV2WZVF.js} +15 -10
- package/dist/chunks/{ls-OBUDC4SB.js → ls-M5TYGFP5.js} +15 -10
- package/dist/chunks/{ls-NCPQY4FV.js → ls-O2WYF5UL.js} +18 -13
- package/dist/chunks/ls-TM6NTZEB.js +176 -0
- package/dist/chunks/{ls-SXJFBLUT.js → ls-YIF3KLF3.js} +15 -10
- package/dist/chunks/{open-V5JDGXUP.js → open-FWAVEWGU.js} +12 -8
- package/dist/chunks/{permissions-6CPRPPBY.js → permissions-DPFYL47Z.js} +9 -8
- package/dist/chunks/{publish-R27DPHFO.js → publish-63CGFKQR.js} +10 -7
- package/dist/chunks/{push-VLVTBS42.js → push-T5ZTBW3P.js} +13 -10
- package/dist/chunks/{query-IVVRYMJN.js → query-B6O3EMEV.js} +14 -10
- package/dist/chunks/{reorder-LJ2RBZM2.js → reorder-ANV4NMKH.js} +10 -7
- package/dist/chunks/{reply-USAISZYC.js → reply-C73KGOCG.js} +12 -8
- package/dist/chunks/{resolve-CRCJYVS5.js → resolve-IHSIVPEE.js} +12 -8
- package/dist/chunks/{restore-6PBPEAMU.js → restore-GSUNXP2O.js} +10 -7
- package/dist/chunks/{rm-HHELZB7R.js → rm-4O74PS4Q.js} +12 -8
- package/dist/chunks/{rm-TWU3JR6Z.js → rm-M7IJC2WZ.js} +12 -8
- package/dist/chunks/{rm-EOD7RDSO.js → rm-PRINF4OU.js} +15 -11
- package/dist/chunks/rm-RV5SQFQA.js +317 -0
- package/dist/chunks/{rm-KGOEOWVK.js → rm-YDTK5ESZ.js} +13 -9
- package/dist/chunks/{rule-inspect-WFTVRK6B.js → rule-inspect-ZZC53FLP.js} +15 -11
- package/dist/chunks/{rules-AQYTFJI6.js → rules-SAOSSGFI.js} +10 -9
- package/dist/chunks/{schema-LUVFYPWN.js → schema-23ZFAKDU.js} +7 -5
- package/dist/chunks/{schema-ZCDCJC7E.js → schema-2Q3QRMRO.js} +11 -8
- package/dist/chunks/set-L47ZCZBJ.js +243 -0
- package/dist/chunks/{tags-RCNRFX7U.js → tags-2TWLM77N.js} +5 -4
- package/dist/chunks/{types-AJHILHO5.js → types-G3PEUIJH.js} +11 -7
- package/dist/chunks/{update-I7QGAOYF.js → update-SZH2VBD6.js} +16 -12
- package/dist/commands/build/index.js +16 -12
- package/dist/commands/deploy/index.js +41 -32
- package/dist/commands/dev/index.js +19 -15
- package/dist/commands/env/index.js +44 -35
- package/dist/commands/link/index.js +25 -20
- package/dist/commands/list/index.js +19 -12
- package/dist/commands-bulk.js +132 -125
- package/dist/help.js +1 -1
- package/dist/index.js +34 -28
- package/dist/version.mjs +1 -1
- package/package.json +47 -47
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesItemPath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PBHBX6UL.js";
|
|
13
13
|
import {
|
|
14
14
|
formatCustomAlertMetric,
|
|
15
15
|
formatCustomAlertTrigger,
|
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
isCustomAlertRule,
|
|
19
19
|
parseCustomAlertQuery,
|
|
20
20
|
renderAlertTable
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-26XDDLXM.js";
|
|
22
|
+
import "./chunk-NSU2BTRS.js";
|
|
23
23
|
import {
|
|
24
24
|
formatDate
|
|
25
25
|
} from "./chunk-GZLPFESR.js";
|
|
@@ -32,32 +32,36 @@ import "./chunk-FGDKMNEN.js";
|
|
|
32
32
|
import "./chunk-PRWJUY5U.js";
|
|
33
33
|
import {
|
|
34
34
|
truncateMiddle
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-XRWOTCDO.js";
|
|
36
36
|
import {
|
|
37
37
|
validateJsonOutput
|
|
38
38
|
} from "./chunk-KXDWXXJH.js";
|
|
39
39
|
import {
|
|
40
40
|
rulesInspectSubcommand
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-XM3LOQIX.js";
|
|
42
|
+
import "./chunk-E6LFKMI2.js";
|
|
43
|
+
import "./chunk-OHER4DGX.js";
|
|
43
44
|
import "./chunk-CYNB6LL4.js";
|
|
44
45
|
import {
|
|
45
46
|
AGENT_REASON,
|
|
46
47
|
buildCommandWithGlobalFlags,
|
|
47
48
|
outputAgentError
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-L7CEMAJG.js";
|
|
49
50
|
import "./chunk-GGP5R3FU.js";
|
|
50
51
|
import {
|
|
51
52
|
printError
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-CQJRLNTX.js";
|
|
53
54
|
import {
|
|
54
55
|
parseArguments
|
|
55
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-57RHXXXG.js";
|
|
57
|
+
import "./chunk-RKDCNQ4S.js";
|
|
58
|
+
import {
|
|
59
|
+
isAPIError
|
|
60
|
+
} from "./chunk-AWCID36T.js";
|
|
56
61
|
import {
|
|
57
62
|
getFlagsSpecification,
|
|
58
|
-
isAPIError,
|
|
59
63
|
packageName
|
|
60
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
61
65
|
import "./chunk-P4QNYOFB.js";
|
|
62
66
|
import "./chunk-52QYYTM5.js";
|
|
63
67
|
import {
|
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
AGENT_REASON,
|
|
12
12
|
buildCommandWithGlobalFlags,
|
|
13
13
|
outputAgentError
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-L7CEMAJG.js";
|
|
15
|
+
import "./chunk-AWCID36T.js";
|
|
16
|
+
import "./chunk-Q2DGFCO7.js";
|
|
16
17
|
import "./chunk-P4QNYOFB.js";
|
|
17
18
|
import {
|
|
18
19
|
output_manager_default
|
|
@@ -31,7 +32,7 @@ var RULES_CONFIG = {
|
|
|
31
32
|
};
|
|
32
33
|
async function rules(client, argv) {
|
|
33
34
|
if (argv.length === 0 || argv[0]?.startsWith("-")) {
|
|
34
|
-
const lsFn = (await import("./ls-
|
|
35
|
+
const lsFn = (await import("./ls-IOXGXEY4.js")).default;
|
|
35
36
|
return lsFn(client, argv);
|
|
36
37
|
}
|
|
37
38
|
const { subcommand, args, subcommandOriginal } = getSubcommand(
|
|
@@ -64,17 +65,17 @@ async function rules(client, argv) {
|
|
|
64
65
|
}
|
|
65
66
|
switch (subcommand) {
|
|
66
67
|
case "ls":
|
|
67
|
-
return (await import("./ls-
|
|
68
|
+
return (await import("./ls-IOXGXEY4.js")).default(client, args);
|
|
68
69
|
case "schema":
|
|
69
|
-
return (await import("./schema-
|
|
70
|
+
return (await import("./schema-23ZFAKDU.js")).default(client, args);
|
|
70
71
|
case "add":
|
|
71
|
-
return (await import("./add-
|
|
72
|
+
return (await import("./add-Z5FM6TFI.js")).default(client, args);
|
|
72
73
|
case "inspect":
|
|
73
|
-
return (await import("./rule-inspect-
|
|
74
|
+
return (await import("./rule-inspect-ZZC53FLP.js")).default(client, args);
|
|
74
75
|
case "rm":
|
|
75
|
-
return (await import("./rm-
|
|
76
|
+
return (await import("./rm-YDTK5ESZ.js")).default(client, args);
|
|
76
77
|
case "update":
|
|
77
|
-
return (await import("./update-
|
|
78
|
+
return (await import("./update-SZH2VBD6.js")).default(client, args);
|
|
78
79
|
default:
|
|
79
80
|
output_manager_default.error(`Unhandled rules subcommand: ${String(subcommandOriginal)}`);
|
|
80
81
|
return 1;
|
|
@@ -15,23 +15,25 @@ import {
|
|
|
15
15
|
} from "./chunk-KQRVZWJU.js";
|
|
16
16
|
import {
|
|
17
17
|
formatTable
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OQ3C5VXZ.js";
|
|
19
19
|
import {
|
|
20
20
|
validateJsonOutput
|
|
21
21
|
} from "./chunk-KXDWXXJH.js";
|
|
22
22
|
import {
|
|
23
23
|
rulesSchemaSubcommand
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XM3LOQIX.js";
|
|
25
25
|
import "./chunk-GGP5R3FU.js";
|
|
26
26
|
import {
|
|
27
27
|
printError
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-CQJRLNTX.js";
|
|
29
29
|
import {
|
|
30
30
|
parseArguments
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-57RHXXXG.js";
|
|
32
|
+
import "./chunk-RKDCNQ4S.js";
|
|
33
|
+
import "./chunk-AWCID36T.js";
|
|
32
34
|
import {
|
|
33
35
|
getFlagsSpecification
|
|
34
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
35
37
|
import "./chunk-P4QNYOFB.js";
|
|
36
38
|
import {
|
|
37
39
|
output_manager_default
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
fetchCustomMetricDetailOrExit,
|
|
11
11
|
fetchMetricCatalogListOrExit,
|
|
12
12
|
fetchMetricDetailOrExit
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AWSLWAOC.js";
|
|
14
14
|
import {
|
|
15
15
|
formatErrorJson
|
|
16
16
|
} from "./chunk-CV4S27SS.js";
|
|
@@ -19,29 +19,32 @@ import {
|
|
|
19
19
|
} from "./chunk-A3NYPUKZ.js";
|
|
20
20
|
import {
|
|
21
21
|
formatTable
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OQ3C5VXZ.js";
|
|
23
23
|
import {
|
|
24
24
|
validateJsonOutput
|
|
25
25
|
} from "./chunk-KXDWXXJH.js";
|
|
26
26
|
import {
|
|
27
27
|
schemaSubcommand
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MTWHQEXI.js";
|
|
29
29
|
import {
|
|
30
30
|
getScope,
|
|
31
31
|
require_pluralize
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-E6LFKMI2.js";
|
|
33
|
+
import "./chunk-OHER4DGX.js";
|
|
33
34
|
import "./chunk-CYNB6LL4.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-L7CEMAJG.js";
|
|
35
36
|
import "./chunk-GGP5R3FU.js";
|
|
36
37
|
import {
|
|
37
38
|
printError
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-CQJRLNTX.js";
|
|
39
40
|
import {
|
|
40
41
|
parseArguments
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-57RHXXXG.js";
|
|
43
|
+
import "./chunk-RKDCNQ4S.js";
|
|
44
|
+
import "./chunk-AWCID36T.js";
|
|
42
45
|
import {
|
|
43
46
|
getFlagsSpecification
|
|
44
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
45
48
|
import "./chunk-P4QNYOFB.js";
|
|
46
49
|
import "./chunk-52QYYTM5.js";
|
|
47
50
|
import {
|
|
@@ -0,0 +1,243 @@
|
|
|
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
|
+
EMPTY_PATH_ERROR,
|
|
9
|
+
ENVIRONMENT_ERROR,
|
|
10
|
+
RATE_ERROR,
|
|
11
|
+
RULE_LIMIT,
|
|
12
|
+
formatRate,
|
|
13
|
+
formatRuleTarget,
|
|
14
|
+
handleTracingApiError,
|
|
15
|
+
hasSameKey,
|
|
16
|
+
invalidArguments,
|
|
17
|
+
isRuleEnvironment,
|
|
18
|
+
parseSampleRate,
|
|
19
|
+
readProjectTracing,
|
|
20
|
+
resolveConfigScope,
|
|
21
|
+
subcommandArguments,
|
|
22
|
+
toApiRate,
|
|
23
|
+
toRule,
|
|
24
|
+
writeConfigJson,
|
|
25
|
+
writeSamplingRules
|
|
26
|
+
} from "./chunk-ZKUHCL6O.js";
|
|
27
|
+
import "./chunk-5GGUB4EO.js";
|
|
28
|
+
import {
|
|
29
|
+
validateJsonOutput
|
|
30
|
+
} from "./chunk-KXDWXXJH.js";
|
|
31
|
+
import {
|
|
32
|
+
tracesCommand
|
|
33
|
+
} from "./chunk-7Q45OKWR.js";
|
|
34
|
+
import {
|
|
35
|
+
setSubcommand
|
|
36
|
+
} from "./chunk-GY5I4AYD.js";
|
|
37
|
+
import {
|
|
38
|
+
help
|
|
39
|
+
} from "./chunk-RZ5NP6HN.js";
|
|
40
|
+
import "./chunk-E6LFKMI2.js";
|
|
41
|
+
import "./chunk-OHER4DGX.js";
|
|
42
|
+
import {
|
|
43
|
+
TelemetryClient
|
|
44
|
+
} from "./chunk-CYNB6LL4.js";
|
|
45
|
+
import "./chunk-L7CEMAJG.js";
|
|
46
|
+
import "./chunk-GGP5R3FU.js";
|
|
47
|
+
import {
|
|
48
|
+
printError
|
|
49
|
+
} from "./chunk-CQJRLNTX.js";
|
|
50
|
+
import {
|
|
51
|
+
parseArguments
|
|
52
|
+
} from "./chunk-57RHXXXG.js";
|
|
53
|
+
import "./chunk-RKDCNQ4S.js";
|
|
54
|
+
import "./chunk-AWCID36T.js";
|
|
55
|
+
import {
|
|
56
|
+
getCommandName,
|
|
57
|
+
getCommandNamePlain,
|
|
58
|
+
getFlagsSpecification
|
|
59
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
60
|
+
import "./chunk-P4QNYOFB.js";
|
|
61
|
+
import "./chunk-52QYYTM5.js";
|
|
62
|
+
import {
|
|
63
|
+
output_manager_default
|
|
64
|
+
} from "./chunk-OX7KI3LF.js";
|
|
65
|
+
import {
|
|
66
|
+
require_source
|
|
67
|
+
} from "./chunk-S7KYDPEM.js";
|
|
68
|
+
import {
|
|
69
|
+
__toESM
|
|
70
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
71
|
+
|
|
72
|
+
// src/commands/traces/config/set.ts
|
|
73
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
74
|
+
|
|
75
|
+
// src/util/telemetry/commands/traces/config/set.ts
|
|
76
|
+
var TracesConfigSetTelemetryClient = class extends TelemetryClient {
|
|
77
|
+
/**
|
|
78
|
+
* The environment word is a closed set, so a valid value is tracked raw.
|
|
79
|
+
* Anything else is a typo the CLI rejected and is redacted.
|
|
80
|
+
*/
|
|
81
|
+
trackCliArgumentEnvironment(environment) {
|
|
82
|
+
if (environment) {
|
|
83
|
+
this.trackCliArgument({
|
|
84
|
+
arg: "environment",
|
|
85
|
+
value: isRuleEnvironment(environment) ? environment : this.redactedValue
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
trackCliArgumentRate(rate) {
|
|
90
|
+
if (rate) {
|
|
91
|
+
this.trackCliArgument({
|
|
92
|
+
arg: "rate",
|
|
93
|
+
value: this.redactedValue
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/** The path prefix is customer data. */
|
|
98
|
+
trackCliArgumentRequestPath(requestPath) {
|
|
99
|
+
if (requestPath) {
|
|
100
|
+
this.trackCliArgument({
|
|
101
|
+
arg: "requestPath",
|
|
102
|
+
value: this.redactedValue
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
trackCliFlagJson(json) {
|
|
107
|
+
if (json) {
|
|
108
|
+
this.trackCliFlag("json");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// src/commands/traces/config/set.ts
|
|
114
|
+
var USAGE = "traces config set <environment> <rate> [requestPath]";
|
|
115
|
+
async function set(client) {
|
|
116
|
+
const telemetry = new TracesConfigSetTelemetryClient({
|
|
117
|
+
opts: { store: client.telemetryEventStore }
|
|
118
|
+
});
|
|
119
|
+
let parsedArgs;
|
|
120
|
+
const flagsSpecification = getFlagsSpecification(setSubcommand.options);
|
|
121
|
+
try {
|
|
122
|
+
parsedArgs = parseArguments(client.argv.slice(2), flagsSpecification);
|
|
123
|
+
} catch (err) {
|
|
124
|
+
printError(err);
|
|
125
|
+
return 1;
|
|
126
|
+
}
|
|
127
|
+
const { flags } = parsedArgs;
|
|
128
|
+
const [environmentArg, rateArg, ...pathArgs] = subcommandArguments(
|
|
129
|
+
parsedArgs.args
|
|
130
|
+
);
|
|
131
|
+
const pathArg = pathArgs[0];
|
|
132
|
+
telemetry.trackCliArgumentEnvironment(environmentArg);
|
|
133
|
+
telemetry.trackCliArgumentRate(rateArg);
|
|
134
|
+
telemetry.trackCliArgumentRequestPath(pathArg);
|
|
135
|
+
telemetry.trackCliOptionFormat(flags["--format"]);
|
|
136
|
+
telemetry.trackCliFlagJson(flags["--json"]);
|
|
137
|
+
telemetry.trackCliOptionProject(flags["--project"]);
|
|
138
|
+
if (environmentArg === void 0 || rateArg === void 0) {
|
|
139
|
+
output_manager_default.print(
|
|
140
|
+
help(setSubcommand, {
|
|
141
|
+
parent: { ...tracesCommand, name: "traces config" },
|
|
142
|
+
columns: client.stderr.columns
|
|
143
|
+
})
|
|
144
|
+
);
|
|
145
|
+
return 2;
|
|
146
|
+
}
|
|
147
|
+
if (pathArgs.length > 1) {
|
|
148
|
+
output_manager_default.error(`Too many arguments. Usage: ${getCommandName(USAGE)}`);
|
|
149
|
+
return 2;
|
|
150
|
+
}
|
|
151
|
+
if (!isRuleEnvironment(environmentArg)) {
|
|
152
|
+
return invalidArguments(
|
|
153
|
+
client,
|
|
154
|
+
`${ENVIRONMENT_ERROR} Received: ${environmentArg}`
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
const sampleRate = parseSampleRate(rateArg);
|
|
158
|
+
if (sampleRate === void 0) {
|
|
159
|
+
return invalidArguments(client, `${RATE_ERROR} Received: ${rateArg}`);
|
|
160
|
+
}
|
|
161
|
+
if (pathArg !== void 0 && pathArg.trim() === "") {
|
|
162
|
+
return invalidArguments(client, EMPTY_PATH_ERROR);
|
|
163
|
+
}
|
|
164
|
+
const formatResult = validateJsonOutput(flags);
|
|
165
|
+
if (!formatResult.valid) {
|
|
166
|
+
output_manager_default.error(formatResult.error);
|
|
167
|
+
return 1;
|
|
168
|
+
}
|
|
169
|
+
const asJson = formatResult.jsonOutput || client.nonInteractive;
|
|
170
|
+
const scope = await resolveConfigScope(client, {
|
|
171
|
+
project: flags["--project"]
|
|
172
|
+
});
|
|
173
|
+
if ("exitCode" in scope) {
|
|
174
|
+
return scope.exitCode;
|
|
175
|
+
}
|
|
176
|
+
const rule = {
|
|
177
|
+
environment: environmentArg,
|
|
178
|
+
requestPath: pathArg ?? null,
|
|
179
|
+
sampleRate
|
|
180
|
+
};
|
|
181
|
+
if (!asJson) {
|
|
182
|
+
output_manager_default.spinner("Updating trace sampling rules\u2026");
|
|
183
|
+
}
|
|
184
|
+
let project;
|
|
185
|
+
let tracing;
|
|
186
|
+
let entries;
|
|
187
|
+
try {
|
|
188
|
+
({ project, tracing, entries } = await readProjectTracing({
|
|
189
|
+
client,
|
|
190
|
+
...scope
|
|
191
|
+
}));
|
|
192
|
+
} catch (err) {
|
|
193
|
+
output_manager_default.stopSpinner();
|
|
194
|
+
return handleTracingApiError(client, err);
|
|
195
|
+
}
|
|
196
|
+
const existingIndex = entries.findIndex((entry) => hasSameKey(entry.row, rule));
|
|
197
|
+
const previous = existingIndex === -1 ? void 0 : entries[existingIndex].row;
|
|
198
|
+
const nextRules = existingIndex === -1 ? [...entries.map((entry) => entry.rule), toRule(rule)] : entries.map(
|
|
199
|
+
(entry, index) => index === existingIndex ? { ...entry.rule, rate: toApiRate(rule.sampleRate) } : entry.rule
|
|
200
|
+
);
|
|
201
|
+
if (nextRules.length > RULE_LIMIT) {
|
|
202
|
+
output_manager_default.stopSpinner();
|
|
203
|
+
return invalidArguments(
|
|
204
|
+
client,
|
|
205
|
+
`A project can have at most ${RULE_LIMIT} trace sampling rules, and ${project.name} already has ${entries.length}. Remove one with ${getCommandName("traces config rm <environment> [requestPath]")} first.`
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
try {
|
|
209
|
+
await writeSamplingRules({ client, ...scope, tracing, rules: nextRules });
|
|
210
|
+
} catch (err) {
|
|
211
|
+
output_manager_default.stopSpinner();
|
|
212
|
+
return handleTracingApiError(client, err);
|
|
213
|
+
}
|
|
214
|
+
output_manager_default.stopSpinner();
|
|
215
|
+
const target = formatRuleTarget(rule.environment, rule.requestPath);
|
|
216
|
+
const wasClause = previous ? ` (was ${formatRate(previous.sampleRate)})` : "";
|
|
217
|
+
const successLine = (subject) => `Set ${subject} to ${formatRate(rule.sampleRate)}${wasClause}. ${nextRules.length} of ${RULE_LIMIT} rules.`;
|
|
218
|
+
if (asJson) {
|
|
219
|
+
writeConfigJson(client, {
|
|
220
|
+
project,
|
|
221
|
+
bare: rule,
|
|
222
|
+
envelope: {
|
|
223
|
+
rule,
|
|
224
|
+
previousSampleRate: previous?.sampleRate ?? null,
|
|
225
|
+
ruleCount: nextRules.length,
|
|
226
|
+
ruleLimit: RULE_LIMIT
|
|
227
|
+
},
|
|
228
|
+
message: successLine(target),
|
|
229
|
+
next: [
|
|
230
|
+
{
|
|
231
|
+
command: getCommandNamePlain("traces config ls"),
|
|
232
|
+
when: "Read back every sampling rule"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
});
|
|
236
|
+
return 0;
|
|
237
|
+
}
|
|
238
|
+
output_manager_default.success(successLine(import_chalk.default.bold(target)));
|
|
239
|
+
return 0;
|
|
240
|
+
}
|
|
241
|
+
export {
|
|
242
|
+
set as default
|
|
243
|
+
};
|
|
@@ -14,8 +14,9 @@ import {
|
|
|
14
14
|
AGENT_REASON,
|
|
15
15
|
buildCommandWithGlobalFlags,
|
|
16
16
|
outputAgentError
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-L7CEMAJG.js";
|
|
18
|
+
import "./chunk-AWCID36T.js";
|
|
19
|
+
import "./chunk-Q2DGFCO7.js";
|
|
19
20
|
import "./chunk-P4QNYOFB.js";
|
|
20
21
|
import {
|
|
21
22
|
output_manager_default
|
|
@@ -52,9 +53,9 @@ async function tags(client, argv, telemetry) {
|
|
|
52
53
|
}
|
|
53
54
|
switch (subcommand) {
|
|
54
55
|
case "ls":
|
|
55
|
-
return (await import("./ls-
|
|
56
|
+
return (await import("./ls-YIF3KLF3.js")).default(client, args, telemetry);
|
|
56
57
|
case "inspect":
|
|
57
|
-
return (await import("./inspect-
|
|
58
|
+
return (await import("./inspect-B3OWUFLH.js")).default(client, args, telemetry);
|
|
58
59
|
default:
|
|
59
60
|
output_manager_default.error(`Unhandled tags subcommand: ${subcommand}`);
|
|
60
61
|
return 1;
|
|
@@ -9,18 +9,22 @@ import {
|
|
|
9
9
|
} from "./chunk-KXDWXXJH.js";
|
|
10
10
|
import {
|
|
11
11
|
typesSubcommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4KD5BYHB.js";
|
|
13
13
|
import {
|
|
14
|
-
printError
|
|
15
|
-
|
|
16
|
-
} from "./chunk-VAFU7DXZ.js";
|
|
14
|
+
printError
|
|
15
|
+
} from "./chunk-CQJRLNTX.js";
|
|
17
16
|
import {
|
|
18
17
|
parseArguments
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-57RHXXXG.js";
|
|
19
|
+
import {
|
|
20
|
+
table
|
|
21
|
+
} from "./chunk-RKDCNQ4S.js";
|
|
20
22
|
import {
|
|
21
|
-
getFlagsSpecification,
|
|
22
23
|
isAPIError
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-AWCID36T.js";
|
|
25
|
+
import {
|
|
26
|
+
getFlagsSpecification
|
|
27
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
24
28
|
import "./chunk-P4QNYOFB.js";
|
|
25
29
|
import {
|
|
26
30
|
output_manager_default
|
|
@@ -8,42 +8,46 @@ import {
|
|
|
8
8
|
parseCustomAlertQueryBody,
|
|
9
9
|
resolveCustomAlertProjectName,
|
|
10
10
|
setMissingCustomAlertProjectScope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CSCSGSQG.js";
|
|
12
12
|
import {
|
|
13
13
|
emitRulesArgParseError,
|
|
14
14
|
handleRulesApiError,
|
|
15
15
|
parseRulesFlagsAndScope,
|
|
16
16
|
rulesItemPath
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-PBHBX6UL.js";
|
|
18
|
+
import "./chunk-NSU2BTRS.js";
|
|
19
19
|
import "./chunk-KQRVZWJU.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-4JTF6RD7.js";
|
|
21
|
+
import "./chunk-AINIBIP4.js";
|
|
22
22
|
import {
|
|
23
23
|
validateJsonOutput
|
|
24
24
|
} from "./chunk-KXDWXXJH.js";
|
|
25
25
|
import {
|
|
26
26
|
rulesUpdateSubcommand
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-XM3LOQIX.js";
|
|
28
|
+
import "./chunk-E6LFKMI2.js";
|
|
29
|
+
import "./chunk-OHER4DGX.js";
|
|
29
30
|
import "./chunk-CYNB6LL4.js";
|
|
30
31
|
import {
|
|
31
32
|
AGENT_REASON,
|
|
32
33
|
buildCommandWithGlobalFlags,
|
|
33
34
|
outputAgentError
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-L7CEMAJG.js";
|
|
35
36
|
import "./chunk-GGP5R3FU.js";
|
|
36
37
|
import {
|
|
37
38
|
printError
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-CQJRLNTX.js";
|
|
39
40
|
import {
|
|
40
41
|
parseArguments
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-57RHXXXG.js";
|
|
43
|
+
import "./chunk-RKDCNQ4S.js";
|
|
44
|
+
import {
|
|
45
|
+
isAPIError
|
|
46
|
+
} from "./chunk-AWCID36T.js";
|
|
42
47
|
import {
|
|
43
48
|
getFlagsSpecification,
|
|
44
|
-
isAPIError,
|
|
45
49
|
packageName
|
|
46
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
47
51
|
import "./chunk-P4QNYOFB.js";
|
|
48
52
|
import "./chunk-52QYYTM5.js";
|
|
49
53
|
import {
|
|
@@ -11,21 +11,21 @@ import {
|
|
|
11
11
|
require_service_schedules,
|
|
12
12
|
require_write_build_result,
|
|
13
13
|
writeBuildResult
|
|
14
|
-
} from "../../chunks/chunk-
|
|
14
|
+
} from "../../chunks/chunk-TAZ5ZAKG.js";
|
|
15
15
|
import {
|
|
16
16
|
importBuilders,
|
|
17
17
|
import_import_builders
|
|
18
|
-
} from "../../chunks/chunk-
|
|
18
|
+
} from "../../chunks/chunk-JJQP3PYM.js";
|
|
19
19
|
import {
|
|
20
20
|
js_yaml_default,
|
|
21
21
|
pullCommandLogic
|
|
22
|
-
} from "../../chunks/chunk-
|
|
22
|
+
} from "../../chunks/chunk-VWYNSJXI.js";
|
|
23
23
|
import {
|
|
24
24
|
require_semver
|
|
25
25
|
} from "../../chunks/chunk-IB5L4LKZ.js";
|
|
26
26
|
import {
|
|
27
27
|
readProjectSettings
|
|
28
|
-
} from "../../chunks/chunk-
|
|
28
|
+
} from "../../chunks/chunk-TDXNNIZ6.js";
|
|
29
29
|
import "../../chunks/chunk-R6IGDGX3.js";
|
|
30
30
|
import "../../chunks/chunk-HT2XWSAJ.js";
|
|
31
31
|
import {
|
|
@@ -34,10 +34,10 @@ import {
|
|
|
34
34
|
import "../../chunks/chunk-VXYGCOKL.js";
|
|
35
35
|
import {
|
|
36
36
|
buildCommand
|
|
37
|
-
} from "../../chunks/chunk-
|
|
37
|
+
} from "../../chunks/chunk-7XX4ZEOV.js";
|
|
38
38
|
import {
|
|
39
39
|
help
|
|
40
|
-
} from "../../chunks/chunk-
|
|
40
|
+
} from "../../chunks/chunk-RZ5NP6HN.js";
|
|
41
41
|
import {
|
|
42
42
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
43
43
|
VERCEL_DIR,
|
|
@@ -63,7 +63,8 @@ import {
|
|
|
63
63
|
resolveProjectCwd,
|
|
64
64
|
ua_default,
|
|
65
65
|
validateConfig
|
|
66
|
-
} from "../../chunks/chunk-
|
|
66
|
+
} from "../../chunks/chunk-E6LFKMI2.js";
|
|
67
|
+
import "../../chunks/chunk-OHER4DGX.js";
|
|
67
68
|
import {
|
|
68
69
|
TelemetryClient
|
|
69
70
|
} from "../../chunks/chunk-CYNB6LL4.js";
|
|
@@ -71,17 +72,20 @@ import {
|
|
|
71
72
|
AGENT_REASON,
|
|
72
73
|
AGENT_STATUS,
|
|
73
74
|
outputAgentError
|
|
74
|
-
} from "../../chunks/chunk-
|
|
75
|
+
} from "../../chunks/chunk-L7CEMAJG.js";
|
|
75
76
|
import "../../chunks/chunk-GGP5R3FU.js";
|
|
76
77
|
import {
|
|
77
78
|
printError,
|
|
78
79
|
toEnumerableError
|
|
79
|
-
} from "../../chunks/chunk-
|
|
80
|
+
} from "../../chunks/chunk-CQJRLNTX.js";
|
|
80
81
|
import {
|
|
81
82
|
parseArguments
|
|
82
|
-
} from "../../chunks/chunk-
|
|
83
|
+
} from "../../chunks/chunk-57RHXXXG.js";
|
|
84
|
+
import "../../chunks/chunk-RKDCNQ4S.js";
|
|
85
|
+
import {
|
|
86
|
+
CantParseJSONFile
|
|
87
|
+
} from "../../chunks/chunk-AWCID36T.js";
|
|
83
88
|
import {
|
|
84
|
-
CantParseJSONFile,
|
|
85
89
|
cmd,
|
|
86
90
|
getCommandName,
|
|
87
91
|
getCommandNamePlain,
|
|
@@ -89,7 +93,7 @@ import {
|
|
|
89
93
|
getGlobalFlagsFromArgs,
|
|
90
94
|
packageName,
|
|
91
95
|
require_lib as require_lib2
|
|
92
|
-
} from "../../chunks/chunk-
|
|
96
|
+
} from "../../chunks/chunk-Q2DGFCO7.js";
|
|
93
97
|
import {
|
|
94
98
|
pkg_default
|
|
95
99
|
} from "../../chunks/chunk-P4QNYOFB.js";
|