@hominis/fireforge 0.44.4 → 0.46.0
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 +120 -0
- package/dist/bin/fireforge.js +6 -0
- package/dist/build-info.json +4 -4
- package/dist/src/cli-usage-error.d.ts +46 -0
- package/dist/src/cli-usage-error.js +81 -0
- package/dist/src/cli.d.ts +5 -1
- package/dist/src/cli.js +20 -21
- package/dist/src/commands/bootstrap.js +1 -2
- package/dist/src/commands/build.js +15 -6
- package/dist/src/commands/destructive-decision.d.ts +19 -0
- package/dist/src/commands/destructive-decision.js +31 -0
- package/dist/src/commands/doctor-check-core.d.ts +0 -6
- package/dist/src/commands/doctor-check-core.js +0 -8
- package/dist/src/commands/doctor-orphaned-harness.d.ts +0 -6
- package/dist/src/commands/doctor-orphaned-harness.js +4 -12
- package/dist/src/commands/doctor-post-rebase-audit.js +1 -1
- package/dist/src/commands/doctor-source-pin.d.ts +29 -0
- package/dist/src/commands/doctor-source-pin.js +81 -0
- package/dist/src/commands/doctor.d.ts +2 -0
- package/dist/src/commands/doctor.js +9 -8
- package/dist/src/commands/download.js +35 -24
- package/dist/src/commands/export-all.js +21 -4
- package/dist/src/commands/export-flow.js +15 -60
- package/dist/src/commands/export-placement-conflicts.js +3 -3
- package/dist/src/commands/export-placement-gate.js +2 -8
- package/dist/src/commands/export-placement-policy.js +3 -5
- package/dist/src/commands/export-shared.d.ts +42 -23
- package/dist/src/commands/export-shared.js +4 -19
- package/dist/src/commands/export.js +10 -1
- package/dist/src/commands/furnace/authoring-config.d.ts +13 -0
- package/dist/src/commands/furnace/authoring-config.js +19 -0
- package/dist/src/commands/furnace/chrome-doc-remove.js +1 -1
- package/dist/src/commands/furnace/create-browser-test.js +3 -8
- package/dist/src/commands/furnace/create-dry-run.js +2 -5
- package/dist/src/commands/furnace/create-templates.d.ts +17 -1
- package/dist/src/commands/furnace/create-templates.js +2 -1
- package/dist/src/commands/furnace/create.js +25 -19
- package/dist/src/commands/furnace/deploy.js +11 -2
- package/dist/src/commands/furnace/init.js +2 -1
- package/dist/src/commands/furnace/override.js +28 -19
- package/dist/src/commands/furnace/refresh.js +9 -1
- package/dist/src/commands/furnace/remove-mutations.d.ts +6 -7
- package/dist/src/commands/furnace/remove-mutations.js +0 -1
- package/dist/src/commands/furnace/remove.js +2 -6
- package/dist/src/commands/furnace/rename-browser-test.js +1 -7
- package/dist/src/commands/furnace/rename.js +29 -29
- package/dist/src/commands/furnace/status.js +12 -9
- package/dist/src/commands/furnace/test-file-name.d.ts +28 -0
- package/dist/src/commands/furnace/test-file-name.js +39 -0
- package/dist/src/commands/furnace/validation-output.d.ts +21 -9
- package/dist/src/commands/furnace/validation-output.js +3 -8
- package/dist/src/commands/import.js +2 -9
- package/dist/src/commands/lint-per-patch.d.ts +2 -2
- package/dist/src/commands/lint-per-patch.js +19 -4
- package/dist/src/commands/lint-per-run-checkjs.d.ts +2 -2
- package/dist/src/commands/lint.d.ts +2 -1
- package/dist/src/commands/lint.js +1 -1
- package/dist/src/commands/manifest.js +1 -1
- package/dist/src/commands/package.js +2 -4
- package/dist/src/commands/patch/compact.js +14 -15
- package/dist/src/commands/patch/delete.js +15 -25
- package/dist/src/commands/patch/entry-projection.d.ts +13 -0
- package/dist/src/commands/patch/entry-projection.js +24 -0
- package/dist/src/commands/patch/lint-ignore.d.ts +0 -8
- package/dist/src/commands/patch/lint-ignore.js +19 -29
- package/dist/src/commands/patch/move-files-create.js +24 -10
- package/dist/src/commands/patch/move-files-into.js +38 -37
- package/dist/src/commands/patch/move-files.js +4 -13
- package/dist/src/commands/patch/rename.js +27 -41
- package/dist/src/commands/patch/reorder.js +25 -38
- package/dist/src/commands/patch/split-plan.d.ts +4 -5
- package/dist/src/commands/patch/split-plan.js +4 -11
- package/dist/src/commands/patch/split.js +45 -43
- package/dist/src/commands/patch/staged-dependency.js +16 -22
- package/dist/src/commands/patch/tier.js +15 -25
- package/dist/src/commands/patch-rename-map.d.ts +19 -0
- package/dist/src/commands/patch-rename-map.js +36 -0
- package/dist/src/commands/pending-resolution.d.ts +15 -0
- package/dist/src/commands/pending-resolution.js +25 -0
- package/dist/src/commands/re-export-adjacent.d.ts +32 -2
- package/dist/src/commands/re-export-adjacent.js +51 -10
- package/dist/src/commands/re-export-bulk-scan.js +6 -10
- package/dist/src/commands/re-export-drift.d.ts +8 -0
- package/dist/src/commands/re-export-drift.js +65 -4
- package/dist/src/commands/re-export-files.d.ts +2 -3
- package/dist/src/commands/re-export-files.js +38 -32
- package/dist/src/commands/re-export-lint.d.ts +3 -4
- package/dist/src/commands/re-export-lint.js +9 -2
- package/dist/src/commands/re-export-options.js +19 -5
- package/dist/src/commands/re-export-register.js +5 -1
- package/dist/src/commands/re-export-scan.js +8 -8
- package/dist/src/commands/re-export-single.d.ts +22 -3
- package/dist/src/commands/re-export-single.js +19 -11
- package/dist/src/commands/re-export.js +44 -27
- package/dist/src/commands/rebase/abort.js +3 -8
- package/dist/src/commands/rebase/continue.js +12 -12
- package/dist/src/commands/rebase/index.js +2 -2
- package/dist/src/commands/rebase/patch-loop.d.ts +2 -2
- package/dist/src/commands/rebase/patch-loop.js +2 -7
- package/dist/src/commands/resolve.js +18 -10
- package/dist/src/commands/run.d.ts +0 -13
- package/dist/src/commands/run.js +12 -25
- package/dist/src/commands/setup-support.d.ts +16 -4
- package/dist/src/commands/setup-support.js +16 -16
- package/dist/src/commands/setup.js +3 -9
- package/dist/src/commands/source.js +8 -1
- package/dist/src/commands/status-check.js +2 -2
- package/dist/src/commands/status-output.js +2 -2
- package/dist/src/commands/status.js +3 -4
- package/dist/src/commands/test-build-phase.d.ts +2 -2
- package/dist/src/commands/test-build-phase.js +33 -8
- package/dist/src/commands/test-diagnose.js +14 -5
- package/dist/src/commands/test-modes.d.ts +2 -2
- package/dist/src/commands/test-modes.js +0 -1
- package/dist/src/commands/test-register.js +6 -3
- package/dist/src/commands/test-run.js +29 -21
- package/dist/src/commands/test-stale-gate.js +8 -5
- package/dist/src/commands/test-verdict.d.ts +16 -2
- package/dist/src/commands/test-verdict.js +18 -3
- package/dist/src/commands/test.js +51 -7
- package/dist/src/commands/token-list.d.ts +26 -0
- package/dist/src/commands/token-list.js +153 -0
- package/dist/src/commands/token.js +17 -1
- package/dist/src/commands/tree.js +7 -2
- package/dist/src/commands/typecheck.js +9 -9
- package/dist/src/commands/wire.js +4 -3
- package/dist/src/core/branding.d.ts +0 -7
- package/dist/src/core/branding.js +3 -2
- package/dist/src/core/browser-wire.js +6 -3
- package/dist/src/core/build-audit-platform.d.ts +29 -0
- package/dist/src/core/build-audit-platform.js +140 -0
- package/dist/src/core/build-audit-registration.js +3 -2
- package/dist/src/core/build-audit-skip.d.ts +57 -0
- package/dist/src/core/build-audit-skip.js +112 -0
- package/dist/src/core/build-audit.d.ts +15 -2
- package/dist/src/core/build-audit.js +154 -12
- package/dist/src/core/build-baseline.d.ts +45 -28
- package/dist/src/core/build-baseline.js +6 -29
- package/dist/src/core/build-jar-escalation.d.ts +64 -0
- package/dist/src/core/build-jar-escalation.js +128 -0
- package/dist/src/core/build-overwrite-guard.js +1 -1
- package/dist/src/core/build-prepare.d.ts +5 -2
- package/dist/src/core/build-prepare.js +34 -6
- package/dist/src/core/config-paths.d.ts +2 -6
- package/dist/src/core/config-paths.js +4 -2
- package/dist/src/core/config-state.d.ts +0 -6
- package/dist/src/core/config-state.js +1 -19
- package/dist/src/core/config-validate-build-audit.d.ts +8 -0
- package/dist/src/core/config-validate-build-audit.js +80 -0
- package/dist/src/core/config-validate-file-size.d.ts +12 -0
- package/dist/src/core/config-validate-file-size.js +65 -0
- package/dist/src/core/config-validate-patch-policy.d.ts +2 -2
- package/dist/src/core/config-validate-patch-policy.js +3 -3
- package/dist/src/core/config-validate-test-toolchains.d.ts +2 -2
- package/dist/src/core/config-validate-test-toolchains.js +4 -5
- package/dist/src/core/config-validate.js +20 -3
- package/dist/src/core/config.d.ts +2 -2
- package/dist/src/core/config.js +11 -15
- package/dist/src/core/coverage-extend.js +4 -4
- package/dist/src/core/discard-baseline.js +7 -7
- package/dist/src/core/engine-precondition.d.ts +1 -9
- package/dist/src/core/engine-precondition.js +3 -8
- package/dist/src/core/engine-session-lock.js +13 -17
- package/dist/src/core/export-moved-code-shape.js +2 -2
- package/dist/src/core/file-lock-owner.d.ts +103 -0
- package/dist/src/core/file-lock-owner.js +259 -0
- package/dist/src/core/file-lock.d.ts +2 -7
- package/dist/src/core/file-lock.js +40 -91
- package/dist/src/core/firefox-cache.d.ts +13 -1
- package/dist/src/core/firefox-cache.js +59 -34
- package/dist/src/core/firefox-download.d.ts +15 -0
- package/dist/src/core/firefox-download.js +37 -21
- package/dist/src/core/firefox-extract.d.ts +6 -5
- package/dist/src/core/firefox-extract.js +36 -18
- package/dist/src/core/firefox.d.ts +30 -32
- package/dist/src/core/firefox.js +5 -36
- package/dist/src/core/furnace-apply-dry-run.d.ts +1 -6
- package/dist/src/core/furnace-apply-dry-run.js +1 -7
- package/dist/src/core/furnace-apply-helpers.d.ts +0 -11
- package/dist/src/core/furnace-apply-helpers.js +8 -19
- package/dist/src/core/furnace-apply-overwrite-warn.js +4 -2
- package/dist/src/core/furnace-apply.d.ts +1 -1
- package/dist/src/core/furnace-apply.js +30 -10
- package/dist/src/core/furnace-config.d.ts +1 -1
- package/dist/src/core/furnace-config.js +23 -36
- package/dist/src/core/furnace-constants.js +3 -2
- package/dist/src/core/furnace-dir-entry.d.ts +20 -0
- package/dist/src/core/furnace-dir-entry.js +21 -0
- package/dist/src/core/furnace-operation.d.ts +2 -0
- package/dist/src/core/furnace-operation.js +3 -1
- package/dist/src/core/furnace-refresh.d.ts +18 -6
- package/dist/src/core/furnace-refresh.js +3 -6
- package/dist/src/core/furnace-registration-ast.d.ts +0 -1
- package/dist/src/core/furnace-registration-ast.js +0 -3
- package/dist/src/core/furnace-registration.d.ts +2 -1
- package/dist/src/core/furnace-registration.js +22 -29
- package/dist/src/core/furnace-scanner.js +3 -6
- package/dist/src/core/furnace-state-persist.d.ts +2 -2
- package/dist/src/core/furnace-validate-registration.js +5 -7
- package/dist/src/core/git-base.d.ts +3 -1
- package/dist/src/core/git-base.js +25 -3
- package/dist/src/core/git-diff-new-file.d.ts +40 -0
- package/dist/src/core/git-diff-new-file.js +119 -0
- package/dist/src/core/git-diff.d.ts +9 -9
- package/dist/src/core/git-diff.js +88 -157
- package/dist/src/core/git-file-ops.d.ts +0 -7
- package/dist/src/core/git-file-ops.js +4 -28
- package/dist/src/core/git-readonly-index.d.ts +0 -2
- package/dist/src/core/git-readonly-index.js +0 -4
- package/dist/src/core/git-status.d.ts +7 -0
- package/dist/src/core/git-status.js +21 -9
- package/dist/src/core/git.d.ts +0 -6
- package/dist/src/core/git.js +14 -43
- package/dist/src/core/harness-orphans.d.ts +73 -0
- package/dist/src/core/harness-orphans.js +187 -0
- package/dist/src/core/history-log.d.ts +19 -0
- package/dist/src/core/history-log.js +29 -0
- package/dist/src/core/mach-error-hints.d.ts +0 -5
- package/dist/src/core/mach-error-hints.js +1 -1
- package/dist/src/core/mach-known-noise-filter.d.ts +25 -3
- package/dist/src/core/mach-known-noise-filter.js +31 -10
- package/dist/src/core/mach-mozconfig.js +2 -1
- package/dist/src/core/mach-python.d.ts +2 -0
- package/dist/src/core/mach-python.js +12 -7
- package/dist/src/core/mach-resource-shim.d.ts +13 -1
- package/dist/src/core/mach-resource-shim.js +112 -9
- package/dist/src/core/mach.d.ts +46 -53
- package/dist/src/core/mach.js +31 -83
- package/dist/src/core/marionette-port.d.ts +0 -17
- package/dist/src/core/marionette-port.js +12 -58
- package/dist/src/core/marionette-preflight.js +9 -27
- package/dist/src/core/mochitest-server-port.js +3 -3
- package/dist/src/core/moz-manifest-rules.js +37 -33
- package/dist/src/core/patch-apply-fuzz.js +4 -4
- package/dist/src/core/patch-apply.d.ts +4 -5
- package/dist/src/core/patch-apply.js +55 -32
- package/dist/src/core/patch-export-coverage.d.ts +0 -9
- package/dist/src/core/patch-export-coverage.js +1 -30
- package/dist/src/core/patch-export-update.d.ts +18 -1
- package/dist/src/core/patch-export-update.js +4 -3
- package/dist/src/core/patch-export.d.ts +11 -21
- package/dist/src/core/patch-export.js +44 -66
- package/dist/src/core/patch-files.d.ts +0 -4
- package/dist/src/core/patch-files.js +0 -11
- package/dist/src/core/patch-lint-binary.d.ts +6 -12
- package/dist/src/core/patch-lint-cache.d.ts +17 -1
- package/dist/src/core/patch-lint-cache.js +3 -6
- package/dist/src/core/patch-lint-checkjs.d.ts +33 -16
- package/dist/src/core/patch-lint-checkjs.js +43 -25
- package/dist/src/core/patch-lint-creators.d.ts +2 -6
- package/dist/src/core/patch-lint-cross.d.ts +16 -8
- package/dist/src/core/patch-lint-cross.js +49 -92
- package/dist/src/core/patch-lint-css.js +10 -6
- package/dist/src/core/patch-lint-file-size.d.ts +52 -0
- package/dist/src/core/patch-lint-file-size.js +53 -0
- package/dist/src/core/patch-lint-forward-registration.d.ts +58 -0
- package/dist/src/core/patch-lint-forward-registration.js +210 -0
- package/dist/src/core/patch-lint-jsdoc.js +36 -36
- package/dist/src/core/patch-lint-module-registration.d.ts +2 -8
- package/dist/src/core/patch-lint-prettier.d.ts +36 -0
- package/dist/src/core/patch-lint-prettier.js +126 -0
- package/dist/src/core/patch-lint-queue-types.d.ts +60 -0
- package/dist/src/core/patch-lint-queue-types.js +12 -0
- package/dist/src/core/patch-lint-staged-registration.d.ts +61 -0
- package/dist/src/core/patch-lint-staged-registration.js +90 -0
- package/dist/src/core/patch-lint-unmanaged-companion.d.ts +106 -0
- package/dist/src/core/patch-lint-unmanaged-companion.js +214 -0
- package/dist/src/core/patch-lint.d.ts +14 -9
- package/dist/src/core/patch-lint.js +27 -27
- package/dist/src/core/patch-lock.js +3 -3
- package/dist/src/core/patch-manifest-io.js +8 -7
- package/dist/src/core/patch-parse.d.ts +19 -8
- package/dist/src/core/patch-parse.js +25 -0
- package/dist/src/core/patch-policy.js +15 -27
- package/dist/src/core/patch-source-metadata.d.ts +1 -3
- package/dist/src/core/patch-source-metadata.js +0 -4
- package/dist/src/core/patch-transform.d.ts +21 -8
- package/dist/src/core/patch-transform.js +38 -10
- package/dist/src/core/process-cpu-time.js +1 -1
- package/dist/src/core/rebase-session.d.ts +2 -8
- package/dist/src/core/rebase-session.js +5 -17
- package/dist/src/core/register-browser-content.js +3 -2
- package/dist/src/core/register-browser-test.js +2 -1
- package/dist/src/core/register-module.js +2 -1
- package/dist/src/core/register-scaffold.js +5 -4
- package/dist/src/core/register-shared-css.js +2 -1
- package/dist/src/core/run-log-redact.d.ts +38 -0
- package/dist/src/core/run-log-redact.js +69 -0
- package/dist/src/core/run-log.d.ts +13 -2
- package/dist/src/core/run-log.js +67 -18
- package/dist/src/core/signal-critical.js +2 -4
- package/dist/src/core/smoke-patterns.d.ts +0 -1
- package/dist/src/core/smoke-patterns.js +18 -11
- package/dist/src/core/state-file.d.ts +12 -1
- package/dist/src/core/state-file.js +14 -1
- package/dist/src/core/status-classify.js +2 -1
- package/dist/src/core/test-changed-prefs.js +26 -11
- package/dist/src/core/test-harness-crash.js +61 -48
- package/dist/src/core/test-harness-verdict-notes.d.ts +55 -0
- package/dist/src/core/test-harness-verdict-notes.js +48 -0
- package/dist/src/core/test-stale-check.d.ts +23 -8
- package/dist/src/core/test-stale-check.js +77 -4
- package/dist/src/core/test-stall-triage.js +37 -19
- package/dist/src/core/test-xpcshell-retry.d.ts +26 -7
- package/dist/src/core/test-xpcshell-retry.js +14 -11
- package/dist/src/core/token-category.d.ts +33 -0
- package/dist/src/core/token-category.js +56 -48
- package/dist/src/core/token-dark-mode.js +2 -14
- package/dist/src/core/token-inventory.d.ts +56 -0
- package/dist/src/core/token-inventory.js +109 -0
- package/dist/src/core/token-manager.d.ts +1 -1
- package/dist/src/core/token-manager.js +1 -1
- package/dist/src/core/token-variant.js +21 -22
- package/dist/src/core/toolchain-preflight.js +1 -1
- package/dist/src/core/tree-cow.d.ts +0 -2
- package/dist/src/core/tree-cow.js +2 -2
- package/dist/src/core/tree-store.js +4 -5
- package/dist/src/core/typecheck.js +2 -2
- package/dist/src/core/wire-dom-fragment.js +6 -17
- package/dist/src/core/wire-utils.js +5 -17
- package/dist/src/core/xpcshell-appdir.js +2 -4
- package/dist/src/errors/base.d.ts +53 -1
- package/dist/src/errors/base.js +79 -11
- package/dist/src/errors/build.d.ts +28 -0
- package/dist/src/errors/build.js +51 -10
- package/dist/src/errors/config.d.ts +0 -14
- package/dist/src/errors/config.js +13 -34
- package/dist/src/errors/download.d.ts +13 -0
- package/dist/src/errors/download.js +53 -24
- package/dist/src/errors/furnace.js +8 -9
- package/dist/src/errors/git.d.ts +8 -8
- package/dist/src/errors/git.js +20 -30
- package/dist/src/errors/patch.js +8 -10
- package/dist/src/errors/rebase.js +7 -7
- package/dist/src/types/commands/options.d.ts +96 -123
- package/dist/src/types/commands/patches.d.ts +17 -6
- package/dist/src/types/config.d.ts +75 -2
- package/dist/src/types/index.d.ts +0 -1
- package/dist/src/utils/assert.d.ts +3 -15
- package/dist/src/utils/assert.js +1 -18
- package/dist/src/utils/build-info.d.ts +1 -1
- package/dist/src/utils/child-env.d.ts +2 -1
- package/dist/src/utils/elapsed.js +10 -1
- package/dist/src/utils/fs.d.ts +4 -2
- package/dist/src/utils/fs.js +11 -14
- package/dist/src/utils/hash.d.ts +12 -0
- package/dist/src/utils/hash.js +16 -0
- package/dist/src/utils/line-dispatch.d.ts +15 -0
- package/dist/src/utils/line-dispatch.js +48 -0
- package/dist/src/utils/options.d.ts +1 -7
- package/dist/src/utils/options.js +6 -7
- package/dist/src/utils/package-root.js +3 -12
- package/dist/src/utils/platform.d.ts +0 -4
- package/dist/src/utils/process-group.d.ts +2 -1
- package/dist/src/utils/process-group.js +20 -19
- package/dist/src/utils/process.d.ts +40 -26
- package/dist/src/utils/process.js +115 -166
- package/dist/src/utils/ps-duration.js +3 -3
- package/dist/src/utils/sleep.d.ts +26 -0
- package/dist/src/utils/sleep.js +31 -0
- package/dist/src/utils/validation.d.ts +2 -38
- package/dist/src/utils/validation.js +7 -16
- package/docs/configuration.md +136 -1
- package/docs/exit-codes.md +34 -20
- package/docs/lifecycle-invariants.md +18 -12
- package/docs/machine-output.md +31 -8
- package/docs/patch-workflow.md +2 -1
- package/docs/run-logs.md +44 -4
- package/docs/testing.md +70 -11
- package/package.json +8 -7
- package/dist/src/commands/rebase.d.ts +0 -4
- package/dist/src/commands/rebase.js +0 -5
- package/dist/src/core/patch-artifact-normalize.d.ts +0 -21
- package/dist/src/core/patch-artifact-normalize.js +0 -24
- package/dist/src/core/patch-lint-reexports.d.ts +0 -7
- package/dist/src/core/patch-lint-reexports.js +0 -8
- package/dist/src/core/wire-targets.d.ts +0 -7
- package/dist/src/core/wire-targets.js +0 -8
|
@@ -3,6 +3,61 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { FirefoxProduct, ProjectLicense } from '../config.js';
|
|
5
5
|
import type { PatchCategory } from './patches.js';
|
|
6
|
+
/**
|
|
7
|
+
* `--dry-run`: print the planned change and exit without writing anything.
|
|
8
|
+
*
|
|
9
|
+
* Twenty-four option types spelled this field with five different doc
|
|
10
|
+
* comments for one behaviour. The contract is uniform and load-bearing — a
|
|
11
|
+
* dry run must perform every check the real run does and then write nothing —
|
|
12
|
+
* so it is stated once.
|
|
13
|
+
*/
|
|
14
|
+
export interface DryRunnable {
|
|
15
|
+
/** Print the planned change without writing anything. */
|
|
16
|
+
dryRun?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* `--yes`: answer the confirmation prompt non-interactively.
|
|
20
|
+
*
|
|
21
|
+
* Required for non-TTY runs, where there is no prompt to answer. It waives
|
|
22
|
+
* the prompt only — never a safety gate; flags that waive a refusal are
|
|
23
|
+
* spelled `--force*` and live on their own types.
|
|
24
|
+
*/
|
|
25
|
+
export interface Confirmable {
|
|
26
|
+
/** Skip the confirmation prompt; required for non-TTY runs. */
|
|
27
|
+
yes?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* `--force-unsafe`: proceed past a refusal the command would otherwise raise.
|
|
31
|
+
*
|
|
32
|
+
* Distinct from {@link Confirmable}: this waives a correctness gate (a
|
|
33
|
+
* projected-lint failure, a patchPolicy violation), not a prompt.
|
|
34
|
+
*/
|
|
35
|
+
export interface UnsafeOverridable {
|
|
36
|
+
/** Bypass refusals the command would otherwise raise. */
|
|
37
|
+
forceUnsafe?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* `--wait-lock [seconds]` for commands that take the ENGINE SESSION lock.
|
|
41
|
+
*
|
|
42
|
+
* Parsed at the CLI layer (`true` for the bare flag, meaning 60 seconds) and
|
|
43
|
+
* consumed there to bound the wait; the command implementation ignores it.
|
|
44
|
+
*/
|
|
45
|
+
export interface EngineLockWaitable {
|
|
46
|
+
/** Parsed `--wait-lock [seconds]` value; `true` means the 60-second default. */
|
|
47
|
+
waitLock?: number | boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* `--wait-lock [seconds]` for commands that mutate patch metadata under the
|
|
51
|
+
* PATCH DIRECTORY lock.
|
|
52
|
+
*
|
|
53
|
+
* Deliberately separate from {@link EngineLockWaitable}: the two flags share a
|
|
54
|
+
* spelling but bound different locks, and a reader needs to know which one a
|
|
55
|
+
* command contends for.
|
|
56
|
+
*/
|
|
57
|
+
export interface PatchLockWaitable {
|
|
58
|
+
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
59
|
+
waitLock?: number | boolean;
|
|
60
|
+
}
|
|
6
61
|
/**
|
|
7
62
|
* Options for the setup command.
|
|
8
63
|
*/
|
|
@@ -51,7 +106,7 @@ export interface SourceSetOptions {
|
|
|
51
106
|
/**
|
|
52
107
|
* Options for the build command.
|
|
53
108
|
*/
|
|
54
|
-
export interface BuildOptions {
|
|
109
|
+
export interface BuildOptions extends EngineLockWaitable {
|
|
55
110
|
/** Fast UI-only rebuild */
|
|
56
111
|
ui?: boolean;
|
|
57
112
|
/** Number of parallel jobs */
|
|
@@ -74,17 +129,11 @@ export interface BuildOptions {
|
|
|
74
129
|
* multi-session checkout wants the hard stop.
|
|
75
130
|
*/
|
|
76
131
|
refuseUnexportedDrift?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Parsed `--wait-lock [seconds]` value (`true` for the bare flag, meaning
|
|
79
|
-
* 60). Consumed at the CLI layer to bound the engine-session-lock wait;
|
|
80
|
-
* the command implementation ignores it.
|
|
81
|
-
*/
|
|
82
|
-
waitLock?: number | boolean;
|
|
83
132
|
}
|
|
84
133
|
/**
|
|
85
134
|
* Options for the export command.
|
|
86
135
|
*/
|
|
87
|
-
export interface ExportOptions {
|
|
136
|
+
export interface ExportOptions extends EngineLockWaitable {
|
|
88
137
|
/** Name/description for the patch */
|
|
89
138
|
name?: string;
|
|
90
139
|
/** Category classification */
|
|
@@ -130,12 +179,6 @@ export interface ExportOptions {
|
|
|
130
179
|
* another patch, because the resulting queue fails `verify` immediately.
|
|
131
180
|
*/
|
|
132
181
|
allowOverlap?: boolean;
|
|
133
|
-
/**
|
|
134
|
-
* Parsed `--wait-lock [seconds]` value (`true` for the bare flag, meaning
|
|
135
|
-
* 60). Consumed at the CLI layer to bound the engine-session-lock wait;
|
|
136
|
-
* the command implementation ignores it.
|
|
137
|
-
*/
|
|
138
|
-
waitLock?: number | boolean;
|
|
139
182
|
/**
|
|
140
183
|
* Force a tier override on the new patch's `PatchMetadata.tier`. Only
|
|
141
184
|
* `"branding"` is currently recognised — Commander rejects other values
|
|
@@ -158,16 +201,14 @@ export interface ExportOptions {
|
|
|
158
201
|
/**
|
|
159
202
|
* Options for the reset command.
|
|
160
203
|
*/
|
|
161
|
-
export interface ResetOptions {
|
|
162
|
-
/** Skip confirmation prompt */
|
|
163
|
-
yes?: boolean;
|
|
204
|
+
export interface ResetOptions extends Confirmable {
|
|
164
205
|
/** Show what would be reset without doing it */
|
|
165
206
|
dryRun?: boolean;
|
|
166
207
|
}
|
|
167
208
|
/**
|
|
168
209
|
* Options for the discard command.
|
|
169
210
|
*/
|
|
170
|
-
export interface DiscardOptions {
|
|
211
|
+
export interface DiscardOptions extends Confirmable {
|
|
171
212
|
/**
|
|
172
213
|
* Restore to pristine upstream (HEAD) instead of the patch-applied
|
|
173
214
|
* baseline, deleting patch-created files.
|
|
@@ -175,8 +216,6 @@ export interface DiscardOptions {
|
|
|
175
216
|
toUpstream?: boolean;
|
|
176
217
|
/** Show what would be discarded without doing it */
|
|
177
218
|
dryRun?: boolean;
|
|
178
|
-
/** Skip confirmation prompt */
|
|
179
|
-
yes?: boolean;
|
|
180
219
|
}
|
|
181
220
|
/**
|
|
182
221
|
* Options for the package command.
|
|
@@ -212,7 +251,7 @@ export interface ImportOptions {
|
|
|
212
251
|
/**
|
|
213
252
|
* Options for the re-export command.
|
|
214
253
|
*/
|
|
215
|
-
export interface ReExportOptions {
|
|
254
|
+
export interface ReExportOptions extends EngineLockWaitable {
|
|
216
255
|
/** Re-export all patches */
|
|
217
256
|
all?: boolean;
|
|
218
257
|
/** Scan directories for new/removed files and update filesAffected */
|
|
@@ -282,12 +321,6 @@ export interface ReExportOptions {
|
|
|
282
321
|
* which has explicit `--add` / `--remove` / `--clear` modes.
|
|
283
322
|
*/
|
|
284
323
|
lintIgnore?: string[];
|
|
285
|
-
/**
|
|
286
|
-
* Parsed `--wait-lock [seconds]` value (`true` for the bare flag, meaning
|
|
287
|
-
* 60). Consumed at the CLI layer to bound the engine-session-lock wait;
|
|
288
|
-
* the command implementation ignores it.
|
|
289
|
-
*/
|
|
290
|
-
waitLock?: number | boolean;
|
|
291
324
|
/**
|
|
292
325
|
* Refuse (non-zero exit, patch not written) a scan-less re-export when
|
|
293
326
|
* unmanaged files exist adjacent to the patch's ownership, instead of
|
|
@@ -322,60 +355,47 @@ export interface ReExportOptions {
|
|
|
322
355
|
* else still refuses.
|
|
323
356
|
*/
|
|
324
357
|
expect?: string[];
|
|
358
|
+
/**
|
|
359
|
+
* Engine-relative files that are an APPROVED unmanaged exception
|
|
360
|
+
* (`--expect-unmanaged`, repeatable; requires
|
|
361
|
+
* `--refuse-adjacent-unmanaged`). The adjacency refusal is all-or-nothing
|
|
362
|
+
* without it: a project with a reviewed, deliberately unmanaged path beside
|
|
363
|
+
* a patch's ownership has to drop the flag entirely and hand-read the
|
|
364
|
+
* notice, which is a weaker belt than the one being disarmed. Approved
|
|
365
|
+
* paths are still LISTED — they are carved out of the refusal, not hidden.
|
|
366
|
+
*/
|
|
367
|
+
expectUnmanaged?: string[];
|
|
325
368
|
}
|
|
326
369
|
/**
|
|
327
370
|
* Options for the `fireforge patch tier` subcommand. Sets or clears the
|
|
328
371
|
* `PatchMetadata.tier` field on a single patch without rewriting the
|
|
329
372
|
* `.patch` file body — the manifest is the only thing that changes.
|
|
330
373
|
*/
|
|
331
|
-
export interface PatchTierOptions {
|
|
332
|
-
/**
|
|
333
|
-
* Seconds to wait for the patch directory lock. This command mutates patch
|
|
334
|
-
* metadata under that lock.
|
|
335
|
-
*/
|
|
336
|
-
waitLock?: number | boolean;
|
|
374
|
+
export interface PatchTierOptions extends Confirmable, DryRunnable, PatchLockWaitable {
|
|
337
375
|
/** Force the named tier on the patch. Only `"branding"` is recognised. */
|
|
338
376
|
tier?: 'branding';
|
|
339
377
|
/** Remove the `tier` override entirely, restoring auto-detection. */
|
|
340
378
|
clear?: boolean;
|
|
341
|
-
/** Print the planned change without writing. */
|
|
342
|
-
dryRun?: boolean;
|
|
343
|
-
/** Skip the confirmation prompt (required for non-TTY). */
|
|
344
|
-
yes?: boolean;
|
|
345
379
|
}
|
|
346
380
|
/**
|
|
347
381
|
* Options for the `fireforge patch lint-ignore` subcommand. Modes are
|
|
348
382
|
* mutually exclusive — exactly one of `add`, `remove`, or `clear` must
|
|
349
383
|
* be set per invocation.
|
|
350
384
|
*/
|
|
351
|
-
export interface PatchLintIgnoreOptions {
|
|
352
|
-
/**
|
|
353
|
-
* Seconds to wait for the patch directory lock. This command mutates patch
|
|
354
|
-
* metadata under that lock.
|
|
355
|
-
*/
|
|
356
|
-
waitLock?: number | boolean;
|
|
385
|
+
export interface PatchLintIgnoreOptions extends Confirmable, DryRunnable, PatchLockWaitable {
|
|
357
386
|
/** Lint check IDs to add to the patch's `lintIgnore` list (union, de-duped). */
|
|
358
387
|
add?: string[];
|
|
359
388
|
/** Lint check IDs to remove from the patch's `lintIgnore` list. */
|
|
360
389
|
remove?: string[];
|
|
361
390
|
/** Drop the `lintIgnore` field entirely. */
|
|
362
391
|
clear?: boolean;
|
|
363
|
-
/** Print the planned change without writing. */
|
|
364
|
-
dryRun?: boolean;
|
|
365
|
-
/** Skip the confirmation prompt (required for non-TTY). */
|
|
366
|
-
yes?: boolean;
|
|
367
392
|
}
|
|
368
393
|
/**
|
|
369
394
|
* Options for the `fireforge patch staged-dependency` subcommand. Modes are
|
|
370
395
|
* mutually exclusive: add a declaration, remove one or more matching
|
|
371
396
|
* declarations, or clear all staged dependencies from the patch.
|
|
372
397
|
*/
|
|
373
|
-
export interface PatchStagedDependencyOptions {
|
|
374
|
-
/**
|
|
375
|
-
* Seconds to wait for the patch directory lock. This command mutates patch
|
|
376
|
-
* metadata under that lock.
|
|
377
|
-
*/
|
|
378
|
-
waitLock?: number | boolean;
|
|
398
|
+
export interface PatchStagedDependencyOptions extends Confirmable, DryRunnable, PatchLockWaitable {
|
|
379
399
|
/** Add a staged dependency declaration. */
|
|
380
400
|
add?: boolean;
|
|
381
401
|
/** Remove matching staged dependency declarations. */
|
|
@@ -403,15 +423,11 @@ export interface PatchStagedDependencyOptions {
|
|
|
403
423
|
owner?: string;
|
|
404
424
|
/** Optional human-readable rationale stored with the declaration. */
|
|
405
425
|
reason?: string;
|
|
406
|
-
/** Print the planned change without writing. */
|
|
407
|
-
dryRun?: boolean;
|
|
408
|
-
/** Skip the confirmation prompt (required for non-TTY). */
|
|
409
|
-
yes?: boolean;
|
|
410
426
|
}
|
|
411
427
|
/**
|
|
412
428
|
* Options for the `patch split` command.
|
|
413
429
|
*/
|
|
414
|
-
export interface PatchSplitOptions {
|
|
430
|
+
export interface PatchSplitOptions extends Confirmable, PatchLockWaitable, UnsafeOverridable {
|
|
415
431
|
/** Files to move out of the source patch (engine-relative). */
|
|
416
432
|
files: string[];
|
|
417
433
|
/** Name for the new patch (used in its filename slug). */
|
|
@@ -428,14 +444,8 @@ export interface PatchSplitOptions {
|
|
|
428
444
|
after?: string;
|
|
429
445
|
/** Preview without writing. */
|
|
430
446
|
dryRun?: boolean;
|
|
431
|
-
/** Skip interactive confirmation (required for non-TTY). */
|
|
432
|
-
yes?: boolean;
|
|
433
|
-
/** Bypass projected-lint refusals. */
|
|
434
|
-
forceUnsafe?: boolean;
|
|
435
447
|
/** Skip per-patch lint of the projected bodies. */
|
|
436
448
|
skipLint?: boolean;
|
|
437
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
438
|
-
waitLock?: number | boolean;
|
|
439
449
|
}
|
|
440
450
|
/**
|
|
441
451
|
* Options for the `fireforge patch move-files` subcommand. Without
|
|
@@ -444,7 +454,7 @@ export interface PatchSplitOptions {
|
|
|
444
454
|
* With `--create --order <n>` the target patch is created at that order
|
|
445
455
|
* and the files move into it as one split-style transaction.
|
|
446
456
|
*/
|
|
447
|
-
export interface PatchMoveFilesOptions {
|
|
457
|
+
export interface PatchMoveFilesOptions extends Confirmable, PatchLockWaitable, UnsafeOverridable {
|
|
448
458
|
/** File paths relative to engine/ to move from the source patch to the target patch. */
|
|
449
459
|
file?: string[];
|
|
450
460
|
/** Create the target patch (transactional bootstrap of a split). Requires `order`. */
|
|
@@ -457,14 +467,8 @@ export interface PatchMoveFilesOptions {
|
|
|
457
467
|
description?: string;
|
|
458
468
|
/** Preview the create+move without writing. */
|
|
459
469
|
dryRun?: boolean;
|
|
460
|
-
/** Skip interactive confirmation (required for non-TTY). */
|
|
461
|
-
yes?: boolean;
|
|
462
|
-
/** Bypass projected-lint refusals. */
|
|
463
|
-
forceUnsafe?: boolean;
|
|
464
470
|
/** Skip per-patch lint of the projected bodies. */
|
|
465
471
|
skipLint?: boolean;
|
|
466
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
467
|
-
waitLock?: number | boolean;
|
|
468
472
|
}
|
|
469
473
|
/**
|
|
470
474
|
* Options for the rebase command.
|
|
@@ -536,7 +540,7 @@ export interface RunOptions {
|
|
|
536
540
|
/**
|
|
537
541
|
* Options for the test command.
|
|
538
542
|
*/
|
|
539
|
-
export interface TestOptions {
|
|
543
|
+
export interface TestOptions extends EngineLockWaitable {
|
|
540
544
|
/** Run tests in headless mode */
|
|
541
545
|
headless?: boolean;
|
|
542
546
|
/**
|
|
@@ -601,6 +605,15 @@ export interface TestOptions {
|
|
|
601
605
|
marionettePort?: number;
|
|
602
606
|
/** Kill a recognized stale browser process holding the Marionette port, then continue. */
|
|
603
607
|
killStaleMarionette?: boolean;
|
|
608
|
+
/**
|
|
609
|
+
* Terminate harness helper processes (`xpcshell` httpd, `pywebsocket`,
|
|
610
|
+
* `ssltunnel`, `moz-http2`) that survived an earlier run in this
|
|
611
|
+
* project's objdir. The census itself runs on EVERY test dispatch and is
|
|
612
|
+
* report-only; this flag opts into the kill. Survivors slow later runs
|
|
613
|
+
* without appearing in their output, so the visibility is the default and
|
|
614
|
+
* the termination is the choice.
|
|
615
|
+
*/
|
|
616
|
+
reapOrphans?: boolean;
|
|
604
617
|
/** Permit tests against packageable engine edits newer than the last successful build. */
|
|
605
618
|
allowStaleBuild?: boolean;
|
|
606
619
|
/**
|
|
@@ -641,19 +654,11 @@ export interface TestOptions {
|
|
|
641
654
|
* checkers that consume a sample artifact after the run.
|
|
642
655
|
*/
|
|
643
656
|
perfSamples?: string;
|
|
644
|
-
/**
|
|
645
|
-
* Parsed `--wait-lock [seconds]` value (`true` for the bare flag, meaning
|
|
646
|
-
* 60). Consumed at the CLI layer to bound the engine-session-lock wait;
|
|
647
|
-
* the command implementation ignores it.
|
|
648
|
-
*/
|
|
649
|
-
waitLock?: number | boolean;
|
|
650
657
|
}
|
|
651
658
|
/**
|
|
652
659
|
* Options for the furnace apply command.
|
|
653
660
|
*/
|
|
654
|
-
export interface FurnaceApplyOptions {
|
|
655
|
-
/** Show what would be changed without writing */
|
|
656
|
-
dryRun?: boolean;
|
|
661
|
+
export interface FurnaceApplyOptions extends DryRunnable {
|
|
657
662
|
/** Proceed despite baseVersion drift (stale overrides) */
|
|
658
663
|
force?: boolean;
|
|
659
664
|
/** Watch component directories and re-apply on changes */
|
|
@@ -675,9 +680,7 @@ export interface FurnacePreviewOptions {
|
|
|
675
680
|
/**
|
|
676
681
|
* Options for the furnace deploy command.
|
|
677
682
|
*/
|
|
678
|
-
export interface FurnaceDeployOptions {
|
|
679
|
-
/** Show what would be changed without writing */
|
|
680
|
-
dryRun?: boolean;
|
|
683
|
+
export interface FurnaceDeployOptions extends DryRunnable {
|
|
681
684
|
/** Proceed despite baseVersion drift (stale overrides) */
|
|
682
685
|
force?: boolean;
|
|
683
686
|
/** Skip the validation step (apply only, no accessibility/compatibility checks) */
|
|
@@ -692,9 +695,7 @@ export interface FurnaceDeployOptions {
|
|
|
692
695
|
/**
|
|
693
696
|
* Options for the furnace refresh command.
|
|
694
697
|
*/
|
|
695
|
-
export interface FurnaceRefreshOptions {
|
|
696
|
-
/** Show what would change without modifying files */
|
|
697
|
-
dryRun?: boolean;
|
|
698
|
+
export interface FurnaceRefreshOptions extends DryRunnable {
|
|
698
699
|
/** Refresh all overrides in a single batch */
|
|
699
700
|
all?: boolean;
|
|
700
701
|
/** Conflict resolution strategy for automated use (ours = keep local, theirs = accept upstream) */
|
|
@@ -705,9 +706,7 @@ export interface FurnaceRefreshOptions {
|
|
|
705
706
|
/**
|
|
706
707
|
* Options for the furnace sync command.
|
|
707
708
|
*/
|
|
708
|
-
export interface FurnaceSyncOptions {
|
|
709
|
-
/** Show what would change without modifying files */
|
|
710
|
-
dryRun?: boolean;
|
|
709
|
+
export interface FurnaceSyncOptions extends DryRunnable {
|
|
711
710
|
/** Conflict resolution strategy for three-way merge (ours = keep local, theirs = accept upstream) */
|
|
712
711
|
strategy?: 'ours' | 'theirs';
|
|
713
712
|
/**
|
|
@@ -734,12 +733,10 @@ export interface FurnaceOverrideOptions {
|
|
|
734
733
|
description?: string;
|
|
735
734
|
}
|
|
736
735
|
/**
|
|
737
|
-
* Options for the furnace remove command.
|
|
736
|
+
* Options for the furnace remove command. `--yes` is the only flag it takes,
|
|
737
|
+
* so the type is the confirmation mixin under a command-specific name.
|
|
738
738
|
*/
|
|
739
|
-
export
|
|
740
|
-
/** Skip confirmation prompt */
|
|
741
|
-
yes?: boolean;
|
|
742
|
-
}
|
|
739
|
+
export type FurnaceRemoveOptions = Confirmable;
|
|
743
740
|
/**
|
|
744
741
|
* Options for the furnace create command.
|
|
745
742
|
*/
|
|
@@ -846,15 +843,9 @@ export interface RegisterOptions {
|
|
|
846
843
|
/**
|
|
847
844
|
* Options for the patch delete command.
|
|
848
845
|
*/
|
|
849
|
-
export interface PatchDeleteOptions {
|
|
850
|
-
/** Skip confirmation prompt; required for non-TTY runs. */
|
|
851
|
-
yes?: boolean;
|
|
852
|
-
/** Print what would happen without writing anything. */
|
|
853
|
-
dryRun?: boolean;
|
|
846
|
+
export interface PatchDeleteOptions extends Confirmable, DryRunnable, PatchLockWaitable {
|
|
854
847
|
/** Bypass the hard refusal when later patches depend on the target. */
|
|
855
848
|
forceUnsafe?: boolean;
|
|
856
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
857
|
-
waitLock?: number | boolean;
|
|
858
849
|
}
|
|
859
850
|
/**
|
|
860
851
|
* Options for the `fireforge patch rename` subcommand. Updates the patch's
|
|
@@ -863,7 +854,7 @@ export interface PatchDeleteOptions {
|
|
|
863
854
|
* for the case where the body is already correct but the patch's identity
|
|
864
855
|
* describes a pre-shrink scope.
|
|
865
856
|
*/
|
|
866
|
-
export interface PatchRenameOptions {
|
|
857
|
+
export interface PatchRenameOptions extends Confirmable, DryRunnable, PatchLockWaitable, UnsafeOverridable {
|
|
867
858
|
/**
|
|
868
859
|
* New human-readable name. Sanitised the same way `export --name`
|
|
869
860
|
* sanitises into the filename slug (lowercase, non-alphanumerics
|
|
@@ -890,40 +881,22 @@ export interface PatchRenameOptions {
|
|
|
890
881
|
* without touching the description).
|
|
891
882
|
*/
|
|
892
883
|
description?: string;
|
|
893
|
-
/** Print the planned change without writing. */
|
|
894
|
-
dryRun?: boolean;
|
|
895
|
-
/** Skip the confirmation prompt (required for non-TTY). */
|
|
896
|
-
yes?: boolean;
|
|
897
|
-
/** Bypass force-mode patchPolicy refusals. */
|
|
898
|
-
forceUnsafe?: boolean;
|
|
899
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
900
|
-
waitLock?: number | boolean;
|
|
901
884
|
}
|
|
902
885
|
/**
|
|
903
886
|
* Options for the patch reorder command.
|
|
904
887
|
*/
|
|
905
|
-
export interface PatchReorderOptions {
|
|
888
|
+
export interface PatchReorderOptions extends PatchLockWaitable {
|
|
906
889
|
to?: number;
|
|
907
890
|
before?: string;
|
|
908
891
|
after?: string;
|
|
909
892
|
yes?: boolean;
|
|
910
893
|
dryRun?: boolean;
|
|
911
894
|
forceUnsafe?: boolean;
|
|
912
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
913
|
-
waitLock?: number | boolean;
|
|
914
895
|
}
|
|
915
896
|
/**
|
|
916
897
|
* Options for the patch compact command.
|
|
917
898
|
*/
|
|
918
|
-
export interface PatchCompactOptions {
|
|
919
|
-
/** Skip confirmation prompt; required for non-TTY runs. */
|
|
920
|
-
yes?: boolean;
|
|
921
|
-
/** Print what would happen without writing anything. */
|
|
922
|
-
dryRun?: boolean;
|
|
923
|
-
/** Bypass force-mode patchPolicy refusals. */
|
|
924
|
-
forceUnsafe?: boolean;
|
|
925
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
926
|
-
waitLock?: number | boolean;
|
|
899
|
+
export interface PatchCompactOptions extends Confirmable, DryRunnable, PatchLockWaitable, UnsafeOverridable {
|
|
927
900
|
}
|
|
928
901
|
/**
|
|
929
902
|
* Options for the status command.
|
|
@@ -32,13 +32,24 @@ export interface PatchResult {
|
|
|
32
32
|
/** Whether the patch was auto-resolved (new file vs existing file conflict) */
|
|
33
33
|
autoResolved?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
* Pre-existing
|
|
36
|
-
* engine-relative path. Kept for the RUN's
|
|
37
|
-
* if a later patch fails and
|
|
38
|
-
* reversing a new-file patch
|
|
39
|
-
* only way to restore what was
|
|
35
|
+
* Pre-existing BYTES of files the auto-resolve overwrote (or, for a binary
|
|
36
|
+
* new file, removed), keyed by engine-relative path. Kept for the RUN's
|
|
37
|
+
* duration (not just the retry): if a later patch fails and
|
|
38
|
+
* `rollbackPatches` reverse-applies this one, reversing a new-file patch
|
|
39
|
+
* DELETES the file — these snapshots are the only way to restore what was
|
|
40
|
+
* there before the auto-resolve.
|
|
41
|
+
*
|
|
42
|
+
* Raw bytes rather than decoded text, because the same snapshot has to
|
|
43
|
+
* restore a binary target byte-for-byte.
|
|
44
|
+
*
|
|
45
|
+
* Typed `Uint8Array`, not `Buffer`: this interface is published, and the
|
|
46
|
+
* emitted `.d.ts` naming a Node global made a consumer without
|
|
47
|
+
* `@types/node` fail to compile against the package (`TS2591` in the
|
|
48
|
+
* pack smoke test). Every `Buffer` assigns to it — `Buffer` extends
|
|
49
|
+
* `Uint8Array` — and `fs.writeFile` accepts it, so nothing at the call
|
|
50
|
+
* sites changes.
|
|
40
51
|
*/
|
|
41
|
-
autoResolvedOriginals?: Map<string,
|
|
52
|
+
autoResolvedOriginals?: Map<string, Uint8Array>;
|
|
42
53
|
}
|
|
43
54
|
/**
|
|
44
55
|
* Extended patch information with metadata.
|
|
@@ -12,6 +12,13 @@ export interface FirefoxConfig {
|
|
|
12
12
|
product: FirefoxProduct;
|
|
13
13
|
/** Optional pinned SHA-256 for the resolved source archive */
|
|
14
14
|
sha256?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Accept a freshly downloaded archive when Mozilla's published SHA256SUMS
|
|
17
|
+
* cannot be fetched or does not list it, instead of failing closed. The
|
|
18
|
+
* download is then trusted on TLS alone (with a warning). Ignored when
|
|
19
|
+
* `sha256` is pinned. Default false.
|
|
20
|
+
*/
|
|
21
|
+
allowUnverifiedDownload?: boolean;
|
|
15
22
|
/**
|
|
16
23
|
* Optional release-candidate build directory (e.g. "build2"). When set,
|
|
17
24
|
* the source archive resolves under
|
|
@@ -124,6 +131,8 @@ export interface FireForgeConfig {
|
|
|
124
131
|
firefox: FirefoxConfig;
|
|
125
132
|
/** Build settings */
|
|
126
133
|
build?: BuildConfig;
|
|
134
|
+
/** Post-build packaging audit configuration */
|
|
135
|
+
buildAudit?: BuildAuditConfig;
|
|
127
136
|
/** Test command defaults */
|
|
128
137
|
test?: TestConfig;
|
|
129
138
|
/** Optional project-specific external toolchains checked by doctor. */
|
|
@@ -192,6 +201,31 @@ export interface TypecheckConfig {
|
|
|
192
201
|
/**
|
|
193
202
|
* Wire command configuration.
|
|
194
203
|
*/
|
|
204
|
+
/**
|
|
205
|
+
* One deliberately-unpackaged source, declared so the post-build audit stops
|
|
206
|
+
* reporting it as a missing registration.
|
|
207
|
+
*
|
|
208
|
+
* `reason` is required and must be non-empty. A carve-out whose rationale
|
|
209
|
+
* nobody wrote down is indistinguishable from a mistake by the time someone
|
|
210
|
+
* reads it, and this is the one audit class FireForge cannot derive from the
|
|
211
|
+
* tree — the file's own header may say "never loaded", but nothing in
|
|
212
|
+
* `moz.build` or `jar.mn` records that.
|
|
213
|
+
*/
|
|
214
|
+
export interface BuildAuditUnpackagedDeclaration {
|
|
215
|
+
/** Engine-relative path, exact or with a `*` inside one path segment. */
|
|
216
|
+
path: string;
|
|
217
|
+
/** Why this file is never packaged. Required, non-empty. */
|
|
218
|
+
reason: string;
|
|
219
|
+
}
|
|
220
|
+
/** Post-build packaging audit configuration. */
|
|
221
|
+
export interface BuildAuditConfig {
|
|
222
|
+
/**
|
|
223
|
+
* Sources the audit must treat as deliberately unpackaged. Admitted paths
|
|
224
|
+
* are LISTED in the audit output rather than silenced, and one that DOES
|
|
225
|
+
* resolve to a packaged artifact is reported as a stale carve-out.
|
|
226
|
+
*/
|
|
227
|
+
unpackaged?: BuildAuditUnpackagedDeclaration[];
|
|
228
|
+
}
|
|
195
229
|
export interface WireConfig {
|
|
196
230
|
/** Subscript directory relative to engine/. Default: "browser/base/content" */
|
|
197
231
|
subscriptDir?: string;
|
|
@@ -226,6 +260,35 @@ export interface PatchLintCheckJsCompilerOptions {
|
|
|
226
260
|
/** Module-resolution `paths` mapping (pattern → targets, engine-relative). */
|
|
227
261
|
paths?: Record<string, string[]>;
|
|
228
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Line-count thresholds for one `file-too-large` tier.
|
|
265
|
+
*
|
|
266
|
+
* Every field is optional; an omitted field keeps the built-in default.
|
|
267
|
+
* The three must stay ordered `notice <= warning <= error`, which the
|
|
268
|
+
* config validator enforces — an out-of-order triple silently disables a
|
|
269
|
+
* band rather than failing anything.
|
|
270
|
+
*/
|
|
271
|
+
export interface PatchLintFileSizeTier {
|
|
272
|
+
notice?: number;
|
|
273
|
+
warning?: number;
|
|
274
|
+
error?: number;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Overrides for the `file-too-large` thresholds, per file class.
|
|
278
|
+
*
|
|
279
|
+
* These were module constants until 0.45.0, and nothing in `fireforge.json`
|
|
280
|
+
* could move them. That is a problem specifically because the recommended
|
|
281
|
+
* gate posture is `--max-warnings 0`: under it the `warning` band is not a
|
|
282
|
+
* soft limit at all, so a project whose controllers legitimately sit a few
|
|
283
|
+
* lines over 750 has a hard failure with no dial, at exactly the moment
|
|
284
|
+
* someone is deciding whether to restructure a file.
|
|
285
|
+
*/
|
|
286
|
+
export interface PatchLintFileSizeThresholds {
|
|
287
|
+
/** Non-test files. Defaults: notice 500, warning 750, error 900. */
|
|
288
|
+
general?: PatchLintFileSizeTier;
|
|
289
|
+
/** Test files. Defaults: notice 1200, warning 1400, error 1600. */
|
|
290
|
+
test?: PatchLintFileSizeTier;
|
|
291
|
+
}
|
|
229
292
|
/**
|
|
230
293
|
* Configuration for patch lint rules.
|
|
231
294
|
*/
|
|
@@ -272,6 +335,18 @@ export interface PatchLintConfig {
|
|
|
272
335
|
checkJsTestShim?: string;
|
|
273
336
|
/** File paths exempt from the raw-color-value check (exact or basename match) */
|
|
274
337
|
rawColorAllowlist?: string[];
|
|
338
|
+
/**
|
|
339
|
+
* Per-tier overrides for the `file-too-large` line-count thresholds.
|
|
340
|
+
* Unset fields keep the built-in defaults.
|
|
341
|
+
*/
|
|
342
|
+
fileSizeThresholds?: PatchLintFileSizeThresholds;
|
|
343
|
+
/**
|
|
344
|
+
* Run the project's Prettier over patch-owned `.sys.mjs` modules, from
|
|
345
|
+
* inside `engine/` so the engine's own `.prettierrc*`/`.prettierignore`
|
|
346
|
+
* decide. Default `'off'`: when off, formatting is explicitly out of
|
|
347
|
+
* scope for the per-patch tier.
|
|
348
|
+
*/
|
|
349
|
+
prettier?: PatchLintSeverityGate;
|
|
275
350
|
/** Enforce JSDoc on class-method exports in patch-owned .sys.mjs files. Default: 'off'. */
|
|
276
351
|
jsdocClassMethods?: PatchLintSeverityGate;
|
|
277
352
|
/** Require ≥1 assertion in any patch-touched browser_*.js test file (new or modified). Default: 'off'. */
|
|
@@ -311,8 +386,6 @@ export interface FireForgeState {
|
|
|
311
386
|
brand?: string;
|
|
312
387
|
/** Build mode: dev, debug, release */
|
|
313
388
|
buildMode?: BuildMode;
|
|
314
|
-
/** Last successful build timestamp (ISO string) */
|
|
315
|
-
lastBuild?: string;
|
|
316
389
|
/** Firefox version that was downloaded */
|
|
317
390
|
downloadedVersion?: string;
|
|
318
391
|
/** Initial commit hash of the engine (baseline) */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Re-exports all type definitions.
|
|
3
3
|
*/
|
|
4
|
-
export type {} from './commands/index.js';
|
|
5
4
|
export type { BuildConfig, FireForgeConfig, FirefoxConfig, FirefoxProduct, ProjectLicense, ProjectPaths, WireConfig, } from './config.js';
|
|
6
5
|
export type { ApplyResult, ComponentType, CustomComponentConfig, DryRunAction, FurnaceConfig, FurnaceState, OverrideComponentConfig, OverrideType, StepError, ValidationIssue, } from './furnace.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the string only when the assertion actually fails, where a plain
|
|
7
7
|
* template literal would build it on every call.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
type AssertionMessage = string | (() => string);
|
|
10
10
|
/**
|
|
11
11
|
* Asserts that an internal invariant holds.
|
|
12
12
|
*
|
|
@@ -18,23 +18,10 @@ export type AssertionMessage = string | (() => string);
|
|
|
18
18
|
* @throws {@link InternalInvariantError} when `condition` is falsy.
|
|
19
19
|
*/
|
|
20
20
|
export declare function assert(condition: unknown, message: AssertionMessage): asserts condition;
|
|
21
|
-
/**
|
|
22
|
-
* Asserts that a value is neither `null` nor `undefined`, narrowing it in
|
|
23
|
-
* place for the statements that follow.
|
|
24
|
-
*
|
|
25
|
-
* Use this in statement position, where the value is already bound to a
|
|
26
|
-
* name. Use {@link expectDefined} in expression position, where it is not.
|
|
27
|
-
*
|
|
28
|
-
* @param value - The value that should be present
|
|
29
|
-
* @param message - What was supposed to be present, and why
|
|
30
|
-
* @throws {@link InternalInvariantError} when `value` is `null` or `undefined`.
|
|
31
|
-
*/
|
|
32
|
-
export declare function assertDefined<T>(value: T, message: AssertionMessage): asserts value is NonNullable<T>;
|
|
33
21
|
/**
|
|
34
22
|
* Returns a value that must be present, throwing if it is not.
|
|
35
23
|
*
|
|
36
|
-
*
|
|
37
|
-
* and returns in one step, so an indexed read can be asserted inline
|
|
24
|
+
* Checks and returns in one step, so an indexed read can be asserted inline
|
|
38
25
|
* (`push({ content: expectDefined(lines[k], …) })`) without first binding
|
|
39
26
|
* it to a local.
|
|
40
27
|
*
|
|
@@ -44,3 +31,4 @@ export declare function assertDefined<T>(value: T, message: AssertionMessage): a
|
|
|
44
31
|
* @throws {@link InternalInvariantError} when `value` is `null` or `undefined`.
|
|
45
32
|
*/
|
|
46
33
|
export declare function expectDefined<T>(value: T, message: AssertionMessage): NonNullable<T>;
|
|
34
|
+
export {};
|
package/dist/src/utils/assert.js
CHANGED
|
@@ -46,27 +46,10 @@ export function assert(condition, message) {
|
|
|
46
46
|
throw new InternalInvariantError(resolveMessage(message));
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Asserts that a value is neither `null` nor `undefined`, narrowing it in
|
|
51
|
-
* place for the statements that follow.
|
|
52
|
-
*
|
|
53
|
-
* Use this in statement position, where the value is already bound to a
|
|
54
|
-
* name. Use {@link expectDefined} in expression position, where it is not.
|
|
55
|
-
*
|
|
56
|
-
* @param value - The value that should be present
|
|
57
|
-
* @param message - What was supposed to be present, and why
|
|
58
|
-
* @throws {@link InternalInvariantError} when `value` is `null` or `undefined`.
|
|
59
|
-
*/
|
|
60
|
-
export function assertDefined(value, message) {
|
|
61
|
-
if (value === null || value === undefined) {
|
|
62
|
-
throw new InternalInvariantError(resolveMessage(message));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
49
|
/**
|
|
66
50
|
* Returns a value that must be present, throwing if it is not.
|
|
67
51
|
*
|
|
68
|
-
*
|
|
69
|
-
* and returns in one step, so an indexed read can be asserted inline
|
|
52
|
+
* Checks and returns in one step, so an indexed read can be asserted inline
|
|
70
53
|
* (`push({ content: expectDefined(lines[k], …) })`) without first binding
|
|
71
54
|
* it to a local.
|
|
72
55
|
*
|