boxednode
Advanced tools
Comparing version 1.10.7 to 1.10.8
@@ -21,3 +21,3 @@ import { Logger } from './logger'; | ||
}; | ||
export declare function compileJSFileAsBinary(options: CompilationOptions): Promise<void>; | ||
export declare function compileJSFileAsBinary(options: Readonly<CompilationOptions>): Promise<void>; | ||
export {}; |
@@ -243,14 +243,24 @@ 'use strict'; | ||
} | ||
function parseEnvVarArgList(value) { | ||
if (!value) | ||
return []; | ||
try { | ||
return JSON.parse(value); | ||
} | ||
catch (_a) { | ||
return value.split(','); | ||
} | ||
} | ||
async function compileJSFileAsBinary(options) { | ||
const logger = options.logger || new logger_1.LoggerImpl(); | ||
options.configureArgs = options.configureArgs || []; | ||
if (process.env.BOXEDNODE_CONFIGURE_ARGS) { | ||
options.configureArgs.push(...process.env.BOXEDNODE_CONFIGURE_ARGS.split(',')); | ||
} | ||
options.makeArgs = options.makeArgs || []; | ||
if (process.env.BOXEDNODE_MAKE_ARGS) { | ||
options.makeArgs.push(...process.env.BOXEDNODE_MAKE_ARGS.split(',')); | ||
} | ||
const configureArgs = [...(options.configureArgs || [])]; | ||
configureArgs.push(...parseEnvVarArgList(process.env.BOXEDNODE_CONFIGURE_ARGS)); | ||
const makeArgs = [...(options.makeArgs || [])]; | ||
makeArgs.push(...parseEnvVarArgList(process.env.BOXEDNODE_MAKE_ARGS)); | ||
try { | ||
await compileJSFileAsBinaryImpl(options, logger); | ||
await compileJSFileAsBinaryImpl({ | ||
...options, | ||
configureArgs, | ||
makeArgs | ||
}, logger); | ||
} | ||
@@ -257,0 +267,0 @@ catch (err) { |
{ | ||
"name": "boxednode", | ||
"version": "1.10.7", | ||
"version": "1.10.8", | ||
"description": "Create a shippable binary from a JS file", | ||
@@ -55,3 +55,3 @@ "main": "lib/index.js", | ||
"nyc": "^15.1.0", | ||
"ts-node": "^9.0.0", | ||
"ts-node": "^10.8.1", | ||
"typescript": "^4.0.3", | ||
@@ -58,0 +58,0 @@ "weak-napi": "2.0.2" |
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
98073
790
16