boxednode
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -1,2 +0,2 @@ | ||
export type ExecutableMetadata = { | ||
export declare type ExecutableMetadata = { | ||
name?: string; | ||
@@ -3,0 +3,0 @@ description?: string; |
@@ -5,6 +5,6 @@ /// <reference types="node" /> | ||
export declare const pipeline: typeof stream.pipeline.__promisify__; | ||
export type ProcessEnv = { | ||
export declare type ProcessEnv = { | ||
[name: string]: string | undefined; | ||
}; | ||
export type BuildCommandOptions = { | ||
export declare type BuildCommandOptions = { | ||
cwd: string; | ||
@@ -11,0 +11,0 @@ logger: Logger; |
@@ -5,3 +5,3 @@ import { Logger } from './logger'; | ||
import { ProcessEnv } from './helpers'; | ||
type CompilationOptions = { | ||
declare type CompilationOptions = { | ||
nodeVersionRange: string; | ||
@@ -8,0 +8,0 @@ tmpdir?: string; |
@@ -23,2 +23,3 @@ 'use strict'; | ||
const child_process_1 = require("child_process"); | ||
const events_1 = require("events"); | ||
async function getNodeSourceForVersion(range, dir, logger, retries = 2) { | ||
@@ -126,6 +127,13 @@ logger.stepStarting(`Looking for Node.js version matching ${JSON.stringify(range)}`); | ||
try { | ||
await (0, helpers_1.pipeline)(tarballStream, zlib_1.default.createGunzip(), tar_1.default.x({ | ||
cwd: dir | ||
})); | ||
await tarballWritePromise; | ||
await Promise.race([ | ||
Promise.all([ | ||
(0, helpers_1.pipeline)(tarballStream, zlib_1.default.createGunzip(), tar_1.default.x({ | ||
cwd: dir | ||
})), | ||
tarballWritePromise | ||
]), | ||
(0, events_1.once)(process, 'beforeExit').then(() => { | ||
throw new Error('premature exit from the event loop'); | ||
}) | ||
]); | ||
} | ||
@@ -174,2 +182,19 @@ catch (err) { | ||
await (0, helpers_1.spawnBuildCommand)(configure, options); | ||
if (configure.includes('--fully-static') || configure.includes('--partly-static')) { | ||
for (const file of [ | ||
'out/tools/v8_gypfiles/gen-regexp-special-case.target.mk', | ||
'out/test_crypto_engine.target.mk' | ||
]) { | ||
const target = path_1.default.join(sourcePath, file); | ||
try { | ||
await fs_1.promises.stat(target); | ||
} | ||
catch (_a) { | ||
continue; | ||
} | ||
let source = await fs_1.promises.readFile(target, 'utf8'); | ||
source = source.replace(/-static/g, ''); | ||
await fs_1.promises.writeFile(target, 'utf8'); | ||
} | ||
} | ||
const make = ['make', ...makeArgs]; | ||
@@ -176,0 +201,0 @@ if (!make.some((arg) => /^-j/.test(arg))) { |
import { Logger } from './logger'; | ||
import { ProcessEnv } from './helpers'; | ||
export type AddonConfig = { | ||
export declare type AddonConfig = { | ||
path: string; | ||
requireRegexp: RegExp; | ||
}; | ||
export type AddonResult = { | ||
export declare type AddonResult = { | ||
targetName: string; | ||
@@ -12,3 +12,3 @@ registerFunction: string; | ||
}; | ||
type GypConfig = { | ||
declare type GypConfig = { | ||
targets?: GypConfig[]; | ||
@@ -15,0 +15,0 @@ ['defines']?: string[]; |
{ | ||
"name": "boxednode", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Create a shippable binary from a JS file", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
121305
26
1034