cross-spawn-windows-exe
Advanced tools
Comparing version 1.1.0 to 1.2.0
import { CrossSpawnArgs } from "@malept/cross-spawn-promise"; | ||
import { CrossSpawnExeOptions } from "./wrapper"; | ||
/** | ||
* Installation instructions for dependencies related to running .NET executables on the | ||
* host platform (i.e., Mono on non-Windows platforms). | ||
*/ | ||
export declare function dotNetDependencyInstallInstructions(): string; | ||
/** | ||
* Heuristically determine the path to `mono` to use. | ||
@@ -5,0 +10,0 @@ * |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.spawnDotNet = exports.determineDotNetWrapper = void 0; | ||
exports.spawnDotNet = exports.determineDotNetWrapper = exports.dotNetDependencyInstallInstructions = void 0; | ||
const wrapper_1 = require("./wrapper"); | ||
/** | ||
* Installation instructions for dependencies related to running .NET executables on the | ||
* host platform (i.e., Mono on non-Windows platforms). | ||
*/ | ||
function dotNetDependencyInstallInstructions() { | ||
switch (process.platform) { | ||
/* istanbul ignore next */ | ||
case "win32": | ||
return "No wrapper necessary"; | ||
case "darwin": | ||
return "Run `brew install mono` to install Mono on macOS via Homebrew."; | ||
case "linux": | ||
return "Consult your Linux distribution's package manager to determine how to install Mono."; | ||
/* istanbul ignore next */ | ||
default: | ||
return "Consult your operating system's package manager to determine how to install Mono."; | ||
} | ||
} | ||
exports.dotNetDependencyInstallInstructions = dotNetDependencyInstallInstructions; | ||
/** | ||
* Heuristically determine the path to `mono` to use. | ||
@@ -29,2 +48,5 @@ * | ||
async function spawnDotNet(cmd, args, options) { | ||
var _a; | ||
options !== null && options !== void 0 ? options : (options = {}); | ||
(_a = options.wrapperInstructions) !== null && _a !== void 0 ? _a : (options.wrapperInstructions = dotNetDependencyInstallInstructions()); | ||
return wrapper_1.spawnWrapperFromFunction(determineDotNetWrapper, cmd, args, options); | ||
@@ -31,0 +53,0 @@ } |
import { CrossSpawnArgs } from "@malept/cross-spawn-promise"; | ||
import { CrossSpawnExeOptions } from "./wrapper"; | ||
/** | ||
* Installation instructions for dependencies related to running Windows executables on the | ||
* host platform (i.e., Wine on non-Windows platforms). | ||
*/ | ||
export declare function exeDependencyInstallInstructions(): string; | ||
/** | ||
* Heuristically determine the path to `wine` to use. | ||
@@ -5,0 +10,0 @@ * |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.spawnExe = exports.determineWineWrapper = void 0; | ||
exports.spawnExe = exports.determineWineWrapper = exports.exeDependencyInstallInstructions = void 0; | ||
const wrapper_1 = require("./wrapper"); | ||
const arch_1 = require("./arch"); | ||
function installInstructions() { | ||
/** | ||
* Installation instructions for dependencies related to running Windows executables on the | ||
* host platform (i.e., Wine on non-Windows platforms). | ||
*/ | ||
function exeDependencyInstallInstructions() { | ||
switch (process.platform) { | ||
@@ -20,2 +24,3 @@ /* istanbul ignore next */ | ||
} | ||
exports.exeDependencyInstallInstructions = exeDependencyInstallInstructions; | ||
/** | ||
@@ -50,8 +55,5 @@ * Heuristically determine the path to `wine` to use. | ||
async function spawnExe(cmd, args, options) { | ||
if (!(options === null || options === void 0 ? void 0 : options.wrapperInstructions)) { | ||
if (!options) { | ||
options = {}; | ||
} | ||
options.wrapperInstructions = installInstructions(); | ||
} | ||
var _a; | ||
options !== null && options !== void 0 ? options : (options = {}); | ||
(_a = options.wrapperInstructions) !== null && _a !== void 0 ? _a : (options.wrapperInstructions = exeDependencyInstallInstructions()); | ||
return wrapper_1.spawnWrapperFromFunction(determineWineWrapper, cmd, args, options); | ||
@@ -58,0 +60,0 @@ } |
@@ -1,5 +0,5 @@ | ||
export { canRunWindowsExeNatively, CrossSpawnExeOptions, DetermineWrapperFunction, spawnWrapper as spawn, spawnWrapperFromFunction, } from "./wrapper"; | ||
export { canRunWindowsExeNatively, CrossSpawnExeOptions, DetermineWrapperFunction, spawnWrapper as spawn, spawnWrapperFromFunction, WrapperError, } from "./wrapper"; | ||
export { is64BitArch } from "./arch"; | ||
export { normalizePath } from "./normalize-path"; | ||
export { spawnDotNet } from "./dotnet"; | ||
export { spawnExe } from "./exe"; | ||
export { dotNetDependencyInstallInstructions, spawnDotNet } from "./dotnet"; | ||
export { exeDependencyInstallInstructions, spawnExe } from "./exe"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.spawnExe = exports.spawnDotNet = exports.normalizePath = exports.is64BitArch = exports.spawnWrapperFromFunction = exports.spawn = exports.canRunWindowsExeNatively = void 0; | ||
exports.spawnExe = exports.exeDependencyInstallInstructions = exports.spawnDotNet = exports.dotNetDependencyInstallInstructions = exports.normalizePath = exports.is64BitArch = exports.WrapperError = exports.spawnWrapperFromFunction = exports.spawn = exports.canRunWindowsExeNatively = void 0; | ||
var wrapper_1 = require("./wrapper"); | ||
@@ -8,2 +8,3 @@ Object.defineProperty(exports, "canRunWindowsExeNatively", { enumerable: true, get: function () { return wrapper_1.canRunWindowsExeNatively; } }); | ||
Object.defineProperty(exports, "spawnWrapperFromFunction", { enumerable: true, get: function () { return wrapper_1.spawnWrapperFromFunction; } }); | ||
Object.defineProperty(exports, "WrapperError", { enumerable: true, get: function () { return wrapper_1.WrapperError; } }); | ||
var arch_1 = require("./arch"); | ||
@@ -14,5 +15,7 @@ Object.defineProperty(exports, "is64BitArch", { enumerable: true, get: function () { return arch_1.is64BitArch; } }); | ||
var dotnet_1 = require("./dotnet"); | ||
Object.defineProperty(exports, "dotNetDependencyInstallInstructions", { enumerable: true, get: function () { return dotnet_1.dotNetDependencyInstallInstructions; } }); | ||
Object.defineProperty(exports, "spawnDotNet", { enumerable: true, get: function () { return dotnet_1.spawnDotNet; } }); | ||
var exe_1 = require("./exe"); | ||
Object.defineProperty(exports, "exeDependencyInstallInstructions", { enumerable: true, get: function () { return exe_1.exeDependencyInstallInstructions; } }); | ||
Object.defineProperty(exports, "spawnExe", { enumerable: true, get: function () { return exe_1.spawnExe; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -73,5 +73,3 @@ "use strict"; | ||
async function spawnWrapper(cmd, args, options) { | ||
if (!options) { | ||
options = {}; | ||
} | ||
options !== null && options !== void 0 ? options : (options = {}); | ||
const { wrapperCommand, wrapperInstructions, ...crossSpawnOptions } = options; | ||
@@ -78,0 +76,0 @@ if (wrapperCommand) { |
{ | ||
"name": "cross-spawn-windows-exe", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Cross-platform support for running Windows executables", | ||
@@ -44,3 +44,3 @@ "main": "dist/src/index.js", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@types/node": "^15.0.3", | ||
"@types/node": "^16.0.0", | ||
"@types/sinon": "^10.0.0", | ||
@@ -67,3 +67,3 @@ "@types/which": "^2.0.0", | ||
"typedoc": "^0.20.0-beta.24", | ||
"typescript": "^4.0.3" | ||
"typescript": "~4.2.4" | ||
}, | ||
@@ -70,0 +70,0 @@ "ava": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40299
158510
395