@hominis/fireforge 0.45.0 → 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 +80 -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.d.ts +2 -0
- package/dist/src/commands/doctor.js +7 -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 -45
- 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 -34
- 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 -8
- 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 +24 -2
- package/dist/src/commands/re-export-adjacent.js +32 -16
- package/dist/src/commands/re-export-bulk-scan.js +6 -10
- package/dist/src/commands/re-export-drift.js +4 -4
- package/dist/src/commands/re-export-files.d.ts +2 -3
- package/dist/src/commands/re-export-files.js +38 -29
- 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-scan.js +5 -2
- 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 +28 -11
- 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 +31 -7
- 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 +5 -3
- package/dist/src/commands/test-run.js +25 -18
- package/dist/src/commands/test-stale-gate.js +4 -4
- 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 +42 -5
- 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 +110 -10
- 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.js +3 -2
- package/dist/src/core/build-overwrite-guard.js +1 -1
- package/dist/src/core/build-prepare.d.ts +0 -8
- package/dist/src/core/build-prepare.js +7 -12
- 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.js +1 -1
- 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 +14 -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.js +8 -7
- 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 +4 -3
- package/dist/src/core/mach-known-noise-filter.js +7 -9
- 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 +39 -53
- package/dist/src/core/mach.js +13 -81
- 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 +6 -12
- 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 +37 -24
- 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.js +3 -3
- 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.js +1 -1
- 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.d.ts +14 -9
- package/dist/src/core/patch-lint.js +4 -3
- 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 +0 -8
- package/dist/src/core/patch-transform.js +0 -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 +6 -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 +2 -2
- package/dist/src/core/test-stale-check.d.ts +0 -2
- package/dist/src/core/test-stale-check.js +2 -2
- 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.js +20 -28
- 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 +77 -123
- package/dist/src/types/config.d.ts +34 -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.js +8 -13
- 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 +89 -1
- package/docs/exit-codes.md +31 -19
- 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 +8 -1
- 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
package/dist/src/errors/git.d.ts
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { FireForgeError } from './base.js';
|
|
2
|
+
import { ExitCode } from './codes.js';
|
|
2
3
|
/**
|
|
3
4
|
* Error thrown when a git operation fails.
|
|
4
5
|
*/
|
|
5
6
|
export declare class GitError extends FireForgeError {
|
|
6
7
|
readonly command?: string | undefined;
|
|
7
|
-
readonly code:
|
|
8
|
+
readonly code: ExitCode;
|
|
8
9
|
constructor(message: string, command?: string | undefined, cause?: Error);
|
|
9
10
|
get userMessage(): string;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* Error thrown when git is not installed.
|
|
14
|
+
*
|
|
15
|
+
* MISSING_DEPENDENCY, not GIT_ERROR: the fact is "a required tool is
|
|
16
|
+
* absent", the same fact `PythonNotFoundError` and `MachNotFoundError`
|
|
17
|
+
* report, and a consumer should install something rather than inspect a
|
|
18
|
+
* repository.
|
|
13
19
|
*/
|
|
14
20
|
export declare class GitNotFoundError extends GitError {
|
|
21
|
+
readonly code: 7;
|
|
15
22
|
constructor();
|
|
16
23
|
get userMessage(): string;
|
|
17
24
|
}
|
|
@@ -23,13 +30,6 @@ export declare class PatchApplyError extends GitError {
|
|
|
23
30
|
constructor(patchPath: string, cause?: Error);
|
|
24
31
|
get userMessage(): string;
|
|
25
32
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Error thrown when the repository is in a dirty state.
|
|
28
|
-
*/
|
|
29
|
-
export declare class DirtyRepositoryError extends GitError {
|
|
30
|
-
constructor();
|
|
31
|
-
get userMessage(): string;
|
|
32
|
-
}
|
|
33
33
|
/**
|
|
34
34
|
* Error thrown when a stale git index lock blocks repository initialization.
|
|
35
35
|
*/
|
package/dist/src/errors/git.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: EUPL-1.2
|
|
2
|
-
import { FireForgeError } from './base.js';
|
|
2
|
+
import { FireForgeError, remedies } from './base.js';
|
|
3
3
|
import { ExitCode } from './codes.js';
|
|
4
4
|
/**
|
|
5
5
|
* Error thrown when a git operation fails.
|
|
@@ -12,21 +12,25 @@ export class GitError extends FireForgeError {
|
|
|
12
12
|
this.command = command;
|
|
13
13
|
}
|
|
14
14
|
get userMessage() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
msg += ' 3. Try running "fireforge reset" to start fresh';
|
|
23
|
-
return msg;
|
|
15
|
+
return (`Git Error: ${this.message}` +
|
|
16
|
+
(this.command ? `\n\nCommand: git ${this.command}` : '') +
|
|
17
|
+
remedies([
|
|
18
|
+
'Ensure git is installed and in your PATH',
|
|
19
|
+
'Check if the repository is in a valid state',
|
|
20
|
+
'Try running "fireforge reset" to start fresh',
|
|
21
|
+
]));
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
24
|
/**
|
|
27
25
|
* Error thrown when git is not installed.
|
|
26
|
+
*
|
|
27
|
+
* MISSING_DEPENDENCY, not GIT_ERROR: the fact is "a required tool is
|
|
28
|
+
* absent", the same fact `PythonNotFoundError` and `MachNotFoundError`
|
|
29
|
+
* report, and a consumer should install something rather than inspect a
|
|
30
|
+
* repository.
|
|
28
31
|
*/
|
|
29
32
|
export class GitNotFoundError extends GitError {
|
|
33
|
+
code = ExitCode.MISSING_DEPENDENCY;
|
|
30
34
|
constructor() {
|
|
31
35
|
super('Git is not installed or not found in PATH');
|
|
32
36
|
}
|
|
@@ -50,26 +54,12 @@ export class PatchApplyError extends GitError {
|
|
|
50
54
|
get userMessage() {
|
|
51
55
|
return (`Git Error: Failed to apply patch.\n\n` +
|
|
52
56
|
`Patch: ${this.patchPath}\n\n` +
|
|
53
|
-
'This usually means the patch conflicts with existing changes
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Error thrown when the repository is in a dirty state.
|
|
62
|
-
*/
|
|
63
|
-
export class DirtyRepositoryError extends GitError {
|
|
64
|
-
constructor() {
|
|
65
|
-
super('Repository has uncommitted changes');
|
|
66
|
-
}
|
|
67
|
-
get userMessage() {
|
|
68
|
-
return ('Git Error: The Firefox source has uncommitted changes.\n\n' +
|
|
69
|
-
'To fix this:\n' +
|
|
70
|
-
' 1. Export your changes with "fireforge export"\n' +
|
|
71
|
-
' 2. Use "fireforge reset" to restore clean state\n' +
|
|
72
|
-
' 3. Then run "fireforge import" to reapply patches');
|
|
57
|
+
'This usually means the patch conflicts with existing changes.' +
|
|
58
|
+
remedies([
|
|
59
|
+
'Check if the Firefox version matches the patch',
|
|
60
|
+
'Use "fireforge reset" to start with clean source',
|
|
61
|
+
'Update the patch to match the current Firefox version',
|
|
62
|
+
]));
|
|
73
63
|
}
|
|
74
64
|
}
|
|
75
65
|
/**
|
package/dist/src/errors/patch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: EUPL-1.2
|
|
2
|
-
import { FireForgeError } from './base.js';
|
|
2
|
+
import { FireForgeError, remedies } from './base.js';
|
|
3
3
|
import { ExitCode } from './codes.js';
|
|
4
4
|
/**
|
|
5
5
|
* Error thrown when `patches.json` exists but cannot be parsed or validated.
|
|
@@ -41,14 +41,12 @@ export class PatchError extends FireForgeError {
|
|
|
41
41
|
this.patchName = patchName;
|
|
42
42
|
}
|
|
43
43
|
get userMessage() {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
msg += ' 3. Update the patch for the current Firefox version';
|
|
52
|
-
return msg;
|
|
44
|
+
return (`Patch Error: ${this.message}` +
|
|
45
|
+
(this.patchName ? `\n\nPatch: ${this.patchName}` : '') +
|
|
46
|
+
remedies([
|
|
47
|
+
'Check if the patch is compatible with the Firefox version',
|
|
48
|
+
'Use "fireforge reset" to start with clean source',
|
|
49
|
+
'Update the patch for the current Firefox version',
|
|
50
|
+
]));
|
|
53
51
|
}
|
|
54
52
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: EUPL-1.2
|
|
2
|
-
import { FireForgeError } from './base.js';
|
|
2
|
+
import { FireForgeError, remedies } from './base.js';
|
|
3
3
|
import { ExitCode } from './codes.js';
|
|
4
4
|
/**
|
|
5
5
|
* Base error for rebase operations.
|
|
@@ -7,12 +7,12 @@ import { ExitCode } from './codes.js';
|
|
|
7
7
|
export class RebaseError extends FireForgeError {
|
|
8
8
|
code = ExitCode.PATCH_ERROR;
|
|
9
9
|
get userMessage() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
return (`Rebase Error: ${this.message}` +
|
|
11
|
+
remedies([
|
|
12
|
+
'Check the error message above for specifics',
|
|
13
|
+
'Use "fireforge rebase --continue" to resume an interrupted rebase',
|
|
14
|
+
'Use "fireforge rebase --abort" to cancel and restore engine state',
|
|
15
|
+
]));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
@@ -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
|
|
@@ -338,54 +371,31 @@ export interface ReExportOptions {
|
|
|
338
371
|
* `PatchMetadata.tier` field on a single patch without rewriting the
|
|
339
372
|
* `.patch` file body — the manifest is the only thing that changes.
|
|
340
373
|
*/
|
|
341
|
-
export interface PatchTierOptions {
|
|
342
|
-
/**
|
|
343
|
-
* Seconds to wait for the patch directory lock. This command mutates patch
|
|
344
|
-
* metadata under that lock.
|
|
345
|
-
*/
|
|
346
|
-
waitLock?: number | boolean;
|
|
374
|
+
export interface PatchTierOptions extends Confirmable, DryRunnable, PatchLockWaitable {
|
|
347
375
|
/** Force the named tier on the patch. Only `"branding"` is recognised. */
|
|
348
376
|
tier?: 'branding';
|
|
349
377
|
/** Remove the `tier` override entirely, restoring auto-detection. */
|
|
350
378
|
clear?: boolean;
|
|
351
|
-
/** Print the planned change without writing. */
|
|
352
|
-
dryRun?: boolean;
|
|
353
|
-
/** Skip the confirmation prompt (required for non-TTY). */
|
|
354
|
-
yes?: boolean;
|
|
355
379
|
}
|
|
356
380
|
/**
|
|
357
381
|
* Options for the `fireforge patch lint-ignore` subcommand. Modes are
|
|
358
382
|
* mutually exclusive — exactly one of `add`, `remove`, or `clear` must
|
|
359
383
|
* be set per invocation.
|
|
360
384
|
*/
|
|
361
|
-
export interface PatchLintIgnoreOptions {
|
|
362
|
-
/**
|
|
363
|
-
* Seconds to wait for the patch directory lock. This command mutates patch
|
|
364
|
-
* metadata under that lock.
|
|
365
|
-
*/
|
|
366
|
-
waitLock?: number | boolean;
|
|
385
|
+
export interface PatchLintIgnoreOptions extends Confirmable, DryRunnable, PatchLockWaitable {
|
|
367
386
|
/** Lint check IDs to add to the patch's `lintIgnore` list (union, de-duped). */
|
|
368
387
|
add?: string[];
|
|
369
388
|
/** Lint check IDs to remove from the patch's `lintIgnore` list. */
|
|
370
389
|
remove?: string[];
|
|
371
390
|
/** Drop the `lintIgnore` field entirely. */
|
|
372
391
|
clear?: boolean;
|
|
373
|
-
/** Print the planned change without writing. */
|
|
374
|
-
dryRun?: boolean;
|
|
375
|
-
/** Skip the confirmation prompt (required for non-TTY). */
|
|
376
|
-
yes?: boolean;
|
|
377
392
|
}
|
|
378
393
|
/**
|
|
379
394
|
* Options for the `fireforge patch staged-dependency` subcommand. Modes are
|
|
380
395
|
* mutually exclusive: add a declaration, remove one or more matching
|
|
381
396
|
* declarations, or clear all staged dependencies from the patch.
|
|
382
397
|
*/
|
|
383
|
-
export interface PatchStagedDependencyOptions {
|
|
384
|
-
/**
|
|
385
|
-
* Seconds to wait for the patch directory lock. This command mutates patch
|
|
386
|
-
* metadata under that lock.
|
|
387
|
-
*/
|
|
388
|
-
waitLock?: number | boolean;
|
|
398
|
+
export interface PatchStagedDependencyOptions extends Confirmable, DryRunnable, PatchLockWaitable {
|
|
389
399
|
/** Add a staged dependency declaration. */
|
|
390
400
|
add?: boolean;
|
|
391
401
|
/** Remove matching staged dependency declarations. */
|
|
@@ -413,15 +423,11 @@ export interface PatchStagedDependencyOptions {
|
|
|
413
423
|
owner?: string;
|
|
414
424
|
/** Optional human-readable rationale stored with the declaration. */
|
|
415
425
|
reason?: string;
|
|
416
|
-
/** Print the planned change without writing. */
|
|
417
|
-
dryRun?: boolean;
|
|
418
|
-
/** Skip the confirmation prompt (required for non-TTY). */
|
|
419
|
-
yes?: boolean;
|
|
420
426
|
}
|
|
421
427
|
/**
|
|
422
428
|
* Options for the `patch split` command.
|
|
423
429
|
*/
|
|
424
|
-
export interface PatchSplitOptions {
|
|
430
|
+
export interface PatchSplitOptions extends Confirmable, PatchLockWaitable, UnsafeOverridable {
|
|
425
431
|
/** Files to move out of the source patch (engine-relative). */
|
|
426
432
|
files: string[];
|
|
427
433
|
/** Name for the new patch (used in its filename slug). */
|
|
@@ -438,14 +444,8 @@ export interface PatchSplitOptions {
|
|
|
438
444
|
after?: string;
|
|
439
445
|
/** Preview without writing. */
|
|
440
446
|
dryRun?: boolean;
|
|
441
|
-
/** Skip interactive confirmation (required for non-TTY). */
|
|
442
|
-
yes?: boolean;
|
|
443
|
-
/** Bypass projected-lint refusals. */
|
|
444
|
-
forceUnsafe?: boolean;
|
|
445
447
|
/** Skip per-patch lint of the projected bodies. */
|
|
446
448
|
skipLint?: boolean;
|
|
447
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
448
|
-
waitLock?: number | boolean;
|
|
449
449
|
}
|
|
450
450
|
/**
|
|
451
451
|
* Options for the `fireforge patch move-files` subcommand. Without
|
|
@@ -454,7 +454,7 @@ export interface PatchSplitOptions {
|
|
|
454
454
|
* With `--create --order <n>` the target patch is created at that order
|
|
455
455
|
* and the files move into it as one split-style transaction.
|
|
456
456
|
*/
|
|
457
|
-
export interface PatchMoveFilesOptions {
|
|
457
|
+
export interface PatchMoveFilesOptions extends Confirmable, PatchLockWaitable, UnsafeOverridable {
|
|
458
458
|
/** File paths relative to engine/ to move from the source patch to the target patch. */
|
|
459
459
|
file?: string[];
|
|
460
460
|
/** Create the target patch (transactional bootstrap of a split). Requires `order`. */
|
|
@@ -467,14 +467,8 @@ export interface PatchMoveFilesOptions {
|
|
|
467
467
|
description?: string;
|
|
468
468
|
/** Preview the create+move without writing. */
|
|
469
469
|
dryRun?: boolean;
|
|
470
|
-
/** Skip interactive confirmation (required for non-TTY). */
|
|
471
|
-
yes?: boolean;
|
|
472
|
-
/** Bypass projected-lint refusals. */
|
|
473
|
-
forceUnsafe?: boolean;
|
|
474
470
|
/** Skip per-patch lint of the projected bodies. */
|
|
475
471
|
skipLint?: boolean;
|
|
476
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
477
|
-
waitLock?: number | boolean;
|
|
478
472
|
}
|
|
479
473
|
/**
|
|
480
474
|
* Options for the rebase command.
|
|
@@ -546,7 +540,7 @@ export interface RunOptions {
|
|
|
546
540
|
/**
|
|
547
541
|
* Options for the test command.
|
|
548
542
|
*/
|
|
549
|
-
export interface TestOptions {
|
|
543
|
+
export interface TestOptions extends EngineLockWaitable {
|
|
550
544
|
/** Run tests in headless mode */
|
|
551
545
|
headless?: boolean;
|
|
552
546
|
/**
|
|
@@ -660,19 +654,11 @@ export interface TestOptions {
|
|
|
660
654
|
* checkers that consume a sample artifact after the run.
|
|
661
655
|
*/
|
|
662
656
|
perfSamples?: string;
|
|
663
|
-
/**
|
|
664
|
-
* Parsed `--wait-lock [seconds]` value (`true` for the bare flag, meaning
|
|
665
|
-
* 60). Consumed at the CLI layer to bound the engine-session-lock wait;
|
|
666
|
-
* the command implementation ignores it.
|
|
667
|
-
*/
|
|
668
|
-
waitLock?: number | boolean;
|
|
669
657
|
}
|
|
670
658
|
/**
|
|
671
659
|
* Options for the furnace apply command.
|
|
672
660
|
*/
|
|
673
|
-
export interface FurnaceApplyOptions {
|
|
674
|
-
/** Show what would be changed without writing */
|
|
675
|
-
dryRun?: boolean;
|
|
661
|
+
export interface FurnaceApplyOptions extends DryRunnable {
|
|
676
662
|
/** Proceed despite baseVersion drift (stale overrides) */
|
|
677
663
|
force?: boolean;
|
|
678
664
|
/** Watch component directories and re-apply on changes */
|
|
@@ -694,9 +680,7 @@ export interface FurnacePreviewOptions {
|
|
|
694
680
|
/**
|
|
695
681
|
* Options for the furnace deploy command.
|
|
696
682
|
*/
|
|
697
|
-
export interface FurnaceDeployOptions {
|
|
698
|
-
/** Show what would be changed without writing */
|
|
699
|
-
dryRun?: boolean;
|
|
683
|
+
export interface FurnaceDeployOptions extends DryRunnable {
|
|
700
684
|
/** Proceed despite baseVersion drift (stale overrides) */
|
|
701
685
|
force?: boolean;
|
|
702
686
|
/** Skip the validation step (apply only, no accessibility/compatibility checks) */
|
|
@@ -711,9 +695,7 @@ export interface FurnaceDeployOptions {
|
|
|
711
695
|
/**
|
|
712
696
|
* Options for the furnace refresh command.
|
|
713
697
|
*/
|
|
714
|
-
export interface FurnaceRefreshOptions {
|
|
715
|
-
/** Show what would change without modifying files */
|
|
716
|
-
dryRun?: boolean;
|
|
698
|
+
export interface FurnaceRefreshOptions extends DryRunnable {
|
|
717
699
|
/** Refresh all overrides in a single batch */
|
|
718
700
|
all?: boolean;
|
|
719
701
|
/** Conflict resolution strategy for automated use (ours = keep local, theirs = accept upstream) */
|
|
@@ -724,9 +706,7 @@ export interface FurnaceRefreshOptions {
|
|
|
724
706
|
/**
|
|
725
707
|
* Options for the furnace sync command.
|
|
726
708
|
*/
|
|
727
|
-
export interface FurnaceSyncOptions {
|
|
728
|
-
/** Show what would change without modifying files */
|
|
729
|
-
dryRun?: boolean;
|
|
709
|
+
export interface FurnaceSyncOptions extends DryRunnable {
|
|
730
710
|
/** Conflict resolution strategy for three-way merge (ours = keep local, theirs = accept upstream) */
|
|
731
711
|
strategy?: 'ours' | 'theirs';
|
|
732
712
|
/**
|
|
@@ -753,12 +733,10 @@ export interface FurnaceOverrideOptions {
|
|
|
753
733
|
description?: string;
|
|
754
734
|
}
|
|
755
735
|
/**
|
|
756
|
-
* 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.
|
|
757
738
|
*/
|
|
758
|
-
export
|
|
759
|
-
/** Skip confirmation prompt */
|
|
760
|
-
yes?: boolean;
|
|
761
|
-
}
|
|
739
|
+
export type FurnaceRemoveOptions = Confirmable;
|
|
762
740
|
/**
|
|
763
741
|
* Options for the furnace create command.
|
|
764
742
|
*/
|
|
@@ -865,15 +843,9 @@ export interface RegisterOptions {
|
|
|
865
843
|
/**
|
|
866
844
|
* Options for the patch delete command.
|
|
867
845
|
*/
|
|
868
|
-
export interface PatchDeleteOptions {
|
|
869
|
-
/** Skip confirmation prompt; required for non-TTY runs. */
|
|
870
|
-
yes?: boolean;
|
|
871
|
-
/** Print what would happen without writing anything. */
|
|
872
|
-
dryRun?: boolean;
|
|
846
|
+
export interface PatchDeleteOptions extends Confirmable, DryRunnable, PatchLockWaitable {
|
|
873
847
|
/** Bypass the hard refusal when later patches depend on the target. */
|
|
874
848
|
forceUnsafe?: boolean;
|
|
875
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
876
|
-
waitLock?: number | boolean;
|
|
877
849
|
}
|
|
878
850
|
/**
|
|
879
851
|
* Options for the `fireforge patch rename` subcommand. Updates the patch's
|
|
@@ -882,7 +854,7 @@ export interface PatchDeleteOptions {
|
|
|
882
854
|
* for the case where the body is already correct but the patch's identity
|
|
883
855
|
* describes a pre-shrink scope.
|
|
884
856
|
*/
|
|
885
|
-
export interface PatchRenameOptions {
|
|
857
|
+
export interface PatchRenameOptions extends Confirmable, DryRunnable, PatchLockWaitable, UnsafeOverridable {
|
|
886
858
|
/**
|
|
887
859
|
* New human-readable name. Sanitised the same way `export --name`
|
|
888
860
|
* sanitises into the filename slug (lowercase, non-alphanumerics
|
|
@@ -909,40 +881,22 @@ export interface PatchRenameOptions {
|
|
|
909
881
|
* without touching the description).
|
|
910
882
|
*/
|
|
911
883
|
description?: string;
|
|
912
|
-
/** Print the planned change without writing. */
|
|
913
|
-
dryRun?: boolean;
|
|
914
|
-
/** Skip the confirmation prompt (required for non-TTY). */
|
|
915
|
-
yes?: boolean;
|
|
916
|
-
/** Bypass force-mode patchPolicy refusals. */
|
|
917
|
-
forceUnsafe?: boolean;
|
|
918
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
919
|
-
waitLock?: number | boolean;
|
|
920
884
|
}
|
|
921
885
|
/**
|
|
922
886
|
* Options for the patch reorder command.
|
|
923
887
|
*/
|
|
924
|
-
export interface PatchReorderOptions {
|
|
888
|
+
export interface PatchReorderOptions extends PatchLockWaitable {
|
|
925
889
|
to?: number;
|
|
926
890
|
before?: string;
|
|
927
891
|
after?: string;
|
|
928
892
|
yes?: boolean;
|
|
929
893
|
dryRun?: boolean;
|
|
930
894
|
forceUnsafe?: boolean;
|
|
931
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
932
|
-
waitLock?: number | boolean;
|
|
933
895
|
}
|
|
934
896
|
/**
|
|
935
897
|
* Options for the patch compact command.
|
|
936
898
|
*/
|
|
937
|
-
export interface PatchCompactOptions {
|
|
938
|
-
/** Skip confirmation prompt; required for non-TTY runs. */
|
|
939
|
-
yes?: boolean;
|
|
940
|
-
/** Print what would happen without writing anything. */
|
|
941
|
-
dryRun?: boolean;
|
|
942
|
-
/** Bypass force-mode patchPolicy refusals. */
|
|
943
|
-
forceUnsafe?: boolean;
|
|
944
|
-
/** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
|
|
945
|
-
waitLock?: number | boolean;
|
|
899
|
+
export interface PatchCompactOptions extends Confirmable, DryRunnable, PatchLockWaitable, UnsafeOverridable {
|
|
946
900
|
}
|
|
947
901
|
/**
|
|
948
902
|
* Options for the status command.
|
|
@@ -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;
|
|
@@ -352,8 +386,6 @@ export interface FireForgeState {
|
|
|
352
386
|
brand?: string;
|
|
353
387
|
/** Build mode: dev, debug, release */
|
|
354
388
|
buildMode?: BuildMode;
|
|
355
|
-
/** Last successful build timestamp (ISO string) */
|
|
356
|
-
lastBuild?: string;
|
|
357
389
|
/** Firefox version that was downloaded */
|
|
358
390
|
downloadedVersion?: string;
|
|
359
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';
|