vercel 54.1.0 → 54.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.
Files changed (67) hide show
  1. package/dist/chunks/{add-XFFRWMRQ.js → add-6BI52GC7.js} +8 -8
  2. package/dist/chunks/{chunk-ZKKIBUCU.js → chunk-3NTROBCB.js} +7 -4
  3. package/dist/chunks/{chunk-XVAEOG4L.js → chunk-3TDGMELF.js} +3 -5
  4. package/dist/chunks/{chunk-4OEA5ILS.js → chunk-4CIXZOP4.js} +29 -0
  5. package/dist/chunks/{chunk-V6RCNEUA.js → chunk-4KGRBMBC.js} +8 -8
  6. package/dist/chunks/{chunk-JFVGRFME.js → chunk-5EKBCYHA.js} +1 -1
  7. package/dist/chunks/{chunk-FUBTAFL2.js → chunk-5TTQBT67.js} +1 -1
  8. package/dist/chunks/{chunk-FXOKKAK2.js → chunk-63MSANDD.js} +14 -10
  9. package/dist/chunks/{chunk-PPIAHRII.js → chunk-7UDM3VHD.js} +1 -1
  10. package/dist/chunks/{chunk-LVUE7LLE.js → chunk-AKWLMA5B.js} +1 -1
  11. package/dist/chunks/{chunk-C5YP6KFI.js → chunk-AOJHEPS4.js} +6 -0
  12. package/dist/chunks/{chunk-4VPRHRPA.js → chunk-B3RJGSB2.js} +2 -2
  13. package/dist/chunks/{chunk-ZAAKSLHC.js → chunk-C2V6DCWN.js} +4 -2
  14. package/dist/chunks/{chunk-4PSOOFYO.js → chunk-DJA3IN2X.js} +1 -1
  15. package/dist/chunks/{chunk-FXSXQHVF.js → chunk-EU5K7JFJ.js} +5 -5
  16. package/dist/chunks/{chunk-CVDYWVCD.js → chunk-GJI2IQHA.js} +2 -2
  17. package/dist/chunks/{chunk-4GQQJY5Y.js → chunk-H33IJ7OP.js} +9 -0
  18. package/dist/chunks/{chunk-UVFXUXOZ.js → chunk-HFVP2JUO.js} +311 -72
  19. package/dist/chunks/{chunk-E3NE4SKN.js → chunk-L6Q2EQPI.js} +1 -0
  20. package/dist/chunks/{chunk-DKD6GTQT.js → chunk-OM5Z2KO5.js} +1 -1
  21. package/dist/chunks/{chunk-PNA7EZB2.js → chunk-PU4PEBGY.js} +1 -1
  22. package/dist/chunks/{chunk-F2UPASLT.js → chunk-PXR6WCEU.js} +5 -5
  23. package/dist/chunks/{chunk-N4WFAZKO.js → chunk-R6QYB2GK.js} +13 -3
  24. package/dist/chunks/{chunk-X775BOSL.js → chunk-RNIZUKES.js} +5018 -4454
  25. package/dist/chunks/{chunk-UTXSTM52.js → chunk-SJAFZ3UZ.js} +65 -5
  26. package/dist/chunks/{chunk-J3BCJYPE.js → chunk-SRLTKHXQ.js} +486 -8
  27. package/dist/chunks/{chunk-2DFWEDF7.js → chunk-SRVNEJVN.js} +2 -2
  28. package/dist/chunks/{chunk-XNUHSM7I.js → chunk-SXYVZF6H.js} +3 -3
  29. package/dist/chunks/{chunk-TZMIHH5D.js → chunk-TM2USC5N.js} +6 -11
  30. package/dist/chunks/{chunk-MMF4BVAP.js → chunk-TTOZFGDX.js} +3 -3
  31. package/dist/chunks/{chunk-KWDV5FZH.js → chunk-W64ECC2K.js} +1 -1
  32. package/dist/chunks/{chunk-IFATV36R.js → chunk-YAOSNCGO.js} +5 -8
  33. package/dist/chunks/{chunk-CQANJIEC.js → chunk-YP423QYK.js} +4 -6
  34. package/dist/chunks/{chunk-MUBKPS2Z.js → chunk-ZCMQ43RC.js} +1 -1
  35. package/dist/chunks/{chunk-IIZO5JJ2.js → chunk-ZUK6C2UA.js} +1 -1
  36. package/dist/chunks/{compile-vercel-config-42PRUTEP.js → compile-vercel-config-UTUECEB5.js} +3 -3
  37. package/dist/chunks/{delete-MXCXLO5L.js → delete-FML7PGMQ.js} +6 -6
  38. package/dist/chunks/{disable-LXQSUVY3.js → disable-LJFGBJQD.js} +6 -6
  39. package/dist/chunks/{discard-CKMEANJI.js → discard-JKLUB56V.js} +6 -6
  40. package/dist/chunks/{edit-PKYWQTN6.js → edit-24LNAGLI.js} +8 -8
  41. package/dist/chunks/{enable-IONDBJSL.js → enable-XV6WCSRR.js} +6 -6
  42. package/dist/chunks/{export-YV3QFTMT.js → export-IZAJQNHO.js} +6 -6
  43. package/dist/chunks/{inspect-SF355FJC.js → inspect-4OYBTMEZ.js} +10 -10
  44. package/dist/chunks/{list-ZGR3WI5L.js → list-FOLL3X7L.js} +9 -9
  45. package/dist/chunks/{list-GEI7DMTS.js → list-PEXOOVJA.js} +5 -5
  46. package/dist/chunks/{ls-GYN5LXZK.js → ls-3D5FA5CD.js} +8 -8
  47. package/dist/chunks/{publish-3WCELCTS.js → publish-FV5R2JPI.js} +6 -6
  48. package/dist/chunks/{query-TP56OPX6.js → query-JM422UQL.js} +6 -6
  49. package/dist/chunks/{reorder-QRNHPN5V.js → reorder-H5VPRRYP.js} +6 -6
  50. package/dist/chunks/{restore-IGN4HUFX.js → restore-JPFHV2E2.js} +6 -6
  51. package/dist/chunks/{rm-55RGOT4O.js → rm-AQFIGZB7.js} +8 -8
  52. package/dist/chunks/{routes-2YVMQEPC.js → routes-IBID4NSZ.js} +2 -2
  53. package/dist/chunks/{rule-inspect-QVOVMKDK.js → rule-inspect-XV56NBAE.js} +8 -8
  54. package/dist/chunks/{rules-KRCW5RQK.js → rules-SUXFDKPS.js} +7 -7
  55. package/dist/chunks/{schema-3J3IBIFA.js → schema-3I4KYWU3.js} +7 -7
  56. package/dist/chunks/{types-QAT6PCGL.js → types-V6KTYGWP.js} +3 -3
  57. package/dist/chunks/{update-E5UAD2DD.js → update-3W7ETGXO.js} +8 -8
  58. package/dist/commands/build/index.js +94 -31
  59. package/dist/commands/deploy/index.js +32 -26
  60. package/dist/commands/dev/index.js +86 -36
  61. package/dist/commands/env/index.js +18 -22
  62. package/dist/commands/link/index.js +22 -29
  63. package/dist/commands/list/index.js +10 -10
  64. package/dist/commands-bulk.js +3662 -1847
  65. package/dist/index.js +117 -463
  66. package/dist/version.mjs +1 -1
  67. package/package.json +25 -24
package/dist/index.js CHANGED
@@ -9,15 +9,19 @@ import {
9
9
  } from "./chunks/chunk-JFWE5ORG.js";
10
10
  import {
11
11
  box,
12
+ canAutoUpdate,
12
13
  did_you_mean_default,
13
14
  executeUpgrade,
15
+ hasAutoUpdatePreference,
14
16
  login,
15
17
  matchesCliApiTag,
18
+ require_ci_info,
19
+ setAutoUpdate,
16
20
  tryOpenApiFallback
17
- } from "./chunks/chunk-J3BCJYPE.js";
21
+ } from "./chunks/chunk-SRLTKHXQ.js";
18
22
  import {
19
23
  getUpdateCommand
20
- } from "./chunks/chunk-FUBTAFL2.js";
24
+ } from "./chunks/chunk-5TTQBT67.js";
21
25
  import {
22
26
  Client,
23
27
  getAuthConfigFilePath,
@@ -27,31 +31,31 @@ import {
27
31
  readConfigFile,
28
32
  writeToAuthConfigFile,
29
33
  writeToConfigFile
30
- } from "./chunks/chunk-F2UPASLT.js";
34
+ } from "./chunks/chunk-PXR6WCEU.js";
31
35
  import {
32
36
  highlight
33
37
  } from "./chunks/chunk-V5P25P7F.js";
34
38
  import {
35
39
  commandNames,
36
40
  commands
37
- } from "./chunks/chunk-UVFXUXOZ.js";
38
- import "./chunks/chunk-IFATV36R.js";
39
- import "./chunks/chunk-JFVGRFME.js";
40
- import "./chunks/chunk-TZMIHH5D.js";
41
- import "./chunks/chunk-XVAEOG4L.js";
42
- import "./chunks/chunk-ZAAKSLHC.js";
43
- import "./chunks/chunk-CQANJIEC.js";
44
- import {
45
- getScope
46
- } from "./chunks/chunk-KWDV5FZH.js";
47
- import "./chunks/chunk-4PSOOFYO.js";
41
+ } from "./chunks/chunk-HFVP2JUO.js";
42
+ import "./chunks/chunk-YAOSNCGO.js";
43
+ import "./chunks/chunk-5EKBCYHA.js";
44
+ import "./chunks/chunk-TM2USC5N.js";
45
+ import "./chunks/chunk-3TDGMELF.js";
46
+ import "./chunks/chunk-C2V6DCWN.js";
47
+ import "./chunks/chunk-YP423QYK.js";
48
+ import "./chunks/chunk-DJA3IN2X.js";
48
49
  import {
49
50
  require_semver
50
51
  } from "./chunks/chunk-IB5L4LKZ.js";
51
52
  import "./chunks/chunk-76ZNZKIN.js";
52
- import "./chunks/chunk-4VPRHRPA.js";
53
- import "./chunks/chunk-ZKKIBUCU.js";
54
- import "./chunks/chunk-MMF4BVAP.js";
53
+ import "./chunks/chunk-B3RJGSB2.js";
54
+ import "./chunks/chunk-3NTROBCB.js";
55
+ import {
56
+ getScope
57
+ } from "./chunks/chunk-W64ECC2K.js";
58
+ import "./chunks/chunk-TTOZFGDX.js";
55
59
  import {
56
60
  getLinkFromDir,
57
61
  getTeams,
@@ -62,20 +66,20 @@ import {
62
66
  readJSONFile,
63
67
  require_dist as require_dist2,
64
68
  require_lib
65
- } from "./chunks/chunk-X775BOSL.js";
69
+ } from "./chunks/chunk-RNIZUKES.js";
66
70
  import {
67
71
  TelemetryClient,
68
72
  TelemetryEventStore
69
- } from "./chunks/chunk-4OEA5ILS.js";
73
+ } from "./chunks/chunk-4CIXZOP4.js";
70
74
  import "./chunks/chunk-ULXHXZCZ.js";
71
75
  import "./chunks/chunk-CO5D46AG.js";
72
76
  import "./chunks/chunk-N2T234LO.js";
73
- import "./chunks/chunk-DKD6GTQT.js";
77
+ import "./chunks/chunk-OM5Z2KO5.js";
74
78
  import {
75
79
  getArgs,
76
80
  parseArguments,
77
81
  printError
78
- } from "./chunks/chunk-4GQQJY5Y.js";
82
+ } from "./chunks/chunk-H33IJ7OP.js";
79
83
  import {
80
84
  APIError,
81
85
  CantFindConfig,
@@ -305,10 +309,10 @@ var require_xdg_app_paths = __commonJS({
305
309
  };
306
310
  var windows = (name, isolated) => {
307
311
  const { env } = process;
308
- const homedir = os.homedir();
312
+ const homedir2 = os.homedir();
309
313
  const tmpdir = os.tmpdir();
310
- const appData = env.APPDATA || path2.join(homedir || tmpdir, "AppData", "Roaming");
311
- const localAppData = env.LOCALAPPDATA || path2.join(homedir || tmpdir, "AppData", "Local");
314
+ const appData = env.APPDATA || path2.join(homedir2 || tmpdir, "AppData", "Roaming");
315
+ const localAppData = env.LOCALAPPDATA || path2.join(homedir2 || tmpdir, "AppData", "Local");
312
316
  const object = {};
313
317
  object.cache = (options = { isolated: null }) => {
314
318
  options = _normalizeOptions(options, isolated);
@@ -391,446 +395,12 @@ var require_xdg_app_paths = __commonJS({
391
395
  }
392
396
  });
393
397
 
394
- // ../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/vendors.json
395
- var require_vendors = __commonJS({
396
- "../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/vendors.json"(exports, module) {
397
- module.exports = [
398
- {
399
- name: "Agola CI",
400
- constant: "AGOLA",
401
- env: "AGOLA_GIT_REF",
402
- pr: "AGOLA_PULL_REQUEST_ID"
403
- },
404
- {
405
- name: "Appcircle",
406
- constant: "APPCIRCLE",
407
- env: "AC_APPCIRCLE",
408
- pr: {
409
- env: "AC_GIT_PR",
410
- ne: "false"
411
- }
412
- },
413
- {
414
- name: "AppVeyor",
415
- constant: "APPVEYOR",
416
- env: "APPVEYOR",
417
- pr: "APPVEYOR_PULL_REQUEST_NUMBER"
418
- },
419
- {
420
- name: "AWS CodeBuild",
421
- constant: "CODEBUILD",
422
- env: "CODEBUILD_BUILD_ARN",
423
- pr: {
424
- env: "CODEBUILD_WEBHOOK_EVENT",
425
- any: [
426
- "PULL_REQUEST_CREATED",
427
- "PULL_REQUEST_UPDATED",
428
- "PULL_REQUEST_REOPENED"
429
- ]
430
- }
431
- },
432
- {
433
- name: "Azure Pipelines",
434
- constant: "AZURE_PIPELINES",
435
- env: "TF_BUILD",
436
- pr: {
437
- BUILD_REASON: "PullRequest"
438
- }
439
- },
440
- {
441
- name: "Bamboo",
442
- constant: "BAMBOO",
443
- env: "bamboo_planKey"
444
- },
445
- {
446
- name: "Bitbucket Pipelines",
447
- constant: "BITBUCKET",
448
- env: "BITBUCKET_COMMIT",
449
- pr: "BITBUCKET_PR_ID"
450
- },
451
- {
452
- name: "Bitrise",
453
- constant: "BITRISE",
454
- env: "BITRISE_IO",
455
- pr: "BITRISE_PULL_REQUEST"
456
- },
457
- {
458
- name: "Buddy",
459
- constant: "BUDDY",
460
- env: "BUDDY_WORKSPACE_ID",
461
- pr: "BUDDY_EXECUTION_PULL_REQUEST_ID"
462
- },
463
- {
464
- name: "Buildkite",
465
- constant: "BUILDKITE",
466
- env: "BUILDKITE",
467
- pr: {
468
- env: "BUILDKITE_PULL_REQUEST",
469
- ne: "false"
470
- }
471
- },
472
- {
473
- name: "CircleCI",
474
- constant: "CIRCLE",
475
- env: "CIRCLECI",
476
- pr: "CIRCLE_PULL_REQUEST"
477
- },
478
- {
479
- name: "Cirrus CI",
480
- constant: "CIRRUS",
481
- env: "CIRRUS_CI",
482
- pr: "CIRRUS_PR"
483
- },
484
- {
485
- name: "Codefresh",
486
- constant: "CODEFRESH",
487
- env: "CF_BUILD_ID",
488
- pr: {
489
- any: [
490
- "CF_PULL_REQUEST_NUMBER",
491
- "CF_PULL_REQUEST_ID"
492
- ]
493
- }
494
- },
495
- {
496
- name: "Codemagic",
497
- constant: "CODEMAGIC",
498
- env: "CM_BUILD_ID",
499
- pr: "CM_PULL_REQUEST"
500
- },
501
- {
502
- name: "Codeship",
503
- constant: "CODESHIP",
504
- env: {
505
- CI_NAME: "codeship"
506
- }
507
- },
508
- {
509
- name: "Drone",
510
- constant: "DRONE",
511
- env: "DRONE",
512
- pr: {
513
- DRONE_BUILD_EVENT: "pull_request"
514
- }
515
- },
516
- {
517
- name: "dsari",
518
- constant: "DSARI",
519
- env: "DSARI"
520
- },
521
- {
522
- name: "Earthly",
523
- constant: "EARTHLY",
524
- env: "EARTHLY_CI"
525
- },
526
- {
527
- name: "Expo Application Services",
528
- constant: "EAS",
529
- env: "EAS_BUILD"
530
- },
531
- {
532
- name: "Gerrit",
533
- constant: "GERRIT",
534
- env: "GERRIT_PROJECT"
535
- },
536
- {
537
- name: "Gitea Actions",
538
- constant: "GITEA_ACTIONS",
539
- env: "GITEA_ACTIONS"
540
- },
541
- {
542
- name: "GitHub Actions",
543
- constant: "GITHUB_ACTIONS",
544
- env: "GITHUB_ACTIONS",
545
- pr: {
546
- GITHUB_EVENT_NAME: "pull_request"
547
- }
548
- },
549
- {
550
- name: "GitLab CI",
551
- constant: "GITLAB",
552
- env: "GITLAB_CI",
553
- pr: "CI_MERGE_REQUEST_ID"
554
- },
555
- {
556
- name: "GoCD",
557
- constant: "GOCD",
558
- env: "GO_PIPELINE_LABEL"
559
- },
560
- {
561
- name: "Google Cloud Build",
562
- constant: "GOOGLE_CLOUD_BUILD",
563
- env: "BUILDER_OUTPUT"
564
- },
565
- {
566
- name: "Harness CI",
567
- constant: "HARNESS",
568
- env: "HARNESS_BUILD_ID"
569
- },
570
- {
571
- name: "Heroku",
572
- constant: "HEROKU",
573
- env: {
574
- env: "NODE",
575
- includes: "/app/.heroku/node/bin/node"
576
- }
577
- },
578
- {
579
- name: "Hudson",
580
- constant: "HUDSON",
581
- env: "HUDSON_URL"
582
- },
583
- {
584
- name: "Jenkins",
585
- constant: "JENKINS",
586
- env: [
587
- "JENKINS_URL",
588
- "BUILD_ID"
589
- ],
590
- pr: {
591
- any: [
592
- "ghprbPullId",
593
- "CHANGE_ID"
594
- ]
595
- }
596
- },
597
- {
598
- name: "LayerCI",
599
- constant: "LAYERCI",
600
- env: "LAYERCI",
601
- pr: "LAYERCI_PULL_REQUEST"
602
- },
603
- {
604
- name: "Magnum CI",
605
- constant: "MAGNUM",
606
- env: "MAGNUM"
607
- },
608
- {
609
- name: "Netlify CI",
610
- constant: "NETLIFY",
611
- env: "NETLIFY",
612
- pr: {
613
- env: "PULL_REQUEST",
614
- ne: "false"
615
- }
616
- },
617
- {
618
- name: "Nevercode",
619
- constant: "NEVERCODE",
620
- env: "NEVERCODE",
621
- pr: {
622
- env: "NEVERCODE_PULL_REQUEST",
623
- ne: "false"
624
- }
625
- },
626
- {
627
- name: "Prow",
628
- constant: "PROW",
629
- env: "PROW_JOB_ID"
630
- },
631
- {
632
- name: "ReleaseHub",
633
- constant: "RELEASEHUB",
634
- env: "RELEASE_BUILD_ID"
635
- },
636
- {
637
- name: "Render",
638
- constant: "RENDER",
639
- env: "RENDER",
640
- pr: {
641
- IS_PULL_REQUEST: "true"
642
- }
643
- },
644
- {
645
- name: "Sail CI",
646
- constant: "SAIL",
647
- env: "SAILCI",
648
- pr: "SAIL_PULL_REQUEST_NUMBER"
649
- },
650
- {
651
- name: "Screwdriver",
652
- constant: "SCREWDRIVER",
653
- env: "SCREWDRIVER",
654
- pr: {
655
- env: "SD_PULL_REQUEST",
656
- ne: "false"
657
- }
658
- },
659
- {
660
- name: "Semaphore",
661
- constant: "SEMAPHORE",
662
- env: "SEMAPHORE",
663
- pr: "PULL_REQUEST_NUMBER"
664
- },
665
- {
666
- name: "Sourcehut",
667
- constant: "SOURCEHUT",
668
- env: {
669
- CI_NAME: "sourcehut"
670
- }
671
- },
672
- {
673
- name: "Strider CD",
674
- constant: "STRIDER",
675
- env: "STRIDER"
676
- },
677
- {
678
- name: "TaskCluster",
679
- constant: "TASKCLUSTER",
680
- env: [
681
- "TASK_ID",
682
- "RUN_ID"
683
- ]
684
- },
685
- {
686
- name: "TeamCity",
687
- constant: "TEAMCITY",
688
- env: "TEAMCITY_VERSION"
689
- },
690
- {
691
- name: "Travis CI",
692
- constant: "TRAVIS",
693
- env: "TRAVIS",
694
- pr: {
695
- env: "TRAVIS_PULL_REQUEST",
696
- ne: "false"
697
- }
698
- },
699
- {
700
- name: "Vela",
701
- constant: "VELA",
702
- env: "VELA",
703
- pr: {
704
- VELA_PULL_REQUEST: "1"
705
- }
706
- },
707
- {
708
- name: "Vercel",
709
- constant: "VERCEL",
710
- env: {
711
- any: [
712
- "NOW_BUILDER",
713
- "VERCEL"
714
- ]
715
- },
716
- pr: "VERCEL_GIT_PULL_REQUEST_ID"
717
- },
718
- {
719
- name: "Visual Studio App Center",
720
- constant: "APPCENTER",
721
- env: "APPCENTER_BUILD_ID"
722
- },
723
- {
724
- name: "Woodpecker",
725
- constant: "WOODPECKER",
726
- env: {
727
- CI: "woodpecker"
728
- },
729
- pr: {
730
- CI_BUILD_EVENT: "pull_request"
731
- }
732
- },
733
- {
734
- name: "Xcode Cloud",
735
- constant: "XCODE_CLOUD",
736
- env: "CI_XCODE_PROJECT",
737
- pr: "CI_PULL_REQUEST_NUMBER"
738
- },
739
- {
740
- name: "Xcode Server",
741
- constant: "XCODE_SERVER",
742
- env: "XCS"
743
- }
744
- ];
745
- }
746
- });
747
-
748
- // ../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/index.js
749
- var require_ci_info = __commonJS({
750
- "../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/index.js"(exports) {
751
- "use strict";
752
- var vendors = require_vendors();
753
- var env = process.env;
754
- Object.defineProperty(exports, "_vendors", {
755
- value: vendors.map(function(v) {
756
- return v.constant;
757
- })
758
- });
759
- exports.name = null;
760
- exports.isPR = null;
761
- exports.id = null;
762
- vendors.forEach(function(vendor) {
763
- const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
764
- const isCI = envs.every(function(obj) {
765
- return checkEnv(obj);
766
- });
767
- exports[vendor.constant] = isCI;
768
- if (!isCI) {
769
- return;
770
- }
771
- exports.name = vendor.name;
772
- exports.isPR = checkPR(vendor);
773
- exports.id = vendor.constant;
774
- });
775
- exports.isCI = !!(env.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false'
776
- (env.BUILD_ID || // Jenkins, Cloudbees
777
- env.BUILD_NUMBER || // Jenkins, TeamCity
778
- env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
779
- env.CI_APP_ID || // Appflow
780
- env.CI_BUILD_ID || // Appflow
781
- env.CI_BUILD_NUMBER || // Appflow
782
- env.CI_NAME || // Codeship and others
783
- env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
784
- env.RUN_ID || // TaskCluster, dsari
785
- exports.name || false));
786
- function checkEnv(obj) {
787
- if (typeof obj === "string")
788
- return !!env[obj];
789
- if ("env" in obj) {
790
- return env[obj.env] && env[obj.env].includes(obj.includes);
791
- }
792
- if ("any" in obj) {
793
- return obj.any.some(function(k) {
794
- return !!env[k];
795
- });
796
- }
797
- return Object.keys(obj).every(function(k) {
798
- return env[k] === obj[k];
799
- });
800
- }
801
- function checkPR(vendor) {
802
- switch (typeof vendor.pr) {
803
- case "string":
804
- return !!env[vendor.pr];
805
- case "object":
806
- if ("env" in vendor.pr) {
807
- if ("any" in vendor.pr) {
808
- return vendor.pr.any.some(function(key) {
809
- return env[vendor.pr.env] === key;
810
- });
811
- } else {
812
- return vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
813
- }
814
- } else if ("any" in vendor.pr) {
815
- return vendor.pr.any.some(function(key) {
816
- return !!env[key];
817
- });
818
- } else {
819
- return checkEnv(vendor.pr);
820
- }
821
- default:
822
- return null;
823
- }
824
- }
825
- }
826
- });
827
-
828
398
  // src/index.ts
829
399
  var import_error_utils3 = __toESM(require_dist(), 1);
830
400
  var import_fs_extra2 = __toESM(require_lib(), 1);
831
401
  var import_chalk = __toESM(require_source(), 1);
832
402
  var import_epipebomb = __toESM(require_epipebomb(), 1);
833
- import { join } from "path";
403
+ import { join as join2 } from "path";
834
404
  import { existsSync as existsSync2 } from "fs";
835
405
 
836
406
  // src/util/get-latest-version/index.ts
@@ -1464,6 +1034,12 @@ var RootTelemetryClient = class extends TelemetryClient {
1464
1034
  value: actual
1465
1035
  });
1466
1036
  }
1037
+ trackCliCommandTraces(actual) {
1038
+ this.trackCliCommand({
1039
+ command: "traces",
1040
+ value: actual
1041
+ });
1042
+ }
1467
1043
  trackCliCommandWhoami(actual) {
1468
1044
  this.trackCliCommand({
1469
1045
  command: "whoami",
@@ -1518,6 +1094,12 @@ var RootTelemetryClient = class extends TelemetryClient {
1518
1094
  trackDeviceId(deviceId) {
1519
1095
  super.trackDeviceId(deviceId);
1520
1096
  }
1097
+ trackVercelPluginActiveSession() {
1098
+ super.trackVercelPluginActiveSession();
1099
+ }
1100
+ trackVercelPluginVersion(version) {
1101
+ super.trackVercelPluginVersion(version);
1102
+ }
1521
1103
  trackErrorStatus(status) {
1522
1104
  super.trackErrorStatus(status);
1523
1105
  }
@@ -1598,6 +1180,45 @@ var RootTelemetryClient = class extends TelemetryClient {
1598
1180
  }
1599
1181
  };
1600
1182
 
1183
+ // src/util/telemetry/vercel-plugin.ts
1184
+ import { readFileSync } from "fs";
1185
+ import { homedir } from "os";
1186
+ import { join } from "path";
1187
+ var ACTIVE_SESSION_MARKER_PATH = join(
1188
+ homedir(),
1189
+ ".config",
1190
+ "vercel-plugin",
1191
+ "active-session.json"
1192
+ );
1193
+ var SEMVERISH_RE = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;
1194
+ function isRecord(value) {
1195
+ return typeof value === "object" && value !== null;
1196
+ }
1197
+ function readVercelPluginActiveSessionMarker(opts = {}) {
1198
+ const filePath = opts.filePath ?? ACTIVE_SESSION_MARKER_PATH;
1199
+ const now = opts.now?.() ?? Date.now();
1200
+ try {
1201
+ const marker = JSON.parse(readFileSync(filePath, "utf-8"));
1202
+ if (!isRecord(marker)) {
1203
+ return null;
1204
+ }
1205
+ if (marker.schema !== 1 || marker.active !== true) {
1206
+ return null;
1207
+ }
1208
+ if (typeof marker.expiresAt !== "number" || marker.expiresAt <= now) {
1209
+ return null;
1210
+ }
1211
+ if (typeof marker.pluginVersion !== "string" || !SEMVERISH_RE.test(marker.pluginVersion)) {
1212
+ return null;
1213
+ }
1214
+ return {
1215
+ pluginVersion: marker.pluginVersion
1216
+ };
1217
+ } catch {
1218
+ return null;
1219
+ }
1220
+ }
1221
+
1601
1222
  // src/util/telemetry/check-status.ts
1602
1223
  function checkTelemetryStatus({ config: config2 }) {
1603
1224
  if (config2.telemetry) {
@@ -1694,6 +1315,7 @@ function hasProxyConfig() {
1694
1315
  }
1695
1316
  (0, import_epipebomb.default)();
1696
1317
  var client;
1318
+ var resolvedCommandForUpdate;
1697
1319
  var handleRejection = async (err) => {
1698
1320
  if (err) {
1699
1321
  if (err instanceof Error) {
@@ -1875,10 +1497,10 @@ var main = async () => {
1875
1497
  isDebug: process.env.VERCEL_TELEMETRY_DEBUG === "1",
1876
1498
  config: config2.telemetry,
1877
1499
  cliDevice: isTelemetryFlushCommand ? void 0 : {
1878
- filePath: join(VERCEL_DIR, "telemetry-device.json")
1500
+ filePath: join2(VERCEL_DIR, "telemetry-device.json")
1879
1501
  },
1880
1502
  cliSession: isTelemetryFlushCommand ? void 0 : {
1881
- filePath: join(VERCEL_DIR, "telemetry-session.json")
1503
+ filePath: join2(VERCEL_DIR, "telemetry-session.json")
1882
1504
  }
1883
1505
  });
1884
1506
  checkTelemetryStatus({
@@ -1897,6 +1519,11 @@ var main = async () => {
1897
1519
  const { isAgent, agent: detectedAgent } = await determineAgent();
1898
1520
  telemetry.trackInvocationId(telemetryEventStore.currentInvocationId);
1899
1521
  telemetry.trackDeviceId(telemetryEventStore.currentDeviceId);
1522
+ const vercelPluginMarker = readVercelPluginActiveSessionMarker();
1523
+ if (vercelPluginMarker) {
1524
+ telemetry.trackVercelPluginActiveSession();
1525
+ telemetry.trackVercelPluginVersion(vercelPluginMarker.pluginVersion);
1526
+ }
1900
1527
  telemetry.trackAgenticUse(detectedAgent?.name);
1901
1528
  telemetry.trackCPUs();
1902
1529
  telemetry.trackPlatform();
@@ -2034,7 +1661,7 @@ var main = async () => {
2034
1661
  let subcommand = void 0;
2035
1662
  let userSuppliedSubCommand = "";
2036
1663
  if (targetOrSubcommand) {
2037
- const targetPath = join(cwd, targetOrSubcommand);
1664
+ const targetPath = join2(cwd, targetOrSubcommand);
2038
1665
  const targetPathExists = existsSync2(targetPath);
2039
1666
  const subcommandExists = GLOBAL_COMMANDS.has(targetOrSubcommand) || commands.has(targetOrSubcommand);
2040
1667
  if (targetPathExists && subcommandExists && !parsedArgs.flags["--cwd"] && !process.env.NOW_BUILDER) {
@@ -2520,6 +2147,10 @@ var main = async () => {
2520
2147
  telemetry.trackCliCommandTelemetry(userSuppliedSubCommand);
2521
2148
  func = (await import("./commands-bulk.js")).telemetry;
2522
2149
  break;
2150
+ case "traces":
2151
+ telemetry.trackCliCommandTraces(userSuppliedSubCommand);
2152
+ func = (await import("./commands-bulk.js")).traces;
2153
+ break;
2523
2154
  case "upgrade":
2524
2155
  telemetry.trackCliCommandUpgrade(userSuppliedSubCommand);
2525
2156
  func = (await import("./commands-bulk.js")).upgrade;
@@ -2555,6 +2186,7 @@ var main = async () => {
2555
2186
  if (!telemetryEventStore.hasUserId && !client.authConfig.userId) {
2556
2187
  earlyGetUserPromise = getUser(client).catch(() => void 0);
2557
2188
  }
2189
+ resolvedCommandForUpdate = targetCommand;
2558
2190
  exitCode = await rootSpan.child("vc.cli.command", { command: subcommand || "deploy" }).trace(() => func(client));
2559
2191
  }
2560
2192
  } catch (err) {
@@ -2610,7 +2242,7 @@ var main = async () => {
2610
2242
  rootSpan.stop();
2611
2243
  if (client.traceDiagnosticsPath) {
2612
2244
  try {
2613
- await mkdir(join(client.traceDiagnosticsPath, ".."), { recursive: true });
2245
+ await mkdir(join2(client.traceDiagnosticsPath, ".."), { recursive: true });
2614
2246
  await writeFile(
2615
2247
  client.traceDiagnosticsPath,
2616
2248
  JSON.stringify(traceReporter.events)
@@ -2629,6 +2261,21 @@ main().then(async (exitCode) => {
2629
2261
  });
2630
2262
  if (latest) {
2631
2263
  const changelog = `https://github.com/vercel/vercel/releases/tag/vercel%40${latest}`;
2264
+ const originalExitCode = typeof exitCode === "number" ? exitCode : 0;
2265
+ if (await canAutoUpdate(
2266
+ client,
2267
+ originalExitCode,
2268
+ resolvedCommandForUpdate
2269
+ )) {
2270
+ const upgradeExitCode = await executeUpgrade();
2271
+ process.exitCode = originalExitCode;
2272
+ if (upgradeExitCode !== 0) {
2273
+ output_manager_default.log(
2274
+ `Automatic update failed. Continuing with original exit code ${originalExitCode}.`
2275
+ );
2276
+ }
2277
+ return;
2278
+ }
2632
2279
  if (isTTY) {
2633
2280
  const errorMsg = exitCode && exitCode !== 2 ? import_chalk.default.magenta(
2634
2281
  ` The latest update ${import_chalk.default.italic(
@@ -2653,6 +2300,13 @@ Update available for Vercel CLI (${import_chalk.default.gray(
2653
2300
  );
2654
2301
  if (shouldUpgrade) {
2655
2302
  const upgradeExitCode = await executeUpgrade();
2303
+ if (upgradeExitCode === 0 && !hasAutoUpdatePreference(client.config)) {
2304
+ const enableAutoUpdates = await client.input.confirm(
2305
+ "Enable automatic CLI updates for future releases?",
2306
+ false
2307
+ );
2308
+ setAutoUpdate(client, enableAutoUpdates);
2309
+ }
2656
2310
  process.exitCode = upgradeExitCode;
2657
2311
  return;
2658
2312
  }