@vxrn/utils 1.14.4 → 1.14.5

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.
@@ -3,42 +3,46 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var detectPackageManager_exports = {};
22
24
  __export(detectPackageManager_exports, {
23
25
  detectPackageManager: () => detectPackageManager
24
26
  });
25
27
  module.exports = __toCommonJS(detectPackageManager_exports);
26
- var import_node_fs = require("node:fs"),
27
- import_node_path = require("node:path"),
28
- import_exec = require("./exec.cjs");
28
+ var import_node_fs = require("node:fs");
29
+ var import_node_path = require("node:path");
30
+ var import_exec = require("./exec.cjs");
29
31
  async function pathExists(p) {
30
32
  try {
31
- return await import_node_fs.promises.access(p), !0;
33
+ await import_node_fs.promises.access(p);
34
+ return true;
32
35
  } catch {
33
- return !1;
36
+ return false;
34
37
  }
35
38
  }
36
39
  async function hasGlobal(pm) {
37
40
  try {
38
41
  const command = process.platform === "win32" ? `where ${pm}` : `which ${pm}`;
39
- return !!(0, import_exec.exec)(command).length;
42
+ const res = (0, import_exec.exec)(command);
43
+ return !!res.length;
40
44
  } catch {
41
- return !1;
45
+ return false;
42
46
  }
43
47
  }
44
48
  async function getFromLockfile(cwd = ".") {
@@ -54,10 +58,10 @@ async function getFromPackage(cwd = ".") {
54
58
  if (await pathExists((0, import_node_path.resolve)(cwd, "package.json"))) {
55
59
  const json = JSON.parse(await import_node_fs.promises.readFile((0, import_node_path.resolve)(cwd, "package.json"), "utf-8"));
56
60
  if (json.packageManager) {
57
- const yarn = !!json.packageManager.startsWith("yarn"),
58
- pnpm = !!json.packageManager.startsWith("pnpm"),
59
- bun = !!json.packageManager.startsWith("bun"),
60
- npm = !!json.packageManager.startsWith("npm");
61
+ const yarn = !!json.packageManager.startsWith("yarn");
62
+ const pnpm = !!json.packageManager.startsWith("pnpm");
63
+ const bun = !!json.packageManager.startsWith("bun");
64
+ const npm = !!json.packageManager.startsWith("npm");
61
65
  return {
62
66
  bun,
63
67
  yarn,
@@ -67,19 +71,23 @@ async function getFromPackage(cwd = ".") {
67
71
  }
68
72
  }
69
73
  }
70
- const foundSome = obj => Object.keys(obj).some(k => !!obj[k]),
71
- detectPackageManager = async ({
72
- cwd
73
- } = {}) => {
74
- const fromLockfile = await getFromLockfile(cwd);
75
- if (foundSome(fromLockfile)) return fromLockfile;
76
- const fromPackageJson = await getFromPackage(cwd);
77
- if (fromPackageJson && foundSome(fromPackageJson)) return fromPackageJson;
78
- const [npm, yarn, pnpm, bun] = await Promise.all([hasGlobal("npm"), hasGlobal("yarn"), hasGlobal("pnpm"), hasGlobal("bun")]);
79
- return {
80
- bun,
81
- yarn,
82
- pnpm,
83
- npm
84
- };
85
- };
74
+ const foundSome = obj => Object.keys(obj).some(k => !!obj[k]);
75
+ const detectPackageManager = async ({
76
+ cwd
77
+ } = {}) => {
78
+ const fromLockfile = await getFromLockfile(cwd);
79
+ if (foundSome(fromLockfile)) {
80
+ return fromLockfile;
81
+ }
82
+ const fromPackageJson = await getFromPackage(cwd);
83
+ if (fromPackageJson && foundSome(fromPackageJson)) {
84
+ return fromPackageJson;
85
+ }
86
+ const [npm, yarn, pnpm, bun] = await Promise.all([hasGlobal("npm"), hasGlobal("yarn"), hasGlobal("pnpm"), hasGlobal("bun")]);
87
+ return {
88
+ bun,
89
+ yarn,
90
+ pnpm,
91
+ npm
92
+ };
93
+ };
@@ -5,48 +5,51 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var detectPackageManager_exports = {};
24
26
  __export(detectPackageManager_exports, {
25
27
  detectPackageManager: () => detectPackageManager
26
28
  });
27
29
  module.exports = __toCommonJS(detectPackageManager_exports);
28
- var import_fs = require("fs"),
29
- import_path = require("path"),
30
- import_exec = require("./exec.native.js");
30
+ var import_fs = require("fs");
31
+ var import_path = require("path");
32
+ var import_exec = require("./exec.native.js");
31
33
  async function pathExists(p) {
32
34
  try {
33
- return await import_fs.promises.access(p), !0;
34
- } catch {
35
- return !1;
35
+ await import_fs.promises.access(p);
36
+ return true;
37
+ } catch (unused) {
38
+ return false;
36
39
  }
37
40
  }
38
41
  async function hasGlobal(pm) {
39
42
  try {
40
- var command = process.platform === "win32" ? `where ${pm}` : `which ${pm}`,
41
- res = (0, import_exec.exec)(command);
43
+ var command = process.platform === "win32" ? `where ${pm}` : `which ${pm}`;
44
+ var res = (0, import_exec.exec)(command);
42
45
  return !!res.length;
43
- } catch {
44
- return !1;
46
+ } catch (unused) {
47
+ return false;
45
48
  }
46
49
  }
47
50
  async function getFromLockfile() {
48
- var cwd = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ".",
49
- [yarn, npm, pnpm, bun] = await Promise.all([pathExists((0, import_path.resolve)(cwd, "yarn.lock")), pathExists((0, import_path.resolve)(cwd, "package-lock.json")), pathExists((0, import_path.resolve)(cwd, "pnpm-lock.yaml")), pathExists((0, import_path.resolve)(cwd, "bun.lockb"))]);
51
+ var cwd = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ".";
52
+ var [yarn, npm, pnpm, bun] = await Promise.all([pathExists((0, import_path.resolve)(cwd, "yarn.lock")), pathExists((0, import_path.resolve)(cwd, "package-lock.json")), pathExists((0, import_path.resolve)(cwd, "pnpm-lock.yaml")), pathExists((0, import_path.resolve)(cwd, "bun.lockb"))]);
50
53
  return {
51
54
  bun,
52
55
  yarn,
@@ -59,10 +62,10 @@ async function getFromPackage() {
59
62
  if (await pathExists((0, import_path.resolve)(cwd, "package.json"))) {
60
63
  var json = JSON.parse(await import_fs.promises.readFile((0, import_path.resolve)(cwd, "package.json"), "utf-8"));
61
64
  if (json.packageManager) {
62
- var yarn = !!json.packageManager.startsWith("yarn"),
63
- pnpm = !!json.packageManager.startsWith("pnpm"),
64
- bun = !!json.packageManager.startsWith("bun"),
65
- npm = !!json.packageManager.startsWith("npm");
65
+ var yarn = !!json.packageManager.startsWith("yarn");
66
+ var pnpm = !!json.packageManager.startsWith("pnpm");
67
+ var bun = !!json.packageManager.startsWith("bun");
68
+ var npm = !!json.packageManager.startsWith("npm");
66
69
  return {
67
70
  bun,
68
71
  yarn,
@@ -73,24 +76,28 @@ async function getFromPackage() {
73
76
  }
74
77
  }
75
78
  var foundSome = function (obj) {
76
- return Object.keys(obj).some(function (k) {
77
- return !!obj[k];
78
- });
79
- },
80
- detectPackageManager = async function () {
81
- var {
82
- cwd
83
- } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
84
- fromLockfile = await getFromLockfile(cwd);
85
- if (foundSome(fromLockfile)) return fromLockfile;
86
- var fromPackageJson = await getFromPackage(cwd);
87
- if (fromPackageJson && foundSome(fromPackageJson)) return fromPackageJson;
88
- var [npm, yarn, pnpm, bun] = await Promise.all([hasGlobal("npm"), hasGlobal("yarn"), hasGlobal("pnpm"), hasGlobal("bun")]);
89
- return {
90
- bun,
91
- yarn,
92
- pnpm,
93
- npm
94
- };
79
+ return Object.keys(obj).some(function (k) {
80
+ return !!obj[k];
81
+ });
82
+ };
83
+ var detectPackageManager = async function () {
84
+ var {
85
+ cwd
86
+ } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
87
+ var fromLockfile = await getFromLockfile(cwd);
88
+ if (foundSome(fromLockfile)) {
89
+ return fromLockfile;
90
+ }
91
+ var fromPackageJson = await getFromPackage(cwd);
92
+ if (fromPackageJson && foundSome(fromPackageJson)) {
93
+ return fromPackageJson;
94
+ }
95
+ var [npm, yarn, pnpm, bun] = await Promise.all([hasGlobal("npm"), hasGlobal("yarn"), hasGlobal("pnpm"), hasGlobal("bun")]);
96
+ return {
97
+ bun,
98
+ yarn,
99
+ pnpm,
100
+ npm
95
101
  };
102
+ };
96
103
  //# sourceMappingURL=detectPackageManager.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","detectPackageManager_exports","__export","detectPackageManager","module","exports","import_fs","require","import_path","import_exec","pathExists","p","promises","access","hasGlobal","pm","command","process","platform","res","exec","length","getFromLockfile","cwd","arguments","yarn","npm","pnpm","bun","Promise","all","resolve","getFromPackage","json","JSON","parse","readFile","packageManager","startsWith","foundSome","obj","Object","keys","some","k","fromLockfile"],"sources":["../../src/detectPackageManager.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,4BAAA;AAAAC,QAAA,CAAAD,4BAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA+B,CAAAK,4BAC/B;AAKA,IAAAK,SAAA,GAAeC,OAAA,KAAW,CAAW;EAAAC,WAAA,GAAAD,OAAA;EAAAE,WAAA,GAAAF,OAAA;AACnC,eAAIG,WAAAC,CAAA;EACF;IAEF,OAAQ,MAAAL,SAAA,CAAAM,QAAA,CAAAC,MAAA,CAAAF,CAAA;EACN;IACF;EACF;AAEA;AACE,eAAIG,UAAAC,EAAA;EACF;IAEA,IAAAC,OAAQ,GADIC,OAAA,CAAAC,QAAA,KAAK,OACJ,YAAAH,EAAA,cAAAA,EAAA;MAAAI,GAAA,OAAAV,WAAA,CAAAW,IAAA,EAAAJ,OAAA;IACf,OAAQ,EAAAG,GAAA,CAAAE,MAAA;EACN;IACF;EACF;AAEA;AACE,eAAaC,eAAcA,CAAA,EAAI;EAAkB,IAC/CC,GAAA,GAAAC,SAAW,CAAAH,MAAA,QAAAG,SAAQ,QAAK,SAAYA,SAAA;IAAA,CAAAC,IAAA,EAAAC,GAAA,EAAAC,IAAA,EAAAC,GAAA,UAAAC,OAAA,CAAAC,GAAA,EACpCpB,UAAA,KAAWF,WAAA,CAAAuB,OAAA,EAAAR,GAAA,EAAQ,WAAK,IACxBb,UA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AA;IACF,IAAAgB,SAAA,CAAAM,YAAA,GACF,OAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","detectPackageManager_exports","detectPackageManager","module","exports","import_fs","require","import_path","import_exec","pathExists","p","promises","access","unused","hasGlobal","pm","command","process","platform","res","exec","length","getFromLockfile","cwd","arguments","yarn","npm","pnpm","bun","Promise","resolve","getFromPackage","json","JSON","parse","readFile","packageManager","startsWith","foundSome","obj","keys","some","k","fromLockfile","fromPackageJson"],"sources":["detectPackageManager.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar detectPackageManager_exports = {};\n__export(detectPackageManager_exports, {\n detectPackageManager: () => detectPackageManager\n});\nmodule.exports = __toCommonJS(detectPackageManager_exports);\nvar import_fs = require(\"fs\");\nvar import_path = require(\"path\");\nvar import_exec = require(\"./exec\");\nasync function pathExists(p) {\n try {\n await import_fs.promises.access(p);\n return true;\n } catch (unused) {\n return false;\n }\n}\nasync function hasGlobal(pm) {\n try {\n var command = process.platform === \"win32\" ? `where ${pm}` : `which ${pm}`;\n var res = (0, import_exec.exec)(command);\n return !!res.length;\n } catch (unused) {\n return false;\n }\n}\nasync function getFromLockfile() {\n var cwd = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \".\";\n var [yarn, npm, pnpm, bun] = await Promise.all([\n pathExists((0, import_path.resolve)(cwd, \"yarn.lock\")),\n pathExists((0, import_path.resolve)(cwd, \"package-lock.json\")),\n pathExists((0, import_path.resolve)(cwd, \"pnpm-lock.yaml\")),\n pathExists((0, import_path.resolve)(cwd, \"bun.lockb\"))\n ]);\n return {\n bun,\n yarn,\n pnpm,\n npm\n };\n}\nasync function getFromPackage() {\n var cwd = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \".\";\n if (await pathExists((0, import_path.resolve)(cwd, \"package.json\"))) {\n var json = JSON.parse(await import_fs.promises.readFile((0, import_path.resolve)(cwd, \"package.json\"), \"utf-8\"));\n if (json.packageManager) {\n var yarn = !!json.packageManager.startsWith(\"yarn\");\n var pnpm = !!json.packageManager.startsWith(\"pnpm\");\n var bun = !!json.packageManager.startsWith(\"bun\");\n var npm = !!json.packageManager.startsWith(\"npm\");\n return {\n bun,\n yarn,\n pnpm,\n npm\n };\n }\n }\n}\nvar foundSome = function(obj) {\n return Object.keys(obj).some(function(k) {\n return !!obj[k];\n });\n};\nvar detectPackageManager = async function() {\n var { cwd } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var fromLockfile = await getFromLockfile(cwd);\n if (foundSome(fromLockfile)) {\n return fromLockfile;\n }\n var fromPackageJson = await getFromPackage(cwd);\n if (fromPackageJson && foundSome(fromPackageJson)) {\n return fromPackageJson;\n }\n var [npm, yarn, pnpm, bun] = await Promise.all([\n hasGlobal(\"npm\"),\n hasGlobal(\"yarn\"),\n hasGlobal(\"pnpm\"),\n hasGlobal(\"bun\")\n ]);\n return {\n bun,\n yarn,\n pnpm,\n npm\n };\n};\n//# sourceMappingURL=detectPackageManager.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAA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QACLT,GAAG;QACHH,IAAI;QACJE,IAAI;QACJD;MACF,CAAC;IACH;EACF;AACF;AACA,IAAIY,SAAS,GAAG,SAAAA,CAASC,GAAG,EAAE;EAC5B,OAAO/D,MAAM,CAACgE,IAAI,CAACD,GAAG,CAAC,CAACE,IAAI,CAAC,UAASC,CAAC,EAAE;IACvC,OAAO,CAAC,CAACH,GAAG,CAACG,CAAC,CAAC;EACjB,CAAC,CAAC;AACJ,CAAC;AACD,IAAIxC,oBAAoB,GAAG,eAAAA,CAAA,EAAiB;EAC1C,IAAI;IAAEqB;EAAI,CAAC,GAAGC,SAAS,CAACH,MAAM,GAAG,CAAC,IAAIG,SAAS,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAGA,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;EACjF,IAAImB,YAAY,GAAG,MAAMrB,eAAe,CAACC,GAAG,CAAC;EAC7C,IAAIe,SAAS,CAACK,YAAY,CAAC,EAAE;IAC3B,OAAOA,YAAY;EACrB;EACA,IAAIC,eAAe,GAAG,MAAMb,cAAc,CAACR,GAAG,CAAC;EAC/C,IAAIqB,eAAe,IAAIN,SAAS,CAACM,eAAe,CAAC,EAAE;IACjD,OAAOA,eAAe;EACxB;EACA,IAAI,CAAClB,GAAG,EAAED,IAAI,EAAEE,IAAI,EAAEC,GAAG,CAAC,GAAG,MAAMC,OAAO,CAAC1C,GAAG,CAAC,CAC7C2B,SAAS,CAAC,KAAK,CAAC,EAChBA,SAAS,CAAC,MAAM,CAAC,EACjBA,SAAS,CAAC,MAAM,CAAC,EACjBA,SAAS,CAAC,KAAK,CAAC,CACjB,CAAC;EACF,OAAO;IACLc,GAAG;IACHH,IAAI;IACJE,IAAI;IACJD;EACF,CAAC;AACH,CAAC","ignoreList":[]}
package/dist/cjs/exec.cjs CHANGED
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var exec_exports = {};
22
24
  __export(exec_exports, {
@@ -26,21 +28,36 @@ __export(exec_exports, {
26
28
  });
27
29
  module.exports = __toCommonJS(exec_exports);
28
30
  var import_node_child_process = require("node:child_process");
29
- const exec = (cmd, options) => (0, import_node_child_process.execSync)(cmd, options)?.toString() || "",
30
- execPromise = (cmd, options) => new Promise((resolve, reject) => {
31
- const [command, ...args] = cmd.split(" "),
32
- child = (0, import_node_child_process.spawn)(command, args, {
33
- stdio: options?.quiet ? "pipe" : "inherit",
34
- shell: !0,
35
- ...options
36
- });
37
- (!options?.quiet || process.env.DEBUG) && (child.stdout?.pipe(process.stdout), child.stderr?.pipe(process.stderr)), child.on("close", code => {
38
- code !== 0 ? reject(new Error(`Command failed with exit code ${code}: ${cmd}`)) : resolve();
39
- }), child.on("error", error => {
31
+ const exec = (cmd, options) => {
32
+ return (0, import_node_child_process.execSync)(cmd, options)?.toString() || "";
33
+ };
34
+ const execPromise = (cmd, options) => {
35
+ return new Promise((resolve, reject) => {
36
+ const [command, ...args] = cmd.split(" ");
37
+ const child = (0, import_node_child_process.spawn)(command, args, {
38
+ stdio: options?.quiet ? "pipe" : "inherit",
39
+ shell: true,
40
+ ...options
41
+ });
42
+ if (!options?.quiet || process.env.DEBUG) {
43
+ child.stdout?.pipe(process.stdout);
44
+ child.stderr?.pipe(process.stderr);
45
+ }
46
+ child.on("close", code => {
47
+ if (code !== 0) {
48
+ reject(new Error(`Command failed with exit code ${code}: ${cmd}`));
49
+ } else {
50
+ resolve();
51
+ }
52
+ });
53
+ child.on("error", error => {
40
54
  reject(error);
41
55
  });
42
- }),
43
- execPromiseQuiet = (cmd, options) => execPromise(cmd, {
56
+ });
57
+ };
58
+ const execPromiseQuiet = (cmd, options) => {
59
+ return execPromise(cmd, {
44
60
  ...options,
45
- quiet: !0
46
- });
61
+ quiet: true
62
+ });
63
+ };
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var exec_exports = {};
24
26
  __export(exec_exports, {
@@ -27,34 +29,40 @@ __export(exec_exports, {
27
29
  execPromiseQuiet: () => execPromiseQuiet
28
30
  });
29
31
  module.exports = __toCommonJS(exec_exports);
30
- var import_child_process = require("child_process"),
31
- exec = function (cmd, options) {
32
- var _execSync;
33
- return ((_execSync = (0, import_child_process.execSync)(cmd, options)) === null || _execSync === void 0 ? void 0 : _execSync.toString()) || "";
34
- },
35
- execPromise = function (cmd, options) {
36
- return new Promise(function (resolve, reject) {
37
- var [command, ...args] = cmd.split(" "),
38
- child = (0, import_child_process.spawn)(command, args, {
39
- stdio: options?.quiet ? "pipe" : "inherit",
40
- shell: !0,
41
- ...options
42
- });
43
- if (!options?.quiet || process.env.DEBUG) {
44
- var _child_stdout, _child_stderr;
45
- (_child_stdout = child.stdout) === null || _child_stdout === void 0 || _child_stdout.pipe(process.stdout), (_child_stderr = child.stderr) === null || _child_stderr === void 0 || _child_stderr.pipe(process.stderr);
32
+ var import_child_process = require("child_process");
33
+ var exec = function (cmd, options) {
34
+ var _execSync;
35
+ return ((_execSync = (0, import_child_process.execSync)(cmd, options)) === null || _execSync === void 0 ? void 0 : _execSync.toString()) || "";
36
+ };
37
+ var execPromise = function (cmd, options) {
38
+ return new Promise(function (resolve, reject) {
39
+ var [command, ...args] = cmd.split(" ");
40
+ var child = (0, import_child_process.spawn)(command, args, {
41
+ stdio: (options === null || options === void 0 ? void 0 : options.quiet) ? "pipe" : "inherit",
42
+ shell: true,
43
+ ...options
44
+ });
45
+ if (!(options === null || options === void 0 ? void 0 : options.quiet) || process.env.DEBUG) {
46
+ var _child_stdout, _child_stderr;
47
+ (_child_stdout = child.stdout) === null || _child_stdout === void 0 ? void 0 : _child_stdout.pipe(process.stdout);
48
+ (_child_stderr = child.stderr) === null || _child_stderr === void 0 ? void 0 : _child_stderr.pipe(process.stderr);
49
+ }
50
+ child.on("close", function (code) {
51
+ if (code !== 0) {
52
+ reject(new Error(`Command failed with exit code ${code}: ${cmd}`));
53
+ } else {
54
+ resolve();
46
55
  }
47
- child.on("close", function (code) {
48
- code !== 0 ? reject(new Error(`Command failed with exit code ${code}: ${cmd}`)) : resolve();
49
- }), child.on("error", function (error) {
50
- reject(error);
51
- });
52
56
  });
53
- },
54
- execPromiseQuiet = function (cmd, options) {
55
- return execPromise(cmd, {
56
- ...options,
57
- quiet: !0
57
+ child.on("error", function (error) {
58
+ reject(error);
58
59
  });
59
- };
60
+ });
61
+ };
62
+ var execPromiseQuiet = function (cmd, options) {
63
+ return execPromise(cmd, {
64
+ ...options,
65
+ quiet: true
66
+ });
67
+ };
60
68
  //# sourceMappingURL=exec.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","exec_exports","__export","exec","execPromise","execPromiseQuiet","module","exports","import_child_process","require","cmd","options","_execSync","execSync","toString","Promise","resolve","reject","command","args","split","child","spawn","stdio","quiet","shell","process","env","DEBUG","_child_stdout","_child_stderr","stdout","pipe","stderr","on","code"],"sources":["../../src/exec.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,YAAA;AAAAC,QAAA,CAAAD,YAAA;EAAAE,IAAA,EAAAA,CAAA,KAAAA,IAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAX,YAAA,CAAAK,YAAmD;AAG5C,IAAAO,oBAA2B,GAAAC,OAAA,CACzB;EAAAN,IAAA,YAAAA,CAAAO,GAAS,EAAAC,OAAK,EAAO;IAU1B,IAAAC,SAAO;IAE4B,OACjC,EAAOA,SAAS,OAAAJ,oBAAiB,CAAAK,QAAA,EAAAH,GAAA,EAAAC,OAAA,eAAAC,SAAA,uBAAAA,SAAA,CAAAE,QAAA;EAAA;EAAAV,WAC1B,YAAAA,CAAAM,GAAA,EAAAC,OAAA;IAAA,OACJ,IAAAI,OAAA,WAAAC,OAAA,EAAAC,MAAA;MACJ,KAAAC,OAAA,KAAAC,IAAA,IAAAT,GAAA,CAAAU,KAAA;QAAAC,KAAA,OAAAb,oBAAA,CAAAc,KAAA,EAAAJ,OAAA,EAAAC,IAAA;UAEII,KAAA,EAASZ,OAAA,EAASa,KAAA,GAAQ,MAAI,YACjC;UAKIC,KAAA,EAAS;UAOf,GAAAd;QACE;MACD,KAAAA,OAAA,EAAAa,KAAA,IAAAE,OAAA,CAAAC,GAAA,CAAAC,KAAA;QAIQ,IAAAC,aAAmB,EAC9BC,aACA;QAKK,CAAAD,aAAA,GAAAR,KAAA,CAAAU,MAAA,cAAAF,aAAA,eAAAA,aAAA,CAAAG,IAAA,CAAAN,OAAA,CAAAK,MAAA,IAAAD,aAAA,GAAAT,KAAA,CAAAY,MAAA,cAAAH,aAAA,eAAAA,aAAA,CAAAE,IAAA,CAAAN,OAAA,CAAAO,MAAA;MACH;MACDZ,KAAA,CAAAa,EAAA,oBAAAC,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","exec_exports","exec","execPromise","execPromiseQuiet","module","exports","import_child_process","require","cmd","options","_execSync","execSync","toString","Promise","resolve","reject","command","args","split","child","spawn","stdio","quiet","shell","process","env","DEBUG","_child_stdout","_child_stderr","stdout","pipe","stderr","on","code","Error","error"],"sources":["exec.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar exec_exports = {};\n__export(exec_exports, {\n exec: () => exec,\n execPromise: () => execPromise,\n execPromiseQuiet: () => execPromiseQuiet\n});\nmodule.exports = __toCommonJS(exec_exports);\nvar import_child_process = require(\"child_process\");\nvar exec = function(cmd, options) {\n var _execSync;\n return ((_execSync = (0, import_child_process.execSync)(cmd, options)) === null || _execSync === void 0 ? void 0 : _execSync.toString()) || \"\";\n};\nvar execPromise = function(cmd, options) {\n return new Promise(function(resolve, reject) {\n var [command, ...args] = cmd.split(\" \");\n var child = (0, import_child_process.spawn)(command, args, {\n stdio: (options === null || options === void 0 ? void 0 : options.quiet) ? \"pipe\" : \"inherit\",\n shell: true,\n ...options\n });\n if (!(options === null || options === void 0 ? void 0 : options.quiet) || process.env.DEBUG) {\n var _child_stdout, _child_stderr;\n (_child_stdout = child.stdout) === null || _child_stdout === void 0 ? void 0 : _child_stdout.pipe(process.stdout);\n (_child_stderr = child.stderr) === null || _child_stderr === void 0 ? void 0 : _child_stderr.pipe(process.stderr);\n }\n child.on(\"close\", function(code) {\n if (code !== 0) {\n reject(new Error(`Command failed with exit code ${code}: ${cmd}`));\n } else {\n resolve();\n }\n });\n child.on(\"error\", function(error) {\n reject(error);\n });\n });\n};\nvar execPromiseQuiet = function(cmd, options) {\n return execPromise(cmd, {\n ...options,\n quiet: true\n });\n};\n//# sourceMappingURL=exec.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;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a,EAAEC,aAAa;MAChC,CAACD,aAAa,GAAGR,KAAK,CAACU,MAAM,MAAM,IAAI,IAAIF,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,aAAa,CAACG,IAAI,CAACN,OAAO,CAACK,MAAM,CAAC;MACjH,CAACD,aAAa,GAAGT,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIH,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,aAAa,CAACE,IAAI,CAACN,OAAO,CAACO,MAAM,CAAC;IACnH;IACAZ,KAAK,CAACa,EAAE,CAAC,OAAO,EAAE,UAASC,IAAI,EAAE;MAC/B,IAAIA,IAAI,KAAK,CAAC,EAAE;QACdlB,MAAM,CAAC,IAAImB,KAAK,CAAC,iCAAiCD,IAAI,KAAKzB,GAAG,EAAE,CAAC,CAAC;MACpE,CAAC,MAAM;QACLM,OAAO,CAAC,CAAC;MACX;IACF,CAAC,CAAC;IACFK,KAAK,CAACa,EAAE,CAAC,OAAO,EAAE,UAASG,KAAK,EAAE;MAChCpB,MAAM,CAACoB,KAAK,CAAC;IACf,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC;AACD,IAAIhC,gBAAgB,GAAG,SAAAA,CAASK,GAAG,EAAEC,OAAO,EAAE;EAC5C,OAAOP,WAAW,CAACM,GAAG,EAAE;IACtB,GAAGC,OAAO;IACVa,KAAK,EAAE;EACT,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
7
8
  get: () => from[key],
8
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
10
  });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
15
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
10
  get: () => from[key],
10
11
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
12
  });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
17
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
18
+ value: true
17
19
  }), mod);
18
20
  var index_exports = {};
19
21
  module.exports = __toCommonJS(index_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,iBAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,mBAAAH,MAAA,CAAAC,OAFd;AAGAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,mCAHd,GAAAH,MAAA,CAAAC,OAAA;AAIAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,sBAAAH,MAAA,CAJdC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__reExport","target","mod","secondTarget","__toCommonJS","value","index_exports","module","exports","require"],"sources":["index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"@vxrn/debug\"), module.exports);\n__reExport(index_exports, require(\"@vxrn/resolve\"), module.exports);\n__reExport(index_exports, require(\"./detectPackageManager\"), module.exports);\n__reExport(index_exports, require(\"./exec\"), module.exports);\n__reExport(index_exports, require(\"./mustReplace\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIV,iBAAiB,CAACO,IAAI,CAAC,EACrC,IAAI,CAACL,YAAY,CAACS,IAAI,CAACL,EAAE,EAAEI,GAAG,CAAC,IAAIA,GAAG,KAAKF,MAAM,EAC/Cb,SAAS,CAACW,EAAE,EAAEI,GAAG,EAAE;MAAEE,GAAG,EAAEA,CAAA,KAAML,IAAI,CAACG,GAAG,CAAC;MAAEG,UAAU,EAAE,EAAEJ,IAAI,GAAGX,gBAAgB,CAACS,IAAI,EAAEG,GAAG,CAAC,CAAC,IAAID,IAAI,CAACI;IAAW,CAAC,CAAC;EACxH;EACA,OAAOP,EAAE;AACX,CAAC;AACD,IAAIQ,UAAU,GAAGA,CAACC,MAAM,EAAEC,GAAG,EAAEC,YAAY,MAAMZ,WAAW,CAACU,MAAM,EAAEC,GAAG,EAAE,SAAS,CAAC,EAAEC,YAAY,IAAIZ,WAAW,CAACY,YAAY,EAAED,GAAG,EAAE,SAAS,CAAC,CAA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