vercel 53.1.1 → 53.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{add-UAZIKU22.js → add-PGPQCMJK.js} +9 -9
- package/dist/chunks/{chunk-5B27ZNJB.js → chunk-25WI74GM.js} +7 -7
- package/dist/chunks/{chunk-C7FXVPAA.js → chunk-2TNGZL25.js} +2 -2
- package/dist/chunks/{chunk-T2DVW5BM.js → chunk-3GJFG6GX.js} +4 -4
- package/dist/chunks/{chunk-4Q5VS23S.js → chunk-3NSIZGHP.js} +3 -3
- package/dist/chunks/{chunk-QIHIANBF.js → chunk-3XU5UGVN.js} +1 -0
- package/dist/chunks/{chunk-NFAQ5Q3Z.js → chunk-3YDXZRSZ.js} +2 -2
- package/dist/chunks/{chunk-KFFW6MSL.js → chunk-4L73BR7G.js} +11 -12
- package/dist/chunks/{chunk-HMM7V4AU.js → chunk-4LDQIDKG.js} +2 -2
- package/dist/chunks/{chunk-4Z7KJQGN.js → chunk-4OEA5ILS.js} +0 -1
- package/dist/chunks/{chunk-WMD7Y6HT.js → chunk-4VJ3GTBX.js} +1 -1
- package/dist/chunks/{chunk-KOCX7HWE.js → chunk-7EJTBI6M.js} +11 -11
- package/dist/chunks/{chunk-VQSAZO3U.js → chunk-7Z5XFBB4.js} +140 -86
- package/dist/chunks/{chunk-5GMV7WTU.js → chunk-AAPG3P4D.js} +9 -11
- package/dist/chunks/{chunk-WS4HI35O.js → chunk-AORK3I3E.js} +1 -1
- package/dist/chunks/{chunk-IABMY4Q3.js → chunk-AXQNAI65.js} +1 -1
- package/dist/chunks/{chunk-XZ7CVBQ4.js → chunk-EBEBY45K.js} +11 -1
- package/dist/chunks/{chunk-LN5ZMLBU.js → chunk-GCKUEAUE.js} +2 -2
- package/dist/chunks/{chunk-JNOMOD7R.js → chunk-GQLARSTH.js} +1 -1
- package/dist/chunks/{chunk-JDKASMB2.js → chunk-H57DZL5B.js} +3 -3
- package/dist/chunks/{chunk-NCUOSZ6X.js → chunk-HAJ2XRTQ.js} +2 -2
- package/dist/chunks/{chunk-AES77UB7.js → chunk-HJVSVCAZ.js} +59 -14
- package/dist/chunks/{chunk-3LRN4Q7G.js → chunk-IS56OO2J.js} +3 -3
- package/dist/chunks/{chunk-SPXTKMOV.js → chunk-JJ36CB7A.js} +722 -938
- package/dist/chunks/{chunk-P3H4MP5H.js → chunk-JZLADLMF.js} +2 -2
- package/dist/chunks/{chunk-ABDTA3V2.js → chunk-KSIISCB2.js} +1 -1
- package/dist/chunks/{chunk-VS4O4MKY.js → chunk-MUBKPS2Z.js} +1 -1
- package/dist/chunks/{chunk-DFUTSURK.js → chunk-NF7HK5MP.js} +2 -2
- package/dist/chunks/{chunk-77JGNI4Z.js → chunk-NIOGCTVR.js} +2 -2
- package/dist/chunks/{chunk-5EDL2IVB.js → chunk-ONYQGA2O.js} +2 -2
- package/dist/chunks/{chunk-EYQEF55O.js → chunk-PR72OE3G.js} +4 -3
- package/dist/chunks/{chunk-IEKDY4FP.js → chunk-QGLS47RE.js} +1 -1
- package/dist/chunks/{chunk-BAAZFRLH.js → chunk-QV34LTI7.js} +420 -108
- package/dist/chunks/{chunk-YIK5Y7MI.js → chunk-RI23R2QO.js} +4 -4
- package/dist/chunks/{chunk-LDFOVKJS.js → chunk-RYUPBGRO.js} +34 -45
- package/dist/chunks/{chunk-3P3YBOCQ.js → chunk-SOSCFYOT.js} +2 -2
- package/dist/chunks/{chunk-JPVQD2PJ.js → chunk-TR6DYQV6.js} +1 -1
- package/dist/chunks/{chunk-JCLLQ23G.js → chunk-WOWCXMTU.js} +1 -1
- package/dist/chunks/{chunk-MSJX3VKI.js → chunk-X7KU44KR.js} +1 -1
- package/dist/chunks/{chunk-GDOCMDCB.js → chunk-XYYGNWMQ.js} +4 -4
- package/dist/chunks/{compile-vercel-config-BUURMPDD.js → compile-vercel-config-H4BUE5BZ.js} +5 -5
- package/dist/chunks/{delete-GBLJYO3T.js → delete-HVWVDBQF.js} +7 -7
- package/dist/chunks/{disable-QFE5TGWG.js → disable-CMBQPZ7L.js} +7 -7
- package/dist/chunks/{discard-IPPO7M2N.js → discard-ZDNWUYLY.js} +7 -7
- package/dist/chunks/{edit-KQD3MEZA.js → edit-YJYM3EKS.js} +9 -9
- package/dist/chunks/{enable-JBL4DMGJ.js → enable-ITE7U5C4.js} +7 -7
- package/dist/chunks/{export-KLWZUAYD.js → export-VVN33IBK.js} +7 -7
- package/dist/chunks/{inspect-TWW2XBDE.js → inspect-I7ILS3E2.js} +9 -9
- package/dist/chunks/{list-WJGLZ5ES.js → list-6PZO3UIZ.js} +7 -7
- package/dist/chunks/{list-UM77B7WK.js → list-BWIEHOTA.js} +10 -10
- package/dist/chunks/{ls-WVHDFPT3.js → ls-LZZFID76.js} +9 -9
- package/dist/chunks/{publish-45SAIZE4.js → publish-NULVZ7RB.js} +7 -7
- package/dist/chunks/{query-VH2TS6IS.js → query-BGI3AVJA.js} +9 -9
- package/dist/chunks/{reorder-NYENR2XY.js → reorder-G66QSKTR.js} +7 -7
- package/dist/chunks/{restore-H2VIG7KZ.js → restore-LHDVXFOH.js} +7 -7
- package/dist/chunks/{rm-RQEP4KMK.js → rm-DTAOTWXD.js} +9 -9
- package/dist/chunks/{routes-KDWN24QA.js → routes-2YVMQEPC.js} +2 -2
- package/dist/chunks/{rule-inspect-GR3RMO2J.js → rule-inspect-AOITFBTB.js} +9 -9
- package/dist/chunks/{rules-EOBQZE3T.js → rules-IW3XGCNA.js} +8 -8
- package/dist/chunks/{schema-OOGMY2SS.js → schema-2VCQ2MAA.js} +10 -10
- package/dist/chunks/{types-FAFL42RV.js → types-7VDI75PV.js} +4 -4
- package/dist/chunks/{update-VLOWX7UQ.js → update-L3DZ5STE.js} +9 -9
- package/dist/commands/build/index.js +21 -26
- package/dist/commands/deploy/index.js +87 -34
- package/dist/commands/dev/index.js +15 -15
- package/dist/commands/env/index.js +19 -19
- package/dist/commands/link/index.js +26 -22
- package/dist/commands/list/index.js +11 -11
- package/dist/commands-bulk.js +397 -214
- package/dist/help.js +1 -1
- package/dist/index.js +299 -49
- package/dist/version.mjs +1 -1
- package/package.json +27 -30
package/dist/commands-bulk.js
CHANGED
|
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
RoutesAddTelemetryClient,
|
|
9
9
|
RoutesTelemetryClient
|
|
10
|
-
} from "./chunks/chunk-
|
|
10
|
+
} from "./chunks/chunk-MUBKPS2Z.js";
|
|
11
11
|
import {
|
|
12
12
|
ALL_ACTION_CHOICES,
|
|
13
13
|
MAX_CONDITIONS,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
runInteractiveEditLoop,
|
|
29
29
|
stripQuotes,
|
|
30
30
|
validateActionFlags
|
|
31
|
-
} from "./chunks/chunk-
|
|
31
|
+
} from "./chunks/chunk-AORK3I3E.js";
|
|
32
32
|
import {
|
|
33
33
|
getRouteVersions
|
|
34
34
|
} from "./chunks/chunk-AHU7WNL2.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
parsePosition,
|
|
46
46
|
parseSubcommandArgs,
|
|
47
47
|
withGlobalFlags
|
|
48
|
-
} from "./chunks/chunk-
|
|
48
|
+
} from "./chunks/chunk-XYYGNWMQ.js";
|
|
49
49
|
import {
|
|
50
50
|
indent_default
|
|
51
51
|
} from "./chunks/chunk-A3NYPUKZ.js";
|
|
@@ -59,11 +59,11 @@ import {
|
|
|
59
59
|
resolveOpenApiTagForProjectsCli,
|
|
60
60
|
resolveOpenApiTagForTeamsCli,
|
|
61
61
|
tryOpenApiFallback
|
|
62
|
-
} from "./chunks/chunk-
|
|
62
|
+
} from "./chunks/chunk-AAPG3P4D.js";
|
|
63
63
|
import {
|
|
64
64
|
getUpdateCommand,
|
|
65
65
|
isGlobal
|
|
66
|
-
} from "./chunks/chunk-
|
|
66
|
+
} from "./chunks/chunk-3YDXZRSZ.js";
|
|
67
67
|
import {
|
|
68
68
|
Now,
|
|
69
69
|
collectContactInformation,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
require_format,
|
|
86
86
|
require_jsonlines,
|
|
87
87
|
setupDomain
|
|
88
|
-
} from "./chunks/chunk-
|
|
88
|
+
} from "./chunks/chunk-7EJTBI6M.js";
|
|
89
89
|
import {
|
|
90
90
|
processRevocationResponse,
|
|
91
91
|
readLocalConfig,
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
sleep,
|
|
95
95
|
writeToAuthConfigFile,
|
|
96
96
|
writeToConfigFile
|
|
97
|
-
} from "./chunks/chunk-
|
|
97
|
+
} from "./chunks/chunk-7Z5XFBB4.js";
|
|
98
98
|
import "./chunks/chunk-V5P25P7F.js";
|
|
99
99
|
import {
|
|
100
100
|
getCustomEnvironments,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
} from "./chunks/chunk-C5YP6KFI.js";
|
|
106
106
|
import {
|
|
107
107
|
formatTable
|
|
108
|
-
} from "./chunks/chunk-
|
|
108
|
+
} from "./chunks/chunk-NF7HK5MP.js";
|
|
109
109
|
import "./chunks/chunk-LOS7HHU3.js";
|
|
110
110
|
import {
|
|
111
111
|
isValidName
|
|
@@ -117,11 +117,11 @@ import {
|
|
|
117
117
|
getDeployment,
|
|
118
118
|
mapCertError,
|
|
119
119
|
toHost
|
|
120
|
-
} from "./chunks/chunk-
|
|
120
|
+
} from "./chunks/chunk-X7KU44KR.js";
|
|
121
121
|
import {
|
|
122
122
|
formatEnvironment,
|
|
123
123
|
validateLsArgs
|
|
124
|
-
} from "./chunks/chunk-
|
|
124
|
+
} from "./chunks/chunk-SOSCFYOT.js";
|
|
125
125
|
import {
|
|
126
126
|
validateJsonOutput
|
|
127
127
|
} from "./chunks/chunk-XPKWKPWA.js";
|
|
@@ -364,7 +364,7 @@ import {
|
|
|
364
364
|
webAnalyticsSubcommand,
|
|
365
365
|
webhooksCommand,
|
|
366
366
|
whoamiCommand
|
|
367
|
-
} from "./chunks/chunk-
|
|
367
|
+
} from "./chunks/chunk-HJVSVCAZ.js";
|
|
368
368
|
import {
|
|
369
369
|
addSubcommand as addSubcommand9,
|
|
370
370
|
deleteSubcommand,
|
|
@@ -380,21 +380,21 @@ import {
|
|
|
380
380
|
reorderSubcommand,
|
|
381
381
|
restoreSubcommand as restoreSubcommand2,
|
|
382
382
|
routesCommand
|
|
383
|
-
} from "./chunks/chunk-
|
|
383
|
+
} from "./chunks/chunk-4LDQIDKG.js";
|
|
384
384
|
import {
|
|
385
385
|
metricsCommand,
|
|
386
386
|
schemaSubcommand
|
|
387
|
-
} from "./chunks/chunk-
|
|
388
|
-
import "./chunks/chunk-
|
|
387
|
+
} from "./chunks/chunk-NIOGCTVR.js";
|
|
388
|
+
import "./chunks/chunk-HAJ2XRTQ.js";
|
|
389
389
|
import {
|
|
390
390
|
activityCommand,
|
|
391
391
|
typesSubcommand
|
|
392
|
-
} from "./chunks/chunk-
|
|
392
|
+
} from "./chunks/chunk-GCKUEAUE.js";
|
|
393
393
|
import {
|
|
394
394
|
alertsCommand,
|
|
395
395
|
inspectSubcommand,
|
|
396
396
|
listSubcommand
|
|
397
|
-
} from "./chunks/chunk-
|
|
397
|
+
} from "./chunks/chunk-3NSIZGHP.js";
|
|
398
398
|
import {
|
|
399
399
|
rulesAddSubcommand,
|
|
400
400
|
rulesAggregateCommand,
|
|
@@ -402,15 +402,16 @@ import {
|
|
|
402
402
|
rulesLsSubcommand,
|
|
403
403
|
rulesRmSubcommand,
|
|
404
404
|
rulesUpdateSubcommand
|
|
405
|
-
} from "./chunks/chunk-
|
|
405
|
+
} from "./chunks/chunk-JZLADLMF.js";
|
|
406
406
|
import {
|
|
407
|
+
detectExplicitScope,
|
|
407
408
|
getScope
|
|
408
|
-
} from "./chunks/chunk-
|
|
409
|
-
import "./chunks/chunk-
|
|
409
|
+
} from "./chunks/chunk-PR72OE3G.js";
|
|
410
|
+
import "./chunks/chunk-ONYQGA2O.js";
|
|
410
411
|
import {
|
|
411
412
|
main
|
|
412
|
-
} from "./chunks/chunk-
|
|
413
|
-
import "./chunks/chunk-
|
|
413
|
+
} from "./chunks/chunk-25WI74GM.js";
|
|
414
|
+
import "./chunks/chunk-TR6DYQV6.js";
|
|
414
415
|
import {
|
|
415
416
|
AGENT_ACTION,
|
|
416
417
|
AGENT_REASON,
|
|
@@ -418,24 +419,24 @@ import {
|
|
|
418
419
|
} from "./chunks/chunk-E3NE4SKN.js";
|
|
419
420
|
import {
|
|
420
421
|
ua_default
|
|
421
|
-
} from "./chunks/chunk-
|
|
422
|
+
} from "./chunks/chunk-WOWCXMTU.js";
|
|
422
423
|
import {
|
|
423
424
|
require_execa
|
|
424
|
-
} from "./chunks/chunk-
|
|
425
|
+
} from "./chunks/chunk-4VJ3GTBX.js";
|
|
425
426
|
import {
|
|
426
427
|
ensureLink
|
|
427
|
-
} from "./chunks/chunk-
|
|
428
|
-
import "./chunks/chunk-
|
|
429
|
-
import "./chunks/chunk-
|
|
428
|
+
} from "./chunks/chunk-3GJFG6GX.js";
|
|
429
|
+
import "./chunks/chunk-QV34LTI7.js";
|
|
430
|
+
import "./chunks/chunk-4L73BR7G.js";
|
|
430
431
|
import {
|
|
431
432
|
autoInstallVercelPlugin
|
|
432
|
-
} from "./chunks/chunk-
|
|
433
|
+
} from "./chunks/chunk-RYUPBGRO.js";
|
|
433
434
|
import {
|
|
434
435
|
help
|
|
435
|
-
} from "./chunks/chunk-
|
|
436
|
+
} from "./chunks/chunk-IS56OO2J.js";
|
|
436
437
|
import {
|
|
437
438
|
table
|
|
438
|
-
} from "./chunks/chunk-
|
|
439
|
+
} from "./chunks/chunk-KSIISCB2.js";
|
|
439
440
|
import {
|
|
440
441
|
STANDARD_ENVIRONMENTS,
|
|
441
442
|
VERCEL_CONFIG_EXTENSIONS,
|
|
@@ -475,10 +476,10 @@ import {
|
|
|
475
476
|
resolveProjectCwd,
|
|
476
477
|
selectAndParseRemoteUrl,
|
|
477
478
|
selectOrg
|
|
478
|
-
} from "./chunks/chunk-
|
|
479
|
+
} from "./chunks/chunk-JJ36CB7A.js";
|
|
479
480
|
import {
|
|
480
481
|
TelemetryClient
|
|
481
|
-
} from "./chunks/chunk-
|
|
482
|
+
} from "./chunks/chunk-4OEA5ILS.js";
|
|
482
483
|
import {
|
|
483
484
|
argvHasNonInteractive,
|
|
484
485
|
buildCommandWithGlobalFlags,
|
|
@@ -490,7 +491,7 @@ import {
|
|
|
490
491
|
outputActionRequired,
|
|
491
492
|
outputAgentError,
|
|
492
493
|
shouldEmitNonInteractiveCommandError
|
|
493
|
-
} from "./chunks/chunk-
|
|
494
|
+
} from "./chunks/chunk-AXQNAI65.js";
|
|
494
495
|
import {
|
|
495
496
|
elapsed,
|
|
496
497
|
require_ms,
|
|
@@ -505,7 +506,7 @@ import {
|
|
|
505
506
|
globalCliFlagTakesValue,
|
|
506
507
|
parseArguments,
|
|
507
508
|
printError
|
|
508
|
-
} from "./chunks/chunk-
|
|
509
|
+
} from "./chunks/chunk-GQLARSTH.js";
|
|
509
510
|
import {
|
|
510
511
|
APIError,
|
|
511
512
|
AliasInUse,
|
|
@@ -560,7 +561,7 @@ import {
|
|
|
560
561
|
require_bytes,
|
|
561
562
|
require_lib as require_lib2,
|
|
562
563
|
stripSensitiveAuthArgs
|
|
563
|
-
} from "./chunks/chunk-
|
|
564
|
+
} from "./chunks/chunk-EBEBY45K.js";
|
|
564
565
|
import {
|
|
565
566
|
emoji,
|
|
566
567
|
eraseLines,
|
|
@@ -848,7 +849,7 @@ async function activity(client) {
|
|
|
848
849
|
return 0;
|
|
849
850
|
}
|
|
850
851
|
telemetry2.trackCliSubcommandTypes(subcommandOriginal);
|
|
851
|
-
const typesFn = (await import("./chunks/types-
|
|
852
|
+
const typesFn = (await import("./chunks/types-7VDI75PV.js")).default;
|
|
852
853
|
return typesFn(client, telemetry2);
|
|
853
854
|
}
|
|
854
855
|
default: {
|
|
@@ -858,7 +859,7 @@ async function activity(client) {
|
|
|
858
859
|
return 0;
|
|
859
860
|
}
|
|
860
861
|
telemetry2.trackCliSubcommandLs(subcommandOriginal);
|
|
861
|
-
const listFn = (await import("./chunks/list-
|
|
862
|
+
const listFn = (await import("./chunks/list-6PZO3UIZ.js")).default;
|
|
862
863
|
return listFn(client, telemetry2);
|
|
863
864
|
}
|
|
864
865
|
}
|
|
@@ -1335,17 +1336,17 @@ async function alerts(client) {
|
|
|
1335
1336
|
switch (subcommand) {
|
|
1336
1337
|
case "inspect": {
|
|
1337
1338
|
telemetry2.trackCliSubcommandInspect(subcommandOriginal);
|
|
1338
|
-
const inspectFn = (await import("./chunks/inspect-
|
|
1339
|
+
const inspectFn = (await import("./chunks/inspect-I7ILS3E2.js")).default;
|
|
1339
1340
|
return inspectFn(client, args);
|
|
1340
1341
|
}
|
|
1341
1342
|
case "rules": {
|
|
1342
1343
|
telemetry2.trackCliSubcommandRules(args[0] ?? "ls");
|
|
1343
|
-
const rulesFn = (await import("./chunks/rules-
|
|
1344
|
+
const rulesFn = (await import("./chunks/rules-IW3XGCNA.js")).default;
|
|
1344
1345
|
return rulesFn(client, args);
|
|
1345
1346
|
}
|
|
1346
1347
|
default: {
|
|
1347
1348
|
telemetry2.trackCliSubcommandLs(subcommandOriginal);
|
|
1348
|
-
const listFn = (await import("./chunks/list-
|
|
1349
|
+
const listFn = (await import("./chunks/list-BWIEHOTA.js")).default;
|
|
1349
1350
|
return listFn(client, telemetry2);
|
|
1350
1351
|
}
|
|
1351
1352
|
}
|
|
@@ -5756,6 +5757,11 @@ var ConnexTelemetryClient = class extends TelemetryClient {
|
|
|
5756
5757
|
this.trackCliFlag("disconnect-all");
|
|
5757
5758
|
}
|
|
5758
5759
|
}
|
|
5760
|
+
trackCliFlagAllProjects(v) {
|
|
5761
|
+
if (v) {
|
|
5762
|
+
this.trackCliFlag("all-projects");
|
|
5763
|
+
}
|
|
5764
|
+
}
|
|
5759
5765
|
trackCliOptionLimit(v) {
|
|
5760
5766
|
if (v !== void 0) {
|
|
5761
5767
|
this.trackCliOption({
|
|
@@ -5903,6 +5909,7 @@ async function create2(client, args, flags) {
|
|
|
5903
5909
|
if (link?.projectId) {
|
|
5904
5910
|
body.projectId = link.projectId;
|
|
5905
5911
|
}
|
|
5912
|
+
body.triggers = { enabled: flags["--triggers"] === true };
|
|
5906
5913
|
output_manager_default.spinner("Setting up...");
|
|
5907
5914
|
let createdClient = null;
|
|
5908
5915
|
let browserUrl;
|
|
@@ -5981,7 +5988,6 @@ ${browserUrl}`);
|
|
|
5981
5988
|
|
|
5982
5989
|
// src/commands/connex/list.ts
|
|
5983
5990
|
var import_chalk22 = __toESM(require_source(), 1);
|
|
5984
|
-
var import_ms7 = __toESM(require_ms(), 1);
|
|
5985
5991
|
async function list5(client, flags) {
|
|
5986
5992
|
const formatResult = validateJsonOutput(flags);
|
|
5987
5993
|
if (!formatResult.valid) {
|
|
@@ -5989,10 +5995,31 @@ async function list5(client, flags) {
|
|
|
5989
5995
|
return 1;
|
|
5990
5996
|
}
|
|
5991
5997
|
const asJson = formatResult.jsonOutput;
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
)
|
|
5998
|
+
const allProjects = flags["--all-projects"] === true;
|
|
5999
|
+
let projectId;
|
|
6000
|
+
let projectName;
|
|
6001
|
+
if (!allProjects) {
|
|
6002
|
+
const linked = await getLinkedProject(client);
|
|
6003
|
+
if (linked.status === "error") {
|
|
6004
|
+
return linked.exitCode;
|
|
6005
|
+
}
|
|
6006
|
+
if (linked.status === "linked") {
|
|
6007
|
+
if (linked.org.type === "team") {
|
|
6008
|
+
client.config.currentTeam = linked.org.id;
|
|
6009
|
+
} else {
|
|
6010
|
+
client.config.currentTeam = void 0;
|
|
6011
|
+
}
|
|
6012
|
+
projectId = linked.project.id;
|
|
6013
|
+
projectName = linked.project.name;
|
|
6014
|
+
}
|
|
6015
|
+
}
|
|
6016
|
+
const unscoped = !projectId;
|
|
6017
|
+
if (unscoped) {
|
|
6018
|
+
await selectConnexTeam(
|
|
6019
|
+
client,
|
|
6020
|
+
"Select the team whose Connex clients you want to list"
|
|
6021
|
+
);
|
|
6022
|
+
}
|
|
5996
6023
|
const params = new URLSearchParams();
|
|
5997
6024
|
if (flags["--limit"] !== void 0) {
|
|
5998
6025
|
params.set("limit", String(flags["--limit"]));
|
|
@@ -6000,6 +6027,11 @@ async function list5(client, flags) {
|
|
|
6000
6027
|
if (flags["--next"]) {
|
|
6001
6028
|
params.set("cursor", flags["--next"]);
|
|
6002
6029
|
}
|
|
6030
|
+
if (unscoped) {
|
|
6031
|
+
params.set("include", "projects");
|
|
6032
|
+
} else if (projectId) {
|
|
6033
|
+
params.set("projectId", projectId);
|
|
6034
|
+
}
|
|
6003
6035
|
const query = params.toString();
|
|
6004
6036
|
const url = `/v1/connex/clients${query ? `?${query}` : ""}`;
|
|
6005
6037
|
output_manager_default.spinner("Fetching Connex clients\u2026");
|
|
@@ -6021,14 +6053,22 @@ async function list5(client, flags) {
|
|
|
6021
6053
|
output_manager_default.stopSpinner();
|
|
6022
6054
|
const clients = response.clients ?? [];
|
|
6023
6055
|
if (asJson) {
|
|
6024
|
-
const jsonClients = clients.map((c) =>
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6056
|
+
const jsonClients = clients.map((c) => {
|
|
6057
|
+
const item = {
|
|
6058
|
+
uid: c.uid,
|
|
6059
|
+
id: c.id,
|
|
6060
|
+
name: c.name,
|
|
6061
|
+
type: c.type,
|
|
6062
|
+
typeName: c.typeName,
|
|
6063
|
+
createdAt: c.createdAt
|
|
6064
|
+
};
|
|
6065
|
+
if (unscoped) {
|
|
6066
|
+
const projectsInclude = c.includes?.projects;
|
|
6067
|
+
item.projects = (projectsInclude?.items ?? []).map((p) => p.project).filter((p) => Boolean(p));
|
|
6068
|
+
item.hasMoreProjects = projectsInclude?.hasMore === true;
|
|
6069
|
+
}
|
|
6070
|
+
return item;
|
|
6071
|
+
});
|
|
6032
6072
|
client.stdout.write(
|
|
6033
6073
|
`${JSON.stringify({ clients: jsonClients, cursor: response.cursor }, null, 2)}
|
|
6034
6074
|
`
|
|
@@ -6036,35 +6076,59 @@ async function list5(client, flags) {
|
|
|
6036
6076
|
return 0;
|
|
6037
6077
|
}
|
|
6038
6078
|
if (clients.length === 0) {
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6079
|
+
if (unscoped) {
|
|
6080
|
+
output_manager_default.log(
|
|
6081
|
+
`No Connex clients found. Create one with \`${packageName} connex create <type>\`.`
|
|
6082
|
+
);
|
|
6083
|
+
} else {
|
|
6084
|
+
output_manager_default.log(
|
|
6085
|
+
`No Connex clients linked to ${import_chalk22.default.bold(projectName ?? "this project")}. Run \`${packageName} connex list --all-projects\` to see every client in the team.`
|
|
6086
|
+
);
|
|
6087
|
+
}
|
|
6042
6088
|
return 0;
|
|
6043
6089
|
}
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6090
|
+
if (!unscoped && projectName) {
|
|
6091
|
+
output_manager_default.log(`Connex clients linked to ${import_chalk22.default.bold(projectName)}:`);
|
|
6092
|
+
}
|
|
6093
|
+
const headers = ["UID", "ID", "Name", "Type"];
|
|
6094
|
+
if (unscoped) {
|
|
6095
|
+
headers.push("Projects");
|
|
6096
|
+
}
|
|
6097
|
+
const rows = clients.map((c) => {
|
|
6098
|
+
const row = [
|
|
6099
|
+
c.uid || import_chalk22.default.gray("\u2013"),
|
|
6100
|
+
c.id,
|
|
6101
|
+
c.name || import_chalk22.default.gray("\u2013"),
|
|
6102
|
+
c.typeName || c.type
|
|
6103
|
+
];
|
|
6104
|
+
if (unscoped) {
|
|
6105
|
+
const projectsInclude = c.includes?.projects;
|
|
6106
|
+
const names = (projectsInclude?.items ?? []).map((p) => p.project?.name).filter((n) => Boolean(n));
|
|
6107
|
+
const more = projectsInclude?.hasMore === true;
|
|
6108
|
+
let cell;
|
|
6109
|
+
if (names.length === 0 && !more) {
|
|
6110
|
+
cell = import_chalk22.default.gray("\u2013");
|
|
6111
|
+
} else {
|
|
6112
|
+
const parts = [];
|
|
6113
|
+
if (names.length)
|
|
6114
|
+
parts.push(names.join(", "));
|
|
6115
|
+
if (more)
|
|
6116
|
+
parts.push(import_chalk22.default.gray("+ more"));
|
|
6117
|
+
cell = parts.join(" ");
|
|
6118
|
+
}
|
|
6119
|
+
row.push(cell);
|
|
6120
|
+
}
|
|
6121
|
+
return row;
|
|
6122
|
+
});
|
|
6052
6123
|
output_manager_default.print(
|
|
6053
|
-
`${table(
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
(h) => import_chalk22.default.bold(import_chalk22.default.cyan(h))
|
|
6057
|
-
),
|
|
6058
|
-
...rows
|
|
6059
|
-
],
|
|
6060
|
-
{ hsep: 4 }
|
|
6061
|
-
)}
|
|
6124
|
+
`${table([headers.map((h) => import_chalk22.default.bold(import_chalk22.default.cyan(h))), ...rows], {
|
|
6125
|
+
hsep: 4
|
|
6126
|
+
})}
|
|
6062
6127
|
`
|
|
6063
6128
|
);
|
|
6064
6129
|
if (response.cursor) {
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
);
|
|
6130
|
+
const nextCommand = allProjects ? `${packageName} connex list --all-projects --next ${response.cursor}` : `${packageName} connex list --next ${response.cursor}`;
|
|
6131
|
+
output_manager_default.log(`To see more, run \`${nextCommand}\``);
|
|
6068
6132
|
}
|
|
6069
6133
|
return 0;
|
|
6070
6134
|
}
|
|
@@ -6131,19 +6195,20 @@ async function token(client, args, flags) {
|
|
|
6131
6195
|
return 1;
|
|
6132
6196
|
}
|
|
6133
6197
|
const actionLabel = errorCode === "user_authorization_required" ? "authorization" : "installation";
|
|
6134
|
-
const
|
|
6198
|
+
const isInteractive = Boolean(client.stdin.isTTY && client.stdout.isTTY);
|
|
6199
|
+
const attemptRecovery = Boolean(flags["--yes"]) || isInteractive;
|
|
6135
6200
|
if (!attemptRecovery) {
|
|
6136
6201
|
const { requestCode: requestCode2 } = generateRequestCode();
|
|
6137
6202
|
const actionUrl2 = buildActionUrl(errorCode, clientId, teamId, requestCode2);
|
|
6138
6203
|
output_manager_default.error(errorMessage);
|
|
6139
6204
|
output_manager_default.log(`To ${actionLabel}, open: ${actionUrl2}`);
|
|
6140
6205
|
output_manager_default.log(
|
|
6141
|
-
`Or re-run
|
|
6206
|
+
`Or re-run with --yes to open the browser automatically: vercel connex token ${clientId} --yes`
|
|
6142
6207
|
);
|
|
6143
6208
|
return 1;
|
|
6144
6209
|
}
|
|
6145
6210
|
output_manager_default.error(errorMessage);
|
|
6146
|
-
if (!flags["--yes"]) {
|
|
6211
|
+
if (!flags["--yes"] && isInteractive) {
|
|
6147
6212
|
const confirmed = await client.input.confirm(
|
|
6148
6213
|
`Open browser to ${actionLabel}?`,
|
|
6149
6214
|
true
|
|
@@ -6476,6 +6541,9 @@ async function connex(client) {
|
|
|
6476
6541
|
telemetry2.trackCliSubcommandList(subcommandOriginal);
|
|
6477
6542
|
const listFlagsSpec = getFlagsSpecification(listSubcommand4.options);
|
|
6478
6543
|
const listParsedArgs = parseArguments(subArgs, listFlagsSpec);
|
|
6544
|
+
telemetry2.trackCliFlagAllProjects(
|
|
6545
|
+
listParsedArgs.flags["--all-projects"]
|
|
6546
|
+
);
|
|
6479
6547
|
telemetry2.trackCliOptionLimit(listParsedArgs.flags["--limit"]);
|
|
6480
6548
|
telemetry2.trackCliOptionNext(listParsedArgs.flags["--next"]);
|
|
6481
6549
|
telemetry2.trackCliOptionFormat(listParsedArgs.flags["--format"]);
|
|
@@ -7156,7 +7224,7 @@ async function runStartOrder(client, cns, contextName, stamp, { fallingBack = fa
|
|
|
7156
7224
|
|
|
7157
7225
|
// src/commands/certs/ls.ts
|
|
7158
7226
|
var import_chalk30 = __toESM(require_source(), 1);
|
|
7159
|
-
var
|
|
7227
|
+
var import_ms7 = __toESM(require_ms(), 1);
|
|
7160
7228
|
|
|
7161
7229
|
// src/util/certs/get-certs.ts
|
|
7162
7230
|
async function getCerts(client, next, limit = 20) {
|
|
@@ -7279,18 +7347,18 @@ function formatCertFirstCn(time, cert, cn, multiple) {
|
|
|
7279
7347
|
formatCertCn(cn, multiple),
|
|
7280
7348
|
formatExpirationDate(new Date(cert.expiration)),
|
|
7281
7349
|
cert.autoRenew ? "yes" : "no",
|
|
7282
|
-
import_chalk30.default.gray((0,
|
|
7350
|
+
import_chalk30.default.gray((0, import_ms7.default)(time.getTime() - new Date(cert.created).getTime()))
|
|
7283
7351
|
];
|
|
7284
7352
|
}
|
|
7285
7353
|
function formatExpirationDate(date) {
|
|
7286
7354
|
const diff2 = date.getTime() - Date.now();
|
|
7287
|
-
return diff2 < 0 ? import_chalk30.default.gray(`${(0,
|
|
7355
|
+
return diff2 < 0 ? import_chalk30.default.gray(`${(0, import_ms7.default)(-diff2)} ago`) : import_chalk30.default.gray(`in ${(0, import_ms7.default)(diff2)}`);
|
|
7288
7356
|
}
|
|
7289
7357
|
var ls_default = ls2;
|
|
7290
7358
|
|
|
7291
7359
|
// src/commands/certs/rm.ts
|
|
7292
7360
|
var import_chalk31 = __toESM(require_source(), 1);
|
|
7293
|
-
var
|
|
7361
|
+
var import_ms8 = __toESM(require_ms(), 1);
|
|
7294
7362
|
var import_pluralize4 = __toESM(require_pluralize(), 1);
|
|
7295
7363
|
|
|
7296
7364
|
// src/util/certs/delete-cert-by-id.ts
|
|
@@ -7440,7 +7508,7 @@ function formatCertRow(cert) {
|
|
|
7440
7508
|
return [
|
|
7441
7509
|
cert.uid,
|
|
7442
7510
|
import_chalk31.default.bold(cert.cns ? cert.cns.join(", ") : "\u2013"),
|
|
7443
|
-
...cert.created ? [import_chalk31.default.gray(`${(0,
|
|
7511
|
+
...cert.created ? [import_chalk31.default.gray(`${(0, import_ms8.default)(Date.now() - new Date(cert.created).getTime())} ago`)] : []
|
|
7444
7512
|
];
|
|
7445
7513
|
}
|
|
7446
7514
|
var rm_default = rm2;
|
|
@@ -9835,7 +9903,7 @@ async function importZone(client, argv) {
|
|
|
9835
9903
|
|
|
9836
9904
|
// src/commands/dns/ls.ts
|
|
9837
9905
|
var import_chalk45 = __toESM(require_source(), 1);
|
|
9838
|
-
var
|
|
9906
|
+
var import_ms9 = __toESM(require_ms(), 1);
|
|
9839
9907
|
|
|
9840
9908
|
// src/util/dns/get-domain-dns-records.ts
|
|
9841
9909
|
async function getDomainDNSRecords(client, domain2, apiVersion = 3, nextTimestamp, limit = 20) {
|
|
@@ -10088,7 +10156,7 @@ function getDNSRecordsTable(dnsRecords) {
|
|
|
10088
10156
|
}
|
|
10089
10157
|
function getDNSRecordRow(record) {
|
|
10090
10158
|
const isSystemRecord = record.creator === "system";
|
|
10091
|
-
const createdAt = `${(0,
|
|
10159
|
+
const createdAt = `${(0, import_ms9.default)(
|
|
10092
10160
|
Date.now() - new Date(Number(record.createdAt)).getTime()
|
|
10093
10161
|
)} ago`;
|
|
10094
10162
|
const priority = record.mxPriority || record.priority || null;
|
|
@@ -10104,7 +10172,7 @@ function getDNSRecordRow(record) {
|
|
|
10104
10172
|
|
|
10105
10173
|
// src/commands/dns/rm.ts
|
|
10106
10174
|
var import_chalk46 = __toESM(require_source(), 1);
|
|
10107
|
-
var
|
|
10175
|
+
var import_ms10 = __toESM(require_ms(), 1);
|
|
10108
10176
|
|
|
10109
10177
|
// src/util/dns/delete-dns-record-by-id.ts
|
|
10110
10178
|
async function deleteDNSRecordById(client, domain2, recordId) {
|
|
@@ -10288,7 +10356,7 @@ function getDeleteTableRow(domainName, record) {
|
|
|
10288
10356
|
`${recordName} ${record.type} ${record.value} ${record.mxPriority || ""}`
|
|
10289
10357
|
),
|
|
10290
10358
|
import_chalk46.default.gray(
|
|
10291
|
-
`${(0,
|
|
10359
|
+
`${(0, import_ms10.default)(Date.now() - new Date(Number(record.createdAt)).getTime())} ago`
|
|
10292
10360
|
)
|
|
10293
10361
|
];
|
|
10294
10362
|
}
|
|
@@ -11257,7 +11325,7 @@ async function fetchInformation({
|
|
|
11257
11325
|
}
|
|
11258
11326
|
|
|
11259
11327
|
// src/commands/domains/ls.ts
|
|
11260
|
-
var
|
|
11328
|
+
var import_ms11 = __toESM(require_ms(), 1);
|
|
11261
11329
|
var import_chalk53 = __toESM(require_source(), 1);
|
|
11262
11330
|
var import_pluralize5 = __toESM(require_pluralize(), 1);
|
|
11263
11331
|
|
|
@@ -11373,7 +11441,7 @@ function formatDomainsTable(domains2) {
|
|
|
11373
11441
|
const current = Date.now();
|
|
11374
11442
|
const rows = domains2.map((domain2) => {
|
|
11375
11443
|
const expiration = formatDateWithoutTime(domain2.expiresAt);
|
|
11376
|
-
const age = domain2.createdAt ? (0,
|
|
11444
|
+
const age = domain2.createdAt ? (0, import_ms11.default)(current - domain2.createdAt) : "-";
|
|
11377
11445
|
return [
|
|
11378
11446
|
domain2.name,
|
|
11379
11447
|
getDomainRegistrar(domain2),
|
|
@@ -20174,7 +20242,7 @@ var FlagsTelemetryClient = class extends TelemetryClient {
|
|
|
20174
20242
|
|
|
20175
20243
|
// src/commands/flags/ls.ts
|
|
20176
20244
|
var import_chalk91 = __toESM(require_source(), 1);
|
|
20177
|
-
var
|
|
20245
|
+
var import_ms12 = __toESM(require_ms(), 1);
|
|
20178
20246
|
var import_pluralize8 = __toESM(require_pluralize(), 1);
|
|
20179
20247
|
|
|
20180
20248
|
// src/util/flags/get-flags.ts
|
|
@@ -20297,7 +20365,7 @@ function printFlagsTable(flags) {
|
|
|
20297
20365
|
flag.kind,
|
|
20298
20366
|
flag.state === "active" ? import_chalk91.default.green(flag.state) : import_chalk91.default.gray(flag.state),
|
|
20299
20367
|
String(flag.variants.length),
|
|
20300
|
-
(0,
|
|
20368
|
+
(0, import_ms12.default)(now - flag.updatedAt) + " ago"
|
|
20301
20369
|
]);
|
|
20302
20370
|
const table3 = formatTable(
|
|
20303
20371
|
headers,
|
|
@@ -20323,7 +20391,7 @@ var FlagsInspectTelemetryClient = class extends TelemetryClient {
|
|
|
20323
20391
|
|
|
20324
20392
|
// src/util/flags/print-flag-details.ts
|
|
20325
20393
|
var import_chalk93 = __toESM(require_source(), 1);
|
|
20326
|
-
var
|
|
20394
|
+
var import_ms13 = __toESM(require_ms(), 1);
|
|
20327
20395
|
|
|
20328
20396
|
// src/util/flags/dashboard-url.ts
|
|
20329
20397
|
function getFlagDashboardUrl(orgSlug, projectName, flagSlug) {
|
|
@@ -20655,7 +20723,7 @@ function formatRolloutOutcome(outcome, variants) {
|
|
|
20655
20723
|
const stages = outcome.slots.map((slot) => {
|
|
20656
20724
|
const percentage = slot.promille / 1e3;
|
|
20657
20725
|
const formattedPercentage = Number.isInteger(percentage) ? String(percentage) : String(Number(percentage.toFixed(3)));
|
|
20658
|
-
return `${formattedPercentage}% for ${(0,
|
|
20726
|
+
return `${formattedPercentage}% for ${(0, import_ms13.default)(slot.durationMs, { long: true })}`;
|
|
20659
20727
|
}).join(", ");
|
|
20660
20728
|
return `${formatEnvironmentVariantSummary(
|
|
20661
20729
|
fromVariant,
|
|
@@ -21860,7 +21928,7 @@ var import_fast_deep_equal3 = __toESM(require_fast_deep_equal(), 1);
|
|
|
21860
21928
|
|
|
21861
21929
|
// src/util/flags/rollout.ts
|
|
21862
21930
|
var import_chalk98 = __toESM(require_source(), 1);
|
|
21863
|
-
var
|
|
21931
|
+
var import_ms14 = __toESM(require_ms(), 1);
|
|
21864
21932
|
function resolveFlagRollout(flag, settings, options) {
|
|
21865
21933
|
const currentRollout = options.currentOutcome?.type === "rollout" ? options.currentOutcome : void 0;
|
|
21866
21934
|
const baseSelector = options.baseSelector || formatBaseSelector(currentRollout?.base);
|
|
@@ -22063,7 +22131,7 @@ function parseStageDuration(value) {
|
|
|
22063
22131
|
if (/^\d+(s|ms)$/i.test(value)) {
|
|
22064
22132
|
return void 0;
|
|
22065
22133
|
}
|
|
22066
|
-
const durationMs = (0,
|
|
22134
|
+
const durationMs = (0, import_ms14.default)(/^\d+$/.test(value) ? `${value}m` : value);
|
|
22067
22135
|
if (durationMs === void 0 || durationMs <= 0) {
|
|
22068
22136
|
return void 0;
|
|
22069
22137
|
}
|
|
@@ -22080,7 +22148,7 @@ function resolveRolloutStartTimestamp(start, currentStartTimestamp) {
|
|
|
22080
22148
|
if (start === "now") {
|
|
22081
22149
|
return Date.now();
|
|
22082
22150
|
}
|
|
22083
|
-
const relativeDurationMs = (0,
|
|
22151
|
+
const relativeDurationMs = (0, import_ms14.default)(start);
|
|
22084
22152
|
if (relativeDurationMs !== void 0) {
|
|
22085
22153
|
if (relativeDurationMs <= 0) {
|
|
22086
22154
|
throw new Error(
|
|
@@ -22099,7 +22167,7 @@ function resolveRolloutStartTimestamp(start, currentStartTimestamp) {
|
|
|
22099
22167
|
}
|
|
22100
22168
|
function formatRolloutStages(slots) {
|
|
22101
22169
|
return `${slots.map(
|
|
22102
|
-
(slot) => `${formatPromille(slot.promille)} for ${(0,
|
|
22170
|
+
(slot) => `${formatPromille(slot.promille)} for ${(0, import_ms14.default)(slot.durationMs, { long: true })}`
|
|
22103
22171
|
).join(", ")}, then 100% indefinitely`;
|
|
22104
22172
|
}
|
|
22105
22173
|
function formatPromille(promille) {
|
|
@@ -23115,7 +23183,7 @@ var FlagsSdkKeysRmTelemetryClient = class extends TelemetryClient {
|
|
|
23115
23183
|
|
|
23116
23184
|
// src/commands/flags/sdk-keys-ls.ts
|
|
23117
23185
|
var import_chalk105 = __toESM(require_source(), 1);
|
|
23118
|
-
var
|
|
23186
|
+
var import_ms15 = __toESM(require_ms(), 1);
|
|
23119
23187
|
|
|
23120
23188
|
// src/util/flags/sdk-keys.ts
|
|
23121
23189
|
async function getSdkKeys(client, projectId) {
|
|
@@ -23231,7 +23299,7 @@ function printSdkKeysTable(keys) {
|
|
|
23231
23299
|
key.environment,
|
|
23232
23300
|
key.label || import_chalk105.default.dim("-"),
|
|
23233
23301
|
key.partialKeyValue || import_chalk105.default.dim("-"),
|
|
23234
|
-
(0,
|
|
23302
|
+
(0, import_ms15.default)(now - key.createdAt) + " ago"
|
|
23235
23303
|
]);
|
|
23236
23304
|
const table3 = formatTable(
|
|
23237
23305
|
headers,
|
|
@@ -24856,7 +24924,7 @@ async function main19(client) {
|
|
|
24856
24924
|
// src/commands/inspect/index.ts
|
|
24857
24925
|
var import_error_utils9 = __toESM(require_dist(), 1);
|
|
24858
24926
|
var import_chalk114 = __toESM(require_source(), 1);
|
|
24859
|
-
var
|
|
24927
|
+
var import_ms16 = __toESM(require_ms(), 1);
|
|
24860
24928
|
var import_title2 = __toESM(require_lib2(), 1);
|
|
24861
24929
|
import { URL as URL2 } from "url";
|
|
24862
24930
|
|
|
@@ -25224,7 +25292,7 @@ async function inspect4(client) {
|
|
|
25224
25292
|
telemetry2.trackCliFlagWait(parsedArguments.flags["--wait"]);
|
|
25225
25293
|
telemetry2.trackCliOptionFormat(parsedArguments.flags["--format"]);
|
|
25226
25294
|
telemetry2.trackCliFlagJson(parsedArguments.flags["--json"]);
|
|
25227
|
-
const timeout = (0,
|
|
25295
|
+
const timeout = (0, import_ms16.default)(parsedArguments.flags["--timeout"] ?? "3m");
|
|
25228
25296
|
if (timeout === void 0) {
|
|
25229
25297
|
error(`Invalid timeout "${parsedArguments.flags["--timeout"]}"`);
|
|
25230
25298
|
return 1;
|
|
@@ -25275,7 +25343,7 @@ async function inspect4(client) {
|
|
|
25275
25343
|
break;
|
|
25276
25344
|
}
|
|
25277
25345
|
if (Date.now() > until) {
|
|
25278
|
-
warn(`stopped waiting after ${(0,
|
|
25346
|
+
warn(`stopped waiting after ${(0, import_ms16.default)(timeout, { long: true })}`);
|
|
25279
25347
|
abortController?.abort();
|
|
25280
25348
|
break;
|
|
25281
25349
|
}
|
|
@@ -30484,7 +30552,7 @@ var import_chalk133 = __toESM(require_source(), 1);
|
|
|
30484
30552
|
var import_date_fns2 = __toESM(require_date_fns(), 1);
|
|
30485
30553
|
|
|
30486
30554
|
// src/util/logs-v2.ts
|
|
30487
|
-
var
|
|
30555
|
+
var import_ms17 = __toESM(require_ms(), 1);
|
|
30488
30556
|
var LOG_LEVEL_SEVERITY = {
|
|
30489
30557
|
info: 0,
|
|
30490
30558
|
warning: 1,
|
|
@@ -30506,7 +30574,7 @@ function getDisplayLog(logs2, requestedLevels) {
|
|
|
30506
30574
|
}
|
|
30507
30575
|
function parseRelativeTime(input) {
|
|
30508
30576
|
const now = Date.now();
|
|
30509
|
-
const msValue = (0,
|
|
30577
|
+
const msValue = (0, import_ms17.default)(input);
|
|
30510
30578
|
if (typeof msValue === "number") {
|
|
30511
30579
|
return now - msValue;
|
|
30512
30580
|
}
|
|
@@ -30893,6 +30961,125 @@ function parseSources(sources) {
|
|
|
30893
30961
|
return [sources];
|
|
30894
30962
|
return sources;
|
|
30895
30963
|
}
|
|
30964
|
+
function isNonLiveTerminalDeployment(deployment) {
|
|
30965
|
+
return deployment.readyState === "ERROR" || deployment.readyState === "CANCELED";
|
|
30966
|
+
}
|
|
30967
|
+
function getInspectCommand(deployment, contextName, { plain = false } = {}) {
|
|
30968
|
+
const scopeOption = contextName ? ` --scope ${contextName}` : "";
|
|
30969
|
+
const command = `inspect https://${deployment.url}${scopeOption}`;
|
|
30970
|
+
return plain ? `\`${getCommandNamePlain(command)}\`` : getCommandName(command);
|
|
30971
|
+
}
|
|
30972
|
+
function printNonLiveDeploymentError(deployment, contextName) {
|
|
30973
|
+
const inspectCommand2 = getInspectCommand(deployment, contextName);
|
|
30974
|
+
output_manager_default.error(
|
|
30975
|
+
`Logs are unavailable because deployment ${import_chalk133.default.bold(
|
|
30976
|
+
deployment.id
|
|
30977
|
+
)} never reached READY and ended in ${deployment.readyState}.
|
|
30978
|
+
Run ${inspectCommand2} for deployment details.`
|
|
30979
|
+
);
|
|
30980
|
+
}
|
|
30981
|
+
async function resolveLogsTarget(client, { contextName, deploymentOption, projectOption }) {
|
|
30982
|
+
if (deploymentOption) {
|
|
30983
|
+
output_manager_default.spinner(`Resolving deployment "${deploymentOption}"`, 1e3);
|
|
30984
|
+
let deployment;
|
|
30985
|
+
try {
|
|
30986
|
+
deployment = await getDeployment(client, contextName, deploymentOption);
|
|
30987
|
+
} catch (err) {
|
|
30988
|
+
if (err instanceof DeploymentNotFound) {
|
|
30989
|
+
output_manager_default.error(
|
|
30990
|
+
`Deployment not found: ${deploymentOption} under ${import_chalk133.default.bold(
|
|
30991
|
+
contextName
|
|
30992
|
+
)}`
|
|
30993
|
+
);
|
|
30994
|
+
return { exitCode: 1 };
|
|
30995
|
+
}
|
|
30996
|
+
if (err instanceof InvalidDeploymentId) {
|
|
30997
|
+
output_manager_default.error(`Invalid deployment ID: ${deploymentOption}`);
|
|
30998
|
+
return { exitCode: 1 };
|
|
30999
|
+
}
|
|
31000
|
+
throw err;
|
|
31001
|
+
} finally {
|
|
31002
|
+
output_manager_default.stopSpinner();
|
|
31003
|
+
}
|
|
31004
|
+
if (!deployment.projectId) {
|
|
31005
|
+
output_manager_default.error("Deployment is not associated with a project.");
|
|
31006
|
+
return { exitCode: 1 };
|
|
31007
|
+
}
|
|
31008
|
+
output_manager_default.spinner(`Fetching project "${deployment.projectId}"`, 1e3);
|
|
31009
|
+
const project = await getProjectByNameOrId(client, deployment.projectId);
|
|
31010
|
+
output_manager_default.stopSpinner();
|
|
31011
|
+
if (project instanceof ProjectNotFound) {
|
|
31012
|
+
output_manager_default.error(
|
|
31013
|
+
`Project not found: ${deployment.projectId} under ${import_chalk133.default.bold(
|
|
31014
|
+
contextName
|
|
31015
|
+
)}`
|
|
31016
|
+
);
|
|
31017
|
+
return { exitCode: 1 };
|
|
31018
|
+
}
|
|
31019
|
+
if (projectOption) {
|
|
31020
|
+
output_manager_default.spinner(`Fetching project "${projectOption}"`, 1e3);
|
|
31021
|
+
const explicitProject = await getProjectByNameOrId(client, projectOption);
|
|
31022
|
+
output_manager_default.stopSpinner();
|
|
31023
|
+
if (explicitProject instanceof ProjectNotFound) {
|
|
31024
|
+
output_manager_default.error(
|
|
31025
|
+
`Project not found: ${projectOption} under ${import_chalk133.default.bold(contextName)}`
|
|
31026
|
+
);
|
|
31027
|
+
return { exitCode: 1 };
|
|
31028
|
+
}
|
|
31029
|
+
if (explicitProject.id !== project.id) {
|
|
31030
|
+
output_manager_default.error(
|
|
31031
|
+
`The deployment "${deploymentOption}" does not belong to "${projectOption}" project. Remove either the deployment selection or the ${import_chalk133.default.bold(
|
|
31032
|
+
"--project"
|
|
31033
|
+
)} option.`
|
|
31034
|
+
);
|
|
31035
|
+
return { exitCode: 1 };
|
|
31036
|
+
}
|
|
31037
|
+
}
|
|
31038
|
+
return {
|
|
31039
|
+
projectId: project.id,
|
|
31040
|
+
projectSlug: project.name,
|
|
31041
|
+
orgSlug: contextName,
|
|
31042
|
+
ownerId: project.accountId,
|
|
31043
|
+
deployment
|
|
31044
|
+
};
|
|
31045
|
+
}
|
|
31046
|
+
if (projectOption) {
|
|
31047
|
+
output_manager_default.spinner(`Fetching project "${projectOption}"`, 1e3);
|
|
31048
|
+
const project = await getProjectByNameOrId(client, projectOption);
|
|
31049
|
+
output_manager_default.stopSpinner();
|
|
31050
|
+
if (project instanceof ProjectNotFound) {
|
|
31051
|
+
output_manager_default.error(
|
|
31052
|
+
`Project not found: ${projectOption} under ${import_chalk133.default.bold(contextName)}`
|
|
31053
|
+
);
|
|
31054
|
+
return { exitCode: 1 };
|
|
31055
|
+
}
|
|
31056
|
+
return {
|
|
31057
|
+
projectId: project.id,
|
|
31058
|
+
projectSlug: project.name,
|
|
31059
|
+
orgSlug: contextName,
|
|
31060
|
+
ownerId: project.accountId
|
|
31061
|
+
};
|
|
31062
|
+
}
|
|
31063
|
+
const link = await getLinkedProject(client);
|
|
31064
|
+
if (link.status === "error") {
|
|
31065
|
+
return { exitCode: link.exitCode };
|
|
31066
|
+
}
|
|
31067
|
+
if (link.status === "not_linked") {
|
|
31068
|
+
output_manager_default.error(
|
|
31069
|
+
`Your codebase isn't linked to a project on Vercel. Run ${getCommandName(
|
|
31070
|
+
"link"
|
|
31071
|
+
)} to begin, or specify a project with ${import_chalk133.default.bold("--project")}.`
|
|
31072
|
+
);
|
|
31073
|
+
return { exitCode: 1 };
|
|
31074
|
+
}
|
|
31075
|
+
client.config.currentTeam = link.org.type === "team" ? link.org.id : void 0;
|
|
31076
|
+
return {
|
|
31077
|
+
projectId: link.project.id,
|
|
31078
|
+
projectSlug: link.project.name,
|
|
31079
|
+
orgSlug: link.org.slug,
|
|
31080
|
+
ownerId: link.org.id
|
|
31081
|
+
};
|
|
31082
|
+
}
|
|
30896
31083
|
async function logs(client) {
|
|
30897
31084
|
let parsedArguments;
|
|
30898
31085
|
const flagsSpecification = getFlagsSpecification(logsCommand.options);
|
|
@@ -30980,7 +31167,7 @@ async function logs(client) {
|
|
|
30980
31167
|
return 1;
|
|
30981
31168
|
}
|
|
30982
31169
|
}
|
|
30983
|
-
let contextName
|
|
31170
|
+
let contextName;
|
|
30984
31171
|
try {
|
|
30985
31172
|
({ contextName } = await getScope(client));
|
|
30986
31173
|
} catch (err) {
|
|
@@ -30990,67 +31177,33 @@ async function logs(client) {
|
|
|
30990
31177
|
}
|
|
30991
31178
|
throw err;
|
|
30992
31179
|
}
|
|
30993
|
-
|
|
30994
|
-
|
|
30995
|
-
|
|
30996
|
-
|
|
30997
|
-
|
|
30998
|
-
|
|
30999
|
-
|
|
31000
|
-
client,
|
|
31001
|
-
projectOption,
|
|
31002
|
-
client.config.currentTeam
|
|
31003
|
-
);
|
|
31004
|
-
output_manager_default.stopSpinner();
|
|
31005
|
-
if (project instanceof ProjectNotFound) {
|
|
31006
|
-
output_manager_default.error(`Project not found: ${projectOption}`);
|
|
31007
|
-
return 1;
|
|
31008
|
-
}
|
|
31009
|
-
projectId = project.id;
|
|
31010
|
-
projectSlug = project.name;
|
|
31011
|
-
orgSlug = contextName;
|
|
31012
|
-
ownerId = project.accountId;
|
|
31013
|
-
} else {
|
|
31014
|
-
const link = await getLinkedProject(client);
|
|
31015
|
-
if (link.status === "error") {
|
|
31016
|
-
return link.exitCode;
|
|
31017
|
-
} else if (link.status === "not_linked") {
|
|
31018
|
-
output_manager_default.error(
|
|
31019
|
-
`Your codebase isn't linked to a project on Vercel. Run ${getCommandName(
|
|
31020
|
-
"link"
|
|
31021
|
-
)} to begin, or specify a project with ${import_chalk133.default.bold("--project")}.`
|
|
31022
|
-
);
|
|
31023
|
-
return 1;
|
|
31024
|
-
}
|
|
31025
|
-
client.config.currentTeam = link.org.type === "team" ? link.org.id : void 0;
|
|
31026
|
-
projectId = link.project.id;
|
|
31027
|
-
projectSlug = link.project.name;
|
|
31028
|
-
orgSlug = link.org.slug;
|
|
31029
|
-
ownerId = link.org.id;
|
|
31180
|
+
const logsTarget = await resolveLogsTarget(client, {
|
|
31181
|
+
contextName,
|
|
31182
|
+
deploymentOption,
|
|
31183
|
+
projectOption
|
|
31184
|
+
});
|
|
31185
|
+
if ("exitCode" in logsTarget) {
|
|
31186
|
+
return logsTarget.exitCode;
|
|
31030
31187
|
}
|
|
31031
|
-
|
|
31032
|
-
|
|
31033
|
-
|
|
31034
|
-
|
|
31035
|
-
|
|
31036
|
-
|
|
31037
|
-
|
|
31038
|
-
|
|
31188
|
+
const { projectId, projectSlug, orgSlug, ownerId, deployment } = logsTarget;
|
|
31189
|
+
let deploymentId = deployment?.id;
|
|
31190
|
+
if (deployment && isNonLiveTerminalDeployment(deployment)) {
|
|
31191
|
+
const inspectContextName = detectExplicitScope(client) ? contextName : void 0;
|
|
31192
|
+
const inspectCommand2 = getInspectCommand(deployment, inspectContextName, {
|
|
31193
|
+
plain: true
|
|
31194
|
+
});
|
|
31195
|
+
if (jsonOption) {
|
|
31196
|
+
client.stdout.write(
|
|
31197
|
+
`${JSON.stringify({
|
|
31198
|
+
type: "deployment_error",
|
|
31199
|
+
message: `Logs are unavailable because deployment ${deployment.id} never reached READY and ended in ${deployment.readyState}. Run ${inspectCommand2} for deployment details.`
|
|
31200
|
+
})}
|
|
31201
|
+
`
|
|
31039
31202
|
);
|
|
31040
|
-
|
|
31041
|
-
|
|
31042
|
-
} catch (err) {
|
|
31043
|
-
output_manager_default.stopSpinner();
|
|
31044
|
-
if (err instanceof DeploymentNotFound) {
|
|
31045
|
-
output_manager_default.error(`Deployment not found: ${deploymentOption}`);
|
|
31046
|
-
return 1;
|
|
31047
|
-
}
|
|
31048
|
-
if (err instanceof InvalidDeploymentId) {
|
|
31049
|
-
output_manager_default.error(`Invalid deployment ID: ${deploymentOption}`);
|
|
31050
|
-
return 1;
|
|
31051
|
-
}
|
|
31052
|
-
throw err;
|
|
31203
|
+
} else {
|
|
31204
|
+
printNonLiveDeploymentError(deployment, inspectContextName);
|
|
31053
31205
|
}
|
|
31206
|
+
return 1;
|
|
31054
31207
|
}
|
|
31055
31208
|
const noBranchFlagValue = parsedArguments.flags["--no-branch"];
|
|
31056
31209
|
let branchOption;
|
|
@@ -32024,7 +32177,7 @@ async function metrics(client) {
|
|
|
32024
32177
|
return 0;
|
|
32025
32178
|
}
|
|
32026
32179
|
telemetry2.trackCliSubcommandSchema(subcommandOriginal);
|
|
32027
|
-
const schemaFn = (await import("./chunks/schema-
|
|
32180
|
+
const schemaFn = (await import("./chunks/schema-2VCQ2MAA.js")).default;
|
|
32028
32181
|
return schemaFn(client, telemetry2);
|
|
32029
32182
|
}
|
|
32030
32183
|
default: {
|
|
@@ -32037,7 +32190,7 @@ async function metrics(client) {
|
|
|
32037
32190
|
output_manager_default.print(help(metricsCommand, { columns: client.stderr.columns }));
|
|
32038
32191
|
return 2;
|
|
32039
32192
|
}
|
|
32040
|
-
const queryFn = (await import("./chunks/query-
|
|
32193
|
+
const queryFn = (await import("./chunks/query-BGI3AVJA.js")).default;
|
|
32041
32194
|
return queryFn(client, telemetry2);
|
|
32042
32195
|
}
|
|
32043
32196
|
}
|
|
@@ -34448,7 +34601,7 @@ async function openCommandHandler(client) {
|
|
|
34448
34601
|
|
|
34449
34602
|
// src/commands/project/add.ts
|
|
34450
34603
|
var import_chalk140 = __toESM(require_source(), 1);
|
|
34451
|
-
var
|
|
34604
|
+
var import_ms18 = __toESM(require_ms(), 1);
|
|
34452
34605
|
|
|
34453
34606
|
// src/util/telemetry/commands/project/add.ts
|
|
34454
34607
|
var ProjectAddTelemetryClient = class extends TelemetryClient {
|
|
@@ -34510,7 +34663,7 @@ async function add8(client, argv) {
|
|
|
34510
34663
|
throw err;
|
|
34511
34664
|
}
|
|
34512
34665
|
}
|
|
34513
|
-
const elapsed2 = (0,
|
|
34666
|
+
const elapsed2 = (0, import_ms18.default)(Date.now() - start);
|
|
34514
34667
|
const { contextName } = await getScope(client);
|
|
34515
34668
|
output_manager_default.log(
|
|
34516
34669
|
`${import_chalk140.default.cyan("Success!")} Project ${import_chalk140.default.bold(
|
|
@@ -35260,7 +35413,7 @@ async function inspect5(client, argv) {
|
|
|
35260
35413
|
}
|
|
35261
35414
|
|
|
35262
35415
|
// src/commands/project/list.ts
|
|
35263
|
-
var
|
|
35416
|
+
var import_ms19 = __toESM(require_ms(), 1);
|
|
35264
35417
|
var import_chalk144 = __toESM(require_source(), 1);
|
|
35265
35418
|
|
|
35266
35419
|
// src/util/telemetry/commands/project/list.ts
|
|
@@ -35283,6 +35436,14 @@ var ProjectListTelemetryClient = class extends TelemetryClient {
|
|
|
35283
35436
|
this.trackCliFlag("json");
|
|
35284
35437
|
}
|
|
35285
35438
|
}
|
|
35439
|
+
trackCliOptionFilter(filter) {
|
|
35440
|
+
if (filter) {
|
|
35441
|
+
this.trackCliOption({
|
|
35442
|
+
option: "filter",
|
|
35443
|
+
value: this.redactedValue
|
|
35444
|
+
});
|
|
35445
|
+
}
|
|
35446
|
+
}
|
|
35286
35447
|
};
|
|
35287
35448
|
|
|
35288
35449
|
// src/commands/project/list.ts
|
|
@@ -35344,7 +35505,7 @@ async function list10(client, argv) {
|
|
|
35344
35505
|
method: "GET"
|
|
35345
35506
|
});
|
|
35346
35507
|
output_manager_default.stopSpinner();
|
|
35347
|
-
const elapsed2 = (0,
|
|
35508
|
+
const elapsed2 = (0, import_ms19.default)(Date.now() - start);
|
|
35348
35509
|
if (flags.json) {
|
|
35349
35510
|
outputJson4(client, projectList, {
|
|
35350
35511
|
pagination,
|
|
@@ -35366,6 +35527,7 @@ async function list10(client, argv) {
|
|
|
35366
35527
|
function processFlags(opts, telemetryClient) {
|
|
35367
35528
|
const deprecated = opts["--update-required"] || false;
|
|
35368
35529
|
const next = opts["--next"];
|
|
35530
|
+
const filter = opts["--filter"];
|
|
35369
35531
|
const formatResult = validateJsonOutput(opts);
|
|
35370
35532
|
if (!formatResult.valid) {
|
|
35371
35533
|
return { error: formatResult.error };
|
|
@@ -35375,7 +35537,8 @@ function processFlags(opts, telemetryClient) {
|
|
|
35375
35537
|
telemetryClient.trackCliOptionNext(next);
|
|
35376
35538
|
telemetryClient.trackCliOptionFormat(opts["--format"]);
|
|
35377
35539
|
telemetryClient.trackCliFlagJson(opts["--json"]);
|
|
35378
|
-
|
|
35540
|
+
telemetryClient.trackCliOptionFilter(filter);
|
|
35541
|
+
return { deprecated, next, json, filter };
|
|
35379
35542
|
}
|
|
35380
35543
|
function buildProjectsUrl(flags) {
|
|
35381
35544
|
let url = BASE_PROJECTS_URL;
|
|
@@ -35385,6 +35548,9 @@ function buildProjectsUrl(flags) {
|
|
|
35385
35548
|
if (flags.next) {
|
|
35386
35549
|
url += `&until=${flags.next}`;
|
|
35387
35550
|
}
|
|
35551
|
+
if (flags.filter) {
|
|
35552
|
+
url += `&search=${encodeURIComponent(flags.filter)}`;
|
|
35553
|
+
}
|
|
35388
35554
|
return url;
|
|
35389
35555
|
}
|
|
35390
35556
|
function createProjectJson(project, deprecated) {
|
|
@@ -35427,7 +35593,7 @@ function printProjectsTable(projectList) {
|
|
|
35427
35593
|
[
|
|
35428
35594
|
import_chalk144.default.bold(project.name),
|
|
35429
35595
|
getLatestProdUrl(project),
|
|
35430
|
-
import_chalk144.default.gray((0,
|
|
35596
|
+
import_chalk144.default.gray((0, import_ms19.default)(Date.now() - project.updatedAt)),
|
|
35431
35597
|
project.nodeVersion ?? ""
|
|
35432
35598
|
]
|
|
35433
35599
|
])
|
|
@@ -35625,7 +35791,7 @@ async function accessGroups(client, argv) {
|
|
|
35625
35791
|
|
|
35626
35792
|
// src/commands/project/rename.ts
|
|
35627
35793
|
var import_chalk147 = __toESM(require_source(), 1);
|
|
35628
|
-
var
|
|
35794
|
+
var import_ms20 = __toESM(require_ms(), 1);
|
|
35629
35795
|
|
|
35630
35796
|
// src/util/telemetry/commands/project/rename.ts
|
|
35631
35797
|
var ProjectRenameTelemetryClient = class extends TelemetryClient {
|
|
@@ -35700,7 +35866,7 @@ async function rename(client, argv) {
|
|
|
35700
35866
|
}
|
|
35701
35867
|
throw err;
|
|
35702
35868
|
}
|
|
35703
|
-
const elapsed2 = (0,
|
|
35869
|
+
const elapsed2 = (0, import_ms20.default)(Date.now() - start);
|
|
35704
35870
|
output_manager_default.log(
|
|
35705
35871
|
`${import_chalk147.default.cyan("Success!")} Project ${import_chalk147.default.bold(
|
|
35706
35872
|
project.name
|
|
@@ -35713,7 +35879,7 @@ async function rename(client, argv) {
|
|
|
35713
35879
|
|
|
35714
35880
|
// src/commands/project/rm.ts
|
|
35715
35881
|
var import_chalk148 = __toESM(require_source(), 1);
|
|
35716
|
-
var
|
|
35882
|
+
var import_ms21 = __toESM(require_ms(), 1);
|
|
35717
35883
|
|
|
35718
35884
|
// src/util/telemetry/commands/project/rm.ts
|
|
35719
35885
|
var ProjectRmTelemetryClient = class extends TelemetryClient {
|
|
@@ -35774,7 +35940,7 @@ async function rm7(client, argv) {
|
|
|
35774
35940
|
return 1;
|
|
35775
35941
|
}
|
|
35776
35942
|
}
|
|
35777
|
-
const elapsed2 = (0,
|
|
35943
|
+
const elapsed2 = (0, import_ms21.default)(Date.now() - start);
|
|
35778
35944
|
output_manager_default.log(
|
|
35779
35945
|
`${import_chalk148.default.cyan("Success!")} Project ${import_chalk148.default.bold(name)} removed ${import_chalk148.default.gray(
|
|
35780
35946
|
`[${elapsed2}]`
|
|
@@ -35809,6 +35975,12 @@ async function getOidcToken(client, argv) {
|
|
|
35809
35975
|
return 1;
|
|
35810
35976
|
}
|
|
35811
35977
|
const { args, flags } = parsedArgs;
|
|
35978
|
+
const formatResult = validateJsonOutput(flags);
|
|
35979
|
+
if (!formatResult.valid) {
|
|
35980
|
+
output_manager_default.error(formatResult.error);
|
|
35981
|
+
return 1;
|
|
35982
|
+
}
|
|
35983
|
+
const asJson = formatResult.jsonOutput;
|
|
35812
35984
|
client.nonInteractive = true;
|
|
35813
35985
|
if (args.length > 1) {
|
|
35814
35986
|
output_manager_default.error(
|
|
@@ -35839,8 +36011,13 @@ async function getOidcToken(client, argv) {
|
|
|
35839
36011
|
}
|
|
35840
36012
|
}
|
|
35841
36013
|
);
|
|
35842
|
-
|
|
35843
|
-
|
|
36014
|
+
if (asJson) {
|
|
36015
|
+
client.stdout.write(`${JSON.stringify({ token: res.token }, null, 2)}
|
|
36016
|
+
`);
|
|
36017
|
+
} else {
|
|
36018
|
+
client.stdout.write(`${res.token}
|
|
36019
|
+
`);
|
|
36020
|
+
}
|
|
35844
36021
|
return 0;
|
|
35845
36022
|
} catch (err) {
|
|
35846
36023
|
if (isAPIError(err) && err.status === 404) {
|
|
@@ -36654,7 +36831,7 @@ async function main25(client) {
|
|
|
36654
36831
|
}
|
|
36655
36832
|
|
|
36656
36833
|
// src/commands/promote/index.ts
|
|
36657
|
-
var
|
|
36834
|
+
var import_ms24 = __toESM(require_ms(), 1);
|
|
36658
36835
|
var import_error_utils14 = __toESM(require_dist(), 1);
|
|
36659
36836
|
|
|
36660
36837
|
// src/commands/promote/request-promote.ts
|
|
@@ -36731,11 +36908,11 @@ async function getProjectByDeployment({
|
|
|
36731
36908
|
}
|
|
36732
36909
|
|
|
36733
36910
|
// src/commands/promote/request-promote.ts
|
|
36734
|
-
var
|
|
36911
|
+
var import_ms23 = __toESM(require_ms(), 1);
|
|
36735
36912
|
|
|
36736
36913
|
// src/commands/promote/status.ts
|
|
36737
36914
|
var import_chalk153 = __toESM(require_source(), 1);
|
|
36738
|
-
var
|
|
36915
|
+
var import_ms22 = __toESM(require_ms(), 1);
|
|
36739
36916
|
|
|
36740
36917
|
// src/util/alias/render-alias-status.ts
|
|
36741
36918
|
var import_chalk152 = __toESM(require_source(), 1);
|
|
@@ -36772,8 +36949,8 @@ async function promoteStatus({
|
|
|
36772
36949
|
project,
|
|
36773
36950
|
timeout = "3m"
|
|
36774
36951
|
}) {
|
|
36775
|
-
const recentThreshold = Date.now() - (0,
|
|
36776
|
-
const promoteTimeout = Date.now() + (0,
|
|
36952
|
+
const recentThreshold = Date.now() - (0, import_ms22.default)("3m");
|
|
36953
|
+
const promoteTimeout = Date.now() + (0, import_ms22.default)(timeout);
|
|
36777
36954
|
let counter = 0;
|
|
36778
36955
|
let spinnerMessage = deployment ? "Promote in progress" : `Checking promotion status of ${project.name}`;
|
|
36779
36956
|
if (!contextName) {
|
|
@@ -36990,7 +37167,7 @@ async function requestPromote({
|
|
|
36990
37167
|
);
|
|
36991
37168
|
return 0;
|
|
36992
37169
|
}
|
|
36993
|
-
if (timeout !== void 0 && (0,
|
|
37170
|
+
if (timeout !== void 0 && (0, import_ms23.default)(timeout) === 0) {
|
|
36994
37171
|
output_manager_default.log(
|
|
36995
37172
|
`Successfully requested promote of ${import_chalk154.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
36996
37173
|
);
|
|
@@ -37061,7 +37238,7 @@ var promote_default = async (client) => {
|
|
|
37061
37238
|
const yes = parsedArgs.flags["--yes"] ?? false;
|
|
37062
37239
|
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
37063
37240
|
const timeout = parsedArgs.flags["--timeout"];
|
|
37064
|
-
if (timeout && (0,
|
|
37241
|
+
if (timeout && (0, import_ms24.default)(timeout) === void 0) {
|
|
37065
37242
|
output_manager_default.error(`Invalid timeout "${timeout}"`);
|
|
37066
37243
|
return 1;
|
|
37067
37244
|
}
|
|
@@ -37392,7 +37569,13 @@ async function redeploy(client) {
|
|
|
37392
37569
|
}
|
|
37393
37570
|
}
|
|
37394
37571
|
}
|
|
37395
|
-
return printDeploymentStatus(
|
|
37572
|
+
return printDeploymentStatus(
|
|
37573
|
+
client,
|
|
37574
|
+
deployment,
|
|
37575
|
+
deployStamp,
|
|
37576
|
+
noWait,
|
|
37577
|
+
false
|
|
37578
|
+
);
|
|
37396
37579
|
} catch (err) {
|
|
37397
37580
|
output_manager_default.prettyError(err);
|
|
37398
37581
|
if ((0, import_error_utils15.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
|
@@ -37731,7 +37914,7 @@ function formatRedirectsTable(redirects, actionSymbol) {
|
|
|
37731
37914
|
|
|
37732
37915
|
// src/commands/redirects/list-versions.ts
|
|
37733
37916
|
var import_chalk158 = __toESM(require_source(), 1);
|
|
37734
|
-
var
|
|
37917
|
+
var import_ms25 = __toESM(require_ms(), 1);
|
|
37735
37918
|
var import_pluralize10 = __toESM(require_pluralize(), 1);
|
|
37736
37919
|
async function listVersions(client, argv) {
|
|
37737
37920
|
const parsed = await parseSubcommandArgs3(argv, listVersionsSubcommand);
|
|
@@ -37773,7 +37956,7 @@ function sortVersions(versions) {
|
|
|
37773
37956
|
function formatVersionsTable(versions) {
|
|
37774
37957
|
const now = Date.now();
|
|
37775
37958
|
const rows = versions.map((version) => {
|
|
37776
|
-
const age = (0,
|
|
37959
|
+
const age = (0, import_ms25.default)(now - version.lastModified);
|
|
37777
37960
|
let status3 = "";
|
|
37778
37961
|
if (version.isStaging) {
|
|
37779
37962
|
status3 = import_chalk158.default.yellow("Staging");
|
|
@@ -39411,7 +39594,7 @@ async function main26(client) {
|
|
|
39411
39594
|
|
|
39412
39595
|
// src/commands/remove/index.ts
|
|
39413
39596
|
var import_chalk164 = __toESM(require_source(), 1);
|
|
39414
|
-
var
|
|
39597
|
+
var import_ms26 = __toESM(require_ms(), 1);
|
|
39415
39598
|
var import_pluralize11 = __toESM(require_pluralize(), 1);
|
|
39416
39599
|
|
|
39417
39600
|
// src/util/url.ts
|
|
@@ -39692,7 +39875,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
39692
39875
|
);
|
|
39693
39876
|
const deploymentTable = table(
|
|
39694
39877
|
deployments.map((depl) => {
|
|
39695
|
-
const time = import_chalk164.default.gray(`${(0,
|
|
39878
|
+
const time = import_chalk164.default.gray(`${(0, import_ms26.default)(Date.now() - depl.createdAt)} ago`);
|
|
39696
39879
|
const url = depl.url ? import_chalk164.default.underline(`https://${depl.url}`) : "";
|
|
39697
39880
|
return [` ${depl.id}`, url, time];
|
|
39698
39881
|
}),
|
|
@@ -39743,15 +39926,15 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
|
39743
39926
|
|
|
39744
39927
|
// src/commands/rollback/index.ts
|
|
39745
39928
|
var import_error_utils16 = __toESM(require_dist(), 1);
|
|
39746
|
-
var
|
|
39929
|
+
var import_ms29 = __toESM(require_ms(), 1);
|
|
39747
39930
|
|
|
39748
39931
|
// src/commands/rollback/request-rollback.ts
|
|
39749
39932
|
var import_chalk166 = __toESM(require_source(), 1);
|
|
39750
|
-
var
|
|
39933
|
+
var import_ms28 = __toESM(require_ms(), 1);
|
|
39751
39934
|
|
|
39752
39935
|
// src/commands/rollback/status.ts
|
|
39753
39936
|
var import_chalk165 = __toESM(require_source(), 1);
|
|
39754
|
-
var
|
|
39937
|
+
var import_ms27 = __toESM(require_ms(), 1);
|
|
39755
39938
|
async function rollbackStatus({
|
|
39756
39939
|
client,
|
|
39757
39940
|
contextName,
|
|
@@ -39759,8 +39942,8 @@ async function rollbackStatus({
|
|
|
39759
39942
|
project,
|
|
39760
39943
|
timeout = "3m"
|
|
39761
39944
|
}) {
|
|
39762
|
-
const recentThreshold = Date.now() - (0,
|
|
39763
|
-
const rollbackTimeout = Date.now() + (0,
|
|
39945
|
+
const recentThreshold = Date.now() - (0, import_ms27.default)("3m");
|
|
39946
|
+
const rollbackTimeout = Date.now() + (0, import_ms27.default)(timeout);
|
|
39764
39947
|
let counter = 0;
|
|
39765
39948
|
let spinnerMessage = deployment ? "Rollback in progress" : `Checking rollback status of ${project.name}`;
|
|
39766
39949
|
if (!contextName) {
|
|
@@ -39916,7 +40099,7 @@ async function requestRollback({
|
|
|
39916
40099
|
// required
|
|
39917
40100
|
method: "POST"
|
|
39918
40101
|
});
|
|
39919
|
-
if (timeout !== void 0 && (0,
|
|
40102
|
+
if (timeout !== void 0 && (0, import_ms28.default)(timeout) === 0) {
|
|
39920
40103
|
output_manager_default.log(
|
|
39921
40104
|
`Successfully requested rollback of ${import_chalk166.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
|
39922
40105
|
);
|
|
@@ -39987,7 +40170,7 @@ var rollback_default = async (client) => {
|
|
|
39987
40170
|
return 2;
|
|
39988
40171
|
}
|
|
39989
40172
|
const timeout = parsedArgs.flags["--timeout"];
|
|
39990
|
-
if (timeout && (0,
|
|
40173
|
+
if (timeout && (0, import_ms29.default)(timeout) === void 0) {
|
|
39991
40174
|
output_manager_default.error(`Invalid timeout "${timeout}"`);
|
|
39992
40175
|
return 1;
|
|
39993
40176
|
}
|
|
@@ -40101,7 +40284,7 @@ async function startRollingRelease({
|
|
|
40101
40284
|
}
|
|
40102
40285
|
|
|
40103
40286
|
// src/commands/rolling-release/configure-rolling-release.ts
|
|
40104
|
-
var
|
|
40287
|
+
var import_ms30 = __toESM(require_ms(), 1);
|
|
40105
40288
|
function parseDuration(value) {
|
|
40106
40289
|
if (!value) {
|
|
40107
40290
|
return void 0;
|
|
@@ -40109,7 +40292,7 @@ function parseDuration(value) {
|
|
|
40109
40292
|
if (/^\d+(s|ms)$/i.test(value)) {
|
|
40110
40293
|
return void 0;
|
|
40111
40294
|
}
|
|
40112
|
-
const milliseconds = (0,
|
|
40295
|
+
const milliseconds = (0, import_ms30.default)(/^\d+$/.test(value) ? `${value}m` : value);
|
|
40113
40296
|
if (milliseconds === void 0 || milliseconds <= 0) {
|
|
40114
40297
|
return void 0;
|
|
40115
40298
|
}
|
|
@@ -41235,7 +41418,7 @@ function formatExpandedRoutes(routes2) {
|
|
|
41235
41418
|
|
|
41236
41419
|
// src/commands/routes/list-versions.ts
|
|
41237
41420
|
var import_chalk168 = __toESM(require_source(), 1);
|
|
41238
|
-
var
|
|
41421
|
+
var import_ms31 = __toESM(require_ms(), 1);
|
|
41239
41422
|
async function listVersions2(client, argv) {
|
|
41240
41423
|
const parsed = await parseSubcommandArgs(
|
|
41241
41424
|
argv,
|
|
@@ -41317,7 +41500,7 @@ function getRelativeTime(timestamp) {
|
|
|
41317
41500
|
if (diff2 < 1e3) {
|
|
41318
41501
|
return "just now";
|
|
41319
41502
|
}
|
|
41320
|
-
return (0,
|
|
41503
|
+
return (0, import_ms31.default)(diff2, { long: true }) + " ago";
|
|
41321
41504
|
}
|
|
41322
41505
|
|
|
41323
41506
|
// src/commands/routes/inspect.ts
|
|
@@ -42914,7 +43097,7 @@ async function main27(client) {
|
|
|
42914
43097
|
return 2;
|
|
42915
43098
|
}
|
|
42916
43099
|
telemetry2.trackCliSubcommandEdit(subcommandOriginal);
|
|
42917
|
-
return (await import("./chunks/edit-
|
|
43100
|
+
return (await import("./chunks/edit-YJYM3EKS.js")).default(client, args);
|
|
42918
43101
|
case "delete":
|
|
42919
43102
|
if (needHelp) {
|
|
42920
43103
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -42922,7 +43105,7 @@ async function main27(client) {
|
|
|
42922
43105
|
return 2;
|
|
42923
43106
|
}
|
|
42924
43107
|
telemetry2.trackCliSubcommandDelete(subcommandOriginal);
|
|
42925
|
-
return (await import("./chunks/delete-
|
|
43108
|
+
return (await import("./chunks/delete-HVWVDBQF.js")).default(client, args);
|
|
42926
43109
|
case "enable":
|
|
42927
43110
|
if (needHelp) {
|
|
42928
43111
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -42930,7 +43113,7 @@ async function main27(client) {
|
|
|
42930
43113
|
return 2;
|
|
42931
43114
|
}
|
|
42932
43115
|
telemetry2.trackCliSubcommandEnable(subcommandOriginal);
|
|
42933
|
-
return (await import("./chunks/enable-
|
|
43116
|
+
return (await import("./chunks/enable-ITE7U5C4.js")).default(client, args);
|
|
42934
43117
|
case "disable":
|
|
42935
43118
|
if (needHelp) {
|
|
42936
43119
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -42938,7 +43121,7 @@ async function main27(client) {
|
|
|
42938
43121
|
return 2;
|
|
42939
43122
|
}
|
|
42940
43123
|
telemetry2.trackCliSubcommandDisable(subcommandOriginal);
|
|
42941
|
-
return (await import("./chunks/disable-
|
|
43124
|
+
return (await import("./chunks/disable-CMBQPZ7L.js")).default(client, args);
|
|
42942
43125
|
case "reorder":
|
|
42943
43126
|
if (needHelp) {
|
|
42944
43127
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -42946,7 +43129,7 @@ async function main27(client) {
|
|
|
42946
43129
|
return 2;
|
|
42947
43130
|
}
|
|
42948
43131
|
telemetry2.trackCliSubcommandReorder(subcommandOriginal);
|
|
42949
|
-
return (await import("./chunks/reorder-
|
|
43132
|
+
return (await import("./chunks/reorder-G66QSKTR.js")).default(client, args);
|
|
42950
43133
|
case "export":
|
|
42951
43134
|
if (needHelp) {
|
|
42952
43135
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -42954,7 +43137,7 @@ async function main27(client) {
|
|
|
42954
43137
|
return 2;
|
|
42955
43138
|
}
|
|
42956
43139
|
telemetry2.trackCliSubcommandExport(subcommandOriginal);
|
|
42957
|
-
return (await import("./chunks/export-
|
|
43140
|
+
return (await import("./chunks/export-VVN33IBK.js")).default(client, args);
|
|
42958
43141
|
case "publish":
|
|
42959
43142
|
if (needHelp) {
|
|
42960
43143
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -42962,7 +43145,7 @@ async function main27(client) {
|
|
|
42962
43145
|
return 2;
|
|
42963
43146
|
}
|
|
42964
43147
|
telemetry2.trackCliSubcommandPublish(subcommandOriginal);
|
|
42965
|
-
return (await import("./chunks/publish-
|
|
43148
|
+
return (await import("./chunks/publish-NULVZ7RB.js")).default(client, args);
|
|
42966
43149
|
case "restore":
|
|
42967
43150
|
if (needHelp) {
|
|
42968
43151
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -42970,7 +43153,7 @@ async function main27(client) {
|
|
|
42970
43153
|
return 2;
|
|
42971
43154
|
}
|
|
42972
43155
|
telemetry2.trackCliSubcommandRestore(subcommandOriginal);
|
|
42973
|
-
return (await import("./chunks/restore-
|
|
43156
|
+
return (await import("./chunks/restore-LHDVXFOH.js")).default(client, args);
|
|
42974
43157
|
case "discard-staging":
|
|
42975
43158
|
if (needHelp) {
|
|
42976
43159
|
telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
|
|
@@ -42978,7 +43161,7 @@ async function main27(client) {
|
|
|
42978
43161
|
return 2;
|
|
42979
43162
|
}
|
|
42980
43163
|
telemetry2.trackCliSubcommandDiscardStaging(subcommandOriginal);
|
|
42981
|
-
return (await import("./chunks/discard-
|
|
43164
|
+
return (await import("./chunks/discard-ZDNWUYLY.js")).default(client, args);
|
|
42982
43165
|
default:
|
|
42983
43166
|
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG35));
|
|
42984
43167
|
output_manager_default.print(help(routesCommand, { columns: client.stderr.columns }));
|
|
@@ -43454,7 +43637,7 @@ function runCommand(cmd2, args) {
|
|
|
43454
43637
|
}
|
|
43455
43638
|
|
|
43456
43639
|
// src/commands/target/list.ts
|
|
43457
|
-
var
|
|
43640
|
+
var import_ms32 = __toESM(require_ms(), 1);
|
|
43458
43641
|
var import_chalk172 = __toESM(require_source(), 1);
|
|
43459
43642
|
function formatBranchMatcher(branchMatcher) {
|
|
43460
43643
|
if (branchMatcher?.type === "equals") {
|
|
@@ -43525,7 +43708,7 @@ async function list13(client, argv) {
|
|
|
43525
43708
|
accountId: link.org.id
|
|
43526
43709
|
});
|
|
43527
43710
|
output_manager_default.stopSpinner();
|
|
43528
|
-
const elapsed2 = (0,
|
|
43711
|
+
const elapsed2 = (0, import_ms32.default)(Date.now() - start);
|
|
43529
43712
|
result = withDefaultEnvironmentsIncluded(result);
|
|
43530
43713
|
if (asJson) {
|
|
43531
43714
|
const jsonOutput = {
|
|
@@ -43557,7 +43740,7 @@ async function list13(client, argv) {
|
|
|
43557
43740
|
BRANCH_TRACKING_MAP[target.type](link.project, target),
|
|
43558
43741
|
TYPE_MAP[target.type],
|
|
43559
43742
|
import_chalk172.default.gray(
|
|
43560
|
-
target.updatedAt > 0 ? (0,
|
|
43743
|
+
target.updatedAt > 0 ? (0, import_ms32.default)(Date.now() - target.updatedAt) : "-"
|
|
43561
43744
|
)
|
|
43562
43745
|
]
|
|
43563
43746
|
];
|
|
@@ -46631,7 +46814,7 @@ async function processCharges(response, breakdownPeriod, groupByDimension, conte
|
|
|
46631
46814
|
}
|
|
46632
46815
|
|
|
46633
46816
|
// src/commands/webhooks/ls.ts
|
|
46634
|
-
var
|
|
46817
|
+
var import_ms33 = __toESM(require_ms(), 1);
|
|
46635
46818
|
var import_chalk186 = __toESM(require_source(), 1);
|
|
46636
46819
|
var import_pluralize13 = __toESM(require_pluralize(), 1);
|
|
46637
46820
|
|
|
@@ -46735,7 +46918,7 @@ async function ls9(client, argv) {
|
|
|
46735
46918
|
function formatWebhooksTable(webhooks) {
|
|
46736
46919
|
const current = Date.now();
|
|
46737
46920
|
const rows = webhooks.map((webhook) => {
|
|
46738
|
-
const age = webhook.createdAt ? (0,
|
|
46921
|
+
const age = webhook.createdAt ? (0, import_ms33.default)(current - webhook.createdAt) : "-";
|
|
46739
46922
|
const eventsDisplay = webhook.events.length > 2 ? `${webhook.events.slice(0, 2).join(", ")} +${webhook.events.length - 2}` : webhook.events.join(", ");
|
|
46740
46923
|
return [webhook.id, webhook.url, eventsDisplay, import_chalk186.default.gray(age)];
|
|
46741
46924
|
});
|