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
|
@@ -0,0 +1,249 @@
|
|
|
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
|
+
MISSING_BOTH_MESSAGE
|
|
9
|
+
} from "./chunk-5GGUB4EO.js";
|
|
10
|
+
import {
|
|
11
|
+
RULE_ENVIRONMENTS
|
|
12
|
+
} from "./chunk-GY5I4AYD.js";
|
|
13
|
+
import {
|
|
14
|
+
detectExplicitScope,
|
|
15
|
+
resolveProjectContext
|
|
16
|
+
} from "./chunk-E6LFKMI2.js";
|
|
17
|
+
import {
|
|
18
|
+
AGENT_REASON,
|
|
19
|
+
AGENT_STATUS,
|
|
20
|
+
outputAgentError
|
|
21
|
+
} from "./chunk-L7CEMAJG.js";
|
|
22
|
+
import {
|
|
23
|
+
printError
|
|
24
|
+
} from "./chunk-CQJRLNTX.js";
|
|
25
|
+
import {
|
|
26
|
+
isAPIError
|
|
27
|
+
} from "./chunk-AWCID36T.js";
|
|
28
|
+
import {
|
|
29
|
+
output_manager_default
|
|
30
|
+
} from "./chunk-OX7KI3LF.js";
|
|
31
|
+
|
|
32
|
+
// src/commands/traces/config/errors.ts
|
|
33
|
+
function messageFor(err) {
|
|
34
|
+
if (isAPIError(err)) {
|
|
35
|
+
return err.serverMessage || err.message;
|
|
36
|
+
}
|
|
37
|
+
return err instanceof Error ? err.message : String(err);
|
|
38
|
+
}
|
|
39
|
+
function handleTracingApiError(client, err) {
|
|
40
|
+
if (client.nonInteractive) {
|
|
41
|
+
const status = isAPIError(err) ? err.status : void 0;
|
|
42
|
+
outputAgentError(client, {
|
|
43
|
+
status: AGENT_STATUS.ERROR,
|
|
44
|
+
reason: status === 403 ? AGENT_REASON.PERMISSION_DENIED : status === 404 ? AGENT_REASON.NOT_FOUND : AGENT_REASON.API_ERROR,
|
|
45
|
+
message: messageFor(err)
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (isAPIError(err) && err.status === 403) {
|
|
49
|
+
output_manager_default.error(messageFor(err));
|
|
50
|
+
return 1;
|
|
51
|
+
}
|
|
52
|
+
printError(err);
|
|
53
|
+
return 1;
|
|
54
|
+
}
|
|
55
|
+
function configError(client, reason, message) {
|
|
56
|
+
if (client.nonInteractive) {
|
|
57
|
+
outputAgentError(client, {
|
|
58
|
+
status: AGENT_STATUS.ERROR,
|
|
59
|
+
reason,
|
|
60
|
+
message
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
output_manager_default.error(message);
|
|
64
|
+
return 1;
|
|
65
|
+
}
|
|
66
|
+
function invalidArguments(client, message) {
|
|
67
|
+
return configError(client, AGENT_REASON.INVALID_ARGUMENTS, message);
|
|
68
|
+
}
|
|
69
|
+
function ruleNotFound(client, message) {
|
|
70
|
+
return configError(client, AGENT_REASON.NOT_FOUND, message);
|
|
71
|
+
}
|
|
72
|
+
function confirmationRequired(client, message, next) {
|
|
73
|
+
outputAgentError(client, {
|
|
74
|
+
status: AGENT_STATUS.ERROR,
|
|
75
|
+
reason: AGENT_REASON.CONFIRMATION_REQUIRED,
|
|
76
|
+
message,
|
|
77
|
+
userActionRequired: true,
|
|
78
|
+
next
|
|
79
|
+
});
|
|
80
|
+
output_manager_default.error(message);
|
|
81
|
+
return 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// src/commands/traces/config/json-output.ts
|
|
85
|
+
function writeConfigJson(client, {
|
|
86
|
+
project,
|
|
87
|
+
bare,
|
|
88
|
+
envelope,
|
|
89
|
+
message,
|
|
90
|
+
next
|
|
91
|
+
}) {
|
|
92
|
+
if (!client.nonInteractive) {
|
|
93
|
+
client.stdout.write(`${JSON.stringify(bare, null, 2)}
|
|
94
|
+
`);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
client.stdout.write(
|
|
98
|
+
`${JSON.stringify(
|
|
99
|
+
{
|
|
100
|
+
status: AGENT_STATUS.OK,
|
|
101
|
+
projectId: project.id,
|
|
102
|
+
projectName: project.name,
|
|
103
|
+
...envelope,
|
|
104
|
+
message,
|
|
105
|
+
next
|
|
106
|
+
},
|
|
107
|
+
null,
|
|
108
|
+
2
|
|
109
|
+
)}
|
|
110
|
+
`
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// src/commands/traces/config/rules.ts
|
|
115
|
+
var RULE_LIMIT = 10;
|
|
116
|
+
var MIN_SAMPLE_RATE = 1;
|
|
117
|
+
var MAX_SAMPLE_RATE = 100;
|
|
118
|
+
function isRuleEnvironment(value) {
|
|
119
|
+
return RULE_ENVIRONMENTS.includes(value);
|
|
120
|
+
}
|
|
121
|
+
var ENVIRONMENT_ERROR = `\`environment\` must be one of: ${RULE_ENVIRONMENTS.join(", ")}.`;
|
|
122
|
+
var RATE_ERROR = `\`rate\` must be a whole number from ${MIN_SAMPLE_RATE} to ${MAX_SAMPLE_RATE}.`;
|
|
123
|
+
var EMPTY_PATH_ERROR = "`requestPath` cannot be empty.";
|
|
124
|
+
function parseSampleRate(value) {
|
|
125
|
+
if (!/^\d+$/.test(value.trim())) {
|
|
126
|
+
return void 0;
|
|
127
|
+
}
|
|
128
|
+
const rate = Number(value);
|
|
129
|
+
return rate >= MIN_SAMPLE_RATE && rate <= MAX_SAMPLE_RATE ? rate : void 0;
|
|
130
|
+
}
|
|
131
|
+
function toRow(rule) {
|
|
132
|
+
return {
|
|
133
|
+
environment: rule.env ?? "any",
|
|
134
|
+
requestPath: rule.requestPath ?? null,
|
|
135
|
+
sampleRate: Math.round(rule.rate * 100)
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function toApiRate(sampleRate) {
|
|
139
|
+
return sampleRate / 100;
|
|
140
|
+
}
|
|
141
|
+
function toRule(row) {
|
|
142
|
+
return {
|
|
143
|
+
rate: toApiRate(row.sampleRate),
|
|
144
|
+
...row.environment === "any" ? {} : { env: row.environment },
|
|
145
|
+
...row.requestPath === null ? {} : { requestPath: row.requestPath }
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
var ALL_PATHS_LABEL = "(all paths)";
|
|
149
|
+
function formatPath(requestPath) {
|
|
150
|
+
return requestPath ?? ALL_PATHS_LABEL;
|
|
151
|
+
}
|
|
152
|
+
function formatRate(sampleRate) {
|
|
153
|
+
return `${sampleRate}%`;
|
|
154
|
+
}
|
|
155
|
+
function formatRuleTarget(environment, requestPath) {
|
|
156
|
+
return `${environment} ${formatPath(requestPath)}`;
|
|
157
|
+
}
|
|
158
|
+
function formatRuleLine(row) {
|
|
159
|
+
return `${formatRuleTarget(row.environment, row.requestPath)} ${formatRate(row.sampleRate)}`;
|
|
160
|
+
}
|
|
161
|
+
var COMMAND_WORD_COUNT = 3;
|
|
162
|
+
function subcommandArguments(positional) {
|
|
163
|
+
return positional.slice(COMMAND_WORD_COUNT);
|
|
164
|
+
}
|
|
165
|
+
function hasSameKey(a, b) {
|
|
166
|
+
return a.environment === b.environment && a.requestPath === b.requestPath;
|
|
167
|
+
}
|
|
168
|
+
async function readProjectTracing({
|
|
169
|
+
client,
|
|
170
|
+
teamId,
|
|
171
|
+
projectId
|
|
172
|
+
}) {
|
|
173
|
+
const project = await client.fetch(
|
|
174
|
+
`/v9/projects/${encodeURIComponent(projectId)}`,
|
|
175
|
+
{ accountId: teamId }
|
|
176
|
+
);
|
|
177
|
+
const tracing = project.tracing ?? null;
|
|
178
|
+
return {
|
|
179
|
+
project,
|
|
180
|
+
tracing,
|
|
181
|
+
entries: (tracing?.samplingRules ?? []).map((rule) => ({
|
|
182
|
+
rule,
|
|
183
|
+
row: toRow(rule)
|
|
184
|
+
}))
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
async function writeSamplingRules({
|
|
188
|
+
client,
|
|
189
|
+
teamId,
|
|
190
|
+
projectId,
|
|
191
|
+
tracing,
|
|
192
|
+
rules
|
|
193
|
+
}) {
|
|
194
|
+
const body = {
|
|
195
|
+
tracing: { ...tracing ?? {}, samplingRules: rules }
|
|
196
|
+
};
|
|
197
|
+
await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`, {
|
|
198
|
+
accountId: teamId,
|
|
199
|
+
method: "PATCH",
|
|
200
|
+
body
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// src/commands/traces/config/scope.ts
|
|
205
|
+
async function resolveConfigScope(client, flags) {
|
|
206
|
+
const link = await resolveProjectContext({
|
|
207
|
+
client,
|
|
208
|
+
projectNameOrId: flags.project
|
|
209
|
+
});
|
|
210
|
+
if (link.status === "error") {
|
|
211
|
+
return { exitCode: link.exitCode };
|
|
212
|
+
}
|
|
213
|
+
if (link.status === "not_linked") {
|
|
214
|
+
output_manager_default.error(MISSING_BOTH_MESSAGE);
|
|
215
|
+
return { exitCode: 1 };
|
|
216
|
+
}
|
|
217
|
+
if (flags.project === void 0 && detectExplicitScope(client) && link.org.id !== client.config.currentTeam) {
|
|
218
|
+
output_manager_default.error(
|
|
219
|
+
`The linked project ${link.project.name} belongs to ${link.org.slug || link.org.id}, which is not the scope that was passed. Pass --project <name> to act on a project in that scope.`
|
|
220
|
+
);
|
|
221
|
+
return { exitCode: 1 };
|
|
222
|
+
}
|
|
223
|
+
return { teamId: link.org.id, projectId: link.project.id };
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export {
|
|
227
|
+
handleTracingApiError,
|
|
228
|
+
invalidArguments,
|
|
229
|
+
ruleNotFound,
|
|
230
|
+
confirmationRequired,
|
|
231
|
+
writeConfigJson,
|
|
232
|
+
RULE_LIMIT,
|
|
233
|
+
isRuleEnvironment,
|
|
234
|
+
ENVIRONMENT_ERROR,
|
|
235
|
+
RATE_ERROR,
|
|
236
|
+
EMPTY_PATH_ERROR,
|
|
237
|
+
parseSampleRate,
|
|
238
|
+
toApiRate,
|
|
239
|
+
toRule,
|
|
240
|
+
formatPath,
|
|
241
|
+
formatRate,
|
|
242
|
+
formatRuleTarget,
|
|
243
|
+
formatRuleLine,
|
|
244
|
+
subcommandArguments,
|
|
245
|
+
hasSameKey,
|
|
246
|
+
readProjectTracing,
|
|
247
|
+
writeSamplingRules,
|
|
248
|
+
resolveConfigScope
|
|
249
|
+
};
|
|
@@ -13,32 +13,36 @@ import {
|
|
|
13
13
|
requireVcrRepository,
|
|
14
14
|
resolveVcrScope,
|
|
15
15
|
validateVcrJsonOutput
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-M3OSDZPY.js";
|
|
17
17
|
import "./chunk-G75NFPIT.js";
|
|
18
18
|
import "./chunk-KQRVZWJU.js";
|
|
19
19
|
import "./chunk-KXDWXXJH.js";
|
|
20
20
|
import {
|
|
21
21
|
permissionsClearSubcommand
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EZKW5YJ2.js";
|
|
23
23
|
import "./chunk-R6IGDGX3.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-E6LFKMI2.js";
|
|
25
|
+
import "./chunk-OHER4DGX.js";
|
|
25
26
|
import "./chunk-CYNB6LL4.js";
|
|
26
27
|
import {
|
|
27
28
|
AGENT_REASON,
|
|
28
29
|
buildCommandWithYes,
|
|
29
30
|
outputAgentError
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-L7CEMAJG.js";
|
|
31
32
|
import "./chunk-GGP5R3FU.js";
|
|
32
33
|
import {
|
|
33
34
|
printError
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-CQJRLNTX.js";
|
|
35
36
|
import {
|
|
36
37
|
parseArguments
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-57RHXXXG.js";
|
|
39
|
+
import "./chunk-RKDCNQ4S.js";
|
|
38
40
|
import {
|
|
39
|
-
getFlagsSpecification,
|
|
40
41
|
isAPIError
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-AWCID36T.js";
|
|
43
|
+
import {
|
|
44
|
+
getFlagsSpecification
|
|
45
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
42
46
|
import "./chunk-P4QNYOFB.js";
|
|
43
47
|
import "./chunk-52QYYTM5.js";
|
|
44
48
|
import {
|
|
@@ -11,13 +11,16 @@ import {
|
|
|
11
11
|
findSourceVercelConfigFile,
|
|
12
12
|
getVercelConfigPath,
|
|
13
13
|
normalizeConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-E6LFKMI2.js";
|
|
15
|
+
import "./chunk-OHER4DGX.js";
|
|
15
16
|
import "./chunk-CYNB6LL4.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-L7CEMAJG.js";
|
|
17
18
|
import "./chunk-GGP5R3FU.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-CQJRLNTX.js";
|
|
20
|
+
import "./chunk-57RHXXXG.js";
|
|
21
|
+
import "./chunk-RKDCNQ4S.js";
|
|
22
|
+
import "./chunk-AWCID36T.js";
|
|
23
|
+
import "./chunk-Q2DGFCO7.js";
|
|
21
24
|
import "./chunk-P4QNYOFB.js";
|
|
22
25
|
import "./chunk-52QYYTM5.js";
|
|
23
26
|
import "./chunk-OX7KI3LF.js";
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
getSubcommand
|
|
9
|
+
} from "./chunk-YPQSDAEW.js";
|
|
10
|
+
import {
|
|
11
|
+
getCommandAliases
|
|
12
|
+
} from "./chunk-QG4PCM45.js";
|
|
13
|
+
import {
|
|
14
|
+
tracesCommand
|
|
15
|
+
} from "./chunk-7Q45OKWR.js";
|
|
16
|
+
import {
|
|
17
|
+
lsSubcommand,
|
|
18
|
+
rmSubcommand,
|
|
19
|
+
setSubcommand,
|
|
20
|
+
tracesConfigCommand
|
|
21
|
+
} from "./chunk-GY5I4AYD.js";
|
|
22
|
+
import "./chunk-CJV7J7B5.js";
|
|
23
|
+
import "./chunk-EZKW5YJ2.js";
|
|
24
|
+
import "./chunk-NFU4XJIR.js";
|
|
25
|
+
import "./chunk-3HZLXCVL.js";
|
|
26
|
+
import "./chunk-MTWHQEXI.js";
|
|
27
|
+
import "./chunk-POOO7W47.js";
|
|
28
|
+
import "./chunk-SLPSPYVR.js";
|
|
29
|
+
import "./chunk-4KD5BYHB.js";
|
|
30
|
+
import "./chunk-DWIC7MRV.js";
|
|
31
|
+
import "./chunk-XM3LOQIX.js";
|
|
32
|
+
import "./chunk-XDGOOW3K.js";
|
|
33
|
+
import "./chunk-VP5Y3SZG.js";
|
|
34
|
+
import "./chunk-7XX4ZEOV.js";
|
|
35
|
+
import {
|
|
36
|
+
help
|
|
37
|
+
} from "./chunk-RZ5NP6HN.js";
|
|
38
|
+
import "./chunk-OHER4DGX.js";
|
|
39
|
+
import {
|
|
40
|
+
TelemetryClient
|
|
41
|
+
} from "./chunk-CYNB6LL4.js";
|
|
42
|
+
import "./chunk-RKDCNQ4S.js";
|
|
43
|
+
import "./chunk-Q2DGFCO7.js";
|
|
44
|
+
import "./chunk-P4QNYOFB.js";
|
|
45
|
+
import {
|
|
46
|
+
output_manager_default
|
|
47
|
+
} from "./chunk-OX7KI3LF.js";
|
|
48
|
+
import "./chunk-S7KYDPEM.js";
|
|
49
|
+
import "./chunk-TZ2YI2VH.js";
|
|
50
|
+
|
|
51
|
+
// src/util/telemetry/commands/traces/config/index.ts
|
|
52
|
+
var TracesConfigTelemetryClient = class extends TelemetryClient {
|
|
53
|
+
trackCliSubcommandLs(actual) {
|
|
54
|
+
this.trackCliSubcommand({
|
|
55
|
+
subcommand: "ls",
|
|
56
|
+
value: actual
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
trackCliSubcommandSet(actual) {
|
|
60
|
+
this.trackCliSubcommand({
|
|
61
|
+
subcommand: "set",
|
|
62
|
+
value: actual
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
trackCliSubcommandRm(actual) {
|
|
66
|
+
this.trackCliSubcommand({
|
|
67
|
+
subcommand: "rm",
|
|
68
|
+
value: actual
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// src/commands/traces/config/index.ts
|
|
74
|
+
var COMMAND_CONFIG = {
|
|
75
|
+
ls: getCommandAliases(lsSubcommand),
|
|
76
|
+
set: getCommandAliases(setSubcommand),
|
|
77
|
+
rm: getCommandAliases(rmSubcommand)
|
|
78
|
+
};
|
|
79
|
+
var SUBCOMMAND_METADATA = {
|
|
80
|
+
ls: lsSubcommand,
|
|
81
|
+
set: setSubcommand,
|
|
82
|
+
rm: rmSubcommand
|
|
83
|
+
};
|
|
84
|
+
async function config(client, { args, needHelp, subcommandOriginal, telemetry }) {
|
|
85
|
+
const { subcommand: action, subcommandOriginal: actionOriginal } = getSubcommand(args, COMMAND_CONFIG);
|
|
86
|
+
const actionMetadata = typeof action === "string" ? SUBCOMMAND_METADATA[action] : void 0;
|
|
87
|
+
function printHelp(command, nested) {
|
|
88
|
+
output_manager_default.print(
|
|
89
|
+
help(command, {
|
|
90
|
+
// `help` takes a single parent, so a nested group borrows the parent
|
|
91
|
+
// command with its own path as the name.
|
|
92
|
+
parent: nested ? { ...tracesCommand, name: "traces config" } : tracesCommand,
|
|
93
|
+
columns: client.stderr.columns
|
|
94
|
+
})
|
|
95
|
+
);
|
|
96
|
+
return 2;
|
|
97
|
+
}
|
|
98
|
+
if (needHelp) {
|
|
99
|
+
telemetry.trackCliFlagHelp("traces", subcommandOriginal);
|
|
100
|
+
return actionMetadata ? printHelp(actionMetadata, true) : printHelp(tracesConfigCommand, false);
|
|
101
|
+
}
|
|
102
|
+
telemetry.trackCliSubcommandConfig(subcommandOriginal);
|
|
103
|
+
const configTelemetry = new TracesConfigTelemetryClient({
|
|
104
|
+
opts: { store: client.telemetryEventStore }
|
|
105
|
+
});
|
|
106
|
+
switch (action) {
|
|
107
|
+
case "ls":
|
|
108
|
+
configTelemetry.trackCliSubcommandLs(actionOriginal);
|
|
109
|
+
return (await import("./ls-TM6NTZEB.js")).default(client);
|
|
110
|
+
case "set":
|
|
111
|
+
configTelemetry.trackCliSubcommandSet(actionOriginal);
|
|
112
|
+
return (await import("./set-L47ZCZBJ.js")).default(client);
|
|
113
|
+
case "rm":
|
|
114
|
+
configTelemetry.trackCliSubcommandRm(actionOriginal);
|
|
115
|
+
return (await import("./rm-RV5SQFQA.js")).default(client);
|
|
116
|
+
default:
|
|
117
|
+
return printHelp(tracesConfigCommand, false);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
config as default
|
|
122
|
+
};
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
resolveVcrScope,
|
|
15
15
|
validateVcrChoice,
|
|
16
16
|
validateVcrJsonOutput
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-M3OSDZPY.js";
|
|
18
18
|
import "./chunk-G75NFPIT.js";
|
|
19
19
|
import {
|
|
20
20
|
outputError
|
|
@@ -22,29 +22,33 @@ import {
|
|
|
22
22
|
import "./chunk-KXDWXXJH.js";
|
|
23
23
|
import {
|
|
24
24
|
configSubcommand
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-CJV7J7B5.js";
|
|
26
|
+
import "./chunk-EZKW5YJ2.js";
|
|
27
|
+
import "./chunk-NFU4XJIR.js";
|
|
28
|
+
import "./chunk-3HZLXCVL.js";
|
|
29
29
|
import "./chunk-R6IGDGX3.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-E6LFKMI2.js";
|
|
31
|
+
import "./chunk-OHER4DGX.js";
|
|
31
32
|
import "./chunk-CYNB6LL4.js";
|
|
32
33
|
import {
|
|
33
34
|
AGENT_REASON,
|
|
34
35
|
buildCommandWithGlobalFlags,
|
|
35
36
|
outputAgentError
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-L7CEMAJG.js";
|
|
37
38
|
import "./chunk-GGP5R3FU.js";
|
|
38
39
|
import {
|
|
39
40
|
printError
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-CQJRLNTX.js";
|
|
41
42
|
import {
|
|
42
43
|
parseArguments
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-57RHXXXG.js";
|
|
45
|
+
import "./chunk-RKDCNQ4S.js";
|
|
44
46
|
import {
|
|
45
|
-
getFlagsSpecification,
|
|
46
47
|
isAPIError
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-AWCID36T.js";
|
|
49
|
+
import {
|
|
50
|
+
getFlagsSpecification
|
|
51
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
48
52
|
import "./chunk-P4QNYOFB.js";
|
|
49
53
|
import "./chunk-52QYYTM5.js";
|
|
50
54
|
import {
|
|
@@ -15,25 +15,28 @@ import {
|
|
|
15
15
|
requireProjectContext,
|
|
16
16
|
resolveRoutes,
|
|
17
17
|
withGlobalFlags
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UUVMIXT4.js";
|
|
19
19
|
import {
|
|
20
20
|
deleteSubcommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-POOO7W47.js";
|
|
22
22
|
import {
|
|
23
23
|
stamp_default
|
|
24
24
|
} from "./chunk-64IF634X.js";
|
|
25
25
|
import "./chunk-VXYGCOKL.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-E6LFKMI2.js";
|
|
27
|
+
import "./chunk-OHER4DGX.js";
|
|
27
28
|
import "./chunk-CYNB6LL4.js";
|
|
28
29
|
import {
|
|
29
30
|
AGENT_REASON,
|
|
30
31
|
AGENT_STATUS,
|
|
31
32
|
outputAgentError
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-L7CEMAJG.js";
|
|
33
34
|
import "./chunk-GGP5R3FU.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-CQJRLNTX.js";
|
|
36
|
+
import "./chunk-57RHXXXG.js";
|
|
37
|
+
import "./chunk-RKDCNQ4S.js";
|
|
38
|
+
import "./chunk-AWCID36T.js";
|
|
39
|
+
import "./chunk-Q2DGFCO7.js";
|
|
37
40
|
import "./chunk-P4QNYOFB.js";
|
|
38
41
|
import "./chunk-52QYYTM5.js";
|
|
39
42
|
import {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveCommentsScope,
|
|
14
14
|
threadNotFoundMessage,
|
|
15
15
|
toApiErrorParts
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FA3MO56Q.js";
|
|
17
17
|
import {
|
|
18
18
|
canPrompt
|
|
19
19
|
} from "./chunk-2473DUBR.js";
|
|
@@ -25,19 +25,23 @@ import {
|
|
|
25
25
|
} from "./chunk-KXDWXXJH.js";
|
|
26
26
|
import {
|
|
27
27
|
deleteSubcommand
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-SLPSPYVR.js";
|
|
29
|
+
import "./chunk-E6LFKMI2.js";
|
|
30
|
+
import "./chunk-OHER4DGX.js";
|
|
30
31
|
import "./chunk-CYNB6LL4.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-L7CEMAJG.js";
|
|
32
33
|
import "./chunk-GGP5R3FU.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-CQJRLNTX.js";
|
|
34
35
|
import {
|
|
35
36
|
parseArguments
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-57RHXXXG.js";
|
|
38
|
+
import "./chunk-RKDCNQ4S.js";
|
|
37
39
|
import {
|
|
38
|
-
getFlagsSpecification,
|
|
39
40
|
isAPIError
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-AWCID36T.js";
|
|
42
|
+
import {
|
|
43
|
+
getFlagsSpecification
|
|
44
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
41
45
|
import "./chunk-P4QNYOFB.js";
|
|
42
46
|
import "./chunk-52QYYTM5.js";
|
|
43
47
|
import {
|
|
@@ -17,23 +17,26 @@ import {
|
|
|
17
17
|
requireProjectContext,
|
|
18
18
|
resolveRoute,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UUVMIXT4.js";
|
|
21
21
|
import {
|
|
22
22
|
disableSubcommand
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-POOO7W47.js";
|
|
24
24
|
import {
|
|
25
25
|
stamp_default
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-E6LFKMI2.js";
|
|
29
|
+
import "./chunk-OHER4DGX.js";
|
|
29
30
|
import "./chunk-CYNB6LL4.js";
|
|
30
31
|
import {
|
|
31
32
|
outputAgentError
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-L7CEMAJG.js";
|
|
33
34
|
import "./chunk-GGP5R3FU.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-CQJRLNTX.js";
|
|
36
|
+
import "./chunk-57RHXXXG.js";
|
|
37
|
+
import "./chunk-RKDCNQ4S.js";
|
|
38
|
+
import "./chunk-AWCID36T.js";
|
|
39
|
+
import "./chunk-Q2DGFCO7.js";
|
|
37
40
|
import "./chunk-P4QNYOFB.js";
|
|
38
41
|
import "./chunk-52QYYTM5.js";
|
|
39
42
|
import {
|
|
@@ -17,23 +17,26 @@ import {
|
|
|
17
17
|
printDiffSummary,
|
|
18
18
|
requireProjectContext,
|
|
19
19
|
withGlobalFlags
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UUVMIXT4.js";
|
|
21
21
|
import {
|
|
22
22
|
discardSubcommand
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-POOO7W47.js";
|
|
24
24
|
import {
|
|
25
25
|
stamp_default
|
|
26
26
|
} from "./chunk-64IF634X.js";
|
|
27
27
|
import "./chunk-VXYGCOKL.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-E6LFKMI2.js";
|
|
29
|
+
import "./chunk-OHER4DGX.js";
|
|
29
30
|
import "./chunk-CYNB6LL4.js";
|
|
30
31
|
import {
|
|
31
32
|
outputAgentError
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-L7CEMAJG.js";
|
|
33
34
|
import "./chunk-GGP5R3FU.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-CQJRLNTX.js";
|
|
36
|
+
import "./chunk-57RHXXXG.js";
|
|
37
|
+
import "./chunk-RKDCNQ4S.js";
|
|
38
|
+
import "./chunk-AWCID36T.js";
|
|
39
|
+
import "./chunk-Q2DGFCO7.js";
|
|
37
40
|
import "./chunk-P4QNYOFB.js";
|
|
38
41
|
import "./chunk-52QYYTM5.js";
|
|
39
42
|
import {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
threadNotFoundMessage,
|
|
17
17
|
toApiErrorParts,
|
|
18
18
|
updateMessage
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FA3MO56Q.js";
|
|
20
20
|
import "./chunk-2473DUBR.js";
|
|
21
21
|
import {
|
|
22
22
|
outputError
|
|
@@ -26,19 +26,23 @@ import {
|
|
|
26
26
|
} from "./chunk-KXDWXXJH.js";
|
|
27
27
|
import {
|
|
28
28
|
editSubcommand
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-SLPSPYVR.js";
|
|
30
|
+
import "./chunk-E6LFKMI2.js";
|
|
31
|
+
import "./chunk-OHER4DGX.js";
|
|
31
32
|
import "./chunk-CYNB6LL4.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-L7CEMAJG.js";
|
|
33
34
|
import "./chunk-GGP5R3FU.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-CQJRLNTX.js";
|
|
35
36
|
import {
|
|
36
37
|
parseArguments
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-57RHXXXG.js";
|
|
39
|
+
import "./chunk-RKDCNQ4S.js";
|
|
38
40
|
import {
|
|
39
|
-
getFlagsSpecification,
|
|
40
41
|
isAPIError
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-AWCID36T.js";
|
|
43
|
+
import {
|
|
44
|
+
getFlagsSpecification
|
|
45
|
+
} from "./chunk-Q2DGFCO7.js";
|
|
42
46
|
import "./chunk-P4QNYOFB.js";
|
|
43
47
|
import "./chunk-52QYYTM5.js";
|
|
44
48
|
import {
|