@hominis/fireforge 0.44.1 → 0.44.2
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/CHANGELOG.md +36 -0
- package/README.md +18 -110
- package/dist/build-info.json +4 -4
- package/dist/src/commands/build.js +17 -0
- package/dist/src/commands/furnace/apply.js +2 -2
- package/dist/src/commands/furnace/deploy.js +2 -2
- package/dist/src/commands/furnace/index.js +12 -6
- package/dist/src/commands/furnace/init.js +5 -2
- package/dist/src/commands/furnace/sync.js +2 -2
- package/dist/src/commands/re-export-files.js +63 -23
- package/dist/src/commands/re-export-scan.js +18 -2
- package/dist/src/commands/re-export-single.js +19 -7
- package/dist/src/commands/test-register.js +5 -1
- package/dist/src/commands/test-run.d.ts +5 -0
- package/dist/src/commands/test-run.js +11 -4
- package/dist/src/commands/test-verdict.js +10 -1
- package/dist/src/commands/test.js +9 -0
- package/dist/src/commands/token.js +33 -11
- package/dist/src/core/build-audit.js +6 -2
- package/dist/src/core/furnace-jsconfig.js +5 -3
- package/dist/src/core/furnace-operation.d.ts +25 -2
- package/dist/src/core/furnace-operation.js +27 -2
- package/dist/src/core/mach-known-noise-filter.d.ts +17 -0
- package/dist/src/core/mach-known-noise-filter.js +19 -0
- package/dist/src/core/mach.d.ts +8 -3
- package/dist/src/core/mach.js +47 -3
- package/dist/src/core/run-log.d.ts +60 -0
- package/dist/src/core/run-log.js +183 -0
- package/dist/src/core/test-harness-output.d.ts +24 -1
- package/dist/src/core/test-harness-output.js +46 -15
- package/dist/src/core/test-xpcshell-retry.d.ts +2 -2
- package/dist/src/core/test-xpcshell-retry.js +6 -1
- package/dist/src/core/token-manager.d.ts +7 -2
- package/dist/src/core/token-manager.js +74 -20
- package/dist/src/core/token-variant.d.ts +34 -0
- package/dist/src/core/token-variant.js +84 -16
- package/dist/src/types/commands/options.d.ts +30 -1
- package/dist/src/utils/child-env.d.ts +30 -0
- package/dist/src/utils/child-env.js +30 -0
- package/dist/src/utils/options.d.ts +28 -0
- package/dist/src/utils/options.js +32 -1
- package/dist/src/utils/process.d.ts +22 -0
- package/dist/src/utils/process.js +8 -7
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { spawn } from 'node:child_process';
|
|
|
3
3
|
import { constants as osConstants } from 'node:os';
|
|
4
4
|
import { StringDecoder } from 'node:string_decoder';
|
|
5
5
|
import { ExecTimeoutError } from '../errors/base.js';
|
|
6
|
+
import { buildChildEnv } from './child-env.js';
|
|
6
7
|
import { killProcessTree, sweepProcessGroup } from './process-group.js';
|
|
7
8
|
// 50 MB cap per stream to prevent OOM — large toolchain builds (e.g. Firefox, Chromium)
|
|
8
9
|
// can easily blow past this, so we truncate rather than let the buffer grow unbounded.
|
|
@@ -85,7 +86,7 @@ export async function exec(command, args, options = {}) {
|
|
|
85
86
|
return new Promise((resolve, reject) => {
|
|
86
87
|
const child = spawn(command, args, {
|
|
87
88
|
cwd: options.cwd,
|
|
88
|
-
env:
|
|
89
|
+
env: buildChildEnv(options),
|
|
89
90
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
90
91
|
signal: buildSignalFromTimeout(options.timeout),
|
|
91
92
|
});
|
|
@@ -119,7 +120,7 @@ export async function execStream(command, args, options = {}) {
|
|
|
119
120
|
const usesProcessGroup = options.processGroup === true && process.platform !== 'win32';
|
|
120
121
|
const child = spawn(command, args, {
|
|
121
122
|
cwd: options.cwd,
|
|
122
|
-
env:
|
|
123
|
+
env: buildChildEnv(options),
|
|
123
124
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
124
125
|
signal: buildSignalFromTimeout(options.timeout),
|
|
125
126
|
detached: usesProcessGroup,
|
|
@@ -256,7 +257,7 @@ export async function execInherit(command, args, options = {}) {
|
|
|
256
257
|
const usesProcessGroup = options.processGroup === true && process.platform !== 'win32';
|
|
257
258
|
const child = spawn(command, args, {
|
|
258
259
|
cwd: options.cwd,
|
|
259
|
-
env:
|
|
260
|
+
env: buildChildEnv(options),
|
|
260
261
|
stdio: 'inherit',
|
|
261
262
|
signal: buildSignalFromTimeout(options.timeout),
|
|
262
263
|
detached: usesProcessGroup,
|
|
@@ -368,14 +369,14 @@ export async function execInheritCapture(command, args, options = {}) {
|
|
|
368
369
|
const usesProcessGroup = options.processGroup === true && process.platform !== 'win32';
|
|
369
370
|
const child = spawn(command, args, {
|
|
370
371
|
cwd: options.cwd,
|
|
371
|
-
env:
|
|
372
|
+
env: buildChildEnv(options),
|
|
372
373
|
stdio: ['inherit', 'pipe', 'pipe'],
|
|
373
374
|
signal: buildSignalFromTimeout(options.timeout),
|
|
374
375
|
detached: usesProcessGroup,
|
|
375
376
|
});
|
|
376
377
|
const groupPid = usesProcessGroup ? child.pid : undefined;
|
|
377
|
-
const out = createStreamCollector(process.stdout);
|
|
378
|
-
const err = createStreamCollector(process.stderr);
|
|
378
|
+
const out = createStreamCollector(options.mirror?.stdout ?? process.stdout);
|
|
379
|
+
const err = createStreamCollector(options.mirror?.stderr ?? process.stderr);
|
|
379
380
|
child.stdout.on('data', out.onData);
|
|
380
381
|
child.stderr.on('data', err.onData);
|
|
381
382
|
const graceMs = options.shutdownGraceMs ?? 1500;
|
|
@@ -440,7 +441,7 @@ export async function execSmokeRun(command, args, options) {
|
|
|
440
441
|
const usesProcessGroup = process.platform !== 'win32';
|
|
441
442
|
const child = spawn(command, args, {
|
|
442
443
|
cwd: options.cwd,
|
|
443
|
-
env:
|
|
444
|
+
env: buildChildEnv(options),
|
|
444
445
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
445
446
|
// A new process group on POSIX lets us signal the whole descendant
|
|
446
447
|
// tree at once, which is essential for mach → python → firefox →
|