| import cp from 'child_process'; | ||
| export default function execCallback(cmd: string, options: cp.ExecOptions, callback: (error: cp.ExecException | null, stdout: string, stderr: string) => void): cp.ChildProcess; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { | ||
| value: true | ||
| }); | ||
| Object.defineProperty(exports, "default", { | ||
| enumerable: true, | ||
| get: function() { | ||
| return execCallback; | ||
| } | ||
| }); | ||
| var _child_process = /*#__PURE__*/ _interop_require_default(require("child_process")); | ||
| function _interop_require_default(obj) { | ||
| return obj && obj.__esModule ? obj : { | ||
| default: obj | ||
| }; | ||
| } | ||
| function execCallback(cmd, options, callback) { | ||
| return _child_process.default.exec(cmd, options, callback); | ||
| } | ||
| /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; } |
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/worker.ts"],"sourcesContent":["import cp from 'child_process';\n\nexport default function execCallback(cmd: string, options: cp.ExecOptions, callback: (error: cp.ExecException | null, stdout: string, stderr: string) => void): cp.ChildProcess {\n return cp.exec(cmd, options, callback);\n}\n"],"names":["execCallback","cmd","options","callback","cp","exec"],"mappings":";;;;+BAEA;;;eAAwBA;;;oEAFT;;;;;;AAEA,SAASA,aAAaC,GAAW,EAAEC,OAAuB,EAAEC,QAAkF;IAC3J,OAAOC,sBAAE,CAACC,IAAI,CAACJ,KAAKC,SAASC;AAC/B"} |
| import cp from 'child_process'; | ||
| export default function execCallback(cmd: string, options: cp.ExecOptions, callback: (error: cp.ExecException | null, stdout: string, stderr: string) => void): cp.ChildProcess; |
| import cp from 'child_process'; | ||
| export default function execCallback(cmd, options, callback) { | ||
| return cp.exec(cmd, options, callback); | ||
| } |
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/worker.ts"],"sourcesContent":["import cp from 'child_process';\n\nexport default function execCallback(cmd: string, options: cp.ExecOptions, callback: (error: cp.ExecException | null, stdout: string, stderr: string) => void): cp.ChildProcess {\n return cp.exec(cmd, options, callback);\n}\n"],"names":["cp","execCallback","cmd","options","callback","exec"],"mappings":"AAAA,OAAOA,QAAQ,gBAAgB;AAE/B,eAAe,SAASC,aAAaC,GAAW,EAAEC,OAAuB,EAAEC,QAAkF;IAC3J,OAAOJ,GAAGK,IAAI,CAACH,KAAKC,SAASC;AAC/B"} |
@@ -37,3 +37,4 @@ "use strict"; | ||
| } | ||
| var workerPath = _path.default.join(__dirname, 'worker.cjs'); | ||
| // Worker path is relative to dist/cjs/lib/ at runtime | ||
| var workerPath = _path.default.join(__dirname, 'worker.js'); | ||
| return functionExec === null || functionExec === void 0 ? void 0 : functionExec({ | ||
@@ -40,0 +41,0 @@ callbacks: true |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/execSync.ts"],"sourcesContent":["import cp from 'child_process';\nimport Module from 'module';\nimport path from 'path';\nimport url from 'url';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nlet functionExec: ((options: { callbacks: boolean }, workerPath: string, cmd: string, execOptions: { encoding?: BufferEncoding }) => string) | null = null;\n\n/**\n * Local execSync implementation that doesn't pollute global namespace.\n * Uses native cp.execSync if available (Node 0.12+), otherwise falls back\n * to function-exec-sync polyfill.\n */\nexport default function execSync(cmd: string, options: { encoding?: BufferEncoding } = {}): string {\n // Use native execSync if available (Node 0.12+)\n if (typeof cp.execSync === 'function') {\n return cp.execSync(cmd, options) as unknown as string;\n }\n\n // Polyfill for Node < 0.12 using function-exec-sync\n if (!functionExec) {\n functionExec = _require('function-exec-sync');\n }\n const workerPath = path.join(__dirname, 'worker.cjs');\n return functionExec?.({ callbacks: true }, workerPath, cmd, options);\n}\n"],"names":["execSync","_require","require","Module","createRequire","__dirname","path","dirname","__filename","url","fileURLToPath","functionExec","cmd","options","cp","workerPath","join","callbacks"],"mappings":";;;;+BAUA;;;;CAIC,GACD;;;eAAwBA;;;oEAfT;6DACI;2DACF;0DACD;;;;;;AAEhB,IAAMC,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAC1F,IAAMG,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaC,YAAG,CAACC,aAAa,CAAC;AAElG,IAAIC,eAAkJ;AAOvI,SAASX,SAASY,GAAW;QAAEC,UAAAA,iEAAyC,CAAC;IACtF,gDAAgD;IAChD,IAAI,OAAOC,sBAAE,CAACd,QAAQ,KAAK,YAAY;QACrC,OAAOc,sBAAE,CAACd,QAAQ,CAACY,KAAKC;IAC1B;IAEA,oDAAoD;IACpD,IAAI,CAACF,cAAc;QACjBA,eAAeV,SAAS;IAC1B;IACA,IAAMc,aAAaT,aAAI,CAACU,IAAI,CAACX,WAAW;IACxC,OAAOM,yBAAAA,mCAAAA,aAAe;QAAEM,WAAW;IAAK,GAAGF,YAAYH,KAAKC;AAC9D"} | ||
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/execSync.ts"],"sourcesContent":["import cp from 'child_process';\nimport Module from 'module';\nimport path from 'path';\nimport url from 'url';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nlet functionExec: ((options: { callbacks: boolean }, workerPath: string, cmd: string, execOptions: { encoding?: BufferEncoding }) => string) | null = null;\n\n/**\n * Local execSync implementation that doesn't pollute global namespace.\n * Uses native cp.execSync if available (Node 0.12+), otherwise falls back\n * to function-exec-sync polyfill.\n */\nexport default function execSync(cmd: string, options: { encoding?: BufferEncoding } = {}): string {\n // Use native execSync if available (Node 0.12+)\n if (typeof cp.execSync === 'function') {\n return cp.execSync(cmd, options) as unknown as string;\n }\n\n // Polyfill for Node < 0.12 using function-exec-sync\n if (!functionExec) {\n functionExec = _require('function-exec-sync');\n }\n // Worker path is relative to dist/cjs/lib/ at runtime\n const workerPath = path.join(__dirname, 'worker.js');\n return functionExec?.({ callbacks: true }, workerPath, cmd, options);\n}\n"],"names":["execSync","_require","require","Module","createRequire","__dirname","path","dirname","__filename","url","fileURLToPath","functionExec","cmd","options","cp","workerPath","join","callbacks"],"mappings":";;;;+BAUA;;;;CAIC,GACD;;;eAAwBA;;;oEAfT;6DACI;2DACF;0DACD;;;;;;AAEhB,IAAMC,WAAW,OAAOC,YAAY,cAAcC,eAAM,CAACC,aAAa,CAAC,uDAAmBF;AAC1F,IAAMG,YAAYC,aAAI,CAACC,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaC,YAAG,CAACC,aAAa,CAAC;AAElG,IAAIC,eAAkJ;AAOvI,SAASX,SAASY,GAAW;QAAEC,UAAAA,iEAAyC,CAAC;IACtF,gDAAgD;IAChD,IAAI,OAAOC,sBAAE,CAACd,QAAQ,KAAK,YAAY;QACrC,OAAOc,sBAAE,CAACd,QAAQ,CAACY,KAAKC;IAC1B;IAEA,oDAAoD;IACpD,IAAI,CAACF,cAAc;QACjBA,eAAeV,SAAS;IAC1B;IACA,sDAAsD;IACtD,IAAMc,aAAaT,aAAI,CAACU,IAAI,CAACX,WAAW;IACxC,OAAOM,yBAAAA,mCAAAA,aAAe;QAAEM,WAAW;IAAK,GAAGF,YAAYH,KAAKC;AAC9D"} |
@@ -1,3 +0,2 @@ | ||
| declare function _exports(cmd: any, options: any, callback: any): cp.ChildProcess; | ||
| export = _exports; | ||
| import cp = require("child_process"); | ||
| import cp from 'child_process'; | ||
| export default function execCallback(cmd: string, options: cp.ExecOptions, callback: (error: cp.ExecException | null, stdout: string, stderr: string) => void): cp.ChildProcess; |
@@ -21,3 +21,4 @@ import cp from 'child_process'; | ||
| } | ||
| const workerPath = path.join(__dirname, 'worker.cjs'); | ||
| // Worker path is relative to dist/cjs/lib/ at runtime | ||
| const workerPath = path.join(__dirname, 'worker.js'); | ||
| return functionExec === null || functionExec === void 0 ? void 0 : functionExec({ | ||
@@ -24,0 +25,0 @@ callbacks: true |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/execSync.ts"],"sourcesContent":["import cp from 'child_process';\nimport Module from 'module';\nimport path from 'path';\nimport url from 'url';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nlet functionExec: ((options: { callbacks: boolean }, workerPath: string, cmd: string, execOptions: { encoding?: BufferEncoding }) => string) | null = null;\n\n/**\n * Local execSync implementation that doesn't pollute global namespace.\n * Uses native cp.execSync if available (Node 0.12+), otherwise falls back\n * to function-exec-sync polyfill.\n */\nexport default function execSync(cmd: string, options: { encoding?: BufferEncoding } = {}): string {\n // Use native execSync if available (Node 0.12+)\n if (typeof cp.execSync === 'function') {\n return cp.execSync(cmd, options) as unknown as string;\n }\n\n // Polyfill for Node < 0.12 using function-exec-sync\n if (!functionExec) {\n functionExec = _require('function-exec-sync');\n }\n const workerPath = path.join(__dirname, 'worker.cjs');\n return functionExec?.({ callbacks: true }, workerPath, cmd, options);\n}\n"],"names":["cp","Module","path","url","_require","require","createRequire","__dirname","dirname","__filename","fileURLToPath","functionExec","execSync","cmd","options","workerPath","join","callbacks"],"mappings":"AAAA,OAAOA,QAAQ,gBAAgB;AAC/B,OAAOC,YAAY,SAAS;AAC5B,OAAOC,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AAEtB,MAAMC,WAAW,OAAOC,YAAY,cAAcJ,OAAOK,aAAa,CAAC,YAAYH,GAAG,IAAIE;AAC1F,MAAME,YAAYL,KAAKM,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaN,IAAIO,aAAa,CAAC,YAAYP,GAAG;AAEjH,IAAIQ,eAAkJ;AAEtJ;;;;CAIC,GACD,eAAe,SAASC,SAASC,GAAW,EAAEC,UAAyC,CAAC,CAAC;IACvF,gDAAgD;IAChD,IAAI,OAAOd,GAAGY,QAAQ,KAAK,YAAY;QACrC,OAAOZ,GAAGY,QAAQ,CAACC,KAAKC;IAC1B;IAEA,oDAAoD;IACpD,IAAI,CAACH,cAAc;QACjBA,eAAeP,SAAS;IAC1B;IACA,MAAMW,aAAab,KAAKc,IAAI,CAACT,WAAW;IACxC,OAAOI,yBAAAA,mCAAAA,aAAe;QAAEM,WAAW;IAAK,GAAGF,YAAYF,KAAKC;AAC9D"} | ||
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/execSync.ts"],"sourcesContent":["import cp from 'child_process';\nimport Module from 'module';\nimport path from 'path';\nimport url from 'url';\n\nconst _require = typeof require === 'undefined' ? Module.createRequire(import.meta.url) : require;\nconst __dirname = path.dirname(typeof __filename !== 'undefined' ? __filename : url.fileURLToPath(import.meta.url));\n\nlet functionExec: ((options: { callbacks: boolean }, workerPath: string, cmd: string, execOptions: { encoding?: BufferEncoding }) => string) | null = null;\n\n/**\n * Local execSync implementation that doesn't pollute global namespace.\n * Uses native cp.execSync if available (Node 0.12+), otherwise falls back\n * to function-exec-sync polyfill.\n */\nexport default function execSync(cmd: string, options: { encoding?: BufferEncoding } = {}): string {\n // Use native execSync if available (Node 0.12+)\n if (typeof cp.execSync === 'function') {\n return cp.execSync(cmd, options) as unknown as string;\n }\n\n // Polyfill for Node < 0.12 using function-exec-sync\n if (!functionExec) {\n functionExec = _require('function-exec-sync');\n }\n // Worker path is relative to dist/cjs/lib/ at runtime\n const workerPath = path.join(__dirname, 'worker.js');\n return functionExec?.({ callbacks: true }, workerPath, cmd, options);\n}\n"],"names":["cp","Module","path","url","_require","require","createRequire","__dirname","dirname","__filename","fileURLToPath","functionExec","execSync","cmd","options","workerPath","join","callbacks"],"mappings":"AAAA,OAAOA,QAAQ,gBAAgB;AAC/B,OAAOC,YAAY,SAAS;AAC5B,OAAOC,UAAU,OAAO;AACxB,OAAOC,SAAS,MAAM;AAEtB,MAAMC,WAAW,OAAOC,YAAY,cAAcJ,OAAOK,aAAa,CAAC,YAAYH,GAAG,IAAIE;AAC1F,MAAME,YAAYL,KAAKM,OAAO,CAAC,OAAOC,eAAe,cAAcA,aAAaN,IAAIO,aAAa,CAAC,YAAYP,GAAG;AAEjH,IAAIQ,eAAkJ;AAEtJ;;;;CAIC,GACD,eAAe,SAASC,SAASC,GAAW,EAAEC,UAAyC,CAAC,CAAC;IACvF,gDAAgD;IAChD,IAAI,OAAOd,GAAGY,QAAQ,KAAK,YAAY;QACrC,OAAOZ,GAAGY,QAAQ,CAACC,KAAKC;IAC1B;IAEA,oDAAoD;IACpD,IAAI,CAACH,cAAc;QACjBA,eAAeP,SAAS;IAC1B;IACA,sDAAsD;IACtD,MAAMW,aAAab,KAAKc,IAAI,CAACT,WAAW;IACxC,OAAOI,yBAAAA,mCAAAA,aAAe;QAAEM,WAAW;IAAK,GAAGF,YAAYF,KAAKC;AAC9D"} |
+7
-7
| { | ||
| "name": "cpu-arch", | ||
| "version": "1.0.4", | ||
| "version": "1.0.5", | ||
| "description": "Detect CPU architecture (handles WoW64, Rosetta 2, ARM64)", | ||
@@ -53,10 +53,10 @@ "keywords": [ | ||
| "dependencies": { | ||
| "function-exec-sync": "*" | ||
| "function-exec-sync": "^1.5.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/mocha": "*", | ||
| "@types/node": "*", | ||
| "node-version-use": "*", | ||
| "ts-dev-stack": "*", | ||
| "tsds-config": "*" | ||
| "@types/mocha": "^10.0.10", | ||
| "@types/node": "^25.0.1", | ||
| "node-version-use": "^2.1.3", | ||
| "ts-dev-stack": "^1.21.3", | ||
| "tsds-config": "^0.2.0" | ||
| }, | ||
@@ -63,0 +63,0 @@ "engines": { |
| "use strict"; | ||
| var cp = require('child_process'); | ||
| module.exports = function execCallback(cmd, options, callback) { | ||
| return cp.exec(cmd, options, callback); | ||
| }; | ||
| /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; } |
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/worker.cjs"],"sourcesContent":["const cp = require('child_process');\n\nmodule.exports = function execCallback(cmd, options, callback) {\n return cp.exec(cmd, options, callback);\n};\n"],"names":["cp","require","module","exports","execCallback","cmd","options","callback","exec"],"mappings":";AAAA,IAAMA,KAAKC,QAAQ;AAEnBC,OAAOC,OAAO,GAAG,SAASC,aAAaC,GAAG,EAAEC,OAAO,EAAEC,QAAQ;IAC3D,OAAOP,GAAGQ,IAAI,CAACH,KAAKC,SAASC;AAC/B"} |
| const cp = require('child_process'); | ||
| module.exports = function execCallback(cmd, options, callback) { | ||
| return cp.exec(cmd, options, callback); | ||
| }; |
| {"version":3,"sources":["/Users/kevin/Dev/OpenSource/node-version/cpu-arch/src/lib/worker.cjs"],"sourcesContent":["const cp = require('child_process');\n\nmodule.exports = function execCallback(cmd, options, callback) {\n return cp.exec(cmd, options, callback);\n};\n"],"names":["cp","require","module","exports","execCallback","cmd","options","callback","exec"],"mappings":"AAAA,MAAMA,KAAKC,QAAQ;AAEnBC,OAAOC,OAAO,GAAG,SAASC,aAAaC,GAAG,EAAEC,OAAO,EAAEC,QAAQ;IAC3D,OAAOP,GAAGQ,IAAI,CAACH,KAAKC,SAASC;AAC/B"} |
| declare function _exports(cmd: any, options: any, callback: any): cp.ChildProcess; | ||
| export = _exports; | ||
| import cp = require("child_process"); |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
32996
3.56%33
3.13%302
7.09%1
-50%7
16.67%+ Added
- Removed
- Removed
- Removed
Updated