vercel 54.20.1 → 54.21.1
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-TF5VZLCY.js → add-NKDLTZ3B.js} +7 -7
- package/dist/chunks/{add-IB7HE5S5.js → add-UMB55BRR.js} +8 -8
- package/dist/chunks/{chunk-OGJB2GHI.js → chunk-22GUZ5KG.js} +1 -1
- package/dist/chunks/{chunk-IZOHLD5D.js → chunk-2QBF3ZL3.js} +54 -4
- package/dist/chunks/{chunk-JHQOIGTY.js → chunk-2ZXLLEEZ.js} +3 -3
- package/dist/chunks/{chunk-KXGWAWRV.js → chunk-3EMRC44D.js} +3 -3
- package/dist/chunks/{chunk-O2QNLUYX.js → chunk-43I5EAPY.js} +2 -2
- package/dist/chunks/{chunk-ULKM3ZD4.js → chunk-4RGSUV5C.js} +2 -2
- package/dist/chunks/{chunk-FNRZFHFO.js → chunk-4UZF3U4N.js} +1 -1
- package/dist/chunks/{chunk-UJ5UEAMC.js → chunk-5AJNUXWP.js} +1 -1
- package/dist/chunks/{chunk-RY3AVR6E.js → chunk-7C7MMT4J.js} +1 -1
- package/dist/chunks/{chunk-D2M77YVC.js → chunk-7S3QUMIG.js} +2 -2
- package/dist/chunks/{chunk-T63I6OUR.js → chunk-ADTCIFMD.js} +5 -5
- package/dist/chunks/{chunk-4BEUS7AL.js → chunk-AUYY7RD3.js} +127 -15
- package/dist/chunks/{chunk-YWLVPKNT.js → chunk-DKE73NGN.js} +2 -2
- package/dist/chunks/{chunk-EJ6GQI6F.js → chunk-EHTPDXTS.js} +1 -0
- package/dist/chunks/{chunk-ITU4COOO.js → chunk-GAJ2ESDD.js} +9 -44
- package/dist/chunks/{chunk-GDAO4PGA.js → chunk-H3KWN2KA.js} +3 -3
- package/dist/chunks/{chunk-P726GMBL.js → chunk-HMFUXSD7.js} +1 -1
- package/dist/chunks/{chunk-RB7WQKNC.js → chunk-I4NRKN2Z.js} +7 -4
- package/dist/chunks/{chunk-DFEUWDGM.js → chunk-IDMKFYEA.js} +1 -1
- package/dist/chunks/{chunk-JDO6BSKN.js → chunk-IMTOXXTF.js} +6 -6
- package/dist/chunks/{chunk-MAJWH2PD.js → chunk-JJWESW5Y.js} +1 -1
- package/dist/chunks/{chunk-FVI6UYNL.js → chunk-KNSDQCVQ.js} +1 -1
- package/dist/chunks/{chunk-Q4A2Q46Z.js → chunk-MLY3KGVY.js} +6 -6
- package/dist/chunks/{chunk-5MVXR7B7.js → chunk-MV65GD4L.js} +1 -1
- package/dist/chunks/{chunk-TV7GKFSY.js → chunk-OVE2GAHC.js} +3 -3
- package/dist/chunks/{chunk-VKBYAWTL.js → chunk-QEEGXNFK.js} +1 -1
- package/dist/chunks/{chunk-EFUR47FZ.js → chunk-QKR7GNAK.js} +1 -1
- package/dist/chunks/{chunk-6ISLGUMI.js → chunk-QMZO4CEP.js} +6 -6
- package/dist/chunks/{chunk-YSIZGIDP.js → chunk-QY63UKTP.js} +2 -2
- package/dist/chunks/{chunk-AUECDTMX.js → chunk-RLJA2KI7.js} +1 -1
- package/dist/chunks/{chunk-7PAKWBN4.js → chunk-RO5JIUOI.js} +2 -2
- package/dist/chunks/{chunk-U3FBUYRS.js → chunk-TLKTTWDA.js} +1 -1
- package/dist/chunks/{chunk-FZZWTDNQ.js → chunk-TRQJQXKD.js} +3 -3
- package/dist/chunks/{chunk-Q7GZMMHB.js → chunk-XCL7I6W5.js} +3 -3
- package/dist/chunks/{chunk-3S2QGKYZ.js → chunk-XMJAKLQQ.js} +1 -1
- package/dist/chunks/{compile-vercel-config-XEZ2TPQ4.js → compile-vercel-config-OKONVGZI.js} +3 -3
- package/dist/chunks/{delete-O3F4EP2W.js → delete-L7TN5GNZ.js} +5 -5
- package/dist/chunks/{disable-SJWGUQKZ.js → disable-7NVU4H2N.js} +5 -5
- package/dist/chunks/{discard-EQD6ENC3.js → discard-SJ2TDPS2.js} +5 -5
- package/dist/chunks/{edit-NAIWNSXE.js → edit-SW4MF4Q3.js} +6 -6
- package/dist/chunks/{enable-LXO62HU5.js → enable-FOKEO6J2.js} +5 -5
- package/dist/chunks/{export-EHVTYAAP.js → export-3DSHT2FD.js} +5 -5
- package/dist/chunks/{image-2DL7JEWW.js → image-T6I7BZSC.js} +4 -4
- package/dist/chunks/{inspect-EGXHWKY3.js → inspect-2MY25CMN.js} +6 -6
- package/dist/chunks/{inspect-PL3PE5IJ.js → inspect-DJ7OGHBK.js} +8 -8
- package/dist/chunks/{inspect-6IHZTLFA.js → inspect-EP24WN4I.js} +6 -6
- package/dist/chunks/{inspect-Z3QJOMNP.js → inspect-RV444SBC.js} +7 -7
- package/dist/chunks/{list-KNRPDNQF.js → list-CCG2NVLL.js} +8 -8
- package/dist/chunks/{list-BB4T4KT5.js → list-OMJ7EDKA.js} +5 -5
- package/dist/chunks/{ls-MUS72LBS.js → ls-33Z3R2KY.js} +7 -7
- package/dist/chunks/{ls-IQKMDRUB.js → ls-5KN5FKAQ.js} +9 -9
- package/dist/chunks/{ls-EP4Q6VF4.js → ls-VCTHIVI7.js} +7 -7
- package/dist/chunks/{ls-FTQGK4R6.js → ls-VXZGEJJD.js} +7 -7
- package/dist/chunks/{publish-27V2MMFS.js → publish-RZ2DIYRU.js} +5 -5
- package/dist/chunks/{query-C6FEOG5R.js → query-2MIBB7C5.js} +6 -6
- package/dist/chunks/{reorder-DCSIJX72.js → reorder-FEZIPHNW.js} +5 -5
- package/dist/chunks/{restore-NRUBGNSK.js → restore-JHH6CW2S.js} +5 -5
- package/dist/chunks/{rm-EZFCCZFT.js → rm-3KAXICHP.js} +6 -6
- package/dist/chunks/{rm-NMSG2WG6.js → rm-EKPVQYGH.js} +8 -8
- package/dist/chunks/{rm-GWW57H2V.js → rm-ULQHII4K.js} +7 -7
- package/dist/chunks/{rule-inspect-XPZJO3Y4.js → rule-inspect-FOZOCOUO.js} +7 -7
- package/dist/chunks/{rules-C6SB24UO.js → rules-RJD4S7JA.js} +7 -7
- package/dist/chunks/{schema-Z6L3EN6F.js → schema-CDXFJU72.js} +7 -7
- package/dist/chunks/{tags-5PFVWGLK.js → tags-BLBAPEWV.js} +3 -3
- package/dist/chunks/{types-EQD5UZOH.js → types-2TPA6J4G.js} +3 -3
- package/dist/chunks/{update-BCLMLJM7.js → update-2NW6NKG6.js} +7 -7
- package/dist/commands/build/index.js +3281 -211
- package/dist/commands/deploy/index.js +24 -24
- package/dist/commands/dev/index.js +13 -13
- package/dist/commands/env/index.js +19 -19
- package/dist/commands/link/index.js +21 -21
- package/dist/commands/list/index.js +14 -8
- package/dist/commands-bulk.js +788 -199
- package/dist/index.js +22 -22
- package/dist/version.mjs +1 -1
- package/package.json +18 -16
package/dist/commands-bulk.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
runInteractiveEditLoop,
|
|
32
32
|
stripQuotes,
|
|
33
33
|
validateActionFlags
|
|
34
|
-
} from "./chunks/chunk-
|
|
34
|
+
} from "./chunks/chunk-XMJAKLQQ.js";
|
|
35
35
|
import {
|
|
36
36
|
getRouteVersions
|
|
37
37
|
} from "./chunks/chunk-AHU7WNL2.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
parsePosition,
|
|
50
50
|
parseSubcommandArgs,
|
|
51
51
|
withGlobalFlags
|
|
52
|
-
} from "./chunks/chunk-
|
|
52
|
+
} from "./chunks/chunk-OVE2GAHC.js";
|
|
53
53
|
import {
|
|
54
54
|
normalizeRepeatableStringFilters,
|
|
55
55
|
parseTimeFlag
|
|
@@ -66,11 +66,11 @@ import {
|
|
|
66
66
|
resolveOpenApiTagForTeamsCli,
|
|
67
67
|
setAutoUpdate,
|
|
68
68
|
tryOpenApiFallback
|
|
69
|
-
} from "./chunks/chunk-
|
|
69
|
+
} from "./chunks/chunk-IMTOXXTF.js";
|
|
70
70
|
import {
|
|
71
71
|
getUpdateCommand,
|
|
72
72
|
isGlobal
|
|
73
|
-
} from "./chunks/chunk-
|
|
73
|
+
} from "./chunks/chunk-KNSDQCVQ.js";
|
|
74
74
|
import {
|
|
75
75
|
Now,
|
|
76
76
|
addDomain,
|
|
@@ -91,14 +91,14 @@ import {
|
|
|
91
91
|
require_format,
|
|
92
92
|
require_jsonlines,
|
|
93
93
|
setupDomain
|
|
94
|
-
} from "./chunks/chunk-
|
|
94
|
+
} from "./chunks/chunk-ADTCIFMD.js";
|
|
95
95
|
import {
|
|
96
96
|
getGlobalPathConfig,
|
|
97
97
|
persistAuthConfig,
|
|
98
98
|
readLocalConfig,
|
|
99
99
|
sleep,
|
|
100
100
|
writeToConfigFile
|
|
101
|
-
} from "./chunks/chunk-
|
|
101
|
+
} from "./chunks/chunk-TRQJQXKD.js";
|
|
102
102
|
import "./chunks/chunk-V5P25P7F.js";
|
|
103
103
|
import {
|
|
104
104
|
ellipsis,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
} from "./chunks/chunk-VGIMO3ZK.js";
|
|
113
113
|
import {
|
|
114
114
|
formatTable
|
|
115
|
-
} from "./chunks/chunk-
|
|
115
|
+
} from "./chunks/chunk-4RGSUV5C.js";
|
|
116
116
|
import "./chunks/chunk-XBN2O34P.js";
|
|
117
117
|
import {
|
|
118
118
|
isValidName
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
import {
|
|
129
129
|
formatEnvironment,
|
|
130
130
|
validateLsArgs
|
|
131
|
-
} from "./chunks/chunk-
|
|
131
|
+
} from "./chunks/chunk-TLKTTWDA.js";
|
|
132
132
|
import {
|
|
133
133
|
validateJsonOutput
|
|
134
134
|
} from "./chunks/chunk-XPKWKPWA.js";
|
|
@@ -398,6 +398,7 @@ import {
|
|
|
398
398
|
updateSubcommand2,
|
|
399
399
|
updateSubcommand3,
|
|
400
400
|
updateSubcommand4,
|
|
401
|
+
updateSubcommand5,
|
|
401
402
|
upgradeCommand,
|
|
402
403
|
uploadSubcommand,
|
|
403
404
|
usageCommand,
|
|
@@ -405,29 +406,29 @@ import {
|
|
|
405
406
|
webAnalyticsSubcommand,
|
|
406
407
|
webhooksCommand,
|
|
407
408
|
whoamiCommand
|
|
408
|
-
} from "./chunks/chunk-
|
|
409
|
+
} from "./chunks/chunk-AUYY7RD3.js";
|
|
409
410
|
import {
|
|
410
411
|
addSubcommand as addSubcommand12,
|
|
411
412
|
inspectSubcommand as inspectSubcommand7,
|
|
412
413
|
listSubcommand as listSubcommand19,
|
|
413
414
|
removeSubcommand as removeSubcommand15,
|
|
414
415
|
vcrCommand
|
|
415
|
-
} from "./chunks/chunk-
|
|
416
|
+
} from "./chunks/chunk-3EMRC44D.js";
|
|
416
417
|
import {
|
|
417
418
|
tagsAggregateCommand,
|
|
418
419
|
tagsInspectSubcommand,
|
|
419
420
|
tagsLsSubcommand
|
|
420
|
-
} from "./chunks/chunk-
|
|
421
|
+
} from "./chunks/chunk-7C7MMT4J.js";
|
|
421
422
|
import {
|
|
422
423
|
imageAggregateCommand,
|
|
423
424
|
imageInspectSubcommand,
|
|
424
425
|
imageLsSubcommand,
|
|
425
426
|
imageRmSubcommand
|
|
426
|
-
} from "./chunks/chunk-
|
|
427
|
+
} from "./chunks/chunk-RLJA2KI7.js";
|
|
427
428
|
import {
|
|
428
429
|
metricsCommand,
|
|
429
430
|
schemaSubcommand
|
|
430
|
-
} from "./chunks/chunk-
|
|
431
|
+
} from "./chunks/chunk-JJWESW5Y.js";
|
|
431
432
|
import {
|
|
432
433
|
addSubcommand as addSubcommand9,
|
|
433
434
|
deleteSubcommand,
|
|
@@ -443,16 +444,16 @@ import {
|
|
|
443
444
|
reorderSubcommand,
|
|
444
445
|
restoreSubcommand as restoreSubcommand2,
|
|
445
446
|
routesCommand
|
|
446
|
-
} from "./chunks/chunk-
|
|
447
|
+
} from "./chunks/chunk-QKR7GNAK.js";
|
|
447
448
|
import {
|
|
448
449
|
activityCommand,
|
|
449
450
|
typesSubcommand
|
|
450
|
-
} from "./chunks/chunk-
|
|
451
|
+
} from "./chunks/chunk-5AJNUXWP.js";
|
|
451
452
|
import {
|
|
452
453
|
alertsCommand,
|
|
453
454
|
inspectSubcommand as inspectSubcommand2,
|
|
454
455
|
listSubcommand as listSubcommand2
|
|
455
|
-
} from "./chunks/chunk-
|
|
456
|
+
} from "./chunks/chunk-7S3QUMIG.js";
|
|
456
457
|
import {
|
|
457
458
|
rulesAddSubcommand as rulesAddSubcommand2,
|
|
458
459
|
rulesAggregateCommand,
|
|
@@ -460,14 +461,14 @@ import {
|
|
|
460
461
|
rulesLsSubcommand,
|
|
461
462
|
rulesRmSubcommand,
|
|
462
463
|
rulesUpdateSubcommand
|
|
463
|
-
} from "./chunks/chunk-
|
|
464
|
-
import "./chunks/chunk-
|
|
465
|
-
import "./chunks/chunk-
|
|
464
|
+
} from "./chunks/chunk-22GUZ5KG.js";
|
|
465
|
+
import "./chunks/chunk-IDMKFYEA.js";
|
|
466
|
+
import "./chunks/chunk-4UZF3U4N.js";
|
|
466
467
|
import {
|
|
467
468
|
main
|
|
468
|
-
} from "./chunks/chunk-
|
|
469
|
+
} from "./chunks/chunk-MLY3KGVY.js";
|
|
469
470
|
import "./chunks/chunk-IB5L4LKZ.js";
|
|
470
|
-
import "./chunks/chunk-
|
|
471
|
+
import "./chunks/chunk-MV65GD4L.js";
|
|
471
472
|
import {
|
|
472
473
|
require_execa
|
|
473
474
|
} from "./chunks/chunk-24FCBXI4.js";
|
|
@@ -482,25 +483,27 @@ import {
|
|
|
482
483
|
} from "./chunks/chunk-VXYGCOKL.js";
|
|
483
484
|
import {
|
|
484
485
|
ensureLink
|
|
485
|
-
} from "./chunks/chunk-
|
|
486
|
-
import
|
|
486
|
+
} from "./chunks/chunk-XCL7I6W5.js";
|
|
487
|
+
import {
|
|
488
|
+
printProjectNotFoundError
|
|
489
|
+
} from "./chunks/chunk-QMZO4CEP.js";
|
|
487
490
|
import {
|
|
488
491
|
AGENT_ACTION,
|
|
489
492
|
AGENT_REASON,
|
|
490
493
|
AGENT_STATUS
|
|
491
494
|
} from "./chunks/chunk-QH7WYDEP.js";
|
|
492
|
-
import "./chunks/chunk-
|
|
493
|
-
import "./chunks/chunk-
|
|
495
|
+
import "./chunks/chunk-DKE73NGN.js";
|
|
496
|
+
import "./chunks/chunk-43I5EAPY.js";
|
|
494
497
|
import {
|
|
495
498
|
detectExplicitScope,
|
|
496
499
|
getScope
|
|
497
|
-
} from "./chunks/chunk-
|
|
500
|
+
} from "./chunks/chunk-HMFUXSD7.js";
|
|
498
501
|
import {
|
|
499
502
|
help
|
|
500
|
-
} from "./chunks/chunk-
|
|
503
|
+
} from "./chunks/chunk-QY63UKTP.js";
|
|
501
504
|
import {
|
|
502
505
|
table
|
|
503
|
-
} from "./chunks/chunk-
|
|
506
|
+
} from "./chunks/chunk-QEEGXNFK.js";
|
|
504
507
|
import {
|
|
505
508
|
STANDARD_ENVIRONMENTS,
|
|
506
509
|
VERCEL_CONFIG_EXTENSIONS,
|
|
@@ -546,7 +549,7 @@ import {
|
|
|
546
549
|
selectAndParseRemoteUrl,
|
|
547
550
|
selectOrg,
|
|
548
551
|
ua_default
|
|
549
|
-
} from "./chunks/chunk-
|
|
552
|
+
} from "./chunks/chunk-I4NRKN2Z.js";
|
|
550
553
|
import {
|
|
551
554
|
argvHasNonInteractive,
|
|
552
555
|
buildCommandWithGlobalFlags,
|
|
@@ -554,12 +557,13 @@ import {
|
|
|
554
557
|
buildIntegrationCommandTailFromArgv,
|
|
555
558
|
exitWithNonInteractiveError,
|
|
556
559
|
getGlobalFlagsFromArgv,
|
|
560
|
+
omitGlobalFlagsFromArgs,
|
|
557
561
|
openUrlInBrowserCommand,
|
|
558
562
|
outputActionRequired,
|
|
559
563
|
outputAgentError,
|
|
560
564
|
outputAgentSuccess,
|
|
561
565
|
shouldEmitNonInteractiveCommandError
|
|
562
|
-
} from "./chunks/chunk-
|
|
566
|
+
} from "./chunks/chunk-2QBF3ZL3.js";
|
|
563
567
|
import {
|
|
564
568
|
TelemetryClient
|
|
565
569
|
} from "./chunks/chunk-ECCWJHC6.js";
|
|
@@ -573,7 +577,7 @@ import {
|
|
|
573
577
|
parseArguments,
|
|
574
578
|
printError,
|
|
575
579
|
require_strip_ansi
|
|
576
|
-
} from "./chunks/chunk-
|
|
580
|
+
} from "./chunks/chunk-EHTPDXTS.js";
|
|
577
581
|
import {
|
|
578
582
|
APIError,
|
|
579
583
|
AliasInUse,
|
|
@@ -2027,7 +2031,7 @@ async function activity(client) {
|
|
|
2027
2031
|
return 0;
|
|
2028
2032
|
}
|
|
2029
2033
|
telemetry2.trackCliSubcommandTypes(subcommandOriginal);
|
|
2030
|
-
const typesFn = (await import("./chunks/types-
|
|
2034
|
+
const typesFn = (await import("./chunks/types-2TPA6J4G.js")).default;
|
|
2031
2035
|
return typesFn(client, telemetry2);
|
|
2032
2036
|
}
|
|
2033
2037
|
default: {
|
|
@@ -2037,7 +2041,7 @@ async function activity(client) {
|
|
|
2037
2041
|
return 0;
|
|
2038
2042
|
}
|
|
2039
2043
|
telemetry2.trackCliSubcommandLs(subcommandOriginal);
|
|
2040
|
-
const listFn = (await import("./chunks/list-
|
|
2044
|
+
const listFn = (await import("./chunks/list-OMJ7EDKA.js")).default;
|
|
2041
2045
|
return listFn(client, telemetry2);
|
|
2042
2046
|
}
|
|
2043
2047
|
}
|
|
@@ -3140,17 +3144,17 @@ async function alerts(client) {
|
|
|
3140
3144
|
switch (subcommand) {
|
|
3141
3145
|
case "inspect": {
|
|
3142
3146
|
telemetry2.trackCliSubcommandInspect(subcommandOriginal);
|
|
3143
|
-
const inspectFn = (await import("./chunks/inspect-
|
|
3147
|
+
const inspectFn = (await import("./chunks/inspect-RV444SBC.js")).default;
|
|
3144
3148
|
return inspectFn(client, args);
|
|
3145
3149
|
}
|
|
3146
3150
|
case "rules": {
|
|
3147
3151
|
telemetry2.trackCliSubcommandRules(args[0] ?? "ls");
|
|
3148
|
-
const rulesFn = (await import("./chunks/rules-
|
|
3152
|
+
const rulesFn = (await import("./chunks/rules-RJD4S7JA.js")).default;
|
|
3149
3153
|
return rulesFn(client, args);
|
|
3150
3154
|
}
|
|
3151
3155
|
default: {
|
|
3152
3156
|
telemetry2.trackCliSubcommandLs(subcommandOriginal);
|
|
3153
|
-
const listFn = (await import("./chunks/list-
|
|
3157
|
+
const listFn = (await import("./chunks/list-CCG2NVLL.js")).default;
|
|
3154
3158
|
return listFn(client, telemetry2);
|
|
3155
3159
|
}
|
|
3156
3160
|
}
|
|
@@ -7732,6 +7736,36 @@ async function main4(client) {
|
|
|
7732
7736
|
}
|
|
7733
7737
|
}
|
|
7734
7738
|
|
|
7739
|
+
// src/util/projects/get-linked-project-or-fail.ts
|
|
7740
|
+
function getInvokingCommandFromArgv(argv) {
|
|
7741
|
+
const args = omitGlobalFlagsFromArgs(argv.slice(2));
|
|
7742
|
+
const positionals = [];
|
|
7743
|
+
for (const arg of args) {
|
|
7744
|
+
if (arg.startsWith("-")) {
|
|
7745
|
+
break;
|
|
7746
|
+
}
|
|
7747
|
+
positionals.push(arg);
|
|
7748
|
+
}
|
|
7749
|
+
return positionals.join(" ");
|
|
7750
|
+
}
|
|
7751
|
+
async function getLinkedProjectOrFail(client, projectName) {
|
|
7752
|
+
const link = await getLinkedProject(
|
|
7753
|
+
client,
|
|
7754
|
+
client.cwd,
|
|
7755
|
+
projectName,
|
|
7756
|
+
Boolean(projectName)
|
|
7757
|
+
);
|
|
7758
|
+
if (link.status === "not_linked" && projectName) {
|
|
7759
|
+
await printProjectNotFoundError(
|
|
7760
|
+
client,
|
|
7761
|
+
projectName,
|
|
7762
|
+
getInvokingCommandFromArgv(client.argv)
|
|
7763
|
+
);
|
|
7764
|
+
return { status: "error", exitCode: 1 };
|
|
7765
|
+
}
|
|
7766
|
+
return link;
|
|
7767
|
+
}
|
|
7768
|
+
|
|
7735
7769
|
// src/util/telemetry/commands/cache/purge.ts
|
|
7736
7770
|
var CachePurgeTelemetryClient = class extends TelemetryClient {
|
|
7737
7771
|
trackCliFlagYes(yes) {
|
|
@@ -7764,7 +7798,9 @@ async function purge(client, argv) {
|
|
|
7764
7798
|
printError(err);
|
|
7765
7799
|
return 1;
|
|
7766
7800
|
}
|
|
7767
|
-
const
|
|
7801
|
+
const projectName = parsedArgs.flags["--project"];
|
|
7802
|
+
telemetry2.trackCliOptionProject(projectName);
|
|
7803
|
+
const link = await getLinkedProjectOrFail(client, projectName);
|
|
7768
7804
|
if (link.status === "not_linked") {
|
|
7769
7805
|
output_manager_default.error(
|
|
7770
7806
|
"No project linked. Run `vercel link` to link a project to this directory."
|
|
@@ -7797,8 +7833,9 @@ async function purge(client, argv) {
|
|
|
7797
7833
|
const query = new URLSearchParams({ projectIdOrName: project.id }).toString();
|
|
7798
7834
|
if (!yes) {
|
|
7799
7835
|
if (!process.stdin.isTTY) {
|
|
7836
|
+
const projectFlag = projectName ? ` --project ${projectName}` : "";
|
|
7800
7837
|
output_manager_default.print(
|
|
7801
|
-
`${msg}. To continue, run ${getCommandName(
|
|
7838
|
+
`${msg}. To continue, run ${getCommandName(`cache purge${projectFlag} --yes`)}.`
|
|
7802
7839
|
);
|
|
7803
7840
|
return 1;
|
|
7804
7841
|
}
|
|
@@ -7881,7 +7918,9 @@ async function invalidate(client, argv) {
|
|
|
7881
7918
|
printError(err);
|
|
7882
7919
|
return 1;
|
|
7883
7920
|
}
|
|
7884
|
-
const
|
|
7921
|
+
const projectName = parsedArgs.flags["--project"];
|
|
7922
|
+
telemetry2.trackCliOptionProject(projectName);
|
|
7923
|
+
const link = await getLinkedProjectOrFail(client, projectName);
|
|
7885
7924
|
if (link.status === "not_linked") {
|
|
7886
7925
|
output_manager_default.error(
|
|
7887
7926
|
"No project linked. Run `vercel link` to link a project to this directory."
|
|
@@ -7927,8 +7966,9 @@ async function invalidate(client, argv) {
|
|
|
7927
7966
|
const msg = `You are about to invalidate all cached content associated with ${itemName} ${itemValue} for project ${project.name}`;
|
|
7928
7967
|
if (!yes) {
|
|
7929
7968
|
if (!process.stdin.isTTY) {
|
|
7969
|
+
const projectFlag = projectName ? ` --project ${projectName}` : "";
|
|
7930
7970
|
output_manager_default.print(
|
|
7931
|
-
`${msg}. To continue, run ${getCommandName(`cache invalidate ${flag} ${itemValue} --yes`)}.`
|
|
7971
|
+
`${msg}. To continue, run ${getCommandName(`cache invalidate ${flag} ${itemValue}${projectFlag} --yes`)}.`
|
|
7932
7972
|
);
|
|
7933
7973
|
return 1;
|
|
7934
7974
|
}
|
|
@@ -8005,7 +8045,9 @@ async function dangerouslyDelete(client, argv) {
|
|
|
8005
8045
|
printError(err);
|
|
8006
8046
|
return 1;
|
|
8007
8047
|
}
|
|
8008
|
-
const
|
|
8048
|
+
const projectName = parsedArgs.flags["--project"];
|
|
8049
|
+
telemetry2.trackCliOptionProject(projectName);
|
|
8050
|
+
const link = await getLinkedProjectOrFail(client, projectName);
|
|
8009
8051
|
if (link.status === "not_linked") {
|
|
8010
8052
|
output_manager_default.error(
|
|
8011
8053
|
"No project linked. Run `vercel link` to link a project to this directory."
|
|
@@ -8053,9 +8095,10 @@ async function dangerouslyDelete(client, argv) {
|
|
|
8053
8095
|
const msg = `You are about to dangerously delete all cached content associated with ${itemName} ${itemValue} for project ${project.name}`;
|
|
8054
8096
|
if (!yes) {
|
|
8055
8097
|
if (!process.stdin.isTTY) {
|
|
8098
|
+
const projectFlag = projectName ? ` --project ${projectName}` : "";
|
|
8056
8099
|
const optional = typeof revalidate !== "undefined" ? ` --revalidation-deadline-seconds ${revalidate}` : "";
|
|
8057
8100
|
output_manager_default.print(
|
|
8058
|
-
`${msg}. To continue, run ${getCommandName(`cache dangerously-delete ${flag} ${itemValue}${optional} --yes`)}.`
|
|
8101
|
+
`${msg}. To continue, run ${getCommandName(`cache dangerously-delete ${flag} ${itemValue}${projectFlag}${optional} --yes`)}.`
|
|
8059
8102
|
);
|
|
8060
8103
|
return 1;
|
|
8061
8104
|
}
|
|
@@ -11921,18 +11964,20 @@ async function ls3(client, argv) {
|
|
|
11921
11964
|
return validationResult;
|
|
11922
11965
|
}
|
|
11923
11966
|
telemetry2.trackCliOptionFormat(opts["--format"]);
|
|
11967
|
+
const projectName = opts["--project"];
|
|
11968
|
+
telemetry2.trackCliOptionProject(projectName);
|
|
11924
11969
|
const formatResult = validateJsonOutput(opts);
|
|
11925
11970
|
if (!formatResult.valid) {
|
|
11926
11971
|
output_manager_default.error(formatResult.error);
|
|
11927
11972
|
return 1;
|
|
11928
11973
|
}
|
|
11929
11974
|
const asJson = formatResult.jsonOutput;
|
|
11930
|
-
const link = await
|
|
11975
|
+
const link = await getLinkedProjectOrFail(client, projectName);
|
|
11931
11976
|
if (link.status === "error") {
|
|
11932
11977
|
return link.exitCode;
|
|
11933
11978
|
} else if (link.status === "not_linked") {
|
|
11934
11979
|
output_manager_default.error(
|
|
11935
|
-
`Your codebase isn't linked to a project on Vercel. ${client.nonInteractive ? `
|
|
11980
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or ${client.nonInteractive ? `run ${getCommandName("link --yes --team <team-id> --project <project-id>")} to link non-interactively.` : `run ${getCommandName("link")} to begin.`}`
|
|
11936
11981
|
);
|
|
11937
11982
|
return 1;
|
|
11938
11983
|
}
|
|
@@ -12070,15 +12115,17 @@ async function run(client, argv) {
|
|
|
12070
12115
|
printError(error);
|
|
12071
12116
|
return 1;
|
|
12072
12117
|
}
|
|
12073
|
-
const { args } = parsedArgs;
|
|
12118
|
+
const { args, flags: opts } = parsedArgs;
|
|
12074
12119
|
let [cronPath] = args;
|
|
12120
|
+
const projectName = opts["--project"];
|
|
12121
|
+
telemetry2.trackCliOptionProject(projectName);
|
|
12075
12122
|
telemetry2.trackCliArgumentPath(cronPath);
|
|
12076
|
-
const link = await
|
|
12123
|
+
const link = await getLinkedProjectOrFail(client, projectName);
|
|
12077
12124
|
if (link.status === "error") {
|
|
12078
12125
|
return link.exitCode;
|
|
12079
12126
|
} else if (link.status === "not_linked") {
|
|
12080
12127
|
output_manager_default.error(
|
|
12081
|
-
`Your codebase isn't linked to a project on Vercel. ${client.nonInteractive ? `
|
|
12128
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or ${client.nonInteractive ? `run ${getCommandName("link --yes --team <team-id> --project <project-id>")} to link non-interactively.` : `run ${getCommandName("link")} to begin.`}`
|
|
12082
12129
|
);
|
|
12083
12130
|
return 1;
|
|
12084
12131
|
}
|
|
@@ -16022,17 +16069,54 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
|
16022
16069
|
}
|
|
16023
16070
|
|
|
16024
16071
|
// src/util/projects/find-projects-for-domain.ts
|
|
16072
|
+
var PROJECT_FETCH_BATCH_SIZE = 10;
|
|
16073
|
+
async function getDomainAssignmentsByProject(client, domainName) {
|
|
16074
|
+
const domainsByProjectId = /* @__PURE__ */ new Map();
|
|
16075
|
+
for await (const chunk of client.fetchPaginated(`/v1/domains/${encodeURIComponent(domainName)}/project-domains`)) {
|
|
16076
|
+
for (const projectDomain of chunk.projectDomains) {
|
|
16077
|
+
const domains2 = domainsByProjectId.get(projectDomain.projectId) ?? [];
|
|
16078
|
+
domains2.push(projectDomain.name);
|
|
16079
|
+
domainsByProjectId.set(projectDomain.projectId, domains2);
|
|
16080
|
+
}
|
|
16081
|
+
}
|
|
16082
|
+
return domainsByProjectId;
|
|
16083
|
+
}
|
|
16084
|
+
async function countProjectsForDomain(client, domainName) {
|
|
16085
|
+
try {
|
|
16086
|
+
const assignments = await getDomainAssignmentsByProject(client, domainName);
|
|
16087
|
+
return assignments.size;
|
|
16088
|
+
} catch (err) {
|
|
16089
|
+
if (isAPIError(err) && err.status < 500) {
|
|
16090
|
+
return err;
|
|
16091
|
+
}
|
|
16092
|
+
throw err;
|
|
16093
|
+
}
|
|
16094
|
+
}
|
|
16025
16095
|
async function findProjectsForDomain(client, domainName) {
|
|
16026
16096
|
try {
|
|
16097
|
+
const assignments = Array.from(
|
|
16098
|
+
await getDomainAssignmentsByProject(client, domainName)
|
|
16099
|
+
);
|
|
16027
16100
|
const result = [];
|
|
16028
|
-
for
|
|
16029
|
-
|
|
16030
|
-
|
|
16031
|
-
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
|
|
16101
|
+
for (let i = 0; i < assignments.length; i += PROJECT_FETCH_BATCH_SIZE) {
|
|
16102
|
+
const batch = await Promise.all(
|
|
16103
|
+
assignments.slice(i, i + PROJECT_FETCH_BATCH_SIZE).map(async ([projectId, domains2]) => {
|
|
16104
|
+
try {
|
|
16105
|
+
const project = await client.fetch(
|
|
16106
|
+
`/v9/projects/${encodeURIComponent(projectId)}`
|
|
16107
|
+
);
|
|
16108
|
+
return { project, domains: domains2 };
|
|
16109
|
+
} catch (err) {
|
|
16110
|
+
if (isAPIError(err) && err.status < 500) {
|
|
16111
|
+
return null;
|
|
16112
|
+
}
|
|
16113
|
+
throw err;
|
|
16114
|
+
}
|
|
16115
|
+
})
|
|
16116
|
+
);
|
|
16117
|
+
for (const entry of batch) {
|
|
16118
|
+
if (entry) {
|
|
16119
|
+
result.push(entry);
|
|
16036
16120
|
}
|
|
16037
16121
|
}
|
|
16038
16122
|
}
|
|
@@ -16162,13 +16246,9 @@ async function inspect2(client, argv) {
|
|
|
16162
16246
|
["l", "l"],
|
|
16163
16247
|
[
|
|
16164
16248
|
{
|
|
16165
|
-
rows: projects2.map((project) => {
|
|
16166
|
-
const name = project.name;
|
|
16167
|
-
const domains2 = (project.targets?.production?.alias || []).filter(
|
|
16168
|
-
(alias2) => alias2.endsWith(domainName)
|
|
16169
|
-
);
|
|
16249
|
+
rows: projects2.map(({ project, domains: domains2 }) => {
|
|
16170
16250
|
const cols = domains2.length ? domains2.join(", ") : "-";
|
|
16171
|
-
return [name, cols];
|
|
16251
|
+
return [project.name, cols];
|
|
16172
16252
|
})
|
|
16173
16253
|
}
|
|
16174
16254
|
]
|
|
@@ -16200,7 +16280,7 @@ async function inspect2(client, argv) {
|
|
|
16200
16280
|
);
|
|
16201
16281
|
const contextNameConst = contextName;
|
|
16202
16282
|
const projectNames = Array.from(
|
|
16203
|
-
new Set(projects2.map((project) => project.name))
|
|
16283
|
+
new Set(projects2.map(({ project }) => project.name))
|
|
16204
16284
|
);
|
|
16205
16285
|
if (projectNames.length) {
|
|
16206
16286
|
projectNames.forEach((name, index) => {
|
|
@@ -16520,14 +16600,10 @@ async function rm6(client, argv) {
|
|
|
16520
16600
|
output_manager_default.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
|
16521
16601
|
return 1;
|
|
16522
16602
|
}
|
|
16523
|
-
const
|
|
16524
|
-
if (
|
|
16603
|
+
const projectCount = await countProjectsForDomain(client, domain2.name);
|
|
16604
|
+
if (typeof projectCount === "number" && projectCount > 0) {
|
|
16525
16605
|
output_manager_default.warn(
|
|
16526
|
-
`The domain is currently used by ${(0, import_pluralize6.default)(
|
|
16527
|
-
"project",
|
|
16528
|
-
projects2.length,
|
|
16529
|
-
true
|
|
16530
|
-
)}.`
|
|
16606
|
+
`The domain is currently used by ${(0, import_pluralize6.default)("project", projectCount, true)}.`
|
|
16531
16607
|
);
|
|
16532
16608
|
}
|
|
16533
16609
|
const skipConfirmation = opts["--yes"] || false;
|
|
@@ -18938,7 +19014,7 @@ async function main9(client) {
|
|
|
18938
19014
|
default:
|
|
18939
19015
|
if (needHelp) {
|
|
18940
19016
|
telemetry2.trackCliFlagHelp("domains", subcommandOriginal);
|
|
18941
|
-
return printHelp(
|
|
19017
|
+
return printHelp(listSubcommand9);
|
|
18942
19018
|
}
|
|
18943
19019
|
telemetry2.trackCliSubcommandList(subcommandOriginal);
|
|
18944
19020
|
return ls6(client, args);
|
|
@@ -27389,6 +27465,14 @@ var FlagsLsTelemetryClient = class extends TelemetryClient {
|
|
|
27389
27465
|
}
|
|
27390
27466
|
};
|
|
27391
27467
|
|
|
27468
|
+
// src/commands/flags/project.ts
|
|
27469
|
+
function getProjectNameFromFlags(flags) {
|
|
27470
|
+
return flags["--project"];
|
|
27471
|
+
}
|
|
27472
|
+
function getLinkedFlagsProject(client, projectName) {
|
|
27473
|
+
return getLinkedProjectOrFail(client, projectName);
|
|
27474
|
+
}
|
|
27475
|
+
|
|
27392
27476
|
// src/commands/flags/ls.ts
|
|
27393
27477
|
async function ls7(client, argv) {
|
|
27394
27478
|
const telemetryClient = new FlagsLsTelemetryClient({
|
|
@@ -27412,6 +27496,8 @@ async function ls7(client, argv) {
|
|
|
27412
27496
|
const limit = flags["--limit"];
|
|
27413
27497
|
const next = flags["--next"];
|
|
27414
27498
|
const json = flags["--json"];
|
|
27499
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
27500
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
27415
27501
|
telemetryClient.trackCliOptionState(state);
|
|
27416
27502
|
telemetryClient.trackCliOptionTag(tags);
|
|
27417
27503
|
telemetryClient.trackCliOptionCreatedBy(createdBy);
|
|
@@ -27425,12 +27511,12 @@ async function ls7(client, argv) {
|
|
|
27425
27511
|
);
|
|
27426
27512
|
return 1;
|
|
27427
27513
|
}
|
|
27428
|
-
const link = await
|
|
27514
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
27429
27515
|
if (link.status === "error") {
|
|
27430
27516
|
return link.exitCode;
|
|
27431
27517
|
} else if (link.status === "not_linked") {
|
|
27432
27518
|
output_manager_default.error(
|
|
27433
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
27519
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
27434
27520
|
);
|
|
27435
27521
|
return 1;
|
|
27436
27522
|
}
|
|
@@ -27985,8 +28071,9 @@ async function inspect4(client, argv) {
|
|
|
27985
28071
|
printError(err);
|
|
27986
28072
|
return 1;
|
|
27987
28073
|
}
|
|
27988
|
-
const { args } = parsedArgs;
|
|
28074
|
+
const { args, flags } = parsedArgs;
|
|
27989
28075
|
const [flagArg] = args;
|
|
28076
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
27990
28077
|
if (!flagArg) {
|
|
27991
28078
|
output_manager_default.error(
|
|
27992
28079
|
`Missing required argument: flag. Usage: ${getCommandName("flags inspect <flag>")}`
|
|
@@ -27994,12 +28081,13 @@ async function inspect4(client, argv) {
|
|
|
27994
28081
|
return 1;
|
|
27995
28082
|
}
|
|
27996
28083
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
27997
|
-
|
|
28084
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
28085
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
27998
28086
|
if (link.status === "error") {
|
|
27999
28087
|
return link.exitCode;
|
|
28000
28088
|
} else if (link.status === "not_linked") {
|
|
28001
28089
|
output_manager_default.error(
|
|
28002
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
28090
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
28003
28091
|
);
|
|
28004
28092
|
return 1;
|
|
28005
28093
|
}
|
|
@@ -28126,7 +28214,9 @@ async function create4(client, argv) {
|
|
|
28126
28214
|
const kind = flags["--kind"] || "boolean";
|
|
28127
28215
|
const description = flags["--description"];
|
|
28128
28216
|
const variantInputs = flags["--variant"] || [];
|
|
28217
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
28129
28218
|
telemetryClient.trackCliArgumentSlug(slug);
|
|
28219
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
28130
28220
|
telemetryClient.trackCliOptionKind(kind);
|
|
28131
28221
|
telemetryClient.trackCliOptionDescription(description);
|
|
28132
28222
|
if (kind !== "boolean" && kind !== "string" && kind !== "number" && kind !== "json") {
|
|
@@ -28135,12 +28225,12 @@ async function create4(client, argv) {
|
|
|
28135
28225
|
);
|
|
28136
28226
|
return 1;
|
|
28137
28227
|
}
|
|
28138
|
-
const link = await
|
|
28228
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
28139
28229
|
if (link.status === "error") {
|
|
28140
28230
|
return link.exitCode;
|
|
28141
28231
|
} else if (link.status === "not_linked") {
|
|
28142
28232
|
output_manager_default.error(
|
|
28143
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
28233
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
28144
28234
|
);
|
|
28145
28235
|
return 1;
|
|
28146
28236
|
}
|
|
@@ -28400,8 +28490,9 @@ async function openFlag(client, argv) {
|
|
|
28400
28490
|
printError(err);
|
|
28401
28491
|
return 1;
|
|
28402
28492
|
}
|
|
28403
|
-
const { args } = parsedArgs;
|
|
28493
|
+
const { args, flags } = parsedArgs;
|
|
28404
28494
|
const [flagArg, extraArg] = args;
|
|
28495
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
28405
28496
|
if (extraArg) {
|
|
28406
28497
|
output_manager_default.error(
|
|
28407
28498
|
`Too many arguments. Usage: ${getCommandName("flags open [flag]")}`
|
|
@@ -28409,12 +28500,13 @@ async function openFlag(client, argv) {
|
|
|
28409
28500
|
return 1;
|
|
28410
28501
|
}
|
|
28411
28502
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
28412
|
-
|
|
28503
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
28504
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
28413
28505
|
if (link.status === "error") {
|
|
28414
28506
|
return link.exitCode;
|
|
28415
28507
|
} else if (link.status === "not_linked") {
|
|
28416
28508
|
output_manager_default.error(
|
|
28417
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
28509
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
28418
28510
|
);
|
|
28419
28511
|
return 1;
|
|
28420
28512
|
}
|
|
@@ -28555,6 +28647,7 @@ async function update2(client, argv) {
|
|
|
28555
28647
|
const message = normalizeOptionalInput(
|
|
28556
28648
|
flags["--message"]
|
|
28557
28649
|
);
|
|
28650
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
28558
28651
|
if (!flagArg) {
|
|
28559
28652
|
output_manager_default.error("Please provide a flag slug or ID to update");
|
|
28560
28653
|
output_manager_default.log(
|
|
@@ -28563,16 +28656,17 @@ async function update2(client, argv) {
|
|
|
28563
28656
|
return 1;
|
|
28564
28657
|
}
|
|
28565
28658
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
28659
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
28566
28660
|
telemetryClient.trackCliOptionVariant(variantSelector);
|
|
28567
28661
|
telemetryClient.trackCliOptionValue(valueInput);
|
|
28568
28662
|
telemetryClient.trackCliOptionLabel(label);
|
|
28569
28663
|
telemetryClient.trackCliOptionMessage(message);
|
|
28570
|
-
const link = await
|
|
28664
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
28571
28665
|
if (link.status === "error") {
|
|
28572
28666
|
return link.exitCode;
|
|
28573
28667
|
} else if (link.status === "not_linked") {
|
|
28574
28668
|
output_manager_default.error(
|
|
28575
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
28669
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
28576
28670
|
);
|
|
28577
28671
|
return 1;
|
|
28578
28672
|
}
|
|
@@ -28715,13 +28809,13 @@ async function promptForVariantLabelUpdate(client, selectedVariant) {
|
|
|
28715
28809
|
function applyVariantUpdates(flag, updates) {
|
|
28716
28810
|
const variants = flag.variants.map((variant) => ({ ...variant }));
|
|
28717
28811
|
const changedVariantIds = /* @__PURE__ */ new Set();
|
|
28718
|
-
for (const
|
|
28719
|
-
const result = resolveVariant(
|
|
28812
|
+
for (const update5 of updates) {
|
|
28813
|
+
const result = resolveVariant(update5.selector, variants);
|
|
28720
28814
|
if (result.error || !result.variant) {
|
|
28721
|
-
throw new Error(result.error || `Variant "${
|
|
28815
|
+
throw new Error(result.error || `Variant "${update5.selector}" not found`);
|
|
28722
28816
|
}
|
|
28723
|
-
const nextValue =
|
|
28724
|
-
const nextLabel =
|
|
28817
|
+
const nextValue = update5.valueInput !== void 0 ? parseUpdatedVariantValue(update5.valueInput, flag.kind, result.variant) : result.variant.value;
|
|
28818
|
+
const nextLabel = update5.label ?? result.variant.label;
|
|
28725
28819
|
const variantIndex = variants.findIndex((v) => v.id === result.variant.id);
|
|
28726
28820
|
const existingVariant = variants[variantIndex];
|
|
28727
28821
|
const hasChanged = !(0, import_fast_deep_equal2.default)(existingVariant.value, nextValue) || existingVariant.label !== nextLabel;
|
|
@@ -28976,6 +29070,7 @@ async function set2(client, argv) {
|
|
|
28976
29070
|
const message = normalizeOptionalInput(
|
|
28977
29071
|
flags["--message"]
|
|
28978
29072
|
);
|
|
29073
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
28979
29074
|
if (!flagArg) {
|
|
28980
29075
|
output_manager_default.error("Please provide a flag slug or ID to set");
|
|
28981
29076
|
output_manager_default.log(
|
|
@@ -28984,15 +29079,16 @@ async function set2(client, argv) {
|
|
|
28984
29079
|
return 1;
|
|
28985
29080
|
}
|
|
28986
29081
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
29082
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
28987
29083
|
telemetryClient.trackCliOptionEnvironment(environment);
|
|
28988
29084
|
telemetryClient.trackCliOptionVariant(variantSelector);
|
|
28989
29085
|
telemetryClient.trackCliOptionMessage(message);
|
|
28990
|
-
const link = await
|
|
29086
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
28991
29087
|
if (link.status === "error") {
|
|
28992
29088
|
return link.exitCode;
|
|
28993
29089
|
} else if (link.status === "not_linked") {
|
|
28994
29090
|
output_manager_default.error(
|
|
28995
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
29091
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
28996
29092
|
);
|
|
28997
29093
|
return 1;
|
|
28998
29094
|
}
|
|
@@ -29379,6 +29475,7 @@ async function split(client, argv) {
|
|
|
29379
29475
|
const message = normalizeOptionalInput(
|
|
29380
29476
|
flags["--message"]
|
|
29381
29477
|
);
|
|
29478
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
29382
29479
|
if (!flagArg) {
|
|
29383
29480
|
output_manager_default.error("Please provide a flag slug or ID to split");
|
|
29384
29481
|
output_manager_default.log(
|
|
@@ -29387,6 +29484,7 @@ async function split(client, argv) {
|
|
|
29387
29484
|
return 1;
|
|
29388
29485
|
}
|
|
29389
29486
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
29487
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
29390
29488
|
telemetryClient.trackCliOptionEnvironment(environment);
|
|
29391
29489
|
telemetryClient.trackCliOptionBy(baseSelector);
|
|
29392
29490
|
telemetryClient.trackCliOptionWeight(
|
|
@@ -29394,12 +29492,12 @@ async function split(client, argv) {
|
|
|
29394
29492
|
);
|
|
29395
29493
|
telemetryClient.trackCliOptionDefaultVariant(defaultVariantSelector);
|
|
29396
29494
|
telemetryClient.trackCliOptionMessage(message);
|
|
29397
|
-
const link = await
|
|
29495
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
29398
29496
|
if (link.status === "error") {
|
|
29399
29497
|
return link.exitCode;
|
|
29400
29498
|
} else if (link.status === "not_linked") {
|
|
29401
29499
|
output_manager_default.error(
|
|
29402
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
29500
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
29403
29501
|
);
|
|
29404
29502
|
return 1;
|
|
29405
29503
|
}
|
|
@@ -29910,6 +30008,7 @@ async function rollout(client, argv) {
|
|
|
29910
30008
|
const message = normalizeOptionalInput(
|
|
29911
30009
|
flags["--message"]
|
|
29912
30010
|
);
|
|
30011
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
29913
30012
|
if (!flagArg) {
|
|
29914
30013
|
output_manager_default.error("Please provide a flag slug or ID to roll out");
|
|
29915
30014
|
output_manager_default.log(
|
|
@@ -29918,6 +30017,7 @@ async function rollout(client, argv) {
|
|
|
29918
30017
|
return 1;
|
|
29919
30018
|
}
|
|
29920
30019
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
30020
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
29921
30021
|
telemetryClient.trackCliOptionEnvironment(environment);
|
|
29922
30022
|
telemetryClient.trackCliOptionFromVariant(rollFromVariantSelector);
|
|
29923
30023
|
telemetryClient.trackCliOptionToVariant(rollToVariantSelector);
|
|
@@ -29928,12 +30028,12 @@ async function rollout(client, argv) {
|
|
|
29928
30028
|
);
|
|
29929
30029
|
telemetryClient.trackCliOptionStart(start);
|
|
29930
30030
|
telemetryClient.trackCliOptionMessage(message);
|
|
29931
|
-
const link = await
|
|
30031
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
29932
30032
|
if (link.status === "error") {
|
|
29933
30033
|
return link.exitCode;
|
|
29934
30034
|
} else if (link.status === "not_linked") {
|
|
29935
30035
|
output_manager_default.error(
|
|
29936
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
30036
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
29937
30037
|
);
|
|
29938
30038
|
return 1;
|
|
29939
30039
|
}
|
|
@@ -30078,19 +30178,21 @@ async function rm7(client, argv) {
|
|
|
30078
30178
|
const { args, flags } = parsedArgs;
|
|
30079
30179
|
const [flagArg] = args;
|
|
30080
30180
|
const skipConfirmation = flags["--yes"];
|
|
30181
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
30081
30182
|
if (!flagArg) {
|
|
30082
30183
|
output_manager_default.error("Please provide a flag slug or ID to delete");
|
|
30083
30184
|
output_manager_default.log(`Example: ${getCommandName("flags rm my-feature")}`);
|
|
30084
30185
|
return 1;
|
|
30085
30186
|
}
|
|
30086
30187
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
30188
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
30087
30189
|
telemetryClient.trackCliFlagYes(skipConfirmation);
|
|
30088
|
-
const link = await
|
|
30190
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
30089
30191
|
if (link.status === "error") {
|
|
30090
30192
|
return link.exitCode;
|
|
30091
30193
|
} else if (link.status === "not_linked") {
|
|
30092
30194
|
output_manager_default.error(
|
|
30093
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
30195
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
30094
30196
|
);
|
|
30095
30197
|
return 1;
|
|
30096
30198
|
}
|
|
@@ -30172,19 +30274,21 @@ async function archive(client, argv) {
|
|
|
30172
30274
|
const { args, flags } = parsedArgs;
|
|
30173
30275
|
const [flagArg] = args;
|
|
30174
30276
|
const skipConfirmation = flags["--yes"];
|
|
30277
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
30175
30278
|
if (!flagArg) {
|
|
30176
30279
|
output_manager_default.error("Please provide a flag slug or ID to archive");
|
|
30177
30280
|
output_manager_default.log(`Example: ${getCommandName("flags archive my-feature")}`);
|
|
30178
30281
|
return 1;
|
|
30179
30282
|
}
|
|
30180
30283
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
30284
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
30181
30285
|
telemetryClient.trackCliFlagYes(skipConfirmation);
|
|
30182
|
-
const link = await
|
|
30286
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
30183
30287
|
if (link.status === "error") {
|
|
30184
30288
|
return link.exitCode;
|
|
30185
30289
|
} else if (link.status === "not_linked") {
|
|
30186
30290
|
output_manager_default.error(
|
|
30187
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
30291
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
30188
30292
|
);
|
|
30189
30293
|
return 1;
|
|
30190
30294
|
}
|
|
@@ -30342,6 +30446,7 @@ async function disable3(client, argv) {
|
|
|
30342
30446
|
const message = normalizeOptionalInput(
|
|
30343
30447
|
flags["--message"]
|
|
30344
30448
|
);
|
|
30449
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
30345
30450
|
if (!flagArg) {
|
|
30346
30451
|
if (client.nonInteractive) {
|
|
30347
30452
|
const envPart = environment ? `--environment ${environment}` : "--environment <production|preview|development>";
|
|
@@ -30372,10 +30477,11 @@ async function disable3(client, argv) {
|
|
|
30372
30477
|
return 1;
|
|
30373
30478
|
}
|
|
30374
30479
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
30480
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
30375
30481
|
telemetryClient.trackCliOptionEnvironment(environment);
|
|
30376
30482
|
telemetryClient.trackCliOptionVariant(variantId2);
|
|
30377
30483
|
telemetryClient.trackCliOptionMessage(message);
|
|
30378
|
-
const link = await
|
|
30484
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
30379
30485
|
if (link.status === "error") {
|
|
30380
30486
|
return link.exitCode;
|
|
30381
30487
|
} else if (link.status === "not_linked") {
|
|
@@ -30398,7 +30504,7 @@ async function disable3(client, argv) {
|
|
|
30398
30504
|
return 1;
|
|
30399
30505
|
}
|
|
30400
30506
|
output_manager_default.error(
|
|
30401
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
30507
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
30402
30508
|
);
|
|
30403
30509
|
return 1;
|
|
30404
30510
|
}
|
|
@@ -30576,6 +30682,7 @@ async function enable3(client, argv) {
|
|
|
30576
30682
|
const message = normalizeOptionalInput(
|
|
30577
30683
|
flags["--message"]
|
|
30578
30684
|
);
|
|
30685
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
30579
30686
|
if (!flagArg) {
|
|
30580
30687
|
output_manager_default.error("Please provide a flag slug or ID to enable");
|
|
30581
30688
|
output_manager_default.log(
|
|
@@ -30584,14 +30691,15 @@ async function enable3(client, argv) {
|
|
|
30584
30691
|
return 1;
|
|
30585
30692
|
}
|
|
30586
30693
|
telemetryClient.trackCliArgumentFlag(flagArg);
|
|
30694
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
30587
30695
|
telemetryClient.trackCliOptionEnvironment(environment);
|
|
30588
30696
|
telemetryClient.trackCliOptionMessage(message);
|
|
30589
|
-
const link = await
|
|
30697
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
30590
30698
|
if (link.status === "error") {
|
|
30591
30699
|
return link.exitCode;
|
|
30592
30700
|
} else if (link.status === "not_linked") {
|
|
30593
30701
|
output_manager_default.error(
|
|
30594
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
30702
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
30595
30703
|
);
|
|
30596
30704
|
return 1;
|
|
30597
30705
|
}
|
|
@@ -30822,13 +30930,15 @@ async function sdkKeysLs(client, argv) {
|
|
|
30822
30930
|
}
|
|
30823
30931
|
const { flags } = parsedArgs;
|
|
30824
30932
|
const json = flags["--json"];
|
|
30933
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
30934
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
30825
30935
|
telemetryClient.trackCliFlagJson(json);
|
|
30826
|
-
const link = await
|
|
30936
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
30827
30937
|
if (link.status === "error") {
|
|
30828
30938
|
return link.exitCode;
|
|
30829
30939
|
} else if (link.status === "not_linked") {
|
|
30830
30940
|
output_manager_default.error(
|
|
30831
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
30941
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
30832
30942
|
);
|
|
30833
30943
|
return 1;
|
|
30834
30944
|
}
|
|
@@ -30940,10 +31050,12 @@ async function sdkKeysAdd(client, argv) {
|
|
|
30940
31050
|
let sdkKeyType = flags["--type"];
|
|
30941
31051
|
let environment = flags["--environment"];
|
|
30942
31052
|
const label = flags["--label"];
|
|
31053
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
31054
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
30943
31055
|
telemetryClient.trackCliOptionType(sdkKeyType);
|
|
30944
31056
|
telemetryClient.trackCliOptionEnvironment(environment);
|
|
30945
31057
|
telemetryClient.trackCliOptionLabel(label);
|
|
30946
|
-
const link = await
|
|
31058
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
30947
31059
|
if (link.status === "error") {
|
|
30948
31060
|
return link.exitCode;
|
|
30949
31061
|
} else if (link.status === "not_linked") {
|
|
@@ -30966,7 +31078,7 @@ async function sdkKeysAdd(client, argv) {
|
|
|
30966
31078
|
return 1;
|
|
30967
31079
|
}
|
|
30968
31080
|
output_manager_default.error(
|
|
30969
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
31081
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
30970
31082
|
);
|
|
30971
31083
|
return 1;
|
|
30972
31084
|
}
|
|
@@ -31167,9 +31279,11 @@ async function sdkKeysRm(client, argv) {
|
|
|
31167
31279
|
const { args, flags } = parsedArgs;
|
|
31168
31280
|
let [hashKey] = args;
|
|
31169
31281
|
const skipConfirmation = flags["--yes"];
|
|
31282
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
31170
31283
|
telemetryClient.trackCliArgumentKey(hashKey);
|
|
31284
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
31171
31285
|
telemetryClient.trackCliFlagYes(skipConfirmation);
|
|
31172
|
-
const link = await
|
|
31286
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
31173
31287
|
if (link.status === "error") {
|
|
31174
31288
|
return link.exitCode;
|
|
31175
31289
|
} else if (link.status === "not_linked") {
|
|
@@ -31192,7 +31306,7 @@ async function sdkKeysRm(client, argv) {
|
|
|
31192
31306
|
return 1;
|
|
31193
31307
|
}
|
|
31194
31308
|
output_manager_default.error(
|
|
31195
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
31309
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
31196
31310
|
);
|
|
31197
31311
|
return 1;
|
|
31198
31312
|
}
|
|
@@ -31635,14 +31749,17 @@ async function segmentsLs(client, argv) {
|
|
|
31635
31749
|
printError(err);
|
|
31636
31750
|
return 1;
|
|
31637
31751
|
}
|
|
31638
|
-
const
|
|
31752
|
+
const { flags } = parsedArgs;
|
|
31753
|
+
const json = flags["--json"];
|
|
31754
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
31755
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
31639
31756
|
telemetryClient.trackCliFlagJson(json);
|
|
31640
|
-
const link = await
|
|
31757
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
31641
31758
|
if (link.status === "error") {
|
|
31642
31759
|
return link.exitCode;
|
|
31643
31760
|
} else if (link.status === "not_linked") {
|
|
31644
31761
|
output_manager_default.error(
|
|
31645
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
31762
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
31646
31763
|
);
|
|
31647
31764
|
return 1;
|
|
31648
31765
|
}
|
|
@@ -31878,6 +31995,7 @@ async function segmentsInspect(client, argv) {
|
|
|
31878
31995
|
const { args, flags } = parsedArgs;
|
|
31879
31996
|
const [segmentArg] = args;
|
|
31880
31997
|
const json = flags["--json"];
|
|
31998
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
31881
31999
|
if (!segmentArg) {
|
|
31882
32000
|
output_manager_default.error("Please provide a segment slug or ID to inspect");
|
|
31883
32001
|
output_manager_default.log(
|
|
@@ -31886,13 +32004,14 @@ async function segmentsInspect(client, argv) {
|
|
|
31886
32004
|
return 1;
|
|
31887
32005
|
}
|
|
31888
32006
|
telemetryClient.trackCliArgumentSegment(segmentArg);
|
|
32007
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
31889
32008
|
telemetryClient.trackCliFlagJson(json);
|
|
31890
|
-
const link = await
|
|
32009
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
31891
32010
|
if (link.status === "error") {
|
|
31892
32011
|
return link.exitCode;
|
|
31893
32012
|
} else if (link.status === "not_linked") {
|
|
31894
32013
|
output_manager_default.error(
|
|
31895
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
32014
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
31896
32015
|
);
|
|
31897
32016
|
return 1;
|
|
31898
32017
|
}
|
|
@@ -32317,7 +32436,9 @@ async function segmentsCreate(client, argv) {
|
|
|
32317
32436
|
const dataInput = flags["--data"];
|
|
32318
32437
|
const addInputs = flags["--add"] ?? [];
|
|
32319
32438
|
const json = flags["--json"];
|
|
32439
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
32320
32440
|
telemetryClient.trackCliArgumentSlug(slug);
|
|
32441
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
32321
32442
|
telemetryClient.trackCliOptionLabel(label);
|
|
32322
32443
|
telemetryClient.trackCliOptionDescription(description);
|
|
32323
32444
|
telemetryClient.trackCliOptionHint(hint);
|
|
@@ -32352,7 +32473,7 @@ async function segmentsCreate(client, argv) {
|
|
|
32352
32473
|
);
|
|
32353
32474
|
return 1;
|
|
32354
32475
|
}
|
|
32355
|
-
const link = await
|
|
32476
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
32356
32477
|
if (link.status === "error") {
|
|
32357
32478
|
return link.exitCode;
|
|
32358
32479
|
} else if (link.status === "not_linked") {
|
|
@@ -32375,7 +32496,7 @@ async function segmentsCreate(client, argv) {
|
|
|
32375
32496
|
return 1;
|
|
32376
32497
|
}
|
|
32377
32498
|
output_manager_default.error(
|
|
32378
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
32499
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
32379
32500
|
);
|
|
32380
32501
|
return 1;
|
|
32381
32502
|
}
|
|
@@ -32517,7 +32638,9 @@ async function segmentsUpdate(client, argv) {
|
|
|
32517
32638
|
const addInputs = flags["--add"] ?? [];
|
|
32518
32639
|
const removeInputs = flags["--remove"] ?? [];
|
|
32519
32640
|
const json = flags["--json"];
|
|
32641
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
32520
32642
|
telemetryClient.trackCliArgumentSegment(segmentArg);
|
|
32643
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
32521
32644
|
telemetryClient.trackCliOptionLabel(label);
|
|
32522
32645
|
telemetryClient.trackCliOptionDescription(description);
|
|
32523
32646
|
telemetryClient.trackCliOptionHint(hint);
|
|
@@ -32525,7 +32648,7 @@ async function segmentsUpdate(client, argv) {
|
|
|
32525
32648
|
telemetryClient.trackCliOptionAdd(addInputs);
|
|
32526
32649
|
telemetryClient.trackCliOptionRemove(removeInputs);
|
|
32527
32650
|
telemetryClient.trackCliFlagJson(json);
|
|
32528
|
-
const link = await
|
|
32651
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
32529
32652
|
if (link.status === "error") {
|
|
32530
32653
|
return link.exitCode;
|
|
32531
32654
|
} else if (link.status === "not_linked") {
|
|
@@ -32548,7 +32671,7 @@ async function segmentsUpdate(client, argv) {
|
|
|
32548
32671
|
return 1;
|
|
32549
32672
|
}
|
|
32550
32673
|
output_manager_default.error(
|
|
32551
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
32674
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
32552
32675
|
);
|
|
32553
32676
|
return 1;
|
|
32554
32677
|
}
|
|
@@ -32882,9 +33005,11 @@ async function segmentsRm(client, argv) {
|
|
|
32882
33005
|
const { args, flags } = parsedArgs;
|
|
32883
33006
|
let segmentArg = args[0];
|
|
32884
33007
|
const skipConfirmation = flags["--yes"];
|
|
33008
|
+
const projectName = getProjectNameFromFlags(flags);
|
|
32885
33009
|
telemetryClient.trackCliArgumentSegment(segmentArg);
|
|
33010
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
32886
33011
|
telemetryClient.trackCliFlagYes(skipConfirmation);
|
|
32887
|
-
const link = await
|
|
33012
|
+
const link = await getLinkedFlagsProject(client, projectName);
|
|
32888
33013
|
if (link.status === "error") {
|
|
32889
33014
|
return link.exitCode;
|
|
32890
33015
|
} else if (link.status === "not_linked") {
|
|
@@ -32907,7 +33032,7 @@ async function segmentsRm(client, argv) {
|
|
|
32907
33032
|
return 1;
|
|
32908
33033
|
}
|
|
32909
33034
|
output_manager_default.error(
|
|
32910
|
-
`Your codebase isn't linked to a project on Vercel.
|
|
33035
|
+
`Your codebase isn't linked to a project on Vercel. Pass --project <name>, or run ${getCommandName("link")} to link it.`
|
|
32911
33036
|
);
|
|
32912
33037
|
return 1;
|
|
32913
33038
|
}
|
|
@@ -34969,6 +35094,7 @@ function exitCode(state) {
|
|
|
34969
35094
|
|
|
34970
35095
|
// src/commands/integration/add-auto-provision.ts
|
|
34971
35096
|
var import_chalk143 = __toESM(require_source(), 1);
|
|
35097
|
+
var import_execa2 = __toESM(require_execa(), 1);
|
|
34972
35098
|
var import_error_utils11 = __toESM(require_dist(), 1);
|
|
34973
35099
|
var import_open12 = __toESM(require_open(), 1);
|
|
34974
35100
|
|
|
@@ -35343,6 +35469,41 @@ async function selectProduct(client, products, productSlug) {
|
|
|
35343
35469
|
});
|
|
35344
35470
|
}
|
|
35345
35471
|
|
|
35472
|
+
// src/util/integration/skill-suggestion.ts
|
|
35473
|
+
function resolveProductSkills(product) {
|
|
35474
|
+
const resolved = [];
|
|
35475
|
+
for (const entry of product.agentSkills ?? []) {
|
|
35476
|
+
const skill = resolveSkillFromUrl(entry);
|
|
35477
|
+
if (skill) {
|
|
35478
|
+
resolved.push(skill);
|
|
35479
|
+
}
|
|
35480
|
+
}
|
|
35481
|
+
return resolved;
|
|
35482
|
+
}
|
|
35483
|
+
function resolveSkillFromUrl(value) {
|
|
35484
|
+
let url;
|
|
35485
|
+
try {
|
|
35486
|
+
url = new URL(value);
|
|
35487
|
+
} catch {
|
|
35488
|
+
return null;
|
|
35489
|
+
}
|
|
35490
|
+
if (url.hostname.replace(/^www\./, "") !== "github.com") {
|
|
35491
|
+
return null;
|
|
35492
|
+
}
|
|
35493
|
+
const [owner, repo, kind, , ...rest] = url.pathname.split("/").filter(Boolean);
|
|
35494
|
+
if (!owner || !repo) {
|
|
35495
|
+
return null;
|
|
35496
|
+
}
|
|
35497
|
+
const repoUrl = `https://github.com/${owner.toLowerCase()}/${repo.toLowerCase()}`;
|
|
35498
|
+
let skill;
|
|
35499
|
+
if (kind === "blob" || kind === "tree") {
|
|
35500
|
+
const parts = rest.filter((part) => part.toLowerCase() !== "skill.md");
|
|
35501
|
+
skill = parts[parts.length - 1];
|
|
35502
|
+
}
|
|
35503
|
+
const command = skill ? `npx skills add ${repoUrl} --skill ${skill}` : `npx skills add ${repoUrl}`;
|
|
35504
|
+
return { repoUrl, skill, command };
|
|
35505
|
+
}
|
|
35506
|
+
|
|
35346
35507
|
// src/commands/integration-resource/claim.ts
|
|
35347
35508
|
var import_chalk141 = __toESM(require_source(), 1);
|
|
35348
35509
|
var import_open11 = __toESM(require_open(), 1);
|
|
@@ -36822,6 +36983,47 @@ Re-run with --installation-id to select one, e.g.:
|
|
|
36822
36983
|
}
|
|
36823
36984
|
}
|
|
36824
36985
|
);
|
|
36986
|
+
const skills2 = resolveProductSkills(product);
|
|
36987
|
+
if (skills2.length && !options.asJson) {
|
|
36988
|
+
const noun = skills2.length === 1 ? "the agent skill" : "agent skills";
|
|
36989
|
+
let runInstall = !canPrompt(client);
|
|
36990
|
+
if (canPrompt(client)) {
|
|
36991
|
+
runInstall = await client.input.confirm(
|
|
36992
|
+
`Install ${noun} so your AI tools can use ${import_chalk143.default.bold(product.name)}?`,
|
|
36993
|
+
true
|
|
36994
|
+
);
|
|
36995
|
+
}
|
|
36996
|
+
if (runInstall) {
|
|
36997
|
+
output_manager_default.log(`Installing ${noun} for ${import_chalk143.default.bold(product.name)}\u2026`);
|
|
36998
|
+
for (const skill of skills2) {
|
|
36999
|
+
output_manager_default.log(indent_default(import_chalk143.default.cyan(skill.command), 4));
|
|
37000
|
+
const args = [
|
|
37001
|
+
"--yes",
|
|
37002
|
+
"skills",
|
|
37003
|
+
"add",
|
|
37004
|
+
skill.repoUrl,
|
|
37005
|
+
...skill.skill ? ["--skill", skill.skill] : []
|
|
37006
|
+
];
|
|
37007
|
+
const result2 = await (0, import_execa2.default)("npx", args, {
|
|
37008
|
+
cwd: client.cwd,
|
|
37009
|
+
stdio: "inherit",
|
|
37010
|
+
reject: false
|
|
37011
|
+
});
|
|
37012
|
+
if (result2.exitCode !== 0) {
|
|
37013
|
+
output_manager_default.warn(
|
|
37014
|
+
`Failed to install ${skill.skill ?? skill.repoUrl}. Run it manually: ${import_chalk143.default.cyan(skill.command)}`
|
|
37015
|
+
);
|
|
37016
|
+
}
|
|
37017
|
+
}
|
|
37018
|
+
} else {
|
|
37019
|
+
output_manager_default.log(
|
|
37020
|
+
`Install ${noun} so your AI tools can use ${import_chalk143.default.bold(product.name)}:`
|
|
37021
|
+
);
|
|
37022
|
+
for (const skill of skills2) {
|
|
37023
|
+
output_manager_default.log(indent_default(import_chalk143.default.cyan(skill.command), 4));
|
|
37024
|
+
}
|
|
37025
|
+
}
|
|
37026
|
+
}
|
|
36825
37027
|
if (options.asJson) {
|
|
36826
37028
|
const warnings = [];
|
|
36827
37029
|
if (setupResult.connectError) {
|
|
@@ -36873,6 +37075,7 @@ Re-run with --installation-id to select one, e.g.:
|
|
|
36873
37075
|
environments: setupResult.environments,
|
|
36874
37076
|
envPulled: setupResult.envPulled,
|
|
36875
37077
|
guideCommand,
|
|
37078
|
+
skills: skills2,
|
|
36876
37079
|
warnings
|
|
36877
37080
|
};
|
|
36878
37081
|
client.stdout.write(`${JSON.stringify(jsonOutput, null, 2)}
|
|
@@ -42667,7 +42870,7 @@ async function metrics(client) {
|
|
|
42667
42870
|
return 0;
|
|
42668
42871
|
}
|
|
42669
42872
|
telemetry2.trackCliSubcommandSchema(subcommandOriginal);
|
|
42670
|
-
const schemaFn = (await import("./chunks/schema-
|
|
42873
|
+
const schemaFn = (await import("./chunks/schema-CDXFJU72.js")).default;
|
|
42671
42874
|
return schemaFn(client, telemetry2);
|
|
42672
42875
|
}
|
|
42673
42876
|
default: {
|
|
@@ -42680,7 +42883,7 @@ async function metrics(client) {
|
|
|
42680
42883
|
output_manager_default.print(help(metricsCommand, { columns: client.stderr.columns }));
|
|
42681
42884
|
return 2;
|
|
42682
42885
|
}
|
|
42683
|
-
const queryFn = (await import("./chunks/query-
|
|
42886
|
+
const queryFn = (await import("./chunks/query-2MIBB7C5.js")).default;
|
|
42684
42887
|
return queryFn(client, telemetry2);
|
|
42685
42888
|
}
|
|
42686
42889
|
}
|
|
@@ -46367,6 +46570,379 @@ async function rename(client, argv) {
|
|
|
46367
46570
|
return 0;
|
|
46368
46571
|
}
|
|
46369
46572
|
|
|
46573
|
+
// src/commands/project/update.ts
|
|
46574
|
+
var import_frameworks2 = __toESM(require_frameworks(), 1);
|
|
46575
|
+
|
|
46576
|
+
// src/util/telemetry/commands/project/update.ts
|
|
46577
|
+
var ProjectUpdateTelemetryClient = class extends TelemetryClient {
|
|
46578
|
+
trackCliArgumentName(name) {
|
|
46579
|
+
if (name) {
|
|
46580
|
+
this.trackCliArgument({
|
|
46581
|
+
arg: "name",
|
|
46582
|
+
value: this.redactedValue
|
|
46583
|
+
});
|
|
46584
|
+
}
|
|
46585
|
+
}
|
|
46586
|
+
trackCliOptionFramework(framework) {
|
|
46587
|
+
if (framework) {
|
|
46588
|
+
this.trackCliOption({
|
|
46589
|
+
option: "framework",
|
|
46590
|
+
value: this.redactedValue
|
|
46591
|
+
});
|
|
46592
|
+
}
|
|
46593
|
+
}
|
|
46594
|
+
trackCliOptionBuildCommand(value) {
|
|
46595
|
+
this.trackSettingOption("build-command", value);
|
|
46596
|
+
}
|
|
46597
|
+
trackCliOptionDevCommand(value) {
|
|
46598
|
+
this.trackSettingOption("dev-command", value);
|
|
46599
|
+
}
|
|
46600
|
+
trackCliOptionInstallCommand(value) {
|
|
46601
|
+
this.trackSettingOption("install-command", value);
|
|
46602
|
+
}
|
|
46603
|
+
trackCliOptionOutputDirectory(value) {
|
|
46604
|
+
this.trackSettingOption("output-directory", value);
|
|
46605
|
+
}
|
|
46606
|
+
trackCliOptionAutoDetect(value) {
|
|
46607
|
+
if (value?.length) {
|
|
46608
|
+
this.trackCliOption({
|
|
46609
|
+
option: "auto-detect",
|
|
46610
|
+
value: this.redactedValue
|
|
46611
|
+
});
|
|
46612
|
+
}
|
|
46613
|
+
}
|
|
46614
|
+
trackSettingOption(option, value) {
|
|
46615
|
+
if (value !== void 0) {
|
|
46616
|
+
this.trackCliOption({
|
|
46617
|
+
option,
|
|
46618
|
+
value: this.redactedValue
|
|
46619
|
+
});
|
|
46620
|
+
}
|
|
46621
|
+
}
|
|
46622
|
+
};
|
|
46623
|
+
|
|
46624
|
+
// src/commands/project/update.ts
|
|
46625
|
+
var OTHER_FRAMEWORK_SLUG = "other";
|
|
46626
|
+
var MAX_SETTING_LENGTH = 256;
|
|
46627
|
+
var CONTROL_CHARACTERS = /[\u0000-\u001f\u007f]/;
|
|
46628
|
+
var frameworkSlugs = import_frameworks2.frameworkList.map(
|
|
46629
|
+
(framework) => framework.slug ?? OTHER_FRAMEWORK_SLUG
|
|
46630
|
+
);
|
|
46631
|
+
var buildSettingDefinitions = [
|
|
46632
|
+
{
|
|
46633
|
+
key: "buildCommand",
|
|
46634
|
+
flag: "--build-command",
|
|
46635
|
+
autoDetect: "build-command",
|
|
46636
|
+
label: "Build Command"
|
|
46637
|
+
},
|
|
46638
|
+
{
|
|
46639
|
+
key: "devCommand",
|
|
46640
|
+
flag: "--dev-command",
|
|
46641
|
+
autoDetect: "dev-command",
|
|
46642
|
+
label: "Dev Command"
|
|
46643
|
+
},
|
|
46644
|
+
{
|
|
46645
|
+
key: "installCommand",
|
|
46646
|
+
flag: "--install-command",
|
|
46647
|
+
autoDetect: "install-command",
|
|
46648
|
+
label: "Install Command"
|
|
46649
|
+
},
|
|
46650
|
+
{
|
|
46651
|
+
key: "outputDirectory",
|
|
46652
|
+
flag: "--output-directory",
|
|
46653
|
+
autoDetect: "output-directory",
|
|
46654
|
+
label: "Output Directory"
|
|
46655
|
+
}
|
|
46656
|
+
];
|
|
46657
|
+
var settingOrder = [
|
|
46658
|
+
"framework",
|
|
46659
|
+
...buildSettingDefinitions.map((setting) => setting.key)
|
|
46660
|
+
];
|
|
46661
|
+
var autoDetectSettings = buildSettingDefinitions.map(
|
|
46662
|
+
(setting) => setting.autoDetect
|
|
46663
|
+
);
|
|
46664
|
+
var settingLabels = {
|
|
46665
|
+
framework: "Framework",
|
|
46666
|
+
buildCommand: "Build Command",
|
|
46667
|
+
devCommand: "Dev Command",
|
|
46668
|
+
installCommand: "Install Command",
|
|
46669
|
+
outputDirectory: "Output Directory"
|
|
46670
|
+
};
|
|
46671
|
+
function resolveFramework(input) {
|
|
46672
|
+
const slug = input.trim().toLowerCase();
|
|
46673
|
+
return import_frameworks2.frameworkList.find(
|
|
46674
|
+
(framework) => (framework.slug ?? OTHER_FRAMEWORK_SLUG) === slug
|
|
46675
|
+
);
|
|
46676
|
+
}
|
|
46677
|
+
function formatFramework(slug) {
|
|
46678
|
+
const framework = import_frameworks2.frameworkList.find((item) => item.slug === slug);
|
|
46679
|
+
if (!framework) {
|
|
46680
|
+
return slug ?? OTHER_FRAMEWORK_SLUG;
|
|
46681
|
+
}
|
|
46682
|
+
return `${framework.name} (${framework.slug ?? OTHER_FRAMEWORK_SLUG})`;
|
|
46683
|
+
}
|
|
46684
|
+
function formatSettingValue(key, value) {
|
|
46685
|
+
if (key === "framework") {
|
|
46686
|
+
return formatFramework(value);
|
|
46687
|
+
}
|
|
46688
|
+
if (value === null) {
|
|
46689
|
+
return "Auto";
|
|
46690
|
+
}
|
|
46691
|
+
return value === "" ? '""' : value;
|
|
46692
|
+
}
|
|
46693
|
+
function getCurrentSetting(project, key) {
|
|
46694
|
+
return project[key] ?? null;
|
|
46695
|
+
}
|
|
46696
|
+
function hasSetting(settings, key) {
|
|
46697
|
+
return Object.prototype.hasOwnProperty.call(settings, key);
|
|
46698
|
+
}
|
|
46699
|
+
function getUpdateCommand2(framework = "<slug>") {
|
|
46700
|
+
return `project update <name> --framework ${framework}`;
|
|
46701
|
+
}
|
|
46702
|
+
function printUsageError(client, message, exitCode2, reason, suggestedCommand = getUpdateCommand2()) {
|
|
46703
|
+
outputAgentError(
|
|
46704
|
+
client,
|
|
46705
|
+
{
|
|
46706
|
+
status: "error",
|
|
46707
|
+
reason,
|
|
46708
|
+
message,
|
|
46709
|
+
next: [
|
|
46710
|
+
{
|
|
46711
|
+
command: buildCommandWithGlobalFlags(client.argv, suggestedCommand),
|
|
46712
|
+
when: "Update project settings"
|
|
46713
|
+
}
|
|
46714
|
+
]
|
|
46715
|
+
},
|
|
46716
|
+
exitCode2
|
|
46717
|
+
);
|
|
46718
|
+
output_manager_default.error(message);
|
|
46719
|
+
return exitCode2;
|
|
46720
|
+
}
|
|
46721
|
+
function validateSettingValue(definition, value) {
|
|
46722
|
+
if (value.length > MAX_SETTING_LENGTH) {
|
|
46723
|
+
return `${definition.label} must be ${MAX_SETTING_LENGTH} characters or fewer.`;
|
|
46724
|
+
}
|
|
46725
|
+
if (CONTROL_CHARACTERS.test(value)) {
|
|
46726
|
+
return `${definition.label} can't contain control characters.`;
|
|
46727
|
+
}
|
|
46728
|
+
}
|
|
46729
|
+
function parseAutoDetectSettings(inputs) {
|
|
46730
|
+
return inputs.flatMap((input) => input.split(",")).map((input) => input.trim());
|
|
46731
|
+
}
|
|
46732
|
+
function writeResult({
|
|
46733
|
+
changedSettings,
|
|
46734
|
+
project,
|
|
46735
|
+
previousSettings,
|
|
46736
|
+
requestedSettings,
|
|
46737
|
+
asJson,
|
|
46738
|
+
client
|
|
46739
|
+
}) {
|
|
46740
|
+
const changed = changedSettings.length > 0;
|
|
46741
|
+
if (asJson) {
|
|
46742
|
+
client.stdout.write(
|
|
46743
|
+
`${JSON.stringify(
|
|
46744
|
+
{
|
|
46745
|
+
changed,
|
|
46746
|
+
changedSettings,
|
|
46747
|
+
projectId: project.id,
|
|
46748
|
+
projectName: project.name,
|
|
46749
|
+
settings: requestedSettings
|
|
46750
|
+
},
|
|
46751
|
+
null,
|
|
46752
|
+
2
|
|
46753
|
+
)}
|
|
46754
|
+
`
|
|
46755
|
+
);
|
|
46756
|
+
return;
|
|
46757
|
+
}
|
|
46758
|
+
printAlignedLabel(changed ? "Updated" : "Unchanged", "Project Settings", {
|
|
46759
|
+
gutter: "\u2713"
|
|
46760
|
+
});
|
|
46761
|
+
printAlignedLabel("Project", project.name);
|
|
46762
|
+
for (const key of settingOrder) {
|
|
46763
|
+
if (!hasSetting(requestedSettings, key)) {
|
|
46764
|
+
continue;
|
|
46765
|
+
}
|
|
46766
|
+
const previous = previousSettings[key] ?? null;
|
|
46767
|
+
const next = requestedSettings[key] ?? null;
|
|
46768
|
+
const value = changedSettings.includes(key) ? `${formatSettingValue(key, previous)} \u2192 ${formatSettingValue(key, next)}` : formatSettingValue(key, next);
|
|
46769
|
+
printAlignedLabel(settingLabels[key], value);
|
|
46770
|
+
}
|
|
46771
|
+
}
|
|
46772
|
+
async function update4(client, argv) {
|
|
46773
|
+
const telemetry2 = new ProjectUpdateTelemetryClient({
|
|
46774
|
+
opts: { store: client.telemetryEventStore }
|
|
46775
|
+
});
|
|
46776
|
+
let parsedArgs;
|
|
46777
|
+
try {
|
|
46778
|
+
parsedArgs = parseArguments(
|
|
46779
|
+
argv,
|
|
46780
|
+
getFlagsSpecification(updateSubcommand5.options)
|
|
46781
|
+
);
|
|
46782
|
+
} catch (error) {
|
|
46783
|
+
outputAgentError(
|
|
46784
|
+
client,
|
|
46785
|
+
{
|
|
46786
|
+
status: "error",
|
|
46787
|
+
reason: "invalid_arguments",
|
|
46788
|
+
message: error instanceof Error ? error.message : String(error)
|
|
46789
|
+
},
|
|
46790
|
+
1
|
|
46791
|
+
);
|
|
46792
|
+
printError(error);
|
|
46793
|
+
return 1;
|
|
46794
|
+
}
|
|
46795
|
+
const { args, flags } = parsedArgs;
|
|
46796
|
+
const [projectNameOrId] = args;
|
|
46797
|
+
const frameworkInput = flags["--framework"];
|
|
46798
|
+
const autoDetectInputs = flags["--auto-detect"] ?? [];
|
|
46799
|
+
telemetry2.trackCliArgumentName(projectNameOrId);
|
|
46800
|
+
telemetry2.trackCliOptionFramework(frameworkInput);
|
|
46801
|
+
telemetry2.trackCliOptionBuildCommand(flags["--build-command"]);
|
|
46802
|
+
telemetry2.trackCliOptionDevCommand(flags["--dev-command"]);
|
|
46803
|
+
telemetry2.trackCliOptionInstallCommand(flags["--install-command"]);
|
|
46804
|
+
telemetry2.trackCliOptionOutputDirectory(flags["--output-directory"]);
|
|
46805
|
+
telemetry2.trackCliOptionAutoDetect(
|
|
46806
|
+
flags["--auto-detect"]
|
|
46807
|
+
);
|
|
46808
|
+
telemetry2.trackCliOptionFormat(flags["--format"]);
|
|
46809
|
+
if (args.length > 1) {
|
|
46810
|
+
return printUsageError(
|
|
46811
|
+
client,
|
|
46812
|
+
`Invalid number of arguments. Usage: ${getCommandNamePlain(
|
|
46813
|
+
"project update [name] [options]"
|
|
46814
|
+
)}`,
|
|
46815
|
+
2,
|
|
46816
|
+
"invalid_arguments"
|
|
46817
|
+
);
|
|
46818
|
+
}
|
|
46819
|
+
const formatResult = validateJsonOutput(flags);
|
|
46820
|
+
if (!formatResult.valid) {
|
|
46821
|
+
return printUsageError(client, formatResult.error, 1, "invalid_arguments");
|
|
46822
|
+
}
|
|
46823
|
+
const requestedSettings = {};
|
|
46824
|
+
if (frameworkInput !== void 0) {
|
|
46825
|
+
const framework = resolveFramework(frameworkInput);
|
|
46826
|
+
if (!framework) {
|
|
46827
|
+
const normalizedInput = frameworkInput.trim().toLowerCase();
|
|
46828
|
+
const suggestion = normalizedInput ? did_you_mean_default(normalizedInput, frameworkSlugs, 0.7) : void 0;
|
|
46829
|
+
const message = suggestion ? `Unsupported framework preset ${JSON.stringify(frameworkInput)}. Did you mean ${JSON.stringify(suggestion)}?` : `Unsupported framework preset ${JSON.stringify(frameworkInput)}. Use a framework slug such as "nextjs", or "other" to clear the preset.`;
|
|
46830
|
+
return printUsageError(
|
|
46831
|
+
client,
|
|
46832
|
+
message,
|
|
46833
|
+
1,
|
|
46834
|
+
"invalid_arguments",
|
|
46835
|
+
getUpdateCommand2(suggestion)
|
|
46836
|
+
);
|
|
46837
|
+
}
|
|
46838
|
+
requestedSettings.framework = framework.slug;
|
|
46839
|
+
}
|
|
46840
|
+
const requestedAutoDetect = parseAutoDetectSettings(autoDetectInputs);
|
|
46841
|
+
const autoDetectSet = /* @__PURE__ */ new Set();
|
|
46842
|
+
for (const setting of requestedAutoDetect) {
|
|
46843
|
+
if (!autoDetectSettings.includes(setting)) {
|
|
46844
|
+
const suggestion = setting ? did_you_mean_default(setting, autoDetectSettings, 0.7) : void 0;
|
|
46845
|
+
const message = suggestion ? `Unknown auto-detect setting ${JSON.stringify(setting)}. Did you mean ${JSON.stringify(suggestion)}?` : `Unknown auto-detect setting ${JSON.stringify(setting)}. Accepted settings: ${autoDetectSettings.join(", ")}.`;
|
|
46846
|
+
return printUsageError(
|
|
46847
|
+
client,
|
|
46848
|
+
message,
|
|
46849
|
+
1,
|
|
46850
|
+
"invalid_arguments",
|
|
46851
|
+
`project update <name> --auto-detect ${suggestion ?? "<setting>"}`
|
|
46852
|
+
);
|
|
46853
|
+
}
|
|
46854
|
+
autoDetectSet.add(setting);
|
|
46855
|
+
}
|
|
46856
|
+
for (const definition of buildSettingDefinitions) {
|
|
46857
|
+
const value = flags[definition.flag];
|
|
46858
|
+
if (value !== void 0 && autoDetectSet.has(definition.autoDetect)) {
|
|
46859
|
+
return printUsageError(
|
|
46860
|
+
client,
|
|
46861
|
+
`Can't use "${definition.flag}" and "--auto-detect ${definition.autoDetect}" together. Choose one.`,
|
|
46862
|
+
2,
|
|
46863
|
+
"invalid_arguments",
|
|
46864
|
+
`project update <name> ${definition.flag} <value>`
|
|
46865
|
+
);
|
|
46866
|
+
}
|
|
46867
|
+
if (value !== void 0) {
|
|
46868
|
+
const validationError = validateSettingValue(definition, value);
|
|
46869
|
+
if (validationError) {
|
|
46870
|
+
return printUsageError(
|
|
46871
|
+
client,
|
|
46872
|
+
validationError,
|
|
46873
|
+
1,
|
|
46874
|
+
"invalid_arguments",
|
|
46875
|
+
`project update <name> ${definition.flag} <value>`
|
|
46876
|
+
);
|
|
46877
|
+
}
|
|
46878
|
+
requestedSettings[definition.key] = value;
|
|
46879
|
+
} else if (autoDetectSet.has(definition.autoDetect)) {
|
|
46880
|
+
requestedSettings[definition.key] = null;
|
|
46881
|
+
}
|
|
46882
|
+
}
|
|
46883
|
+
if (settingOrder.every((key) => !hasSetting(requestedSettings, key))) {
|
|
46884
|
+
return printUsageError(
|
|
46885
|
+
client,
|
|
46886
|
+
"Provide at least one setting option: --framework, --build-command, --dev-command, --install-command, --output-directory, or --auto-detect.",
|
|
46887
|
+
2,
|
|
46888
|
+
"missing_arguments"
|
|
46889
|
+
);
|
|
46890
|
+
}
|
|
46891
|
+
let project;
|
|
46892
|
+
try {
|
|
46893
|
+
project = await getProjectByCwdOrLink({
|
|
46894
|
+
client,
|
|
46895
|
+
commandName: "project update",
|
|
46896
|
+
projectNameOrId,
|
|
46897
|
+
forReadOnlyCommand: true
|
|
46898
|
+
});
|
|
46899
|
+
} catch (error) {
|
|
46900
|
+
exitWithNonInteractiveError(client, error, 1, { variant: "update" });
|
|
46901
|
+
printError(error);
|
|
46902
|
+
return 1;
|
|
46903
|
+
}
|
|
46904
|
+
const previousSettings = {};
|
|
46905
|
+
const changedSettings = [];
|
|
46906
|
+
const changedUpdates = {};
|
|
46907
|
+
for (const key of settingOrder) {
|
|
46908
|
+
if (!hasSetting(requestedSettings, key)) {
|
|
46909
|
+
continue;
|
|
46910
|
+
}
|
|
46911
|
+
const previous = getCurrentSetting(project, key);
|
|
46912
|
+
const next = requestedSettings[key] ?? null;
|
|
46913
|
+
previousSettings[key] = previous;
|
|
46914
|
+
if (previous !== next) {
|
|
46915
|
+
changedSettings.push(key);
|
|
46916
|
+
Object.assign(changedUpdates, { [key]: next });
|
|
46917
|
+
}
|
|
46918
|
+
}
|
|
46919
|
+
let updatedProject = project;
|
|
46920
|
+
if (changedSettings.length > 0) {
|
|
46921
|
+
try {
|
|
46922
|
+
updatedProject = await client.fetch(
|
|
46923
|
+
`/v9/projects/${encodeURIComponent(project.id)}`,
|
|
46924
|
+
{
|
|
46925
|
+
method: "PATCH",
|
|
46926
|
+
body: changedUpdates
|
|
46927
|
+
}
|
|
46928
|
+
);
|
|
46929
|
+
} catch (error) {
|
|
46930
|
+
exitWithNonInteractiveError(client, error, 1, { variant: "update" });
|
|
46931
|
+
printError(error);
|
|
46932
|
+
return 1;
|
|
46933
|
+
}
|
|
46934
|
+
}
|
|
46935
|
+
writeResult({
|
|
46936
|
+
changedSettings,
|
|
46937
|
+
project: updatedProject,
|
|
46938
|
+
previousSettings,
|
|
46939
|
+
requestedSettings,
|
|
46940
|
+
asJson: formatResult.jsonOutput,
|
|
46941
|
+
client
|
|
46942
|
+
});
|
|
46943
|
+
return 0;
|
|
46944
|
+
}
|
|
46945
|
+
|
|
46370
46946
|
// src/commands/project/rm.ts
|
|
46371
46947
|
var import_chalk176 = __toESM(require_source(), 1);
|
|
46372
46948
|
var import_ms25 = __toESM(require_ms(), 1);
|
|
@@ -47101,6 +47677,12 @@ var ProjectTelemetryClient = class extends TelemetryClient {
|
|
|
47101
47677
|
value: actual
|
|
47102
47678
|
});
|
|
47103
47679
|
}
|
|
47680
|
+
trackCliSubcommandUpdate(actual) {
|
|
47681
|
+
this.trackCliSubcommand({
|
|
47682
|
+
subcommand: "update",
|
|
47683
|
+
value: actual
|
|
47684
|
+
});
|
|
47685
|
+
}
|
|
47104
47686
|
trackCliSubcommandToken(actual) {
|
|
47105
47687
|
this.trackCliSubcommand({
|
|
47106
47688
|
subcommand: "token",
|
|
@@ -47149,6 +47731,7 @@ var COMMAND_CONFIG35 = {
|
|
|
47149
47731
|
"access-summary": getCommandAliases(accessSummarySubcommand),
|
|
47150
47732
|
checks: getCommandAliases(checksSubcommand),
|
|
47151
47733
|
protection: getCommandAliases(protectionSubcommand),
|
|
47734
|
+
update: getCommandAliases(updateSubcommand5),
|
|
47152
47735
|
rename: getCommandAliases(renameSubcommand),
|
|
47153
47736
|
remove: getCommandAliases(removeSubcommand12),
|
|
47154
47737
|
token: getCommandAliases(tokenSubcommand2),
|
|
@@ -47292,6 +47875,14 @@ async function main25(client) {
|
|
|
47292
47875
|
telemetry2.trackCliSubcommandRename(subcommandOriginal);
|
|
47293
47876
|
exitCode2 = await rename(client, args);
|
|
47294
47877
|
break;
|
|
47878
|
+
case "update":
|
|
47879
|
+
if (needHelp) {
|
|
47880
|
+
telemetry2.trackCliFlagHelp("project", subcommandOriginal);
|
|
47881
|
+
return printHelp(updateSubcommand5);
|
|
47882
|
+
}
|
|
47883
|
+
telemetry2.trackCliSubcommandUpdate(subcommandOriginal);
|
|
47884
|
+
exitCode2 = await update4(client, args);
|
|
47885
|
+
break;
|
|
47295
47886
|
case "remove":
|
|
47296
47887
|
if (needHelp) {
|
|
47297
47888
|
telemetry2.trackCliFlagHelp("project", subcommandOriginal);
|
|
@@ -51200,9 +51791,21 @@ var COMMAND_CONFIG37 = {
|
|
|
51200
51791
|
complete: getCommandAliases(completeSubcommand),
|
|
51201
51792
|
fetch: getCommandAliases(fetchSubcommand)
|
|
51202
51793
|
};
|
|
51794
|
+
var SUBCOMMANDS = {
|
|
51795
|
+
configure: configureSubcommand,
|
|
51796
|
+
start: startSubcommand,
|
|
51797
|
+
approve: approveSubcommand,
|
|
51798
|
+
abort: abortSubcommand,
|
|
51799
|
+
complete: completeSubcommand,
|
|
51800
|
+
fetch: fetchSubcommand
|
|
51801
|
+
};
|
|
51802
|
+
function getRollingReleaseSubcommand(subcommand) {
|
|
51803
|
+
return typeof subcommand === "string" && subcommand in SUBCOMMANDS ? subcommand : void 0;
|
|
51804
|
+
}
|
|
51203
51805
|
function buildDeploymentSuggestionCommands(client, subcmd) {
|
|
51204
51806
|
const args = client.argv.slice(2);
|
|
51205
51807
|
const preservedParts = [];
|
|
51808
|
+
const listParts = [];
|
|
51206
51809
|
let hasNonInteractive = false;
|
|
51207
51810
|
for (let i = 2; i < args.length; i++) {
|
|
51208
51811
|
const arg = args[i];
|
|
@@ -51214,20 +51817,40 @@ function buildDeploymentSuggestionCommands(client, subcmd) {
|
|
|
51214
51817
|
const cwdPath = arg.slice(6);
|
|
51215
51818
|
if (cwdPath) {
|
|
51216
51819
|
preservedParts.push("--cwd", cwdPath);
|
|
51820
|
+
listParts.push("--cwd", cwdPath);
|
|
51217
51821
|
}
|
|
51218
51822
|
continue;
|
|
51219
51823
|
}
|
|
51220
51824
|
if (arg === "--cwd") {
|
|
51221
51825
|
if (i + 1 < args.length) {
|
|
51222
51826
|
preservedParts.push("--cwd", args[i + 1]);
|
|
51827
|
+
listParts.push("--cwd", args[i + 1]);
|
|
51828
|
+
i++;
|
|
51829
|
+
}
|
|
51830
|
+
continue;
|
|
51831
|
+
}
|
|
51832
|
+
if (arg.startsWith("--project=")) {
|
|
51833
|
+
const projectName = arg.slice("--project=".length);
|
|
51834
|
+
if (projectName) {
|
|
51835
|
+
listParts.push(projectName);
|
|
51836
|
+
}
|
|
51837
|
+
preservedParts.push(arg);
|
|
51838
|
+
continue;
|
|
51839
|
+
}
|
|
51840
|
+
if (arg === "--project") {
|
|
51841
|
+
if (i + 1 < args.length) {
|
|
51842
|
+
listParts.push(args[i + 1]);
|
|
51843
|
+
preservedParts.push(arg, args[i + 1]);
|
|
51223
51844
|
i++;
|
|
51224
51845
|
}
|
|
51225
51846
|
continue;
|
|
51226
51847
|
}
|
|
51227
51848
|
preservedParts.push(arg);
|
|
51849
|
+
listParts.push(arg);
|
|
51228
51850
|
}
|
|
51229
51851
|
const preservedSuffix = preservedParts.join(" ");
|
|
51230
|
-
const
|
|
51852
|
+
const listSuffix = listParts.join(" ");
|
|
51853
|
+
const listCommand = listSuffix ? `${packageName} ls ${listSuffix}` : `${packageName} ls`;
|
|
51231
51854
|
const base = preservedSuffix ? `${packageName} rolling-release ${subcmd} ${preservedSuffix}` : `${packageName} rolling-release ${subcmd}`;
|
|
51232
51855
|
const defaultSuffix = subcmd === "approve" ? "--dpl dpl_123 --currentStageIndex=0" : "--dpl dpl_123";
|
|
51233
51856
|
const subcommandCommand = hasNonInteractive ? `${base} ${defaultSuffix} --non-interactive` : `${base} ${defaultSuffix}`;
|
|
@@ -51277,7 +51900,24 @@ async function rollingRelease(client) {
|
|
|
51277
51900
|
);
|
|
51278
51901
|
}
|
|
51279
51902
|
try {
|
|
51280
|
-
const
|
|
51903
|
+
const subcommandName = getRollingReleaseSubcommand(subcommand);
|
|
51904
|
+
const subcommandConfig = subcommandName ? SUBCOMMANDS[subcommandName] : void 0;
|
|
51905
|
+
if (subcommandConfig && needHelp) {
|
|
51906
|
+
telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
|
|
51907
|
+
printHelp(subcommandConfig);
|
|
51908
|
+
return 2;
|
|
51909
|
+
}
|
|
51910
|
+
let subcommandFlags;
|
|
51911
|
+
let projectName;
|
|
51912
|
+
if (subcommandConfig) {
|
|
51913
|
+
subcommandFlags = parseArguments(
|
|
51914
|
+
subcommandArgs,
|
|
51915
|
+
getFlagsSpecification(subcommandConfig.options)
|
|
51916
|
+
);
|
|
51917
|
+
projectName = subcommandFlags.flags["--project"];
|
|
51918
|
+
telemetry2.trackCliOptionProject(projectName);
|
|
51919
|
+
}
|
|
51920
|
+
const link = await getLinkedProjectOrFail(client, projectName);
|
|
51281
51921
|
if (link.status === "error") {
|
|
51282
51922
|
return link.exitCode;
|
|
51283
51923
|
}
|
|
@@ -51301,18 +51941,16 @@ async function rollingRelease(client) {
|
|
|
51301
51941
|
}
|
|
51302
51942
|
const { project, org } = link;
|
|
51303
51943
|
client.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
51304
|
-
|
|
51305
|
-
|
|
51944
|
+
if (!subcommandName || !subcommandFlags) {
|
|
51945
|
+
output_manager_default.debug(`Invalid subcommand: ${subcommand}`);
|
|
51946
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG37));
|
|
51947
|
+
output_manager_default.print(
|
|
51948
|
+
help(rollingReleaseCommand, { columns: client.stderr.columns })
|
|
51949
|
+
);
|
|
51950
|
+
return 2;
|
|
51951
|
+
}
|
|
51952
|
+
switch (subcommandName) {
|
|
51306
51953
|
case "configure": {
|
|
51307
|
-
if (needHelp) {
|
|
51308
|
-
telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
|
|
51309
|
-
printHelp(configureSubcommand);
|
|
51310
|
-
return 2;
|
|
51311
|
-
}
|
|
51312
|
-
subcommandFlags = parseArguments(
|
|
51313
|
-
subcommandArgs,
|
|
51314
|
-
getFlagsSpecification(configureSubcommand.options)
|
|
51315
|
-
);
|
|
51316
51954
|
const cfgString = subcommandFlags.flags["--cfg"];
|
|
51317
51955
|
const enableFlag = subcommandFlags.flags["--enable"];
|
|
51318
51956
|
const disableFlag = subcommandFlags.flags["--disable"];
|
|
@@ -51342,15 +51980,6 @@ async function rollingRelease(client) {
|
|
|
51342
51980
|
break;
|
|
51343
51981
|
}
|
|
51344
51982
|
case "start": {
|
|
51345
|
-
if (needHelp) {
|
|
51346
|
-
telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
|
|
51347
|
-
printHelp(startSubcommand);
|
|
51348
|
-
return 2;
|
|
51349
|
-
}
|
|
51350
|
-
subcommandFlags = parseArguments(
|
|
51351
|
-
subcommandArgs,
|
|
51352
|
-
getFlagsSpecification(startSubcommand.options)
|
|
51353
|
-
);
|
|
51354
51983
|
const dpl = subcommandFlags.flags["--dpl"];
|
|
51355
51984
|
if (dpl === void 0) {
|
|
51356
51985
|
if (client.nonInteractive) {
|
|
@@ -51387,15 +52016,6 @@ async function rollingRelease(client) {
|
|
|
51387
52016
|
break;
|
|
51388
52017
|
}
|
|
51389
52018
|
case "approve": {
|
|
51390
|
-
if (needHelp) {
|
|
51391
|
-
telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
|
|
51392
|
-
printHelp(approveSubcommand);
|
|
51393
|
-
return 2;
|
|
51394
|
-
}
|
|
51395
|
-
subcommandFlags = parseArguments(
|
|
51396
|
-
subcommandArgs,
|
|
51397
|
-
getFlagsSpecification(approveSubcommand.options)
|
|
51398
|
-
);
|
|
51399
52019
|
const dpl = subcommandFlags.flags["--dpl"];
|
|
51400
52020
|
const currentStageIndex = subcommandFlags.flags["--currentStageIndex"];
|
|
51401
52021
|
const activeStageIndex = parseInt(currentStageIndex ?? "");
|
|
@@ -51445,15 +52065,6 @@ async function rollingRelease(client) {
|
|
|
51445
52065
|
break;
|
|
51446
52066
|
}
|
|
51447
52067
|
case "abort": {
|
|
51448
|
-
if (needHelp) {
|
|
51449
|
-
telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
|
|
51450
|
-
printHelp(abortSubcommand);
|
|
51451
|
-
return 2;
|
|
51452
|
-
}
|
|
51453
|
-
subcommandFlags = parseArguments(
|
|
51454
|
-
subcommandArgs,
|
|
51455
|
-
getFlagsSpecification(abortSubcommand.options)
|
|
51456
|
-
);
|
|
51457
52068
|
const dpl = subcommandFlags.flags["--dpl"];
|
|
51458
52069
|
if (!dpl) {
|
|
51459
52070
|
if (client.nonInteractive) {
|
|
@@ -51489,15 +52100,6 @@ async function rollingRelease(client) {
|
|
|
51489
52100
|
break;
|
|
51490
52101
|
}
|
|
51491
52102
|
case "complete": {
|
|
51492
|
-
if (needHelp) {
|
|
51493
|
-
telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
|
|
51494
|
-
printHelp(completeSubcommand);
|
|
51495
|
-
return 2;
|
|
51496
|
-
}
|
|
51497
|
-
subcommandFlags = parseArguments(
|
|
51498
|
-
subcommandArgs,
|
|
51499
|
-
getFlagsSpecification(completeSubcommand.options)
|
|
51500
|
-
);
|
|
51501
52103
|
const dpl = subcommandFlags.flags["--dpl"];
|
|
51502
52104
|
if (!dpl) {
|
|
51503
52105
|
if (client.nonInteractive) {
|
|
@@ -51520,11 +52122,6 @@ async function rollingRelease(client) {
|
|
|
51520
52122
|
break;
|
|
51521
52123
|
}
|
|
51522
52124
|
case "fetch": {
|
|
51523
|
-
if (needHelp) {
|
|
51524
|
-
telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
|
|
51525
|
-
printHelp(fetchSubcommand);
|
|
51526
|
-
return 2;
|
|
51527
|
-
}
|
|
51528
52125
|
const result = await requestRollingRelease({
|
|
51529
52126
|
client,
|
|
51530
52127
|
projectId: project.id,
|
|
@@ -51533,14 +52130,6 @@ async function rollingRelease(client) {
|
|
|
51533
52130
|
output_manager_default.log(JSON.stringify(result, null, 2));
|
|
51534
52131
|
break;
|
|
51535
52132
|
}
|
|
51536
|
-
default: {
|
|
51537
|
-
output_manager_default.debug(`Invalid subcommand: ${subcommand}`);
|
|
51538
|
-
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG37));
|
|
51539
|
-
output_manager_default.print(
|
|
51540
|
-
help(rollingReleaseCommand, { columns: client.stderr.columns })
|
|
51541
|
-
);
|
|
51542
|
-
return 2;
|
|
51543
|
-
}
|
|
51544
52133
|
}
|
|
51545
52134
|
return 0;
|
|
51546
52135
|
} catch (err) {
|
|
@@ -53590,7 +54179,7 @@ async function main27(client) {
|
|
|
53590
54179
|
return 2;
|
|
53591
54180
|
}
|
|
53592
54181
|
telemetry2.trackCliSubcommandEdit(subcommandOriginal);
|
|
53593
|
-
return (await import("./chunks/edit-
|
|
54182
|
+
return (await import("./chunks/edit-SW4MF4Q3.js")).default(client, args);
|
|
53594
54183
|
case "delete":
|
|
53595
54184
|
if (needHelp) {
|
|
53596
54185
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -53598,7 +54187,7 @@ async function main27(client) {
|
|
|
53598
54187
|
return 2;
|
|
53599
54188
|
}
|
|
53600
54189
|
telemetry2.trackCliSubcommandDelete(subcommandOriginal);
|
|
53601
|
-
return (await import("./chunks/delete-
|
|
54190
|
+
return (await import("./chunks/delete-L7TN5GNZ.js")).default(client, args);
|
|
53602
54191
|
case "enable":
|
|
53603
54192
|
if (needHelp) {
|
|
53604
54193
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -53606,7 +54195,7 @@ async function main27(client) {
|
|
|
53606
54195
|
return 2;
|
|
53607
54196
|
}
|
|
53608
54197
|
telemetry2.trackCliSubcommandEnable(subcommandOriginal);
|
|
53609
|
-
return (await import("./chunks/enable-
|
|
54198
|
+
return (await import("./chunks/enable-FOKEO6J2.js")).default(client, args);
|
|
53610
54199
|
case "disable":
|
|
53611
54200
|
if (needHelp) {
|
|
53612
54201
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -53614,7 +54203,7 @@ async function main27(client) {
|
|
|
53614
54203
|
return 2;
|
|
53615
54204
|
}
|
|
53616
54205
|
telemetry2.trackCliSubcommandDisable(subcommandOriginal);
|
|
53617
|
-
return (await import("./chunks/disable-
|
|
54206
|
+
return (await import("./chunks/disable-7NVU4H2N.js")).default(client, args);
|
|
53618
54207
|
case "reorder":
|
|
53619
54208
|
if (needHelp) {
|
|
53620
54209
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -53622,7 +54211,7 @@ async function main27(client) {
|
|
|
53622
54211
|
return 2;
|
|
53623
54212
|
}
|
|
53624
54213
|
telemetry2.trackCliSubcommandReorder(subcommandOriginal);
|
|
53625
|
-
return (await import("./chunks/reorder-
|
|
54214
|
+
return (await import("./chunks/reorder-FEZIPHNW.js")).default(client, args);
|
|
53626
54215
|
case "export":
|
|
53627
54216
|
if (needHelp) {
|
|
53628
54217
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -53630,7 +54219,7 @@ async function main27(client) {
|
|
|
53630
54219
|
return 2;
|
|
53631
54220
|
}
|
|
53632
54221
|
telemetry2.trackCliSubcommandExport(subcommandOriginal);
|
|
53633
|
-
return (await import("./chunks/export-
|
|
54222
|
+
return (await import("./chunks/export-3DSHT2FD.js")).default(client, args);
|
|
53634
54223
|
case "publish":
|
|
53635
54224
|
if (needHelp) {
|
|
53636
54225
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -53638,7 +54227,7 @@ async function main27(client) {
|
|
|
53638
54227
|
return 2;
|
|
53639
54228
|
}
|
|
53640
54229
|
telemetry2.trackCliSubcommandPublish(subcommandOriginal);
|
|
53641
|
-
return (await import("./chunks/publish-
|
|
54230
|
+
return (await import("./chunks/publish-RZ2DIYRU.js")).default(client, args);
|
|
53642
54231
|
case "restore":
|
|
53643
54232
|
if (needHelp) {
|
|
53644
54233
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -53646,7 +54235,7 @@ async function main27(client) {
|
|
|
53646
54235
|
return 2;
|
|
53647
54236
|
}
|
|
53648
54237
|
telemetry2.trackCliSubcommandRestore(subcommandOriginal);
|
|
53649
|
-
return (await import("./chunks/restore-
|
|
54238
|
+
return (await import("./chunks/restore-JHH6CW2S.js")).default(client, args);
|
|
53650
54239
|
case "discard-staging":
|
|
53651
54240
|
if (needHelp) {
|
|
53652
54241
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -53654,7 +54243,7 @@ async function main27(client) {
|
|
|
53654
54243
|
return 2;
|
|
53655
54244
|
}
|
|
53656
54245
|
telemetry2.trackCliSubcommandDiscardStaging(subcommandOriginal);
|
|
53657
|
-
return (await import("./chunks/discard-
|
|
54246
|
+
return (await import("./chunks/discard-SJ2TDPS2.js")).default(client, args);
|
|
53658
54247
|
default:
|
|
53659
54248
|
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG38));
|
|
53660
54249
|
output_manager_default.print(help(routesCommand, { columns: client.stderr.columns }));
|
|
@@ -53726,7 +54315,7 @@ async function sandbox(client) {
|
|
|
53726
54315
|
|
|
53727
54316
|
// src/commands/skills/index.ts
|
|
53728
54317
|
var import_chalk199 = __toESM(require_source(), 1);
|
|
53729
|
-
var
|
|
54318
|
+
var import_frameworks3 = __toESM(require_frameworks(), 1);
|
|
53730
54319
|
var import_fs_detectors = __toESM(require_dist3(), 1);
|
|
53731
54320
|
import { access as access2, readFile as readFile7 } from "fs/promises";
|
|
53732
54321
|
import { join as join8 } from "path";
|
|
@@ -53822,7 +54411,7 @@ async function searchSkills(query) {
|
|
|
53822
54411
|
async function detectProjectFramework(cwd) {
|
|
53823
54412
|
try {
|
|
53824
54413
|
const fs2 = new import_fs_detectors.LocalFileSystemDetector(cwd);
|
|
53825
|
-
const detected = await (0, import_fs_detectors.detectFrameworks)({ fs: fs2, frameworkList:
|
|
54414
|
+
const detected = await (0, import_fs_detectors.detectFrameworks)({ fs: fs2, frameworkList: import_frameworks3.frameworkList });
|
|
53826
54415
|
if (detected.length > 0) {
|
|
53827
54416
|
return { name: detected[0].name, slug: detected[0].slug || "" };
|
|
53828
54417
|
}
|
|
@@ -58233,22 +58822,22 @@ async function vcr(client) {
|
|
|
58233
58822
|
switch (subcommand) {
|
|
58234
58823
|
case "ls":
|
|
58235
58824
|
telemetry2.trackCliSubcommandLs(subcommandOriginal);
|
|
58236
|
-
return (await import("./chunks/ls-
|
|
58825
|
+
return (await import("./chunks/ls-5KN5FKAQ.js")).default(client, args, telemetry2);
|
|
58237
58826
|
case "inspect":
|
|
58238
58827
|
telemetry2.trackCliSubcommandInspect(subcommandOriginal);
|
|
58239
|
-
return (await import("./chunks/inspect-
|
|
58828
|
+
return (await import("./chunks/inspect-DJ7OGHBK.js")).default(client, args, telemetry2);
|
|
58240
58829
|
case "add":
|
|
58241
58830
|
telemetry2.trackCliSubcommandAdd(subcommandOriginal);
|
|
58242
|
-
return (await import("./chunks/add-
|
|
58831
|
+
return (await import("./chunks/add-UMB55BRR.js")).default(client, args, telemetry2);
|
|
58243
58832
|
case "rm":
|
|
58244
58833
|
telemetry2.trackCliSubcommandRm(subcommandOriginal);
|
|
58245
|
-
return (await import("./chunks/rm-
|
|
58834
|
+
return (await import("./chunks/rm-EKPVQYGH.js")).default(client, args, telemetry2);
|
|
58246
58835
|
case "tag":
|
|
58247
58836
|
telemetry2.trackCliSubcommandTag(subcommandOriginal);
|
|
58248
|
-
return (await import("./chunks/tags-
|
|
58837
|
+
return (await import("./chunks/tags-BLBAPEWV.js")).default(client, args, telemetry2);
|
|
58249
58838
|
case "image":
|
|
58250
58839
|
telemetry2.trackCliSubcommandImage(subcommandOriginal);
|
|
58251
|
-
return (await import("./chunks/image-
|
|
58840
|
+
return (await import("./chunks/image-T6I7BZSC.js")).default(client, args, telemetry2);
|
|
58252
58841
|
default:
|
|
58253
58842
|
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG44));
|
|
58254
58843
|
output_manager_default.print(help(vcrCommand, { columns: client.stderr.columns }));
|