@vxrn/utils 2.6.4 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/exec.cjs +1 -2
- package/dist/cjs/exec.native.cjs +1 -2
- package/dist/cjs/exec.native.js +1 -2
- package/dist/cjs/exec.native.js.map +1 -1
- package/dist/esm/exec.mjs +1 -2
- package/dist/esm/exec.mjs.map +1 -1
- package/dist/esm/exec.native.js +1 -2
- package/dist/esm/exec.native.js.map +1 -1
- package/package.json +4 -4
- package/src/exec.ts +2 -3
- package/types/exec.d.ts.map +1 -1
package/dist/cjs/exec.cjs
CHANGED
|
@@ -31,8 +31,7 @@ const exec = (cmd, options) => {
|
|
|
31
31
|
};
|
|
32
32
|
const execPromise = (cmd, options) => {
|
|
33
33
|
return new Promise((resolve, reject) => {
|
|
34
|
-
const
|
|
35
|
-
const child = (0, import_node_child_process.spawn)(command, args, {
|
|
34
|
+
const child = (0, import_node_child_process.spawn)(cmd, {
|
|
36
35
|
stdio: options?.quiet ? "pipe" : "inherit",
|
|
37
36
|
shell: true,
|
|
38
37
|
...options
|
package/dist/cjs/exec.native.cjs
CHANGED
|
@@ -34,8 +34,7 @@ var exec = function exec2(cmd, options) {
|
|
|
34
34
|
};
|
|
35
35
|
var execPromise = function execPromise2(cmd, options) {
|
|
36
36
|
return new Promise(function(resolve, reject) {
|
|
37
|
-
var
|
|
38
|
-
var child = (0, import_child_process.spawn)(command, args, {
|
|
37
|
+
var child = (0, import_child_process.spawn)(cmd, {
|
|
39
38
|
stdio: (options === null || options === void 0 ? void 0 : options.quiet) ? "pipe" : "inherit",
|
|
40
39
|
shell: true,
|
|
41
40
|
...options
|
package/dist/cjs/exec.native.js
CHANGED
|
@@ -34,8 +34,7 @@ var exec = function exec2(cmd, options) {
|
|
|
34
34
|
};
|
|
35
35
|
var execPromise = function execPromise2(cmd, options) {
|
|
36
36
|
return new Promise(function(resolve, reject) {
|
|
37
|
-
var
|
|
38
|
-
var child = (0, import_child_process.spawn)(command, args, {
|
|
37
|
+
var child = (0, import_child_process.spawn)(cmd, {
|
|
39
38
|
stdio: (options === null || options === void 0 ? void 0 : options.quiet) ? "pipe" : "inherit",
|
|
40
39
|
shell: true,
|
|
41
40
|
...options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.native.js","names":[],"sources":["cjs/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 exec2(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 execPromise2(cmd, options) {\n return new Promise(function(resolve, reject) {\n var
|
|
1
|
+
{"version":3,"file":"exec.native.js","names":[],"sources":["cjs/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 exec2(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 execPromise2(cmd, options) {\n return new Promise(function(resolve, reject) {\n var child = (0, import_child_process.spawn)(cmd, {\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 execPromiseQuiet2(cmd, options) {\n return execPromise(cmd, {\n ...options,\n quiet: true\n });\n};\n//# sourceMappingURL=exec.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO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AQ,UAAU,QAAQ,IAAI,OAAO;GAC3F,IAAI,eAAe;GACnB,CAAC,gBAAgB,MAAM,YAAY,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,cAAc,KAAK,QAAQ,MAAM;GAChH,CAAC,gBAAgB,MAAM,YAAY,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,cAAc,KAAK,QAAQ,MAAM;EAClH;EACA,MAAM,GAAG,SAAS,SAAS,MAAM;GAC/B,IAAI,SAAS,GAAG;IACd,OAAO,IAAI,MAAM,iCAAiC,KAAK,IAAI,KAAK,CAAC;GACnE,OAAO;IACL,QAAQ;GACV;EACF,CAAC;EACD,MAAM,GAAG,SAAS,SAAS,OAAO;GAChC,OAAO,KAAK;EACd,CAAC;CACH,CAAC;AACH;AACA,IAAI,mBAAmB,SAAS,kBAAkB,KAAK,SAAS;CAC9D,OAAO,YAAY,KAAK;EACtB,GAAG;EACH,OAAO;CACT,CAAC;AACH"}
|
package/dist/esm/exec.mjs
CHANGED
|
@@ -5,8 +5,7 @@ const exec = (cmd, options) => {
|
|
|
5
5
|
};
|
|
6
6
|
const execPromise = (cmd, options) => {
|
|
7
7
|
return new Promise((resolve, reject) => {
|
|
8
|
-
const
|
|
9
|
-
const child = spawn(command, args, {
|
|
8
|
+
const child = spawn(cmd, {
|
|
10
9
|
stdio: options?.quiet ? "pipe" : "inherit",
|
|
11
10
|
shell: true,
|
|
12
11
|
...options
|
package/dist/esm/exec.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.js","names":[],"sources":["esm/exec.js"],"sourcesContent":["import { execSync, spawn } from \"node:child_process\";\nconst exec = (cmd, options) => {\n return execSync(cmd, options)?.toString() || \"\";\n};\nconst execPromise = (cmd, options) => {\n return new Promise((resolve, reject) => {\n const
|
|
1
|
+
{"version":3,"file":"exec.js","names":[],"sources":["esm/exec.js"],"sourcesContent":["import { execSync, spawn } from \"node:child_process\";\nconst exec = (cmd, options) => {\n return execSync(cmd, options)?.toString() || \"\";\n};\nconst execPromise = (cmd, options) => {\n return new Promise((resolve, reject) => {\n const child = spawn(cmd, {\n stdio: options?.quiet ? \"pipe\" : \"inherit\",\n shell: true,\n ...options\n });\n if (!options?.quiet || process.env.DEBUG) {\n child.stdout?.pipe(process.stdout);\n child.stderr?.pipe(process.stderr);\n }\n child.on(\"close\", (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\", (error) => {\n reject(error);\n });\n });\n};\nconst execPromiseQuiet = (cmd, options) => {\n return execPromise(cmd, {\n ...options,\n quiet: true\n });\n};\nexport {\n exec,\n execPromise,\n execPromiseQuiet\n};\n//# sourceMappingURL=exec.js.map\n"],"mappings":";;;AACA,MAAM,QAAQ,KAAK,YAAY;CAC7B,OAAO,SAAS,KAAK,OAAO,CAAC,EAAE,SAAS,KAAK;AAC/C;AACA,MAAM,eAAe,KAAK,YAAY;CACpC,OAAO,IAAI,SAAS,SAAS,WAAW;EACtC,MAAM,QAAQ,MAAM,KAAK;GACvB,OAAO,SAAS,QAAQ,SAAS;GACjC,OAAO;GACP,GAAG;EACL,CAAC;EACD,IAAI,CAAC,SAAS,SAAS,QAAQ,IAAI,OAAO;GACxC,MAAM,QAAQ,KAAK,QAAQ,MAAM;GACjC,MAAM,QAAQ,KAAK,QAAQ,MAAM;EACnC;EACA,MAAM,GAAG,UAAU,SAAS;GAC1B,IAAI,SAAS,GAAG;IACd,OAAO,IAAI,MAAM,iCAAiC,KAAK,IAAI,KAAK,CAAC;GACnE,OAAO;IACL,QAAQ;GACV;EACF,CAAC;EACD,MAAM,GAAG,UAAU,UAAU;GAC3B,OAAO,KAAK;EACd,CAAC;CACH,CAAC;AACH;AACA,MAAM,oBAAoB,KAAK,YAAY;CACzC,OAAO,YAAY,KAAK;EACtB,GAAG;EACH,OAAO;CACT,CAAC;AACH"}
|
package/dist/esm/exec.native.js
CHANGED
|
@@ -6,8 +6,7 @@ var exec = function exec2(cmd, options) {
|
|
|
6
6
|
};
|
|
7
7
|
var execPromise = function execPromise2(cmd, options) {
|
|
8
8
|
return new Promise(function(resolve, reject) {
|
|
9
|
-
var
|
|
10
|
-
var child = spawn(command, args, {
|
|
9
|
+
var child = spawn(cmd, {
|
|
11
10
|
stdio: (options === null || options === void 0 ? void 0 : options.quiet) ? "pipe" : "inherit",
|
|
12
11
|
shell: true,
|
|
13
12
|
...options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.native.js","names":[],"sources":["esm/exec.native.js"],"sourcesContent":["import { execSync, spawn } from \"child_process\";\nvar exec = function exec2(cmd, options) {\n var _execSync;\n return ((_execSync = execSync(cmd, options)) === null || _execSync === void 0 ? void 0 : _execSync.toString()) || \"\";\n};\nvar execPromise = function execPromise2(cmd, options) {\n return new Promise(function(resolve, reject) {\n var
|
|
1
|
+
{"version":3,"file":"exec.native.js","names":[],"sources":["esm/exec.native.js"],"sourcesContent":["import { execSync, spawn } from \"child_process\";\nvar exec = function exec2(cmd, options) {\n var _execSync;\n return ((_execSync = execSync(cmd, options)) === null || _execSync === void 0 ? void 0 : _execSync.toString()) || \"\";\n};\nvar execPromise = function execPromise2(cmd, options) {\n return new Promise(function(resolve, reject) {\n var child = spawn(cmd, {\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 execPromiseQuiet2(cmd, options) {\n return execPromise(cmd, {\n ...options,\n quiet: true\n });\n};\nexport {\n exec,\n execPromise,\n execPromiseQuiet\n};\n//# sourceMappingURL=exec.js.map\n"],"mappings":";;;AACA,IAAI,OAAO,SAAS,MAAM,KAAK,SAAS;CACtC,IAAI;CACJ,SAAS,YAAY,SAAS,KAAK,OAAO,OAAO,QAAQ,cAAc,KAAK,IAAI,KAAK,IAAI,UAAU,SAAS,MAAM;AACpH;AACA,IAAI,cAAc,SAAS,aAAa,KAAK,SAAS;CACpD,OAAO,IAAI,QAAQ,SAAS,SAAS,QAAQ;EAC3C,IAAI,QAAQ,MAAM,KAAK;GACrB,QAAQ,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,SAAS,SAAS;GACpF,OAAO;GACP,GAAG;EACL,CAAC;EACD,IAAI,EAAE,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,UAAU,QAAQ,IAAI,OAAO;GAC3F,IAAI,eAAe;GACnB,CAAC,gBAAgB,MAAM,YAAY,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,cAAc,KAAK,QAAQ,MAAM;GAChH,CAAC,gBAAgB,MAAM,YAAY,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,cAAc,KAAK,QAAQ,MAAM;EAClH;EACA,MAAM,GAAG,SAAS,SAAS,MAAM;GAC/B,IAAI,SAAS,GAAG;IACd,OAAO,IAAI,MAAM,iCAAiC,KAAK,IAAI,KAAK,CAAC;GACnE,OAAO;IACL,QAAQ;GACV;EACF,CAAC;EACD,MAAM,GAAG,SAAS,SAAS,OAAO;GAChC,OAAO,KAAK;EACd,CAAC;CACH,CAAC;AACH;AACA,IAAI,mBAAmB,SAAS,kBAAkB,KAAK,SAAS;CAC9D,OAAO,YAAY,KAAK;EACtB,GAAG;EACH,OAAO;CACT,CAAC;AACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/utils",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.6",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"typecheck": "tsc --noEmit"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@vxrn/debug": "2.6.
|
|
45
|
-
"@vxrn/resolve": "2.6.
|
|
44
|
+
"@vxrn/debug": "2.6.6",
|
|
45
|
+
"@vxrn/resolve": "2.6.6",
|
|
46
46
|
"ws": "^8.21.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
|
-
"releaseSourceCommit": "
|
|
56
|
+
"releaseSourceCommit": "d3b6ddb713d7e54713fc28f29e9ae48ed5394140",
|
|
57
57
|
"repository": {
|
|
58
58
|
"type": "git",
|
|
59
59
|
"url": "git+https://github.com/onejs/one.git",
|
package/src/exec.ts
CHANGED
|
@@ -12,9 +12,8 @@ export const execPromise = (
|
|
|
12
12
|
}
|
|
13
13
|
) => {
|
|
14
14
|
return new Promise<void>((resolve, reject) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const child = spawn(command, args, {
|
|
15
|
+
// the shell parses cmd; passing args alongside it is deprecated in node 24
|
|
16
|
+
const child = spawn(cmd, {
|
|
18
17
|
stdio: options?.quiet ? 'pipe' : 'inherit',
|
|
19
18
|
shell: true,
|
|
20
19
|
...options,
|
package/types/exec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAS,MAAM,oBAAoB,CAAA;AAGvE,eAAO,MAAM,IAAI,QAAS,MAAM,YAAY,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,WAEzE,CAAA;AAED,eAAO,MAAM,WAAW,QACjB,MAAM,YACD,YAAY,GAAG;IACvB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAS,MAAM,oBAAoB,CAAA;AAGvE,eAAO,MAAM,IAAI,QAAS,MAAM,YAAY,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,WAEzE,CAAA;AAED,eAAO,MAAM,WAAW,QACjB,MAAM,YACD,YAAY,GAAG;IACvB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,kBA2BF,CAAA;AAED,eAAO,MAAM,gBAAgB,QACtB,MAAM,YACD,YAAY,GAAG;IACvB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,kBAMF,CAAA"}
|