vercel 58.4.0 → 58.4.4
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-JTIGJQ75.js → add-245XOFJO.js} +3 -3
- package/dist/chunks/{add-IOYS5JE4.js → add-P7WBQMBW.js} +4 -4
- package/dist/chunks/{add-QKKUAXFL.js → add-XH24V5VU.js} +3 -3
- package/dist/chunks/{build-ZHZDIIS5.js → build-M7NJYJPE.js} +3 -3
- package/dist/chunks/{chunk-27FZN5LR.js → chunk-2FMPLU44.js} +3 -3
- package/dist/chunks/{chunk-JHIWAM64.js → chunk-2LBVX2H3.js} +1 -1
- package/dist/chunks/{chunk-ZQR5RIAX.js → chunk-2MAPZXVV.js} +4 -4
- package/dist/chunks/{chunk-IBSUQT6H.js → chunk-2WILSD7J.js} +1 -1
- package/dist/chunks/{chunk-WUMURQKS.js → chunk-3QAUXPIR.js} +42 -2
- package/dist/chunks/{chunk-2ILCTO6A.js → chunk-4BUPRO5B.js} +2 -2
- package/dist/chunks/{chunk-PVWXPWLQ.js → chunk-4CCY5OPH.js} +997 -1184
- package/dist/chunks/{chunk-QTXQOWOJ.js → chunk-62MH5KPX.js} +2 -2
- package/dist/chunks/{chunk-CAWBO7SQ.js → chunk-AQDWMAPM.js} +8 -8
- package/dist/chunks/chunk-CPFNFVCL.js +85 -0
- package/dist/chunks/{chunk-AZS5CLCN.js → chunk-HSYF5SI3.js} +1 -1
- package/dist/chunks/{chunk-GJ5DKYDQ.js → chunk-IEDUCUDV.js} +3 -3
- package/dist/chunks/{chunk-G47QOVJ7.js → chunk-M5NOLAJ4.js} +1 -1
- package/dist/chunks/{chunk-KWOWGI7Z.js → chunk-NJ6QXKQD.js} +1 -1
- package/dist/chunks/{chunk-DI54DSTV.js → chunk-SJYAUEZR.js} +209 -47
- package/dist/chunks/{chunk-Z5ZQJ5VJ.js → chunk-TJJ562C5.js} +3 -0
- package/dist/chunks/{chunk-U5E5J56I.js → chunk-UE3JUVUZ.js} +3 -3
- package/dist/chunks/chunk-V5P25P7F.js +22 -0
- package/dist/chunks/{chunk-SWHPI3G7.js → chunk-XE5VSQ25.js} +1 -1
- package/dist/chunks/{chunk-U7Y5DZXS.js → chunk-Y5GTPWXB.js} +2 -2
- package/dist/chunks/{chunk-56QCZ4RL.js → chunk-YCPUAG77.js} +1 -1
- package/dist/chunks/{chunk-DXS2X7KK.js → chunk-YDUINEII.js} +2 -2
- package/dist/chunks/{chunk-OWY3MF3E.js → chunk-ZGBBPJ6B.js} +7 -3
- package/dist/chunks/{clear-R3DI3AA6.js → clear-HWIKQ4NC.js} +3 -3
- package/dist/chunks/{compile-vercel-config-NEC63GCN.js → compile-vercel-config-U5NRIMZ2.js} +2 -2
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{delete-DIZK7FRU.js → delete-FZCOUFGN.js} +3 -3
- package/dist/chunks/{delete-BYB66ET3.js → delete-NVMGVD5Z.js} +3 -3
- package/dist/chunks/{disable-HW6CHEVD.js → disable-ERM2BWEQ.js} +3 -3
- package/dist/chunks/{discard-3UG4K6G2.js → discard-KM5OLEN4.js} +3 -3
- package/dist/chunks/{edit-LD5G6GL3.js → edit-HT3UTATZ.js} +4 -4
- package/dist/chunks/{edit-EY7LRITZ.js → edit-TOSB2EMI.js} +3 -3
- package/dist/chunks/{enable-MDNLCSAW.js → enable-BQL6AOQV.js} +3 -3
- package/dist/chunks/{export-25X6M77L.js → export-UOWQHOG3.js} +3 -3
- package/dist/chunks/{image-YQWZLM6Z.js → image-F5SC6Q7Y.js} +4 -4
- package/dist/chunks/{inspect-QVI6UVBJ.js → inspect-35FU5R62.js} +3 -3
- package/dist/chunks/{inspect-R6ADYTPB.js → inspect-5J5GSTOB.js} +3 -3
- package/dist/chunks/{inspect-KYAB4F3P.js → inspect-GKJ6T5H4.js} +3 -3
- package/dist/chunks/{inspect-H7GEYNIF.js → inspect-LGKOLH2O.js} +4 -4
- package/dist/chunks/{inspect-73FISCNZ.js → inspect-PZJM2CWT.js} +3 -3
- package/dist/chunks/{list-FTNOS4FT.js → list-2IIE7CAP.js} +4 -4
- package/dist/chunks/{list-SRKON4E4.js → list-ITFJYYQ2.js} +3 -3
- package/dist/chunks/{list-SDNYJJ4M.js → list-KZETH3ZE.js} +2 -2
- package/dist/chunks/{login-7NR7N4ZF.js → login-BQPJCJEZ.js} +3 -3
- package/dist/chunks/{ls-PZHHHKZ7.js → ls-7GHDK4MD.js} +4 -4
- package/dist/chunks/{ls-TWHG22W7.js → ls-DL2LA35C.js} +3 -3
- package/dist/chunks/{ls-T276Z2QR.js → ls-UXUEP54B.js} +3 -3
- package/dist/chunks/{ls-NIEZW5O3.js → ls-YSFWSM6J.js} +3 -3
- package/dist/chunks/{ls-BDLEGFY3.js → ls-ZZFLH7PK.js} +3 -3
- package/dist/chunks/{open-TNEPXGZK.js → open-ADNJQN5E.js} +3 -3
- package/dist/chunks/{permissions-KI2JGJSN.js → permissions-72SZCBIY.js} +5 -5
- package/dist/chunks/{publish-NBGFOHLV.js → publish-OOAGSEBM.js} +3 -3
- package/dist/chunks/{push-SPPWXOAJ.js → push-B6TZDXNF.js} +3 -3
- package/dist/chunks/{query-LS4PEYHG.js → query-LZWS5TDH.js} +2 -2
- package/dist/chunks/{reorder-UTQ632H5.js → reorder-MRHFKPMK.js} +3 -3
- package/dist/chunks/{reply-QFGX5YBV.js → reply-BKTJXO3B.js} +3 -3
- package/dist/chunks/{resolve-ZDO5BCI7.js → resolve-BKVGSGPN.js} +3 -3
- package/dist/chunks/{restore-T77AKNZ2.js → restore-USR7SKWV.js} +3 -3
- package/dist/chunks/{rm-D24FHFMF.js → rm-2UO6BT3A.js} +4 -4
- package/dist/chunks/{rm-JTOFOKOZ.js → rm-37MKKV3I.js} +3 -3
- package/dist/chunks/{rm-3RTVWGWR.js → rm-KUWPNZIS.js} +3 -3
- package/dist/chunks/{rm-IQPLVKJR.js → rm-VY3OHKFH.js} +3 -3
- package/dist/chunks/{rule-inspect-VVHTVTRD.js → rule-inspect-JVDOOTWK.js} +4 -4
- package/dist/chunks/{rules-EEWMLKRI.js → rules-NTBFZBIF.js} +7 -7
- package/dist/chunks/{schema-XLJLZ4OE.js → schema-6EZ72OVH.js} +2 -2
- package/dist/chunks/{tags-5DZYPJDP.js → tags-HNPC63QA.js} +3 -3
- package/dist/chunks/{update-YFXZDNIV.js → update-LUYWNZP3.js} +4 -4
- package/dist/commands/build/index.js +9 -9
- package/dist/commands/deploy/index.js +15 -12
- package/dist/commands/dev/index.js +21 -10
- package/dist/commands/env/index.js +281 -17
- package/dist/commands/link/index.js +7 -7
- package/dist/commands/list/index.js +3 -3
- package/dist/commands-bulk.js +726 -266
- package/dist/index.js +19 -17
- package/dist/version.mjs +1 -1
- package/package.json +35 -42
- package/dist/chunks/chunk-V4RMJKQP.js +0 -36
package/dist/commands-bulk.js
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
runInteractiveEditLoop,
|
|
38
38
|
stripQuotes,
|
|
39
39
|
validateActionFlags
|
|
40
|
-
} from "./chunks/chunk-
|
|
40
|
+
} from "./chunks/chunk-HSYF5SI3.js";
|
|
41
41
|
import {
|
|
42
42
|
getRouteVersions
|
|
43
43
|
} from "./chunks/chunk-AHU7WNL2.js";
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
requireProjectContext,
|
|
58
58
|
validateRequiredArguments,
|
|
59
59
|
withGlobalFlags as withGlobalFlags2
|
|
60
|
-
} from "./chunks/chunk-
|
|
60
|
+
} from "./chunks/chunk-4BUPRO5B.js";
|
|
61
61
|
import {
|
|
62
62
|
canPrompt
|
|
63
63
|
} from "./chunks/chunk-2473DUBR.js";
|
|
@@ -87,12 +87,12 @@ import {
|
|
|
87
87
|
resolveOpenApiTagForTeamsCli,
|
|
88
88
|
setAutoUpdate,
|
|
89
89
|
tryOpenApiFallback
|
|
90
|
-
} from "./chunks/chunk-
|
|
90
|
+
} from "./chunks/chunk-AQDWMAPM.js";
|
|
91
91
|
import "./chunks/chunk-FGDKMNEN.js";
|
|
92
92
|
import {
|
|
93
93
|
getUpdateCommand,
|
|
94
94
|
isGlobal
|
|
95
|
-
} from "./chunks/chunk-
|
|
95
|
+
} from "./chunks/chunk-NJ6QXKQD.js";
|
|
96
96
|
import {
|
|
97
97
|
Now,
|
|
98
98
|
addDomain,
|
|
@@ -113,13 +113,18 @@ import {
|
|
|
113
113
|
require_cjs,
|
|
114
114
|
require_jsonlines,
|
|
115
115
|
setupDomain
|
|
116
|
-
} from "./chunks/chunk-
|
|
116
|
+
} from "./chunks/chunk-IEDUCUDV.js";
|
|
117
117
|
import {
|
|
118
118
|
require_format
|
|
119
119
|
} from "./chunks/chunk-PRWJUY5U.js";
|
|
120
120
|
import {
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
getGlobalPathConfig,
|
|
122
|
+
persistAuthConfig,
|
|
123
|
+
readLocalConfig,
|
|
124
|
+
sleep,
|
|
125
|
+
writeToConfigFile
|
|
126
|
+
} from "./chunks/chunk-SJYAUEZR.js";
|
|
127
|
+
import "./chunks/chunk-V5P25P7F.js";
|
|
123
128
|
import {
|
|
124
129
|
CHECKBOX_INSTRUCTIONS,
|
|
125
130
|
ellipsis,
|
|
@@ -146,7 +151,7 @@ import {
|
|
|
146
151
|
import {
|
|
147
152
|
formatEnvironment,
|
|
148
153
|
validateLsArgs
|
|
149
|
-
} from "./chunks/chunk-
|
|
154
|
+
} from "./chunks/chunk-XE5VSQ25.js";
|
|
150
155
|
import {
|
|
151
156
|
validateJsonOutput
|
|
152
157
|
} from "./chunks/chunk-XPKWKPWA.js";
|
|
@@ -455,7 +460,7 @@ import {
|
|
|
455
460
|
webAnalyticsSubcommand,
|
|
456
461
|
webhooksCommand,
|
|
457
462
|
whoamiCommand
|
|
458
|
-
} from "./chunks/chunk-
|
|
463
|
+
} from "./chunks/chunk-3QAUXPIR.js";
|
|
459
464
|
import {
|
|
460
465
|
addSubcommand as addSubcommand12,
|
|
461
466
|
buildSubcommand,
|
|
@@ -537,9 +542,9 @@ import "./chunks/chunk-7QVJTI5H.js";
|
|
|
537
542
|
import "./chunks/chunk-O5GNPPTU.js";
|
|
538
543
|
import {
|
|
539
544
|
main
|
|
540
|
-
} from "./chunks/chunk-
|
|
545
|
+
} from "./chunks/chunk-2MAPZXVV.js";
|
|
541
546
|
import "./chunks/chunk-IB5L4LKZ.js";
|
|
542
|
-
import "./chunks/chunk-
|
|
547
|
+
import "./chunks/chunk-M5NOLAJ4.js";
|
|
543
548
|
import {
|
|
544
549
|
require_execa
|
|
545
550
|
} from "./chunks/chunk-R6IGDGX3.js";
|
|
@@ -554,10 +559,10 @@ import {
|
|
|
554
559
|
} from "./chunks/chunk-VXYGCOKL.js";
|
|
555
560
|
import {
|
|
556
561
|
ensureLink
|
|
557
|
-
} from "./chunks/chunk-
|
|
558
|
-
import "./chunks/chunk-
|
|
559
|
-
import "./chunks/chunk-
|
|
560
|
-
import "./chunks/chunk-
|
|
562
|
+
} from "./chunks/chunk-2FMPLU44.js";
|
|
563
|
+
import "./chunks/chunk-UE3JUVUZ.js";
|
|
564
|
+
import "./chunks/chunk-CPFNFVCL.js";
|
|
565
|
+
import "./chunks/chunk-YCPUAG77.js";
|
|
561
566
|
import {
|
|
562
567
|
help
|
|
563
568
|
} from "./chunks/chunk-ZX2FSPWV.js";
|
|
@@ -579,7 +584,6 @@ import {
|
|
|
579
584
|
envTargetChoices,
|
|
580
585
|
formatProject,
|
|
581
586
|
getDeployment,
|
|
582
|
-
getGlobalPathConfig,
|
|
583
587
|
getLinkFromDir,
|
|
584
588
|
getLinkedProject,
|
|
585
589
|
getProjectByNameOrId,
|
|
@@ -598,14 +602,12 @@ import {
|
|
|
598
602
|
param,
|
|
599
603
|
parseGitConfig,
|
|
600
604
|
parseRepoUrl,
|
|
601
|
-
persistAuthConfig,
|
|
602
605
|
pluckRemoteUrls,
|
|
603
606
|
printAlignedLabel,
|
|
604
607
|
printRemoteUrls,
|
|
605
608
|
processRevocationResponse,
|
|
606
609
|
pull,
|
|
607
610
|
readJSONFile,
|
|
608
|
-
readLocalConfig,
|
|
609
611
|
require_chownr,
|
|
610
612
|
require_dist as require_dist2,
|
|
611
613
|
require_dist3,
|
|
@@ -622,11 +624,9 @@ import {
|
|
|
622
624
|
revocationRequest,
|
|
623
625
|
selectAndParseRemoteUrl,
|
|
624
626
|
selectOrg,
|
|
625
|
-
setUseNativeBinary,
|
|
626
627
|
toHost,
|
|
627
|
-
ua_default
|
|
628
|
-
|
|
629
|
-
} from "./chunks/chunk-PVWXPWLQ.js";
|
|
628
|
+
ua_default
|
|
629
|
+
} from "./chunks/chunk-4CCY5OPH.js";
|
|
630
630
|
import {
|
|
631
631
|
TelemetryClient
|
|
632
632
|
} from "./chunks/chunk-ECCWJHC6.js";
|
|
@@ -645,7 +645,7 @@ import {
|
|
|
645
645
|
outputAgentSuccess,
|
|
646
646
|
shouldEmitNonInteractiveCommandError,
|
|
647
647
|
withGlobalFlags
|
|
648
|
-
} from "./chunks/chunk-
|
|
648
|
+
} from "./chunks/chunk-TJJ562C5.js";
|
|
649
649
|
import {
|
|
650
650
|
printError,
|
|
651
651
|
require_strip_ansi
|
|
@@ -2469,7 +2469,7 @@ async function activity(client) {
|
|
|
2469
2469
|
return 0;
|
|
2470
2470
|
}
|
|
2471
2471
|
telemetry2.trackCliSubcommandLs(subcommandOriginal);
|
|
2472
|
-
const listFn = (await import("./chunks/list-
|
|
2472
|
+
const listFn = (await import("./chunks/list-KZETH3ZE.js")).default;
|
|
2473
2473
|
return listFn(client, telemetry2);
|
|
2474
2474
|
}
|
|
2475
2475
|
}
|
|
@@ -8269,17 +8269,17 @@ async function alerts(client) {
|
|
|
8269
8269
|
switch (subcommand) {
|
|
8270
8270
|
case "inspect": {
|
|
8271
8271
|
telemetry2.trackCliSubcommandInspect(subcommandOriginal);
|
|
8272
|
-
const inspectFn = (await import("./chunks/inspect-
|
|
8272
|
+
const inspectFn = (await import("./chunks/inspect-PZJM2CWT.js")).default;
|
|
8273
8273
|
return inspectFn(client, rawSubcommandArgs);
|
|
8274
8274
|
}
|
|
8275
8275
|
case "rules": {
|
|
8276
8276
|
telemetry2.trackCliSubcommandRules(args[0] ?? "ls");
|
|
8277
|
-
const rulesFn = (await import("./chunks/rules-
|
|
8277
|
+
const rulesFn = (await import("./chunks/rules-NTBFZBIF.js")).default;
|
|
8278
8278
|
return rulesFn(client, rawSubcommandArgs);
|
|
8279
8279
|
}
|
|
8280
8280
|
default: {
|
|
8281
8281
|
telemetry2.trackCliSubcommandLs(subcommandOriginal);
|
|
8282
|
-
const listFn = (await import("./chunks/list-
|
|
8282
|
+
const listFn = (await import("./chunks/list-ITFJYYQ2.js")).default;
|
|
8283
8283
|
return listFn(client, telemetry2);
|
|
8284
8284
|
}
|
|
8285
8285
|
}
|
|
@@ -13643,43 +13643,43 @@ async function comments(client) {
|
|
|
13643
13643
|
if (handleHelp(inspectSubcommand4))
|
|
13644
13644
|
return 0;
|
|
13645
13645
|
telemetry2.trackCliSubcommandInspect(subcommandOriginal);
|
|
13646
|
-
return (await import("./chunks/inspect-
|
|
13646
|
+
return (await import("./chunks/inspect-LGKOLH2O.js")).default(client, telemetry2);
|
|
13647
13647
|
}
|
|
13648
13648
|
case "open": {
|
|
13649
13649
|
if (handleHelp(openSubcommand))
|
|
13650
13650
|
return 0;
|
|
13651
13651
|
telemetry2.trackCliSubcommandOpen(subcommandOriginal);
|
|
13652
|
-
return (await import("./chunks/open-
|
|
13652
|
+
return (await import("./chunks/open-ADNJQN5E.js")).default(client, telemetry2);
|
|
13653
13653
|
}
|
|
13654
13654
|
case "reply": {
|
|
13655
13655
|
if (handleHelp(replySubcommand))
|
|
13656
13656
|
return 0;
|
|
13657
13657
|
telemetry2.trackCliSubcommandReply(subcommandOriginal);
|
|
13658
|
-
return (await import("./chunks/reply-
|
|
13658
|
+
return (await import("./chunks/reply-BKTJXO3B.js")).default(client, telemetry2);
|
|
13659
13659
|
}
|
|
13660
13660
|
case "resolve": {
|
|
13661
13661
|
if (handleHelp(resolveSubcommand))
|
|
13662
13662
|
return 0;
|
|
13663
13663
|
telemetry2.trackCliSubcommandResolve(subcommandOriginal);
|
|
13664
|
-
return (await import("./chunks/resolve-
|
|
13664
|
+
return (await import("./chunks/resolve-BKVGSGPN.js")).default(client, telemetry2, true);
|
|
13665
13665
|
}
|
|
13666
13666
|
case "reopen": {
|
|
13667
13667
|
if (handleHelp(reopenSubcommand))
|
|
13668
13668
|
return 0;
|
|
13669
13669
|
telemetry2.trackCliSubcommandReopen(subcommandOriginal);
|
|
13670
|
-
return (await import("./chunks/resolve-
|
|
13670
|
+
return (await import("./chunks/resolve-BKVGSGPN.js")).default(client, telemetry2, false);
|
|
13671
13671
|
}
|
|
13672
13672
|
case "edit": {
|
|
13673
13673
|
if (handleHelp(editSubcommand))
|
|
13674
13674
|
return 0;
|
|
13675
13675
|
telemetry2.trackCliSubcommandEdit(subcommandOriginal);
|
|
13676
|
-
return (await import("./chunks/edit-
|
|
13676
|
+
return (await import("./chunks/edit-TOSB2EMI.js")).default(client, telemetry2);
|
|
13677
13677
|
}
|
|
13678
13678
|
case "delete": {
|
|
13679
13679
|
if (handleHelp(deleteSubcommand))
|
|
13680
13680
|
return 0;
|
|
13681
13681
|
telemetry2.trackCliSubcommandDelete(subcommandOriginal);
|
|
13682
|
-
return (await import("./chunks/delete-
|
|
13682
|
+
return (await import("./chunks/delete-FZCOUFGN.js")).default(client, telemetry2);
|
|
13683
13683
|
}
|
|
13684
13684
|
default: {
|
|
13685
13685
|
if (needHelp) {
|
|
@@ -13695,7 +13695,7 @@ async function comments(client) {
|
|
|
13695
13695
|
}
|
|
13696
13696
|
telemetry2.trackCliSubcommandList(subcommandOriginal);
|
|
13697
13697
|
const defaultInvocation = subcommandOriginal === "default";
|
|
13698
|
-
return (await import("./chunks/list-
|
|
13698
|
+
return (await import("./chunks/list-2IIE7CAP.js")).default(
|
|
13699
13699
|
client,
|
|
13700
13700
|
telemetry2,
|
|
13701
13701
|
defaultInvocation
|
|
@@ -33204,6 +33204,41 @@ var import_chalk122 = __toESM(require_source(), 1);
|
|
|
33204
33204
|
var import_ms13 = __toESM(require_ms(), 1);
|
|
33205
33205
|
var import_pluralize8 = __toESM(require_pluralize(), 1);
|
|
33206
33206
|
|
|
33207
|
+
// src/util/flags/update-flag.ts
|
|
33208
|
+
function flagUrl(projectId, flagIdOrSlug) {
|
|
33209
|
+
return `/v1/projects/${encodeURIComponent(projectId)}/feature-flags/flags/${encodeURIComponent(flagIdOrSlug)}`;
|
|
33210
|
+
}
|
|
33211
|
+
async function fetchFlagForUpdate(client, projectId, flagIdOrSlug) {
|
|
33212
|
+
output_manager_default.debug(
|
|
33213
|
+
`Fetching feature flag ${flagIdOrSlug} for project ${projectId} with ETag`
|
|
33214
|
+
);
|
|
33215
|
+
const response = await client.fetch(flagUrl(projectId, flagIdOrSlug), {
|
|
33216
|
+
json: false
|
|
33217
|
+
});
|
|
33218
|
+
const etag = response.headers.get("etag");
|
|
33219
|
+
if (!etag) {
|
|
33220
|
+
throw new Error(
|
|
33221
|
+
"Unable to update flag safely because the flag ETag is missing."
|
|
33222
|
+
);
|
|
33223
|
+
}
|
|
33224
|
+
return {
|
|
33225
|
+
flag: await response.json(),
|
|
33226
|
+
etag
|
|
33227
|
+
};
|
|
33228
|
+
}
|
|
33229
|
+
async function updateFlag(client, projectId, flagIdOrSlug, request2, options) {
|
|
33230
|
+
output_manager_default.debug(
|
|
33231
|
+
`Updating feature flag ${flagIdOrSlug} for project ${projectId}`
|
|
33232
|
+
);
|
|
33233
|
+
const url = flagUrl(projectId, flagIdOrSlug);
|
|
33234
|
+
const response = await client.fetch(url, {
|
|
33235
|
+
method: "PATCH",
|
|
33236
|
+
headers: options?.ifMatch ? { "If-Match": options.ifMatch } : void 0,
|
|
33237
|
+
body: request2
|
|
33238
|
+
});
|
|
33239
|
+
return response;
|
|
33240
|
+
}
|
|
33241
|
+
|
|
33207
33242
|
// src/util/flags/get-flags.ts
|
|
33208
33243
|
var MAX_FLAGS_PAGE_LIMIT = 100;
|
|
33209
33244
|
var MAX_FLAG_VERSIONS_PAGE_LIMIT = 100;
|
|
@@ -33261,7 +33296,7 @@ async function getFlag(client, projectId, flagIdOrSlug) {
|
|
|
33261
33296
|
output_manager_default.debug(
|
|
33262
33297
|
`Fetching feature flag ${flagIdOrSlug} for project ${projectId}`
|
|
33263
33298
|
);
|
|
33264
|
-
const url =
|
|
33299
|
+
const url = flagUrl(projectId, flagIdOrSlug);
|
|
33265
33300
|
const response = await client.fetch(url);
|
|
33266
33301
|
return response;
|
|
33267
33302
|
}
|
|
@@ -33664,11 +33699,11 @@ function resolveVariantOrThrow(input, variants, optionName) {
|
|
|
33664
33699
|
}
|
|
33665
33700
|
return result.variant;
|
|
33666
33701
|
}
|
|
33667
|
-
function resolveVariantByIdOrThrow(
|
|
33668
|
-
const variant = variants.find((candidate) => candidate.id ===
|
|
33702
|
+
function resolveVariantByIdOrThrow(variantId, variants, optionName) {
|
|
33703
|
+
const variant = variants.find((candidate) => candidate.id === variantId);
|
|
33669
33704
|
if (!variant) {
|
|
33670
33705
|
throw new Error(
|
|
33671
|
-
`${optionName} references an unknown variant ${import_chalk124.default.bold(
|
|
33706
|
+
`${optionName} references an unknown variant ${import_chalk124.default.bold(variantId)}.`
|
|
33672
33707
|
);
|
|
33673
33708
|
}
|
|
33674
33709
|
return variant;
|
|
@@ -33849,11 +33884,11 @@ function printFlagEnvironmentDetails(flag, settings, environments) {
|
|
|
33849
33884
|
if (envConfig.targets && Object.keys(envConfig.targets).length > 0) {
|
|
33850
33885
|
output_manager_default.print(` ${import_chalk126.default.dim("Targeting:")}
|
|
33851
33886
|
`);
|
|
33852
|
-
for (const [
|
|
33887
|
+
for (const [variantId, entityKinds] of Object.entries(
|
|
33853
33888
|
envConfig.targets
|
|
33854
33889
|
)) {
|
|
33855
|
-
const variant = flag.variants.find((v) => v.id ===
|
|
33856
|
-
const variantSummary = formatFlagVariantSummary(variant,
|
|
33890
|
+
const variant = flag.variants.find((v) => v.id === variantId);
|
|
33891
|
+
const variantSummary = formatFlagVariantSummary(variant, variantId);
|
|
33857
33892
|
for (const [entityKind, attributes] of Object.entries(entityKinds)) {
|
|
33858
33893
|
for (const [attribute, values] of Object.entries(attributes)) {
|
|
33859
33894
|
const valueList = values.map((v) => {
|
|
@@ -34570,19 +34605,19 @@ function appendConditionDiff(lines, marker, condition, indent2) {
|
|
|
34570
34605
|
}
|
|
34571
34606
|
function formatTargets(targets, variants, includeVariantId = false) {
|
|
34572
34607
|
const lines = [];
|
|
34573
|
-
for (const [
|
|
34608
|
+
for (const [variantId, entityKinds] of Object.entries(targets ?? {})) {
|
|
34574
34609
|
for (const [entityKind, attributes] of Object.entries(entityKinds)) {
|
|
34575
34610
|
for (const [attribute, values] of Object.entries(attributes)) {
|
|
34576
34611
|
for (const target of values) {
|
|
34577
34612
|
const variant = variants.find(
|
|
34578
|
-
(candidate) => candidate.id ===
|
|
34613
|
+
(candidate) => candidate.id === variantId
|
|
34579
34614
|
);
|
|
34580
34615
|
lines.push(
|
|
34581
34616
|
`${import_chalk127.default.dim(`${entityKind}.${attribute}:`)} ${formatTargetValue(
|
|
34582
34617
|
target
|
|
34583
34618
|
)} ${import_chalk127.default.dim("\u2192")} ${formatFlagVariantSummary(
|
|
34584
34619
|
variant,
|
|
34585
|
-
|
|
34620
|
+
variantId,
|
|
34586
34621
|
includeVariantId
|
|
34587
34622
|
)}`
|
|
34588
34623
|
);
|
|
@@ -35241,12 +35276,12 @@ function alignTimeRange(startTime, endTime, granularity) {
|
|
|
35241
35276
|
)
|
|
35242
35277
|
};
|
|
35243
35278
|
}
|
|
35244
|
-
function getVariantDisplayName(flag,
|
|
35245
|
-
if (!
|
|
35279
|
+
function getVariantDisplayName(flag, variantId) {
|
|
35280
|
+
if (!variantId || variantId === "(not set)") {
|
|
35246
35281
|
return "Default in Code";
|
|
35247
35282
|
}
|
|
35248
|
-
const variant = flag.variants.find((item) => item.id ===
|
|
35249
|
-
return variant ? formatVariantListSummary(variant) :
|
|
35283
|
+
const variant = flag.variants.find((item) => item.id === variantId);
|
|
35284
|
+
return variant ? formatVariantListSummary(variant) : variantId;
|
|
35250
35285
|
}
|
|
35251
35286
|
function handleCommandError(client, error, jsonOutput) {
|
|
35252
35287
|
if (!jsonOutput) {
|
|
@@ -35505,7 +35540,6 @@ async function evaluations(client, argv) {
|
|
|
35505
35540
|
|
|
35506
35541
|
// src/commands/flags/add.ts
|
|
35507
35542
|
var import_chalk129 = __toESM(require_source(), 1);
|
|
35508
|
-
import { randomBytes as randomBytes2 } from "crypto";
|
|
35509
35543
|
|
|
35510
35544
|
// src/util/flags/create-flag.ts
|
|
35511
35545
|
async function createFlag(client, projectId, request2) {
|
|
@@ -35570,16 +35604,107 @@ var FlagsCreateTelemetryClient = class extends TelemetryClient {
|
|
|
35570
35604
|
}
|
|
35571
35605
|
};
|
|
35572
35606
|
|
|
35573
|
-
// src/
|
|
35574
|
-
|
|
35575
|
-
|
|
35607
|
+
// src/util/flags/variant-input.ts
|
|
35608
|
+
import { randomBytes as randomBytes2 } from "crypto";
|
|
35609
|
+
var VARIANT_ID_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
35610
|
+
function generateVariantId(size = 21) {
|
|
35576
35611
|
const bytes5 = randomBytes2(size);
|
|
35577
35612
|
let id = "";
|
|
35578
|
-
for (let
|
|
35579
|
-
id +=
|
|
35613
|
+
for (let index = 0; index < size; index++) {
|
|
35614
|
+
id += VARIANT_ID_ALPHABET[bytes5[index] % VARIANT_ID_ALPHABET.length];
|
|
35580
35615
|
}
|
|
35581
35616
|
return id;
|
|
35582
35617
|
}
|
|
35618
|
+
function parseVariantInput(input, kind, index) {
|
|
35619
|
+
const { rawValue, rawLabel } = splitVariantInput(input, kind);
|
|
35620
|
+
const validationError = validateVariantValue(rawValue, kind);
|
|
35621
|
+
if (validationError) {
|
|
35622
|
+
throw new Error(`Invalid variant "${input}": ${validationError}`);
|
|
35623
|
+
}
|
|
35624
|
+
return {
|
|
35625
|
+
id: generateVariantId(),
|
|
35626
|
+
value: parseVariantValue2(rawValue, kind),
|
|
35627
|
+
label: getVariantLabel(rawLabel, kind, index),
|
|
35628
|
+
description: ""
|
|
35629
|
+
};
|
|
35630
|
+
}
|
|
35631
|
+
function validateVariantValue(value, kind) {
|
|
35632
|
+
if (!value.trim()) {
|
|
35633
|
+
return "Variant value cannot be empty";
|
|
35634
|
+
}
|
|
35635
|
+
if (kind === "boolean") {
|
|
35636
|
+
const loweredValue = value.toLowerCase();
|
|
35637
|
+
if (loweredValue !== "true" && loweredValue !== "false") {
|
|
35638
|
+
return "Boolean variant values must be true or false";
|
|
35639
|
+
}
|
|
35640
|
+
}
|
|
35641
|
+
if (kind === "number") {
|
|
35642
|
+
const parsed = Number(value);
|
|
35643
|
+
if (!Number.isFinite(parsed)) {
|
|
35644
|
+
return "Number variants must be valid numeric values";
|
|
35645
|
+
}
|
|
35646
|
+
}
|
|
35647
|
+
if (kind === "json" && !isValidJsonVariantValue(value)) {
|
|
35648
|
+
return "JSON variant values must be valid JSON";
|
|
35649
|
+
}
|
|
35650
|
+
return null;
|
|
35651
|
+
}
|
|
35652
|
+
function splitVariantInput(input, kind) {
|
|
35653
|
+
if (kind !== "json") {
|
|
35654
|
+
const separatorIndex = input.indexOf("=");
|
|
35655
|
+
return {
|
|
35656
|
+
rawValue: separatorIndex === -1 ? input.trim() : input.slice(0, separatorIndex).trim(),
|
|
35657
|
+
rawLabel: separatorIndex === -1 ? void 0 : input.slice(separatorIndex + 1).trim() || void 0
|
|
35658
|
+
};
|
|
35659
|
+
}
|
|
35660
|
+
const trimmed = input.trim();
|
|
35661
|
+
if (isValidJsonVariantValue(trimmed)) {
|
|
35662
|
+
return { rawValue: trimmed };
|
|
35663
|
+
}
|
|
35664
|
+
for (let index = trimmed.length - 1; index >= 0; index--) {
|
|
35665
|
+
if (trimmed[index] !== "=") {
|
|
35666
|
+
continue;
|
|
35667
|
+
}
|
|
35668
|
+
const rawValue = trimmed.slice(0, index).trim();
|
|
35669
|
+
const rawLabel = trimmed.slice(index + 1).trim();
|
|
35670
|
+
if (!rawValue || !isValidJsonVariantValue(rawValue)) {
|
|
35671
|
+
continue;
|
|
35672
|
+
}
|
|
35673
|
+
return {
|
|
35674
|
+
rawValue,
|
|
35675
|
+
rawLabel: rawLabel || void 0
|
|
35676
|
+
};
|
|
35677
|
+
}
|
|
35678
|
+
return { rawValue: trimmed };
|
|
35679
|
+
}
|
|
35680
|
+
function getVariantLabel(rawLabel, kind, index) {
|
|
35681
|
+
if (rawLabel) {
|
|
35682
|
+
return rawLabel;
|
|
35683
|
+
}
|
|
35684
|
+
if (kind === "json") {
|
|
35685
|
+
return `Variant ${index + 1}`;
|
|
35686
|
+
}
|
|
35687
|
+
return void 0;
|
|
35688
|
+
}
|
|
35689
|
+
function parseVariantValue2(value, kind) {
|
|
35690
|
+
if (kind === "number") {
|
|
35691
|
+
return Number(value);
|
|
35692
|
+
}
|
|
35693
|
+
if (kind === "json") {
|
|
35694
|
+
return JSON.parse(value);
|
|
35695
|
+
}
|
|
35696
|
+
return value;
|
|
35697
|
+
}
|
|
35698
|
+
function isValidJsonVariantValue(value) {
|
|
35699
|
+
try {
|
|
35700
|
+
JSON.parse(value);
|
|
35701
|
+
return true;
|
|
35702
|
+
} catch {
|
|
35703
|
+
return false;
|
|
35704
|
+
}
|
|
35705
|
+
}
|
|
35706
|
+
|
|
35707
|
+
// src/commands/flags/add.ts
|
|
35583
35708
|
async function create4(client, argv) {
|
|
35584
35709
|
const telemetryClient = new FlagsCreateTelemetryClient({
|
|
35585
35710
|
opts: {
|
|
@@ -35744,92 +35869,18 @@ function formatVariantInput(valueInput, label) {
|
|
|
35744
35869
|
const trimmedLabel = label.trim();
|
|
35745
35870
|
return trimmedLabel ? `${valueInput}=${trimmedLabel}` : valueInput;
|
|
35746
35871
|
}
|
|
35747
|
-
function parseVariantInput(input, kind, index) {
|
|
35748
|
-
const { rawValue, rawLabel } = splitVariantInput(input, kind);
|
|
35749
|
-
const validationError = validateVariantValue(rawValue, kind);
|
|
35750
|
-
if (validationError) {
|
|
35751
|
-
throw new Error(`Invalid variant "${input}": ${validationError}`);
|
|
35752
|
-
}
|
|
35753
|
-
return {
|
|
35754
|
-
id: variantId(),
|
|
35755
|
-
value: parseVariantValue2(rawValue, kind),
|
|
35756
|
-
label: getVariantLabel(rawLabel, kind, index),
|
|
35757
|
-
description: ""
|
|
35758
|
-
};
|
|
35759
|
-
}
|
|
35760
|
-
function splitVariantInput(input, kind) {
|
|
35761
|
-
if (kind !== "json") {
|
|
35762
|
-
const separatorIndex = input.indexOf("=");
|
|
35763
|
-
return {
|
|
35764
|
-
rawValue: separatorIndex === -1 ? input.trim() : input.slice(0, separatorIndex).trim(),
|
|
35765
|
-
rawLabel: separatorIndex === -1 ? void 0 : input.slice(separatorIndex + 1).trim() || void 0
|
|
35766
|
-
};
|
|
35767
|
-
}
|
|
35768
|
-
const trimmed = input.trim();
|
|
35769
|
-
if (isValidJsonVariantValue(trimmed)) {
|
|
35770
|
-
return { rawValue: trimmed };
|
|
35771
|
-
}
|
|
35772
|
-
for (let index = trimmed.length - 1; index >= 0; index--) {
|
|
35773
|
-
if (trimmed[index] !== "=") {
|
|
35774
|
-
continue;
|
|
35775
|
-
}
|
|
35776
|
-
const rawValue = trimmed.slice(0, index).trim();
|
|
35777
|
-
const rawLabel = trimmed.slice(index + 1).trim();
|
|
35778
|
-
if (!rawValue || !isValidJsonVariantValue(rawValue)) {
|
|
35779
|
-
continue;
|
|
35780
|
-
}
|
|
35781
|
-
return {
|
|
35782
|
-
rawValue,
|
|
35783
|
-
rawLabel: rawLabel || void 0
|
|
35784
|
-
};
|
|
35785
|
-
}
|
|
35786
|
-
return { rawValue: trimmed };
|
|
35787
|
-
}
|
|
35788
|
-
function getVariantLabel(rawLabel, kind, index) {
|
|
35789
|
-
if (rawLabel) {
|
|
35790
|
-
return rawLabel;
|
|
35791
|
-
}
|
|
35792
|
-
if (kind === "json") {
|
|
35793
|
-
return `Variant ${index + 1}`;
|
|
35794
|
-
}
|
|
35795
|
-
return void 0;
|
|
35796
|
-
}
|
|
35797
|
-
function validateVariantValue(value, kind) {
|
|
35798
|
-
if (!value.trim()) {
|
|
35799
|
-
return "value cannot be empty";
|
|
35800
|
-
}
|
|
35801
|
-
if (kind === "number") {
|
|
35802
|
-
const parsed = Number(value);
|
|
35803
|
-
if (!Number.isFinite(parsed)) {
|
|
35804
|
-
return "number variants must be valid numeric values";
|
|
35805
|
-
}
|
|
35806
|
-
}
|
|
35807
|
-
if (kind === "json" && !isValidJsonVariantValue(value)) {
|
|
35808
|
-
return "JSON variants must be valid JSON";
|
|
35809
|
-
}
|
|
35810
|
-
return null;
|
|
35811
|
-
}
|
|
35812
|
-
function parseVariantValue2(value, kind) {
|
|
35813
|
-
if (kind === "number") {
|
|
35814
|
-
return Number(value);
|
|
35815
|
-
}
|
|
35816
|
-
if (kind === "json") {
|
|
35817
|
-
return JSON.parse(value);
|
|
35818
|
-
}
|
|
35819
|
-
return value;
|
|
35820
|
-
}
|
|
35821
35872
|
function getDefaultVariants(kind) {
|
|
35822
35873
|
switch (kind) {
|
|
35823
35874
|
case "boolean":
|
|
35824
35875
|
return [
|
|
35825
35876
|
{
|
|
35826
|
-
id:
|
|
35877
|
+
id: generateVariantId(),
|
|
35827
35878
|
value: false,
|
|
35828
35879
|
label: "Off",
|
|
35829
35880
|
description: "not enabled"
|
|
35830
35881
|
},
|
|
35831
35882
|
{
|
|
35832
|
-
id:
|
|
35883
|
+
id: generateVariantId(),
|
|
35833
35884
|
value: true,
|
|
35834
35885
|
label: "On",
|
|
35835
35886
|
description: "enabled"
|
|
@@ -35841,14 +35892,6 @@ function getDefaultVariants(kind) {
|
|
|
35841
35892
|
throw new Error(`Default variants are not supported for kind: ${kind}`);
|
|
35842
35893
|
}
|
|
35843
35894
|
}
|
|
35844
|
-
function isValidJsonVariantValue(value) {
|
|
35845
|
-
try {
|
|
35846
|
-
JSON.parse(value);
|
|
35847
|
-
return true;
|
|
35848
|
-
} catch {
|
|
35849
|
-
return false;
|
|
35850
|
-
}
|
|
35851
|
-
}
|
|
35852
35895
|
|
|
35853
35896
|
// src/commands/flags/open.ts
|
|
35854
35897
|
var import_open7 = __toESM(require_open(), 1);
|
|
@@ -35932,19 +35975,6 @@ async function openFlag(client, argv) {
|
|
|
35932
35975
|
var import_chalk130 = __toESM(require_source(), 1);
|
|
35933
35976
|
var import_fast_deep_equal3 = __toESM(require_fast_deep_equal(), 1);
|
|
35934
35977
|
|
|
35935
|
-
// src/util/flags/update-flag.ts
|
|
35936
|
-
async function updateFlag(client, projectId, flagIdOrSlug, request2) {
|
|
35937
|
-
output_manager_default.debug(
|
|
35938
|
-
`Updating feature flag ${flagIdOrSlug} for project ${projectId}`
|
|
35939
|
-
);
|
|
35940
|
-
const url = `/v1/projects/${encodeURIComponent(projectId)}/feature-flags/flags/${encodeURIComponent(flagIdOrSlug)}`;
|
|
35941
|
-
const response = await client.fetch(url, {
|
|
35942
|
-
method: "PATCH",
|
|
35943
|
-
body: request2
|
|
35944
|
-
});
|
|
35945
|
-
return response;
|
|
35946
|
-
}
|
|
35947
|
-
|
|
35948
35978
|
// src/util/flags/normalize-optional-input.ts
|
|
35949
35979
|
function normalizeOptionalInput(input) {
|
|
35950
35980
|
const value = input?.trim();
|
|
@@ -35965,6 +35995,140 @@ async function resolveOptionalInput(client, input, defaultValue, promptMessage)
|
|
|
35965
35995
|
return normalizeOptionalInput(response) || defaultValue;
|
|
35966
35996
|
}
|
|
35967
35997
|
|
|
35998
|
+
// src/util/flags/variant-reference-paths.ts
|
|
35999
|
+
function findVariantReferencePaths(flag, variantIds) {
|
|
36000
|
+
const trackedVariantIds = new Set(variantIds);
|
|
36001
|
+
const references = /* @__PURE__ */ new Map();
|
|
36002
|
+
for (const [environmentName, environmentConfig] of Object.entries(
|
|
36003
|
+
flag.environments
|
|
36004
|
+
)) {
|
|
36005
|
+
collectEnvironmentReferencePaths(
|
|
36006
|
+
environmentName,
|
|
36007
|
+
environmentConfig,
|
|
36008
|
+
trackedVariantIds,
|
|
36009
|
+
references
|
|
36010
|
+
);
|
|
36011
|
+
}
|
|
36012
|
+
return new Map(
|
|
36013
|
+
Array.from(references.entries(), ([variantId, paths]) => [
|
|
36014
|
+
variantId,
|
|
36015
|
+
Array.from(paths).sort()
|
|
36016
|
+
])
|
|
36017
|
+
);
|
|
36018
|
+
}
|
|
36019
|
+
function collectEnvironmentReferencePaths(environmentName, environmentConfig, trackedVariantIds, references) {
|
|
36020
|
+
collectOutcomeReferencePaths(
|
|
36021
|
+
environmentConfig.pausedOutcome,
|
|
36022
|
+
`${environmentName}.pausedOutcome`,
|
|
36023
|
+
trackedVariantIds,
|
|
36024
|
+
references
|
|
36025
|
+
);
|
|
36026
|
+
collectOutcomeReferencePaths(
|
|
36027
|
+
environmentConfig.fallthrough,
|
|
36028
|
+
`${environmentName}.fallthrough`,
|
|
36029
|
+
trackedVariantIds,
|
|
36030
|
+
references
|
|
36031
|
+
);
|
|
36032
|
+
for (const [ruleIndex, rule] of environmentConfig.rules.entries()) {
|
|
36033
|
+
collectOutcomeReferencePaths(
|
|
36034
|
+
rule.outcome,
|
|
36035
|
+
`${environmentName}.rules[${ruleIndex}].outcome`,
|
|
36036
|
+
trackedVariantIds,
|
|
36037
|
+
references
|
|
36038
|
+
);
|
|
36039
|
+
}
|
|
36040
|
+
if (!environmentConfig.targets) {
|
|
36041
|
+
return;
|
|
36042
|
+
}
|
|
36043
|
+
for (const [variantId, entityKinds] of Object.entries(
|
|
36044
|
+
environmentConfig.targets
|
|
36045
|
+
)) {
|
|
36046
|
+
if (!trackedVariantIds.has(variantId)) {
|
|
36047
|
+
continue;
|
|
36048
|
+
}
|
|
36049
|
+
for (const [entityKind, attributes] of Object.entries(entityKinds)) {
|
|
36050
|
+
for (const [attribute, values] of Object.entries(attributes)) {
|
|
36051
|
+
if (values.length === 0) {
|
|
36052
|
+
continue;
|
|
36053
|
+
}
|
|
36054
|
+
addReferencePath(
|
|
36055
|
+
references,
|
|
36056
|
+
variantId,
|
|
36057
|
+
`${environmentName}.targets.${entityKind}.${attribute}`
|
|
36058
|
+
);
|
|
36059
|
+
}
|
|
36060
|
+
}
|
|
36061
|
+
}
|
|
36062
|
+
}
|
|
36063
|
+
function collectOutcomeReferencePaths(outcome, basePath, trackedVariantIds, references) {
|
|
36064
|
+
if (!outcome) {
|
|
36065
|
+
return;
|
|
36066
|
+
}
|
|
36067
|
+
switch (outcome.type) {
|
|
36068
|
+
case "variant":
|
|
36069
|
+
if (trackedVariantIds.has(outcome.variantId)) {
|
|
36070
|
+
addReferencePath(references, outcome.variantId, basePath);
|
|
36071
|
+
}
|
|
36072
|
+
return;
|
|
36073
|
+
case "split":
|
|
36074
|
+
collectSplitOutcomeReferencePaths(
|
|
36075
|
+
outcome,
|
|
36076
|
+
basePath,
|
|
36077
|
+
trackedVariantIds,
|
|
36078
|
+
references
|
|
36079
|
+
);
|
|
36080
|
+
return;
|
|
36081
|
+
case "rollout":
|
|
36082
|
+
collectRolloutOutcomeReferencePaths(
|
|
36083
|
+
outcome,
|
|
36084
|
+
basePath,
|
|
36085
|
+
trackedVariantIds,
|
|
36086
|
+
references
|
|
36087
|
+
);
|
|
36088
|
+
return;
|
|
36089
|
+
default:
|
|
36090
|
+
return;
|
|
36091
|
+
}
|
|
36092
|
+
}
|
|
36093
|
+
function collectSplitOutcomeReferencePaths(outcome, basePath, trackedVariantIds, references) {
|
|
36094
|
+
if (trackedVariantIds.has(outcome.defaultVariantId)) {
|
|
36095
|
+
addReferencePath(
|
|
36096
|
+
references,
|
|
36097
|
+
outcome.defaultVariantId,
|
|
36098
|
+
`${basePath}.default`
|
|
36099
|
+
);
|
|
36100
|
+
}
|
|
36101
|
+
for (const variantId of Object.keys(outcome.weights)) {
|
|
36102
|
+
if (!trackedVariantIds.has(variantId)) {
|
|
36103
|
+
continue;
|
|
36104
|
+
}
|
|
36105
|
+
addReferencePath(references, variantId, `${basePath}.weights.${variantId}`);
|
|
36106
|
+
}
|
|
36107
|
+
}
|
|
36108
|
+
function collectRolloutOutcomeReferencePaths(outcome, basePath, trackedVariantIds, references) {
|
|
36109
|
+
if (trackedVariantIds.has(outcome.rollFromVariantId)) {
|
|
36110
|
+
addReferencePath(references, outcome.rollFromVariantId, `${basePath}.from`);
|
|
36111
|
+
}
|
|
36112
|
+
if (trackedVariantIds.has(outcome.rollToVariantId)) {
|
|
36113
|
+
addReferencePath(references, outcome.rollToVariantId, `${basePath}.to`);
|
|
36114
|
+
}
|
|
36115
|
+
if (trackedVariantIds.has(outcome.defaultVariantId)) {
|
|
36116
|
+
addReferencePath(
|
|
36117
|
+
references,
|
|
36118
|
+
outcome.defaultVariantId,
|
|
36119
|
+
`${basePath}.default`
|
|
36120
|
+
);
|
|
36121
|
+
}
|
|
36122
|
+
}
|
|
36123
|
+
function addReferencePath(references, variantId, path3) {
|
|
36124
|
+
let paths = references.get(variantId);
|
|
36125
|
+
if (!paths) {
|
|
36126
|
+
paths = /* @__PURE__ */ new Set();
|
|
36127
|
+
references.set(variantId, paths);
|
|
36128
|
+
}
|
|
36129
|
+
paths.add(path3);
|
|
36130
|
+
}
|
|
36131
|
+
|
|
35968
36132
|
// src/util/telemetry/commands/flags/update.ts
|
|
35969
36133
|
var FlagsUpdateTelemetryClient = class extends TelemetryClient {
|
|
35970
36134
|
trackCliArgumentFlag(flag) {
|
|
@@ -35999,6 +36163,22 @@ var FlagsUpdateTelemetryClient = class extends TelemetryClient {
|
|
|
35999
36163
|
});
|
|
36000
36164
|
}
|
|
36001
36165
|
}
|
|
36166
|
+
trackCliOptionAddVariant(addVariant) {
|
|
36167
|
+
if (addVariant?.length) {
|
|
36168
|
+
this.trackCliOption({
|
|
36169
|
+
option: "add-variant",
|
|
36170
|
+
value: this.redactedValue
|
|
36171
|
+
});
|
|
36172
|
+
}
|
|
36173
|
+
}
|
|
36174
|
+
trackCliOptionRemoveVariant(removeVariant) {
|
|
36175
|
+
if (removeVariant?.length) {
|
|
36176
|
+
this.trackCliOption({
|
|
36177
|
+
option: "remove-variant",
|
|
36178
|
+
value: this.redactedValue
|
|
36179
|
+
});
|
|
36180
|
+
}
|
|
36181
|
+
}
|
|
36002
36182
|
trackCliOptionMessage(message) {
|
|
36003
36183
|
if (message) {
|
|
36004
36184
|
this.trackCliOption({
|
|
@@ -36007,6 +36187,11 @@ var FlagsUpdateTelemetryClient = class extends TelemetryClient {
|
|
|
36007
36187
|
});
|
|
36008
36188
|
}
|
|
36009
36189
|
}
|
|
36190
|
+
trackCliFlagYes(yes) {
|
|
36191
|
+
if (yes) {
|
|
36192
|
+
this.trackCliFlag("yes");
|
|
36193
|
+
}
|
|
36194
|
+
}
|
|
36010
36195
|
};
|
|
36011
36196
|
|
|
36012
36197
|
// src/commands/flags/update.ts
|
|
@@ -36034,6 +36219,9 @@ async function update2(client, argv) {
|
|
|
36034
36219
|
flags["--value"]
|
|
36035
36220
|
);
|
|
36036
36221
|
const label = normalizeOptionalInput(flags["--label"]);
|
|
36222
|
+
const addVariantInputs = flags["--add-variant"] || [];
|
|
36223
|
+
const removeVariantSelectors = flags["--remove-variant"] || [];
|
|
36224
|
+
const skipConfirmation = flags["--yes"];
|
|
36037
36225
|
const message = normalizeOptionalInput(
|
|
36038
36226
|
flags["--message"]
|
|
36039
36227
|
);
|
|
@@ -36050,7 +36238,17 @@ async function update2(client, argv) {
|
|
|
36050
36238
|
telemetryClient.trackCliOptionVariant(variantSelector);
|
|
36051
36239
|
telemetryClient.trackCliOptionValue(valueInput);
|
|
36052
36240
|
telemetryClient.trackCliOptionLabel(label);
|
|
36241
|
+
telemetryClient.trackCliOptionAddVariant(addVariantInputs);
|
|
36242
|
+
telemetryClient.trackCliOptionRemoveVariant(removeVariantSelectors);
|
|
36053
36243
|
telemetryClient.trackCliOptionMessage(message);
|
|
36244
|
+
telemetryClient.trackCliFlagYes(skipConfirmation);
|
|
36245
|
+
const hasVariantMutations = addVariantInputs.length > 0 || removeVariantSelectors.length > 0;
|
|
36246
|
+
if (hasVariantMutations && hasLegacyVariantEditOptions(variantSelector, valueInput, label)) {
|
|
36247
|
+
output_manager_default.error(
|
|
36248
|
+
"Cannot mix --variant, --value, or --label with --add-variant or --remove-variant."
|
|
36249
|
+
);
|
|
36250
|
+
return 1;
|
|
36251
|
+
}
|
|
36054
36252
|
const link = await getLinkedFlagsProject(client, projectName);
|
|
36055
36253
|
if (link.status === "error") {
|
|
36056
36254
|
return link.exitCode;
|
|
@@ -36063,59 +36261,232 @@ async function update2(client, argv) {
|
|
|
36063
36261
|
client.config.currentTeam = link.org.type === "team" ? link.org.id : void 0;
|
|
36064
36262
|
const { project } = link;
|
|
36065
36263
|
try {
|
|
36066
|
-
|
|
36067
|
-
|
|
36068
|
-
|
|
36069
|
-
|
|
36070
|
-
|
|
36071
|
-
|
|
36072
|
-
);
|
|
36073
|
-
return 1;
|
|
36264
|
+
if (hasVariantMutations) {
|
|
36265
|
+
return await updateFlagVariants(client, project.id, flagArg, {
|
|
36266
|
+
addVariantInputs,
|
|
36267
|
+
removeVariantSelectors,
|
|
36268
|
+
skipConfirmation: skipConfirmation || false,
|
|
36269
|
+
message
|
|
36270
|
+
});
|
|
36074
36271
|
}
|
|
36075
|
-
|
|
36272
|
+
return await updateExistingVariant(client, project.id, flagArg, {
|
|
36076
36273
|
selector: variantSelector,
|
|
36077
36274
|
valueInput,
|
|
36078
|
-
label
|
|
36275
|
+
label,
|
|
36276
|
+
message
|
|
36079
36277
|
});
|
|
36080
|
-
const { variants, changedVariants } = applyVariantUpdates(flag, [
|
|
36081
|
-
variantUpdate
|
|
36082
|
-
]);
|
|
36083
|
-
if (changedVariants.length === 0) {
|
|
36084
|
-
output_manager_default.warn(`Flag ${import_chalk130.default.bold(flag.slug)} is already up to date`);
|
|
36085
|
-
return 0;
|
|
36086
|
-
}
|
|
36087
|
-
const updateMessage = await resolveOptionalInput(
|
|
36088
|
-
client,
|
|
36089
|
-
message,
|
|
36090
|
-
DEFAULT_UPDATE_MESSAGE,
|
|
36091
|
-
"Enter a message for this update:"
|
|
36092
|
-
);
|
|
36093
|
-
output_manager_default.spinner("Updating flag...");
|
|
36094
|
-
await updateFlag(
|
|
36095
|
-
client,
|
|
36096
|
-
project.id,
|
|
36097
|
-
flagArg,
|
|
36098
|
-
updateMessage ? {
|
|
36099
|
-
variants,
|
|
36100
|
-
message: updateMessage
|
|
36101
|
-
} : {
|
|
36102
|
-
variants
|
|
36103
|
-
}
|
|
36104
|
-
);
|
|
36105
|
-
output_manager_default.stopSpinner();
|
|
36106
|
-
output_manager_default.success(`Feature flag ${import_chalk130.default.bold(flag.slug)} has been updated`);
|
|
36107
|
-
for (const variant of changedVariants) {
|
|
36108
|
-
output_manager_default.log(
|
|
36109
|
-
` ${import_chalk130.default.dim("Variant:")} ${formatVariantForDisplay(variant)}`
|
|
36110
|
-
);
|
|
36111
|
-
}
|
|
36112
36278
|
} catch (err) {
|
|
36113
36279
|
output_manager_default.stopSpinner();
|
|
36280
|
+
if (isAPIError(err) && err.status === 412) {
|
|
36281
|
+
output_manager_default.error("Flag changed while updating; re-run the command.");
|
|
36282
|
+
return 1;
|
|
36283
|
+
}
|
|
36114
36284
|
printError(err);
|
|
36115
36285
|
return 1;
|
|
36116
36286
|
}
|
|
36287
|
+
}
|
|
36288
|
+
async function updateExistingVariant(client, projectId, flagArg, input) {
|
|
36289
|
+
output_manager_default.spinner("Fetching flag...");
|
|
36290
|
+
const { flag, etag } = await fetchFlagForUpdate(client, projectId, flagArg);
|
|
36291
|
+
output_manager_default.stopSpinner();
|
|
36292
|
+
if (flag.state === "archived") {
|
|
36293
|
+
output_manager_default.error(
|
|
36294
|
+
`Flag ${import_chalk130.default.bold(flag.slug)} is archived and cannot be updated`
|
|
36295
|
+
);
|
|
36296
|
+
return 1;
|
|
36297
|
+
}
|
|
36298
|
+
const variantUpdate = await collectVariantUpdate(client, flag, input);
|
|
36299
|
+
const { variants, changedVariants } = applyVariantUpdates(flag, [
|
|
36300
|
+
variantUpdate
|
|
36301
|
+
]);
|
|
36302
|
+
if (changedVariants.length === 0) {
|
|
36303
|
+
output_manager_default.warn(`Flag ${import_chalk130.default.bold(flag.slug)} is already up to date`);
|
|
36304
|
+
return 0;
|
|
36305
|
+
}
|
|
36306
|
+
const updateMessage = await resolveOptionalInput(
|
|
36307
|
+
client,
|
|
36308
|
+
input.message,
|
|
36309
|
+
DEFAULT_UPDATE_MESSAGE,
|
|
36310
|
+
"Enter a message for this update:"
|
|
36311
|
+
);
|
|
36312
|
+
output_manager_default.spinner("Updating flag...");
|
|
36313
|
+
await updateFlag(
|
|
36314
|
+
client,
|
|
36315
|
+
projectId,
|
|
36316
|
+
flagArg,
|
|
36317
|
+
{
|
|
36318
|
+
variants,
|
|
36319
|
+
message: updateMessage
|
|
36320
|
+
},
|
|
36321
|
+
{
|
|
36322
|
+
ifMatch: etag
|
|
36323
|
+
}
|
|
36324
|
+
);
|
|
36325
|
+
output_manager_default.stopSpinner();
|
|
36326
|
+
output_manager_default.success(`Feature flag ${import_chalk130.default.bold(flag.slug)} has been updated`);
|
|
36327
|
+
for (const variant of changedVariants) {
|
|
36328
|
+
output_manager_default.log(
|
|
36329
|
+
` ${import_chalk130.default.dim("Variant:")} ${formatVariantForDisplay(variant)}`
|
|
36330
|
+
);
|
|
36331
|
+
}
|
|
36332
|
+
return 0;
|
|
36333
|
+
}
|
|
36334
|
+
async function updateFlagVariants(client, projectId, flagArg, input) {
|
|
36335
|
+
output_manager_default.spinner("Fetching flag...");
|
|
36336
|
+
const { flag, etag } = await fetchFlagForUpdate(client, projectId, flagArg);
|
|
36337
|
+
output_manager_default.stopSpinner();
|
|
36338
|
+
if (flag.state === "archived") {
|
|
36339
|
+
output_manager_default.error(
|
|
36340
|
+
`Flag ${import_chalk130.default.bold(flag.slug)} is archived and cannot be updated`
|
|
36341
|
+
);
|
|
36342
|
+
return 1;
|
|
36343
|
+
}
|
|
36344
|
+
if (flag.kind === "boolean") {
|
|
36345
|
+
output_manager_default.error(
|
|
36346
|
+
"Boolean flags do not support --add-variant or --remove-variant."
|
|
36347
|
+
);
|
|
36348
|
+
return 1;
|
|
36349
|
+
}
|
|
36350
|
+
const plan = buildVariantMutationPlan(
|
|
36351
|
+
flag,
|
|
36352
|
+
input.addVariantInputs,
|
|
36353
|
+
input.removeVariantSelectors
|
|
36354
|
+
);
|
|
36355
|
+
if (plan.removedVariants.length > 0 && !await confirmVariantRemoval(
|
|
36356
|
+
client,
|
|
36357
|
+
flag,
|
|
36358
|
+
plan.removedVariants,
|
|
36359
|
+
input.skipConfirmation
|
|
36360
|
+
)) {
|
|
36361
|
+
output_manager_default.log("Aborted");
|
|
36362
|
+
return 0;
|
|
36363
|
+
}
|
|
36364
|
+
const updateMessage = await resolveOptionalInput(
|
|
36365
|
+
client,
|
|
36366
|
+
input.message,
|
|
36367
|
+
DEFAULT_UPDATE_MESSAGE,
|
|
36368
|
+
"Enter a message for this update:"
|
|
36369
|
+
);
|
|
36370
|
+
output_manager_default.spinner("Updating flag...");
|
|
36371
|
+
await updateFlag(
|
|
36372
|
+
client,
|
|
36373
|
+
projectId,
|
|
36374
|
+
flagArg,
|
|
36375
|
+
{
|
|
36376
|
+
variants: plan.variants,
|
|
36377
|
+
message: updateMessage
|
|
36378
|
+
},
|
|
36379
|
+
{
|
|
36380
|
+
ifMatch: etag
|
|
36381
|
+
}
|
|
36382
|
+
);
|
|
36383
|
+
output_manager_default.stopSpinner();
|
|
36384
|
+
output_manager_default.success(`Feature flag ${import_chalk130.default.bold(flag.slug)} has been updated`);
|
|
36385
|
+
for (const variant of plan.addedVariants) {
|
|
36386
|
+
output_manager_default.log(` ${import_chalk130.default.dim("Added:")} ${formatVariantForLog(variant)}`);
|
|
36387
|
+
}
|
|
36388
|
+
for (const variant of plan.removedVariants) {
|
|
36389
|
+
output_manager_default.log(` ${import_chalk130.default.dim("Removed:")} ${formatVariantForLog(variant)}`);
|
|
36390
|
+
}
|
|
36117
36391
|
return 0;
|
|
36118
36392
|
}
|
|
36393
|
+
function hasLegacyVariantEditOptions(variantSelector, valueInput, label) {
|
|
36394
|
+
return variantSelector !== void 0 || valueInput !== void 0 || label !== void 0;
|
|
36395
|
+
}
|
|
36396
|
+
function buildVariantMutationPlan(flag, addVariantInputs, removeVariantSelectors) {
|
|
36397
|
+
const removedVariants = resolveRemovedVariants(
|
|
36398
|
+
flag.variants,
|
|
36399
|
+
removeVariantSelectors
|
|
36400
|
+
);
|
|
36401
|
+
assertVariantRemovalsAreAllowed(flag, removedVariants);
|
|
36402
|
+
const baseIndex = flag.variants.length - removedVariants.length;
|
|
36403
|
+
const addedVariants = parseAddedVariants(flag, addVariantInputs, baseIndex);
|
|
36404
|
+
const removedVariantIds = new Set(removedVariants.map((variant) => variant.id));
|
|
36405
|
+
const variants = flag.variants.filter((variant) => !removedVariantIds.has(variant.id)).map((variant) => ({ ...variant }));
|
|
36406
|
+
variants.push(...addedVariants);
|
|
36407
|
+
assertUniqueVariantValues(variants);
|
|
36408
|
+
return {
|
|
36409
|
+
variants,
|
|
36410
|
+
addedVariants,
|
|
36411
|
+
removedVariants
|
|
36412
|
+
};
|
|
36413
|
+
}
|
|
36414
|
+
function parseAddedVariants(flag, addVariantInputs, baseIndex) {
|
|
36415
|
+
const kind = flag.kind;
|
|
36416
|
+
if (kind === "boolean") {
|
|
36417
|
+
throw new Error("Boolean flags do not support adding variants.");
|
|
36418
|
+
}
|
|
36419
|
+
return addVariantInputs.map(
|
|
36420
|
+
(input, index) => parseVariantInput(input, kind, baseIndex + index)
|
|
36421
|
+
);
|
|
36422
|
+
}
|
|
36423
|
+
function resolveRemovedVariants(variants, removeVariantSelectors) {
|
|
36424
|
+
const removedVariantIds = /* @__PURE__ */ new Set();
|
|
36425
|
+
return removeVariantSelectors.map((selector) => {
|
|
36426
|
+
const result = resolveVariant(selector, variants);
|
|
36427
|
+
if (result.error || !result.variant) {
|
|
36428
|
+
throw new Error(result.error || `Variant "${selector}" not found`);
|
|
36429
|
+
}
|
|
36430
|
+
if (removedVariantIds.has(result.variant.id)) {
|
|
36431
|
+
throw new Error(
|
|
36432
|
+
`Duplicate --remove-variant selector ${import_chalk130.default.bold(selector)} resolves to ${formatVariantForLog(result.variant)}.`
|
|
36433
|
+
);
|
|
36434
|
+
}
|
|
36435
|
+
removedVariantIds.add(result.variant.id);
|
|
36436
|
+
return result.variant;
|
|
36437
|
+
});
|
|
36438
|
+
}
|
|
36439
|
+
function assertVariantRemovalsAreAllowed(flag, removedVariants) {
|
|
36440
|
+
const referencePaths = findVariantReferencePaths(
|
|
36441
|
+
flag,
|
|
36442
|
+
removedVariants.map((variant) => variant.id)
|
|
36443
|
+
);
|
|
36444
|
+
if (referencePaths.size === 0) {
|
|
36445
|
+
return;
|
|
36446
|
+
}
|
|
36447
|
+
const referencedVariants = removedVariants.filter(
|
|
36448
|
+
(variant) => referencePaths.has(variant.id)
|
|
36449
|
+
);
|
|
36450
|
+
const detailLines = referencedVariants.map((variant) => {
|
|
36451
|
+
const paths = referencePaths.get(variant.id) ?? [];
|
|
36452
|
+
return ` - ${formatVariantForLog(variant)} referenced by ${paths.join(", ")}`;
|
|
36453
|
+
});
|
|
36454
|
+
throw new Error(
|
|
36455
|
+
`Cannot remove variant${referencedVariants.length === 1 ? "" : "s"} because ${referencedVariants.length === 1 ? "it is" : "they are"} still referenced:
|
|
36456
|
+
${detailLines.join("\n")}`
|
|
36457
|
+
);
|
|
36458
|
+
}
|
|
36459
|
+
function assertUniqueVariantValues(variants) {
|
|
36460
|
+
for (let index = 0; index < variants.length; index++) {
|
|
36461
|
+
const variant = variants[index];
|
|
36462
|
+
const duplicateVariant = variants.slice(0, index).find((candidate) => (0, import_fast_deep_equal3.default)(candidate.value, variant.value));
|
|
36463
|
+
if (!duplicateVariant) {
|
|
36464
|
+
continue;
|
|
36465
|
+
}
|
|
36466
|
+
throw new Error(
|
|
36467
|
+
`Variant value ${formatVariantValue(variant.value)} would be duplicated by ${formatVariantForLog(duplicateVariant)} and ${formatVariantForLog(variant)}.`
|
|
36468
|
+
);
|
|
36469
|
+
}
|
|
36470
|
+
}
|
|
36471
|
+
async function confirmVariantRemoval(client, flag, removedVariants, skipConfirmation) {
|
|
36472
|
+
if (skipConfirmation) {
|
|
36473
|
+
return true;
|
|
36474
|
+
}
|
|
36475
|
+
if (!client.stdin.isTTY) {
|
|
36476
|
+
throw new Error(
|
|
36477
|
+
"Missing required flag --yes. Use --yes to skip the removal confirmation prompt in non-interactive mode."
|
|
36478
|
+
);
|
|
36479
|
+
}
|
|
36480
|
+
const promptLines = removedVariants.map((variant) => ` - ${formatVariantForLog(variant)}`).join("\n");
|
|
36481
|
+
return client.input.confirm(
|
|
36482
|
+
`Remove ${removedVariants.length} variant${removedVariants.length === 1 ? "" : "s"} from ${import_chalk130.default.bold(flag.slug)}?
|
|
36483
|
+
${promptLines}`,
|
|
36484
|
+
false
|
|
36485
|
+
);
|
|
36486
|
+
}
|
|
36487
|
+
function formatVariantForLog(variant) {
|
|
36488
|
+
return `${formatVariantForDisplay(variant)} ${import_chalk130.default.dim(`[id: ${variant.id}]`)}`;
|
|
36489
|
+
}
|
|
36119
36490
|
async function collectVariantUpdate(client, flag, input) {
|
|
36120
36491
|
const selectedVariant = await resolveSelectedVariant(
|
|
36121
36492
|
client,
|
|
@@ -36166,7 +36537,7 @@ async function resolveSelectedVariant(client, flag, selector) {
|
|
|
36166
36537
|
const selectedVariantId = await client.input.select({
|
|
36167
36538
|
message: "Select a variant to update:",
|
|
36168
36539
|
choices: flag.variants.map((variant) => ({
|
|
36169
|
-
name:
|
|
36540
|
+
name: formatVariantForLog(variant),
|
|
36170
36541
|
value: variant.id
|
|
36171
36542
|
}))
|
|
36172
36543
|
});
|
|
@@ -36183,7 +36554,7 @@ async function promptForVariantValueUpdate(client, flag, selectedVariant) {
|
|
|
36183
36554
|
if (!value.trim()) {
|
|
36184
36555
|
return true;
|
|
36185
36556
|
}
|
|
36186
|
-
const result =
|
|
36557
|
+
const result = validateVariantValue(value, flag.kind);
|
|
36187
36558
|
return result === null ? true : result;
|
|
36188
36559
|
}
|
|
36189
36560
|
});
|
|
@@ -36226,7 +36597,7 @@ function applyVariantUpdates(flag, updates) {
|
|
|
36226
36597
|
};
|
|
36227
36598
|
}
|
|
36228
36599
|
function parseUpdatedVariantValue(valueInput, kind, existingVariant) {
|
|
36229
|
-
const validationError =
|
|
36600
|
+
const validationError = validateVariantValue(valueInput, kind);
|
|
36230
36601
|
if (validationError) {
|
|
36231
36602
|
throw new Error(validationError);
|
|
36232
36603
|
}
|
|
@@ -36247,31 +36618,6 @@ function parseUpdatedVariantValue(valueInput, kind, existingVariant) {
|
|
|
36247
36618
|
}
|
|
36248
36619
|
return valueInput;
|
|
36249
36620
|
}
|
|
36250
|
-
function validateVariantValue2(value, kind) {
|
|
36251
|
-
if (!value.trim()) {
|
|
36252
|
-
return "Variant value cannot be empty";
|
|
36253
|
-
}
|
|
36254
|
-
if (kind === "boolean") {
|
|
36255
|
-
const loweredValue = value.toLowerCase();
|
|
36256
|
-
if (loweredValue !== "true" && loweredValue !== "false") {
|
|
36257
|
-
return "Boolean variant values must be true or false";
|
|
36258
|
-
}
|
|
36259
|
-
}
|
|
36260
|
-
if (kind === "number") {
|
|
36261
|
-
const parsed = Number(value);
|
|
36262
|
-
if (!Number.isFinite(parsed)) {
|
|
36263
|
-
return "Number variants must be valid numeric values";
|
|
36264
|
-
}
|
|
36265
|
-
}
|
|
36266
|
-
if (kind === "json") {
|
|
36267
|
-
try {
|
|
36268
|
-
JSON.parse(value);
|
|
36269
|
-
} catch {
|
|
36270
|
-
return "JSON variant values must be valid JSON";
|
|
36271
|
-
}
|
|
36272
|
-
}
|
|
36273
|
-
return null;
|
|
36274
|
-
}
|
|
36275
36621
|
|
|
36276
36622
|
// src/commands/flags/set.ts
|
|
36277
36623
|
var import_chalk132 = __toESM(require_source(), 1);
|
|
@@ -36319,33 +36665,33 @@ function formatEnvironmentChoiceLabel(envName, envConfig) {
|
|
|
36319
36665
|
const status3 = envConfig?.active ? import_chalk131.default.green("active") : import_chalk131.default.yellow("paused");
|
|
36320
36666
|
return `${envName} (${status3})`;
|
|
36321
36667
|
}
|
|
36322
|
-
function isOverridingEnvironmentToVariant(envConfig,
|
|
36323
|
-
return !envConfig.active && envConfig.pausedOutcome?.variantId ===
|
|
36668
|
+
function isOverridingEnvironmentToVariant(envConfig, variantId) {
|
|
36669
|
+
return !envConfig.active && envConfig.pausedOutcome?.variantId === variantId && envConfig.fallthrough.type === "variant" && envConfig.fallthrough.variantId === variantId;
|
|
36324
36670
|
}
|
|
36325
|
-
function isPausingEnvironmentToVariant(envConfig,
|
|
36326
|
-
return !envConfig.active && envConfig.pausedOutcome?.variantId ===
|
|
36671
|
+
function isPausingEnvironmentToVariant(envConfig, variantId) {
|
|
36672
|
+
return !envConfig.active && envConfig.pausedOutcome?.variantId === variantId;
|
|
36327
36673
|
}
|
|
36328
|
-
function buildVariantOverrideEnvironmentConfig(envConfig,
|
|
36674
|
+
function buildVariantOverrideEnvironmentConfig(envConfig, variantId) {
|
|
36329
36675
|
return {
|
|
36330
36676
|
...envConfig,
|
|
36331
36677
|
active: false,
|
|
36332
36678
|
pausedOutcome: {
|
|
36333
36679
|
type: "variant",
|
|
36334
|
-
variantId
|
|
36680
|
+
variantId
|
|
36335
36681
|
},
|
|
36336
36682
|
fallthrough: {
|
|
36337
36683
|
type: "variant",
|
|
36338
|
-
variantId
|
|
36684
|
+
variantId
|
|
36339
36685
|
}
|
|
36340
36686
|
};
|
|
36341
36687
|
}
|
|
36342
|
-
function buildPausedEnvironmentConfig(envConfig,
|
|
36688
|
+
function buildPausedEnvironmentConfig(envConfig, variantId) {
|
|
36343
36689
|
return {
|
|
36344
36690
|
...envConfig,
|
|
36345
36691
|
active: false,
|
|
36346
36692
|
pausedOutcome: {
|
|
36347
36693
|
type: "variant",
|
|
36348
|
-
variantId
|
|
36694
|
+
variantId
|
|
36349
36695
|
}
|
|
36350
36696
|
};
|
|
36351
36697
|
}
|
|
@@ -37825,7 +38171,7 @@ async function disable3(client, argv) {
|
|
|
37825
38171
|
const { args, flags } = parsedArgs;
|
|
37826
38172
|
const [flagArg] = args;
|
|
37827
38173
|
let environment = flags["--environment"];
|
|
37828
|
-
const
|
|
38174
|
+
const variantId = flags["--variant"];
|
|
37829
38175
|
const message = normalizeOptionalInput(
|
|
37830
38176
|
flags["--message"]
|
|
37831
38177
|
);
|
|
@@ -37862,7 +38208,7 @@ async function disable3(client, argv) {
|
|
|
37862
38208
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
37863
38209
|
telemetryClient.trackCliOptionProject(projectName);
|
|
37864
38210
|
telemetryClient.trackCliOptionEnvironment(environment);
|
|
37865
|
-
telemetryClient.trackCliOptionVariant(
|
|
38211
|
+
telemetryClient.trackCliOptionVariant(variantId);
|
|
37866
38212
|
telemetryClient.trackCliOptionMessage(message);
|
|
37867
38213
|
const link = await getLinkedFlagsProject(client, projectName);
|
|
37868
38214
|
if (link.status === "error") {
|
|
@@ -37942,8 +38288,8 @@ async function disable3(client, argv) {
|
|
|
37942
38288
|
);
|
|
37943
38289
|
const envConfig = flag.environments[environment];
|
|
37944
38290
|
let selectedVariant = getBooleanVariant(flag, false);
|
|
37945
|
-
if (
|
|
37946
|
-
const result = resolveVariant(
|
|
38291
|
+
if (variantId) {
|
|
38292
|
+
const result = resolveVariant(variantId, flag.variants);
|
|
37947
38293
|
if (result.error) {
|
|
37948
38294
|
output_manager_default.error(result.error);
|
|
37949
38295
|
return 1;
|
|
@@ -41210,9 +41556,9 @@ function warnIfRuleChangesAreBypassed(flag, environment) {
|
|
|
41210
41556
|
if (envConfig.active) {
|
|
41211
41557
|
return;
|
|
41212
41558
|
}
|
|
41213
|
-
const
|
|
41214
|
-
const variant = flag.variants.find((candidate) => candidate.id ===
|
|
41215
|
-
const serving = variant ? formatVariantForDisplay(variant) :
|
|
41559
|
+
const variantId = envConfig.pausedOutcome?.variantId;
|
|
41560
|
+
const variant = flag.variants.find((candidate) => candidate.id === variantId);
|
|
41561
|
+
const serving = variant ? formatVariantForDisplay(variant) : variantId ? import_chalk151.default.bold(variantId) : "a fixed variant";
|
|
41216
41562
|
output_manager_default.print(
|
|
41217
41563
|
`${import_chalk151.default.yellow("!")} This rule update was saved, but ${import_chalk151.default.bold(environment)} is serving ${serving}. Rule changes will not affect flag evaluation until the environment uses targeting again.
|
|
41218
41564
|
`
|
|
@@ -51777,7 +52123,7 @@ async function metrics(client) {
|
|
|
51777
52123
|
return 0;
|
|
51778
52124
|
}
|
|
51779
52125
|
telemetry2.trackCliSubcommandSchema(subcommandOriginal);
|
|
51780
|
-
const schemaFn = (await import("./chunks/schema-
|
|
52126
|
+
const schemaFn = (await import("./chunks/schema-6EZ72OVH.js")).default;
|
|
51781
52127
|
return schemaFn(client, telemetry2);
|
|
51782
52128
|
}
|
|
51783
52129
|
default: {
|
|
@@ -51790,7 +52136,7 @@ async function metrics(client) {
|
|
|
51790
52136
|
output_manager_default.print(help(metricsCommand, { columns: client.stderr.columns }));
|
|
51791
52137
|
return 2;
|
|
51792
52138
|
}
|
|
51793
|
-
const queryFn = (await import("./chunks/query-
|
|
52139
|
+
const queryFn = (await import("./chunks/query-LZWS5TDH.js")).default;
|
|
51794
52140
|
return queryFn(client, telemetry2);
|
|
51795
52141
|
}
|
|
51796
52142
|
}
|
|
@@ -54214,6 +54560,21 @@ var ProjectInspectTelemetryClient = class extends TelemetryClient {
|
|
|
54214
54560
|
};
|
|
54215
54561
|
|
|
54216
54562
|
// src/commands/project/inspect.ts
|
|
54563
|
+
var getProjectForInspect = async (client, projectNameOrId, autoConfirm) => {
|
|
54564
|
+
try {
|
|
54565
|
+
return await getProjectByCwdOrLink({
|
|
54566
|
+
autoConfirm,
|
|
54567
|
+
client,
|
|
54568
|
+
commandName: "project inspect",
|
|
54569
|
+
projectNameOrId,
|
|
54570
|
+
forReadOnlyCommand: true
|
|
54571
|
+
});
|
|
54572
|
+
} catch (error) {
|
|
54573
|
+
exitWithNonInteractiveError(client, error, 1, { variant: "inspect" });
|
|
54574
|
+
printError(error);
|
|
54575
|
+
return null;
|
|
54576
|
+
}
|
|
54577
|
+
};
|
|
54217
54578
|
async function inspect8(client, argv) {
|
|
54218
54579
|
const telemetry2 = new ProjectInspectTelemetryClient({
|
|
54219
54580
|
opts: {
|
|
@@ -54241,12 +54602,14 @@ async function inspect8(client, argv) {
|
|
|
54241
54602
|
return 2;
|
|
54242
54603
|
}
|
|
54243
54604
|
const inspectStamp = stamp_default();
|
|
54244
|
-
const project = await
|
|
54245
|
-
autoConfirm: parsedArgs.flags["--yes"],
|
|
54605
|
+
const project = await getProjectForInspect(
|
|
54246
54606
|
client,
|
|
54247
|
-
|
|
54248
|
-
|
|
54249
|
-
|
|
54607
|
+
name,
|
|
54608
|
+
parsedArgs.flags["--yes"]
|
|
54609
|
+
);
|
|
54610
|
+
if (!project) {
|
|
54611
|
+
return 1;
|
|
54612
|
+
}
|
|
54250
54613
|
const org = await getTeamById(client, project.accountId);
|
|
54251
54614
|
const projectSlugLink = formatProject(org.slug, project.name);
|
|
54252
54615
|
output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk198.default.gray(inspectStamp())}`);
|
|
@@ -55468,6 +55831,23 @@ var import_chalk205 = __toESM(require_source(), 1);
|
|
|
55468
55831
|
var PROTECTION_ACTIONS = ["enable", "disable"];
|
|
55469
55832
|
var DEFAULT_SKEW_PROTECTION_MAX_AGE = 2592e3;
|
|
55470
55833
|
var ENABLED_DEPLOYMENT_TYPE = "prod_deployment_urls_and_all_previews";
|
|
55834
|
+
var MAX_PROTECTION_PASSWORD_LENGTH = 72;
|
|
55835
|
+
function validateProtectionPassword(value) {
|
|
55836
|
+
const password = value.trim();
|
|
55837
|
+
if (password === "") {
|
|
55838
|
+
return {
|
|
55839
|
+
ok: false,
|
|
55840
|
+
message: "Invalid --protection-password: expected a non-empty password string."
|
|
55841
|
+
};
|
|
55842
|
+
}
|
|
55843
|
+
if (password.length > MAX_PROTECTION_PASSWORD_LENGTH) {
|
|
55844
|
+
return {
|
|
55845
|
+
ok: false,
|
|
55846
|
+
message: `Invalid --protection-password: password must be at most ${MAX_PROTECTION_PASSWORD_LENGTH} characters.`
|
|
55847
|
+
};
|
|
55848
|
+
}
|
|
55849
|
+
return { ok: true, password };
|
|
55850
|
+
}
|
|
55471
55851
|
function parseSkewMaxAgeSeconds(value) {
|
|
55472
55852
|
const trimmed = value.trim();
|
|
55473
55853
|
if (trimmed === "" || !/^\d+$/.test(trimmed)) {
|
|
@@ -55627,6 +56007,7 @@ async function protection(client, argv) {
|
|
|
55627
56007
|
}
|
|
55628
56008
|
const ssoSelected = Boolean(parsedArgs.flags["--sso"]);
|
|
55629
56009
|
const passwordSelected = Boolean(parsedArgs.flags["--password"]);
|
|
56010
|
+
const protectionPasswordFlag = parsedArgs.flags["--protection-password"];
|
|
55630
56011
|
const customerSupportCodeVisibilitySelected = Boolean(
|
|
55631
56012
|
parsedArgs.flags["--customer-support-code-visibility"]
|
|
55632
56013
|
);
|
|
@@ -55636,6 +56017,73 @@ async function protection(client, argv) {
|
|
|
55636
56017
|
const gitForkProtectionSelected = Boolean(
|
|
55637
56018
|
parsedArgs.flags["--git-fork-protection"]
|
|
55638
56019
|
);
|
|
56020
|
+
if (protectionPasswordFlag !== void 0 && !passwordSelected) {
|
|
56021
|
+
const msg = "`--protection-password` requires `--password`. Usage: `vercel project protection enable [name] --password --protection-password <password>`";
|
|
56022
|
+
outputAgentError(
|
|
56023
|
+
client,
|
|
56024
|
+
{
|
|
56025
|
+
status: "error",
|
|
56026
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
56027
|
+
message: msg,
|
|
56028
|
+
hint: "Pass --password together with --protection-password when enabling password protection.",
|
|
56029
|
+
next: [
|
|
56030
|
+
{
|
|
56031
|
+
command: buildCommandWithGlobalFlags(
|
|
56032
|
+
client.argv,
|
|
56033
|
+
"project protection enable --password --protection-password <password>"
|
|
56034
|
+
),
|
|
56035
|
+
when: "Replace <password> with the deployment protection password"
|
|
56036
|
+
}
|
|
56037
|
+
]
|
|
56038
|
+
},
|
|
56039
|
+
2
|
|
56040
|
+
);
|
|
56041
|
+
output_manager_default.error(msg);
|
|
56042
|
+
return 2;
|
|
56043
|
+
}
|
|
56044
|
+
if (action === "disable" && protectionPasswordFlag !== void 0) {
|
|
56045
|
+
const msg = "`--protection-password` can only be used with `project protection enable`.";
|
|
56046
|
+
outputAgentError(
|
|
56047
|
+
client,
|
|
56048
|
+
{
|
|
56049
|
+
status: "error",
|
|
56050
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
56051
|
+
message: msg,
|
|
56052
|
+
hint: "Use `project protection disable ... --password` to turn password protection off."
|
|
56053
|
+
},
|
|
56054
|
+
2
|
|
56055
|
+
);
|
|
56056
|
+
output_manager_default.error(msg);
|
|
56057
|
+
return 2;
|
|
56058
|
+
}
|
|
56059
|
+
let protectionPassword;
|
|
56060
|
+
if (action === "enable" && protectionPasswordFlag !== void 0) {
|
|
56061
|
+
const parsed = validateProtectionPassword(protectionPasswordFlag);
|
|
56062
|
+
if (!parsed.ok) {
|
|
56063
|
+
outputAgentError(
|
|
56064
|
+
client,
|
|
56065
|
+
{
|
|
56066
|
+
status: "error",
|
|
56067
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
56068
|
+
message: parsed.message,
|
|
56069
|
+
hint: `Pass a password string up to ${MAX_PROTECTION_PASSWORD_LENGTH} characters.`,
|
|
56070
|
+
next: [
|
|
56071
|
+
{
|
|
56072
|
+
command: buildCommandWithGlobalFlags(
|
|
56073
|
+
client.argv,
|
|
56074
|
+
"project protection enable --password --protection-password <password>"
|
|
56075
|
+
),
|
|
56076
|
+
when: "Replace <password> with a valid deployment protection password"
|
|
56077
|
+
}
|
|
56078
|
+
]
|
|
56079
|
+
},
|
|
56080
|
+
1
|
|
56081
|
+
);
|
|
56082
|
+
output_manager_default.error(parsed.message);
|
|
56083
|
+
return 1;
|
|
56084
|
+
}
|
|
56085
|
+
protectionPassword = parsed.password;
|
|
56086
|
+
}
|
|
55639
56087
|
if (action && !ssoSelected && !passwordSelected && !customerSupportCodeVisibilitySelected && !skewSelected && !bypassSelected && !gitForkProtectionSelected) {
|
|
55640
56088
|
const msg = "No protection selected. Pass --sso, --password, --customer-support-code-visibility, --skew, --protection-bypass, or --git-fork-protection. Usage: `vercel project protection enable|disable [name] --sso|--password|--customer-support-code-visibility|--skew|--protection-bypass|--git-fork-protection`";
|
|
55641
56089
|
outputAgentError(
|
|
@@ -55764,7 +56212,10 @@ async function protection(client, argv) {
|
|
|
55764
56212
|
patchBody.ssoProtection = action === "enable" ? { deploymentType: ENABLED_DEPLOYMENT_TYPE } : null;
|
|
55765
56213
|
}
|
|
55766
56214
|
if (passwordSelected) {
|
|
55767
|
-
patchBody.passwordProtection = action === "enable" ? {
|
|
56215
|
+
patchBody.passwordProtection = action === "enable" ? {
|
|
56216
|
+
deploymentType: ENABLED_DEPLOYMENT_TYPE,
|
|
56217
|
+
...protectionPassword ? { password: protectionPassword } : {}
|
|
56218
|
+
} : null;
|
|
55768
56219
|
}
|
|
55769
56220
|
if (customerSupportCodeVisibilitySelected) {
|
|
55770
56221
|
patchBody.customerSupportCodeVisibility = action === "enable";
|
|
@@ -62375,7 +62826,7 @@ async function main26(client) {
|
|
|
62375
62826
|
return 2;
|
|
62376
62827
|
}
|
|
62377
62828
|
telemetry2.trackCliSubcommandEdit(subcommandOriginal);
|
|
62378
|
-
return (await import("./chunks/edit-
|
|
62829
|
+
return (await import("./chunks/edit-HT3UTATZ.js")).default(client, args);
|
|
62379
62830
|
case "delete":
|
|
62380
62831
|
if (needHelp) {
|
|
62381
62832
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -62383,7 +62834,7 @@ async function main26(client) {
|
|
|
62383
62834
|
return 2;
|
|
62384
62835
|
}
|
|
62385
62836
|
telemetry2.trackCliSubcommandDelete(subcommandOriginal);
|
|
62386
|
-
return (await import("./chunks/delete-
|
|
62837
|
+
return (await import("./chunks/delete-NVMGVD5Z.js")).default(client, args);
|
|
62387
62838
|
case "enable":
|
|
62388
62839
|
if (needHelp) {
|
|
62389
62840
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -62391,7 +62842,7 @@ async function main26(client) {
|
|
|
62391
62842
|
return 2;
|
|
62392
62843
|
}
|
|
62393
62844
|
telemetry2.trackCliSubcommandEnable(subcommandOriginal);
|
|
62394
|
-
return (await import("./chunks/enable-
|
|
62845
|
+
return (await import("./chunks/enable-BQL6AOQV.js")).default(client, args);
|
|
62395
62846
|
case "disable":
|
|
62396
62847
|
if (needHelp) {
|
|
62397
62848
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -62399,7 +62850,7 @@ async function main26(client) {
|
|
|
62399
62850
|
return 2;
|
|
62400
62851
|
}
|
|
62401
62852
|
telemetry2.trackCliSubcommandDisable(subcommandOriginal);
|
|
62402
|
-
return (await import("./chunks/disable-
|
|
62853
|
+
return (await import("./chunks/disable-ERM2BWEQ.js")).default(client, args);
|
|
62403
62854
|
case "reorder":
|
|
62404
62855
|
if (needHelp) {
|
|
62405
62856
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -62407,7 +62858,7 @@ async function main26(client) {
|
|
|
62407
62858
|
return 2;
|
|
62408
62859
|
}
|
|
62409
62860
|
telemetry2.trackCliSubcommandReorder(subcommandOriginal);
|
|
62410
|
-
return (await import("./chunks/reorder-
|
|
62861
|
+
return (await import("./chunks/reorder-MRHFKPMK.js")).default(client, args);
|
|
62411
62862
|
case "export":
|
|
62412
62863
|
if (needHelp) {
|
|
62413
62864
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -62415,7 +62866,7 @@ async function main26(client) {
|
|
|
62415
62866
|
return 2;
|
|
62416
62867
|
}
|
|
62417
62868
|
telemetry2.trackCliSubcommandExport(subcommandOriginal);
|
|
62418
|
-
return (await import("./chunks/export-
|
|
62869
|
+
return (await import("./chunks/export-UOWQHOG3.js")).default(client, args);
|
|
62419
62870
|
case "publish":
|
|
62420
62871
|
if (needHelp) {
|
|
62421
62872
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -62423,7 +62874,7 @@ async function main26(client) {
|
|
|
62423
62874
|
return 2;
|
|
62424
62875
|
}
|
|
62425
62876
|
telemetry2.trackCliSubcommandPublish(subcommandOriginal);
|
|
62426
|
-
return (await import("./chunks/publish-
|
|
62877
|
+
return (await import("./chunks/publish-OOAGSEBM.js")).default(client, args);
|
|
62427
62878
|
case "restore":
|
|
62428
62879
|
if (needHelp) {
|
|
62429
62880
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -62431,7 +62882,7 @@ async function main26(client) {
|
|
|
62431
62882
|
return 2;
|
|
62432
62883
|
}
|
|
62433
62884
|
telemetry2.trackCliSubcommandRestore(subcommandOriginal);
|
|
62434
|
-
return (await import("./chunks/restore-
|
|
62885
|
+
return (await import("./chunks/restore-USR7SKWV.js")).default(client, args);
|
|
62435
62886
|
case "discard-staging":
|
|
62436
62887
|
if (needHelp) {
|
|
62437
62888
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -62439,7 +62890,7 @@ async function main26(client) {
|
|
|
62439
62890
|
return 2;
|
|
62440
62891
|
}
|
|
62441
62892
|
telemetry2.trackCliSubcommandDiscardStaging(subcommandOriginal);
|
|
62442
|
-
return (await import("./chunks/discard-
|
|
62893
|
+
return (await import("./chunks/discard-KM5OLEN4.js")).default(client, args);
|
|
62443
62894
|
default:
|
|
62444
62895
|
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG45));
|
|
62445
62896
|
output_manager_default.print(help(routesCommand, { columns: client.stderr.columns }));
|
|
@@ -64438,7 +64889,7 @@ async function members2(client, argv) {
|
|
|
64438
64889
|
}
|
|
64439
64890
|
const query = new URLSearchParams({ limit: String(limit ?? 20) });
|
|
64440
64891
|
if (next) {
|
|
64441
|
-
query.set("
|
|
64892
|
+
query.set("until", String(next));
|
|
64442
64893
|
}
|
|
64443
64894
|
const result = await client.fetch(
|
|
64444
64895
|
`/v2/teams/${teamId}/members?${query}`
|
|
@@ -66065,6 +66516,15 @@ var UpgradeTelemetryClient = class extends TelemetryClient {
|
|
|
66065
66516
|
}
|
|
66066
66517
|
};
|
|
66067
66518
|
|
|
66519
|
+
// src/util/native-binary.ts
|
|
66520
|
+
function setUseNativeBinary(client, enabled) {
|
|
66521
|
+
client.config = {
|
|
66522
|
+
...client.config,
|
|
66523
|
+
useNativeBinary: enabled
|
|
66524
|
+
};
|
|
66525
|
+
writeToConfigFile(client.config);
|
|
66526
|
+
}
|
|
66527
|
+
|
|
66068
66528
|
// src/commands/upgrade/index.ts
|
|
66069
66529
|
async function upgrade(client) {
|
|
66070
66530
|
let parsedArgs = null;
|
|
@@ -67152,34 +67612,34 @@ async function vcr(client) {
|
|
|
67152
67612
|
switch (subcommand) {
|
|
67153
67613
|
case "ls":
|
|
67154
67614
|
telemetry2.trackCliSubcommandLs(subcommandOriginal);
|
|
67155
|
-
return (await import("./chunks/ls-
|
|
67615
|
+
return (await import("./chunks/ls-ZZFLH7PK.js")).default(client, args, telemetry2);
|
|
67156
67616
|
case "inspect":
|
|
67157
67617
|
telemetry2.trackCliSubcommandInspect(subcommandOriginal);
|
|
67158
|
-
return (await import("./chunks/inspect-
|
|
67618
|
+
return (await import("./chunks/inspect-35FU5R62.js")).default(client, args, telemetry2);
|
|
67159
67619
|
case "add":
|
|
67160
67620
|
telemetry2.trackCliSubcommandAdd(subcommandOriginal);
|
|
67161
|
-
return (await import("./chunks/add-
|
|
67621
|
+
return (await import("./chunks/add-245XOFJO.js")).default(client, args, telemetry2);
|
|
67162
67622
|
case "rm":
|
|
67163
67623
|
telemetry2.trackCliSubcommandRm(subcommandOriginal);
|
|
67164
|
-
return (await import("./chunks/rm-
|
|
67624
|
+
return (await import("./chunks/rm-KUWPNZIS.js")).default(client, args, telemetry2);
|
|
67165
67625
|
case "login":
|
|
67166
67626
|
telemetry2.trackCliSubcommandLogin(subcommandOriginal);
|
|
67167
|
-
return (await import("./chunks/login-
|
|
67627
|
+
return (await import("./chunks/login-BQPJCJEZ.js")).default(client, args, telemetry2);
|
|
67168
67628
|
case "build":
|
|
67169
67629
|
telemetry2.trackCliSubcommandBuild(subcommandOriginal);
|
|
67170
|
-
return (await import("./chunks/build-
|
|
67630
|
+
return (await import("./chunks/build-M7NJYJPE.js")).default(client, telemetry2);
|
|
67171
67631
|
case "push":
|
|
67172
67632
|
telemetry2.trackCliSubcommandPush(subcommandOriginal);
|
|
67173
|
-
return (await import("./chunks/push-
|
|
67633
|
+
return (await import("./chunks/push-B6TZDXNF.js")).default(client, telemetry2);
|
|
67174
67634
|
case "tag":
|
|
67175
67635
|
telemetry2.trackCliSubcommandTag(subcommandOriginal);
|
|
67176
|
-
return (await import("./chunks/tags-
|
|
67636
|
+
return (await import("./chunks/tags-HNPC63QA.js")).default(client, args, telemetry2);
|
|
67177
67637
|
case "image":
|
|
67178
67638
|
telemetry2.trackCliSubcommandImage(subcommandOriginal);
|
|
67179
|
-
return (await import("./chunks/image-
|
|
67639
|
+
return (await import("./chunks/image-F5SC6Q7Y.js")).default(client, args, telemetry2);
|
|
67180
67640
|
case "permissions":
|
|
67181
67641
|
telemetry2.trackCliSubcommandPermissions(subcommandOriginal);
|
|
67182
|
-
return (await import("./chunks/permissions-
|
|
67642
|
+
return (await import("./chunks/permissions-72SZCBIY.js")).default(client, args, telemetry2);
|
|
67183
67643
|
default:
|
|
67184
67644
|
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG51));
|
|
67185
67645
|
output_manager_default.print(help(vcrCommand, { columns: client.stderr.columns }));
|