@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.
Files changed (44) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +18 -110
  3. package/dist/build-info.json +4 -4
  4. package/dist/src/commands/build.js +17 -0
  5. package/dist/src/commands/furnace/apply.js +2 -2
  6. package/dist/src/commands/furnace/deploy.js +2 -2
  7. package/dist/src/commands/furnace/index.js +12 -6
  8. package/dist/src/commands/furnace/init.js +5 -2
  9. package/dist/src/commands/furnace/sync.js +2 -2
  10. package/dist/src/commands/re-export-files.js +63 -23
  11. package/dist/src/commands/re-export-scan.js +18 -2
  12. package/dist/src/commands/re-export-single.js +19 -7
  13. package/dist/src/commands/test-register.js +5 -1
  14. package/dist/src/commands/test-run.d.ts +5 -0
  15. package/dist/src/commands/test-run.js +11 -4
  16. package/dist/src/commands/test-verdict.js +10 -1
  17. package/dist/src/commands/test.js +9 -0
  18. package/dist/src/commands/token.js +33 -11
  19. package/dist/src/core/build-audit.js +6 -2
  20. package/dist/src/core/furnace-jsconfig.js +5 -3
  21. package/dist/src/core/furnace-operation.d.ts +25 -2
  22. package/dist/src/core/furnace-operation.js +27 -2
  23. package/dist/src/core/mach-known-noise-filter.d.ts +17 -0
  24. package/dist/src/core/mach-known-noise-filter.js +19 -0
  25. package/dist/src/core/mach.d.ts +8 -3
  26. package/dist/src/core/mach.js +47 -3
  27. package/dist/src/core/run-log.d.ts +60 -0
  28. package/dist/src/core/run-log.js +183 -0
  29. package/dist/src/core/test-harness-output.d.ts +24 -1
  30. package/dist/src/core/test-harness-output.js +46 -15
  31. package/dist/src/core/test-xpcshell-retry.d.ts +2 -2
  32. package/dist/src/core/test-xpcshell-retry.js +6 -1
  33. package/dist/src/core/token-manager.d.ts +7 -2
  34. package/dist/src/core/token-manager.js +74 -20
  35. package/dist/src/core/token-variant.d.ts +34 -0
  36. package/dist/src/core/token-variant.js +84 -16
  37. package/dist/src/types/commands/options.d.ts +30 -1
  38. package/dist/src/utils/child-env.d.ts +30 -0
  39. package/dist/src/utils/child-env.js +30 -0
  40. package/dist/src/utils/options.d.ts +28 -0
  41. package/dist/src/utils/options.js +32 -1
  42. package/dist/src/utils/process.d.ts +22 -0
  43. package/dist/src/utils/process.js +8 -7
  44. 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: { ...process.env, ...options.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: { ...process.env, ...options.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: { ...process.env, ...options.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: { ...process.env, ...options.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: { ...process.env, ...options.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 →
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hominis/fireforge",
3
- "version": "0.44.1",
3
+ "version": "0.44.2",
4
4
  "description": "FireForge — a build tool for customizing Firefox",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",