@modern-js/repo-generator 0.0.0-canary-20221012094820 → 0.0.0-canary-20221013114431

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +8 -1585
  2. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -142949,6 +142949,11 @@ var require_logger4 = __commonJSMin((exports) => {
142949
142949
  label: "info",
142950
142950
  level: "info"
142951
142951
  },
142952
+ success: {
142953
+ color: "green",
142954
+ label: "Success",
142955
+ level: "info"
142956
+ },
142952
142957
  warn: {
142953
142958
  color: "yellow",
142954
142959
  label: "warn",
@@ -144526,1587 +144531,6 @@ var require_chainId2 = __commonJSMin((exports) => {
144526
144531
  }
144527
144532
  };
144528
144533
  });
144529
- var require_windows = __commonJSMin((exports, module2) => {
144530
- module2.exports = isexe;
144531
- isexe.sync = sync;
144532
- var fs4 = __require("fs");
144533
- function checkPathExt(path6, options3) {
144534
- var pathext = options3.pathExt !== void 0 ? options3.pathExt : process.env.PATHEXT;
144535
- if (!pathext) {
144536
- return true;
144537
- }
144538
- pathext = pathext.split(";");
144539
- if (pathext.indexOf("") !== -1) {
144540
- return true;
144541
- }
144542
- for (var i = 0; i < pathext.length; i++) {
144543
- var p = pathext[i].toLowerCase();
144544
- if (p && path6.substr(-p.length).toLowerCase() === p) {
144545
- return true;
144546
- }
144547
- }
144548
- return false;
144549
- }
144550
- function checkStat(stat, path6, options3) {
144551
- if (!stat.isSymbolicLink() && !stat.isFile()) {
144552
- return false;
144553
- }
144554
- return checkPathExt(path6, options3);
144555
- }
144556
- function isexe(path6, options3, cb) {
144557
- fs4.stat(path6, function(er, stat) {
144558
- cb(er, er ? false : checkStat(stat, path6, options3));
144559
- });
144560
- }
144561
- function sync(path6, options3) {
144562
- return checkStat(fs4.statSync(path6), path6, options3);
144563
- }
144564
- });
144565
- var require_mode = __commonJSMin((exports, module2) => {
144566
- module2.exports = isexe;
144567
- isexe.sync = sync;
144568
- var fs4 = __require("fs");
144569
- function isexe(path6, options3, cb) {
144570
- fs4.stat(path6, function(er, stat) {
144571
- cb(er, er ? false : checkStat(stat, options3));
144572
- });
144573
- }
144574
- function sync(path6, options3) {
144575
- return checkStat(fs4.statSync(path6), options3);
144576
- }
144577
- function checkStat(stat, options3) {
144578
- return stat.isFile() && checkMode(stat, options3);
144579
- }
144580
- function checkMode(stat, options3) {
144581
- var mod = stat.mode;
144582
- var uid2 = stat.uid;
144583
- var gid = stat.gid;
144584
- var myUid = options3.uid !== void 0 ? options3.uid : process.getuid && process.getuid();
144585
- var myGid = options3.gid !== void 0 ? options3.gid : process.getgid && process.getgid();
144586
- var u = parseInt("100", 8);
144587
- var g = parseInt("010", 8);
144588
- var o = parseInt("001", 8);
144589
- var ug = u | g;
144590
- var ret = mod & o || mod & g && gid === myGid || mod & u && uid2 === myUid || mod & ug && myUid === 0;
144591
- return ret;
144592
- }
144593
- });
144594
- var require_isexe = __commonJSMin((exports, module2) => {
144595
- var fs4 = __require("fs");
144596
- var core;
144597
- if (process.platform === "win32" || global.TESTING_WINDOWS) {
144598
- core = require_windows();
144599
- } else {
144600
- core = require_mode();
144601
- }
144602
- module2.exports = isexe;
144603
- isexe.sync = sync;
144604
- function isexe(path6, options3, cb) {
144605
- if (typeof options3 === "function") {
144606
- cb = options3;
144607
- options3 = {};
144608
- }
144609
- if (!cb) {
144610
- if (typeof Promise !== "function") {
144611
- throw new TypeError("callback not provided");
144612
- }
144613
- return new Promise(function(resolve, reject) {
144614
- isexe(path6, options3 || {}, function(er, is) {
144615
- if (er) {
144616
- reject(er);
144617
- } else {
144618
- resolve(is);
144619
- }
144620
- });
144621
- });
144622
- }
144623
- core(path6, options3 || {}, function(er, is) {
144624
- if (er) {
144625
- if (er.code === "EACCES" || options3 && options3.ignoreErrors) {
144626
- er = null;
144627
- is = false;
144628
- }
144629
- }
144630
- cb(er, is);
144631
- });
144632
- }
144633
- function sync(path6, options3) {
144634
- try {
144635
- return core.sync(path6, options3 || {});
144636
- } catch (er) {
144637
- if (options3 && options3.ignoreErrors || er.code === "EACCES") {
144638
- return false;
144639
- } else {
144640
- throw er;
144641
- }
144642
- }
144643
- }
144644
- });
144645
- var require_which = __commonJSMin((exports, module2) => {
144646
- var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
144647
- var path6 = __require("path");
144648
- var COLON = isWindows ? ";" : ":";
144649
- var isexe = require_isexe();
144650
- var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
144651
- var getPathInfo = (cmd, opt) => {
144652
- const colon = opt.colon || COLON;
144653
- const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
144654
- ...isWindows ? [process.cwd()] : [],
144655
- ...(opt.path || process.env.PATH || "").split(colon)
144656
- ];
144657
- const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
144658
- const pathExt = isWindows ? pathExtExe.split(colon) : [""];
144659
- if (isWindows) {
144660
- if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
144661
- pathExt.unshift("");
144662
- }
144663
- return {
144664
- pathEnv,
144665
- pathExt,
144666
- pathExtExe
144667
- };
144668
- };
144669
- var which = (cmd, opt, cb) => {
144670
- if (typeof opt === "function") {
144671
- cb = opt;
144672
- opt = {};
144673
- }
144674
- if (!opt)
144675
- opt = {};
144676
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
144677
- const found = [];
144678
- const step = (i) => new Promise((resolve, reject) => {
144679
- if (i === pathEnv.length)
144680
- return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
144681
- const ppRaw = pathEnv[i];
144682
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
144683
- const pCmd = path6.join(pathPart, cmd);
144684
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
144685
- resolve(subStep(p, i, 0));
144686
- });
144687
- const subStep = (p, i, ii) => new Promise((resolve, reject) => {
144688
- if (ii === pathExt.length)
144689
- return resolve(step(i + 1));
144690
- const ext = pathExt[ii];
144691
- isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
144692
- if (!er && is) {
144693
- if (opt.all)
144694
- found.push(p + ext);
144695
- else
144696
- return resolve(p + ext);
144697
- }
144698
- return resolve(subStep(p, i, ii + 1));
144699
- });
144700
- });
144701
- return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
144702
- };
144703
- var whichSync = (cmd, opt) => {
144704
- opt = opt || {};
144705
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
144706
- const found = [];
144707
- for (let i = 0; i < pathEnv.length; i++) {
144708
- const ppRaw = pathEnv[i];
144709
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
144710
- const pCmd = path6.join(pathPart, cmd);
144711
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
144712
- for (let j = 0; j < pathExt.length; j++) {
144713
- const cur = p + pathExt[j];
144714
- try {
144715
- const is = isexe.sync(cur, { pathExt: pathExtExe });
144716
- if (is) {
144717
- if (opt.all)
144718
- found.push(cur);
144719
- else
144720
- return cur;
144721
- }
144722
- } catch (ex) {
144723
- }
144724
- }
144725
- }
144726
- if (opt.all && found.length)
144727
- return found;
144728
- if (opt.nothrow)
144729
- return null;
144730
- throw getNotFoundError(cmd);
144731
- };
144732
- module2.exports = which;
144733
- which.sync = whichSync;
144734
- });
144735
- var require_path_key = __commonJSMin((exports, module2) => {
144736
- "use strict";
144737
- var pathKey = (options3 = {}) => {
144738
- const environment = options3.env || process.env;
144739
- const platform = options3.platform || process.platform;
144740
- if (platform !== "win32") {
144741
- return "PATH";
144742
- }
144743
- return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
144744
- };
144745
- module2.exports = pathKey;
144746
- module2.exports.default = pathKey;
144747
- });
144748
- var require_resolveCommand = __commonJSMin((exports, module2) => {
144749
- "use strict";
144750
- var path6 = __require("path");
144751
- var which = require_which();
144752
- var getPathKey = require_path_key();
144753
- function resolveCommandAttempt(parsed, withoutPathExt) {
144754
- const env = parsed.options.env || process.env;
144755
- const cwd = process.cwd();
144756
- const hasCustomCwd = parsed.options.cwd != null;
144757
- const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
144758
- if (shouldSwitchCwd) {
144759
- try {
144760
- process.chdir(parsed.options.cwd);
144761
- } catch (err) {
144762
- }
144763
- }
144764
- let resolved;
144765
- try {
144766
- resolved = which.sync(parsed.command, {
144767
- path: env[getPathKey({ env })],
144768
- pathExt: withoutPathExt ? path6.delimiter : void 0
144769
- });
144770
- } catch (e) {
144771
- } finally {
144772
- if (shouldSwitchCwd) {
144773
- process.chdir(cwd);
144774
- }
144775
- }
144776
- if (resolved) {
144777
- resolved = path6.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
144778
- }
144779
- return resolved;
144780
- }
144781
- function resolveCommand(parsed) {
144782
- return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
144783
- }
144784
- module2.exports = resolveCommand;
144785
- });
144786
- var require_escape = __commonJSMin((exports, module2) => {
144787
- "use strict";
144788
- var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
144789
- function escapeCommand(arg) {
144790
- arg = arg.replace(metaCharsRegExp, "^$1");
144791
- return arg;
144792
- }
144793
- function escapeArgument(arg, doubleEscapeMetaChars) {
144794
- arg = `${arg}`;
144795
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
144796
- arg = arg.replace(/(\\*)$/, "$1$1");
144797
- arg = `"${arg}"`;
144798
- arg = arg.replace(metaCharsRegExp, "^$1");
144799
- if (doubleEscapeMetaChars) {
144800
- arg = arg.replace(metaCharsRegExp, "^$1");
144801
- }
144802
- return arg;
144803
- }
144804
- module2.exports.command = escapeCommand;
144805
- module2.exports.argument = escapeArgument;
144806
- });
144807
- var require_shebang_regex = __commonJSMin((exports, module2) => {
144808
- "use strict";
144809
- module2.exports = /^#!(.*)/;
144810
- });
144811
- var require_shebang_command = __commonJSMin((exports, module2) => {
144812
- "use strict";
144813
- var shebangRegex = require_shebang_regex();
144814
- module2.exports = (string = "") => {
144815
- const match = string.match(shebangRegex);
144816
- if (!match) {
144817
- return null;
144818
- }
144819
- const [path6, argument] = match[0].replace(/#! ?/, "").split(" ");
144820
- const binary = path6.split("/").pop();
144821
- if (binary === "env") {
144822
- return argument;
144823
- }
144824
- return argument ? `${binary} ${argument}` : binary;
144825
- };
144826
- });
144827
- var require_readShebang = __commonJSMin((exports, module2) => {
144828
- "use strict";
144829
- var fs4 = __require("fs");
144830
- var shebangCommand = require_shebang_command();
144831
- function readShebang(command) {
144832
- const size = 150;
144833
- const buffer = Buffer.alloc(size);
144834
- let fd;
144835
- try {
144836
- fd = fs4.openSync(command, "r");
144837
- fs4.readSync(fd, buffer, 0, size, 0);
144838
- fs4.closeSync(fd);
144839
- } catch (e) {
144840
- }
144841
- return shebangCommand(buffer.toString());
144842
- }
144843
- module2.exports = readShebang;
144844
- });
144845
- var require_parse3 = __commonJSMin((exports, module2) => {
144846
- "use strict";
144847
- var path6 = __require("path");
144848
- var resolveCommand = require_resolveCommand();
144849
- var escape = require_escape();
144850
- var readShebang = require_readShebang();
144851
- var isWin = process.platform === "win32";
144852
- var isExecutableRegExp = /\.(?:com|exe)$/i;
144853
- var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
144854
- function detectShebang(parsed) {
144855
- parsed.file = resolveCommand(parsed);
144856
- const shebang = parsed.file && readShebang(parsed.file);
144857
- if (shebang) {
144858
- parsed.args.unshift(parsed.file);
144859
- parsed.command = shebang;
144860
- return resolveCommand(parsed);
144861
- }
144862
- return parsed.file;
144863
- }
144864
- function parseNonShell(parsed) {
144865
- if (!isWin) {
144866
- return parsed;
144867
- }
144868
- const commandFile = detectShebang(parsed);
144869
- const needsShell = !isExecutableRegExp.test(commandFile);
144870
- if (parsed.options.forceShell || needsShell) {
144871
- const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
144872
- parsed.command = path6.normalize(parsed.command);
144873
- parsed.command = escape.command(parsed.command);
144874
- parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
144875
- const shellCommand = [parsed.command].concat(parsed.args).join(" ");
144876
- parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
144877
- parsed.command = process.env.comspec || "cmd.exe";
144878
- parsed.options.windowsVerbatimArguments = true;
144879
- }
144880
- return parsed;
144881
- }
144882
- function parse2(command, args, options3) {
144883
- if (args && !Array.isArray(args)) {
144884
- options3 = args;
144885
- args = null;
144886
- }
144887
- args = args ? args.slice(0) : [];
144888
- options3 = Object.assign({}, options3);
144889
- const parsed = {
144890
- command,
144891
- args,
144892
- options: options3,
144893
- file: void 0,
144894
- original: {
144895
- command,
144896
- args
144897
- }
144898
- };
144899
- return options3.shell ? parsed : parseNonShell(parsed);
144900
- }
144901
- module2.exports = parse2;
144902
- });
144903
- var require_enoent = __commonJSMin((exports, module2) => {
144904
- "use strict";
144905
- var isWin = process.platform === "win32";
144906
- function notFoundError(original, syscall) {
144907
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
144908
- code: "ENOENT",
144909
- errno: "ENOENT",
144910
- syscall: `${syscall} ${original.command}`,
144911
- path: original.command,
144912
- spawnargs: original.args
144913
- });
144914
- }
144915
- function hookChildProcess(cp, parsed) {
144916
- if (!isWin) {
144917
- return;
144918
- }
144919
- const originalEmit = cp.emit;
144920
- cp.emit = function(name5, arg1) {
144921
- if (name5 === "exit") {
144922
- const err = verifyENOENT(arg1, parsed, "spawn");
144923
- if (err) {
144924
- return originalEmit.call(cp, "error", err);
144925
- }
144926
- }
144927
- return originalEmit.apply(cp, arguments);
144928
- };
144929
- }
144930
- function verifyENOENT(status, parsed) {
144931
- if (isWin && status === 1 && !parsed.file) {
144932
- return notFoundError(parsed.original, "spawn");
144933
- }
144934
- return null;
144935
- }
144936
- function verifyENOENTSync(status, parsed) {
144937
- if (isWin && status === 1 && !parsed.file) {
144938
- return notFoundError(parsed.original, "spawnSync");
144939
- }
144940
- return null;
144941
- }
144942
- module2.exports = {
144943
- hookChildProcess,
144944
- verifyENOENT,
144945
- verifyENOENTSync,
144946
- notFoundError
144947
- };
144948
- });
144949
- var require_cross_spawn = __commonJSMin((exports, module2) => {
144950
- "use strict";
144951
- var cp = __require("child_process");
144952
- var parse2 = require_parse3();
144953
- var enoent = require_enoent();
144954
- function spawn(command, args, options3) {
144955
- const parsed = parse2(command, args, options3);
144956
- const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
144957
- enoent.hookChildProcess(spawned, parsed);
144958
- return spawned;
144959
- }
144960
- function spawnSync(command, args, options3) {
144961
- const parsed = parse2(command, args, options3);
144962
- const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
144963
- result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
144964
- return result;
144965
- }
144966
- module2.exports = spawn;
144967
- module2.exports.spawn = spawn;
144968
- module2.exports.sync = spawnSync;
144969
- module2.exports._parse = parse2;
144970
- module2.exports._enoent = enoent;
144971
- });
144972
- var require_strip_final_newline = __commonJSMin((exports, module2) => {
144973
- "use strict";
144974
- module2.exports = (input) => {
144975
- const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
144976
- const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
144977
- if (input[input.length - 1] === LF) {
144978
- input = input.slice(0, input.length - 1);
144979
- }
144980
- if (input[input.length - 1] === CR) {
144981
- input = input.slice(0, input.length - 1);
144982
- }
144983
- return input;
144984
- };
144985
- });
144986
- var require_npm_run_path = __commonJSMin((exports, module2) => {
144987
- "use strict";
144988
- var path6 = __require("path");
144989
- var pathKey = require_path_key();
144990
- var npmRunPath = (options3) => {
144991
- options3 = {
144992
- cwd: process.cwd(),
144993
- path: process.env[pathKey()],
144994
- execPath: process.execPath,
144995
- ...options3
144996
- };
144997
- let previous;
144998
- let cwdPath = path6.resolve(options3.cwd);
144999
- const result = [];
145000
- while (previous !== cwdPath) {
145001
- result.push(path6.join(cwdPath, "node_modules/.bin"));
145002
- previous = cwdPath;
145003
- cwdPath = path6.resolve(cwdPath, "..");
145004
- }
145005
- const execPathDir = path6.resolve(options3.cwd, options3.execPath, "..");
145006
- result.push(execPathDir);
145007
- return result.concat(options3.path).join(path6.delimiter);
145008
- };
145009
- module2.exports = npmRunPath;
145010
- module2.exports.default = npmRunPath;
145011
- module2.exports.env = (options3) => {
145012
- options3 = {
145013
- env: process.env,
145014
- ...options3
145015
- };
145016
- const env = { ...options3.env };
145017
- const path7 = pathKey({ env });
145018
- options3.path = env[path7];
145019
- env[path7] = module2.exports(options3);
145020
- return env;
145021
- };
145022
- });
145023
- var require_core = __commonJSMin((exports) => {
145024
- "use strict";
145025
- Object.defineProperty(exports, "__esModule", { value: true });
145026
- exports.SIGNALS = void 0;
145027
- var SIGNALS = [
145028
- {
145029
- name: "SIGHUP",
145030
- number: 1,
145031
- action: "terminate",
145032
- description: "Terminal closed",
145033
- standard: "posix"
145034
- },
145035
- {
145036
- name: "SIGINT",
145037
- number: 2,
145038
- action: "terminate",
145039
- description: "User interruption with CTRL-C",
145040
- standard: "ansi"
145041
- },
145042
- {
145043
- name: "SIGQUIT",
145044
- number: 3,
145045
- action: "core",
145046
- description: "User interruption with CTRL-\\",
145047
- standard: "posix"
145048
- },
145049
- {
145050
- name: "SIGILL",
145051
- number: 4,
145052
- action: "core",
145053
- description: "Invalid machine instruction",
145054
- standard: "ansi"
145055
- },
145056
- {
145057
- name: "SIGTRAP",
145058
- number: 5,
145059
- action: "core",
145060
- description: "Debugger breakpoint",
145061
- standard: "posix"
145062
- },
145063
- {
145064
- name: "SIGABRT",
145065
- number: 6,
145066
- action: "core",
145067
- description: "Aborted",
145068
- standard: "ansi"
145069
- },
145070
- {
145071
- name: "SIGIOT",
145072
- number: 6,
145073
- action: "core",
145074
- description: "Aborted",
145075
- standard: "bsd"
145076
- },
145077
- {
145078
- name: "SIGBUS",
145079
- number: 7,
145080
- action: "core",
145081
- description: "Bus error due to misaligned, non-existing address or paging error",
145082
- standard: "bsd"
145083
- },
145084
- {
145085
- name: "SIGEMT",
145086
- number: 7,
145087
- action: "terminate",
145088
- description: "Command should be emulated but is not implemented",
145089
- standard: "other"
145090
- },
145091
- {
145092
- name: "SIGFPE",
145093
- number: 8,
145094
- action: "core",
145095
- description: "Floating point arithmetic error",
145096
- standard: "ansi"
145097
- },
145098
- {
145099
- name: "SIGKILL",
145100
- number: 9,
145101
- action: "terminate",
145102
- description: "Forced termination",
145103
- standard: "posix",
145104
- forced: true
145105
- },
145106
- {
145107
- name: "SIGUSR1",
145108
- number: 10,
145109
- action: "terminate",
145110
- description: "Application-specific signal",
145111
- standard: "posix"
145112
- },
145113
- {
145114
- name: "SIGSEGV",
145115
- number: 11,
145116
- action: "core",
145117
- description: "Segmentation fault",
145118
- standard: "ansi"
145119
- },
145120
- {
145121
- name: "SIGUSR2",
145122
- number: 12,
145123
- action: "terminate",
145124
- description: "Application-specific signal",
145125
- standard: "posix"
145126
- },
145127
- {
145128
- name: "SIGPIPE",
145129
- number: 13,
145130
- action: "terminate",
145131
- description: "Broken pipe or socket",
145132
- standard: "posix"
145133
- },
145134
- {
145135
- name: "SIGALRM",
145136
- number: 14,
145137
- action: "terminate",
145138
- description: "Timeout or timer",
145139
- standard: "posix"
145140
- },
145141
- {
145142
- name: "SIGTERM",
145143
- number: 15,
145144
- action: "terminate",
145145
- description: "Termination",
145146
- standard: "ansi"
145147
- },
145148
- {
145149
- name: "SIGSTKFLT",
145150
- number: 16,
145151
- action: "terminate",
145152
- description: "Stack is empty or overflowed",
145153
- standard: "other"
145154
- },
145155
- {
145156
- name: "SIGCHLD",
145157
- number: 17,
145158
- action: "ignore",
145159
- description: "Child process terminated, paused or unpaused",
145160
- standard: "posix"
145161
- },
145162
- {
145163
- name: "SIGCLD",
145164
- number: 17,
145165
- action: "ignore",
145166
- description: "Child process terminated, paused or unpaused",
145167
- standard: "other"
145168
- },
145169
- {
145170
- name: "SIGCONT",
145171
- number: 18,
145172
- action: "unpause",
145173
- description: "Unpaused",
145174
- standard: "posix",
145175
- forced: true
145176
- },
145177
- {
145178
- name: "SIGSTOP",
145179
- number: 19,
145180
- action: "pause",
145181
- description: "Paused",
145182
- standard: "posix",
145183
- forced: true
145184
- },
145185
- {
145186
- name: "SIGTSTP",
145187
- number: 20,
145188
- action: "pause",
145189
- description: 'Paused using CTRL-Z or "suspend"',
145190
- standard: "posix"
145191
- },
145192
- {
145193
- name: "SIGTTIN",
145194
- number: 21,
145195
- action: "pause",
145196
- description: "Background process cannot read terminal input",
145197
- standard: "posix"
145198
- },
145199
- {
145200
- name: "SIGBREAK",
145201
- number: 21,
145202
- action: "terminate",
145203
- description: "User interruption with CTRL-BREAK",
145204
- standard: "other"
145205
- },
145206
- {
145207
- name: "SIGTTOU",
145208
- number: 22,
145209
- action: "pause",
145210
- description: "Background process cannot write to terminal output",
145211
- standard: "posix"
145212
- },
145213
- {
145214
- name: "SIGURG",
145215
- number: 23,
145216
- action: "ignore",
145217
- description: "Socket received out-of-band data",
145218
- standard: "bsd"
145219
- },
145220
- {
145221
- name: "SIGXCPU",
145222
- number: 24,
145223
- action: "core",
145224
- description: "Process timed out",
145225
- standard: "bsd"
145226
- },
145227
- {
145228
- name: "SIGXFSZ",
145229
- number: 25,
145230
- action: "core",
145231
- description: "File too big",
145232
- standard: "bsd"
145233
- },
145234
- {
145235
- name: "SIGVTALRM",
145236
- number: 26,
145237
- action: "terminate",
145238
- description: "Timeout or timer",
145239
- standard: "bsd"
145240
- },
145241
- {
145242
- name: "SIGPROF",
145243
- number: 27,
145244
- action: "terminate",
145245
- description: "Timeout or timer",
145246
- standard: "bsd"
145247
- },
145248
- {
145249
- name: "SIGWINCH",
145250
- number: 28,
145251
- action: "ignore",
145252
- description: "Terminal window size changed",
145253
- standard: "bsd"
145254
- },
145255
- {
145256
- name: "SIGIO",
145257
- number: 29,
145258
- action: "terminate",
145259
- description: "I/O is available",
145260
- standard: "other"
145261
- },
145262
- {
145263
- name: "SIGPOLL",
145264
- number: 29,
145265
- action: "terminate",
145266
- description: "Watched event",
145267
- standard: "other"
145268
- },
145269
- {
145270
- name: "SIGINFO",
145271
- number: 29,
145272
- action: "ignore",
145273
- description: "Request for process information",
145274
- standard: "other"
145275
- },
145276
- {
145277
- name: "SIGPWR",
145278
- number: 30,
145279
- action: "terminate",
145280
- description: "Device running out of power",
145281
- standard: "systemv"
145282
- },
145283
- {
145284
- name: "SIGSYS",
145285
- number: 31,
145286
- action: "core",
145287
- description: "Invalid system call",
145288
- standard: "other"
145289
- },
145290
- {
145291
- name: "SIGUNUSED",
145292
- number: 31,
145293
- action: "terminate",
145294
- description: "Invalid system call",
145295
- standard: "other"
145296
- }
145297
- ];
145298
- exports.SIGNALS = SIGNALS;
145299
- });
145300
- var require_realtime = __commonJSMin((exports) => {
145301
- "use strict";
145302
- Object.defineProperty(exports, "__esModule", { value: true });
145303
- exports.SIGRTMAX = exports.getRealtimeSignals = void 0;
145304
- var getRealtimeSignals = function() {
145305
- const length = SIGRTMAX - SIGRTMIN + 1;
145306
- return Array.from({ length }, getRealtimeSignal);
145307
- };
145308
- exports.getRealtimeSignals = getRealtimeSignals;
145309
- var getRealtimeSignal = function(value, index) {
145310
- return {
145311
- name: `SIGRT${index + 1}`,
145312
- number: SIGRTMIN + index,
145313
- action: "terminate",
145314
- description: "Application-specific signal (realtime)",
145315
- standard: "posix"
145316
- };
145317
- };
145318
- var SIGRTMIN = 34;
145319
- var SIGRTMAX = 64;
145320
- exports.SIGRTMAX = SIGRTMAX;
145321
- });
145322
- var require_signals2 = __commonJSMin((exports) => {
145323
- "use strict";
145324
- Object.defineProperty(exports, "__esModule", { value: true });
145325
- exports.getSignals = void 0;
145326
- var _os = __require("os");
145327
- var _core = require_core();
145328
- var _realtime = require_realtime();
145329
- var getSignals = function() {
145330
- const realtimeSignals = (0, _realtime.getRealtimeSignals)();
145331
- const signals = [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal);
145332
- return signals;
145333
- };
145334
- exports.getSignals = getSignals;
145335
- var normalizeSignal = function({
145336
- name: name5,
145337
- number: defaultNumber,
145338
- description: description3,
145339
- action: action3,
145340
- forced = false,
145341
- standard
145342
- }) {
145343
- const {
145344
- signals: { [name5]: constantSignal }
145345
- } = _os.constants;
145346
- const supported = constantSignal !== void 0;
145347
- const number = supported ? constantSignal : defaultNumber;
145348
- return { name: name5, number, description: description3, supported, action: action3, forced, standard };
145349
- };
145350
- });
145351
- var require_main2 = __commonJSMin((exports) => {
145352
- "use strict";
145353
- Object.defineProperty(exports, "__esModule", { value: true });
145354
- exports.signalsByNumber = exports.signalsByName = void 0;
145355
- var _os = __require("os");
145356
- var _signals = require_signals2();
145357
- var _realtime = require_realtime();
145358
- var getSignalsByName = function() {
145359
- const signals = (0, _signals.getSignals)();
145360
- return signals.reduce(getSignalByName, {});
145361
- };
145362
- var getSignalByName = function(signalByNameMemo, { name: name5, number, description: description3, supported, action: action3, forced, standard }) {
145363
- return {
145364
- ...signalByNameMemo,
145365
- [name5]: { name: name5, number, description: description3, supported, action: action3, forced, standard }
145366
- };
145367
- };
145368
- var signalsByName = getSignalsByName();
145369
- exports.signalsByName = signalsByName;
145370
- var getSignalsByNumber = function() {
145371
- const signals = (0, _signals.getSignals)();
145372
- const length = _realtime.SIGRTMAX + 1;
145373
- const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals));
145374
- return Object.assign({}, ...signalsA);
145375
- };
145376
- var getSignalByNumber = function(number, signals) {
145377
- const signal = findSignalByNumber(number, signals);
145378
- if (signal === void 0) {
145379
- return {};
145380
- }
145381
- const { name: name5, description: description3, supported, action: action3, forced, standard } = signal;
145382
- return {
145383
- [number]: {
145384
- name: name5,
145385
- number,
145386
- description: description3,
145387
- supported,
145388
- action: action3,
145389
- forced,
145390
- standard
145391
- }
145392
- };
145393
- };
145394
- var findSignalByNumber = function(number, signals) {
145395
- const signal = signals.find(({ name: name5 }) => _os.constants.signals[name5] === number);
145396
- if (signal !== void 0) {
145397
- return signal;
145398
- }
145399
- return signals.find((signalA) => signalA.number === number);
145400
- };
145401
- var signalsByNumber = getSignalsByNumber();
145402
- exports.signalsByNumber = signalsByNumber;
145403
- });
145404
- var require_error = __commonJSMin((exports, module2) => {
145405
- "use strict";
145406
- var { signalsByName } = require_main2();
145407
- var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
145408
- if (timedOut) {
145409
- return `timed out after ${timeout} milliseconds`;
145410
- }
145411
- if (isCanceled) {
145412
- return "was canceled";
145413
- }
145414
- if (errorCode !== void 0) {
145415
- return `failed with ${errorCode}`;
145416
- }
145417
- if (signal !== void 0) {
145418
- return `was killed with ${signal} (${signalDescription})`;
145419
- }
145420
- if (exitCode !== void 0) {
145421
- return `failed with exit code ${exitCode}`;
145422
- }
145423
- return "failed";
145424
- };
145425
- var makeError = ({
145426
- stdout,
145427
- stderr,
145428
- all,
145429
- error,
145430
- signal,
145431
- exitCode,
145432
- command,
145433
- escapedCommand,
145434
- timedOut,
145435
- isCanceled,
145436
- killed,
145437
- parsed: { options: { timeout } }
145438
- }) => {
145439
- exitCode = exitCode === null ? void 0 : exitCode;
145440
- signal = signal === null ? void 0 : signal;
145441
- const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description;
145442
- const errorCode = error && error.code;
145443
- const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled });
145444
- const execaMessage = `Command ${prefix}: ${command}`;
145445
- const isError = Object.prototype.toString.call(error) === "[object Error]";
145446
- const shortMessage = isError ? `${execaMessage}
145447
- ${error.message}` : execaMessage;
145448
- const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n");
145449
- if (isError) {
145450
- error.originalMessage = error.message;
145451
- error.message = message;
145452
- } else {
145453
- error = new Error(message);
145454
- }
145455
- error.shortMessage = shortMessage;
145456
- error.command = command;
145457
- error.escapedCommand = escapedCommand;
145458
- error.exitCode = exitCode;
145459
- error.signal = signal;
145460
- error.signalDescription = signalDescription;
145461
- error.stdout = stdout;
145462
- error.stderr = stderr;
145463
- if (all !== void 0) {
145464
- error.all = all;
145465
- }
145466
- if ("bufferedData" in error) {
145467
- delete error.bufferedData;
145468
- }
145469
- error.failed = true;
145470
- error.timedOut = Boolean(timedOut);
145471
- error.isCanceled = isCanceled;
145472
- error.killed = killed && !timedOut;
145473
- return error;
145474
- };
145475
- module2.exports = makeError;
145476
- });
145477
- var require_stdio = __commonJSMin((exports, module2) => {
145478
- "use strict";
145479
- var aliases = ["stdin", "stdout", "stderr"];
145480
- var hasAlias = (options3) => aliases.some((alias) => options3[alias] !== void 0);
145481
- var normalizeStdio = (options3) => {
145482
- if (!options3) {
145483
- return;
145484
- }
145485
- const { stdio } = options3;
145486
- if (stdio === void 0) {
145487
- return aliases.map((alias) => options3[alias]);
145488
- }
145489
- if (hasAlias(options3)) {
145490
- throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`);
145491
- }
145492
- if (typeof stdio === "string") {
145493
- return stdio;
145494
- }
145495
- if (!Array.isArray(stdio)) {
145496
- throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
145497
- }
145498
- const length = Math.max(stdio.length, aliases.length);
145499
- return Array.from({ length }, (value, index) => stdio[index]);
145500
- };
145501
- module2.exports = normalizeStdio;
145502
- module2.exports.node = (options3) => {
145503
- const stdio = normalizeStdio(options3);
145504
- if (stdio === "ipc") {
145505
- return "ipc";
145506
- }
145507
- if (stdio === void 0 || typeof stdio === "string") {
145508
- return [stdio, stdio, stdio, "ipc"];
145509
- }
145510
- if (stdio.includes("ipc")) {
145511
- return stdio;
145512
- }
145513
- return [...stdio, "ipc"];
145514
- };
145515
- });
145516
- var require_kill = __commonJSMin((exports, module2) => {
145517
- "use strict";
145518
- var os = __require("os");
145519
- var onExit = require_signal_exit();
145520
- var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
145521
- var spawnedKill = (kill, signal = "SIGTERM", options3 = {}) => {
145522
- const killResult = kill(signal);
145523
- setKillTimeout(kill, signal, options3, killResult);
145524
- return killResult;
145525
- };
145526
- var setKillTimeout = (kill, signal, options3, killResult) => {
145527
- if (!shouldForceKill(signal, options3, killResult)) {
145528
- return;
145529
- }
145530
- const timeout = getForceKillAfterTimeout(options3);
145531
- const t = setTimeout(() => {
145532
- kill("SIGKILL");
145533
- }, timeout);
145534
- if (t.unref) {
145535
- t.unref();
145536
- }
145537
- };
145538
- var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => {
145539
- return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
145540
- };
145541
- var isSigterm = (signal) => {
145542
- return signal === os.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
145543
- };
145544
- var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
145545
- if (forceKillAfterTimeout === true) {
145546
- return DEFAULT_FORCE_KILL_TIMEOUT;
145547
- }
145548
- if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
145549
- throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
145550
- }
145551
- return forceKillAfterTimeout;
145552
- };
145553
- var spawnedCancel = (spawned, context) => {
145554
- const killResult = spawned.kill();
145555
- if (killResult) {
145556
- context.isCanceled = true;
145557
- }
145558
- };
145559
- var timeoutKill = (spawned, signal, reject) => {
145560
- spawned.kill(signal);
145561
- reject(Object.assign(new Error("Timed out"), { timedOut: true, signal }));
145562
- };
145563
- var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => {
145564
- if (timeout === 0 || timeout === void 0) {
145565
- return spawnedPromise;
145566
- }
145567
- let timeoutId;
145568
- const timeoutPromise2 = new Promise((resolve, reject) => {
145569
- timeoutId = setTimeout(() => {
145570
- timeoutKill(spawned, killSignal, reject);
145571
- }, timeout);
145572
- });
145573
- const safeSpawnedPromise = spawnedPromise.finally(() => {
145574
- clearTimeout(timeoutId);
145575
- });
145576
- return Promise.race([timeoutPromise2, safeSpawnedPromise]);
145577
- };
145578
- var validateTimeout = ({ timeout }) => {
145579
- if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) {
145580
- throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
145581
- }
145582
- };
145583
- var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
145584
- if (!cleanup || detached) {
145585
- return timedPromise;
145586
- }
145587
- const removeExitHandler = onExit(() => {
145588
- spawned.kill();
145589
- });
145590
- return timedPromise.finally(() => {
145591
- removeExitHandler();
145592
- });
145593
- };
145594
- module2.exports = {
145595
- spawnedKill,
145596
- spawnedCancel,
145597
- setupTimeout,
145598
- validateTimeout,
145599
- setExitHandler
145600
- };
145601
- });
145602
- var require_is_stream = __commonJSMin((exports, module2) => {
145603
- "use strict";
145604
- var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
145605
- isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
145606
- isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object";
145607
- isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream);
145608
- isStream.transform = (stream) => isStream.duplex(stream) && typeof stream._transform === "function";
145609
- module2.exports = isStream;
145610
- });
145611
- var require_buffer_stream = __commonJSMin((exports, module2) => {
145612
- "use strict";
145613
- var { PassThrough: PassThroughStream } = __require("stream");
145614
- module2.exports = (options3) => {
145615
- options3 = { ...options3 };
145616
- const { array } = options3;
145617
- let { encoding } = options3;
145618
- const isBuffer = encoding === "buffer";
145619
- let objectMode = false;
145620
- if (array) {
145621
- objectMode = !(encoding || isBuffer);
145622
- } else {
145623
- encoding = encoding || "utf8";
145624
- }
145625
- if (isBuffer) {
145626
- encoding = null;
145627
- }
145628
- const stream = new PassThroughStream({ objectMode });
145629
- if (encoding) {
145630
- stream.setEncoding(encoding);
145631
- }
145632
- let length = 0;
145633
- const chunks = [];
145634
- stream.on("data", (chunk) => {
145635
- chunks.push(chunk);
145636
- if (objectMode) {
145637
- length = chunks.length;
145638
- } else {
145639
- length += chunk.length;
145640
- }
145641
- });
145642
- stream.getBufferedValue = () => {
145643
- if (array) {
145644
- return chunks;
145645
- }
145646
- return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
145647
- };
145648
- stream.getBufferedLength = () => length;
145649
- return stream;
145650
- };
145651
- });
145652
- var require_get_stream = __commonJSMin((exports, module2) => {
145653
- "use strict";
145654
- var { constants: BufferConstants } = __require("buffer");
145655
- var stream = __require("stream");
145656
- var { promisify } = __require("util");
145657
- var bufferStream = require_buffer_stream();
145658
- var streamPipelinePromisified = promisify(stream.pipeline);
145659
- var MaxBufferError = class extends Error {
145660
- constructor() {
145661
- super("maxBuffer exceeded");
145662
- this.name = "MaxBufferError";
145663
- }
145664
- };
145665
- async function getStream(inputStream, options3) {
145666
- if (!inputStream) {
145667
- throw new Error("Expected a stream");
145668
- }
145669
- options3 = {
145670
- maxBuffer: Infinity,
145671
- ...options3
145672
- };
145673
- const { maxBuffer } = options3;
145674
- const stream2 = bufferStream(options3);
145675
- await new Promise((resolve, reject) => {
145676
- const rejectPromise = (error) => {
145677
- if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
145678
- error.bufferedData = stream2.getBufferedValue();
145679
- }
145680
- reject(error);
145681
- };
145682
- (async () => {
145683
- try {
145684
- await streamPipelinePromisified(inputStream, stream2);
145685
- resolve();
145686
- } catch (error) {
145687
- rejectPromise(error);
145688
- }
145689
- })();
145690
- stream2.on("data", () => {
145691
- if (stream2.getBufferedLength() > maxBuffer) {
145692
- rejectPromise(new MaxBufferError());
145693
- }
145694
- });
145695
- });
145696
- return stream2.getBufferedValue();
145697
- }
145698
- module2.exports = getStream;
145699
- module2.exports.buffer = (stream2, options3) => getStream(stream2, { ...options3, encoding: "buffer" });
145700
- module2.exports.array = (stream2, options3) => getStream(stream2, { ...options3, array: true });
145701
- module2.exports.MaxBufferError = MaxBufferError;
145702
- });
145703
- var require_merge_stream = __commonJSMin((exports, module2) => {
145704
- "use strict";
145705
- var { PassThrough } = __require("stream");
145706
- module2.exports = function() {
145707
- var sources = [];
145708
- var output2 = new PassThrough({ objectMode: true });
145709
- output2.setMaxListeners(0);
145710
- output2.add = add;
145711
- output2.isEmpty = isEmpty2;
145712
- output2.on("unpipe", remove);
145713
- Array.prototype.slice.call(arguments).forEach(add);
145714
- return output2;
145715
- function add(source) {
145716
- if (Array.isArray(source)) {
145717
- source.forEach(add);
145718
- return this;
145719
- }
145720
- sources.push(source);
145721
- source.once("end", remove.bind(null, source));
145722
- source.once("error", output2.emit.bind(output2, "error"));
145723
- source.pipe(output2, { end: false });
145724
- return this;
145725
- }
145726
- function isEmpty2() {
145727
- return sources.length == 0;
145728
- }
145729
- function remove(source) {
145730
- sources = sources.filter(function(it) {
145731
- return it !== source;
145732
- });
145733
- if (!sources.length && output2.readable) {
145734
- output2.end();
145735
- }
145736
- }
145737
- };
145738
- });
145739
- var require_stream2 = __commonJSMin((exports, module2) => {
145740
- "use strict";
145741
- var isStream = require_is_stream();
145742
- var getStream = require_get_stream();
145743
- var mergeStream = require_merge_stream();
145744
- var handleInput = (spawned, input) => {
145745
- if (input === void 0 || spawned.stdin === void 0) {
145746
- return;
145747
- }
145748
- if (isStream(input)) {
145749
- input.pipe(spawned.stdin);
145750
- } else {
145751
- spawned.stdin.end(input);
145752
- }
145753
- };
145754
- var makeAllStream = (spawned, { all }) => {
145755
- if (!all || !spawned.stdout && !spawned.stderr) {
145756
- return;
145757
- }
145758
- const mixed = mergeStream();
145759
- if (spawned.stdout) {
145760
- mixed.add(spawned.stdout);
145761
- }
145762
- if (spawned.stderr) {
145763
- mixed.add(spawned.stderr);
145764
- }
145765
- return mixed;
145766
- };
145767
- var getBufferedData = async (stream, streamPromise) => {
145768
- if (!stream) {
145769
- return;
145770
- }
145771
- stream.destroy();
145772
- try {
145773
- return await streamPromise;
145774
- } catch (error) {
145775
- return error.bufferedData;
145776
- }
145777
- };
145778
- var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
145779
- if (!stream || !buffer) {
145780
- return;
145781
- }
145782
- if (encoding) {
145783
- return getStream(stream, { encoding, maxBuffer });
145784
- }
145785
- return getStream.buffer(stream, { maxBuffer });
145786
- };
145787
- var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
145788
- const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
145789
- const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer });
145790
- const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 });
145791
- try {
145792
- return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
145793
- } catch (error) {
145794
- return Promise.all([
145795
- { error, signal: error.signal, timedOut: error.timedOut },
145796
- getBufferedData(stdout, stdoutPromise),
145797
- getBufferedData(stderr, stderrPromise),
145798
- getBufferedData(all, allPromise)
145799
- ]);
145800
- }
145801
- };
145802
- var validateInputSync = ({ input }) => {
145803
- if (isStream(input)) {
145804
- throw new TypeError("The `input` option cannot be a stream in sync mode");
145805
- }
145806
- };
145807
- module2.exports = {
145808
- handleInput,
145809
- makeAllStream,
145810
- getSpawnedResult,
145811
- validateInputSync
145812
- };
145813
- });
145814
- var require_promise = __commonJSMin((exports, module2) => {
145815
- "use strict";
145816
- var nativePromisePrototype = (async () => {
145817
- })().constructor.prototype;
145818
- var descriptors = ["then", "catch", "finally"].map((property) => [
145819
- property,
145820
- Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)
145821
- ]);
145822
- var mergePromise = (spawned, promise) => {
145823
- for (const [property, descriptor] of descriptors) {
145824
- const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise);
145825
- Reflect.defineProperty(spawned, property, { ...descriptor, value });
145826
- }
145827
- return spawned;
145828
- };
145829
- var getSpawnedPromise = (spawned) => {
145830
- return new Promise((resolve, reject) => {
145831
- spawned.on("exit", (exitCode, signal) => {
145832
- resolve({ exitCode, signal });
145833
- });
145834
- spawned.on("error", (error) => {
145835
- reject(error);
145836
- });
145837
- if (spawned.stdin) {
145838
- spawned.stdin.on("error", (error) => {
145839
- reject(error);
145840
- });
145841
- }
145842
- });
145843
- };
145844
- module2.exports = {
145845
- mergePromise,
145846
- getSpawnedPromise
145847
- };
145848
- });
145849
- var require_command = __commonJSMin((exports, module2) => {
145850
- "use strict";
145851
- var normalizeArgs = (file, args = []) => {
145852
- if (!Array.isArray(args)) {
145853
- return [file];
145854
- }
145855
- return [file, ...args];
145856
- };
145857
- var NO_ESCAPE_REGEXP = /^[\w.-]+$/;
145858
- var DOUBLE_QUOTES_REGEXP = /"/g;
145859
- var escapeArg = (arg) => {
145860
- if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) {
145861
- return arg;
145862
- }
145863
- return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`;
145864
- };
145865
- var joinCommand = (file, args) => {
145866
- return normalizeArgs(file, args).join(" ");
145867
- };
145868
- var getEscapedCommand = (file, args) => {
145869
- return normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" ");
145870
- };
145871
- var SPACES_REGEXP = / +/g;
145872
- var parseCommand = (command) => {
145873
- const tokens = [];
145874
- for (const token of command.trim().split(SPACES_REGEXP)) {
145875
- const previousToken = tokens[tokens.length - 1];
145876
- if (previousToken && previousToken.endsWith("\\")) {
145877
- tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;
145878
- } else {
145879
- tokens.push(token);
145880
- }
145881
- }
145882
- return tokens;
145883
- };
145884
- module2.exports = {
145885
- joinCommand,
145886
- getEscapedCommand,
145887
- parseCommand
145888
- };
145889
- });
145890
- var require_execa3 = __commonJSMin((exports, module2) => {
145891
- "use strict";
145892
- var path6 = __require("path");
145893
- var childProcess = __require("child_process");
145894
- var crossSpawn = require_cross_spawn();
145895
- var stripFinalNewline = require_strip_final_newline();
145896
- var npmRunPath = require_npm_run_path();
145897
- var onetime = require_onetime();
145898
- var makeError = require_error();
145899
- var normalizeStdio = require_stdio();
145900
- var { spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler } = require_kill();
145901
- var { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = require_stream2();
145902
- var { mergePromise, getSpawnedPromise } = require_promise();
145903
- var { joinCommand, parseCommand, getEscapedCommand } = require_command();
145904
- var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
145905
- var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
145906
- const env = extendEnv ? { ...process.env, ...envOption } : envOption;
145907
- if (preferLocal) {
145908
- return npmRunPath.env({ env, cwd: localDir, execPath });
145909
- }
145910
- return env;
145911
- };
145912
- var handleArguments = (file, args, options3 = {}) => {
145913
- const parsed = crossSpawn._parse(file, args, options3);
145914
- file = parsed.command;
145915
- args = parsed.args;
145916
- options3 = parsed.options;
145917
- options3 = {
145918
- maxBuffer: DEFAULT_MAX_BUFFER,
145919
- buffer: true,
145920
- stripFinalNewline: true,
145921
- extendEnv: true,
145922
- preferLocal: false,
145923
- localDir: options3.cwd || process.cwd(),
145924
- execPath: process.execPath,
145925
- encoding: "utf8",
145926
- reject: true,
145927
- cleanup: true,
145928
- all: false,
145929
- windowsHide: true,
145930
- ...options3
145931
- };
145932
- options3.env = getEnv(options3);
145933
- options3.stdio = normalizeStdio(options3);
145934
- if (process.platform === "win32" && path6.basename(file, ".exe") === "cmd") {
145935
- args.unshift("/q");
145936
- }
145937
- return { file, args, options: options3, parsed };
145938
- };
145939
- var handleOutput = (options3, value, error) => {
145940
- if (typeof value !== "string" && !Buffer.isBuffer(value)) {
145941
- return error === void 0 ? void 0 : "";
145942
- }
145943
- if (options3.stripFinalNewline) {
145944
- return stripFinalNewline(value);
145945
- }
145946
- return value;
145947
- };
145948
- var execa2 = (file, args, options3) => {
145949
- const parsed = handleArguments(file, args, options3);
145950
- const command = joinCommand(file, args);
145951
- const escapedCommand = getEscapedCommand(file, args);
145952
- validateTimeout(parsed.options);
145953
- let spawned;
145954
- try {
145955
- spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
145956
- } catch (error) {
145957
- const dummySpawned = new childProcess.ChildProcess();
145958
- const errorPromise = Promise.reject(makeError({
145959
- error,
145960
- stdout: "",
145961
- stderr: "",
145962
- all: "",
145963
- command,
145964
- escapedCommand,
145965
- parsed,
145966
- timedOut: false,
145967
- isCanceled: false,
145968
- killed: false
145969
- }));
145970
- return mergePromise(dummySpawned, errorPromise);
145971
- }
145972
- const spawnedPromise = getSpawnedPromise(spawned);
145973
- const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
145974
- const processDone = setExitHandler(spawned, parsed.options, timedPromise);
145975
- const context = { isCanceled: false };
145976
- spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
145977
- spawned.cancel = spawnedCancel.bind(null, spawned, context);
145978
- const handlePromise = async () => {
145979
- const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
145980
- const stdout = handleOutput(parsed.options, stdoutResult);
145981
- const stderr = handleOutput(parsed.options, stderrResult);
145982
- const all = handleOutput(parsed.options, allResult);
145983
- if (error || exitCode !== 0 || signal !== null) {
145984
- const returnedError = makeError({
145985
- error,
145986
- exitCode,
145987
- signal,
145988
- stdout,
145989
- stderr,
145990
- all,
145991
- command,
145992
- escapedCommand,
145993
- parsed,
145994
- timedOut,
145995
- isCanceled: context.isCanceled,
145996
- killed: spawned.killed
145997
- });
145998
- if (!parsed.options.reject) {
145999
- return returnedError;
146000
- }
146001
- throw returnedError;
146002
- }
146003
- return {
146004
- command,
146005
- escapedCommand,
146006
- exitCode: 0,
146007
- stdout,
146008
- stderr,
146009
- all,
146010
- failed: false,
146011
- timedOut: false,
146012
- isCanceled: false,
146013
- killed: false
146014
- };
146015
- };
146016
- const handlePromiseOnce = onetime(handlePromise);
146017
- handleInput(spawned, parsed.options.input);
146018
- spawned.all = makeAllStream(spawned, parsed.options);
146019
- return mergePromise(spawned, handlePromiseOnce);
146020
- };
146021
- module2.exports = execa2;
146022
- module2.exports.sync = (file, args, options3) => {
146023
- const parsed = handleArguments(file, args, options3);
146024
- const command = joinCommand(file, args);
146025
- const escapedCommand = getEscapedCommand(file, args);
146026
- validateInputSync(parsed.options);
146027
- let result;
146028
- try {
146029
- result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
146030
- } catch (error) {
146031
- throw makeError({
146032
- error,
146033
- stdout: "",
146034
- stderr: "",
146035
- all: "",
146036
- command,
146037
- escapedCommand,
146038
- parsed,
146039
- timedOut: false,
146040
- isCanceled: false,
146041
- killed: false
146042
- });
146043
- }
146044
- const stdout = handleOutput(parsed.options, result.stdout, result.error);
146045
- const stderr = handleOutput(parsed.options, result.stderr, result.error);
146046
- if (result.error || result.status !== 0 || result.signal !== null) {
146047
- const error = makeError({
146048
- stdout,
146049
- stderr,
146050
- error: result.error,
146051
- signal: result.signal,
146052
- exitCode: result.status,
146053
- command,
146054
- escapedCommand,
146055
- parsed,
146056
- timedOut: result.error && result.error.code === "ETIMEDOUT",
146057
- isCanceled: false,
146058
- killed: result.signal !== null
146059
- });
146060
- if (!parsed.options.reject) {
146061
- return error;
146062
- }
146063
- throw error;
146064
- }
146065
- return {
146066
- command,
146067
- escapedCommand,
146068
- exitCode: 0,
146069
- stdout,
146070
- stderr,
146071
- failed: false,
146072
- timedOut: false,
146073
- isCanceled: false,
146074
- killed: false
146075
- };
146076
- };
146077
- module2.exports.command = (command, options3) => {
146078
- const [file, ...args] = parseCommand(command);
146079
- return execa2(file, args, options3);
146080
- };
146081
- module2.exports.commandSync = (command, options3) => {
146082
- const [file, ...args] = parseCommand(command);
146083
- return execa2.sync(file, args, options3);
146084
- };
146085
- module2.exports.node = (scriptPath, args, options3 = {}) => {
146086
- if (args && !Array.isArray(args) && typeof args === "object") {
146087
- options3 = args;
146088
- args = [];
146089
- }
146090
- const stdio = normalizeStdio.node(options3);
146091
- const defaultExecArgv = process.execArgv.filter((arg) => !arg.startsWith("--inspect"));
146092
- const {
146093
- nodePath = process.execPath,
146094
- nodeOptions = defaultExecArgv
146095
- } = options3;
146096
- return execa2(nodePath, [
146097
- ...nodeOptions,
146098
- scriptPath,
146099
- ...Array.isArray(args) ? args : []
146100
- ], {
146101
- ...options3,
146102
- stdin: void 0,
146103
- stdout: void 0,
146104
- stderr: void 0,
146105
- stdio,
146106
- shell: false
146107
- });
146108
- };
146109
- });
146110
144534
  var require_version = __commonJSMin((exports) => {
146111
144535
  "use strict";
146112
144536
  var __importDefault = exports && exports.__importDefault || function(mod) {
@@ -146115,10 +144539,9 @@ var require_version = __commonJSMin((exports) => {
146115
144539
  Object.defineProperty(exports, "__esModule", { value: true });
146116
144540
  exports.isReact18 = exports.getPnpmVersion = void 0;
146117
144541
  var path_1 = __importDefault(__require("path"));
146118
- var execa_1 = __importDefault(require_execa3());
146119
144542
  var compiled_1 = require_compiled2();
146120
144543
  async function getPnpmVersion() {
146121
- const { stdout } = await (0, execa_1.default)("pnpm", ["--version"]);
144544
+ const { stdout } = await (0, compiled_1.execa)("pnpm", ["--version"]);
146122
144545
  return stdout;
146123
144546
  }
146124
144547
  exports.getPnpmVersion = getPnpmVersion;
@@ -148295,8 +146718,8 @@ var PluginFileAPI = /* @__PURE__ */ function() {
148295
146718
  updateTextRawFile: this.updateTextRawFile.bind(this),
148296
146719
  rmFile: this.rmFile.bind(this),
148297
146720
  rmDir: this.rmDir.bind(this),
148298
- addHelper: this.handlebarAPI.addHelper.bind(this),
148299
- addPartial: this.handlebarAPI.addPartial.bind(this)
146721
+ addHelper: this.handlebarAPI.addHelper.bind(this.handlebarAPI),
146722
+ addPartial: this.handlebarAPI.addPartial.bind(this.handlebarAPI)
148300
146723
  };
148301
146724
  }
148302
146725
  }, {