@fern-api/generator-cli 0.9.15 → 0.9.17
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/api.js +2841 -292
- package/dist/cli.js +14 -5
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function __init() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
8
11
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
12
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
13
|
};
|
|
@@ -151,7 +154,7 @@ var require_ms = __commonJS({
|
|
|
151
154
|
var require_common = __commonJS({
|
|
152
155
|
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports2, module2) {
|
|
153
156
|
"use strict";
|
|
154
|
-
function setup(
|
|
157
|
+
function setup(env2) {
|
|
155
158
|
createDebug.debug = createDebug;
|
|
156
159
|
createDebug.default = createDebug;
|
|
157
160
|
createDebug.coerce = coerce;
|
|
@@ -160,8 +163,8 @@ var require_common = __commonJS({
|
|
|
160
163
|
createDebug.enabled = enabled;
|
|
161
164
|
createDebug.humanize = require_ms();
|
|
162
165
|
createDebug.destroy = destroy;
|
|
163
|
-
Object.keys(
|
|
164
|
-
createDebug[key] =
|
|
166
|
+
Object.keys(env2).forEach((key) => {
|
|
167
|
+
createDebug[key] = env2[key];
|
|
165
168
|
});
|
|
166
169
|
createDebug.names = [];
|
|
167
170
|
createDebug.skips = [];
|
|
@@ -516,7 +519,7 @@ var require_supports_color = __commonJS({
|
|
|
516
519
|
"use strict";
|
|
517
520
|
var os = require("os");
|
|
518
521
|
var hasFlag = require_has_flag();
|
|
519
|
-
var
|
|
522
|
+
var env2 = process.env;
|
|
520
523
|
var support = (level) => {
|
|
521
524
|
if (level === 0) {
|
|
522
525
|
return false;
|
|
@@ -551,42 +554,42 @@ var require_supports_color = __commonJS({
|
|
|
551
554
|
}
|
|
552
555
|
return 1;
|
|
553
556
|
}
|
|
554
|
-
if ("CI" in
|
|
555
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in
|
|
557
|
+
if ("CI" in env2) {
|
|
558
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
|
|
556
559
|
return 1;
|
|
557
560
|
}
|
|
558
561
|
return 0;
|
|
559
562
|
}
|
|
560
|
-
if ("TEAMCITY_VERSION" in
|
|
561
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(
|
|
563
|
+
if ("TEAMCITY_VERSION" in env2) {
|
|
564
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
562
565
|
}
|
|
563
|
-
if ("TERM_PROGRAM" in
|
|
564
|
-
const
|
|
565
|
-
switch (
|
|
566
|
+
if ("TERM_PROGRAM" in env2) {
|
|
567
|
+
const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
568
|
+
switch (env2.TERM_PROGRAM) {
|
|
566
569
|
case "iTerm.app":
|
|
567
|
-
return
|
|
570
|
+
return version2 >= 3 ? 3 : 2;
|
|
568
571
|
case "Hyper":
|
|
569
572
|
return 3;
|
|
570
573
|
case "Apple_Terminal":
|
|
571
574
|
return 2;
|
|
572
575
|
}
|
|
573
576
|
}
|
|
574
|
-
if (/-256(color)?$/i.test(
|
|
577
|
+
if (/-256(color)?$/i.test(env2.TERM)) {
|
|
575
578
|
return 2;
|
|
576
579
|
}
|
|
577
|
-
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(
|
|
580
|
+
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
|
|
578
581
|
return 1;
|
|
579
582
|
}
|
|
580
|
-
if ("COLORTERM" in
|
|
583
|
+
if ("COLORTERM" in env2) {
|
|
581
584
|
return 1;
|
|
582
585
|
}
|
|
583
|
-
if (
|
|
586
|
+
if (env2.TERM === "dumb") {
|
|
584
587
|
return 0;
|
|
585
588
|
}
|
|
586
589
|
return 0;
|
|
587
590
|
})();
|
|
588
|
-
if ("FORCE_COLOR" in
|
|
589
|
-
supportLevel = parseInt(
|
|
591
|
+
if ("FORCE_COLOR" in env2) {
|
|
592
|
+
supportLevel = parseInt(env2.FORCE_COLOR, 10) === 0 ? 0 : supportLevel || 1;
|
|
590
593
|
}
|
|
591
594
|
module2.exports = process && support(supportLevel);
|
|
592
595
|
}
|
|
@@ -692,188 +695,2671 @@ var require_node = __commonJS({
|
|
|
692
695
|
221
|
|
693
696
|
];
|
|
694
697
|
}
|
|
695
|
-
} catch (error) {
|
|
696
|
-
}
|
|
697
|
-
exports2.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
698
|
-
return /^debug_/i.test(key);
|
|
699
|
-
}).reduce((obj, key) => {
|
|
700
|
-
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k2) => {
|
|
701
|
-
return k2.toUpperCase();
|
|
702
|
-
});
|
|
703
|
-
let val = process.env[key];
|
|
704
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
705
|
-
val = true;
|
|
706
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
707
|
-
val = false;
|
|
708
|
-
} else if (val === "null") {
|
|
709
|
-
val = null;
|
|
710
|
-
} else {
|
|
711
|
-
val = Number(val);
|
|
698
|
+
} catch (error) {
|
|
699
|
+
}
|
|
700
|
+
exports2.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
701
|
+
return /^debug_/i.test(key);
|
|
702
|
+
}).reduce((obj, key) => {
|
|
703
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k2) => {
|
|
704
|
+
return k2.toUpperCase();
|
|
705
|
+
});
|
|
706
|
+
let val = process.env[key];
|
|
707
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
708
|
+
val = true;
|
|
709
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
710
|
+
val = false;
|
|
711
|
+
} else if (val === "null") {
|
|
712
|
+
val = null;
|
|
713
|
+
} else {
|
|
714
|
+
val = Number(val);
|
|
715
|
+
}
|
|
716
|
+
obj[prop] = val;
|
|
717
|
+
return obj;
|
|
718
|
+
}, {});
|
|
719
|
+
function useColors() {
|
|
720
|
+
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
721
|
+
}
|
|
722
|
+
function formatArgs(args) {
|
|
723
|
+
const { namespace: name, useColors: useColors2 } = this;
|
|
724
|
+
if (useColors2) {
|
|
725
|
+
const c2 = this.color;
|
|
726
|
+
const colorCode = "\x1B[3" + (c2 < 8 ? c2 : "8;5;" + c2);
|
|
727
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
728
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
729
|
+
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
730
|
+
} else {
|
|
731
|
+
args[0] = getDate() + name + " " + args[0];
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
function getDate() {
|
|
735
|
+
if (exports2.inspectOpts.hideDate) {
|
|
736
|
+
return "";
|
|
737
|
+
}
|
|
738
|
+
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
739
|
+
}
|
|
740
|
+
function log(...args) {
|
|
741
|
+
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
742
|
+
}
|
|
743
|
+
function save(namespaces) {
|
|
744
|
+
if (namespaces) {
|
|
745
|
+
process.env.DEBUG = namespaces;
|
|
746
|
+
} else {
|
|
747
|
+
delete process.env.DEBUG;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
function load() {
|
|
751
|
+
return process.env.DEBUG;
|
|
752
|
+
}
|
|
753
|
+
function init(debug2) {
|
|
754
|
+
debug2.inspectOpts = {};
|
|
755
|
+
const keys2 = Object.keys(exports2.inspectOpts);
|
|
756
|
+
for (let i = 0; i < keys2.length; i++) {
|
|
757
|
+
debug2.inspectOpts[keys2[i]] = exports2.inspectOpts[keys2[i]];
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
module2.exports = require_common()(exports2);
|
|
761
|
+
var { formatters } = module2.exports;
|
|
762
|
+
formatters.o = function(v2) {
|
|
763
|
+
this.inspectOpts.colors = this.useColors;
|
|
764
|
+
return util.inspect(v2, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
765
|
+
};
|
|
766
|
+
formatters.O = function(v2) {
|
|
767
|
+
this.inspectOpts.colors = this.useColors;
|
|
768
|
+
return util.inspect(v2, this.inspectOpts);
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
|
|
773
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
|
|
774
|
+
var require_src = __commonJS({
|
|
775
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports2, module2) {
|
|
776
|
+
"use strict";
|
|
777
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
778
|
+
module2.exports = require_browser();
|
|
779
|
+
} else {
|
|
780
|
+
module2.exports = require_node();
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
|
|
785
|
+
// ../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.js
|
|
786
|
+
var require_src2 = __commonJS({
|
|
787
|
+
"../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.js"(exports2) {
|
|
788
|
+
"use strict";
|
|
789
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
790
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
791
|
+
};
|
|
792
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
793
|
+
var fs_1 = require("fs");
|
|
794
|
+
var debug_1 = __importDefault(require_src());
|
|
795
|
+
var log = debug_1.default("@kwsites/file-exists");
|
|
796
|
+
function check(path3, isFile, isDirectory) {
|
|
797
|
+
log(`checking %s`, path3);
|
|
798
|
+
try {
|
|
799
|
+
const stat2 = fs_1.statSync(path3);
|
|
800
|
+
if (stat2.isFile() && isFile) {
|
|
801
|
+
log(`[OK] path represents a file`);
|
|
802
|
+
return true;
|
|
803
|
+
}
|
|
804
|
+
if (stat2.isDirectory() && isDirectory) {
|
|
805
|
+
log(`[OK] path represents a directory`);
|
|
806
|
+
return true;
|
|
807
|
+
}
|
|
808
|
+
log(`[FAIL] path represents something other than a file or directory`);
|
|
809
|
+
return false;
|
|
810
|
+
} catch (e) {
|
|
811
|
+
if (e.code === "ENOENT") {
|
|
812
|
+
log(`[FAIL] path is not accessible: %o`, e);
|
|
813
|
+
return false;
|
|
814
|
+
}
|
|
815
|
+
log(`[FATAL] %o`, e);
|
|
816
|
+
throw e;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
function exists2(path3, type = exports2.READABLE) {
|
|
820
|
+
return check(path3, (type & exports2.FILE) > 0, (type & exports2.FOLDER) > 0);
|
|
821
|
+
}
|
|
822
|
+
exports2.exists = exists2;
|
|
823
|
+
exports2.FILE = 1;
|
|
824
|
+
exports2.FOLDER = 2;
|
|
825
|
+
exports2.READABLE = exports2.FILE + exports2.FOLDER;
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
|
|
829
|
+
// ../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/index.js
|
|
830
|
+
var require_dist = __commonJS({
|
|
831
|
+
"../../node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/index.js"(exports2) {
|
|
832
|
+
"use strict";
|
|
833
|
+
function __export3(m) {
|
|
834
|
+
for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p];
|
|
835
|
+
}
|
|
836
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
837
|
+
__export3(require_src2());
|
|
838
|
+
}
|
|
839
|
+
});
|
|
840
|
+
|
|
841
|
+
// ../../node_modules/.pnpm/@kwsites+promise-deferred@1.1.1/node_modules/@kwsites/promise-deferred/dist/index.js
|
|
842
|
+
var require_dist2 = __commonJS({
|
|
843
|
+
"../../node_modules/.pnpm/@kwsites+promise-deferred@1.1.1/node_modules/@kwsites/promise-deferred/dist/index.js"(exports2) {
|
|
844
|
+
"use strict";
|
|
845
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
846
|
+
exports2.createDeferred = exports2.deferred = void 0;
|
|
847
|
+
function deferred2() {
|
|
848
|
+
let done;
|
|
849
|
+
let fail;
|
|
850
|
+
let status2 = "pending";
|
|
851
|
+
const promise = new Promise((_done, _fail) => {
|
|
852
|
+
done = _done;
|
|
853
|
+
fail = _fail;
|
|
854
|
+
});
|
|
855
|
+
return {
|
|
856
|
+
promise,
|
|
857
|
+
done(result) {
|
|
858
|
+
if (status2 === "pending") {
|
|
859
|
+
status2 = "resolved";
|
|
860
|
+
done(result);
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
fail(error) {
|
|
864
|
+
if (status2 === "pending") {
|
|
865
|
+
status2 = "rejected";
|
|
866
|
+
fail(error);
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
get fulfilled() {
|
|
870
|
+
return status2 !== "pending";
|
|
871
|
+
},
|
|
872
|
+
get status() {
|
|
873
|
+
return status2;
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
exports2.deferred = deferred2;
|
|
878
|
+
exports2.createDeferred = deferred2;
|
|
879
|
+
exports2.default = deferred2;
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
|
|
883
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
884
|
+
var require_windows = __commonJS({
|
|
885
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
|
|
886
|
+
"use strict";
|
|
887
|
+
module2.exports = isexe;
|
|
888
|
+
isexe.sync = sync;
|
|
889
|
+
var fs2 = require("fs");
|
|
890
|
+
function checkPathExt(path3, options) {
|
|
891
|
+
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
892
|
+
if (!pathext) {
|
|
893
|
+
return true;
|
|
894
|
+
}
|
|
895
|
+
pathext = pathext.split(";");
|
|
896
|
+
if (pathext.indexOf("") !== -1) {
|
|
897
|
+
return true;
|
|
898
|
+
}
|
|
899
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
900
|
+
var p = pathext[i].toLowerCase();
|
|
901
|
+
if (p && path3.substr(-p.length).toLowerCase() === p) {
|
|
902
|
+
return true;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
return false;
|
|
906
|
+
}
|
|
907
|
+
function checkStat(stat2, path3, options) {
|
|
908
|
+
if (!stat2.isSymbolicLink() && !stat2.isFile()) {
|
|
909
|
+
return false;
|
|
910
|
+
}
|
|
911
|
+
return checkPathExt(path3, options);
|
|
912
|
+
}
|
|
913
|
+
function isexe(path3, options, cb) {
|
|
914
|
+
fs2.stat(path3, function(er, stat2) {
|
|
915
|
+
cb(er, er ? false : checkStat(stat2, path3, options));
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
function sync(path3, options) {
|
|
919
|
+
return checkStat(fs2.statSync(path3), path3, options);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
|
|
924
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
925
|
+
var require_mode = __commonJS({
|
|
926
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
|
|
927
|
+
"use strict";
|
|
928
|
+
module2.exports = isexe;
|
|
929
|
+
isexe.sync = sync;
|
|
930
|
+
var fs2 = require("fs");
|
|
931
|
+
function isexe(path3, options, cb) {
|
|
932
|
+
fs2.stat(path3, function(er, stat2) {
|
|
933
|
+
cb(er, er ? false : checkStat(stat2, options));
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
function sync(path3, options) {
|
|
937
|
+
return checkStat(fs2.statSync(path3), options);
|
|
938
|
+
}
|
|
939
|
+
function checkStat(stat2, options) {
|
|
940
|
+
return stat2.isFile() && checkMode(stat2, options);
|
|
941
|
+
}
|
|
942
|
+
function checkMode(stat2, options) {
|
|
943
|
+
var mod = stat2.mode;
|
|
944
|
+
var uid = stat2.uid;
|
|
945
|
+
var gid = stat2.gid;
|
|
946
|
+
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
947
|
+
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
948
|
+
var u = parseInt("100", 8);
|
|
949
|
+
var g2 = parseInt("010", 8);
|
|
950
|
+
var o2 = parseInt("001", 8);
|
|
951
|
+
var ug = u | g2;
|
|
952
|
+
var ret = mod & o2 || mod & g2 && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
953
|
+
return ret;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
959
|
+
var require_isexe = __commonJS({
|
|
960
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
|
|
961
|
+
"use strict";
|
|
962
|
+
var fs2 = require("fs");
|
|
963
|
+
var core;
|
|
964
|
+
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
965
|
+
core = require_windows();
|
|
966
|
+
} else {
|
|
967
|
+
core = require_mode();
|
|
968
|
+
}
|
|
969
|
+
module2.exports = isexe;
|
|
970
|
+
isexe.sync = sync;
|
|
971
|
+
function isexe(path3, options, cb) {
|
|
972
|
+
if (typeof options === "function") {
|
|
973
|
+
cb = options;
|
|
974
|
+
options = {};
|
|
975
|
+
}
|
|
976
|
+
if (!cb) {
|
|
977
|
+
if (typeof Promise !== "function") {
|
|
978
|
+
throw new TypeError("callback not provided");
|
|
979
|
+
}
|
|
980
|
+
return new Promise(function(resolve4, reject) {
|
|
981
|
+
isexe(path3, options || {}, function(er, is) {
|
|
982
|
+
if (er) {
|
|
983
|
+
reject(er);
|
|
984
|
+
} else {
|
|
985
|
+
resolve4(is);
|
|
986
|
+
}
|
|
987
|
+
});
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
core(path3, options || {}, function(er, is) {
|
|
991
|
+
if (er) {
|
|
992
|
+
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
993
|
+
er = null;
|
|
994
|
+
is = false;
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
cb(er, is);
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
function sync(path3, options) {
|
|
1001
|
+
try {
|
|
1002
|
+
return core.sync(path3, options || {});
|
|
1003
|
+
} catch (er) {
|
|
1004
|
+
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
1005
|
+
return false;
|
|
1006
|
+
} else {
|
|
1007
|
+
throw er;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
|
|
1014
|
+
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
1015
|
+
var require_which = __commonJS({
|
|
1016
|
+
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
|
|
1017
|
+
"use strict";
|
|
1018
|
+
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
1019
|
+
var path3 = require("path");
|
|
1020
|
+
var COLON = isWindows ? ";" : ":";
|
|
1021
|
+
var isexe = require_isexe();
|
|
1022
|
+
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
1023
|
+
var getPathInfo = (cmd, opt) => {
|
|
1024
|
+
const colon = opt.colon || COLON;
|
|
1025
|
+
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
|
|
1026
|
+
// windows always checks the cwd first
|
|
1027
|
+
...isWindows ? [process.cwd()] : [],
|
|
1028
|
+
...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
1029
|
+
"").split(colon)
|
|
1030
|
+
];
|
|
1031
|
+
const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
1032
|
+
const pathExt = isWindows ? pathExtExe.split(colon) : [""];
|
|
1033
|
+
if (isWindows) {
|
|
1034
|
+
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
|
|
1035
|
+
pathExt.unshift("");
|
|
1036
|
+
}
|
|
1037
|
+
return {
|
|
1038
|
+
pathEnv,
|
|
1039
|
+
pathExt,
|
|
1040
|
+
pathExtExe
|
|
1041
|
+
};
|
|
1042
|
+
};
|
|
1043
|
+
var which = (cmd, opt, cb) => {
|
|
1044
|
+
if (typeof opt === "function") {
|
|
1045
|
+
cb = opt;
|
|
1046
|
+
opt = {};
|
|
1047
|
+
}
|
|
1048
|
+
if (!opt)
|
|
1049
|
+
opt = {};
|
|
1050
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
1051
|
+
const found = [];
|
|
1052
|
+
const step = (i) => new Promise((resolve4, reject) => {
|
|
1053
|
+
if (i === pathEnv.length)
|
|
1054
|
+
return opt.all && found.length ? resolve4(found) : reject(getNotFoundError(cmd));
|
|
1055
|
+
const ppRaw = pathEnv[i];
|
|
1056
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1057
|
+
const pCmd = path3.join(pathPart, cmd);
|
|
1058
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1059
|
+
resolve4(subStep(p, i, 0));
|
|
1060
|
+
});
|
|
1061
|
+
const subStep = (p, i, ii) => new Promise((resolve4, reject) => {
|
|
1062
|
+
if (ii === pathExt.length)
|
|
1063
|
+
return resolve4(step(i + 1));
|
|
1064
|
+
const ext = pathExt[ii];
|
|
1065
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
1066
|
+
if (!er && is) {
|
|
1067
|
+
if (opt.all)
|
|
1068
|
+
found.push(p + ext);
|
|
1069
|
+
else
|
|
1070
|
+
return resolve4(p + ext);
|
|
1071
|
+
}
|
|
1072
|
+
return resolve4(subStep(p, i, ii + 1));
|
|
1073
|
+
});
|
|
1074
|
+
});
|
|
1075
|
+
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
1076
|
+
};
|
|
1077
|
+
var whichSync = (cmd, opt) => {
|
|
1078
|
+
opt = opt || {};
|
|
1079
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
1080
|
+
const found = [];
|
|
1081
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
1082
|
+
const ppRaw = pathEnv[i];
|
|
1083
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
1084
|
+
const pCmd = path3.join(pathPart, cmd);
|
|
1085
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
1086
|
+
for (let j2 = 0; j2 < pathExt.length; j2++) {
|
|
1087
|
+
const cur = p + pathExt[j2];
|
|
1088
|
+
try {
|
|
1089
|
+
const is = isexe.sync(cur, { pathExt: pathExtExe });
|
|
1090
|
+
if (is) {
|
|
1091
|
+
if (opt.all)
|
|
1092
|
+
found.push(cur);
|
|
1093
|
+
else
|
|
1094
|
+
return cur;
|
|
1095
|
+
}
|
|
1096
|
+
} catch (ex) {
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
if (opt.all && found.length)
|
|
1101
|
+
return found;
|
|
1102
|
+
if (opt.nothrow)
|
|
1103
|
+
return null;
|
|
1104
|
+
throw getNotFoundError(cmd);
|
|
1105
|
+
};
|
|
1106
|
+
module2.exports = which;
|
|
1107
|
+
which.sync = whichSync;
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1110
|
+
|
|
1111
|
+
// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
1112
|
+
var require_path_key = __commonJS({
|
|
1113
|
+
"../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
|
|
1114
|
+
"use strict";
|
|
1115
|
+
var pathKey = (options = {}) => {
|
|
1116
|
+
const environment = options.env || process.env;
|
|
1117
|
+
const platform = options.platform || process.platform;
|
|
1118
|
+
if (platform !== "win32") {
|
|
1119
|
+
return "PATH";
|
|
1120
|
+
}
|
|
1121
|
+
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
1122
|
+
};
|
|
1123
|
+
module2.exports = pathKey;
|
|
1124
|
+
module2.exports.default = pathKey;
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1127
|
+
|
|
1128
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
1129
|
+
var require_resolveCommand = __commonJS({
|
|
1130
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
1131
|
+
"use strict";
|
|
1132
|
+
var path3 = require("path");
|
|
1133
|
+
var which = require_which();
|
|
1134
|
+
var getPathKey = require_path_key();
|
|
1135
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
1136
|
+
const env2 = parsed.options.env || process.env;
|
|
1137
|
+
const cwd2 = process.cwd();
|
|
1138
|
+
const hasCustomCwd = parsed.options.cwd != null;
|
|
1139
|
+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
1140
|
+
if (shouldSwitchCwd) {
|
|
1141
|
+
try {
|
|
1142
|
+
process.chdir(parsed.options.cwd);
|
|
1143
|
+
} catch (err) {
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
let resolved;
|
|
1147
|
+
try {
|
|
1148
|
+
resolved = which.sync(parsed.command, {
|
|
1149
|
+
path: env2[getPathKey({ env: env2 })],
|
|
1150
|
+
pathExt: withoutPathExt ? path3.delimiter : void 0
|
|
1151
|
+
});
|
|
1152
|
+
} catch (e) {
|
|
1153
|
+
} finally {
|
|
1154
|
+
if (shouldSwitchCwd) {
|
|
1155
|
+
process.chdir(cwd2);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
if (resolved) {
|
|
1159
|
+
resolved = path3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
1160
|
+
}
|
|
1161
|
+
return resolved;
|
|
1162
|
+
}
|
|
1163
|
+
function resolveCommand(parsed) {
|
|
1164
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
1165
|
+
}
|
|
1166
|
+
module2.exports = resolveCommand;
|
|
1167
|
+
}
|
|
1168
|
+
});
|
|
1169
|
+
|
|
1170
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/util/escape.js
|
|
1171
|
+
var require_escape = __commonJS({
|
|
1172
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
|
|
1173
|
+
"use strict";
|
|
1174
|
+
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
1175
|
+
function escapeCommand(arg) {
|
|
1176
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
1177
|
+
return arg;
|
|
1178
|
+
}
|
|
1179
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
1180
|
+
arg = `${arg}`;
|
|
1181
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
|
1182
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
1183
|
+
arg = `"${arg}"`;
|
|
1184
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
1185
|
+
if (doubleEscapeMetaChars) {
|
|
1186
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
1187
|
+
}
|
|
1188
|
+
return arg;
|
|
1189
|
+
}
|
|
1190
|
+
module2.exports.command = escapeCommand;
|
|
1191
|
+
module2.exports.argument = escapeArgument;
|
|
1192
|
+
}
|
|
1193
|
+
});
|
|
1194
|
+
|
|
1195
|
+
// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
1196
|
+
var require_shebang_regex = __commonJS({
|
|
1197
|
+
"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
|
|
1198
|
+
"use strict";
|
|
1199
|
+
module2.exports = /^#!(.*)/;
|
|
1200
|
+
}
|
|
1201
|
+
});
|
|
1202
|
+
|
|
1203
|
+
// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
1204
|
+
var require_shebang_command = __commonJS({
|
|
1205
|
+
"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
|
|
1206
|
+
"use strict";
|
|
1207
|
+
var shebangRegex = require_shebang_regex();
|
|
1208
|
+
module2.exports = (string2 = "") => {
|
|
1209
|
+
const match = string2.match(shebangRegex);
|
|
1210
|
+
if (!match) {
|
|
1211
|
+
return null;
|
|
1212
|
+
}
|
|
1213
|
+
const [path3, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
1214
|
+
const binary = path3.split("/").pop();
|
|
1215
|
+
if (binary === "env") {
|
|
1216
|
+
return argument;
|
|
1217
|
+
}
|
|
1218
|
+
return argument ? `${binary} ${argument}` : binary;
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
});
|
|
1222
|
+
|
|
1223
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/util/readShebang.js
|
|
1224
|
+
var require_readShebang = __commonJS({
|
|
1225
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
1226
|
+
"use strict";
|
|
1227
|
+
var fs2 = require("fs");
|
|
1228
|
+
var shebangCommand = require_shebang_command();
|
|
1229
|
+
function readShebang(command) {
|
|
1230
|
+
const size = 150;
|
|
1231
|
+
const buffer = Buffer.alloc(size);
|
|
1232
|
+
let fd;
|
|
1233
|
+
try {
|
|
1234
|
+
fd = fs2.openSync(command, "r");
|
|
1235
|
+
fs2.readSync(fd, buffer, 0, size, 0);
|
|
1236
|
+
fs2.closeSync(fd);
|
|
1237
|
+
} catch (e) {
|
|
1238
|
+
}
|
|
1239
|
+
return shebangCommand(buffer.toString());
|
|
1240
|
+
}
|
|
1241
|
+
module2.exports = readShebang;
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
|
|
1245
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/parse.js
|
|
1246
|
+
var require_parse = __commonJS({
|
|
1247
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
1248
|
+
"use strict";
|
|
1249
|
+
var path3 = require("path");
|
|
1250
|
+
var resolveCommand = require_resolveCommand();
|
|
1251
|
+
var escape = require_escape();
|
|
1252
|
+
var readShebang = require_readShebang();
|
|
1253
|
+
var isWin = process.platform === "win32";
|
|
1254
|
+
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
1255
|
+
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
1256
|
+
function detectShebang(parsed) {
|
|
1257
|
+
parsed.file = resolveCommand(parsed);
|
|
1258
|
+
const shebang = parsed.file && readShebang(parsed.file);
|
|
1259
|
+
if (shebang) {
|
|
1260
|
+
parsed.args.unshift(parsed.file);
|
|
1261
|
+
parsed.command = shebang;
|
|
1262
|
+
return resolveCommand(parsed);
|
|
1263
|
+
}
|
|
1264
|
+
return parsed.file;
|
|
1265
|
+
}
|
|
1266
|
+
function parseNonShell(parsed) {
|
|
1267
|
+
if (!isWin) {
|
|
1268
|
+
return parsed;
|
|
1269
|
+
}
|
|
1270
|
+
const commandFile = detectShebang(parsed);
|
|
1271
|
+
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
1272
|
+
if (parsed.options.forceShell || needsShell) {
|
|
1273
|
+
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
1274
|
+
parsed.command = path3.normalize(parsed.command);
|
|
1275
|
+
parsed.command = escape.command(parsed.command);
|
|
1276
|
+
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
1277
|
+
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
1278
|
+
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
|
|
1279
|
+
parsed.command = process.env.comspec || "cmd.exe";
|
|
1280
|
+
parsed.options.windowsVerbatimArguments = true;
|
|
1281
|
+
}
|
|
1282
|
+
return parsed;
|
|
1283
|
+
}
|
|
1284
|
+
function parse(command, args, options) {
|
|
1285
|
+
if (args && !Array.isArray(args)) {
|
|
1286
|
+
options = args;
|
|
1287
|
+
args = null;
|
|
1288
|
+
}
|
|
1289
|
+
args = args ? args.slice(0) : [];
|
|
1290
|
+
options = Object.assign({}, options);
|
|
1291
|
+
const parsed = {
|
|
1292
|
+
command,
|
|
1293
|
+
args,
|
|
1294
|
+
options,
|
|
1295
|
+
file: void 0,
|
|
1296
|
+
original: {
|
|
1297
|
+
command,
|
|
1298
|
+
args
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
return options.shell ? parsed : parseNonShell(parsed);
|
|
1302
|
+
}
|
|
1303
|
+
module2.exports = parse;
|
|
1304
|
+
}
|
|
1305
|
+
});
|
|
1306
|
+
|
|
1307
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/enoent.js
|
|
1308
|
+
var require_enoent = __commonJS({
|
|
1309
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
|
|
1310
|
+
"use strict";
|
|
1311
|
+
var isWin = process.platform === "win32";
|
|
1312
|
+
function notFoundError(original, syscall) {
|
|
1313
|
+
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
1314
|
+
code: "ENOENT",
|
|
1315
|
+
errno: "ENOENT",
|
|
1316
|
+
syscall: `${syscall} ${original.command}`,
|
|
1317
|
+
path: original.command,
|
|
1318
|
+
spawnargs: original.args
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
function hookChildProcess(cp2, parsed) {
|
|
1322
|
+
if (!isWin) {
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
const originalEmit = cp2.emit;
|
|
1326
|
+
cp2.emit = function(name, arg1) {
|
|
1327
|
+
if (name === "exit") {
|
|
1328
|
+
const err = verifyENOENT(arg1, parsed);
|
|
1329
|
+
if (err) {
|
|
1330
|
+
return originalEmit.call(cp2, "error", err);
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
return originalEmit.apply(cp2, arguments);
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
function verifyENOENT(status2, parsed) {
|
|
1337
|
+
if (isWin && status2 === 1 && !parsed.file) {
|
|
1338
|
+
return notFoundError(parsed.original, "spawn");
|
|
1339
|
+
}
|
|
1340
|
+
return null;
|
|
1341
|
+
}
|
|
1342
|
+
function verifyENOENTSync(status2, parsed) {
|
|
1343
|
+
if (isWin && status2 === 1 && !parsed.file) {
|
|
1344
|
+
return notFoundError(parsed.original, "spawnSync");
|
|
1345
|
+
}
|
|
1346
|
+
return null;
|
|
1347
|
+
}
|
|
1348
|
+
module2.exports = {
|
|
1349
|
+
hookChildProcess,
|
|
1350
|
+
verifyENOENT,
|
|
1351
|
+
verifyENOENTSync,
|
|
1352
|
+
notFoundError
|
|
1353
|
+
};
|
|
1354
|
+
}
|
|
1355
|
+
});
|
|
1356
|
+
|
|
1357
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/index.js
|
|
1358
|
+
var require_cross_spawn = __commonJS({
|
|
1359
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.5/node_modules/cross-spawn/index.js"(exports2, module2) {
|
|
1360
|
+
"use strict";
|
|
1361
|
+
var cp2 = require("child_process");
|
|
1362
|
+
var parse = require_parse();
|
|
1363
|
+
var enoent = require_enoent();
|
|
1364
|
+
function spawn2(command, args, options) {
|
|
1365
|
+
const parsed = parse(command, args, options);
|
|
1366
|
+
const spawned = cp2.spawn(parsed.command, parsed.args, parsed.options);
|
|
1367
|
+
enoent.hookChildProcess(spawned, parsed);
|
|
1368
|
+
return spawned;
|
|
1369
|
+
}
|
|
1370
|
+
function spawnSync(command, args, options) {
|
|
1371
|
+
const parsed = parse(command, args, options);
|
|
1372
|
+
const result = cp2.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
1373
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
1374
|
+
return result;
|
|
1375
|
+
}
|
|
1376
|
+
module2.exports = spawn2;
|
|
1377
|
+
module2.exports.spawn = spawn2;
|
|
1378
|
+
module2.exports.sync = spawnSync;
|
|
1379
|
+
module2.exports._parse = parse;
|
|
1380
|
+
module2.exports._enoent = enoent;
|
|
1381
|
+
}
|
|
1382
|
+
});
|
|
1383
|
+
|
|
1384
|
+
// ../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js
|
|
1385
|
+
var require_strip_final_newline = __commonJS({
|
|
1386
|
+
"../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports2, module2) {
|
|
1387
|
+
"use strict";
|
|
1388
|
+
module2.exports = (input) => {
|
|
1389
|
+
const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
|
|
1390
|
+
const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
|
|
1391
|
+
if (input[input.length - 1] === LF) {
|
|
1392
|
+
input = input.slice(0, input.length - 1);
|
|
1393
|
+
}
|
|
1394
|
+
if (input[input.length - 1] === CR) {
|
|
1395
|
+
input = input.slice(0, input.length - 1);
|
|
1396
|
+
}
|
|
1397
|
+
return input;
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
});
|
|
1401
|
+
|
|
1402
|
+
// ../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js
|
|
1403
|
+
var require_npm_run_path = __commonJS({
|
|
1404
|
+
"../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports2, module2) {
|
|
1405
|
+
"use strict";
|
|
1406
|
+
var path3 = require("path");
|
|
1407
|
+
var pathKey = require_path_key();
|
|
1408
|
+
var npmRunPath = (options) => {
|
|
1409
|
+
options = {
|
|
1410
|
+
cwd: process.cwd(),
|
|
1411
|
+
path: process.env[pathKey()],
|
|
1412
|
+
execPath: process.execPath,
|
|
1413
|
+
...options
|
|
1414
|
+
};
|
|
1415
|
+
let previous;
|
|
1416
|
+
let cwdPath = path3.resolve(options.cwd);
|
|
1417
|
+
const result = [];
|
|
1418
|
+
while (previous !== cwdPath) {
|
|
1419
|
+
result.push(path3.join(cwdPath, "node_modules/.bin"));
|
|
1420
|
+
previous = cwdPath;
|
|
1421
|
+
cwdPath = path3.resolve(cwdPath, "..");
|
|
1422
|
+
}
|
|
1423
|
+
const execPathDir = path3.resolve(options.cwd, options.execPath, "..");
|
|
1424
|
+
result.push(execPathDir);
|
|
1425
|
+
return result.concat(options.path).join(path3.delimiter);
|
|
1426
|
+
};
|
|
1427
|
+
module2.exports = npmRunPath;
|
|
1428
|
+
module2.exports.default = npmRunPath;
|
|
1429
|
+
module2.exports.env = (options) => {
|
|
1430
|
+
options = {
|
|
1431
|
+
env: process.env,
|
|
1432
|
+
...options
|
|
1433
|
+
};
|
|
1434
|
+
const env2 = { ...options.env };
|
|
1435
|
+
const path4 = pathKey({ env: env2 });
|
|
1436
|
+
options.path = env2[path4];
|
|
1437
|
+
env2[path4] = module2.exports(options);
|
|
1438
|
+
return env2;
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
});
|
|
1442
|
+
|
|
1443
|
+
// ../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js
|
|
1444
|
+
var require_mimic_fn = __commonJS({
|
|
1445
|
+
"../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports2, module2) {
|
|
1446
|
+
"use strict";
|
|
1447
|
+
var mimicFn = (to, from) => {
|
|
1448
|
+
for (const prop of Reflect.ownKeys(from)) {
|
|
1449
|
+
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
1450
|
+
}
|
|
1451
|
+
return to;
|
|
1452
|
+
};
|
|
1453
|
+
module2.exports = mimicFn;
|
|
1454
|
+
module2.exports.default = mimicFn;
|
|
1455
|
+
}
|
|
1456
|
+
});
|
|
1457
|
+
|
|
1458
|
+
// ../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js
|
|
1459
|
+
var require_onetime = __commonJS({
|
|
1460
|
+
"../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports2, module2) {
|
|
1461
|
+
"use strict";
|
|
1462
|
+
var mimicFn = require_mimic_fn();
|
|
1463
|
+
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
1464
|
+
var onetime = (function_, options = {}) => {
|
|
1465
|
+
if (typeof function_ !== "function") {
|
|
1466
|
+
throw new TypeError("Expected a function");
|
|
1467
|
+
}
|
|
1468
|
+
let returnValue;
|
|
1469
|
+
let callCount = 0;
|
|
1470
|
+
const functionName = function_.displayName || function_.name || "<anonymous>";
|
|
1471
|
+
const onetime2 = function(...arguments_) {
|
|
1472
|
+
calledFunctions.set(onetime2, ++callCount);
|
|
1473
|
+
if (callCount === 1) {
|
|
1474
|
+
returnValue = function_.apply(this, arguments_);
|
|
1475
|
+
function_ = null;
|
|
1476
|
+
} else if (options.throw === true) {
|
|
1477
|
+
throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
1478
|
+
}
|
|
1479
|
+
return returnValue;
|
|
1480
|
+
};
|
|
1481
|
+
mimicFn(onetime2, function_);
|
|
1482
|
+
calledFunctions.set(onetime2, callCount);
|
|
1483
|
+
return onetime2;
|
|
1484
|
+
};
|
|
1485
|
+
module2.exports = onetime;
|
|
1486
|
+
module2.exports.default = onetime;
|
|
1487
|
+
module2.exports.callCount = (function_) => {
|
|
1488
|
+
if (!calledFunctions.has(function_)) {
|
|
1489
|
+
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
|
1490
|
+
}
|
|
1491
|
+
return calledFunctions.get(function_);
|
|
1492
|
+
};
|
|
1493
|
+
}
|
|
1494
|
+
});
|
|
1495
|
+
|
|
1496
|
+
// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js
|
|
1497
|
+
var require_core = __commonJS({
|
|
1498
|
+
"../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js"(exports2) {
|
|
1499
|
+
"use strict";
|
|
1500
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1501
|
+
exports2.SIGNALS = void 0;
|
|
1502
|
+
var SIGNALS = [
|
|
1503
|
+
{
|
|
1504
|
+
name: "SIGHUP",
|
|
1505
|
+
number: 1,
|
|
1506
|
+
action: "terminate",
|
|
1507
|
+
description: "Terminal closed",
|
|
1508
|
+
standard: "posix"
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
name: "SIGINT",
|
|
1512
|
+
number: 2,
|
|
1513
|
+
action: "terminate",
|
|
1514
|
+
description: "User interruption with CTRL-C",
|
|
1515
|
+
standard: "ansi"
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
name: "SIGQUIT",
|
|
1519
|
+
number: 3,
|
|
1520
|
+
action: "core",
|
|
1521
|
+
description: "User interruption with CTRL-\\",
|
|
1522
|
+
standard: "posix"
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
name: "SIGILL",
|
|
1526
|
+
number: 4,
|
|
1527
|
+
action: "core",
|
|
1528
|
+
description: "Invalid machine instruction",
|
|
1529
|
+
standard: "ansi"
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
name: "SIGTRAP",
|
|
1533
|
+
number: 5,
|
|
1534
|
+
action: "core",
|
|
1535
|
+
description: "Debugger breakpoint",
|
|
1536
|
+
standard: "posix"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
name: "SIGABRT",
|
|
1540
|
+
number: 6,
|
|
1541
|
+
action: "core",
|
|
1542
|
+
description: "Aborted",
|
|
1543
|
+
standard: "ansi"
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
name: "SIGIOT",
|
|
1547
|
+
number: 6,
|
|
1548
|
+
action: "core",
|
|
1549
|
+
description: "Aborted",
|
|
1550
|
+
standard: "bsd"
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
name: "SIGBUS",
|
|
1554
|
+
number: 7,
|
|
1555
|
+
action: "core",
|
|
1556
|
+
description: "Bus error due to misaligned, non-existing address or paging error",
|
|
1557
|
+
standard: "bsd"
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
name: "SIGEMT",
|
|
1561
|
+
number: 7,
|
|
1562
|
+
action: "terminate",
|
|
1563
|
+
description: "Command should be emulated but is not implemented",
|
|
1564
|
+
standard: "other"
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
name: "SIGFPE",
|
|
1568
|
+
number: 8,
|
|
1569
|
+
action: "core",
|
|
1570
|
+
description: "Floating point arithmetic error",
|
|
1571
|
+
standard: "ansi"
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
name: "SIGKILL",
|
|
1575
|
+
number: 9,
|
|
1576
|
+
action: "terminate",
|
|
1577
|
+
description: "Forced termination",
|
|
1578
|
+
standard: "posix",
|
|
1579
|
+
forced: true
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
name: "SIGUSR1",
|
|
1583
|
+
number: 10,
|
|
1584
|
+
action: "terminate",
|
|
1585
|
+
description: "Application-specific signal",
|
|
1586
|
+
standard: "posix"
|
|
1587
|
+
},
|
|
1588
|
+
{
|
|
1589
|
+
name: "SIGSEGV",
|
|
1590
|
+
number: 11,
|
|
1591
|
+
action: "core",
|
|
1592
|
+
description: "Segmentation fault",
|
|
1593
|
+
standard: "ansi"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
name: "SIGUSR2",
|
|
1597
|
+
number: 12,
|
|
1598
|
+
action: "terminate",
|
|
1599
|
+
description: "Application-specific signal",
|
|
1600
|
+
standard: "posix"
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
name: "SIGPIPE",
|
|
1604
|
+
number: 13,
|
|
1605
|
+
action: "terminate",
|
|
1606
|
+
description: "Broken pipe or socket",
|
|
1607
|
+
standard: "posix"
|
|
1608
|
+
},
|
|
1609
|
+
{
|
|
1610
|
+
name: "SIGALRM",
|
|
1611
|
+
number: 14,
|
|
1612
|
+
action: "terminate",
|
|
1613
|
+
description: "Timeout or timer",
|
|
1614
|
+
standard: "posix"
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
name: "SIGTERM",
|
|
1618
|
+
number: 15,
|
|
1619
|
+
action: "terminate",
|
|
1620
|
+
description: "Termination",
|
|
1621
|
+
standard: "ansi"
|
|
1622
|
+
},
|
|
1623
|
+
{
|
|
1624
|
+
name: "SIGSTKFLT",
|
|
1625
|
+
number: 16,
|
|
1626
|
+
action: "terminate",
|
|
1627
|
+
description: "Stack is empty or overflowed",
|
|
1628
|
+
standard: "other"
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
name: "SIGCHLD",
|
|
1632
|
+
number: 17,
|
|
1633
|
+
action: "ignore",
|
|
1634
|
+
description: "Child process terminated, paused or unpaused",
|
|
1635
|
+
standard: "posix"
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
name: "SIGCLD",
|
|
1639
|
+
number: 17,
|
|
1640
|
+
action: "ignore",
|
|
1641
|
+
description: "Child process terminated, paused or unpaused",
|
|
1642
|
+
standard: "other"
|
|
1643
|
+
},
|
|
1644
|
+
{
|
|
1645
|
+
name: "SIGCONT",
|
|
1646
|
+
number: 18,
|
|
1647
|
+
action: "unpause",
|
|
1648
|
+
description: "Unpaused",
|
|
1649
|
+
standard: "posix",
|
|
1650
|
+
forced: true
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
name: "SIGSTOP",
|
|
1654
|
+
number: 19,
|
|
1655
|
+
action: "pause",
|
|
1656
|
+
description: "Paused",
|
|
1657
|
+
standard: "posix",
|
|
1658
|
+
forced: true
|
|
1659
|
+
},
|
|
1660
|
+
{
|
|
1661
|
+
name: "SIGTSTP",
|
|
1662
|
+
number: 20,
|
|
1663
|
+
action: "pause",
|
|
1664
|
+
description: 'Paused using CTRL-Z or "suspend"',
|
|
1665
|
+
standard: "posix"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
name: "SIGTTIN",
|
|
1669
|
+
number: 21,
|
|
1670
|
+
action: "pause",
|
|
1671
|
+
description: "Background process cannot read terminal input",
|
|
1672
|
+
standard: "posix"
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
name: "SIGBREAK",
|
|
1676
|
+
number: 21,
|
|
1677
|
+
action: "terminate",
|
|
1678
|
+
description: "User interruption with CTRL-BREAK",
|
|
1679
|
+
standard: "other"
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
name: "SIGTTOU",
|
|
1683
|
+
number: 22,
|
|
1684
|
+
action: "pause",
|
|
1685
|
+
description: "Background process cannot write to terminal output",
|
|
1686
|
+
standard: "posix"
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
name: "SIGURG",
|
|
1690
|
+
number: 23,
|
|
1691
|
+
action: "ignore",
|
|
1692
|
+
description: "Socket received out-of-band data",
|
|
1693
|
+
standard: "bsd"
|
|
1694
|
+
},
|
|
1695
|
+
{
|
|
1696
|
+
name: "SIGXCPU",
|
|
1697
|
+
number: 24,
|
|
1698
|
+
action: "core",
|
|
1699
|
+
description: "Process timed out",
|
|
1700
|
+
standard: "bsd"
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
name: "SIGXFSZ",
|
|
1704
|
+
number: 25,
|
|
1705
|
+
action: "core",
|
|
1706
|
+
description: "File too big",
|
|
1707
|
+
standard: "bsd"
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
name: "SIGVTALRM",
|
|
1711
|
+
number: 26,
|
|
1712
|
+
action: "terminate",
|
|
1713
|
+
description: "Timeout or timer",
|
|
1714
|
+
standard: "bsd"
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
name: "SIGPROF",
|
|
1718
|
+
number: 27,
|
|
1719
|
+
action: "terminate",
|
|
1720
|
+
description: "Timeout or timer",
|
|
1721
|
+
standard: "bsd"
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
name: "SIGWINCH",
|
|
1725
|
+
number: 28,
|
|
1726
|
+
action: "ignore",
|
|
1727
|
+
description: "Terminal window size changed",
|
|
1728
|
+
standard: "bsd"
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
name: "SIGIO",
|
|
1732
|
+
number: 29,
|
|
1733
|
+
action: "terminate",
|
|
1734
|
+
description: "I/O is available",
|
|
1735
|
+
standard: "other"
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
name: "SIGPOLL",
|
|
1739
|
+
number: 29,
|
|
1740
|
+
action: "terminate",
|
|
1741
|
+
description: "Watched event",
|
|
1742
|
+
standard: "other"
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
name: "SIGINFO",
|
|
1746
|
+
number: 29,
|
|
1747
|
+
action: "ignore",
|
|
1748
|
+
description: "Request for process information",
|
|
1749
|
+
standard: "other"
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
name: "SIGPWR",
|
|
1753
|
+
number: 30,
|
|
1754
|
+
action: "terminate",
|
|
1755
|
+
description: "Device running out of power",
|
|
1756
|
+
standard: "systemv"
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
name: "SIGSYS",
|
|
1760
|
+
number: 31,
|
|
1761
|
+
action: "core",
|
|
1762
|
+
description: "Invalid system call",
|
|
1763
|
+
standard: "other"
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
name: "SIGUNUSED",
|
|
1767
|
+
number: 31,
|
|
1768
|
+
action: "terminate",
|
|
1769
|
+
description: "Invalid system call",
|
|
1770
|
+
standard: "other"
|
|
1771
|
+
}
|
|
1772
|
+
];
|
|
1773
|
+
exports2.SIGNALS = SIGNALS;
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
|
|
1777
|
+
// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js
|
|
1778
|
+
var require_realtime = __commonJS({
|
|
1779
|
+
"../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js"(exports2) {
|
|
1780
|
+
"use strict";
|
|
1781
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1782
|
+
exports2.SIGRTMAX = exports2.getRealtimeSignals = void 0;
|
|
1783
|
+
var getRealtimeSignals = function() {
|
|
1784
|
+
const length = SIGRTMAX - SIGRTMIN + 1;
|
|
1785
|
+
return Array.from({ length }, getRealtimeSignal);
|
|
1786
|
+
};
|
|
1787
|
+
exports2.getRealtimeSignals = getRealtimeSignals;
|
|
1788
|
+
var getRealtimeSignal = function(value, index) {
|
|
1789
|
+
return {
|
|
1790
|
+
name: `SIGRT${index + 1}`,
|
|
1791
|
+
number: SIGRTMIN + index,
|
|
1792
|
+
action: "terminate",
|
|
1793
|
+
description: "Application-specific signal (realtime)",
|
|
1794
|
+
standard: "posix"
|
|
1795
|
+
};
|
|
1796
|
+
};
|
|
1797
|
+
var SIGRTMIN = 34;
|
|
1798
|
+
var SIGRTMAX = 64;
|
|
1799
|
+
exports2.SIGRTMAX = SIGRTMAX;
|
|
1800
|
+
}
|
|
1801
|
+
});
|
|
1802
|
+
|
|
1803
|
+
// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js
|
|
1804
|
+
var require_signals = __commonJS({
|
|
1805
|
+
"../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js"(exports2) {
|
|
1806
|
+
"use strict";
|
|
1807
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1808
|
+
exports2.getSignals = void 0;
|
|
1809
|
+
var _os = require("os");
|
|
1810
|
+
var _core = require_core();
|
|
1811
|
+
var _realtime = require_realtime();
|
|
1812
|
+
var getSignals = function() {
|
|
1813
|
+
const realtimeSignals = (0, _realtime.getRealtimeSignals)();
|
|
1814
|
+
const signals = [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal);
|
|
1815
|
+
return signals;
|
|
1816
|
+
};
|
|
1817
|
+
exports2.getSignals = getSignals;
|
|
1818
|
+
var normalizeSignal = function({
|
|
1819
|
+
name,
|
|
1820
|
+
number: defaultNumber,
|
|
1821
|
+
description,
|
|
1822
|
+
action,
|
|
1823
|
+
forced = false,
|
|
1824
|
+
standard
|
|
1825
|
+
}) {
|
|
1826
|
+
const {
|
|
1827
|
+
signals: { [name]: constantSignal }
|
|
1828
|
+
} = _os.constants;
|
|
1829
|
+
const supported = constantSignal !== void 0;
|
|
1830
|
+
const number2 = supported ? constantSignal : defaultNumber;
|
|
1831
|
+
return { name, number: number2, description, supported, action, forced, standard };
|
|
1832
|
+
};
|
|
1833
|
+
}
|
|
1834
|
+
});
|
|
1835
|
+
|
|
1836
|
+
// ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js
|
|
1837
|
+
var require_main = __commonJS({
|
|
1838
|
+
"../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js"(exports2) {
|
|
1839
|
+
"use strict";
|
|
1840
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1841
|
+
exports2.signalsByNumber = exports2.signalsByName = void 0;
|
|
1842
|
+
var _os = require("os");
|
|
1843
|
+
var _signals = require_signals();
|
|
1844
|
+
var _realtime = require_realtime();
|
|
1845
|
+
var getSignalsByName = function() {
|
|
1846
|
+
const signals = (0, _signals.getSignals)();
|
|
1847
|
+
return signals.reduce(getSignalByName, {});
|
|
1848
|
+
};
|
|
1849
|
+
var getSignalByName = function(signalByNameMemo, { name, number: number2, description, supported, action, forced, standard }) {
|
|
1850
|
+
return {
|
|
1851
|
+
...signalByNameMemo,
|
|
1852
|
+
[name]: { name, number: number2, description, supported, action, forced, standard }
|
|
1853
|
+
};
|
|
1854
|
+
};
|
|
1855
|
+
var signalsByName = getSignalsByName();
|
|
1856
|
+
exports2.signalsByName = signalsByName;
|
|
1857
|
+
var getSignalsByNumber = function() {
|
|
1858
|
+
const signals = (0, _signals.getSignals)();
|
|
1859
|
+
const length = _realtime.SIGRTMAX + 1;
|
|
1860
|
+
const signalsA = Array.from({ length }, (value, number2) => getSignalByNumber(number2, signals));
|
|
1861
|
+
return Object.assign({}, ...signalsA);
|
|
1862
|
+
};
|
|
1863
|
+
var getSignalByNumber = function(number2, signals) {
|
|
1864
|
+
const signal = findSignalByNumber(number2, signals);
|
|
1865
|
+
if (signal === void 0) {
|
|
1866
|
+
return {};
|
|
1867
|
+
}
|
|
1868
|
+
const { name, description, supported, action, forced, standard } = signal;
|
|
1869
|
+
return {
|
|
1870
|
+
[number2]: {
|
|
1871
|
+
name,
|
|
1872
|
+
number: number2,
|
|
1873
|
+
description,
|
|
1874
|
+
supported,
|
|
1875
|
+
action,
|
|
1876
|
+
forced,
|
|
1877
|
+
standard
|
|
1878
|
+
}
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
var findSignalByNumber = function(number2, signals) {
|
|
1882
|
+
const signal = signals.find(({ name }) => _os.constants.signals[name] === number2);
|
|
1883
|
+
if (signal !== void 0) {
|
|
1884
|
+
return signal;
|
|
1885
|
+
}
|
|
1886
|
+
return signals.find((signalA) => signalA.number === number2);
|
|
1887
|
+
};
|
|
1888
|
+
var signalsByNumber = getSignalsByNumber();
|
|
1889
|
+
exports2.signalsByNumber = signalsByNumber;
|
|
1890
|
+
}
|
|
1891
|
+
});
|
|
1892
|
+
|
|
1893
|
+
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js
|
|
1894
|
+
var require_error = __commonJS({
|
|
1895
|
+
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js"(exports2, module2) {
|
|
1896
|
+
"use strict";
|
|
1897
|
+
var { signalsByName } = require_main();
|
|
1898
|
+
var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
|
|
1899
|
+
if (timedOut) {
|
|
1900
|
+
return `timed out after ${timeout} milliseconds`;
|
|
1901
|
+
}
|
|
1902
|
+
if (isCanceled) {
|
|
1903
|
+
return "was canceled";
|
|
1904
|
+
}
|
|
1905
|
+
if (errorCode !== void 0) {
|
|
1906
|
+
return `failed with ${errorCode}`;
|
|
1907
|
+
}
|
|
1908
|
+
if (signal !== void 0) {
|
|
1909
|
+
return `was killed with ${signal} (${signalDescription})`;
|
|
1910
|
+
}
|
|
1911
|
+
if (exitCode !== void 0) {
|
|
1912
|
+
return `failed with exit code ${exitCode}`;
|
|
1913
|
+
}
|
|
1914
|
+
return "failed";
|
|
1915
|
+
};
|
|
1916
|
+
var makeError = ({
|
|
1917
|
+
stdout,
|
|
1918
|
+
stderr,
|
|
1919
|
+
all,
|
|
1920
|
+
error,
|
|
1921
|
+
signal,
|
|
1922
|
+
exitCode,
|
|
1923
|
+
command,
|
|
1924
|
+
escapedCommand,
|
|
1925
|
+
timedOut,
|
|
1926
|
+
isCanceled,
|
|
1927
|
+
killed,
|
|
1928
|
+
parsed: { options: { timeout } }
|
|
1929
|
+
}) => {
|
|
1930
|
+
exitCode = exitCode === null ? void 0 : exitCode;
|
|
1931
|
+
signal = signal === null ? void 0 : signal;
|
|
1932
|
+
const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description;
|
|
1933
|
+
const errorCode = error && error.code;
|
|
1934
|
+
const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled });
|
|
1935
|
+
const execaMessage = `Command ${prefix}: ${command}`;
|
|
1936
|
+
const isError = Object.prototype.toString.call(error) === "[object Error]";
|
|
1937
|
+
const shortMessage = isError ? `${execaMessage}
|
|
1938
|
+
${error.message}` : execaMessage;
|
|
1939
|
+
const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n");
|
|
1940
|
+
if (isError) {
|
|
1941
|
+
error.originalMessage = error.message;
|
|
1942
|
+
error.message = message;
|
|
1943
|
+
} else {
|
|
1944
|
+
error = new Error(message);
|
|
1945
|
+
}
|
|
1946
|
+
error.shortMessage = shortMessage;
|
|
1947
|
+
error.command = command;
|
|
1948
|
+
error.escapedCommand = escapedCommand;
|
|
1949
|
+
error.exitCode = exitCode;
|
|
1950
|
+
error.signal = signal;
|
|
1951
|
+
error.signalDescription = signalDescription;
|
|
1952
|
+
error.stdout = stdout;
|
|
1953
|
+
error.stderr = stderr;
|
|
1954
|
+
if (all !== void 0) {
|
|
1955
|
+
error.all = all;
|
|
1956
|
+
}
|
|
1957
|
+
if ("bufferedData" in error) {
|
|
1958
|
+
delete error.bufferedData;
|
|
1959
|
+
}
|
|
1960
|
+
error.failed = true;
|
|
1961
|
+
error.timedOut = Boolean(timedOut);
|
|
1962
|
+
error.isCanceled = isCanceled;
|
|
1963
|
+
error.killed = killed && !timedOut;
|
|
1964
|
+
return error;
|
|
1965
|
+
};
|
|
1966
|
+
module2.exports = makeError;
|
|
1967
|
+
}
|
|
1968
|
+
});
|
|
1969
|
+
|
|
1970
|
+
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js
|
|
1971
|
+
var require_stdio = __commonJS({
|
|
1972
|
+
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js"(exports2, module2) {
|
|
1973
|
+
"use strict";
|
|
1974
|
+
var aliases = ["stdin", "stdout", "stderr"];
|
|
1975
|
+
var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0);
|
|
1976
|
+
var normalizeStdio = (options) => {
|
|
1977
|
+
if (!options) {
|
|
1978
|
+
return;
|
|
1979
|
+
}
|
|
1980
|
+
const { stdio } = options;
|
|
1981
|
+
if (stdio === void 0) {
|
|
1982
|
+
return aliases.map((alias) => options[alias]);
|
|
1983
|
+
}
|
|
1984
|
+
if (hasAlias(options)) {
|
|
1985
|
+
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`);
|
|
1986
|
+
}
|
|
1987
|
+
if (typeof stdio === "string") {
|
|
1988
|
+
return stdio;
|
|
1989
|
+
}
|
|
1990
|
+
if (!Array.isArray(stdio)) {
|
|
1991
|
+
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
1992
|
+
}
|
|
1993
|
+
const length = Math.max(stdio.length, aliases.length);
|
|
1994
|
+
return Array.from({ length }, (value, index) => stdio[index]);
|
|
1995
|
+
};
|
|
1996
|
+
module2.exports = normalizeStdio;
|
|
1997
|
+
module2.exports.node = (options) => {
|
|
1998
|
+
const stdio = normalizeStdio(options);
|
|
1999
|
+
if (stdio === "ipc") {
|
|
2000
|
+
return "ipc";
|
|
2001
|
+
}
|
|
2002
|
+
if (stdio === void 0 || typeof stdio === "string") {
|
|
2003
|
+
return [stdio, stdio, stdio, "ipc"];
|
|
2004
|
+
}
|
|
2005
|
+
if (stdio.includes("ipc")) {
|
|
2006
|
+
return stdio;
|
|
2007
|
+
}
|
|
2008
|
+
return [...stdio, "ipc"];
|
|
2009
|
+
};
|
|
2010
|
+
}
|
|
2011
|
+
});
|
|
2012
|
+
|
|
2013
|
+
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
|
|
2014
|
+
var require_signals2 = __commonJS({
|
|
2015
|
+
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports2, module2) {
|
|
2016
|
+
"use strict";
|
|
2017
|
+
module2.exports = [
|
|
2018
|
+
"SIGABRT",
|
|
2019
|
+
"SIGALRM",
|
|
2020
|
+
"SIGHUP",
|
|
2021
|
+
"SIGINT",
|
|
2022
|
+
"SIGTERM"
|
|
2023
|
+
];
|
|
2024
|
+
if (process.platform !== "win32") {
|
|
2025
|
+
module2.exports.push(
|
|
2026
|
+
"SIGVTALRM",
|
|
2027
|
+
"SIGXCPU",
|
|
2028
|
+
"SIGXFSZ",
|
|
2029
|
+
"SIGUSR2",
|
|
2030
|
+
"SIGTRAP",
|
|
2031
|
+
"SIGSYS",
|
|
2032
|
+
"SIGQUIT",
|
|
2033
|
+
"SIGIOT"
|
|
2034
|
+
// should detect profiler and enable/disable accordingly.
|
|
2035
|
+
// see #21
|
|
2036
|
+
// 'SIGPROF'
|
|
2037
|
+
);
|
|
2038
|
+
}
|
|
2039
|
+
if (process.platform === "linux") {
|
|
2040
|
+
module2.exports.push(
|
|
2041
|
+
"SIGIO",
|
|
2042
|
+
"SIGPOLL",
|
|
2043
|
+
"SIGPWR",
|
|
2044
|
+
"SIGSTKFLT",
|
|
2045
|
+
"SIGUNUSED"
|
|
2046
|
+
);
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
});
|
|
2050
|
+
|
|
2051
|
+
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
|
|
2052
|
+
var require_signal_exit = __commonJS({
|
|
2053
|
+
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) {
|
|
2054
|
+
"use strict";
|
|
2055
|
+
var process2 = global.process;
|
|
2056
|
+
var processOk = function(process3) {
|
|
2057
|
+
return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
|
|
2058
|
+
};
|
|
2059
|
+
if (!processOk(process2)) {
|
|
2060
|
+
module2.exports = function() {
|
|
2061
|
+
return function() {
|
|
2062
|
+
};
|
|
2063
|
+
};
|
|
2064
|
+
} else {
|
|
2065
|
+
assert = require("assert");
|
|
2066
|
+
signals = require_signals2();
|
|
2067
|
+
isWin = /^win/i.test(process2.platform);
|
|
2068
|
+
EE = require("events");
|
|
2069
|
+
if (typeof EE !== "function") {
|
|
2070
|
+
EE = EE.EventEmitter;
|
|
2071
|
+
}
|
|
2072
|
+
if (process2.__signal_exit_emitter__) {
|
|
2073
|
+
emitter = process2.__signal_exit_emitter__;
|
|
2074
|
+
} else {
|
|
2075
|
+
emitter = process2.__signal_exit_emitter__ = new EE();
|
|
2076
|
+
emitter.count = 0;
|
|
2077
|
+
emitter.emitted = {};
|
|
2078
|
+
}
|
|
2079
|
+
if (!emitter.infinite) {
|
|
2080
|
+
emitter.setMaxListeners(Infinity);
|
|
2081
|
+
emitter.infinite = true;
|
|
2082
|
+
}
|
|
2083
|
+
module2.exports = function(cb, opts) {
|
|
2084
|
+
if (!processOk(global.process)) {
|
|
2085
|
+
return function() {
|
|
2086
|
+
};
|
|
2087
|
+
}
|
|
2088
|
+
assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
|
|
2089
|
+
if (loaded === false) {
|
|
2090
|
+
load();
|
|
2091
|
+
}
|
|
2092
|
+
var ev = "exit";
|
|
2093
|
+
if (opts && opts.alwaysLast) {
|
|
2094
|
+
ev = "afterexit";
|
|
2095
|
+
}
|
|
2096
|
+
var remove2 = function() {
|
|
2097
|
+
emitter.removeListener(ev, cb);
|
|
2098
|
+
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
|
|
2099
|
+
unload();
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
emitter.on(ev, cb);
|
|
2103
|
+
return remove2;
|
|
2104
|
+
};
|
|
2105
|
+
unload = function unload2() {
|
|
2106
|
+
if (!loaded || !processOk(global.process)) {
|
|
2107
|
+
return;
|
|
2108
|
+
}
|
|
2109
|
+
loaded = false;
|
|
2110
|
+
signals.forEach(function(sig) {
|
|
2111
|
+
try {
|
|
2112
|
+
process2.removeListener(sig, sigListeners[sig]);
|
|
2113
|
+
} catch (er) {
|
|
2114
|
+
}
|
|
2115
|
+
});
|
|
2116
|
+
process2.emit = originalProcessEmit;
|
|
2117
|
+
process2.reallyExit = originalProcessReallyExit;
|
|
2118
|
+
emitter.count -= 1;
|
|
2119
|
+
};
|
|
2120
|
+
module2.exports.unload = unload;
|
|
2121
|
+
emit = function emit2(event, code, signal) {
|
|
2122
|
+
if (emitter.emitted[event]) {
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
emitter.emitted[event] = true;
|
|
2126
|
+
emitter.emit(event, code, signal);
|
|
2127
|
+
};
|
|
2128
|
+
sigListeners = {};
|
|
2129
|
+
signals.forEach(function(sig) {
|
|
2130
|
+
sigListeners[sig] = function listener() {
|
|
2131
|
+
if (!processOk(global.process)) {
|
|
2132
|
+
return;
|
|
2133
|
+
}
|
|
2134
|
+
var listeners = process2.listeners(sig);
|
|
2135
|
+
if (listeners.length === emitter.count) {
|
|
2136
|
+
unload();
|
|
2137
|
+
emit("exit", null, sig);
|
|
2138
|
+
emit("afterexit", null, sig);
|
|
2139
|
+
if (isWin && sig === "SIGHUP") {
|
|
2140
|
+
sig = "SIGINT";
|
|
2141
|
+
}
|
|
2142
|
+
process2.kill(process2.pid, sig);
|
|
2143
|
+
}
|
|
2144
|
+
};
|
|
2145
|
+
});
|
|
2146
|
+
module2.exports.signals = function() {
|
|
2147
|
+
return signals;
|
|
2148
|
+
};
|
|
2149
|
+
loaded = false;
|
|
2150
|
+
load = function load2() {
|
|
2151
|
+
if (loaded || !processOk(global.process)) {
|
|
2152
|
+
return;
|
|
2153
|
+
}
|
|
2154
|
+
loaded = true;
|
|
2155
|
+
emitter.count += 1;
|
|
2156
|
+
signals = signals.filter(function(sig) {
|
|
2157
|
+
try {
|
|
2158
|
+
process2.on(sig, sigListeners[sig]);
|
|
2159
|
+
return true;
|
|
2160
|
+
} catch (er) {
|
|
2161
|
+
return false;
|
|
2162
|
+
}
|
|
2163
|
+
});
|
|
2164
|
+
process2.emit = processEmit;
|
|
2165
|
+
process2.reallyExit = processReallyExit;
|
|
2166
|
+
};
|
|
2167
|
+
module2.exports.load = load;
|
|
2168
|
+
originalProcessReallyExit = process2.reallyExit;
|
|
2169
|
+
processReallyExit = function processReallyExit2(code) {
|
|
2170
|
+
if (!processOk(global.process)) {
|
|
2171
|
+
return;
|
|
2172
|
+
}
|
|
2173
|
+
process2.exitCode = code || /* istanbul ignore next */
|
|
2174
|
+
0;
|
|
2175
|
+
emit("exit", process2.exitCode, null);
|
|
2176
|
+
emit("afterexit", process2.exitCode, null);
|
|
2177
|
+
originalProcessReallyExit.call(process2, process2.exitCode);
|
|
2178
|
+
};
|
|
2179
|
+
originalProcessEmit = process2.emit;
|
|
2180
|
+
processEmit = function processEmit2(ev, arg) {
|
|
2181
|
+
if (ev === "exit" && processOk(global.process)) {
|
|
2182
|
+
if (arg !== void 0) {
|
|
2183
|
+
process2.exitCode = arg;
|
|
2184
|
+
}
|
|
2185
|
+
var ret = originalProcessEmit.apply(this, arguments);
|
|
2186
|
+
emit("exit", process2.exitCode, null);
|
|
2187
|
+
emit("afterexit", process2.exitCode, null);
|
|
2188
|
+
return ret;
|
|
2189
|
+
} else {
|
|
2190
|
+
return originalProcessEmit.apply(this, arguments);
|
|
2191
|
+
}
|
|
2192
|
+
};
|
|
2193
|
+
}
|
|
2194
|
+
var assert;
|
|
2195
|
+
var signals;
|
|
2196
|
+
var isWin;
|
|
2197
|
+
var EE;
|
|
2198
|
+
var emitter;
|
|
2199
|
+
var unload;
|
|
2200
|
+
var emit;
|
|
2201
|
+
var sigListeners;
|
|
2202
|
+
var loaded;
|
|
2203
|
+
var load;
|
|
2204
|
+
var originalProcessReallyExit;
|
|
2205
|
+
var processReallyExit;
|
|
2206
|
+
var originalProcessEmit;
|
|
2207
|
+
var processEmit;
|
|
2208
|
+
}
|
|
2209
|
+
});
|
|
2210
|
+
|
|
2211
|
+
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js
|
|
2212
|
+
var require_kill = __commonJS({
|
|
2213
|
+
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js"(exports2, module2) {
|
|
2214
|
+
"use strict";
|
|
2215
|
+
var os = require("os");
|
|
2216
|
+
var onExit = require_signal_exit();
|
|
2217
|
+
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
2218
|
+
var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
2219
|
+
const killResult = kill(signal);
|
|
2220
|
+
setKillTimeout(kill, signal, options, killResult);
|
|
2221
|
+
return killResult;
|
|
2222
|
+
};
|
|
2223
|
+
var setKillTimeout = (kill, signal, options, killResult) => {
|
|
2224
|
+
if (!shouldForceKill(signal, options, killResult)) {
|
|
2225
|
+
return;
|
|
2226
|
+
}
|
|
2227
|
+
const timeout = getForceKillAfterTimeout(options);
|
|
2228
|
+
const t2 = setTimeout(() => {
|
|
2229
|
+
kill("SIGKILL");
|
|
2230
|
+
}, timeout);
|
|
2231
|
+
if (t2.unref) {
|
|
2232
|
+
t2.unref();
|
|
2233
|
+
}
|
|
2234
|
+
};
|
|
2235
|
+
var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => {
|
|
2236
|
+
return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
2237
|
+
};
|
|
2238
|
+
var isSigterm = (signal) => {
|
|
2239
|
+
return signal === os.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
|
2240
|
+
};
|
|
2241
|
+
var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
2242
|
+
if (forceKillAfterTimeout === true) {
|
|
2243
|
+
return DEFAULT_FORCE_KILL_TIMEOUT;
|
|
2244
|
+
}
|
|
2245
|
+
if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
|
|
2246
|
+
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
|
|
2247
|
+
}
|
|
2248
|
+
return forceKillAfterTimeout;
|
|
2249
|
+
};
|
|
2250
|
+
var spawnedCancel = (spawned, context) => {
|
|
2251
|
+
const killResult = spawned.kill();
|
|
2252
|
+
if (killResult) {
|
|
2253
|
+
context.isCanceled = true;
|
|
2254
|
+
}
|
|
2255
|
+
};
|
|
2256
|
+
var timeoutKill = (spawned, signal, reject) => {
|
|
2257
|
+
spawned.kill(signal);
|
|
2258
|
+
reject(Object.assign(new Error("Timed out"), { timedOut: true, signal }));
|
|
2259
|
+
};
|
|
2260
|
+
var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => {
|
|
2261
|
+
if (timeout === 0 || timeout === void 0) {
|
|
2262
|
+
return spawnedPromise;
|
|
2263
|
+
}
|
|
2264
|
+
let timeoutId;
|
|
2265
|
+
const timeoutPromise = new Promise((resolve4, reject) => {
|
|
2266
|
+
timeoutId = setTimeout(() => {
|
|
2267
|
+
timeoutKill(spawned, killSignal, reject);
|
|
2268
|
+
}, timeout);
|
|
2269
|
+
});
|
|
2270
|
+
const safeSpawnedPromise = spawnedPromise.finally(() => {
|
|
2271
|
+
clearTimeout(timeoutId);
|
|
2272
|
+
});
|
|
2273
|
+
return Promise.race([timeoutPromise, safeSpawnedPromise]);
|
|
2274
|
+
};
|
|
2275
|
+
var validateTimeout = ({ timeout }) => {
|
|
2276
|
+
if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) {
|
|
2277
|
+
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
|
|
2278
|
+
}
|
|
2279
|
+
};
|
|
2280
|
+
var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
|
|
2281
|
+
if (!cleanup || detached) {
|
|
2282
|
+
return timedPromise;
|
|
2283
|
+
}
|
|
2284
|
+
const removeExitHandler = onExit(() => {
|
|
2285
|
+
spawned.kill();
|
|
2286
|
+
});
|
|
2287
|
+
return timedPromise.finally(() => {
|
|
2288
|
+
removeExitHandler();
|
|
2289
|
+
});
|
|
2290
|
+
};
|
|
2291
|
+
module2.exports = {
|
|
2292
|
+
spawnedKill,
|
|
2293
|
+
spawnedCancel,
|
|
2294
|
+
setupTimeout,
|
|
2295
|
+
validateTimeout,
|
|
2296
|
+
setExitHandler
|
|
2297
|
+
};
|
|
2298
|
+
}
|
|
2299
|
+
});
|
|
2300
|
+
|
|
2301
|
+
// ../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js
|
|
2302
|
+
var require_is_stream = __commonJS({
|
|
2303
|
+
"../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports2, module2) {
|
|
2304
|
+
"use strict";
|
|
2305
|
+
var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
|
|
2306
|
+
isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
|
|
2307
|
+
isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object";
|
|
2308
|
+
isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream);
|
|
2309
|
+
isStream.transform = (stream) => isStream.duplex(stream) && typeof stream._transform === "function";
|
|
2310
|
+
module2.exports = isStream;
|
|
2311
|
+
}
|
|
2312
|
+
});
|
|
2313
|
+
|
|
2314
|
+
// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js
|
|
2315
|
+
var require_buffer_stream = __commonJS({
|
|
2316
|
+
"../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(exports2, module2) {
|
|
2317
|
+
"use strict";
|
|
2318
|
+
var { PassThrough: PassThroughStream } = require("stream");
|
|
2319
|
+
module2.exports = (options) => {
|
|
2320
|
+
options = { ...options };
|
|
2321
|
+
const { array } = options;
|
|
2322
|
+
let { encoding } = options;
|
|
2323
|
+
const isBuffer = encoding === "buffer";
|
|
2324
|
+
let objectMode = false;
|
|
2325
|
+
if (array) {
|
|
2326
|
+
objectMode = !(encoding || isBuffer);
|
|
2327
|
+
} else {
|
|
2328
|
+
encoding = encoding || "utf8";
|
|
2329
|
+
}
|
|
2330
|
+
if (isBuffer) {
|
|
2331
|
+
encoding = null;
|
|
2332
|
+
}
|
|
2333
|
+
const stream = new PassThroughStream({ objectMode });
|
|
2334
|
+
if (encoding) {
|
|
2335
|
+
stream.setEncoding(encoding);
|
|
2336
|
+
}
|
|
2337
|
+
let length = 0;
|
|
2338
|
+
const chunks = [];
|
|
2339
|
+
stream.on("data", (chunk) => {
|
|
2340
|
+
chunks.push(chunk);
|
|
2341
|
+
if (objectMode) {
|
|
2342
|
+
length = chunks.length;
|
|
2343
|
+
} else {
|
|
2344
|
+
length += chunk.length;
|
|
2345
|
+
}
|
|
2346
|
+
});
|
|
2347
|
+
stream.getBufferedValue = () => {
|
|
2348
|
+
if (array) {
|
|
2349
|
+
return chunks;
|
|
2350
|
+
}
|
|
2351
|
+
return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
|
|
2352
|
+
};
|
|
2353
|
+
stream.getBufferedLength = () => length;
|
|
2354
|
+
return stream;
|
|
2355
|
+
};
|
|
2356
|
+
}
|
|
2357
|
+
});
|
|
2358
|
+
|
|
2359
|
+
// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js
|
|
2360
|
+
var require_get_stream = __commonJS({
|
|
2361
|
+
"../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports2, module2) {
|
|
2362
|
+
"use strict";
|
|
2363
|
+
var { constants: BufferConstants } = require("buffer");
|
|
2364
|
+
var stream = require("stream");
|
|
2365
|
+
var { promisify } = require("util");
|
|
2366
|
+
var bufferStream = require_buffer_stream();
|
|
2367
|
+
var streamPipelinePromisified = promisify(stream.pipeline);
|
|
2368
|
+
var MaxBufferError = class extends Error {
|
|
2369
|
+
constructor() {
|
|
2370
|
+
super("maxBuffer exceeded");
|
|
2371
|
+
this.name = "MaxBufferError";
|
|
2372
|
+
}
|
|
2373
|
+
};
|
|
2374
|
+
async function getStream(inputStream, options) {
|
|
2375
|
+
if (!inputStream) {
|
|
2376
|
+
throw new Error("Expected a stream");
|
|
2377
|
+
}
|
|
2378
|
+
options = {
|
|
2379
|
+
maxBuffer: Infinity,
|
|
2380
|
+
...options
|
|
2381
|
+
};
|
|
2382
|
+
const { maxBuffer } = options;
|
|
2383
|
+
const stream2 = bufferStream(options);
|
|
2384
|
+
await new Promise((resolve4, reject) => {
|
|
2385
|
+
const rejectPromise = (error) => {
|
|
2386
|
+
if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
2387
|
+
error.bufferedData = stream2.getBufferedValue();
|
|
2388
|
+
}
|
|
2389
|
+
reject(error);
|
|
2390
|
+
};
|
|
2391
|
+
(async () => {
|
|
2392
|
+
try {
|
|
2393
|
+
await streamPipelinePromisified(inputStream, stream2);
|
|
2394
|
+
resolve4();
|
|
2395
|
+
} catch (error) {
|
|
2396
|
+
rejectPromise(error);
|
|
2397
|
+
}
|
|
2398
|
+
})();
|
|
2399
|
+
stream2.on("data", () => {
|
|
2400
|
+
if (stream2.getBufferedLength() > maxBuffer) {
|
|
2401
|
+
rejectPromise(new MaxBufferError());
|
|
2402
|
+
}
|
|
2403
|
+
});
|
|
2404
|
+
});
|
|
2405
|
+
return stream2.getBufferedValue();
|
|
2406
|
+
}
|
|
2407
|
+
module2.exports = getStream;
|
|
2408
|
+
module2.exports.buffer = (stream2, options) => getStream(stream2, { ...options, encoding: "buffer" });
|
|
2409
|
+
module2.exports.array = (stream2, options) => getStream(stream2, { ...options, array: true });
|
|
2410
|
+
module2.exports.MaxBufferError = MaxBufferError;
|
|
2411
|
+
}
|
|
2412
|
+
});
|
|
2413
|
+
|
|
2414
|
+
// ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js
|
|
2415
|
+
var require_merge_stream = __commonJS({
|
|
2416
|
+
"../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports2, module2) {
|
|
2417
|
+
"use strict";
|
|
2418
|
+
var { PassThrough } = require("stream");
|
|
2419
|
+
module2.exports = function() {
|
|
2420
|
+
var sources = [];
|
|
2421
|
+
var output = new PassThrough({ objectMode: true });
|
|
2422
|
+
output.setMaxListeners(0);
|
|
2423
|
+
output.add = add;
|
|
2424
|
+
output.isEmpty = isEmpty;
|
|
2425
|
+
output.on("unpipe", remove2);
|
|
2426
|
+
Array.prototype.slice.call(arguments).forEach(add);
|
|
2427
|
+
return output;
|
|
2428
|
+
function add(source) {
|
|
2429
|
+
if (Array.isArray(source)) {
|
|
2430
|
+
source.forEach(add);
|
|
2431
|
+
return this;
|
|
2432
|
+
}
|
|
2433
|
+
sources.push(source);
|
|
2434
|
+
source.once("end", remove2.bind(null, source));
|
|
2435
|
+
source.once("error", output.emit.bind(output, "error"));
|
|
2436
|
+
source.pipe(output, { end: false });
|
|
2437
|
+
return this;
|
|
2438
|
+
}
|
|
2439
|
+
function isEmpty() {
|
|
2440
|
+
return sources.length == 0;
|
|
2441
|
+
}
|
|
2442
|
+
function remove2(source) {
|
|
2443
|
+
sources = sources.filter(function(it) {
|
|
2444
|
+
return it !== source;
|
|
2445
|
+
});
|
|
2446
|
+
if (!sources.length && output.readable) {
|
|
2447
|
+
output.end();
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
};
|
|
2451
|
+
}
|
|
2452
|
+
});
|
|
2453
|
+
|
|
2454
|
+
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js
|
|
2455
|
+
var require_stream = __commonJS({
|
|
2456
|
+
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js"(exports2, module2) {
|
|
2457
|
+
"use strict";
|
|
2458
|
+
var isStream = require_is_stream();
|
|
2459
|
+
var getStream = require_get_stream();
|
|
2460
|
+
var mergeStream = require_merge_stream();
|
|
2461
|
+
var handleInput = (spawned, input) => {
|
|
2462
|
+
if (input === void 0 || spawned.stdin === void 0) {
|
|
2463
|
+
return;
|
|
2464
|
+
}
|
|
2465
|
+
if (isStream(input)) {
|
|
2466
|
+
input.pipe(spawned.stdin);
|
|
2467
|
+
} else {
|
|
2468
|
+
spawned.stdin.end(input);
|
|
2469
|
+
}
|
|
2470
|
+
};
|
|
2471
|
+
var makeAllStream = (spawned, { all }) => {
|
|
2472
|
+
if (!all || !spawned.stdout && !spawned.stderr) {
|
|
2473
|
+
return;
|
|
2474
|
+
}
|
|
2475
|
+
const mixed = mergeStream();
|
|
2476
|
+
if (spawned.stdout) {
|
|
2477
|
+
mixed.add(spawned.stdout);
|
|
2478
|
+
}
|
|
2479
|
+
if (spawned.stderr) {
|
|
2480
|
+
mixed.add(spawned.stderr);
|
|
2481
|
+
}
|
|
2482
|
+
return mixed;
|
|
2483
|
+
};
|
|
2484
|
+
var getBufferedData = async (stream, streamPromise) => {
|
|
2485
|
+
if (!stream) {
|
|
2486
|
+
return;
|
|
2487
|
+
}
|
|
2488
|
+
stream.destroy();
|
|
2489
|
+
try {
|
|
2490
|
+
return await streamPromise;
|
|
2491
|
+
} catch (error) {
|
|
2492
|
+
return error.bufferedData;
|
|
2493
|
+
}
|
|
2494
|
+
};
|
|
2495
|
+
var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
|
|
2496
|
+
if (!stream || !buffer) {
|
|
2497
|
+
return;
|
|
2498
|
+
}
|
|
2499
|
+
if (encoding) {
|
|
2500
|
+
return getStream(stream, { encoding, maxBuffer });
|
|
2501
|
+
}
|
|
2502
|
+
return getStream.buffer(stream, { maxBuffer });
|
|
2503
|
+
};
|
|
2504
|
+
var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
|
|
2505
|
+
const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
|
|
2506
|
+
const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer });
|
|
2507
|
+
const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 });
|
|
2508
|
+
try {
|
|
2509
|
+
return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
|
|
2510
|
+
} catch (error) {
|
|
2511
|
+
return Promise.all([
|
|
2512
|
+
{ error, signal: error.signal, timedOut: error.timedOut },
|
|
2513
|
+
getBufferedData(stdout, stdoutPromise),
|
|
2514
|
+
getBufferedData(stderr, stderrPromise),
|
|
2515
|
+
getBufferedData(all, allPromise)
|
|
2516
|
+
]);
|
|
2517
|
+
}
|
|
2518
|
+
};
|
|
2519
|
+
var validateInputSync = ({ input }) => {
|
|
2520
|
+
if (isStream(input)) {
|
|
2521
|
+
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
2522
|
+
}
|
|
2523
|
+
};
|
|
2524
|
+
module2.exports = {
|
|
2525
|
+
handleInput,
|
|
2526
|
+
makeAllStream,
|
|
2527
|
+
getSpawnedResult,
|
|
2528
|
+
validateInputSync
|
|
2529
|
+
};
|
|
2530
|
+
}
|
|
2531
|
+
});
|
|
2532
|
+
|
|
2533
|
+
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js
|
|
2534
|
+
var require_promise = __commonJS({
|
|
2535
|
+
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js"(exports2, module2) {
|
|
2536
|
+
"use strict";
|
|
2537
|
+
var nativePromisePrototype = (async () => {
|
|
2538
|
+
})().constructor.prototype;
|
|
2539
|
+
var descriptors = ["then", "catch", "finally"].map((property2) => [
|
|
2540
|
+
property2,
|
|
2541
|
+
Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property2)
|
|
2542
|
+
]);
|
|
2543
|
+
var mergePromise = (spawned, promise) => {
|
|
2544
|
+
for (const [property2, descriptor] of descriptors) {
|
|
2545
|
+
const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise);
|
|
2546
|
+
Reflect.defineProperty(spawned, property2, { ...descriptor, value });
|
|
2547
|
+
}
|
|
2548
|
+
return spawned;
|
|
2549
|
+
};
|
|
2550
|
+
var getSpawnedPromise = (spawned) => {
|
|
2551
|
+
return new Promise((resolve4, reject) => {
|
|
2552
|
+
spawned.on("exit", (exitCode, signal) => {
|
|
2553
|
+
resolve4({ exitCode, signal });
|
|
2554
|
+
});
|
|
2555
|
+
spawned.on("error", (error) => {
|
|
2556
|
+
reject(error);
|
|
2557
|
+
});
|
|
2558
|
+
if (spawned.stdin) {
|
|
2559
|
+
spawned.stdin.on("error", (error) => {
|
|
2560
|
+
reject(error);
|
|
2561
|
+
});
|
|
2562
|
+
}
|
|
2563
|
+
});
|
|
2564
|
+
};
|
|
2565
|
+
module2.exports = {
|
|
2566
|
+
mergePromise,
|
|
2567
|
+
getSpawnedPromise
|
|
2568
|
+
};
|
|
2569
|
+
}
|
|
2570
|
+
});
|
|
2571
|
+
|
|
2572
|
+
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js
|
|
2573
|
+
var require_command = __commonJS({
|
|
2574
|
+
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js"(exports2, module2) {
|
|
2575
|
+
"use strict";
|
|
2576
|
+
var normalizeArgs = (file, args = []) => {
|
|
2577
|
+
if (!Array.isArray(args)) {
|
|
2578
|
+
return [file];
|
|
2579
|
+
}
|
|
2580
|
+
return [file, ...args];
|
|
2581
|
+
};
|
|
2582
|
+
var NO_ESCAPE_REGEXP = /^[\w.-]+$/;
|
|
2583
|
+
var DOUBLE_QUOTES_REGEXP = /"/g;
|
|
2584
|
+
var escapeArg = (arg) => {
|
|
2585
|
+
if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) {
|
|
2586
|
+
return arg;
|
|
2587
|
+
}
|
|
2588
|
+
return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`;
|
|
2589
|
+
};
|
|
2590
|
+
var joinCommand = (file, args) => {
|
|
2591
|
+
return normalizeArgs(file, args).join(" ");
|
|
2592
|
+
};
|
|
2593
|
+
var getEscapedCommand = (file, args) => {
|
|
2594
|
+
return normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" ");
|
|
2595
|
+
};
|
|
2596
|
+
var SPACES_REGEXP = / +/g;
|
|
2597
|
+
var parseCommand = (command) => {
|
|
2598
|
+
const tokens = [];
|
|
2599
|
+
for (const token of command.trim().split(SPACES_REGEXP)) {
|
|
2600
|
+
const previousToken = tokens[tokens.length - 1];
|
|
2601
|
+
if (previousToken && previousToken.endsWith("\\")) {
|
|
2602
|
+
tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;
|
|
2603
|
+
} else {
|
|
2604
|
+
tokens.push(token);
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
return tokens;
|
|
2608
|
+
};
|
|
2609
|
+
module2.exports = {
|
|
2610
|
+
joinCommand,
|
|
2611
|
+
getEscapedCommand,
|
|
2612
|
+
parseCommand
|
|
2613
|
+
};
|
|
2614
|
+
}
|
|
2615
|
+
});
|
|
2616
|
+
|
|
2617
|
+
// ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js
|
|
2618
|
+
var require_execa = __commonJS({
|
|
2619
|
+
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js"(exports2, module2) {
|
|
2620
|
+
"use strict";
|
|
2621
|
+
var path3 = require("path");
|
|
2622
|
+
var childProcess = require("child_process");
|
|
2623
|
+
var crossSpawn = require_cross_spawn();
|
|
2624
|
+
var stripFinalNewline = require_strip_final_newline();
|
|
2625
|
+
var npmRunPath = require_npm_run_path();
|
|
2626
|
+
var onetime = require_onetime();
|
|
2627
|
+
var makeError = require_error();
|
|
2628
|
+
var normalizeStdio = require_stdio();
|
|
2629
|
+
var { spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler } = require_kill();
|
|
2630
|
+
var { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = require_stream();
|
|
2631
|
+
var { mergePromise, getSpawnedPromise } = require_promise();
|
|
2632
|
+
var { joinCommand, parseCommand, getEscapedCommand } = require_command();
|
|
2633
|
+
var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
|
2634
|
+
var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
|
2635
|
+
const env2 = extendEnv ? { ...process.env, ...envOption } : envOption;
|
|
2636
|
+
if (preferLocal) {
|
|
2637
|
+
return npmRunPath.env({ env: env2, cwd: localDir, execPath });
|
|
2638
|
+
}
|
|
2639
|
+
return env2;
|
|
2640
|
+
};
|
|
2641
|
+
var handleArguments = (file, args, options = {}) => {
|
|
2642
|
+
const parsed = crossSpawn._parse(file, args, options);
|
|
2643
|
+
file = parsed.command;
|
|
2644
|
+
args = parsed.args;
|
|
2645
|
+
options = parsed.options;
|
|
2646
|
+
options = {
|
|
2647
|
+
maxBuffer: DEFAULT_MAX_BUFFER,
|
|
2648
|
+
buffer: true,
|
|
2649
|
+
stripFinalNewline: true,
|
|
2650
|
+
extendEnv: true,
|
|
2651
|
+
preferLocal: false,
|
|
2652
|
+
localDir: options.cwd || process.cwd(),
|
|
2653
|
+
execPath: process.execPath,
|
|
2654
|
+
encoding: "utf8",
|
|
2655
|
+
reject: true,
|
|
2656
|
+
cleanup: true,
|
|
2657
|
+
all: false,
|
|
2658
|
+
windowsHide: true,
|
|
2659
|
+
...options
|
|
2660
|
+
};
|
|
2661
|
+
options.env = getEnv(options);
|
|
2662
|
+
options.stdio = normalizeStdio(options);
|
|
2663
|
+
if (process.platform === "win32" && path3.basename(file, ".exe") === "cmd") {
|
|
2664
|
+
args.unshift("/q");
|
|
2665
|
+
}
|
|
2666
|
+
return { file, args, options, parsed };
|
|
2667
|
+
};
|
|
2668
|
+
var handleOutput = (options, value, error) => {
|
|
2669
|
+
if (typeof value !== "string" && !Buffer.isBuffer(value)) {
|
|
2670
|
+
return error === void 0 ? void 0 : "";
|
|
2671
|
+
}
|
|
2672
|
+
if (options.stripFinalNewline) {
|
|
2673
|
+
return stripFinalNewline(value);
|
|
2674
|
+
}
|
|
2675
|
+
return value;
|
|
2676
|
+
};
|
|
2677
|
+
var execa2 = (file, args, options) => {
|
|
2678
|
+
const parsed = handleArguments(file, args, options);
|
|
2679
|
+
const command = joinCommand(file, args);
|
|
2680
|
+
const escapedCommand = getEscapedCommand(file, args);
|
|
2681
|
+
validateTimeout(parsed.options);
|
|
2682
|
+
let spawned;
|
|
2683
|
+
try {
|
|
2684
|
+
spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
|
|
2685
|
+
} catch (error) {
|
|
2686
|
+
const dummySpawned = new childProcess.ChildProcess();
|
|
2687
|
+
const errorPromise = Promise.reject(makeError({
|
|
2688
|
+
error,
|
|
2689
|
+
stdout: "",
|
|
2690
|
+
stderr: "",
|
|
2691
|
+
all: "",
|
|
2692
|
+
command,
|
|
2693
|
+
escapedCommand,
|
|
2694
|
+
parsed,
|
|
2695
|
+
timedOut: false,
|
|
2696
|
+
isCanceled: false,
|
|
2697
|
+
killed: false
|
|
2698
|
+
}));
|
|
2699
|
+
return mergePromise(dummySpawned, errorPromise);
|
|
2700
|
+
}
|
|
2701
|
+
const spawnedPromise = getSpawnedPromise(spawned);
|
|
2702
|
+
const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
|
|
2703
|
+
const processDone = setExitHandler(spawned, parsed.options, timedPromise);
|
|
2704
|
+
const context = { isCanceled: false };
|
|
2705
|
+
spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
|
|
2706
|
+
spawned.cancel = spawnedCancel.bind(null, spawned, context);
|
|
2707
|
+
const handlePromise = async () => {
|
|
2708
|
+
const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
|
|
2709
|
+
const stdout = handleOutput(parsed.options, stdoutResult);
|
|
2710
|
+
const stderr = handleOutput(parsed.options, stderrResult);
|
|
2711
|
+
const all = handleOutput(parsed.options, allResult);
|
|
2712
|
+
if (error || exitCode !== 0 || signal !== null) {
|
|
2713
|
+
const returnedError = makeError({
|
|
2714
|
+
error,
|
|
2715
|
+
exitCode,
|
|
2716
|
+
signal,
|
|
2717
|
+
stdout,
|
|
2718
|
+
stderr,
|
|
2719
|
+
all,
|
|
2720
|
+
command,
|
|
2721
|
+
escapedCommand,
|
|
2722
|
+
parsed,
|
|
2723
|
+
timedOut,
|
|
2724
|
+
isCanceled: context.isCanceled,
|
|
2725
|
+
killed: spawned.killed
|
|
2726
|
+
});
|
|
2727
|
+
if (!parsed.options.reject) {
|
|
2728
|
+
return returnedError;
|
|
2729
|
+
}
|
|
2730
|
+
throw returnedError;
|
|
2731
|
+
}
|
|
2732
|
+
return {
|
|
2733
|
+
command,
|
|
2734
|
+
escapedCommand,
|
|
2735
|
+
exitCode: 0,
|
|
2736
|
+
stdout,
|
|
2737
|
+
stderr,
|
|
2738
|
+
all,
|
|
2739
|
+
failed: false,
|
|
2740
|
+
timedOut: false,
|
|
2741
|
+
isCanceled: false,
|
|
2742
|
+
killed: false
|
|
2743
|
+
};
|
|
2744
|
+
};
|
|
2745
|
+
const handlePromiseOnce = onetime(handlePromise);
|
|
2746
|
+
handleInput(spawned, parsed.options.input);
|
|
2747
|
+
spawned.all = makeAllStream(spawned, parsed.options);
|
|
2748
|
+
return mergePromise(spawned, handlePromiseOnce);
|
|
2749
|
+
};
|
|
2750
|
+
module2.exports = execa2;
|
|
2751
|
+
module2.exports.sync = (file, args, options) => {
|
|
2752
|
+
const parsed = handleArguments(file, args, options);
|
|
2753
|
+
const command = joinCommand(file, args);
|
|
2754
|
+
const escapedCommand = getEscapedCommand(file, args);
|
|
2755
|
+
validateInputSync(parsed.options);
|
|
2756
|
+
let result;
|
|
2757
|
+
try {
|
|
2758
|
+
result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
|
|
2759
|
+
} catch (error) {
|
|
2760
|
+
throw makeError({
|
|
2761
|
+
error,
|
|
2762
|
+
stdout: "",
|
|
2763
|
+
stderr: "",
|
|
2764
|
+
all: "",
|
|
2765
|
+
command,
|
|
2766
|
+
escapedCommand,
|
|
2767
|
+
parsed,
|
|
2768
|
+
timedOut: false,
|
|
2769
|
+
isCanceled: false,
|
|
2770
|
+
killed: false
|
|
2771
|
+
});
|
|
2772
|
+
}
|
|
2773
|
+
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
|
2774
|
+
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
|
2775
|
+
if (result.error || result.status !== 0 || result.signal !== null) {
|
|
2776
|
+
const error = makeError({
|
|
2777
|
+
stdout,
|
|
2778
|
+
stderr,
|
|
2779
|
+
error: result.error,
|
|
2780
|
+
signal: result.signal,
|
|
2781
|
+
exitCode: result.status,
|
|
2782
|
+
command,
|
|
2783
|
+
escapedCommand,
|
|
2784
|
+
parsed,
|
|
2785
|
+
timedOut: result.error && result.error.code === "ETIMEDOUT",
|
|
2786
|
+
isCanceled: false,
|
|
2787
|
+
killed: result.signal !== null
|
|
2788
|
+
});
|
|
2789
|
+
if (!parsed.options.reject) {
|
|
2790
|
+
return error;
|
|
2791
|
+
}
|
|
2792
|
+
throw error;
|
|
2793
|
+
}
|
|
2794
|
+
return {
|
|
2795
|
+
command,
|
|
2796
|
+
escapedCommand,
|
|
2797
|
+
exitCode: 0,
|
|
2798
|
+
stdout,
|
|
2799
|
+
stderr,
|
|
2800
|
+
failed: false,
|
|
2801
|
+
timedOut: false,
|
|
2802
|
+
isCanceled: false,
|
|
2803
|
+
killed: false
|
|
2804
|
+
};
|
|
2805
|
+
};
|
|
2806
|
+
module2.exports.command = (command, options) => {
|
|
2807
|
+
const [file, ...args] = parseCommand(command);
|
|
2808
|
+
return execa2(file, args, options);
|
|
2809
|
+
};
|
|
2810
|
+
module2.exports.commandSync = (command, options) => {
|
|
2811
|
+
const [file, ...args] = parseCommand(command);
|
|
2812
|
+
return execa2.sync(file, args, options);
|
|
2813
|
+
};
|
|
2814
|
+
module2.exports.node = (scriptPath, args, options = {}) => {
|
|
2815
|
+
if (args && !Array.isArray(args) && typeof args === "object") {
|
|
2816
|
+
options = args;
|
|
2817
|
+
args = [];
|
|
2818
|
+
}
|
|
2819
|
+
const stdio = normalizeStdio.node(options);
|
|
2820
|
+
const defaultExecArgv = process.execArgv.filter((arg) => !arg.startsWith("--inspect"));
|
|
2821
|
+
const {
|
|
2822
|
+
nodePath = process.execPath,
|
|
2823
|
+
nodeOptions = defaultExecArgv
|
|
2824
|
+
} = options;
|
|
2825
|
+
return execa2(
|
|
2826
|
+
nodePath,
|
|
2827
|
+
[
|
|
2828
|
+
...nodeOptions,
|
|
2829
|
+
scriptPath,
|
|
2830
|
+
...Array.isArray(args) ? args : []
|
|
2831
|
+
],
|
|
2832
|
+
{
|
|
2833
|
+
...options,
|
|
2834
|
+
stdin: void 0,
|
|
2835
|
+
stdout: void 0,
|
|
2836
|
+
stderr: void 0,
|
|
2837
|
+
stdio,
|
|
2838
|
+
shell: false
|
|
2839
|
+
}
|
|
2840
|
+
);
|
|
2841
|
+
};
|
|
2842
|
+
}
|
|
2843
|
+
});
|
|
2844
|
+
|
|
2845
|
+
// ../cli/ai/lib/baml_client/async_request.js
|
|
2846
|
+
var import_baml, AsyncHttpRequest, AsyncHttpStreamRequest;
|
|
2847
|
+
var init_async_request = __esm({
|
|
2848
|
+
"../cli/ai/lib/baml_client/async_request.js"() {
|
|
2849
|
+
"use strict";
|
|
2850
|
+
import_baml = require("@boundaryml/baml");
|
|
2851
|
+
AsyncHttpRequest = class {
|
|
2852
|
+
runtime;
|
|
2853
|
+
ctxManager;
|
|
2854
|
+
constructor(runtime, ctxManager) {
|
|
2855
|
+
this.runtime = runtime;
|
|
2856
|
+
this.ctxManager = ctxManager;
|
|
2857
|
+
}
|
|
2858
|
+
async AnalyzeSdkDiff(diff, language, previous_version, prior_changelog, spec_commit_message, __baml_options__) {
|
|
2859
|
+
try {
|
|
2860
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
2861
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
2862
|
+
let __clientRegistry__ = __baml_options__?.clientRegistry;
|
|
2863
|
+
if (__baml_options__?.client) {
|
|
2864
|
+
__clientRegistry__ = __clientRegistry__ || new import_baml.ClientRegistry();
|
|
2865
|
+
__clientRegistry__.setPrimary(__baml_options__.client);
|
|
2866
|
+
}
|
|
2867
|
+
return await this.runtime.buildRequest("AnalyzeSdkDiff", {
|
|
2868
|
+
"diff": diff,
|
|
2869
|
+
"language": language,
|
|
2870
|
+
"previous_version": previous_version,
|
|
2871
|
+
"prior_changelog": prior_changelog,
|
|
2872
|
+
"spec_commit_message": spec_commit_message
|
|
2873
|
+
}, this.ctxManager.cloneContext(), __baml_options__?.tb?.__tb(), __clientRegistry__, false, __env__);
|
|
2874
|
+
} catch (error) {
|
|
2875
|
+
throw (0, import_baml.toBamlError)(error);
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
async ConsolidateChangelog(raw_entries, version_bump, language, previous_version, new_version, __baml_options__) {
|
|
2879
|
+
try {
|
|
2880
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
2881
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
2882
|
+
let __clientRegistry__ = __baml_options__?.clientRegistry;
|
|
2883
|
+
if (__baml_options__?.client) {
|
|
2884
|
+
__clientRegistry__ = __clientRegistry__ || new import_baml.ClientRegistry();
|
|
2885
|
+
__clientRegistry__.setPrimary(__baml_options__.client);
|
|
2886
|
+
}
|
|
2887
|
+
return await this.runtime.buildRequest("ConsolidateChangelog", {
|
|
2888
|
+
"raw_entries": raw_entries,
|
|
2889
|
+
"version_bump": version_bump,
|
|
2890
|
+
"language": language,
|
|
2891
|
+
"previous_version": previous_version,
|
|
2892
|
+
"new_version": new_version
|
|
2893
|
+
}, this.ctxManager.cloneContext(), __baml_options__?.tb?.__tb(), __clientRegistry__, false, __env__);
|
|
2894
|
+
} catch (error) {
|
|
2895
|
+
throw (0, import_baml.toBamlError)(error);
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
};
|
|
2899
|
+
AsyncHttpStreamRequest = class {
|
|
2900
|
+
runtime;
|
|
2901
|
+
ctxManager;
|
|
2902
|
+
constructor(runtime, ctxManager) {
|
|
2903
|
+
this.runtime = runtime;
|
|
2904
|
+
this.ctxManager = ctxManager;
|
|
2905
|
+
}
|
|
2906
|
+
async AnalyzeSdkDiff(diff, language, previous_version, prior_changelog, spec_commit_message, __baml_options__) {
|
|
2907
|
+
try {
|
|
2908
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
2909
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
2910
|
+
let __clientRegistry__ = __baml_options__?.clientRegistry;
|
|
2911
|
+
if (__baml_options__?.client) {
|
|
2912
|
+
__clientRegistry__ = __clientRegistry__ || new import_baml.ClientRegistry();
|
|
2913
|
+
__clientRegistry__.setPrimary(__baml_options__.client);
|
|
2914
|
+
}
|
|
2915
|
+
return await this.runtime.buildRequest("AnalyzeSdkDiff", {
|
|
2916
|
+
"diff": diff,
|
|
2917
|
+
"language": language,
|
|
2918
|
+
"previous_version": previous_version,
|
|
2919
|
+
"prior_changelog": prior_changelog,
|
|
2920
|
+
"spec_commit_message": spec_commit_message
|
|
2921
|
+
}, this.ctxManager.cloneContext(), __baml_options__?.tb?.__tb(), __clientRegistry__, true, __env__);
|
|
2922
|
+
} catch (error) {
|
|
2923
|
+
throw (0, import_baml.toBamlError)(error);
|
|
2924
|
+
}
|
|
2925
|
+
}
|
|
2926
|
+
async ConsolidateChangelog(raw_entries, version_bump, language, previous_version, new_version, __baml_options__) {
|
|
2927
|
+
try {
|
|
2928
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
2929
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
2930
|
+
let __clientRegistry__ = __baml_options__?.clientRegistry;
|
|
2931
|
+
if (__baml_options__?.client) {
|
|
2932
|
+
__clientRegistry__ = __clientRegistry__ || new import_baml.ClientRegistry();
|
|
2933
|
+
__clientRegistry__.setPrimary(__baml_options__.client);
|
|
2934
|
+
}
|
|
2935
|
+
return await this.runtime.buildRequest("ConsolidateChangelog", {
|
|
2936
|
+
"raw_entries": raw_entries,
|
|
2937
|
+
"version_bump": version_bump,
|
|
2938
|
+
"language": language,
|
|
2939
|
+
"previous_version": previous_version,
|
|
2940
|
+
"new_version": new_version
|
|
2941
|
+
}, this.ctxManager.cloneContext(), __baml_options__?.tb?.__tb(), __clientRegistry__, true, __env__);
|
|
2942
|
+
} catch (error) {
|
|
2943
|
+
throw (0, import_baml.toBamlError)(error);
|
|
2944
|
+
}
|
|
712
2945
|
}
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
2946
|
+
};
|
|
2947
|
+
}
|
|
2948
|
+
});
|
|
2949
|
+
|
|
2950
|
+
// ../cli/ai/lib/baml_client/parser.js
|
|
2951
|
+
var import_baml2, LlmResponseParser, LlmStreamParser;
|
|
2952
|
+
var init_parser = __esm({
|
|
2953
|
+
"../cli/ai/lib/baml_client/parser.js"() {
|
|
2954
|
+
"use strict";
|
|
2955
|
+
import_baml2 = require("@boundaryml/baml");
|
|
2956
|
+
LlmResponseParser = class {
|
|
2957
|
+
runtime;
|
|
2958
|
+
ctxManager;
|
|
2959
|
+
constructor(runtime, ctxManager) {
|
|
2960
|
+
this.runtime = runtime;
|
|
2961
|
+
this.ctxManager = ctxManager;
|
|
2962
|
+
}
|
|
2963
|
+
AnalyzeSdkDiff(llmResponse, __baml_options__) {
|
|
2964
|
+
try {
|
|
2965
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
2966
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
2967
|
+
return this.runtime.parseLlmResponse("AnalyzeSdkDiff", llmResponse, false, this.ctxManager.cloneContext(), __baml_options__?.tb?.__tb(), __baml_options__?.clientRegistry, __env__);
|
|
2968
|
+
} catch (error) {
|
|
2969
|
+
throw (0, import_baml2.toBamlError)(error);
|
|
2970
|
+
}
|
|
729
2971
|
}
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
2972
|
+
ConsolidateChangelog(llmResponse, __baml_options__) {
|
|
2973
|
+
try {
|
|
2974
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
2975
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
2976
|
+
return this.runtime.parseLlmResponse("ConsolidateChangelog", llmResponse, false, this.ctxManager.cloneContext(), __baml_options__?.tb?.__tb(), __baml_options__?.clientRegistry, __env__);
|
|
2977
|
+
} catch (error) {
|
|
2978
|
+
throw (0, import_baml2.toBamlError)(error);
|
|
2979
|
+
}
|
|
734
2980
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
process.env.DEBUG = namespaces;
|
|
743
|
-
} else {
|
|
744
|
-
delete process.env.DEBUG;
|
|
2981
|
+
};
|
|
2982
|
+
LlmStreamParser = class {
|
|
2983
|
+
runtime;
|
|
2984
|
+
ctxManager;
|
|
2985
|
+
constructor(runtime, ctxManager) {
|
|
2986
|
+
this.runtime = runtime;
|
|
2987
|
+
this.ctxManager = ctxManager;
|
|
745
2988
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
2989
|
+
AnalyzeSdkDiff(llmResponse, __baml_options__) {
|
|
2990
|
+
try {
|
|
2991
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
2992
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
2993
|
+
return this.runtime.parseLlmResponse("AnalyzeSdkDiff", llmResponse, true, this.ctxManager.cloneContext(), __baml_options__?.tb?.__tb(), __baml_options__?.clientRegistry, __env__);
|
|
2994
|
+
} catch (error) {
|
|
2995
|
+
throw (0, import_baml2.toBamlError)(error);
|
|
2996
|
+
}
|
|
2997
|
+
}
|
|
2998
|
+
ConsolidateChangelog(llmResponse, __baml_options__) {
|
|
2999
|
+
try {
|
|
3000
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
3001
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
3002
|
+
return this.runtime.parseLlmResponse("ConsolidateChangelog", llmResponse, true, this.ctxManager.cloneContext(), __baml_options__?.tb?.__tb(), __baml_options__?.clientRegistry, __env__);
|
|
3003
|
+
} catch (error) {
|
|
3004
|
+
throw (0, import_baml2.toBamlError)(error);
|
|
3005
|
+
}
|
|
755
3006
|
}
|
|
756
|
-
}
|
|
757
|
-
module2.exports = require_common()(exports2);
|
|
758
|
-
var { formatters } = module2.exports;
|
|
759
|
-
formatters.o = function(v2) {
|
|
760
|
-
this.inspectOpts.colors = this.useColors;
|
|
761
|
-
return util.inspect(v2, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
762
3007
|
};
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
3008
|
+
}
|
|
3009
|
+
});
|
|
3010
|
+
|
|
3011
|
+
// ../cli/ai/lib/baml_client/inlinedbaml.js
|
|
3012
|
+
var fileMap, getBamlFiles;
|
|
3013
|
+
var init_inlinedbaml = __esm({
|
|
3014
|
+
"../cli/ai/lib/baml_client/inlinedbaml.js"() {
|
|
3015
|
+
"use strict";
|
|
3016
|
+
fileMap = {
|
|
3017
|
+
"diff_analyzer.baml": '// SDK Diff Analyzer\n// Analyzes git diffs of SDK code and produces semantic commit messages and version bumps\n\nenum VersionBump {\n MAJOR\n MINOR\n PATCH\n NO_CHANGE\n}\n\nclass AnalyzeCommitDiffRequest {\n diff string @description("The git diff to analyze for generating a commit message")\n}\n\nclass AnalyzeCommitDiffResponse {\n message string\n @description("Developer-facing git commit message. Use conventional commit format. Reference specific code symbols (function names, class names). Keep summary under 72 chars.")\n\n changelog_entry string\n @description("User-facing release note in Keep a Changelog format. Group under ### Breaking Changes, ### Added, ### Changed, ### Fixed section headers. Bold symbol names, one tight sentence per bullet. Prose only, no code fences. Append migration action inline for breaking changes. Empty string for PATCH.")\n\n version_bump VersionBump\n @description("The recommended semantic version bump: MAJOR for breaking changes, MINOR for new features, PATCH for bug fixes and other changes, NO_CHANGE for empty diffs")\n\n version_bump_reason string\n @description("One sentence explaining WHY this version bump was chosen. For MAJOR: name the specific breaking symbol(s). For MINOR: name the new capability. For PATCH: describe the fix. For NO_CHANGE: \'No functional changes detected.\' Example: \'MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`.\'")\n}\n\n// Main function that analyzes SDK diffs\nfunction AnalyzeSdkDiff(\n diff: string @description("The git diff to analyze"),\n language: string @description("The SDK programming language, e.g. \'typescript\', \'python\', \'java\'"),\n previous_version: string @description("The current published version before this change, e.g. \'1.2.3\'"),\n prior_changelog: string @description("The last 3 changelog entries for this SDK, empty string if none. Use this to match the existing commit message style and understand the versioning pattern."),\n spec_commit_message: string @description("The commit message from the API spec repository that triggered this SDK generation. Use as a hint for the intent of the change, but verify against the actual diff. Empty string if unavailable.")\n) -> AnalyzeCommitDiffResponse {\n client DefaultClient\n\n prompt #"\n You are an expert software engineer analyzing changes to generate semantic commit messages.\n\n Analyze the provided git diff and return a structured response with these fields:\n - message: A git commit message formatted like the example below\n - version_bump: One of: MAJOR, MINOR, PATCH, or NO_CHANGE\n\n Version Bump Guidelines:\n - MAJOR: Breaking changes (removed/renamed functions, changed signatures, removed parameters)\n - MINOR: New features that are backward compatible (new functions, new optional parameters).\n Also MINOR: behavioral changes invisible to the public API surface that still affect consumers:\n - Changed HTTP status code handling (e.g. 404 now throws instead of returning null)\n - Changed default parameter values (timeout, retry count, page size, base URL)\n - Changed serialization behavior (date formats, null handling, field ordering)\n - Changed error message text that consumers may depend on\n - Changed HTTP header names or values sent to the server\n - Changed retry or backoff behavior (different retry counts, delay strategies)\n - PATCH: Bug fixes, documentation, internal refactoring with no observable behavioral change\n - NO_CHANGE: The diff is empty\n\n --- Examples ---\n\n Examples of correct classifications:\n\n --- MAJOR: removed exported TypeScript function ---\n diff --git a/src/api/client.ts b/src/api/client.ts\n -export async function getUser(id: string): Promise<User> {\n - return this.request("GET", `/users/${id}`);\n -}\n version_bump: MAJOR\n reason: Existing callers of getUser() will get a compile error.\n\n --- MAJOR: removed Python public method ---\n diff --git a/vital/client.py b/vital/client.py\n - def get_user(self, user_id: str) -> User:\n - return self._request("GET", f"/users/{user_id}")\n version_bump: MAJOR\n reason: Existing callers crash with AttributeError.\n\n --- MINOR: new optional TypeScript parameter ---\n diff --git a/src/api/client.ts b/src/api/client.ts\n -async createUser(name: string): Promise<User>\n +async createUser(name: string, role?: UserRole): Promise<User>\n version_bump: MINOR\n reason: Existing callers unaffected \u2014 new parameter is optional.\n\n --- MINOR: new Java public method ---\n diff --git a/src/.../UsersClient.java b/src/.../UsersClient.java\n + public CompletableFuture<User> getUserAsync(String userId) {\n + return this.httpClient.sendAsync(...);\n + }\n version_bump: MINOR\n reason: New capability added, nothing removed or changed.\n\n --- MINOR: changed default retry count ---\n diff --git a/src/core/http_client.py b/src/core/http_client.py\n -MAX_RETRIES = 3\n +MAX_RETRIES = 5\n version_bump: MINOR\n reason: Changed default retry count \u2014 existing consumers will experience different retry behavior.\n\n --- PATCH: Go import reorganization ---\n diff --git a/client.go b/client.go\n -import "fmt"\n -import "net/http"\n +import (\n + "fmt"\n + "net/http"\n +)\n version_bump: PATCH\n reason: Formatting change only, no functional difference.\n\n --- End Examples ---\n\n {% if language == "typescript" %}\n Language-specific breaking change rules for TypeScript:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, function, or exported symbol is MAJOR\n - Making a response field optional is MAJOR (type changes from T to T | undefined, breaking existing property access without null checks)\n - Changing a method return type (e.g. Promise<T> to Promise<T | undefined>, or T to T | null) is MAJOR\n - New enum values are MAJOR if the SDK generates exhaustive switch/if-else chains (callers get compile errors on unhandled cases)\n - Changing a union type (adding/removing variants) is MAJOR if callers use exhaustive type narrowing or discriminated unions\n - Adding a new required property to a request/input type is MAJOR (existing callers won\'t compile)\n - Removing or renaming an exported type, interface, or type alias is MAJOR\n - Changing the type of an existing property (e.g. string to number, or string to string[]) is MAJOR\n - Changing a generic type parameter constraint (e.g. <T extends Foo> to <T extends Bar>) is MAJOR\n - Converting a synchronous method to async (or vice versa) is MAJOR (changes return type to Promise<T>)\n - Removing a default export or switching between default and named exports is MAJOR\n - Changing the structure of a discriminated union (e.g. changing the discriminant field name) is MAJOR\n - Removing or renaming environment/server URL constants is MAJOR\n - Changing the constructor signature of a client class (adding required params) is MAJOR\n - Narrowing a parameter type (e.g. string | number to string) is MAJOR (callers passing number break)\n\n MINOR (backward-compatible additions):\n - Adding a new optional parameter to a function is MINOR\n - Adding new exported types, interfaces, or classes is MINOR\n - Adding new methods to an existing client class is MINOR\n - Adding new optional properties to request types is MINOR\n - Adding new enum values when NOT used in exhaustive checks is MINOR\n - Adding new environment/server URL constants is MINOR\n - Widening a parameter type (e.g. string to string | number) is MINOR\n - Adding new re-exports from index files is MINOR\n - Adding new error types or exception classes is MINOR\n - Adding new RequestOptions fields (e.g. timeout, retries) is MINOR\n - Deprecating (but not removing) a public API is MINOR\n\n PATCH (no API surface change):\n - Changes to internal/private modules (core/, _internal/, utils/) are PATCH\n - Reordering imports, formatting, or comment changes are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) is PATCH\n - Refactoring HTTP client internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in package.json is PATCH\n - Adding or modifying JSDoc/TSDoc comments is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to .npmignore, tsconfig.json, or build configuration are PATCH\n - Updating serialization/deserialization logic that preserves the same public types is PATCH\n\n {% elif language == "python" %}\n Language-specific breaking change rules for Python:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, or function is always MAJOR\n - Adding a new required parameter to a public method is MAJOR (callers get TypeError)\n - Renaming a parameter in a public method is MAJOR if callers use keyword arguments\n - Removing a parameter from a public method signature is MAJOR\n - Changing the type of a parameter from one concrete type to an incompatible one is MAJOR\n - Changing exception types raised by a method (callers catching specific exceptions break) is MAJOR\n - Removing or renaming a public module or subpackage is MAJOR (import statements break)\n - Moving a public class/function to a different module without re-exporting from the original is MAJOR\n - Changing a class from inheriting one base to another when callers use isinstance() checks is MAJOR\n - Removing a public class attribute or property is MAJOR\n\n MINOR (backward-compatible additions):\n - Making a response field optional is usually MINOR (Python uses None propagation; callers rarely type-check strictly)\n - New enum values are MINOR (unknown values are handled gracefully with string fallbacks)\n - Changing a return type from a concrete type to Optional is MINOR (duck typing absorbs this)\n - Adding new public methods, classes, or modules is MINOR\n - Adding new optional parameters (with defaults) is MINOR\n - Adding new optional fields to Pydantic models is MINOR\n - Adding new exception/error classes is MINOR\n - Adding new class attributes or properties is MINOR\n - Adding new type overloads (@overload decorator) is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. timeout, max_retries) is MINOR\n - Deprecating (but not removing) a public API is MINOR\n - Widening a type annotation (e.g. str to Union[str, int]) is MINOR\n\n PATCH (no API surface change):\n - Changes to private methods (prefixed with _) are PATCH\n - Changes to type hints only (no runtime effect) are PATCH\n - Reformatting, docstring updates, or comment changes are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) are PATCH\n - Refactoring httpx/requests client internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in pyproject.toml/setup.py is PATCH\n - Updating serialization/deserialization logic that preserves the same public types is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to __init__.py that don\'t alter public re-exports are PATCH\n - Changes to conftest.py, test files, or CI configuration are PATCH\n\n {% elif language == "java" %}\n Language-specific breaking change rules for Java:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, or interface is always MAJOR\n - Making a response field optional (e.g. T to Optional<T>) is MAJOR (callers must handle Optional unwrapping)\n - New enum values are MAJOR if the SDK generates exhaustive switch statements\n - Adding a new required parameter to a public method is MAJOR\n - Changing a method\'s return type is MAJOR (even if compatible at runtime, recompilation fails)\n - Removing or changing a public static final constant is MAJOR\n - Changing a class from concrete to abstract (or vice versa) is MAJOR\n - Changing the checked exceptions declared in a throws clause is MAJOR\n - Removing a public constructor or changing its parameter list is MAJOR\n - Removing an interface that a public class implements is MAJOR\n - Changing generic type parameters on a public class (e.g. Foo<T> to Foo<T, U>) is MAJOR\n - Moving a public class to a different package without re-exporting is MAJOR\n - Narrowing a parameter type (e.g. Object to String) is MAJOR\n - Making a non-final class final is MAJOR (breaks subclassing)\n - Changing the type of a builder method parameter is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new overloaded methods is MINOR\n - Adding new public classes or interfaces is MINOR\n - Adding new optional builder methods is MINOR\n - Adding new enum values when NOT used in exhaustive switch statements is MINOR\n - Adding new optional fields to request objects is MINOR\n - Adding new exception/error classes is MINOR\n - Adding new static utility methods is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. timeout, retries) is MINOR\n - Widening a parameter type (e.g. String to Object) is MINOR\n - Adding default methods to interfaces (Java 8+) is MINOR\n - Deprecating (but not removing) public APIs with @Deprecated is MINOR\n\n PATCH (no API surface change):\n - Changes to package-private or private methods are PATCH\n - Changes to annotations (other than public API annotations), Javadoc, or formatting are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) is PATCH\n - Refactoring OkHttp/HttpClient internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in build.gradle/pom.xml is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization logic (Jackson/Gson config) that preserves public types is PATCH\n - Changes to test files, CI configuration, or build scripts are PATCH\n\n {% elif language == "go" %}\n Language-specific breaking change rules for Go:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming an exported function, method, or type is always MAJOR\n - Making a response field a pointer type (e.g. string to *string) is MAJOR (callers must dereference)\n - Changing a function signature (adding/removing parameters or return values) is MAJOR (Go has no overloading)\n - Removing or renaming an exported struct field is MAJOR\n - Changing the type of an exported struct field is MAJOR\n - Removing or renaming an exported constant or variable is MAJOR\n - Changing an interface by adding methods is MAJOR (all implementations must add the method)\n - Removing a method from an interface is MAJOR (callers using that method break)\n - Changing a function\'s return type(s) is MAJOR (Go is strict about return types)\n - Changing a variadic parameter to non-variadic (or vice versa) is MAJOR\n - Moving a type/function to a different package without aliasing in the original is MAJOR\n - Changing the receiver type of a method (value receiver to pointer receiver changes method set) is MAJOR\n - Changing an exported error variable\'s type or value is MAJOR (callers using errors.Is break)\n\n MINOR (backward-compatible additions):\n - Adding new exported functions, methods, or types is MINOR\n - New enum-like constants are MINOR (Go enums are not exhaustive by default)\n - Adding new fields to a struct is MINOR (existing code still compiles, zero-value initialization)\n - Making a response field optional (pointer) is usually MINOR if the field was already a struct field\n - Adding new optional function parameters via functional options pattern is MINOR\n - Adding new interface types is MINOR\n - Adding new error types/variables is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOption functions is MINOR\n - Widening a return type from a concrete type to an interface is MINOR (if interface is satisfied)\n - Adding new methods to a concrete type (does not break interface implementations) is MINOR\n\n PATCH (no API surface change):\n - Changes to unexported (lowercase) functions or types are PATCH\n - Changes to go.mod dependencies, import reordering, or formatting are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) is PATCH\n - Refactoring http.Client internals without changing observable defaults or behavior is PATCH\n - Updating serialization/deserialization logic (JSON tags, encoding) that preserves identical output is PATCH\n - Refactoring internal implementation without changing exported signatures is PATCH\n - Changes to *_test.go files, Makefile, or CI configuration are PATCH\n - Updating comments, godoc, or code formatting (gofmt) is PATCH\n\n {% elif language == "ruby" %}\n Language-specific breaking change rules for Ruby:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public method is MAJOR (callers get NoMethodError)\n - Adding a new required positional parameter is MAJOR\n - Removing a method parameter is MAJOR (callers passing that argument get ArgumentError)\n - Changing the order of positional parameters is MAJOR\n - Removing or renaming a public class or module is MAJOR (callers get NameError)\n - Changing a method from instance to class method (or vice versa) is MAJOR\n - Changing the return type in a breaking way (e.g. returning nil where an object was expected and callers chain methods) is MAJOR\n - Removing a public constant is MAJOR\n - Changing exception types raised by a method is MAJOR (callers rescuing specific exceptions break)\n\n MINOR (backward-compatible additions):\n - Making a response field optional is usually MINOR (Ruby uses nil propagation; callers rarely type-check)\n - New enum values are MINOR (unknown values are handled gracefully)\n - Adding new optional keyword parameters (with defaults) is MINOR\n - Adding new public methods or classes is MINOR\n - Adding new optional fields to response/request objects is MINOR\n - Adding new exception/error classes is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. timeout, max_retries) is MINOR\n - Deprecating (but not removing) a public API is MINOR\n - Adding new modules or mixins is MINOR\n\n PATCH (no API surface change):\n - Changes to private methods are PATCH\n - Gemspec metadata, comment, or formatting changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring Faraday/Net::HTTP internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in Gemfile/gemspec is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to test files, Rakefile, or CI configuration are PATCH\n\n {% elif language == "csharp" %}\n Language-specific breaking change rules for C#:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, property, or interface is always MAJOR\n - Making a response field nullable (e.g. T to T?) is MAJOR (callers must handle null checks)\n - New enum values are MAJOR if the SDK generates exhaustive switch expressions\n - Adding a new required parameter to a public method is MAJOR\n - Changing a method\'s return type is MAJOR\n - Removing or changing a public constant or static readonly field is MAJOR\n - Changing a class from non-sealed to sealed (or abstract to concrete) is MAJOR\n - Changing the base class of a public class is MAJOR\n - Removing an interface implementation from a public class is MAJOR\n - Changing generic type constraints on a public class or method is MAJOR\n - Moving a public type to a different namespace without type forwarding is MAJOR\n - Changing property from read-write to read-only (removing setter) is MAJOR\n - Changing async method to sync (Task<T> to T) or vice versa is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public classes, interfaces, or methods is MINOR\n - Adding new optional parameters (with default values) is MINOR\n - Adding new overloaded methods is MINOR\n - Adding new enum values when NOT used in exhaustive switch expressions is MINOR\n - Adding new optional properties to request objects is MINOR\n - Adding new exception types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. Timeout, MaxRetries) is MINOR\n - Adding new extension methods is MINOR\n - Deprecating (but not removing) public APIs with [Obsolete] is MINOR\n\n PATCH (no API surface change):\n - Changes to internal or private members are PATCH\n - XML doc comments, formatting, or namespace reorganization are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring HttpClient internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in .csproj is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization (System.Text.Json/Newtonsoft) config that preserves public types is PATCH\n - Changes to test files, .sln, or CI configuration are PATCH\n\n {% elif language == "php" %}\n Language-specific breaking change rules for PHP:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public method or class is always MAJOR\n - Changing a method signature (adding required parameters) is MAJOR\n - Removing a method parameter is MAJOR\n - Changing the type declaration of a parameter to an incompatible type is MAJOR\n - Removing or renaming a public constant is MAJOR\n - Changing a class from non-final to final is MAJOR (breaks extension)\n - Removing an interface implementation from a public class is MAJOR\n - Changing the return type declaration to an incompatible type is MAJOR\n - Moving a class to a different namespace without aliasing is MAJOR\n - Changing exception types thrown by a method is MAJOR\n\n MINOR (backward-compatible additions):\n - Making a response field nullable is MINOR in most cases (PHP is dynamically typed)\n - Adding new optional parameters (with defaults) is MINOR\n - Adding new public classes or methods is MINOR\n - New enum cases are usually MINOR (PHP enums are not typically used in exhaustive matches)\n - Adding new optional fields to request/response objects is MINOR\n - Adding new exception classes is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new traits or interfaces is MINOR\n - Adding new RequestOptions fields is MINOR\n - Deprecating (but not removing) public APIs is MINOR\n\n PATCH (no API surface change):\n - Changes to private/protected methods are PATCH\n - PHPDoc, formatting, or composer.json metadata changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring Guzzle/cURL internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in composer.json is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to test files, phpunit.xml, or CI configuration are PATCH\n\n {% elif language == "swift" %}\n Language-specific breaking change rules for Swift:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public method, property, or type is always MAJOR\n - Making a response field optional (T to T?) is MAJOR (callers must unwrap with if-let/guard)\n - New enum cases are MAJOR (Swift switch statements must be exhaustive unless using default)\n - Adding a new required parameter to a public method is MAJOR\n - Changing the type of a public property is MAJOR\n - Removing or changing a public protocol requirement is MAJOR\n - Removing protocol conformance from a public type is MAJOR\n - Changing a struct to a class (or vice versa) is MAJOR (value vs reference semantics)\n - Making a public initializer failable (init to init?) or vice versa is MAJOR\n - Changing the associated values of an enum case is MAJOR\n - Removing a public typealias is MAJOR\n - Changing access level from public to internal/private is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public types, methods, or properties is MINOR\n - Adding new optional parameters (with default values) is MINOR\n - Adding new enum cases when callers use default in switch is MINOR\n - Adding new protocol extensions with default implementations is MINOR\n - Adding new optional fields to request/response structs is MINOR\n - Adding new error types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields is MINOR\n - Adding new convenience initializers is MINOR\n - Deprecating (but not removing) public APIs with @available(*, deprecated) is MINOR\n\n PATCH (no API surface change):\n - Changes to internal or private members are PATCH\n - Formatting, comments, or documentation changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring URLSession internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in Package.swift is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to test files, xcconfig, or CI configuration are PATCH\n\n {% elif language == "rust" %}\n Language-specific breaking change rules for Rust:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public function, struct, enum, or trait is always MAJOR\n - Making a response field optional (T to Option<T>) is MAJOR (callers must handle the Option)\n - New enum variants are MAJOR (Rust match statements must be exhaustive unless using _ wildcard)\n - Adding a new required field to a public struct is MAJOR (unless #[non_exhaustive])\n - Removing a public trait implementation is MAJOR\n - Changing a function\'s return type is MAJOR\n - Adding a required method to a public trait is MAJOR (all implementations must add it)\n - Changing the type of a public struct field is MAJOR\n - Removing or renaming a public module is MAJOR\n - Making a public type private (pub to pub(crate) or removing pub) is MAJOR\n - Changing a struct from non-exhaustive to exhaustive construction (removing .. Default::default()) is MAJOR\n - Changing generic type parameters or their bounds on public types is MAJOR\n - Changing from Result<T, E1> to Result<T, E2> where E2 is a different error type is MAJOR\n - Removing a public constant or static is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public functions, structs, or enums is MINOR\n - Adding new optional fields to #[non_exhaustive] structs is MINOR\n - Adding new enum variants to #[non_exhaustive] enums is MINOR\n - Adding new trait implementations for existing types is MINOR\n - Adding new public constants or statics is MINOR\n - Adding new methods to existing impl blocks is MINOR\n - Adding new error types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields is MINOR\n - Adding new optional builder methods is MINOR\n - Deprecating (but not removing) public APIs with #[deprecated] is MINOR\n\n PATCH (no API surface change):\n - Changes to pub(crate) or private items are PATCH\n - Cargo.toml metadata, formatting, or comment changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring reqwest/hyper internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in Cargo.toml is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization (serde) config that preserves public types is PATCH\n - Changes to test files, build.rs, or CI configuration are PATCH\n\n {% elif language == "kotlin" %}\n Language-specific breaking change rules for Kotlin:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public function, class, or property is always MAJOR\n - Making a response field nullable (T to T?) is MAJOR (callers must handle null safety operators)\n - New enum values are MAJOR if used in when() expressions without else branch\n - Adding a new required parameter to a public function is MAJOR\n - Changing a method\'s return type is MAJOR\n - Removing or changing a public constant (const val / companion object val) is MAJOR\n - Changing a class from open to final (or data class to regular class) is MAJOR\n - Removing an interface implementation from a public class is MAJOR\n - Changing generic type parameters or their variance (in/out) on public types is MAJOR\n - Moving a public class to a different package without type aliasing is MAJOR\n - Changing a property from var to val (or removing a setter) is MAJOR\n - Changing a suspend function to non-suspend (or vice versa) is MAJOR\n - Changing sealed class/interface hierarchy (removing subclasses) is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public classes, functions, or extension functions is MINOR\n - Adding new optional parameters (with default values) is MINOR\n - Adding new enum values when callers use else in when() is MINOR\n - Adding new optional properties to data classes is MINOR\n - Adding new exception types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields is MINOR\n - Adding new sealed class/interface subtypes is MINOR (if callers have else branch)\n - Deprecating (but not removing) public APIs with @Deprecated is MINOR\n - Adding new companion object functions is MINOR\n\n PATCH (no API surface change):\n - Changes to internal or private members are PATCH\n - KDoc, formatting, or build.gradle changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring OkHttp internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in build.gradle.kts is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization (kotlinx.serialization/Moshi) config that preserves public types is PATCH\n - Changes to test files or CI configuration are PATCH\n\n {% else %}\n Language-specific breaking change rules (language: {{ language }}):\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, or function is always MAJOR\n - Making a response field optional is MAJOR in statically-typed languages (TypeScript, Java, C#, Swift, Rust, Kotlin, Go), usually MINOR in dynamically-typed ones (Python, Ruby, PHP)\n - New enum values are MAJOR if the language enforces exhaustive matching (TypeScript, Java, C#, Swift, Rust), MINOR otherwise\n - Adding a new required parameter to a public method is MAJOR\n - Changing a method\'s return type is MAJOR\n - Changing the type of an existing field/property is MAJOR\n - Removing or changing public constants is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public APIs (classes, methods, functions) is MINOR\n - Adding new optional parameters is MINOR\n - Adding new optional fields to request/response objects is MINOR\n - Adding new error/exception types is MINOR\n - Deprecating (but not removing) public APIs is MINOR\n\n PATCH (no API surface change):\n - Internal/private changes are PATCH\n - Formatting, documentation, or comment changes are PATCH\n - Dependency version updates are PATCH\n - SDK version header updates are PATCH\n - Refactoring retry/timeout internals without changing observable defaults or behavior is PATCH\n - Refactoring internals without changing public signatures is PATCH\n {% endif %}\n\n Apply these patterns to the diff below. When in doubt between MINOR and PATCH,\n prefer MINOR. When in doubt between MAJOR and MINOR, examine whether existing\n callers would break without any code changes on their side.\n\n Message Format (use this exact structure):\n ```\n <type>: <short summary>\n\n <detailed description of what changed and why it matters>\n\n Key changes:\n - <change 1>\n - <change 2>\n - <change 3>\n ```\n\n Message Guidelines:\n - The commit type MUST match the version bump:\n - MAJOR \u2192 use "feat!:" prefix (the "!" signals a breaking change per Conventional Commits)\n - MINOR \u2192 use "feat:" prefix\n - PATCH \u2192 use "fix:" or "chore:" prefix (whichever fits the change)\n - NO_CHANGE \u2192 use "chore:" prefix\n - Keep the summary line under 72 characters\n - Write in present tense imperative mood ("add" not "added" or "adds")\n - For MAJOR: the summary MUST name the breaking change (e.g., "feat!: remove parserCreateJob InputStream overloads")\n - For MINOR: the summary should name the new capability\n - For PATCH: describe the fix or improvement\n - Be specific \u2014 do not use generic summaries like "update SDK" or "regenerate SDK"\n - Do not use "Fern regeneration" in commit messages \u2014 use "SDK regeneration" instead\n - NEVER include the literal version "0.0.0-fern-placeholder" in the commit message \u2014 if you see this placeholder\n in the diff, describe changes generically (e.g., "added X-Fern-SDK-Version header")\n - The previous version is provided for context only. Do not include it literally in the summary line.\n\n {% if prior_changelog %}\n Prior changelog entries (for style reference):\n ---\n {{prior_changelog}}\n ---\n Match the tone and format of these entries in your commit message.\n {% endif %}\n\n {% if spec_commit_message %}\n The API spec change that triggered this SDK generation had the following commit message:\n "{{spec_commit_message}}"\n Use this as a hint for understanding the intent of the change, but always verify\n against the actual diff below. The commit message may be vague or inaccurate.\n {% endif %}\n\n Previous version: {{previous_version}}\n SDK language: {{language}}\n\n Git Diff:\n ---\n {{diff}}\n ---\n\n Changelog Entry Guidelines:\n - Write for SDK consumers, not engineers reading the source code\n - Structure the changelog entry using Keep a Changelog section headers, omitting empty sections:\n\n ### Breaking Changes\n - **`symbolName`** \u2014 what broke and how to migrate.\n\n ### Added\n - **`symbolName`** \u2014 what was added, one sentence.\n\n ### Changed\n - **`symbolName`** \u2014 what changed, one sentence.\n\n ### Fixed\n - **`symbolName`** \u2014 what was fixed, one sentence.\n\n - Section mapping to version bumps:\n - MAJOR changes go under ### Breaking Changes\n - MINOR additions go under ### Added\n - MINOR behavioral changes go under ### Changed\n - PATCH fixes go under ### Fixed (or empty string if trivial)\n - **Breaking Changes** section MUST come first when present\n - Bold the symbol name, then a dash, then one tight sentence\n - No code fences in the changelog \u2014 prose and backtick-wrapped symbols only\n - One line per change, no multi-line bullets\n - For Breaking Changes: name the exact symbol, explain what broke, and give a one-line migration\n Example: "- **`parserCreateJob`** now accepts `File[]` instead of `File`. Wrap single files in an array: `parserCreateJob([file], request)`."\n - For Added: name the new capability in one sentence\n Example: "- **`LabAccountClient`** for managing team lab accounts."\n - Describe patterns once, not per-file. If the same method was added to 50 classes,\n write ONE entry: "- **`additionalProperty()`** and **`additionalProperties()`** builder methods on all request types."\n Do NOT write 50 separate entries.\n - NEVER silently drop a category of change. If new enum values were added, new clients were introduced,\n or fields were removed, each *category* must appear \u2014 but you don\'t need to list every individual value.\n GOOD: "- **New enum values** added across several types including `ProviderType` and `OrderStatus`."\n BAD: listing every enum value\n - PATCH: leave empty string \u2014 patch changes don\'t warrant changelog entries\n - Do not use conventional commit prefixes (no "feat:", "fix:", etc.)\n - Write in third person present tense\n - Prefer fewer, richer entries over many thin ones. Aim for 3-5 entries per chunk by grouping related changes.\n - IMPORTANT: Wrap type references containing angle brackets in backticks (e.g., `Optional<String>`)\n - **5-line limit per section**: Each section (### Breaking Changes, ### Added, ### Changed, ### Fixed)\n MUST have at most 5 bullet points. If a section would have more than 5 bullets, keep the 5 most\n important ones and add a final line: "- See full changelog for all changes"\n\n Remember again that YOU MUST return a structured JSON response with these four fields:\n - message: A git commit message formatted like the example previously provided\n - changelog_entry: A user-facing release note (empty string for PATCH)\n - version_bump: One of: MAJOR, MINOR, PATCH, or NO_CHANGE\n - version_bump_reason: One sentence explaining WHY this bump level was chosen.\n For MAJOR, name the specific breaking symbol(s) and explain why existing callers break.\n For MINOR, name the new capability added.\n For PATCH, describe what was fixed or improved.\n For NO_CHANGE, say "No functional changes detected."\n Example: "MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`, breaking existing callers."\n "#\n}\n\nclass ConsolidateChangelogResponse {\n consolidated_changelog string\n @description("CHANGELOG.md entry in Keep a Changelog format. Group under ### Breaking Changes, ### Added, ### Changed, ### Fixed. Bold symbol names, one tight sentence per bullet. Prose only, no code fences. Append migration action inline for breaking changes.")\n\n pr_description string\n @description("PR description with ## Breaking Changes section (if any) containing ### per breaking change with Before/After code fences and Migration line, then ## What\'s New section summarizing features in prose paragraphs grouped by theme. Do NOT list every class individually \u2014 summarize repetitive changes as a single entry.")\n\n version_bump_reason string\n @description("One sentence explaining WHY the overall version bump was chosen. For MAJOR: name the specific breaking symbol(s). For MINOR: name the new capability. For PATCH: describe the fix. Example: \'MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`.\'")\n}\n\nfunction ConsolidateChangelog(\n raw_entries: string @description("Newline-separated raw changelog entries from chunked diff analysis"),\n version_bump: string @description("The overall version bump: MAJOR, MINOR, or PATCH"),\n language: string @description("The SDK programming language, e.g. \'typescript\', \'python\', \'java\'"),\n previous_version: string @description("The previous SDK version before this change, e.g. \'1.2.3\'. Empty string if unknown."),\n new_version: string @description("The new SDK version after this change, e.g. \'1.3.0\'. Empty string if unknown.")\n) -> ConsolidateChangelogResponse {\n client DefaultClient\n\n prompt #"\n You are a technical writer producing release notes for a {{language}} SDK.\n\n ## Input\n\n Raw changelog entries from chunked diff analysis (noisy, repetitive):\n ---\n {{raw_entries}}\n ---\n\n Overall version bump: {{version_bump}}\n {% if previous_version %}Previous version: {{previous_version}}{% endif %}\n {% if new_version %}New version: {{new_version}}{% endif %}\n\n ## Deduplication Rules (CRITICAL)\n\n Before writing anything, apply these deduplication rules:\n\n 1. **Pattern collapse**: If the same method/field/type was added/changed/removed across\n multiple classes or files, write ONE bullet summarizing the pattern.\n BAD: "- `additionalProperty()` added to UserRequest" + "- `additionalProperty()` added to OrderRequest" + ... (x15)\n GOOD: "- **`additionalProperty()`** and **`additionalProperties()`** builder methods added to all request and response types"\n\n 2. **Semantic merge**: If multiple entries describe aspects of the same feature, merge them.\n BAD: "- New LabAccountClient" + "- New getTeamLabAccounts method" + "- Lab account management support"\n GOOD: "- **`LabAccountClient`** \u2014 new client for managing team lab accounts with `getTeamLabAccounts()` support"\n\n 3. **No silent drops**: Every *category* of change (new clients, new methods, removed methods,\n new enum values, field type changes, etc.) must be represented in at least one bullet.\n You don\'t need to list every individual value or class \u2014 just acknowledge the category.\n GOOD: "- **New enum values** added across several types including `ProviderType` and `OrderStatus`"\n BAD: Silently omitting that enum values changed at all\n ALSO BAD: Listing every value: `SamsungHealth`, `SonoraQuest`, `Cancelled`, `Processing`, ...\n\n 4. **Prefer concise output**: Aim for 5-15 bullets total. Prioritize breaking changes and new\n capabilities. Bulk additions (builder methods, enum values) get one summary bullet each.\n\n ## Output 1: consolidated_changelog (CHANGELOG.md entry)\n\n Structure it EXACTLY like this, omitting empty sections:\n\n ### Breaking Changes\n - **`symbolName`** \u2014 what broke and how to migrate. Example: replace `foo(file)` with `foo([file])`.\n\n ### Added\n - **`symbolName`** \u2014 what was added, one sentence.\n\n ### Changed\n - **`symbolName`** \u2014 what changed, one sentence.\n\n ### Fixed\n - **`symbolName`** \u2014 what was fixed, one sentence.\n\n Rules:\n - **Breaking Changes** section MUST come first when present\n - Bold the symbol name, then a dash, then one tight sentence\n - No code fences in the changelog \u2014 prose and backtick-wrapped symbols only\n - Aim for 5-15 total bullets. Every *category* of change must be represented, but individual\n values/classes within a category can be summarized (e.g., "new enum values across several types").\n - One line per change, no multi-line bullets\n - **5-line limit per section**: Each section (### Breaking Changes, ### Added, ### Changed, ### Fixed)\n MUST have at most 5 bullet points. If a section would have more than 5 bullets, keep the 5 most\n important ones and add a final line: "- See full changelog for all changes"\n\n ## Output 2: pr_description (PR body)\n\n Do NOT include a version header \u2014 the version header is added separately by the build system.\n\n If version_bump is MAJOR, start with:\n\n ## Breaking Changes\n\n ### `symbolName` \u2014 short description\n **Before:**\n ```{{language}}\n // old usage\n ```\n **After:**\n ```{{language}}\n // new usage\n ```\n **Migration:** One sentence on how to update.\n\n (repeat for each breaking change)\n\n Then:\n\n ## What\'s New\n Brief prose paragraphs grouped by theme. Do NOT list every class \u2014 summarize patterns.\n\n If version_bump is MINOR or PATCH, just use:\n\n ## What\'s New\n Brief prose paragraphs grouped by theme. Do NOT list every class \u2014 summarize patterns.\n\n Rules:\n - Breaking changes section at top with Before/After code examples\n - What\'s New in prose paragraphs, not bullet lists \u2014 group by theme (e.g., "Lab account management", "Builder improvements")\n - Do NOT list every class that got the same method \u2014 summarize as one theme\n - Every *category* of change from the changelog must be mentioned somewhere in the PR description.\n Don\'t enumerate every value \u2014 summarize bulk changes in a sentence.\n\n ## Output 3: version_bump_reason\n\n One sentence explaining WHY the overall version bump ({{version_bump}}) was chosen.\n - For MAJOR: name the specific breaking symbol(s) and explain why existing callers break\n - For MINOR: name the new capability added\n - For PATCH: describe what was fixed or improved\n - Example: "MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`, breaking existing callers that pass InputStream arguments."\n\n {{ ctx.output_format }}\n "#\n}\n',
|
|
3018
|
+
"generators.baml": 'generator target {\n output_type "typescript"\n\n output_dir "../src/"\n\n version "0.219.0"\n\n default_client_mode async\n}\n',
|
|
3019
|
+
"main.baml": "// BAML client configuration for LLM providers\n\n// OpenAI client configuration\nclient<llm> OpenAI {\n provider openai\n options {\n model gpt-4o\n api_key env.OPENAI_API_KEY\n }\n}\n\n// Anthropic client configuration\nclient<llm> Anthropic {\n provider anthropic\n options {\n model claude-sonnet-4-5-20250929\n api_key env.ANTHROPIC_API_KEY\n }\n}\n\n// Bedrock client configuration\nclient<llm> Bedrock {\n provider aws-bedrock\n options {\n model anthropic.claude-3-5-sonnet-20240620-v1:0\n }\n}\n\n// Fallback client that tries multiple providers\n// TODO(tjb9dc): I wish we didn't have to specify this, we're only going to use one at runtime\nclient<llm> DefaultClient {\n provider fallback\n options {\n strategy [\n Anthropic\n OpenAI\n Bedrock\n ]\n }\n}\n"
|
|
3020
|
+
};
|
|
3021
|
+
getBamlFiles = () => {
|
|
3022
|
+
return fileMap;
|
|
766
3023
|
};
|
|
767
3024
|
}
|
|
768
3025
|
});
|
|
769
3026
|
|
|
770
|
-
//
|
|
771
|
-
|
|
772
|
-
|
|
3027
|
+
// ../cli/ai/lib/baml_client/globals.js
|
|
3028
|
+
function resetBamlEnvVars(envVars) {
|
|
3029
|
+
if (DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.allowResets()) {
|
|
3030
|
+
const envVarsToReset = Object.fromEntries(Object.entries(envVars).filter((kv) => kv[1] !== void 0));
|
|
3031
|
+
DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_RUNTIME.reset("baml_src", getBamlFiles(), envVarsToReset);
|
|
3032
|
+
DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.reset();
|
|
3033
|
+
} else {
|
|
3034
|
+
throw new Error("BamlError: Cannot reset BAML environment variables while there are active BAML contexts.");
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
var import_baml3, env, DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_RUNTIME, DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX;
|
|
3038
|
+
var init_globals = __esm({
|
|
3039
|
+
"../cli/ai/lib/baml_client/globals.js"() {
|
|
773
3040
|
"use strict";
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
3041
|
+
import_baml3 = require("@boundaryml/baml");
|
|
3042
|
+
init_inlinedbaml();
|
|
3043
|
+
env = { ...process.env };
|
|
3044
|
+
DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_RUNTIME = import_baml3.BamlRuntime.fromFiles("baml_src", getBamlFiles(), env);
|
|
3045
|
+
DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX = new import_baml3.BamlCtxManager(DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_RUNTIME);
|
|
779
3046
|
}
|
|
780
3047
|
});
|
|
781
3048
|
|
|
782
|
-
//
|
|
783
|
-
var
|
|
784
|
-
|
|
3049
|
+
// ../cli/ai/lib/baml_client/async_client.js
|
|
3050
|
+
var import_baml4, BamlAsyncClient, BamlStreamClient, b2;
|
|
3051
|
+
var init_async_client = __esm({
|
|
3052
|
+
"../cli/ai/lib/baml_client/async_client.js"() {
|
|
785
3053
|
"use strict";
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
3054
|
+
import_baml4 = require("@boundaryml/baml");
|
|
3055
|
+
init_async_request();
|
|
3056
|
+
init_parser();
|
|
3057
|
+
init_globals();
|
|
3058
|
+
BamlAsyncClient = class _BamlAsyncClient {
|
|
3059
|
+
runtime;
|
|
3060
|
+
ctxManager;
|
|
3061
|
+
streamClient;
|
|
3062
|
+
httpRequest;
|
|
3063
|
+
httpStreamRequest;
|
|
3064
|
+
llmResponseParser;
|
|
3065
|
+
llmStreamParser;
|
|
3066
|
+
bamlOptions;
|
|
3067
|
+
constructor(runtime, ctxManager, bamlOptions) {
|
|
3068
|
+
this.runtime = runtime;
|
|
3069
|
+
this.ctxManager = ctxManager;
|
|
3070
|
+
this.streamClient = new BamlStreamClient(runtime, ctxManager, bamlOptions);
|
|
3071
|
+
this.httpRequest = new AsyncHttpRequest(runtime, ctxManager);
|
|
3072
|
+
this.httpStreamRequest = new AsyncHttpStreamRequest(runtime, ctxManager);
|
|
3073
|
+
this.llmResponseParser = new LlmResponseParser(runtime, ctxManager);
|
|
3074
|
+
this.llmStreamParser = new LlmStreamParser(runtime, ctxManager);
|
|
3075
|
+
this.bamlOptions = bamlOptions || {};
|
|
3076
|
+
}
|
|
3077
|
+
withOptions(bamlOptions) {
|
|
3078
|
+
return new _BamlAsyncClient(this.runtime, this.ctxManager, bamlOptions);
|
|
3079
|
+
}
|
|
3080
|
+
get stream() {
|
|
3081
|
+
return this.streamClient;
|
|
3082
|
+
}
|
|
3083
|
+
get request() {
|
|
3084
|
+
return this.httpRequest;
|
|
3085
|
+
}
|
|
3086
|
+
get streamRequest() {
|
|
3087
|
+
return this.httpStreamRequest;
|
|
3088
|
+
}
|
|
3089
|
+
get parse() {
|
|
3090
|
+
return this.llmResponseParser;
|
|
3091
|
+
}
|
|
3092
|
+
get parseStream() {
|
|
3093
|
+
return this.llmStreamParser;
|
|
3094
|
+
}
|
|
3095
|
+
async AnalyzeSdkDiff(diff, language, previous_version, prior_changelog, spec_commit_message, __baml_options__) {
|
|
3096
|
+
try {
|
|
3097
|
+
const __options__ = { ...this.bamlOptions, ...__baml_options__ || {} };
|
|
3098
|
+
const __signal__ = __options__.signal;
|
|
3099
|
+
if (__signal__?.aborted) {
|
|
3100
|
+
throw new import_baml4.BamlAbortError("Operation was aborted", __signal__.reason);
|
|
3101
|
+
}
|
|
3102
|
+
if (__options__.onTick) {
|
|
3103
|
+
const __stream__ = this.stream.AnalyzeSdkDiff(diff, language, previous_version, prior_changelog, spec_commit_message, __baml_options__);
|
|
3104
|
+
return await __stream__.getFinalResponse();
|
|
3105
|
+
}
|
|
3106
|
+
const __collector__ = __options__.collector ? Array.isArray(__options__.collector) ? __options__.collector : [__options__.collector] : [];
|
|
3107
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
3108
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
3109
|
+
let __clientRegistry__ = __options__.clientRegistry;
|
|
3110
|
+
if (__options__.client) {
|
|
3111
|
+
__clientRegistry__ = __clientRegistry__ || new import_baml4.ClientRegistry();
|
|
3112
|
+
__clientRegistry__.setPrimary(__options__.client);
|
|
3113
|
+
}
|
|
3114
|
+
const __raw__ = await this.runtime.callFunction("AnalyzeSdkDiff", {
|
|
3115
|
+
"diff": diff,
|
|
3116
|
+
"language": language,
|
|
3117
|
+
"previous_version": previous_version,
|
|
3118
|
+
"prior_changelog": prior_changelog,
|
|
3119
|
+
"spec_commit_message": spec_commit_message
|
|
3120
|
+
}, this.ctxManager.cloneContext(), __options__.tb?.__tb(), __clientRegistry__, __collector__, __options__.tags || {}, __env__, __signal__, __options__.watchers);
|
|
3121
|
+
return __raw__.parsed(false);
|
|
3122
|
+
} catch (error) {
|
|
3123
|
+
throw (0, import_baml4.toBamlError)(error);
|
|
800
3124
|
}
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
3125
|
+
}
|
|
3126
|
+
async ConsolidateChangelog(raw_entries, version_bump, language, previous_version, new_version, __baml_options__) {
|
|
3127
|
+
try {
|
|
3128
|
+
const __options__ = { ...this.bamlOptions, ...__baml_options__ || {} };
|
|
3129
|
+
const __signal__ = __options__.signal;
|
|
3130
|
+
if (__signal__?.aborted) {
|
|
3131
|
+
throw new import_baml4.BamlAbortError("Operation was aborted", __signal__.reason);
|
|
3132
|
+
}
|
|
3133
|
+
if (__options__.onTick) {
|
|
3134
|
+
const __stream__ = this.stream.ConsolidateChangelog(raw_entries, version_bump, language, previous_version, new_version, __baml_options__);
|
|
3135
|
+
return await __stream__.getFinalResponse();
|
|
3136
|
+
}
|
|
3137
|
+
const __collector__ = __options__.collector ? Array.isArray(__options__.collector) ? __options__.collector : [__options__.collector] : [];
|
|
3138
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
3139
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
3140
|
+
let __clientRegistry__ = __options__.clientRegistry;
|
|
3141
|
+
if (__options__.client) {
|
|
3142
|
+
__clientRegistry__ = __clientRegistry__ || new import_baml4.ClientRegistry();
|
|
3143
|
+
__clientRegistry__.setPrimary(__options__.client);
|
|
3144
|
+
}
|
|
3145
|
+
const __raw__ = await this.runtime.callFunction("ConsolidateChangelog", {
|
|
3146
|
+
"raw_entries": raw_entries,
|
|
3147
|
+
"version_bump": version_bump,
|
|
3148
|
+
"language": language,
|
|
3149
|
+
"previous_version": previous_version,
|
|
3150
|
+
"new_version": new_version
|
|
3151
|
+
}, this.ctxManager.cloneContext(), __options__.tb?.__tb(), __clientRegistry__, __collector__, __options__.tags || {}, __env__, __signal__, __options__.watchers);
|
|
3152
|
+
return __raw__.parsed(false);
|
|
3153
|
+
} catch (error) {
|
|
3154
|
+
throw (0, import_baml4.toBamlError)(error);
|
|
804
3155
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
3156
|
+
}
|
|
3157
|
+
};
|
|
3158
|
+
BamlStreamClient = class {
|
|
3159
|
+
runtime;
|
|
3160
|
+
ctxManager;
|
|
3161
|
+
bamlOptions;
|
|
3162
|
+
constructor(runtime, ctxManager, bamlOptions) {
|
|
3163
|
+
this.runtime = runtime;
|
|
3164
|
+
this.ctxManager = ctxManager;
|
|
3165
|
+
this.bamlOptions = bamlOptions || {};
|
|
3166
|
+
}
|
|
3167
|
+
AnalyzeSdkDiff(diff, language, previous_version, prior_changelog, spec_commit_message, __baml_options__) {
|
|
3168
|
+
try {
|
|
3169
|
+
const __options__ = { ...this.bamlOptions, ...__baml_options__ || {} };
|
|
3170
|
+
const __signal__ = __options__.signal;
|
|
3171
|
+
if (__signal__?.aborted) {
|
|
3172
|
+
throw new import_baml4.BamlAbortError("Operation was aborted", __signal__.reason);
|
|
3173
|
+
}
|
|
3174
|
+
let __collector__ = __options__.collector ? Array.isArray(__options__.collector) ? __options__.collector : [__options__.collector] : [];
|
|
3175
|
+
let __onTickWrapper__;
|
|
3176
|
+
if (__options__.onTick) {
|
|
3177
|
+
const __tickCollector__ = new import_baml4.Collector("on-tick-collector");
|
|
3178
|
+
__collector__ = [...__collector__, __tickCollector__];
|
|
3179
|
+
__onTickWrapper__ = () => {
|
|
3180
|
+
const __log__ = __tickCollector__.last;
|
|
3181
|
+
if (__log__) {
|
|
3182
|
+
try {
|
|
3183
|
+
__options__.onTick("Unknown", __log__);
|
|
3184
|
+
} catch (error) {
|
|
3185
|
+
console.error("Error in onTick callback for AnalyzeSdkDiff", error);
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
};
|
|
3189
|
+
}
|
|
3190
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
3191
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
3192
|
+
let __clientRegistry__ = __options__.clientRegistry;
|
|
3193
|
+
if (__options__.client) {
|
|
3194
|
+
__clientRegistry__ = __clientRegistry__ || new import_baml4.ClientRegistry();
|
|
3195
|
+
__clientRegistry__.setPrimary(__options__.client);
|
|
3196
|
+
}
|
|
3197
|
+
const __raw__ = this.runtime.streamFunction("AnalyzeSdkDiff", {
|
|
3198
|
+
"diff": diff,
|
|
3199
|
+
"language": language,
|
|
3200
|
+
"previous_version": previous_version,
|
|
3201
|
+
"prior_changelog": prior_changelog,
|
|
3202
|
+
"spec_commit_message": spec_commit_message
|
|
3203
|
+
}, void 0, this.ctxManager.cloneContext(), __options__.tb?.__tb(), __clientRegistry__, __collector__, __options__.tags || {}, __env__, __signal__, __onTickWrapper__);
|
|
3204
|
+
return new import_baml4.BamlStream(__raw__, (a) => a, (a) => a, this.ctxManager.cloneContext(), __options__.signal);
|
|
3205
|
+
} catch (error) {
|
|
3206
|
+
throw (0, import_baml4.toBamlError)(error);
|
|
811
3207
|
}
|
|
812
|
-
log(`[FATAL] %o`, e);
|
|
813
|
-
throw e;
|
|
814
3208
|
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
3209
|
+
ConsolidateChangelog(raw_entries, version_bump, language, previous_version, new_version, __baml_options__) {
|
|
3210
|
+
try {
|
|
3211
|
+
const __options__ = { ...this.bamlOptions, ...__baml_options__ || {} };
|
|
3212
|
+
const __signal__ = __options__.signal;
|
|
3213
|
+
if (__signal__?.aborted) {
|
|
3214
|
+
throw new import_baml4.BamlAbortError("Operation was aborted", __signal__.reason);
|
|
3215
|
+
}
|
|
3216
|
+
let __collector__ = __options__.collector ? Array.isArray(__options__.collector) ? __options__.collector : [__options__.collector] : [];
|
|
3217
|
+
let __onTickWrapper__;
|
|
3218
|
+
if (__options__.onTick) {
|
|
3219
|
+
const __tickCollector__ = new import_baml4.Collector("on-tick-collector");
|
|
3220
|
+
__collector__ = [...__collector__, __tickCollector__];
|
|
3221
|
+
__onTickWrapper__ = () => {
|
|
3222
|
+
const __log__ = __tickCollector__.last;
|
|
3223
|
+
if (__log__) {
|
|
3224
|
+
try {
|
|
3225
|
+
__options__.onTick("Unknown", __log__);
|
|
3226
|
+
} catch (error) {
|
|
3227
|
+
console.error("Error in onTick callback for ConsolidateChangelog", error);
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
};
|
|
3231
|
+
}
|
|
3232
|
+
const __rawEnv__ = __baml_options__?.env ? { ...process.env, ...__baml_options__.env } : { ...process.env };
|
|
3233
|
+
const __env__ = Object.fromEntries(Object.entries(__rawEnv__).filter(([_2, value]) => value !== void 0));
|
|
3234
|
+
let __clientRegistry__ = __options__.clientRegistry;
|
|
3235
|
+
if (__options__.client) {
|
|
3236
|
+
__clientRegistry__ = __clientRegistry__ || new import_baml4.ClientRegistry();
|
|
3237
|
+
__clientRegistry__.setPrimary(__options__.client);
|
|
3238
|
+
}
|
|
3239
|
+
const __raw__ = this.runtime.streamFunction("ConsolidateChangelog", {
|
|
3240
|
+
"raw_entries": raw_entries,
|
|
3241
|
+
"version_bump": version_bump,
|
|
3242
|
+
"language": language,
|
|
3243
|
+
"previous_version": previous_version,
|
|
3244
|
+
"new_version": new_version
|
|
3245
|
+
}, void 0, this.ctxManager.cloneContext(), __options__.tb?.__tb(), __clientRegistry__, __collector__, __options__.tags || {}, __env__, __signal__, __onTickWrapper__);
|
|
3246
|
+
return new import_baml4.BamlStream(__raw__, (a) => a, (a) => a, this.ctxManager.cloneContext(), __options__.signal);
|
|
3247
|
+
} catch (error) {
|
|
3248
|
+
throw (0, import_baml4.toBamlError)(error);
|
|
3249
|
+
}
|
|
3250
|
+
}
|
|
3251
|
+
};
|
|
3252
|
+
b2 = new BamlAsyncClient(DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_RUNTIME, DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX);
|
|
823
3253
|
}
|
|
824
3254
|
});
|
|
825
3255
|
|
|
826
|
-
//
|
|
827
|
-
|
|
828
|
-
|
|
3256
|
+
// ../cli/ai/lib/baml_client/types.js
|
|
3257
|
+
function all_succeeded(checks) {
|
|
3258
|
+
return get_checks(checks).every((check) => check.status === "succeeded");
|
|
3259
|
+
}
|
|
3260
|
+
function get_checks(checks) {
|
|
3261
|
+
return Object.values(checks);
|
|
3262
|
+
}
|
|
3263
|
+
var VersionBump2;
|
|
3264
|
+
var init_types = __esm({
|
|
3265
|
+
"../cli/ai/lib/baml_client/types.js"() {
|
|
829
3266
|
"use strict";
|
|
830
|
-
function
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
3267
|
+
(function(VersionBump3) {
|
|
3268
|
+
VersionBump3["MAJOR"] = "MAJOR";
|
|
3269
|
+
VersionBump3["MINOR"] = "MINOR";
|
|
3270
|
+
VersionBump3["PATCH"] = "PATCH";
|
|
3271
|
+
VersionBump3["NO_CHANGE"] = "NO_CHANGE";
|
|
3272
|
+
})(VersionBump2 || (VersionBump2 = {}));
|
|
835
3273
|
}
|
|
836
3274
|
});
|
|
837
3275
|
|
|
838
|
-
//
|
|
839
|
-
var
|
|
840
|
-
|
|
3276
|
+
// ../cli/ai/lib/baml_client/tracing.js
|
|
3277
|
+
var traceAsync, traceSync, setTags, flush, onLogEvent;
|
|
3278
|
+
var init_tracing = __esm({
|
|
3279
|
+
"../cli/ai/lib/baml_client/tracing.js"() {
|
|
841
3280
|
"use strict";
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
3281
|
+
init_globals();
|
|
3282
|
+
traceAsync = DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.traceFnAsync.bind(DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX);
|
|
3283
|
+
traceSync = DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.traceFnSync.bind(DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX);
|
|
3284
|
+
setTags = DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.upsertTags.bind(DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX);
|
|
3285
|
+
flush = () => {
|
|
3286
|
+
DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.flush.bind(DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX)();
|
|
3287
|
+
};
|
|
3288
|
+
onLogEvent = (callback) => DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.onLogEvent(callback);
|
|
3289
|
+
}
|
|
3290
|
+
});
|
|
3291
|
+
|
|
3292
|
+
// ../cli/ai/lib/baml_client/watchers.js
|
|
3293
|
+
var watchers_exports = {};
|
|
3294
|
+
var init_watchers = __esm({
|
|
3295
|
+
"../cli/ai/lib/baml_client/watchers.js"() {
|
|
3296
|
+
"use strict";
|
|
3297
|
+
}
|
|
3298
|
+
});
|
|
3299
|
+
|
|
3300
|
+
// ../cli/ai/lib/baml_client/index.js
|
|
3301
|
+
var import_baml5, import_baml6, version;
|
|
3302
|
+
var init_baml_client = __esm({
|
|
3303
|
+
"../cli/ai/lib/baml_client/index.js"() {
|
|
3304
|
+
"use strict";
|
|
3305
|
+
import_baml5 = require("@boundaryml/baml");
|
|
3306
|
+
init_async_client();
|
|
3307
|
+
init_types();
|
|
3308
|
+
init_tracing();
|
|
3309
|
+
init_watchers();
|
|
3310
|
+
init_globals();
|
|
3311
|
+
import_baml6 = require("@boundaryml/baml");
|
|
3312
|
+
version = "0.219.0";
|
|
3313
|
+
(0, import_baml5.ThrowIfVersionMismatch)(version);
|
|
3314
|
+
}
|
|
3315
|
+
});
|
|
3316
|
+
|
|
3317
|
+
// ../cli/ai/lib/configureBamlClient.js
|
|
3318
|
+
function configureBamlClient(config) {
|
|
3319
|
+
const registry = new import_baml7.ClientRegistry();
|
|
3320
|
+
const clientOptions = {
|
|
3321
|
+
model: config.model
|
|
3322
|
+
};
|
|
3323
|
+
registry.addLlmClient("ConfiguredClient", config.provider, clientOptions);
|
|
3324
|
+
registry.setPrimary("ConfiguredClient");
|
|
3325
|
+
if ((0, import_baml7.getLogLevel)() !== "ERROR") {
|
|
3326
|
+
(0, import_baml7.setLogLevel)("ERROR");
|
|
3327
|
+
}
|
|
3328
|
+
return registry;
|
|
3329
|
+
}
|
|
3330
|
+
var import_baml7;
|
|
3331
|
+
var init_configureBamlClient = __esm({
|
|
3332
|
+
"../cli/ai/lib/configureBamlClient.js"() {
|
|
3333
|
+
"use strict";
|
|
3334
|
+
import_baml7 = require("@boundaryml/baml");
|
|
3335
|
+
}
|
|
3336
|
+
});
|
|
3337
|
+
|
|
3338
|
+
// ../cli/ai/lib/index.js
|
|
3339
|
+
var lib_exports = {};
|
|
3340
|
+
__export(lib_exports, {
|
|
3341
|
+
BamlClientFinishReasonError: () => import_baml6.BamlClientFinishReasonError,
|
|
3342
|
+
BamlClientHttpError: () => import_baml6.BamlClientHttpError,
|
|
3343
|
+
BamlValidationError: () => import_baml6.BamlValidationError,
|
|
3344
|
+
VersionBump: () => VersionBump2,
|
|
3345
|
+
all_succeeded: () => all_succeeded,
|
|
3346
|
+
b: () => b2,
|
|
3347
|
+
configureBamlClient: () => configureBamlClient,
|
|
3348
|
+
flush: () => flush,
|
|
3349
|
+
get_checks: () => get_checks,
|
|
3350
|
+
onLogEvent: () => onLogEvent,
|
|
3351
|
+
resetBamlEnvVars: () => resetBamlEnvVars,
|
|
3352
|
+
setTags: () => setTags,
|
|
3353
|
+
traceAsync: () => traceAsync,
|
|
3354
|
+
traceSync: () => traceSync,
|
|
3355
|
+
version: () => version,
|
|
3356
|
+
watchers: () => watchers_exports
|
|
3357
|
+
});
|
|
3358
|
+
var init_lib = __esm({
|
|
3359
|
+
"../cli/ai/lib/index.js"() {
|
|
3360
|
+
"use strict";
|
|
3361
|
+
init_baml_client();
|
|
3362
|
+
init_configureBamlClient();
|
|
877
3363
|
}
|
|
878
3364
|
});
|
|
879
3365
|
|
|
@@ -1300,7 +3786,7 @@ var __defProp2 = Object.defineProperty;
|
|
|
1300
3786
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
1301
3787
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
1302
3788
|
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
1303
|
-
var
|
|
3789
|
+
var __esm2 = (fn, res) => function __init() {
|
|
1304
3790
|
return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
|
|
1305
3791
|
};
|
|
1306
3792
|
var __commonJS2 = (cb, mod) => function __require() {
|
|
@@ -1320,7 +3806,7 @@ var __copyProps2 = (to, from, except, desc) => {
|
|
|
1320
3806
|
};
|
|
1321
3807
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
1322
3808
|
var GitError;
|
|
1323
|
-
var init_git_error =
|
|
3809
|
+
var init_git_error = __esm2({
|
|
1324
3810
|
"src/lib/errors/git-error.ts"() {
|
|
1325
3811
|
"use strict";
|
|
1326
3812
|
GitError = class extends Error {
|
|
@@ -1333,7 +3819,7 @@ var init_git_error = __esm({
|
|
|
1333
3819
|
}
|
|
1334
3820
|
});
|
|
1335
3821
|
var GitResponseError;
|
|
1336
|
-
var init_git_response_error =
|
|
3822
|
+
var init_git_response_error = __esm2({
|
|
1337
3823
|
"src/lib/errors/git-response-error.ts"() {
|
|
1338
3824
|
"use strict";
|
|
1339
3825
|
init_git_error();
|
|
@@ -1346,7 +3832,7 @@ var init_git_response_error = __esm({
|
|
|
1346
3832
|
}
|
|
1347
3833
|
});
|
|
1348
3834
|
var TaskConfigurationError;
|
|
1349
|
-
var init_task_configuration_error =
|
|
3835
|
+
var init_task_configuration_error = __esm2({
|
|
1350
3836
|
"src/lib/errors/task-configuration-error.ts"() {
|
|
1351
3837
|
"use strict";
|
|
1352
3838
|
init_git_error();
|
|
@@ -1477,7 +3963,7 @@ function orVoid(input) {
|
|
|
1477
3963
|
var NULL;
|
|
1478
3964
|
var NOOP;
|
|
1479
3965
|
var objectToString;
|
|
1480
|
-
var init_util =
|
|
3966
|
+
var init_util = __esm2({
|
|
1481
3967
|
"src/lib/utils/util.ts"() {
|
|
1482
3968
|
"use strict";
|
|
1483
3969
|
init_argument_filters();
|
|
@@ -1508,7 +3994,7 @@ var filterNumber;
|
|
|
1508
3994
|
var filterString;
|
|
1509
3995
|
var filterStringOrStringArray;
|
|
1510
3996
|
var filterHasLength;
|
|
1511
|
-
var init_argument_filters =
|
|
3997
|
+
var init_argument_filters = __esm2({
|
|
1512
3998
|
"src/lib/utils/argument-filters.ts"() {
|
|
1513
3999
|
"use strict";
|
|
1514
4000
|
init_util();
|
|
@@ -1533,7 +4019,7 @@ var init_argument_filters = __esm({
|
|
|
1533
4019
|
}
|
|
1534
4020
|
});
|
|
1535
4021
|
var ExitCodes;
|
|
1536
|
-
var init_exit_codes =
|
|
4022
|
+
var init_exit_codes = __esm2({
|
|
1537
4023
|
"src/lib/utils/exit-codes.ts"() {
|
|
1538
4024
|
"use strict";
|
|
1539
4025
|
ExitCodes = /* @__PURE__ */ ((ExitCodes2) => {
|
|
@@ -1546,7 +4032,7 @@ var init_exit_codes = __esm({
|
|
|
1546
4032
|
}
|
|
1547
4033
|
});
|
|
1548
4034
|
var GitOutputStreams;
|
|
1549
|
-
var init_git_output_streams =
|
|
4035
|
+
var init_git_output_streams = __esm2({
|
|
1550
4036
|
"src/lib/utils/git-output-streams.ts"() {
|
|
1551
4037
|
"use strict";
|
|
1552
4038
|
GitOutputStreams = class _GitOutputStreams {
|
|
@@ -1565,7 +4051,7 @@ function useMatchesDefault() {
|
|
|
1565
4051
|
}
|
|
1566
4052
|
var LineParser;
|
|
1567
4053
|
var RemoteLineParser;
|
|
1568
|
-
var init_line_parser =
|
|
4054
|
+
var init_line_parser = __esm2({
|
|
1569
4055
|
"src/lib/utils/line-parser.ts"() {
|
|
1570
4056
|
"use strict";
|
|
1571
4057
|
LineParser = class {
|
|
@@ -1624,7 +4110,7 @@ function createInstanceConfig(...options) {
|
|
|
1624
4110
|
return config;
|
|
1625
4111
|
}
|
|
1626
4112
|
var defaultOptions;
|
|
1627
|
-
var init_simple_git_options =
|
|
4113
|
+
var init_simple_git_options = __esm2({
|
|
1628
4114
|
"src/lib/utils/simple-git-options.ts"() {
|
|
1629
4115
|
"use strict";
|
|
1630
4116
|
defaultOptions = {
|
|
@@ -1682,7 +4168,7 @@ function trailingFunctionArgument(args, includeNoop = true) {
|
|
|
1682
4168
|
const callback = asFunction(last(args));
|
|
1683
4169
|
return includeNoop || isUserFunction(callback) ? callback : void 0;
|
|
1684
4170
|
}
|
|
1685
|
-
var init_task_options =
|
|
4171
|
+
var init_task_options = __esm2({
|
|
1686
4172
|
"src/lib/utils/task-options.ts"() {
|
|
1687
4173
|
"use strict";
|
|
1688
4174
|
init_argument_filters();
|
|
@@ -1706,7 +4192,7 @@ function parseStringResponse(result, parsers12, texts, trim = true) {
|
|
|
1706
4192
|
});
|
|
1707
4193
|
return result;
|
|
1708
4194
|
}
|
|
1709
|
-
var init_task_parser =
|
|
4195
|
+
var init_task_parser = __esm2({
|
|
1710
4196
|
"src/lib/utils/task-parser.ts"() {
|
|
1711
4197
|
"use strict";
|
|
1712
4198
|
init_util();
|
|
@@ -1758,7 +4244,7 @@ __export2(utils_exports, {
|
|
|
1758
4244
|
trailingFunctionArgument: () => trailingFunctionArgument,
|
|
1759
4245
|
trailingOptionsArgument: () => trailingOptionsArgument
|
|
1760
4246
|
});
|
|
1761
|
-
var init_utils =
|
|
4247
|
+
var init_utils = __esm2({
|
|
1762
4248
|
"src/lib/utils/index.ts"() {
|
|
1763
4249
|
"use strict";
|
|
1764
4250
|
init_argument_filters();
|
|
@@ -1819,7 +4305,7 @@ function isNotRepoMessage(error) {
|
|
|
1819
4305
|
var CheckRepoActions;
|
|
1820
4306
|
var onError;
|
|
1821
4307
|
var parser;
|
|
1822
|
-
var init_check_is_repo =
|
|
4308
|
+
var init_check_is_repo = __esm2({
|
|
1823
4309
|
"src/lib/tasks/check-is-repo.ts"() {
|
|
1824
4310
|
"use strict";
|
|
1825
4311
|
init_utils();
|
|
@@ -1854,7 +4340,7 @@ var CleanResponse;
|
|
|
1854
4340
|
var removalRegexp;
|
|
1855
4341
|
var dryRunRemovalRegexp;
|
|
1856
4342
|
var isFolderRegexp;
|
|
1857
|
-
var init_CleanSummary =
|
|
4343
|
+
var init_CleanSummary = __esm2({
|
|
1858
4344
|
"src/lib/responses/CleanSummary.ts"() {
|
|
1859
4345
|
"use strict";
|
|
1860
4346
|
init_utils();
|
|
@@ -1922,7 +4408,7 @@ function isEmptyTask(task) {
|
|
|
1922
4408
|
return task.format === "empty" || !task.commands.length;
|
|
1923
4409
|
}
|
|
1924
4410
|
var EMPTY_COMMANDS;
|
|
1925
|
-
var init_task =
|
|
4411
|
+
var init_task = __esm2({
|
|
1926
4412
|
"src/lib/tasks/task.ts"() {
|
|
1927
4413
|
"use strict";
|
|
1928
4414
|
init_task_configuration_error();
|
|
@@ -2001,7 +4487,7 @@ var CONFIG_ERROR_MODE_REQUIRED;
|
|
|
2001
4487
|
var CONFIG_ERROR_UNKNOWN_OPTION;
|
|
2002
4488
|
var CleanOptions;
|
|
2003
4489
|
var CleanOptionValues;
|
|
2004
|
-
var init_clean =
|
|
4490
|
+
var init_clean = __esm2({
|
|
2005
4491
|
"src/lib/tasks/clean.ts"() {
|
|
2006
4492
|
"use strict";
|
|
2007
4493
|
init_CleanSummary();
|
|
@@ -2073,7 +4559,7 @@ function* configParser(text, requestedKey = null) {
|
|
|
2073
4559
|
}
|
|
2074
4560
|
}
|
|
2075
4561
|
var ConfigList;
|
|
2076
|
-
var init_ConfigList =
|
|
4562
|
+
var init_ConfigList = __esm2({
|
|
2077
4563
|
"src/lib/responses/ConfigList.ts"() {
|
|
2078
4564
|
"use strict";
|
|
2079
4565
|
init_utils();
|
|
@@ -2190,7 +4676,7 @@ function config_default() {
|
|
|
2190
4676
|
};
|
|
2191
4677
|
}
|
|
2192
4678
|
var GitConfigScope;
|
|
2193
|
-
var init_config =
|
|
4679
|
+
var init_config = __esm2({
|
|
2194
4680
|
"src/lib/tasks/config.ts"() {
|
|
2195
4681
|
"use strict";
|
|
2196
4682
|
init_ConfigList();
|
|
@@ -2209,7 +4695,7 @@ function isDiffNameStatus(input) {
|
|
|
2209
4695
|
}
|
|
2210
4696
|
var DiffNameStatus;
|
|
2211
4697
|
var diffNameStatus;
|
|
2212
|
-
var init_diff_name_status =
|
|
4698
|
+
var init_diff_name_status = __esm2({
|
|
2213
4699
|
"src/lib/tasks/diff-name-status.ts"() {
|
|
2214
4700
|
"use strict";
|
|
2215
4701
|
DiffNameStatus = /* @__PURE__ */ ((DiffNameStatus2) => {
|
|
@@ -2281,7 +4767,7 @@ var disallowedOptions;
|
|
|
2281
4767
|
var Query;
|
|
2282
4768
|
var _a;
|
|
2283
4769
|
var GrepQuery;
|
|
2284
|
-
var init_grep =
|
|
4770
|
+
var init_grep = __esm2({
|
|
2285
4771
|
"src/lib/tasks/grep.ts"() {
|
|
2286
4772
|
"use strict";
|
|
2287
4773
|
init_utils();
|
|
@@ -2338,7 +4824,7 @@ function isValidResetMode(mode) {
|
|
|
2338
4824
|
}
|
|
2339
4825
|
var ResetMode;
|
|
2340
4826
|
var validResetModes;
|
|
2341
|
-
var init_reset =
|
|
4827
|
+
var init_reset = __esm2({
|
|
2342
4828
|
"src/lib/tasks/reset.ts"() {
|
|
2343
4829
|
"use strict";
|
|
2344
4830
|
init_utils();
|
|
@@ -2405,7 +4891,7 @@ function createLogger(label, verbose, initialStep, infoDebugger = createLog()) {
|
|
|
2405
4891
|
});
|
|
2406
4892
|
}
|
|
2407
4893
|
}
|
|
2408
|
-
var init_git_logger =
|
|
4894
|
+
var init_git_logger = __esm2({
|
|
2409
4895
|
"src/lib/git-logger.ts"() {
|
|
2410
4896
|
"use strict";
|
|
2411
4897
|
init_utils();
|
|
@@ -2419,7 +4905,7 @@ var init_git_logger = __esm({
|
|
|
2419
4905
|
}
|
|
2420
4906
|
});
|
|
2421
4907
|
var TasksPendingQueue;
|
|
2422
|
-
var init_tasks_pending_queue =
|
|
4908
|
+
var init_tasks_pending_queue = __esm2({
|
|
2423
4909
|
"src/lib/runners/tasks-pending-queue.ts"() {
|
|
2424
4910
|
"use strict";
|
|
2425
4911
|
init_git_error();
|
|
@@ -2509,7 +4995,7 @@ function onDataReceived(target, name, logger, output) {
|
|
|
2509
4995
|
};
|
|
2510
4996
|
}
|
|
2511
4997
|
var GitExecutorChain;
|
|
2512
|
-
var init_git_executor_chain =
|
|
4998
|
+
var init_git_executor_chain = __esm2({
|
|
2513
4999
|
"src/lib/runners/git-executor-chain.ts"() {
|
|
2514
5000
|
"use strict";
|
|
2515
5001
|
init_git_error();
|
|
@@ -2714,7 +5200,7 @@ __export2(git_executor_exports, {
|
|
|
2714
5200
|
GitExecutor: () => GitExecutor
|
|
2715
5201
|
});
|
|
2716
5202
|
var GitExecutor;
|
|
2717
|
-
var init_git_executor =
|
|
5203
|
+
var init_git_executor = __esm2({
|
|
2718
5204
|
"src/lib/runners/git-executor.ts"() {
|
|
2719
5205
|
"use strict";
|
|
2720
5206
|
init_git_executor_chain();
|
|
@@ -2771,7 +5257,7 @@ function addDeprecationNoticeToError(err) {
|
|
|
2771
5257
|
return all;
|
|
2772
5258
|
}
|
|
2773
5259
|
}
|
|
2774
|
-
var init_task_callback =
|
|
5260
|
+
var init_task_callback = __esm2({
|
|
2775
5261
|
"src/lib/task-callback.ts"() {
|
|
2776
5262
|
"use strict";
|
|
2777
5263
|
init_git_response_error();
|
|
@@ -2786,7 +5272,7 @@ function changeWorkingDirectoryTask(directory, root) {
|
|
|
2786
5272
|
return (root || instance).cwd = directory;
|
|
2787
5273
|
});
|
|
2788
5274
|
}
|
|
2789
|
-
var init_change_working_directory =
|
|
5275
|
+
var init_change_working_directory = __esm2({
|
|
2790
5276
|
"src/lib/tasks/change-working-directory.ts"() {
|
|
2791
5277
|
"use strict";
|
|
2792
5278
|
init_utils();
|
|
@@ -2822,7 +5308,7 @@ function checkout_default() {
|
|
|
2822
5308
|
}
|
|
2823
5309
|
};
|
|
2824
5310
|
}
|
|
2825
|
-
var init_checkout =
|
|
5311
|
+
var init_checkout = __esm2({
|
|
2826
5312
|
"src/lib/tasks/checkout.ts"() {
|
|
2827
5313
|
"use strict";
|
|
2828
5314
|
init_utils();
|
|
@@ -2855,7 +5341,7 @@ function count_objects_default() {
|
|
|
2855
5341
|
};
|
|
2856
5342
|
}
|
|
2857
5343
|
var parser2;
|
|
2858
|
-
var init_count_objects =
|
|
5344
|
+
var init_count_objects = __esm2({
|
|
2859
5345
|
"src/lib/tasks/count-objects.ts"() {
|
|
2860
5346
|
"use strict";
|
|
2861
5347
|
init_utils();
|
|
@@ -2885,7 +5371,7 @@ function parseCommitResult(stdOut) {
|
|
|
2885
5371
|
return parseStringResponse(result, parsers, stdOut);
|
|
2886
5372
|
}
|
|
2887
5373
|
var parsers;
|
|
2888
|
-
var init_parse_commit =
|
|
5374
|
+
var init_parse_commit = __esm2({
|
|
2889
5375
|
"src/lib/parsers/parse-commit.ts"() {
|
|
2890
5376
|
"use strict";
|
|
2891
5377
|
init_utils();
|
|
@@ -2965,7 +5451,7 @@ function commit_default() {
|
|
|
2965
5451
|
);
|
|
2966
5452
|
}
|
|
2967
5453
|
}
|
|
2968
|
-
var init_commit =
|
|
5454
|
+
var init_commit = __esm2({
|
|
2969
5455
|
"src/lib/tasks/commit.ts"() {
|
|
2970
5456
|
"use strict";
|
|
2971
5457
|
init_parse_commit();
|
|
@@ -2983,7 +5469,7 @@ function first_commit_default() {
|
|
|
2983
5469
|
}
|
|
2984
5470
|
};
|
|
2985
5471
|
}
|
|
2986
|
-
var init_first_commit =
|
|
5472
|
+
var init_first_commit = __esm2({
|
|
2987
5473
|
"src/lib/tasks/first-commit.ts"() {
|
|
2988
5474
|
"use strict";
|
|
2989
5475
|
init_utils();
|
|
@@ -2997,7 +5483,7 @@ function hashObjectTask(filePath, write) {
|
|
|
2997
5483
|
}
|
|
2998
5484
|
return straightThroughStringTask(commands, true);
|
|
2999
5485
|
}
|
|
3000
|
-
var init_hash_object =
|
|
5486
|
+
var init_hash_object = __esm2({
|
|
3001
5487
|
"src/lib/tasks/hash-object.ts"() {
|
|
3002
5488
|
"use strict";
|
|
3003
5489
|
init_task();
|
|
@@ -3026,7 +5512,7 @@ function parseInit(bare, path3, text) {
|
|
|
3026
5512
|
var InitSummary;
|
|
3027
5513
|
var initResponseRegex;
|
|
3028
5514
|
var reInitResponseRegex;
|
|
3029
|
-
var init_InitSummary =
|
|
5515
|
+
var init_InitSummary = __esm2({
|
|
3030
5516
|
"src/lib/responses/InitSummary.ts"() {
|
|
3031
5517
|
"use strict";
|
|
3032
5518
|
InitSummary = class {
|
|
@@ -3058,7 +5544,7 @@ function initTask(bare = false, path3, customArgs) {
|
|
|
3058
5544
|
};
|
|
3059
5545
|
}
|
|
3060
5546
|
var bareCommand;
|
|
3061
|
-
var init_init =
|
|
5547
|
+
var init_init = __esm2({
|
|
3062
5548
|
"src/lib/tasks/init.ts"() {
|
|
3063
5549
|
"use strict";
|
|
3064
5550
|
init_InitSummary();
|
|
@@ -3078,14 +5564,14 @@ function isLogFormat(customArg) {
|
|
|
3078
5564
|
return logFormatRegex.test(customArg);
|
|
3079
5565
|
}
|
|
3080
5566
|
var logFormatRegex;
|
|
3081
|
-
var init_log_format =
|
|
5567
|
+
var init_log_format = __esm2({
|
|
3082
5568
|
"src/lib/args/log-format.ts"() {
|
|
3083
5569
|
"use strict";
|
|
3084
5570
|
logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/;
|
|
3085
5571
|
}
|
|
3086
5572
|
});
|
|
3087
5573
|
var DiffSummary;
|
|
3088
|
-
var init_DiffSummary =
|
|
5574
|
+
var init_DiffSummary = __esm2({
|
|
3089
5575
|
"src/lib/responses/DiffSummary.ts"() {
|
|
3090
5576
|
"use strict";
|
|
3091
5577
|
DiffSummary = class {
|
|
@@ -3107,7 +5593,7 @@ var numStatParser;
|
|
|
3107
5593
|
var nameOnlyParser;
|
|
3108
5594
|
var nameStatusParser;
|
|
3109
5595
|
var diffSummaryParsers;
|
|
3110
|
-
var init_parse_diff_summary =
|
|
5596
|
+
var init_parse_diff_summary = __esm2({
|
|
3111
5597
|
"src/lib/parsers/parse-diff-summary.ts"() {
|
|
3112
5598
|
"use strict";
|
|
3113
5599
|
init_log_format();
|
|
@@ -3266,7 +5752,7 @@ var START_BOUNDARY;
|
|
|
3266
5752
|
var COMMIT_BOUNDARY;
|
|
3267
5753
|
var SPLITTER;
|
|
3268
5754
|
var defaultFieldNames;
|
|
3269
|
-
var init_parse_list_log_summary =
|
|
5755
|
+
var init_parse_list_log_summary = __esm2({
|
|
3270
5756
|
"src/lib/parsers/parse-list-log-summary.ts"() {
|
|
3271
5757
|
"use strict";
|
|
3272
5758
|
init_utils();
|
|
@@ -3310,7 +5796,7 @@ function validateLogFormatConfig(customArgs) {
|
|
|
3310
5796
|
);
|
|
3311
5797
|
}
|
|
3312
5798
|
}
|
|
3313
|
-
var init_diff =
|
|
5799
|
+
var init_diff = __esm2({
|
|
3314
5800
|
"src/lib/tasks/diff.ts"() {
|
|
3315
5801
|
"use strict";
|
|
3316
5802
|
init_log_format();
|
|
@@ -3400,7 +5886,7 @@ function log_default() {
|
|
|
3400
5886
|
}
|
|
3401
5887
|
}
|
|
3402
5888
|
var excludeOptions;
|
|
3403
|
-
var init_log =
|
|
5889
|
+
var init_log = __esm2({
|
|
3404
5890
|
"src/lib/tasks/log.ts"() {
|
|
3405
5891
|
"use strict";
|
|
3406
5892
|
init_log_format();
|
|
@@ -3428,7 +5914,7 @@ var init_log = __esm({
|
|
|
3428
5914
|
});
|
|
3429
5915
|
var MergeSummaryConflict;
|
|
3430
5916
|
var MergeSummaryDetail;
|
|
3431
|
-
var init_MergeSummary =
|
|
5917
|
+
var init_MergeSummary = __esm2({
|
|
3432
5918
|
"src/lib/responses/MergeSummary.ts"() {
|
|
3433
5919
|
"use strict";
|
|
3434
5920
|
MergeSummaryConflict = class {
|
|
@@ -3464,7 +5950,7 @@ var init_MergeSummary = __esm({
|
|
|
3464
5950
|
});
|
|
3465
5951
|
var PullSummary;
|
|
3466
5952
|
var PullFailedSummary;
|
|
3467
|
-
var init_PullSummary =
|
|
5953
|
+
var init_PullSummary = __esm2({
|
|
3468
5954
|
"src/lib/responses/PullSummary.ts"() {
|
|
3469
5955
|
"use strict";
|
|
3470
5956
|
PullSummary = class {
|
|
@@ -3522,7 +6008,7 @@ function asObjectCount(source) {
|
|
|
3522
6008
|
};
|
|
3523
6009
|
}
|
|
3524
6010
|
var remoteMessagesObjectParsers;
|
|
3525
|
-
var init_parse_remote_objects =
|
|
6011
|
+
var init_parse_remote_objects = __esm2({
|
|
3526
6012
|
"src/lib/parsers/parse-remote-objects.ts"() {
|
|
3527
6013
|
"use strict";
|
|
3528
6014
|
init_utils();
|
|
@@ -3560,7 +6046,7 @@ function parseRemoteMessages(_stdOut, stdErr) {
|
|
|
3560
6046
|
}
|
|
3561
6047
|
var parsers2;
|
|
3562
6048
|
var RemoteMessageSummary;
|
|
3563
|
-
var init_parse_remote_messages =
|
|
6049
|
+
var init_parse_remote_messages = __esm2({
|
|
3564
6050
|
"src/lib/parsers/parse-remote-messages.ts"() {
|
|
3565
6051
|
"use strict";
|
|
3566
6052
|
init_utils();
|
|
@@ -3606,7 +6092,7 @@ var parsers3;
|
|
|
3606
6092
|
var errorParsers;
|
|
3607
6093
|
var parsePullDetail;
|
|
3608
6094
|
var parsePullResult;
|
|
3609
|
-
var init_parse_pull =
|
|
6095
|
+
var init_parse_pull = __esm2({
|
|
3610
6096
|
"src/lib/parsers/parse-pull.ts"() {
|
|
3611
6097
|
"use strict";
|
|
3612
6098
|
init_PullSummary();
|
|
@@ -3667,7 +6153,7 @@ var init_parse_pull = __esm({
|
|
|
3667
6153
|
var parsers4;
|
|
3668
6154
|
var parseMergeResult;
|
|
3669
6155
|
var parseMergeDetail;
|
|
3670
|
-
var init_parse_merge =
|
|
6156
|
+
var init_parse_merge = __esm2({
|
|
3671
6157
|
"src/lib/parsers/parse-merge.ts"() {
|
|
3672
6158
|
"use strict";
|
|
3673
6159
|
init_MergeSummary();
|
|
@@ -3717,7 +6203,7 @@ function mergeTask(customArgs) {
|
|
|
3717
6203
|
}
|
|
3718
6204
|
};
|
|
3719
6205
|
}
|
|
3720
|
-
var init_merge =
|
|
6206
|
+
var init_merge = __esm2({
|
|
3721
6207
|
"src/lib/tasks/merge.ts"() {
|
|
3722
6208
|
"use strict";
|
|
3723
6209
|
init_git_response_error();
|
|
@@ -3742,7 +6228,7 @@ function pushResultPushedItem(local, remote, status2) {
|
|
|
3742
6228
|
var parsers5;
|
|
3743
6229
|
var parsePushResult;
|
|
3744
6230
|
var parsePushDetail;
|
|
3745
|
-
var init_parse_push =
|
|
6231
|
+
var init_parse_push = __esm2({
|
|
3746
6232
|
"src/lib/parsers/parse-push.ts"() {
|
|
3747
6233
|
"use strict";
|
|
3748
6234
|
init_utils();
|
|
@@ -3826,7 +6312,7 @@ function pushTask(ref = {}, customArgs) {
|
|
|
3826
6312
|
parser: parsePushResult
|
|
3827
6313
|
};
|
|
3828
6314
|
}
|
|
3829
|
-
var init_push =
|
|
6315
|
+
var init_push = __esm2({
|
|
3830
6316
|
"src/lib/tasks/push.ts"() {
|
|
3831
6317
|
"use strict";
|
|
3832
6318
|
init_parse_push();
|
|
@@ -3854,7 +6340,7 @@ function show_default() {
|
|
|
3854
6340
|
}
|
|
3855
6341
|
};
|
|
3856
6342
|
}
|
|
3857
|
-
var init_show =
|
|
6343
|
+
var init_show = __esm2({
|
|
3858
6344
|
"src/lib/tasks/show.ts"() {
|
|
3859
6345
|
"use strict";
|
|
3860
6346
|
init_utils();
|
|
@@ -3863,7 +6349,7 @@ var init_show = __esm({
|
|
|
3863
6349
|
});
|
|
3864
6350
|
var fromPathRegex;
|
|
3865
6351
|
var FileStatusSummary;
|
|
3866
|
-
var init_FileStatusSummary =
|
|
6352
|
+
var init_FileStatusSummary = __esm2({
|
|
3867
6353
|
"src/lib/responses/FileStatusSummary.ts"() {
|
|
3868
6354
|
"use strict";
|
|
3869
6355
|
fromPathRegex = /^(.+)\0(.+)$/;
|
|
@@ -3918,7 +6404,7 @@ function splitLine(result, lineStr) {
|
|
|
3918
6404
|
var StatusSummary;
|
|
3919
6405
|
var parsers6;
|
|
3920
6406
|
var parseStatusSummary;
|
|
3921
|
-
var init_StatusSummary =
|
|
6407
|
+
var init_StatusSummary = __esm2({
|
|
3922
6408
|
"src/lib/responses/StatusSummary.ts"() {
|
|
3923
6409
|
"use strict";
|
|
3924
6410
|
init_utils();
|
|
@@ -4075,7 +6561,7 @@ function statusTask(customArgs) {
|
|
|
4075
6561
|
};
|
|
4076
6562
|
}
|
|
4077
6563
|
var ignoredOptions;
|
|
4078
|
-
var init_status =
|
|
6564
|
+
var init_status = __esm2({
|
|
4079
6565
|
"src/lib/tasks/status.ts"() {
|
|
4080
6566
|
"use strict";
|
|
4081
6567
|
init_StatusSummary();
|
|
@@ -4129,7 +6615,7 @@ function versionParser(stdOut) {
|
|
|
4129
6615
|
}
|
|
4130
6616
|
var NOT_INSTALLED;
|
|
4131
6617
|
var parsers7;
|
|
4132
|
-
var init_version =
|
|
6618
|
+
var init_version = __esm2({
|
|
4133
6619
|
"src/lib/tasks/version.ts"() {
|
|
4134
6620
|
"use strict";
|
|
4135
6621
|
init_utils();
|
|
@@ -4177,7 +6663,7 @@ function clone_default() {
|
|
|
4177
6663
|
}
|
|
4178
6664
|
var cloneTask;
|
|
4179
6665
|
var cloneMirrorTask;
|
|
4180
|
-
var init_clone =
|
|
6666
|
+
var init_clone = __esm2({
|
|
4181
6667
|
"src/lib/tasks/clone.ts"() {
|
|
4182
6668
|
"use strict";
|
|
4183
6669
|
init_task();
|
|
@@ -4199,7 +6685,7 @@ __export2(simple_git_api_exports, {
|
|
|
4199
6685
|
SimpleGitApi: () => SimpleGitApi
|
|
4200
6686
|
});
|
|
4201
6687
|
var SimpleGitApi;
|
|
4202
|
-
var init_simple_git_api =
|
|
6688
|
+
var init_simple_git_api = __esm2({
|
|
4203
6689
|
"src/lib/simple-git-api.ts"() {
|
|
4204
6690
|
"use strict";
|
|
4205
6691
|
init_task_callback();
|
|
@@ -4341,7 +6827,7 @@ __export2(scheduler_exports, {
|
|
|
4341
6827
|
});
|
|
4342
6828
|
var createScheduledTask;
|
|
4343
6829
|
var Scheduler;
|
|
4344
|
-
var init_scheduler =
|
|
6830
|
+
var init_scheduler = __esm2({
|
|
4345
6831
|
"src/lib/runners/scheduler.ts"() {
|
|
4346
6832
|
"use strict";
|
|
4347
6833
|
init_utils();
|
|
@@ -4400,7 +6886,7 @@ __export2(apply_patch_exports, {
|
|
|
4400
6886
|
function applyPatchTask(patches, customArgs) {
|
|
4401
6887
|
return straightThroughStringTask(["apply", ...customArgs, ...patches]);
|
|
4402
6888
|
}
|
|
4403
|
-
var init_apply_patch =
|
|
6889
|
+
var init_apply_patch = __esm2({
|
|
4404
6890
|
"src/lib/tasks/apply-patch.ts"() {
|
|
4405
6891
|
"use strict";
|
|
4406
6892
|
init_task();
|
|
@@ -4421,7 +6907,7 @@ function branchDeletionFailure(branch) {
|
|
|
4421
6907
|
};
|
|
4422
6908
|
}
|
|
4423
6909
|
var BranchDeletionBatch;
|
|
4424
|
-
var init_BranchDeleteSummary =
|
|
6910
|
+
var init_BranchDeleteSummary = __esm2({
|
|
4425
6911
|
"src/lib/responses/BranchDeleteSummary.ts"() {
|
|
4426
6912
|
"use strict";
|
|
4427
6913
|
BranchDeletionBatch = class {
|
|
@@ -4443,7 +6929,7 @@ var deleteSuccessRegex;
|
|
|
4443
6929
|
var deleteErrorRegex;
|
|
4444
6930
|
var parsers8;
|
|
4445
6931
|
var parseBranchDeletions;
|
|
4446
|
-
var init_parse_branch_delete =
|
|
6932
|
+
var init_parse_branch_delete = __esm2({
|
|
4447
6933
|
"src/lib/parsers/parse-branch-delete.ts"() {
|
|
4448
6934
|
"use strict";
|
|
4449
6935
|
init_BranchDeleteSummary();
|
|
@@ -4469,7 +6955,7 @@ var init_parse_branch_delete = __esm({
|
|
|
4469
6955
|
}
|
|
4470
6956
|
});
|
|
4471
6957
|
var BranchSummaryResult;
|
|
4472
|
-
var init_BranchSummary =
|
|
6958
|
+
var init_BranchSummary = __esm2({
|
|
4473
6959
|
"src/lib/responses/BranchSummary.ts"() {
|
|
4474
6960
|
"use strict";
|
|
4475
6961
|
BranchSummaryResult = class {
|
|
@@ -4508,7 +6994,7 @@ function parseBranchSummary(stdOut, currentOnly = false) {
|
|
|
4508
6994
|
}
|
|
4509
6995
|
var parsers9;
|
|
4510
6996
|
var currentBranchParser;
|
|
4511
|
-
var init_parse_branch =
|
|
6997
|
+
var init_parse_branch = __esm2({
|
|
4512
6998
|
"src/lib/parsers/parse-branch.ts"() {
|
|
4513
6999
|
"use strict";
|
|
4514
7000
|
init_BranchSummary();
|
|
@@ -4608,7 +7094,7 @@ function deleteBranchTask(branch, forceDelete = false) {
|
|
|
4608
7094
|
};
|
|
4609
7095
|
return task;
|
|
4610
7096
|
}
|
|
4611
|
-
var init_branch =
|
|
7097
|
+
var init_branch = __esm2({
|
|
4612
7098
|
"src/lib/tasks/branch.ts"() {
|
|
4613
7099
|
"use strict";
|
|
4614
7100
|
init_git_response_error();
|
|
@@ -4622,7 +7108,7 @@ function toPath(input) {
|
|
|
4622
7108
|
return path3 && (0, import_node_path.normalize)(path3);
|
|
4623
7109
|
}
|
|
4624
7110
|
var parseCheckIgnore;
|
|
4625
|
-
var init_CheckIgnore =
|
|
7111
|
+
var init_CheckIgnore = __esm2({
|
|
4626
7112
|
"src/lib/responses/CheckIgnore.ts"() {
|
|
4627
7113
|
"use strict";
|
|
4628
7114
|
parseCheckIgnore = (text) => {
|
|
@@ -4641,7 +7127,7 @@ function checkIgnoreTask(paths) {
|
|
|
4641
7127
|
parser: parseCheckIgnore
|
|
4642
7128
|
};
|
|
4643
7129
|
}
|
|
4644
|
-
var init_check_ignore =
|
|
7130
|
+
var init_check_ignore = __esm2({
|
|
4645
7131
|
"src/lib/tasks/check-ignore.ts"() {
|
|
4646
7132
|
"use strict";
|
|
4647
7133
|
init_CheckIgnore();
|
|
@@ -4659,7 +7145,7 @@ function parseFetchResult(stdOut, stdErr) {
|
|
|
4659
7145
|
return parseStringResponse(result, parsers10, [stdOut, stdErr]);
|
|
4660
7146
|
}
|
|
4661
7147
|
var parsers10;
|
|
4662
|
-
var init_parse_fetch =
|
|
7148
|
+
var init_parse_fetch = __esm2({
|
|
4663
7149
|
"src/lib/parsers/parse-fetch.ts"() {
|
|
4664
7150
|
"use strict";
|
|
4665
7151
|
init_utils();
|
|
@@ -4720,7 +7206,7 @@ function fetchTask(remote, branch, customArgs) {
|
|
|
4720
7206
|
parser: parseFetchResult
|
|
4721
7207
|
};
|
|
4722
7208
|
}
|
|
4723
|
-
var init_fetch =
|
|
7209
|
+
var init_fetch = __esm2({
|
|
4724
7210
|
"src/lib/tasks/fetch.ts"() {
|
|
4725
7211
|
"use strict";
|
|
4726
7212
|
init_parse_fetch();
|
|
@@ -4731,7 +7217,7 @@ function parseMoveResult(stdOut) {
|
|
|
4731
7217
|
return parseStringResponse({ moves: [] }, parsers11, stdOut);
|
|
4732
7218
|
}
|
|
4733
7219
|
var parsers11;
|
|
4734
|
-
var init_parse_move =
|
|
7220
|
+
var init_parse_move = __esm2({
|
|
4735
7221
|
"src/lib/parsers/parse-move.ts"() {
|
|
4736
7222
|
"use strict";
|
|
4737
7223
|
init_utils();
|
|
@@ -4753,7 +7239,7 @@ function moveTask(from, to) {
|
|
|
4753
7239
|
parser: parseMoveResult
|
|
4754
7240
|
};
|
|
4755
7241
|
}
|
|
4756
|
-
var init_move =
|
|
7242
|
+
var init_move = __esm2({
|
|
4757
7243
|
"src/lib/tasks/move.ts"() {
|
|
4758
7244
|
"use strict";
|
|
4759
7245
|
init_parse_move();
|
|
@@ -4787,7 +7273,7 @@ function pullTask(remote, branch, customArgs) {
|
|
|
4787
7273
|
}
|
|
4788
7274
|
};
|
|
4789
7275
|
}
|
|
4790
|
-
var init_pull =
|
|
7276
|
+
var init_pull = __esm2({
|
|
4791
7277
|
"src/lib/tasks/pull.ts"() {
|
|
4792
7278
|
"use strict";
|
|
4793
7279
|
init_git_response_error();
|
|
@@ -4818,7 +7304,7 @@ function parseGetRemotesVerbose(text) {
|
|
|
4818
7304
|
function forEach(text, handler) {
|
|
4819
7305
|
forEachLineWithContent(text, (line) => handler(line.split(/\s+/)));
|
|
4820
7306
|
}
|
|
4821
|
-
var init_GetRemoteSummary =
|
|
7307
|
+
var init_GetRemoteSummary = __esm2({
|
|
4822
7308
|
"src/lib/responses/GetRemoteSummary.ts"() {
|
|
4823
7309
|
"use strict";
|
|
4824
7310
|
init_utils();
|
|
@@ -4863,7 +7349,7 @@ function remoteTask(customArgs) {
|
|
|
4863
7349
|
function removeRemoteTask(remoteName) {
|
|
4864
7350
|
return straightThroughStringTask(["remote", "remove", remoteName]);
|
|
4865
7351
|
}
|
|
4866
|
-
var init_remote =
|
|
7352
|
+
var init_remote = __esm2({
|
|
4867
7353
|
"src/lib/tasks/remote.ts"() {
|
|
4868
7354
|
"use strict";
|
|
4869
7355
|
init_GetRemoteSummary();
|
|
@@ -4888,7 +7374,7 @@ function stashListTask(opt = {}, customArgs) {
|
|
|
4888
7374
|
parser: parser4
|
|
4889
7375
|
};
|
|
4890
7376
|
}
|
|
4891
|
-
var init_stash_list =
|
|
7377
|
+
var init_stash_list = __esm2({
|
|
4892
7378
|
"src/lib/tasks/stash-list.ts"() {
|
|
4893
7379
|
"use strict";
|
|
4894
7380
|
init_log_format();
|
|
@@ -4920,22 +7406,22 @@ function subModuleTask(customArgs) {
|
|
|
4920
7406
|
function updateSubModuleTask(customArgs) {
|
|
4921
7407
|
return subModuleTask(["update", ...customArgs]);
|
|
4922
7408
|
}
|
|
4923
|
-
var init_sub_module =
|
|
7409
|
+
var init_sub_module = __esm2({
|
|
4924
7410
|
"src/lib/tasks/sub-module.ts"() {
|
|
4925
7411
|
"use strict";
|
|
4926
7412
|
init_task();
|
|
4927
7413
|
}
|
|
4928
7414
|
});
|
|
4929
|
-
function singleSorted(a,
|
|
7415
|
+
function singleSorted(a, b3) {
|
|
4930
7416
|
const aIsNum = Number.isNaN(a);
|
|
4931
|
-
const bIsNum = Number.isNaN(
|
|
7417
|
+
const bIsNum = Number.isNaN(b3);
|
|
4932
7418
|
if (aIsNum !== bIsNum) {
|
|
4933
7419
|
return aIsNum ? 1 : -1;
|
|
4934
7420
|
}
|
|
4935
|
-
return aIsNum ? sorted(a,
|
|
7421
|
+
return aIsNum ? sorted(a, b3) : 0;
|
|
4936
7422
|
}
|
|
4937
|
-
function sorted(a,
|
|
4938
|
-
return a ===
|
|
7423
|
+
function sorted(a, b3) {
|
|
7424
|
+
return a === b3 ? 0 : a > b3 ? 1 : -1;
|
|
4939
7425
|
}
|
|
4940
7426
|
function trimmed(input) {
|
|
4941
7427
|
return input.trim();
|
|
@@ -4948,7 +7434,7 @@ function toNumber(input) {
|
|
|
4948
7434
|
}
|
|
4949
7435
|
var TagList;
|
|
4950
7436
|
var parseTagList;
|
|
4951
|
-
var init_TagList =
|
|
7437
|
+
var init_TagList = __esm2({
|
|
4952
7438
|
"src/lib/responses/TagList.ts"() {
|
|
4953
7439
|
"use strict";
|
|
4954
7440
|
TagList = class {
|
|
@@ -5014,7 +7500,7 @@ function addAnnotatedTagTask(name, tagMessage) {
|
|
|
5014
7500
|
}
|
|
5015
7501
|
};
|
|
5016
7502
|
}
|
|
5017
|
-
var init_tag =
|
|
7503
|
+
var init_tag = __esm2({
|
|
5018
7504
|
"src/lib/tasks/tag.ts"() {
|
|
5019
7505
|
"use strict";
|
|
5020
7506
|
init_TagList();
|
|
@@ -6953,21 +9439,23 @@ function stringifyValidationError(error) {
|
|
|
6953
9439
|
}
|
|
6954
9440
|
|
|
6955
9441
|
// src/configuration/sdk/core/schemas/builders/schema-utils/JsonError.ts
|
|
6956
|
-
var JsonError = class
|
|
9442
|
+
var JsonError = class extends Error {
|
|
6957
9443
|
constructor(errors) {
|
|
6958
9444
|
super(errors.map(stringifyValidationError).join("; "));
|
|
6959
9445
|
this.errors = errors;
|
|
6960
|
-
Object.setPrototypeOf(this,
|
|
9446
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
9447
|
+
this.name = this.constructor.name;
|
|
6961
9448
|
}
|
|
6962
9449
|
errors;
|
|
6963
9450
|
};
|
|
6964
9451
|
|
|
6965
9452
|
// src/configuration/sdk/core/schemas/builders/schema-utils/ParseError.ts
|
|
6966
|
-
var ParseError = class
|
|
9453
|
+
var ParseError = class extends Error {
|
|
6967
9454
|
constructor(errors) {
|
|
6968
9455
|
super(errors.map(stringifyValidationError).join("; "));
|
|
6969
9456
|
this.errors = errors;
|
|
6970
|
-
Object.setPrototypeOf(this,
|
|
9457
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
9458
|
+
this.name = this.constructor.name;
|
|
6971
9459
|
}
|
|
6972
9460
|
errors;
|
|
6973
9461
|
};
|
|
@@ -8784,7 +11272,7 @@ var BlockList = class {
|
|
|
8784
11272
|
addBlock(block) {
|
|
8785
11273
|
if (this.hasBlock(block.id)) {
|
|
8786
11274
|
console.warn(`[readme] Duplicate block with id "${block.id}" detected; overriding with latest content`);
|
|
8787
|
-
this.blocks = this.blocks.filter((
|
|
11275
|
+
this.blocks = this.blocks.filter((b3) => b3.id !== block.id);
|
|
8788
11276
|
}
|
|
8789
11277
|
this.ids.add(block.id);
|
|
8790
11278
|
this.blocks.push(block);
|
|
@@ -8799,7 +11287,7 @@ var BlockList = class {
|
|
|
8799
11287
|
insertBlock(block, precedingBlockId) {
|
|
8800
11288
|
if (this.hasBlock(block.id)) {
|
|
8801
11289
|
console.warn(`[readme] Duplicate block with id "${block.id}" detected; overriding with latest content`);
|
|
8802
|
-
this.blocks = this.blocks.filter((
|
|
11290
|
+
this.blocks = this.blocks.filter((b3) => b3.id !== block.id);
|
|
8803
11291
|
this.ids.delete(block.id);
|
|
8804
11292
|
}
|
|
8805
11293
|
if (precedingBlockId === void 0) {
|
|
@@ -8811,7 +11299,7 @@ var BlockList = class {
|
|
|
8811
11299
|
}
|
|
8812
11300
|
this.ids.add(block.id);
|
|
8813
11301
|
this.blocks.splice(
|
|
8814
|
-
this.blocks.findIndex((
|
|
11302
|
+
this.blocks.findIndex((b3) => b3.id === precedingBlockId),
|
|
8815
11303
|
0,
|
|
8816
11304
|
block
|
|
8817
11305
|
);
|
|
@@ -9668,8 +12156,8 @@ function featureIDToTitle(featureID) {
|
|
|
9668
12156
|
function pascalCase(s) {
|
|
9669
12157
|
return (0, import_string2.upperFirst)((0, import_string2.camelCase)(s));
|
|
9670
12158
|
}
|
|
9671
|
-
function getMajorVersion(
|
|
9672
|
-
return
|
|
12159
|
+
function getMajorVersion(version2) {
|
|
12160
|
+
return version2.split(".")[0] ?? "0";
|
|
9673
12161
|
}
|
|
9674
12162
|
function assertNever(x2) {
|
|
9675
12163
|
throw new Error(`unexpected value: ${JSON.stringify(x2)}`);
|
|
@@ -10073,8 +12561,62 @@ var import_fs3 = require("fs");
|
|
|
10073
12561
|
var import_promises3 = require("fs/promises");
|
|
10074
12562
|
var import_path4 = require("path");
|
|
10075
12563
|
|
|
12564
|
+
// ../commons/logging-execa/lib/loggingExeca.js
|
|
12565
|
+
var import_execa = __toESM(require_execa(), 1);
|
|
12566
|
+
function wireSignal(childProcess, signal) {
|
|
12567
|
+
if (!signal) {
|
|
12568
|
+
return;
|
|
12569
|
+
}
|
|
12570
|
+
childProcess.catch(() => {
|
|
12571
|
+
});
|
|
12572
|
+
if (signal.aborted) {
|
|
12573
|
+
childProcess.kill();
|
|
12574
|
+
return;
|
|
12575
|
+
}
|
|
12576
|
+
const onAbort = () => {
|
|
12577
|
+
childProcess.kill();
|
|
12578
|
+
};
|
|
12579
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
12580
|
+
void childProcess.finally(() => signal.removeEventListener("abort", onAbort)).catch(() => {
|
|
12581
|
+
});
|
|
12582
|
+
}
|
|
12583
|
+
function runExeca(logger, executable, args = [], { doNotPipeOutput = false, secrets = [], substitutions = {}, signal, ...execaOptions } = {}) {
|
|
12584
|
+
const allSubstitutions = secrets.reduce((acc, secret) => ({
|
|
12585
|
+
...acc,
|
|
12586
|
+
[secret]: "<redacted>"
|
|
12587
|
+
}), substitutions);
|
|
12588
|
+
let logLine = [executable, ...args].join(" ");
|
|
12589
|
+
for (const [substitutionKey, substitutionValue] of Object.entries(allSubstitutions)) {
|
|
12590
|
+
logLine = logLine.replaceAll(substitutionKey, substitutionValue);
|
|
12591
|
+
}
|
|
12592
|
+
logger?.debug(`+ ${logLine}`);
|
|
12593
|
+
const childProcess = (0, import_execa.default)(executable, args, execaOptions);
|
|
12594
|
+
wireSignal(childProcess, signal);
|
|
12595
|
+
return childProcess;
|
|
12596
|
+
}
|
|
12597
|
+
async function loggingExeca(logger, executable, args = [], { doNotPipeOutput = false, secrets = [], substitutions = {}, signal, ...execaOptions } = {}) {
|
|
12598
|
+
const command = runExeca(logger, executable, args, {
|
|
12599
|
+
doNotPipeOutput,
|
|
12600
|
+
secrets,
|
|
12601
|
+
substitutions,
|
|
12602
|
+
signal,
|
|
12603
|
+
...execaOptions
|
|
12604
|
+
});
|
|
12605
|
+
if (!doNotPipeOutput) {
|
|
12606
|
+
command.stdout?.pipe(process.stdout);
|
|
12607
|
+
command.stderr?.pipe(process.stderr);
|
|
12608
|
+
}
|
|
12609
|
+
const result = await command;
|
|
12610
|
+
if (result.stdout == null) {
|
|
12611
|
+
result.stdout = "";
|
|
12612
|
+
}
|
|
12613
|
+
if (result.stderr == null) {
|
|
12614
|
+
result.stderr = "";
|
|
12615
|
+
}
|
|
12616
|
+
return result;
|
|
12617
|
+
}
|
|
12618
|
+
|
|
10076
12619
|
// src/autoversion/AutoVersioningService.ts
|
|
10077
|
-
var import_logging_execa = require("@fern-api/logging-execa");
|
|
10078
12620
|
var import_fs2 = require("fs");
|
|
10079
12621
|
var import_promises2 = require("fs/promises");
|
|
10080
12622
|
var import_path3 = require("path");
|
|
@@ -10402,7 +12944,7 @@ var AutoVersioningService = class _AutoVersioningService {
|
|
|
10402
12944
|
const ranked = fileSections.map((section) => ({
|
|
10403
12945
|
text: section.lines.join("\n"),
|
|
10404
12946
|
priority: this.classifySection(section)
|
|
10405
|
-
})).sort((a,
|
|
12947
|
+
})).sort((a, b3) => a.priority - b3.priority);
|
|
10406
12948
|
const chunks = [];
|
|
10407
12949
|
let currentChunkTexts = [];
|
|
10408
12950
|
let currentChunkBytes = 0;
|
|
@@ -10681,7 +13223,7 @@ var AutoVersioningService = class _AutoVersioningService {
|
|
|
10681
13223
|
*/
|
|
10682
13224
|
async getLatestVersionFromGitTags(workingDirectory) {
|
|
10683
13225
|
try {
|
|
10684
|
-
const result = await
|
|
13226
|
+
const result = await loggingExeca(this.logger, "git", ["ls-remote", "--tags", "origin"], {
|
|
10685
13227
|
cwd: workingDirectory,
|
|
10686
13228
|
doNotPipeOutput: true
|
|
10687
13229
|
});
|
|
@@ -10701,7 +13243,7 @@ var AutoVersioningService = class _AutoVersioningService {
|
|
|
10701
13243
|
tags.push(match[1]);
|
|
10702
13244
|
}
|
|
10703
13245
|
}
|
|
10704
|
-
const validTags = tags.filter((tag) => import_semver.default.valid(tag) != null).sort((a,
|
|
13246
|
+
const validTags = tags.filter((tag) => import_semver.default.valid(tag) != null).sort((a, b3) => import_semver.default.rcompare(a, b3));
|
|
10705
13247
|
if (validTags.length > 0) {
|
|
10706
13248
|
const latest = validTags[0];
|
|
10707
13249
|
this.logger.info(`Found latest version from git tags: ${latest}`);
|
|
@@ -10727,7 +13269,7 @@ var AutoVersioningService = class _AutoVersioningService {
|
|
|
10727
13269
|
const sedCommand = `s/${this.escapeForSed(mappedMagicVersion)}/${this.escapeForSed(finalVersion)}/g`;
|
|
10728
13270
|
let isGNUSed = false;
|
|
10729
13271
|
try {
|
|
10730
|
-
await
|
|
13272
|
+
await loggingExeca(this.logger, "sed", ["--version"], {
|
|
10731
13273
|
doNotPipeOutput: true
|
|
10732
13274
|
});
|
|
10733
13275
|
isGNUSed = true;
|
|
@@ -10740,7 +13282,7 @@ var AutoVersioningService = class _AutoVersioningService {
|
|
|
10740
13282
|
} else {
|
|
10741
13283
|
command = `find "${workingDirectory}" -type f -not -path "*/.git/*" -exec sed -i '' '${sedCommand}' {} +`;
|
|
10742
13284
|
}
|
|
10743
|
-
await
|
|
13285
|
+
await loggingExeca(this.logger, "bash", ["-c", command], {
|
|
10744
13286
|
cwd: workingDirectory,
|
|
10745
13287
|
doNotPipeOutput: true
|
|
10746
13288
|
});
|
|
@@ -10787,8 +13329,8 @@ var AutoVersioningService = class _AutoVersioningService {
|
|
|
10787
13329
|
* Extracts the major version number from a version string.
|
|
10788
13330
|
* Handles versions with or without 'v' prefix.
|
|
10789
13331
|
*/
|
|
10790
|
-
extractMajorVersion(
|
|
10791
|
-
const match =
|
|
13332
|
+
extractMajorVersion(version2) {
|
|
13333
|
+
const match = version2.match(/^v?(\d+)\./);
|
|
10792
13334
|
if (match?.[1] != null) {
|
|
10793
13335
|
return parseInt(match[1], 10);
|
|
10794
13336
|
}
|
|
@@ -10934,9 +13476,9 @@ var AutoVersioningService = class _AutoVersioningService {
|
|
|
10934
13476
|
const prevVersionPattern = /[-].*?([v]?\d+\.\d+\.\d+(?:-[\w.-]+)?(?:\+[\w.-]+)?)/;
|
|
10935
13477
|
const matcher = lineWithMagicVersion.match(prevVersionPattern);
|
|
10936
13478
|
if (matcher && matcher[1]) {
|
|
10937
|
-
const
|
|
10938
|
-
this.logger.info(`Extracted previous version from diff: ${
|
|
10939
|
-
return
|
|
13479
|
+
const version2 = matcher[1];
|
|
13480
|
+
this.logger.info(`Extracted previous version from diff: ${version2}`);
|
|
13481
|
+
return version2;
|
|
10940
13482
|
}
|
|
10941
13483
|
this.logger.warn("Could not extract previous version from diff line: " + lineWithMagicVersion);
|
|
10942
13484
|
return void 0;
|
|
@@ -10967,12 +13509,12 @@ var VERSION_BUMP_RANK = {
|
|
|
10967
13509
|
["PATCH" /* PATCH */]: 1,
|
|
10968
13510
|
["NO_CHANGE" /* NO_CHANGE */]: 0
|
|
10969
13511
|
};
|
|
10970
|
-
function maxVersionBump(a,
|
|
10971
|
-
return (VERSION_BUMP_RANK[a] ?? 0) >= (VERSION_BUMP_RANK[
|
|
13512
|
+
function maxVersionBump(a, b3) {
|
|
13513
|
+
return (VERSION_BUMP_RANK[a] ?? 0) >= (VERSION_BUMP_RANK[b3] ?? 0) ? a : b3;
|
|
10972
13514
|
}
|
|
10973
13515
|
var SEMVER_PATTERN = /^(v)?(\d+)\.(\d+)\.(\d+)(?:-([\w.-]+))?(?:\+([\w.-]+))?$/;
|
|
10974
|
-
function isValidSemver(
|
|
10975
|
-
return SEMVER_PATTERN.test(
|
|
13516
|
+
function isValidSemver(version2) {
|
|
13517
|
+
return SEMVER_PATTERN.test(version2);
|
|
10976
13518
|
}
|
|
10977
13519
|
function incrementVersion(currentVersion, versionBump) {
|
|
10978
13520
|
const matcher = currentVersion.match(SEMVER_PATTERN);
|
|
@@ -11265,8 +13807,8 @@ var AutoVersionStep = class extends BaseStep {
|
|
|
11265
13807
|
return void 0;
|
|
11266
13808
|
}
|
|
11267
13809
|
}
|
|
11268
|
-
normalizeVersionPrefix(
|
|
11269
|
-
const stripped =
|
|
13810
|
+
normalizeVersionPrefix(version2, mappedMagicVersion) {
|
|
13811
|
+
const stripped = version2.startsWith("v") ? version2.slice(1) : version2;
|
|
11270
13812
|
return mappedMagicVersion.startsWith("v") ? `v${stripped}` : stripped;
|
|
11271
13813
|
}
|
|
11272
13814
|
gitDiff(from, to) {
|
|
@@ -11295,10 +13837,10 @@ ${body}` : `${COMMIT_MARKER} ${subject}`;
|
|
|
11295
13837
|
}).trim();
|
|
11296
13838
|
}
|
|
11297
13839
|
async prependChangelogEntry(params) {
|
|
11298
|
-
const { version, entry } = params;
|
|
13840
|
+
const { version: version2, entry } = params;
|
|
11299
13841
|
const changelogPath = (0, import_path4.join)(this.outputDir, "changelog.md");
|
|
11300
13842
|
const now = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
11301
|
-
const header = `## [${
|
|
13843
|
+
const header = `## [${version2}] - ${now}
|
|
11302
13844
|
`;
|
|
11303
13845
|
const newBlock = `${header}${entry.trim()}
|
|
11304
13846
|
|
|
@@ -11334,7 +13876,7 @@ ${newBlock}${remainder}`;
|
|
|
11334
13876
|
return `${message.trimEnd()}${FERN_TRAILER}`;
|
|
11335
13877
|
}
|
|
11336
13878
|
async analyzeSingle(cleanedDiff, language, previousVersion) {
|
|
11337
|
-
const { client, VersionBump:
|
|
13879
|
+
const { client, VersionBump: VersionBump3 } = await this.loadBaml();
|
|
11338
13880
|
const result = await client.AnalyzeSdkDiff(
|
|
11339
13881
|
cleanedDiff,
|
|
11340
13882
|
language,
|
|
@@ -11342,7 +13884,7 @@ ${newBlock}${remainder}`;
|
|
|
11342
13884
|
this.config.priorChangelog ?? "",
|
|
11343
13885
|
this.config.specCommitMessage ?? ""
|
|
11344
13886
|
);
|
|
11345
|
-
if (result.version_bump ===
|
|
13887
|
+
if (result.version_bump === VersionBump3.NO_CHANGE) {
|
|
11346
13888
|
return null;
|
|
11347
13889
|
}
|
|
11348
13890
|
return {
|
|
@@ -11353,8 +13895,8 @@ ${newBlock}${remainder}`;
|
|
|
11353
13895
|
};
|
|
11354
13896
|
}
|
|
11355
13897
|
async analyzeChunks(chunks, language, previousVersion) {
|
|
11356
|
-
const { client, VersionBump:
|
|
11357
|
-
let bestBump =
|
|
13898
|
+
const { client, VersionBump: VersionBump3 } = await this.loadBaml();
|
|
13899
|
+
let bestBump = VersionBump3.NO_CHANGE;
|
|
11358
13900
|
let bestMessage = "";
|
|
11359
13901
|
let bestVersionBumpReason;
|
|
11360
13902
|
const changelogEntries = [];
|
|
@@ -11370,7 +13912,7 @@ ${newBlock}${remainder}`;
|
|
|
11370
13912
|
this.config.priorChangelog ?? "",
|
|
11371
13913
|
this.config.specCommitMessage ?? ""
|
|
11372
13914
|
);
|
|
11373
|
-
if (analysis.version_bump ===
|
|
13915
|
+
if (analysis.version_bump === VersionBump3.NO_CHANGE) {
|
|
11374
13916
|
continue;
|
|
11375
13917
|
}
|
|
11376
13918
|
const prev = bestBump;
|
|
@@ -11384,7 +13926,7 @@ ${newBlock}${remainder}`;
|
|
|
11384
13926
|
changelogEntries.push(entry);
|
|
11385
13927
|
}
|
|
11386
13928
|
}
|
|
11387
|
-
if (bestBump ===
|
|
13929
|
+
if (bestBump === VersionBump3.NO_CHANGE) {
|
|
11388
13930
|
return null;
|
|
11389
13931
|
}
|
|
11390
13932
|
if (changelogEntries.length <= 1) {
|
|
@@ -11431,7 +13973,7 @@ ${newBlock}${remainder}`;
|
|
|
11431
13973
|
if (this.config.ai == null) {
|
|
11432
13974
|
throw new Error("AutoVersionStep: ai config is missing. Set autoVersion.ai to a BAML provider+model pair.");
|
|
11433
13975
|
}
|
|
11434
|
-
const cliAi = await
|
|
13976
|
+
const cliAi = await Promise.resolve().then(() => (init_lib(), lib_exports));
|
|
11435
13977
|
const registry = cliAi.configureBamlClient(this.config.ai);
|
|
11436
13978
|
return {
|
|
11437
13979
|
client: cliAi.b.withOptions({ clientRegistry: registry }),
|
|
@@ -12006,7 +14548,14 @@ function hasNumericStatus(err) {
|
|
|
12006
14548
|
return typeof err === "object" && err != null && "status" in err && typeof err.status === "number";
|
|
12007
14549
|
}
|
|
12008
14550
|
function isNotFoundError(err) {
|
|
12009
|
-
|
|
14551
|
+
if (hasNumericStatus(err) && err.status === 404) {
|
|
14552
|
+
return true;
|
|
14553
|
+
}
|
|
14554
|
+
if (hasNumericStatus(err) && err.status === 422) {
|
|
14555
|
+
const message = extractErrorMessage(err).toLowerCase();
|
|
14556
|
+
return message.includes("reference does not exist");
|
|
14557
|
+
}
|
|
14558
|
+
return false;
|
|
12010
14559
|
}
|
|
12011
14560
|
function isNonFastForwardError(err) {
|
|
12012
14561
|
if (!hasNumericStatus(err) || err.status !== 422) {
|