vercel 56.3.2 → 56.4.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-DVEAUH7N.js → add-2HLAH42D.js} +2 -2
- package/dist/chunks/{add-2ITAPI7M.js → add-XY2LNFK3.js} +3 -3
- package/dist/chunks/{chunk-2CEGMXO6.js → chunk-2KNVJ7ET.js} +76 -2
- package/dist/chunks/{chunk-573XYQ3D.js → chunk-4QRRJEYO.js} +2 -2
- package/dist/chunks/{chunk-4Z5LC2CI.js → chunk-6RTK6BWX.js} +4 -96
- package/dist/chunks/{chunk-AVJRWFTM.js → chunk-BRTMH4PL.js} +1 -1
- package/dist/chunks/{chunk-FPMWXL3R.js → chunk-C4TEOOGB.js} +1 -1
- package/dist/chunks/{chunk-BZXHF66T.js → chunk-EJNFC5AV.js} +1 -1
- package/dist/chunks/{chunk-WQN52QMS.js → chunk-ENIJVO7C.js} +2 -2
- package/dist/chunks/{query-K2TJKOAL.js → chunk-F5OMERHI.js} +65 -411
- package/dist/chunks/{chunk-BFFE4FAO.js → chunk-IN3RG4AU.js} +1 -1
- package/dist/chunks/{chunk-O3UHQI3T.js → chunk-JGXABANG.js} +1 -1
- package/dist/chunks/{chunk-ZKKJEOQT.js → chunk-JIK3GTU3.js} +1 -1
- package/dist/chunks/{chunk-5FF4WXVM.js → chunk-K6YMSJMZ.js} +4 -4
- package/dist/chunks/{chunk-5POUHPEH.js → chunk-ORMDX3GR.js} +1 -1
- package/dist/chunks/{chunk-SRIA62TV.js → chunk-OSXJ6G4O.js} +3 -3
- package/dist/chunks/{chunk-TVLLFY7M.js → chunk-PEC4ROHM.js} +4 -4
- package/dist/chunks/{chunk-HZAINEXG.js → chunk-QX4337BT.js} +3 -2
- package/dist/chunks/{chunk-3OZQ7KHZ.js → chunk-S7HMSWGQ.js} +2 -2
- package/dist/chunks/{chunk-GB3QQGZU.js → chunk-SLCLT4P5.js} +1 -1
- package/dist/chunks/{chunk-QW4XUBC3.js → chunk-UA3D44SL.js} +1 -1
- package/dist/chunks/{chunk-JQBH4QTB.js → chunk-VZGX4CKB.js} +1 -1
- package/dist/chunks/{chunk-OK6EYKRX.js → chunk-WM3UMX65.js} +1 -1
- package/dist/chunks/chunk-Z7NPYIZ6.js +116 -0
- package/dist/chunks/{compile-vercel-config-P3KRRAC6.js → compile-vercel-config-4Q4YZ44O.js} +1 -1
- package/dist/chunks/{delete-OXEMVOQE.js → delete-AUDPLCMU.js} +2 -2
- package/dist/chunks/{disable-DZA53CJA.js → disable-WFPXR7GZ.js} +2 -2
- package/dist/chunks/{discard-3E7Z7CKD.js → discard-RVFKIZZG.js} +2 -2
- package/dist/chunks/{edit-UM6TWX2Z.js → edit-KO5KX4WU.js} +3 -3
- package/dist/chunks/{enable-3SH6X23Z.js → enable-I5HE32DI.js} +2 -2
- package/dist/chunks/{export-TLQERLQP.js → export-4Y5L2TOT.js} +2 -2
- package/dist/chunks/{image-YKGEEC2A.js → image-QC5MVWKN.js} +3 -3
- package/dist/chunks/{inspect-34OE66PO.js → inspect-BULBAPNR.js} +2 -2
- package/dist/chunks/{inspect-652QJ33O.js → inspect-JUGFKEGR.js} +2 -2
- package/dist/chunks/{inspect-QW6RSV7Z.js → inspect-PJDCPARM.js} +2 -2
- package/dist/chunks/{inspect-S6X6PCGS.js → inspect-Q5BKZNVI.js} +2 -2
- package/dist/chunks/{list-OVWTXBSN.js → list-FJT44SB6.js} +1 -1
- package/dist/chunks/{list-IWXFZBH7.js → list-N7OA4FBI.js} +2 -2
- package/dist/chunks/{login-S77F2DLW.js → login-BPE774JW.js} +2 -2
- package/dist/chunks/{ls-J4HHGSFU.js → ls-26VFGQ6P.js} +3 -3
- package/dist/chunks/{ls-SAY4VQIT.js → ls-E47M6P5O.js} +2 -2
- package/dist/chunks/{ls-FQIWFI4K.js → ls-H52WO65Y.js} +2 -2
- package/dist/chunks/{ls-PQPRURTJ.js → ls-YV554CRJ.js} +2 -2
- package/dist/chunks/{publish-LWCEDLGX.js → publish-DUTEBRX3.js} +2 -2
- package/dist/chunks/query-QDOKUCHX.js +391 -0
- package/dist/chunks/{reorder-J6OONT76.js → reorder-L2M3YGJ4.js} +2 -2
- package/dist/chunks/{restore-3ME4ZHFW.js → restore-BVDNAJVC.js} +2 -2
- package/dist/chunks/{rm-EHEJRXQJ.js → rm-4OQ7G6UX.js} +2 -2
- package/dist/chunks/{rm-XOUHC6CU.js → rm-7KSHXSTB.js} +3 -3
- package/dist/chunks/{rm-63AGQFIQ.js → rm-VHWBHG3A.js} +2 -2
- package/dist/chunks/{rule-inspect-3PRCEXIB.js → rule-inspect-AT6IEOUF.js} +3 -3
- package/dist/chunks/{rules-UBSIW5ZQ.js → rules-SQFCUKWS.js} +6 -6
- package/dist/chunks/{schema-I4SXEWLS.js → schema-PWSCMD24.js} +5 -5
- package/dist/chunks/{tags-HF2YOQ4V.js → tags-BT7ZGJP2.js} +2 -2
- package/dist/chunks/{update-RRMAOQDP.js → update-PTDGBKEH.js} +3 -3
- package/dist/commands/build/index.js +9 -9
- package/dist/commands/deploy/index.js +9 -9
- package/dist/commands/dev/index.js +7 -7
- package/dist/commands/env/index.js +4 -4
- package/dist/commands/link/index.js +6 -6
- package/dist/commands/list/index.js +2 -2
- package/dist/commands-bulk.js +411 -48
- package/dist/index.js +7 -7
- package/dist/version.mjs +1 -1
- package/package.json +12 -12
- package/dist/chunks/chunk-A3NYPUKZ.js +0 -17
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
handleVcrApiError,
|
|
10
10
|
resolveVcrScope,
|
|
11
11
|
validateVcrJsonOutput
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SLCLT4P5.js";
|
|
13
13
|
import {
|
|
14
14
|
outputError
|
|
15
15
|
} from "./chunk-BUZRVER7.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-3VS4DTAU.js";
|
|
20
20
|
import "./chunk-GIL3VAUR.js";
|
|
21
21
|
import "./chunk-FYQPTH5C.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-QX4337BT.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT_REASON,
|
|
25
25
|
buildCommandWithGlobalFlags,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
handleRulesApiError,
|
|
10
10
|
parseRulesFlagsAndScope,
|
|
11
11
|
rulesCollectionPath
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-BRTMH4PL.js";
|
|
13
|
+
import "./chunk-WM3UMX65.js";
|
|
14
14
|
import "./chunk-BUZRVER7.js";
|
|
15
15
|
import {
|
|
16
16
|
validateJsonOutput
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
rulesAddSubcommand
|
|
20
20
|
} from "./chunk-STJJ3DFO.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-QX4337BT.js";
|
|
22
22
|
import {
|
|
23
23
|
AGENT_REASON,
|
|
24
24
|
buildCommandWithGlobalFlags,
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
buildCommand,
|
|
30
30
|
pullCommand
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-EJNFC5AV.js";
|
|
32
32
|
import {
|
|
33
33
|
envCommand
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-QX4337BT.js";
|
|
35
35
|
import {
|
|
36
36
|
confirmOption,
|
|
37
37
|
deploymentOption,
|
|
@@ -4380,6 +4380,21 @@ function formatFlagConditionComparator(comparator, options) {
|
|
|
4380
4380
|
return label;
|
|
4381
4381
|
}
|
|
4382
4382
|
|
|
4383
|
+
// src/commands/flags/evaluations-config.ts
|
|
4384
|
+
var FLAG_EVALUATIONS_GRANULARITIES = [
|
|
4385
|
+
"1m",
|
|
4386
|
+
"5m",
|
|
4387
|
+
"15m",
|
|
4388
|
+
"1h",
|
|
4389
|
+
"4h",
|
|
4390
|
+
"1d"
|
|
4391
|
+
];
|
|
4392
|
+
function isFlagEvaluationsGranularity(value) {
|
|
4393
|
+
return FLAG_EVALUATIONS_GRANULARITIES.some(
|
|
4394
|
+
(granularity) => granularity === value
|
|
4395
|
+
);
|
|
4396
|
+
}
|
|
4397
|
+
|
|
4383
4398
|
// src/commands/flags/command.ts
|
|
4384
4399
|
var segmentRuleOperatorDescription = `Valid operators: ${formatFlagConditionComparatorList()}`;
|
|
4385
4400
|
var listSubcommand11 = {
|
|
@@ -4616,6 +4631,61 @@ var versionsSubcommand = {
|
|
|
4616
4631
|
}
|
|
4617
4632
|
]
|
|
4618
4633
|
};
|
|
4634
|
+
var evaluationsSubcommand = {
|
|
4635
|
+
name: "evaluations",
|
|
4636
|
+
aliases: ["evals"],
|
|
4637
|
+
description: "Display evaluation metrics for a feature flag",
|
|
4638
|
+
arguments: [
|
|
4639
|
+
{
|
|
4640
|
+
name: "flag",
|
|
4641
|
+
required: true
|
|
4642
|
+
}
|
|
4643
|
+
],
|
|
4644
|
+
options: [
|
|
4645
|
+
projectOption,
|
|
4646
|
+
{
|
|
4647
|
+
name: "since",
|
|
4648
|
+
shorthand: "s",
|
|
4649
|
+
type: String,
|
|
4650
|
+
deprecated: false,
|
|
4651
|
+
description: "Start time: relative (1h, 30m, 2d) or ISO date (default: 1h)",
|
|
4652
|
+
argument: "TIME"
|
|
4653
|
+
},
|
|
4654
|
+
{
|
|
4655
|
+
name: "until",
|
|
4656
|
+
shorthand: "u",
|
|
4657
|
+
type: String,
|
|
4658
|
+
deprecated: false,
|
|
4659
|
+
description: "End time (default: now)",
|
|
4660
|
+
argument: "TIME"
|
|
4661
|
+
},
|
|
4662
|
+
{
|
|
4663
|
+
name: "granularity",
|
|
4664
|
+
shorthand: "g",
|
|
4665
|
+
type: String,
|
|
4666
|
+
deprecated: false,
|
|
4667
|
+
description: `Time bucket size: ${FLAG_EVALUATIONS_GRANULARITIES.join(", ")} (default: auto)`,
|
|
4668
|
+
argument: "SIZE"
|
|
4669
|
+
},
|
|
4670
|
+
{
|
|
4671
|
+
name: "json",
|
|
4672
|
+
shorthand: null,
|
|
4673
|
+
type: Boolean,
|
|
4674
|
+
deprecated: false,
|
|
4675
|
+
description: "Output in JSON format"
|
|
4676
|
+
}
|
|
4677
|
+
],
|
|
4678
|
+
examples: [
|
|
4679
|
+
{
|
|
4680
|
+
name: "Show evaluations by variant for the last hour",
|
|
4681
|
+
value: `${packageName} flags evaluations my-feature`
|
|
4682
|
+
},
|
|
4683
|
+
{
|
|
4684
|
+
name: "Show evaluation metrics as JSON",
|
|
4685
|
+
value: `${packageName} flags evaluations my-feature --since 24h --json`
|
|
4686
|
+
}
|
|
4687
|
+
]
|
|
4688
|
+
};
|
|
4619
4689
|
var createSubcommand4 = {
|
|
4620
4690
|
name: "create",
|
|
4621
4691
|
aliases: ["add"],
|
|
@@ -5846,6 +5916,7 @@ var flagsCommand = {
|
|
|
5846
5916
|
listSubcommand11,
|
|
5847
5917
|
inspectSubcommand3,
|
|
5848
5918
|
versionsSubcommand,
|
|
5919
|
+
evaluationsSubcommand,
|
|
5849
5920
|
createSubcommand4,
|
|
5850
5921
|
openSubcommand2,
|
|
5851
5922
|
updateSubcommand3,
|
|
@@ -10484,11 +10555,14 @@ export {
|
|
|
10484
10555
|
FLAG_CONDITION_RHS_OPTIONAL_COMPARATORS,
|
|
10485
10556
|
formatFlagConditionComparatorList,
|
|
10486
10557
|
formatFlagConditionComparator,
|
|
10558
|
+
FLAG_EVALUATIONS_GRANULARITIES,
|
|
10559
|
+
isFlagEvaluationsGranularity,
|
|
10487
10560
|
listSubcommand11,
|
|
10488
10561
|
inspectSubcommand3,
|
|
10489
10562
|
versionsListSubcommand,
|
|
10490
10563
|
versionsDiffSubcommand,
|
|
10491
10564
|
versionsSubcommand,
|
|
10565
|
+
evaluationsSubcommand,
|
|
10492
10566
|
createSubcommand4,
|
|
10493
10567
|
openSubcommand2,
|
|
10494
10568
|
updateSubcommand3,
|
|
@@ -6,14 +6,14 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
setupAndLink
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ENIJVO7C.js";
|
|
10
10
|
import {
|
|
11
11
|
detectExplicitScope,
|
|
12
12
|
getLinkedProject,
|
|
13
13
|
param,
|
|
14
14
|
printProjectNotFoundError,
|
|
15
15
|
resolveProjectCwd
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QX4337BT.js";
|
|
17
17
|
import {
|
|
18
18
|
buildCommandWithYes,
|
|
19
19
|
outputActionRequired
|
|
@@ -4,6 +4,10 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
+
import {
|
|
8
|
+
formatErrorJson,
|
|
9
|
+
handleApiError
|
|
10
|
+
} from "./chunk-Z7NPYIZ6.js";
|
|
7
11
|
import {
|
|
8
12
|
isAPIError
|
|
9
13
|
} from "./chunk-KSSNLCL4.js";
|
|
@@ -11,97 +15,6 @@ import {
|
|
|
11
15
|
output_manager_default
|
|
12
16
|
} from "./chunk-OX7KI3LF.js";
|
|
13
17
|
|
|
14
|
-
// src/commands/metrics/output.ts
|
|
15
|
-
function getRollupColumnName(metric, aggregation) {
|
|
16
|
-
return `${metric}_${aggregation}`.replace(/[./]/g, "_");
|
|
17
|
-
}
|
|
18
|
-
function getResolvedOrderMetadata(query, response) {
|
|
19
|
-
const orderBy = query.orderBy ?? (response.orderBy ? "count" : void 0);
|
|
20
|
-
const orderDirection = response.orderDirection ?? query.orderDirection;
|
|
21
|
-
return {
|
|
22
|
-
...orderBy ? { orderBy } : {},
|
|
23
|
-
...orderDirection ? { orderDirection } : {}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function formatQueryJson(query, response) {
|
|
27
|
-
const orderMetadata = getResolvedOrderMetadata(query, response);
|
|
28
|
-
const queryWithResponseMetadata = {
|
|
29
|
-
...query,
|
|
30
|
-
...orderMetadata
|
|
31
|
-
};
|
|
32
|
-
return JSON.stringify(
|
|
33
|
-
{
|
|
34
|
-
query: queryWithResponseMetadata,
|
|
35
|
-
summary: response.summary ?? [],
|
|
36
|
-
data: response.data ?? [],
|
|
37
|
-
statistics: response.statistics ?? {},
|
|
38
|
-
...orderMetadata
|
|
39
|
-
},
|
|
40
|
-
null,
|
|
41
|
-
2
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
function formatErrorJson(code, message, allowedValues) {
|
|
45
|
-
const error = {
|
|
46
|
-
code,
|
|
47
|
-
message
|
|
48
|
-
};
|
|
49
|
-
if (allowedValues && allowedValues.length > 0) {
|
|
50
|
-
error.allowedValues = allowedValues;
|
|
51
|
-
}
|
|
52
|
-
return JSON.stringify({ error }, null, 2);
|
|
53
|
-
}
|
|
54
|
-
function handleApiError(err, jsonOutput, client, overrides = {}) {
|
|
55
|
-
let code;
|
|
56
|
-
let message;
|
|
57
|
-
const override = overrides[err.status];
|
|
58
|
-
if (override) {
|
|
59
|
-
code = override.code || err.code || "BAD_REQUEST";
|
|
60
|
-
message = override.message;
|
|
61
|
-
} else {
|
|
62
|
-
switch (err.status) {
|
|
63
|
-
case 402:
|
|
64
|
-
code = err.code || "PAYMENT_REQUIRED";
|
|
65
|
-
message = err.serverMessage || "This feature requires an Observability Plus subscription. Upgrade at https://vercel.com/dashboard/settings/billing";
|
|
66
|
-
break;
|
|
67
|
-
case 429:
|
|
68
|
-
code = err.code || "RATE_LIMITED";
|
|
69
|
-
message = err.serverMessage || "You have reached the metrics query rate limit. Please wait and try again. If you need a higher limit, request one from your Vercel account team.";
|
|
70
|
-
break;
|
|
71
|
-
case 403:
|
|
72
|
-
code = "FORBIDDEN";
|
|
73
|
-
message = "You do not have permission to query metrics for this project/team.";
|
|
74
|
-
break;
|
|
75
|
-
case 500:
|
|
76
|
-
code = "INTERNAL_ERROR";
|
|
77
|
-
message = "An internal error occurred. Please try again later.";
|
|
78
|
-
break;
|
|
79
|
-
case 504:
|
|
80
|
-
code = "TIMEOUT";
|
|
81
|
-
message = "The query timed out. Try a shorter time range or fewer groups.";
|
|
82
|
-
break;
|
|
83
|
-
case 400:
|
|
84
|
-
code = err.code || "BAD_REQUEST";
|
|
85
|
-
message = err.serverMessage || `API error (${err.status})`;
|
|
86
|
-
break;
|
|
87
|
-
default:
|
|
88
|
-
code = err.code || "BAD_REQUEST";
|
|
89
|
-
message = err.serverMessage || `API error (${err.status})`;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (jsonOutput) {
|
|
93
|
-
client.stdout.write(formatErrorJson(code, message, err.allowedValues));
|
|
94
|
-
} else {
|
|
95
|
-
output_manager_default.error(message);
|
|
96
|
-
if (err.allowedValues && err.allowedValues.length > 0) {
|
|
97
|
-
output_manager_default.print(`
|
|
98
|
-
Available values: ${err.allowedValues.join(", ")}
|
|
99
|
-
`);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return 1;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
18
|
// src/commands/metrics/schema-api.ts
|
|
106
19
|
function toMetricDetail(metric) {
|
|
107
20
|
return {
|
|
@@ -182,11 +95,6 @@ async function fetchMetricDetailOrExit(client, accountId, metricId, jsonOutput)
|
|
|
182
95
|
}
|
|
183
96
|
|
|
184
97
|
export {
|
|
185
|
-
getRollupColumnName,
|
|
186
|
-
getResolvedOrderMetadata,
|
|
187
|
-
formatQueryJson,
|
|
188
|
-
formatErrorJson,
|
|
189
|
-
handleApiError,
|
|
190
98
|
getDefaultAggregation,
|
|
191
99
|
fetchMetricListOrExit,
|
|
192
100
|
fetchMetricDetailOrExit
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getLocalPathConfig,
|
|
9
9
|
isPromptBackError,
|
|
10
10
|
isPromptCanceledError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UA3D44SL.js";
|
|
12
12
|
import {
|
|
13
13
|
table
|
|
14
14
|
} from "./chunk-NZRWTCRM.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
selectAndParseRemoteUrl,
|
|
47
47
|
selectOrg,
|
|
48
48
|
writeServicesConfig
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-QX4337BT.js";
|
|
50
50
|
import {
|
|
51
51
|
printError
|
|
52
52
|
} from "./chunk-SZXT3PDQ.js";
|