vercel 56.0.0 → 56.2.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 (64) hide show
  1. package/dist/chunks/{add-YN76XNHI.js → add-T6ZTAEU2.js} +4 -4
  2. package/dist/chunks/{add-MD247HM7.js → add-YQRDKWJH.js} +3 -3
  3. package/dist/chunks/{chunk-DO3V6PZD.js → chunk-AEENIITE.js} +4 -4
  4. package/dist/chunks/{chunk-NZ73KKYG.js → chunk-AVLGVZJ5.js} +2 -2
  5. package/dist/chunks/{chunk-36OUS2KE.js → chunk-B6SCQUDV.js} +1 -1
  6. package/dist/chunks/{chunk-KSJ4FNUG.js → chunk-E3Y4SDXF.js} +1 -1
  7. package/dist/chunks/{chunk-C6E2RJS7.js → chunk-EI555LUJ.js} +1 -1
  8. package/dist/chunks/{chunk-2BZVY6SF.js → chunk-EKIKD7RS.js} +4 -4
  9. package/dist/chunks/{chunk-JHZG2MPW.js → chunk-HMMPJ3VD.js} +2 -2
  10. package/dist/chunks/{chunk-75HDPY6N.js → chunk-HR6VI6UV.js} +2 -2
  11. package/dist/chunks/{chunk-3JOLICSO.js → chunk-K2THP63Z.js} +1 -1
  12. package/dist/chunks/{chunk-VPDJOK2C.js → chunk-LSPZHWWP.js} +1 -1
  13. package/dist/chunks/{chunk-VSD5BID5.js → chunk-LXF3AXHM.js} +1 -1
  14. package/dist/chunks/{chunk-ORKY33ZK.js → chunk-NQEAHRBI.js} +4 -4
  15. package/dist/chunks/{chunk-MBH4DFF7.js → chunk-PN2GJKM5.js} +1 -1
  16. package/dist/chunks/{chunk-T7EIXPC5.js → chunk-PQK4YU22.js} +1 -1
  17. package/dist/chunks/{chunk-TNDFVAZV.js → chunk-RLXBXRU2.js} +2 -2
  18. package/dist/chunks/{chunk-FN36GZDS.js → chunk-SHT5IY3Q.js} +3 -1
  19. package/dist/chunks/{chunk-N4VWB5RV.js → chunk-SRJTYE5U.js} +1 -1
  20. package/dist/chunks/{chunk-ZHDXN5V3.js → chunk-WOA4Z45Z.js} +2 -2
  21. package/dist/chunks/{chunk-KODCUW77.js → chunk-XFMTSTYT.js} +7 -4
  22. package/dist/chunks/{chunk-THMFJODG.js → chunk-YGSTSVXS.js} +24 -2
  23. package/dist/chunks/{compile-vercel-config-65QWHKPO.js → compile-vercel-config-3AG4VKHZ.js} +1 -1
  24. package/dist/chunks/{delete-NPEJGNTV.js → delete-JLJ753B4.js} +2 -2
  25. package/dist/chunks/{disable-RH3MH7PH.js → disable-AXFGDOYN.js} +2 -2
  26. package/dist/chunks/{discard-IJBFO24S.js → discard-557SDKVO.js} +2 -2
  27. package/dist/chunks/{edit-GMLOKGHO.js → edit-ITGNF7S5.js} +3 -3
  28. package/dist/chunks/{enable-QCTL7ISO.js → enable-6RMJPNW5.js} +2 -2
  29. package/dist/chunks/{export-6ERWU54A.js → export-3NC3DPRR.js} +2 -2
  30. package/dist/chunks/{image-XUMTOUQS.js → image-FGP5UVA5.js} +3 -3
  31. package/dist/chunks/{inspect-OKOUOOWW.js → inspect-56OMR6RC.js} +3 -3
  32. package/dist/chunks/{inspect-7UPFOAJO.js → inspect-AF5J3QDV.js} +3 -3
  33. package/dist/chunks/{inspect-ZS4U24NA.js → inspect-FDF5WZMM.js} +3 -3
  34. package/dist/chunks/{inspect-F6LEST4Y.js → inspect-N5DHCKLZ.js} +3 -3
  35. package/dist/chunks/{list-BTMO3CXU.js → list-F2AW7L3D.js} +3 -3
  36. package/dist/chunks/{list-ZK7Q3UHB.js → list-PLG2ZHBA.js} +2 -2
  37. package/dist/chunks/{login-POFRYQZ6.js → login-LQRR64K7.js} +3 -3
  38. package/dist/chunks/{ls-D5Z4IWMU.js → ls-E7FYH3DW.js} +4 -4
  39. package/dist/chunks/{ls-JGNNPYUA.js → ls-EKNQN3V4.js} +3 -3
  40. package/dist/chunks/{ls-EXRMNZUT.js → ls-FWPYY7GH.js} +3 -3
  41. package/dist/chunks/{ls-Z2TCQW5W.js → ls-HZDBJLMG.js} +3 -3
  42. package/dist/chunks/{publish-ED2XVYSE.js → publish-PDGTM3M7.js} +2 -2
  43. package/dist/chunks/{query-6XMBJTPX.js → query-MUQKKYXI.js} +2 -2
  44. package/dist/chunks/{reorder-7B6HZCOZ.js → reorder-B76HXU6D.js} +2 -2
  45. package/dist/chunks/{restore-47ZDRYQT.js → restore-2PYXS4NP.js} +2 -2
  46. package/dist/chunks/{rm-4IY6QGHF.js → rm-GZW2IDWX.js} +3 -3
  47. package/dist/chunks/{rm-AA7WYBZ5.js → rm-SD3EJRXY.js} +3 -3
  48. package/dist/chunks/{rm-NGTPTPZK.js → rm-SFC67P5U.js} +4 -4
  49. package/dist/chunks/{rule-inspect-FNX6P4LZ.js → rule-inspect-MSPP3V4O.js} +4 -4
  50. package/dist/chunks/{rules-MMCCBGQJ.js → rules-AN32QRP7.js} +6 -6
  51. package/dist/chunks/{schema-JSK7S7HL.js → schema-2GYFHMCN.js} +2 -2
  52. package/dist/chunks/{tags-KNCSBTIH.js → tags-ULDC3YLP.js} +2 -2
  53. package/dist/chunks/{update-JEFLJ3TH.js → update-NE62WKTZ.js} +4 -4
  54. package/dist/commands/build/index.js +41 -26
  55. package/dist/commands/deploy/index.js +10 -10
  56. package/dist/commands/dev/index.js +8 -8
  57. package/dist/commands/env/index.js +152 -24
  58. package/dist/commands/link/index.js +7 -7
  59. package/dist/commands/list/index.js +3 -3
  60. package/dist/commands-bulk.js +415 -43
  61. package/dist/index.js +8 -8
  62. package/dist/vc.js +51 -0
  63. package/dist/version.mjs +1 -1
  64. package/package.json +15 -15
@@ -31,7 +31,7 @@ import {
31
31
  runInteractiveEditLoop,
32
32
  stripQuotes,
33
33
  validateActionFlags
34
- } from "./chunks/chunk-T7EIXPC5.js";
34
+ } from "./chunks/chunk-PQK4YU22.js";
35
35
  import {
36
36
  getRouteVersions
37
37
  } from "./chunks/chunk-AHU7WNL2.js";
@@ -49,7 +49,7 @@ import {
49
49
  parsePosition,
50
50
  parseSubcommandArgs,
51
51
  withGlobalFlags
52
- } from "./chunks/chunk-VPDJOK2C.js";
52
+ } from "./chunks/chunk-LSPZHWWP.js";
53
53
  import {
54
54
  normalizeRepeatableStringFilters,
55
55
  parseTimeFlag
@@ -66,11 +66,11 @@ import {
66
66
  resolveOpenApiTagForTeamsCli,
67
67
  setAutoUpdate,
68
68
  tryOpenApiFallback
69
- } from "./chunks/chunk-DO3V6PZD.js";
69
+ } from "./chunks/chunk-AEENIITE.js";
70
70
  import {
71
71
  getUpdateCommand,
72
72
  isGlobal
73
- } from "./chunks/chunk-MBH4DFF7.js";
73
+ } from "./chunks/chunk-PN2GJKM5.js";
74
74
  import {
75
75
  Now,
76
76
  addDomain,
@@ -92,14 +92,14 @@ import {
92
92
  require_format,
93
93
  require_jsonlines,
94
94
  setupDomain
95
- } from "./chunks/chunk-ORKY33ZK.js";
95
+ } from "./chunks/chunk-NQEAHRBI.js";
96
96
  import {
97
97
  getGlobalPathConfig,
98
98
  persistAuthConfig,
99
99
  readLocalConfig,
100
100
  sleep,
101
101
  writeToConfigFile
102
- } from "./chunks/chunk-75HDPY6N.js";
102
+ } from "./chunks/chunk-HR6VI6UV.js";
103
103
  import "./chunks/chunk-V5P25P7F.js";
104
104
  import {
105
105
  CHECKBOX_INSTRUCTIONS,
@@ -131,7 +131,7 @@ import {
131
131
  import {
132
132
  formatEnvironment,
133
133
  validateLsArgs
134
- } from "./chunks/chunk-36OUS2KE.js";
134
+ } from "./chunks/chunk-B6SCQUDV.js";
135
135
  import {
136
136
  validateJsonOutput
137
137
  } from "./chunks/chunk-XPKWKPWA.js";
@@ -415,7 +415,7 @@ import {
415
415
  webAnalyticsSubcommand,
416
416
  webhooksCommand,
417
417
  whoamiCommand
418
- } from "./chunks/chunk-NZ73KKYG.js";
418
+ } from "./chunks/chunk-AVLGVZJ5.js";
419
419
  import {
420
420
  addSubcommand as addSubcommand12,
421
421
  inspectSubcommand as inspectSubcommand8,
@@ -476,9 +476,9 @@ import "./chunks/chunk-IDMKFYEA.js";
476
476
  import "./chunks/chunk-HA7C7SDO.js";
477
477
  import {
478
478
  main
479
- } from "./chunks/chunk-2BZVY6SF.js";
479
+ } from "./chunks/chunk-EKIKD7RS.js";
480
480
  import "./chunks/chunk-IB5L4LKZ.js";
481
- import "./chunks/chunk-N4VWB5RV.js";
481
+ import "./chunks/chunk-SRJTYE5U.js";
482
482
  import {
483
483
  require_execa
484
484
  } from "./chunks/chunk-24FCBXI4.js";
@@ -493,21 +493,21 @@ import {
493
493
  } from "./chunks/chunk-VXYGCOKL.js";
494
494
  import {
495
495
  ensureLink
496
- } from "./chunks/chunk-ZHDXN5V3.js";
496
+ } from "./chunks/chunk-WOA4Z45Z.js";
497
497
  import {
498
498
  printProjectNotFoundError
499
- } from "./chunks/chunk-KODCUW77.js";
499
+ } from "./chunks/chunk-XFMTSTYT.js";
500
500
  import {
501
501
  AGENT_ACTION,
502
502
  AGENT_REASON,
503
503
  AGENT_STATUS
504
504
  } from "./chunks/chunk-IC4YEIGW.js";
505
- import "./chunks/chunk-C6E2RJS7.js";
506
- import "./chunks/chunk-3JOLICSO.js";
505
+ import "./chunks/chunk-EI555LUJ.js";
506
+ import "./chunks/chunk-K2THP63Z.js";
507
507
  import {
508
508
  detectExplicitScope,
509
509
  getScope
510
- } from "./chunks/chunk-VSD5BID5.js";
510
+ } from "./chunks/chunk-LXF3AXHM.js";
511
511
  import {
512
512
  help
513
513
  } from "./chunks/chunk-QY63UKTP.js";
@@ -550,20 +550,23 @@ import {
550
550
  processRevocationResponse,
551
551
  pull,
552
552
  readJSONFile,
553
+ require_chownr,
553
554
  require_dist as require_dist2,
554
555
  require_dist3,
555
556
  require_fast_deep_equal,
556
557
  require_frameworks,
557
558
  require_lib,
559
+ require_mkdirp,
558
560
  require_open,
559
561
  require_pluralize,
560
- require_tar_fs,
562
+ require_pump,
563
+ require_tar_stream,
561
564
  resolveProjectCwd,
562
565
  revocationRequest,
563
566
  selectAndParseRemoteUrl,
564
567
  selectOrg,
565
568
  ua_default
566
- } from "./chunks/chunk-THMFJODG.js";
569
+ } from "./chunks/chunk-YGSTSVXS.js";
567
570
  import {
568
571
  argvHasNonInteractive,
569
572
  buildCommandWithGlobalFlags,
@@ -666,10 +669,352 @@ import {
666
669
  require_source
667
670
  } from "./chunks/chunk-S7KYDPEM.js";
668
671
  import {
672
+ __commonJS,
669
673
  __require,
670
674
  __toESM
671
675
  } from "./chunks/chunk-TZ2YI2VH.js";
672
676
 
677
+ // ../../node_modules/.pnpm/tar-fs@1.16.5/node_modules/tar-fs/index.js
678
+ var require_tar_fs = __commonJS({
679
+ "../../node_modules/.pnpm/tar-fs@1.16.5/node_modules/tar-fs/index.js"(exports) {
680
+ var chownr = require_chownr();
681
+ var tar2 = require_tar_stream();
682
+ var pump = require_pump();
683
+ var mkdirp = require_mkdirp();
684
+ var fs2 = __require("fs");
685
+ var path3 = __require("path");
686
+ var os = __require("os");
687
+ var win32 = os.platform() === "win32";
688
+ var noop = function() {
689
+ };
690
+ var echo = function(name) {
691
+ return name;
692
+ };
693
+ var normalize = !win32 ? echo : function(name) {
694
+ return name.replace(/\\/g, "/").replace(/[:?<>|]/g, "_");
695
+ };
696
+ var statAll = function(fs3, stat2, cwd, ignore, entries, sort) {
697
+ var queue = entries || ["."];
698
+ return function loop(callback) {
699
+ if (!queue.length)
700
+ return callback();
701
+ var next = queue.shift();
702
+ var nextAbs = path3.join(cwd, next);
703
+ stat2(nextAbs, function(err, stat3) {
704
+ if (err)
705
+ return callback(err);
706
+ if (!stat3.isDirectory())
707
+ return callback(null, next, stat3);
708
+ fs3.readdir(nextAbs, function(err2, files) {
709
+ if (err2)
710
+ return callback(err2);
711
+ if (sort)
712
+ files.sort();
713
+ for (var i = 0; i < files.length; i++) {
714
+ if (!ignore(path3.join(cwd, next, files[i])))
715
+ queue.push(path3.join(next, files[i]));
716
+ }
717
+ callback(null, next, stat3);
718
+ });
719
+ });
720
+ };
721
+ };
722
+ var strip = function(map, level) {
723
+ return function(header) {
724
+ header.name = header.name.split("/").slice(level).join("/");
725
+ var linkname = header.linkname;
726
+ if (linkname && (header.type === "link" || path3.isAbsolute(linkname))) {
727
+ header.linkname = linkname.split("/").slice(level).join("/");
728
+ }
729
+ return map(header);
730
+ };
731
+ };
732
+ exports.pack = function(cwd, opts) {
733
+ if (!cwd)
734
+ cwd = ".";
735
+ if (!opts)
736
+ opts = {};
737
+ var xfs = opts.fs || fs2;
738
+ var ignore = opts.ignore || opts.filter || noop;
739
+ var map = opts.map || noop;
740
+ var mapStream = opts.mapStream || echo;
741
+ var statNext = statAll(xfs, opts.dereference ? xfs.stat : xfs.lstat, cwd, ignore, opts.entries, opts.sort);
742
+ var strict = opts.strict !== false;
743
+ var umask = typeof opts.umask === "number" ? ~opts.umask : ~processUmask();
744
+ var dmode = typeof opts.dmode === "number" ? opts.dmode : 0;
745
+ var fmode = typeof opts.fmode === "number" ? opts.fmode : 0;
746
+ var pack = opts.pack || tar2.pack();
747
+ var finish = opts.finish || noop;
748
+ if (opts.strip)
749
+ map = strip(map, opts.strip);
750
+ if (opts.readable) {
751
+ dmode |= parseInt(555, 8);
752
+ fmode |= parseInt(444, 8);
753
+ }
754
+ if (opts.writable) {
755
+ dmode |= parseInt(333, 8);
756
+ fmode |= parseInt(222, 8);
757
+ }
758
+ var onsymlink = function(filename, header) {
759
+ xfs.readlink(path3.join(cwd, filename), function(err, linkname) {
760
+ if (err)
761
+ return pack.destroy(err);
762
+ header.linkname = normalize(linkname);
763
+ pack.entry(header, onnextentry);
764
+ });
765
+ };
766
+ var onstat = function(err, filename, stat2) {
767
+ if (err)
768
+ return pack.destroy(err);
769
+ if (!filename) {
770
+ if (opts.finalize !== false)
771
+ pack.finalize();
772
+ return finish(pack);
773
+ }
774
+ if (stat2.isSocket())
775
+ return onnextentry();
776
+ var header = {
777
+ name: normalize(filename),
778
+ mode: (stat2.mode | (stat2.isDirectory() ? dmode : fmode)) & umask,
779
+ mtime: stat2.mtime,
780
+ size: stat2.size,
781
+ type: "file",
782
+ uid: stat2.uid,
783
+ gid: stat2.gid
784
+ };
785
+ if (stat2.isDirectory()) {
786
+ header.size = 0;
787
+ header.type = "directory";
788
+ header = map(header) || header;
789
+ return pack.entry(header, onnextentry);
790
+ }
791
+ if (stat2.isSymbolicLink()) {
792
+ header.size = 0;
793
+ header.type = "symlink";
794
+ header = map(header) || header;
795
+ return onsymlink(filename, header);
796
+ }
797
+ header = map(header) || header;
798
+ if (!stat2.isFile()) {
799
+ if (strict)
800
+ return pack.destroy(new Error("unsupported type for " + filename));
801
+ return onnextentry();
802
+ }
803
+ var entry = pack.entry(header, onnextentry);
804
+ if (!entry)
805
+ return;
806
+ var rs = mapStream(xfs.createReadStream(path3.join(cwd, filename)), header);
807
+ rs.on("error", function(err2) {
808
+ entry.destroy(err2);
809
+ });
810
+ pump(rs, entry);
811
+ };
812
+ var onnextentry = function(err) {
813
+ if (err)
814
+ return pack.destroy(err);
815
+ statNext(onstat);
816
+ };
817
+ onnextentry();
818
+ return pack;
819
+ };
820
+ var head = function(list18) {
821
+ return list18.length ? list18[list18.length - 1] : null;
822
+ };
823
+ var processGetuid = function() {
824
+ return process.getuid ? process.getuid() : -1;
825
+ };
826
+ var processUmask = function() {
827
+ return process.umask ? process.umask() : 0;
828
+ };
829
+ exports.extract = function(cwd, opts) {
830
+ if (!cwd)
831
+ cwd = ".";
832
+ if (!opts)
833
+ opts = {};
834
+ var xfs = opts.fs || fs2;
835
+ var ignore = opts.ignore || opts.filter || noop;
836
+ var map = opts.map || noop;
837
+ var mapStream = opts.mapStream || echo;
838
+ var own = opts.chown !== false && !win32 && processGetuid() === 0;
839
+ var extract = opts.extract || tar2.extract();
840
+ var stack = [];
841
+ var now = /* @__PURE__ */ new Date();
842
+ var umask = typeof opts.umask === "number" ? ~opts.umask : ~processUmask();
843
+ var dmode = typeof opts.dmode === "number" ? opts.dmode : 0;
844
+ var fmode = typeof opts.fmode === "number" ? opts.fmode : 0;
845
+ var strict = opts.strict !== false;
846
+ if (opts.strip)
847
+ map = strip(map, opts.strip);
848
+ if (opts.readable) {
849
+ dmode |= parseInt(555, 8);
850
+ fmode |= parseInt(444, 8);
851
+ }
852
+ if (opts.writable) {
853
+ dmode |= parseInt(333, 8);
854
+ fmode |= parseInt(222, 8);
855
+ }
856
+ var utimesParent = function(name, cb) {
857
+ var top;
858
+ while ((top = head(stack)) && name.slice(0, top[0].length) !== top[0])
859
+ stack.pop();
860
+ if (!top)
861
+ return cb();
862
+ xfs.utimes(top[0], now, top[1], cb);
863
+ };
864
+ var utimes = function(name, header, cb) {
865
+ if (opts.utimes === false)
866
+ return cb();
867
+ if (header.type === "directory")
868
+ return xfs.utimes(name, now, header.mtime, cb);
869
+ if (header.type === "symlink")
870
+ return utimesParent(name, cb);
871
+ xfs.utimes(name, now, header.mtime, function(err) {
872
+ if (err)
873
+ return cb(err);
874
+ utimesParent(name, cb);
875
+ });
876
+ };
877
+ var chperm = function(name, header, cb) {
878
+ var link = header.type === "symlink";
879
+ var chmod2 = link ? xfs.lchmod : xfs.chmod;
880
+ var chown = link ? xfs.lchown : xfs.chown;
881
+ if (!chmod2)
882
+ return cb();
883
+ var mode = (header.mode | (header.type === "directory" ? dmode : fmode)) & umask;
884
+ chmod2(name, mode, function(err) {
885
+ if (err)
886
+ return cb(err);
887
+ if (!own)
888
+ return cb();
889
+ if (!chown)
890
+ return cb();
891
+ chown(name, header.uid, header.gid, cb);
892
+ });
893
+ };
894
+ extract.on("entry", function(header, stream, next) {
895
+ header = map(header) || header;
896
+ header.name = normalize(header.name);
897
+ var name = path3.join(cwd, path3.join("/", header.name));
898
+ if (ignore(name, header)) {
899
+ stream.resume();
900
+ return next();
901
+ }
902
+ var stat2 = function(err) {
903
+ if (err)
904
+ return next(err);
905
+ utimes(name, header, function(err2) {
906
+ if (err2)
907
+ return next(err2);
908
+ if (win32)
909
+ return next();
910
+ chperm(name, header, next);
911
+ });
912
+ };
913
+ var onsymlink = function() {
914
+ if (win32)
915
+ return next();
916
+ xfs.unlink(name, function() {
917
+ var dst = path3.resolve(path3.dirname(name), header.linkname);
918
+ if (!dst.startsWith(path3.resolve(cwd)))
919
+ return next(new Error(name + " is not a valid symlink"));
920
+ xfs.symlink(header.linkname, name, stat2);
921
+ });
922
+ };
923
+ var onlink = function() {
924
+ if (win32)
925
+ return next();
926
+ xfs.unlink(name, function() {
927
+ var srcpath = path3.join(cwd, path3.join("/", header.linkname));
928
+ xfs.realpath(srcpath, function(err, dst) {
929
+ if (err || !dst.startsWith(path3.resolve(cwd)))
930
+ return next(new Error(name + " is not a valid hardlink"));
931
+ xfs.link(dst, name, function(err2) {
932
+ if (err2 && err2.code === "EPERM" && opts.hardlinkAsFilesFallback) {
933
+ stream = xfs.createReadStream(srcpath);
934
+ return onfile();
935
+ }
936
+ stat2(err2);
937
+ });
938
+ });
939
+ });
940
+ };
941
+ var onfile = function() {
942
+ var ws = xfs.createWriteStream(name);
943
+ var rs = mapStream(stream, header);
944
+ ws.on("error", function(err) {
945
+ rs.destroy(err);
946
+ });
947
+ pump(rs, ws, function(err) {
948
+ if (err)
949
+ return next(err);
950
+ ws.on("close", stat2);
951
+ });
952
+ };
953
+ if (header.type === "directory") {
954
+ stack.push([name, header.mtime]);
955
+ return mkdirfix(name, {
956
+ fs: xfs,
957
+ own,
958
+ uid: header.uid,
959
+ gid: header.gid
960
+ }, stat2);
961
+ }
962
+ var dir = path3.dirname(name);
963
+ validate(xfs, dir, path3.join(cwd, "."), function(err, valid) {
964
+ if (err)
965
+ return next(err);
966
+ if (!valid)
967
+ return next(new Error(dir + " is not a valid path"));
968
+ mkdirfix(dir, {
969
+ fs: xfs,
970
+ own,
971
+ uid: header.uid,
972
+ gid: header.gid
973
+ }, function(err2) {
974
+ if (err2)
975
+ return next(err2);
976
+ switch (header.type) {
977
+ case "file":
978
+ return onfile();
979
+ case "link":
980
+ return onlink();
981
+ case "symlink":
982
+ return onsymlink();
983
+ }
984
+ if (strict)
985
+ return next(new Error("unsupported type for " + name + " (" + header.type + ")"));
986
+ stream.resume();
987
+ next();
988
+ });
989
+ });
990
+ });
991
+ if (opts.finish)
992
+ extract.on("finish", opts.finish);
993
+ return extract;
994
+ };
995
+ function validate(fs3, name, root, cb) {
996
+ if (name === root)
997
+ return cb(null, true);
998
+ fs3.lstat(name, function(err, st) {
999
+ if (err && err.code !== "ENOENT")
1000
+ return cb(err);
1001
+ if (err || st.isDirectory())
1002
+ return validate(fs3, path3.join(name, ".."), root, cb);
1003
+ cb(null, false);
1004
+ });
1005
+ }
1006
+ function mkdirfix(name, opts, cb) {
1007
+ mkdirp(name, { fs: opts.fs }, function(err, made) {
1008
+ if (!err && made && opts.own) {
1009
+ chownr(made, opts.uid, opts.gid, cb);
1010
+ } else {
1011
+ cb(err);
1012
+ }
1013
+ });
1014
+ }
1015
+ }
1016
+ });
1017
+
673
1018
  // src/util/telemetry/commands/agent/index.ts
674
1019
  var AgentTelemetryClient = class extends TelemetryClient {
675
1020
  trackCliArgumentInit(value) {
@@ -2054,7 +2399,7 @@ async function activity(client) {
2054
2399
  return 0;
2055
2400
  }
2056
2401
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
2057
- const listFn = (await import("./chunks/list-ZK7Q3UHB.js")).default;
2402
+ const listFn = (await import("./chunks/list-PLG2ZHBA.js")).default;
2058
2403
  return listFn(client, telemetry2);
2059
2404
  }
2060
2405
  }
@@ -2972,7 +3317,14 @@ import { join as join2 } from "path";
2972
3317
 
2973
3318
  // src/util/ai-gateway/coding-agents/config-files.ts
2974
3319
  init_main();
2975
- import { readFile as readFile2, writeFile as writeFile2, mkdir, copyFile, access } from "fs/promises";
3320
+ import {
3321
+ readFile as readFile2,
3322
+ writeFile as writeFile2,
3323
+ mkdir,
3324
+ copyFile,
3325
+ access,
3326
+ lstat
3327
+ } from "fs/promises";
2976
3328
  import { isDeepStrictEqual } from "util";
2977
3329
  import { dirname } from "path";
2978
3330
  import { parse as tomlParse, stringify as tomlStringify } from "smol-toml";
@@ -2984,6 +3336,13 @@ async function pathExists(path3) {
2984
3336
  return false;
2985
3337
  }
2986
3338
  }
3339
+ async function isSymlink(path3) {
3340
+ try {
3341
+ return (await lstat(path3)).isSymbolicLink();
3342
+ } catch {
3343
+ return false;
3344
+ }
3345
+ }
2987
3346
  async function readFileOrNull(path3) {
2988
3347
  try {
2989
3348
  return await readFile2(path3, "utf8");
@@ -3845,6 +4204,7 @@ async function buildSetupPlan(agents, ctx) {
3845
4204
  const changes = [];
3846
4205
  for (const [path3, entry] of byPath) {
3847
4206
  const current = await readFileOrNull(path3);
4207
+ const symlink = await isSymlink(path3);
3848
4208
  let next = null;
3849
4209
  let status3;
3850
4210
  let error;
@@ -3874,7 +4234,8 @@ async function buildSetupPlan(agents, ctx) {
3874
4234
  current,
3875
4235
  next,
3876
4236
  status: status3,
3877
- error
4237
+ error,
4238
+ symlink
3878
4239
  });
3879
4240
  }
3880
4241
  return { changes, notes, envExports, shellRcPath };
@@ -4066,6 +4427,12 @@ function printPlan(plan, previewKey, opts = {}) {
4066
4427
  ` ${verb === "create" ? import_chalk14.default.green("+") : "~"} ${import_chalk14.default.bold(change2.label)} (${verb}) ${import_chalk14.default.dim(change2.path)}
4067
4428
  `
4068
4429
  );
4430
+ if (change2.symlink) {
4431
+ output_manager_default.print(
4432
+ ` ${import_chalk14.default.yellow("\u21B3 warning:")} this path is a symlink \u2014 the write will follow it to its target
4433
+ `
4434
+ );
4435
+ }
4069
4436
  if (opts.backup && change2.current !== null) {
4070
4437
  output_manager_default.print(import_chalk14.default.dim(` \u21B3 backs up to ${change2.path}.bak
4071
4438
  `));
@@ -4195,7 +4562,8 @@ async function runMachine(args) {
4195
4562
  changes: previewPlan.changes.map((c) => ({
4196
4563
  agent: c.owners.join(", "),
4197
4564
  file: c.path,
4198
- action: c.status === "create" ? "would_create" : c.status === "update" ? "would_update" : c.status
4565
+ action: c.status === "create" ? "would_create" : c.status === "update" ? "would_update" : c.status,
4566
+ ...c.symlink ? { symlink: true } : {}
4199
4567
  })),
4200
4568
  skipped,
4201
4569
  warnings: args.warnings
@@ -5523,12 +5891,12 @@ async function alerts(client) {
5523
5891
  switch (subcommand) {
5524
5892
  case "inspect": {
5525
5893
  telemetry2.trackCliSubcommandInspect(subcommandOriginal);
5526
- const inspectFn = (await import("./chunks/inspect-7UPFOAJO.js")).default;
5894
+ const inspectFn = (await import("./chunks/inspect-AF5J3QDV.js")).default;
5527
5895
  return inspectFn(client, args);
5528
5896
  }
5529
5897
  case "rules": {
5530
5898
  telemetry2.trackCliSubcommandRules(args[0] ?? "ls");
5531
- const rulesFn = (await import("./chunks/rules-MMCCBGQJ.js")).default;
5899
+ const rulesFn = (await import("./chunks/rules-AN32QRP7.js")).default;
5532
5900
  const rulesArgs = [...args];
5533
5901
  const project = parsedArgs.flags["--project"];
5534
5902
  const format4 = parsedArgs.flags["--format"];
@@ -5542,7 +5910,7 @@ async function alerts(client) {
5542
5910
  }
5543
5911
  default: {
5544
5912
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
5545
- const listFn = (await import("./chunks/list-BTMO3CXU.js")).default;
5913
+ const listFn = (await import("./chunks/list-F2AW7L3D.js")).default;
5546
5914
  return listFn(client, telemetry2);
5547
5915
  }
5548
5916
  }
@@ -37863,7 +38231,11 @@ async function extractExample(client, name, dir, force, ver = "v2") {
37863
38231
  throw new Error(`Could not get ${name}.tar.gz`);
37864
38232
  }
37865
38233
  await new Promise((resolve10, reject) => {
37866
- const extractor = import_tar_fs.default.extract(folder);
38234
+ const extractor = import_tar_fs.default.extract(folder, {
38235
+ // Drop symlink/hardlink entries: they're the tar link-following
38236
+ // traversal vector (CVE-2024-12905 / CVE-2025-48387).
38237
+ ignore: (_name, header) => header?.type !== "file" && header?.type !== "directory"
38238
+ });
37867
38239
  const body = toNodeReadable(res.body);
37868
38240
  body.on("error", reject);
37869
38241
  extractor.on("error", reject);
@@ -46652,7 +47024,7 @@ async function metrics(client) {
46652
47024
  return 0;
46653
47025
  }
46654
47026
  telemetry2.trackCliSubcommandSchema(subcommandOriginal);
46655
- const schemaFn = (await import("./chunks/schema-JSK7S7HL.js")).default;
47027
+ const schemaFn = (await import("./chunks/schema-2GYFHMCN.js")).default;
46656
47028
  return schemaFn(client, telemetry2);
46657
47029
  }
46658
47030
  default: {
@@ -46665,7 +47037,7 @@ async function metrics(client) {
46665
47037
  output_manager_default.print(help(metricsCommand, { columns: client.stderr.columns }));
46666
47038
  return 2;
46667
47039
  }
46668
- const queryFn = (await import("./chunks/query-6XMBJTPX.js")).default;
47040
+ const queryFn = (await import("./chunks/query-MUQKKYXI.js")).default;
46669
47041
  return queryFn(client, telemetry2);
46670
47042
  }
46671
47043
  }
@@ -57257,7 +57629,7 @@ async function main26(client) {
57257
57629
  return 2;
57258
57630
  }
57259
57631
  telemetry2.trackCliSubcommandEdit(subcommandOriginal);
57260
- return (await import("./chunks/edit-GMLOKGHO.js")).default(client, args);
57632
+ return (await import("./chunks/edit-ITGNF7S5.js")).default(client, args);
57261
57633
  case "delete":
57262
57634
  if (needHelp) {
57263
57635
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -57265,7 +57637,7 @@ async function main26(client) {
57265
57637
  return 2;
57266
57638
  }
57267
57639
  telemetry2.trackCliSubcommandDelete(subcommandOriginal);
57268
- return (await import("./chunks/delete-NPEJGNTV.js")).default(client, args);
57640
+ return (await import("./chunks/delete-JLJ753B4.js")).default(client, args);
57269
57641
  case "enable":
57270
57642
  if (needHelp) {
57271
57643
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -57273,7 +57645,7 @@ async function main26(client) {
57273
57645
  return 2;
57274
57646
  }
57275
57647
  telemetry2.trackCliSubcommandEnable(subcommandOriginal);
57276
- return (await import("./chunks/enable-QCTL7ISO.js")).default(client, args);
57648
+ return (await import("./chunks/enable-6RMJPNW5.js")).default(client, args);
57277
57649
  case "disable":
57278
57650
  if (needHelp) {
57279
57651
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -57281,7 +57653,7 @@ async function main26(client) {
57281
57653
  return 2;
57282
57654
  }
57283
57655
  telemetry2.trackCliSubcommandDisable(subcommandOriginal);
57284
- return (await import("./chunks/disable-RH3MH7PH.js")).default(client, args);
57656
+ return (await import("./chunks/disable-AXFGDOYN.js")).default(client, args);
57285
57657
  case "reorder":
57286
57658
  if (needHelp) {
57287
57659
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -57289,7 +57661,7 @@ async function main26(client) {
57289
57661
  return 2;
57290
57662
  }
57291
57663
  telemetry2.trackCliSubcommandReorder(subcommandOriginal);
57292
- return (await import("./chunks/reorder-7B6HZCOZ.js")).default(client, args);
57664
+ return (await import("./chunks/reorder-B76HXU6D.js")).default(client, args);
57293
57665
  case "export":
57294
57666
  if (needHelp) {
57295
57667
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -57297,7 +57669,7 @@ async function main26(client) {
57297
57669
  return 2;
57298
57670
  }
57299
57671
  telemetry2.trackCliSubcommandExport(subcommandOriginal);
57300
- return (await import("./chunks/export-6ERWU54A.js")).default(client, args);
57672
+ return (await import("./chunks/export-3NC3DPRR.js")).default(client, args);
57301
57673
  case "publish":
57302
57674
  if (needHelp) {
57303
57675
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -57305,7 +57677,7 @@ async function main26(client) {
57305
57677
  return 2;
57306
57678
  }
57307
57679
  telemetry2.trackCliSubcommandPublish(subcommandOriginal);
57308
- return (await import("./chunks/publish-ED2XVYSE.js")).default(client, args);
57680
+ return (await import("./chunks/publish-PDGTM3M7.js")).default(client, args);
57309
57681
  case "restore":
57310
57682
  if (needHelp) {
57311
57683
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -57313,7 +57685,7 @@ async function main26(client) {
57313
57685
  return 2;
57314
57686
  }
57315
57687
  telemetry2.trackCliSubcommandRestore(subcommandOriginal);
57316
- return (await import("./chunks/restore-47ZDRYQT.js")).default(client, args);
57688
+ return (await import("./chunks/restore-2PYXS4NP.js")).default(client, args);
57317
57689
  case "discard-staging":
57318
57690
  if (needHelp) {
57319
57691
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -57321,7 +57693,7 @@ async function main26(client) {
57321
57693
  return 2;
57322
57694
  }
57323
57695
  telemetry2.trackCliSubcommandDiscardStaging(subcommandOriginal);
57324
- return (await import("./chunks/discard-IJBFO24S.js")).default(client, args);
57696
+ return (await import("./chunks/discard-557SDKVO.js")).default(client, args);
57325
57697
  default:
57326
57698
  output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG40));
57327
57699
  output_manager_default.print(help(routesCommand, { columns: client.stderr.columns }));
@@ -61943,25 +62315,25 @@ async function vcr(client) {
61943
62315
  switch (subcommand) {
61944
62316
  case "ls":
61945
62317
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
61946
- return (await import("./chunks/ls-Z2TCQW5W.js")).default(client, args, telemetry2);
62318
+ return (await import("./chunks/ls-HZDBJLMG.js")).default(client, args, telemetry2);
61947
62319
  case "inspect":
61948
62320
  telemetry2.trackCliSubcommandInspect(subcommandOriginal);
61949
- return (await import("./chunks/inspect-ZS4U24NA.js")).default(client, args, telemetry2);
62321
+ return (await import("./chunks/inspect-FDF5WZMM.js")).default(client, args, telemetry2);
61950
62322
  case "add":
61951
62323
  telemetry2.trackCliSubcommandAdd(subcommandOriginal);
61952
- return (await import("./chunks/add-MD247HM7.js")).default(client, args, telemetry2);
62324
+ return (await import("./chunks/add-YQRDKWJH.js")).default(client, args, telemetry2);
61953
62325
  case "rm":
61954
62326
  telemetry2.trackCliSubcommandRm(subcommandOriginal);
61955
- return (await import("./chunks/rm-4IY6QGHF.js")).default(client, args, telemetry2);
62327
+ return (await import("./chunks/rm-GZW2IDWX.js")).default(client, args, telemetry2);
61956
62328
  case "login":
61957
62329
  telemetry2.trackCliSubcommandLogin(subcommandOriginal);
61958
- return (await import("./chunks/login-POFRYQZ6.js")).default(client, args, telemetry2);
62330
+ return (await import("./chunks/login-LQRR64K7.js")).default(client, args, telemetry2);
61959
62331
  case "tag":
61960
62332
  telemetry2.trackCliSubcommandTag(subcommandOriginal);
61961
- return (await import("./chunks/tags-KNCSBTIH.js")).default(client, args, telemetry2);
62333
+ return (await import("./chunks/tags-ULDC3YLP.js")).default(client, args, telemetry2);
61962
62334
  case "image":
61963
62335
  telemetry2.trackCliSubcommandImage(subcommandOriginal);
61964
- return (await import("./chunks/image-XUMTOUQS.js")).default(client, args, telemetry2);
62336
+ return (await import("./chunks/image-FGP5UVA5.js")).default(client, args, telemetry2);
61965
62337
  default:
61966
62338
  output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG46));
61967
62339
  output_manager_default.print(help(vcrCommand, { columns: client.stderr.columns }));