@hominis/fireforge 0.45.0 → 0.46.1
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 +409 -446
- package/dist/bin/fireforge.d.ts +1 -1
- package/dist/bin/fireforge.js +21 -15
- 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 +7 -2
- package/dist/src/cli.js +47 -47
- package/dist/src/commands/bootstrap-checks.js +2 -1
- package/dist/src/commands/bootstrap.js +3 -4
- package/dist/src/commands/build.js +27 -17
- package/dist/src/commands/config.js +9 -9
- package/dist/src/commands/destructive-decision.d.ts +19 -0
- package/dist/src/commands/destructive-decision.js +31 -0
- package/dist/src/commands/discard.js +5 -5
- package/dist/src/commands/doctor-check-core.d.ts +4 -10
- package/dist/src/commands/doctor-check-core.js +0 -8
- package/dist/src/commands/doctor-external-toolchains.js +2 -2
- package/dist/src/commands/doctor-furnace-config-sync.d.ts +2 -2
- package/dist/src/commands/doctor-furnace-config-sync.js +20 -20
- package/dist/src/commands/doctor-furnace-jar.d.ts +1 -1
- package/dist/src/commands/doctor-furnace-jar.js +1 -1
- package/dist/src/commands/doctor-furnace.js +22 -22
- package/dist/src/commands/doctor-orphaned-harness.d.ts +10 -17
- package/dist/src/commands/doctor-orphaned-harness.js +14 -23
- package/dist/src/commands/doctor-patch-manifest.d.ts +2 -1
- package/dist/src/commands/doctor-patch-manifest.js +7 -6
- package/dist/src/commands/doctor-post-rebase-audit.js +3 -3
- package/dist/src/commands/doctor-source-pin.d.ts +12 -12
- package/dist/src/commands/doctor-source-pin.js +14 -14
- package/dist/src/commands/doctor-working-tree.d.ts +3 -3
- package/dist/src/commands/doctor-working-tree.js +3 -3
- package/dist/src/commands/doctor.d.ts +3 -1
- package/dist/src/commands/doctor.js +15 -16
- package/dist/src/commands/download.js +50 -37
- package/dist/src/commands/export-all.js +29 -12
- package/dist/src/commands/export-flow.d.ts +5 -5
- package/dist/src/commands/export-flow.js +29 -59
- package/dist/src/commands/export-placement-conflicts.d.ts +3 -3
- package/dist/src/commands/export-placement-conflicts.js +12 -12
- package/dist/src/commands/export-placement-gate.d.ts +2 -2
- package/dist/src/commands/export-placement-gate.js +7 -13
- package/dist/src/commands/export-placement-policy.d.ts +1 -1
- package/dist/src/commands/export-placement-policy.js +4 -6
- package/dist/src/commands/export-shared.d.ts +51 -32
- package/dist/src/commands/export-shared.js +17 -32
- package/dist/src/commands/export.js +14 -5
- package/dist/src/commands/furnace/apply.js +16 -16
- 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.d.ts +1 -1
- package/dist/src/commands/furnace/chrome-doc-remove.js +2 -2
- package/dist/src/commands/furnace/chrome-doc-templates.d.ts +14 -14
- package/dist/src/commands/furnace/chrome-doc-templates.js +17 -17
- package/dist/src/commands/furnace/chrome-doc-tests.d.ts +2 -2
- package/dist/src/commands/furnace/chrome-doc-tests.js +4 -4
- package/dist/src/commands/furnace/chrome-doc.d.ts +8 -8
- package/dist/src/commands/furnace/chrome-doc.js +18 -18
- package/dist/src/commands/furnace/create-browser-test.d.ts +1 -1
- package/dist/src/commands/furnace/create-browser-test.js +7 -12
- package/dist/src/commands/furnace/create-dry-run.d.ts +4 -4
- package/dist/src/commands/furnace/create-dry-run.js +6 -9
- package/dist/src/commands/furnace/create-features.d.ts +2 -2
- package/dist/src/commands/furnace/create-features.js +2 -2
- package/dist/src/commands/furnace/create-mochikit.d.ts +4 -4
- package/dist/src/commands/furnace/create-mochikit.js +7 -7
- package/dist/src/commands/furnace/create-templates.d.ts +31 -15
- package/dist/src/commands/furnace/create-templates.js +20 -19
- package/dist/src/commands/furnace/create-xpcshell.d.ts +5 -5
- package/dist/src/commands/furnace/create-xpcshell.js +8 -8
- package/dist/src/commands/furnace/create.d.ts +1 -1
- package/dist/src/commands/furnace/create.js +35 -29
- package/dist/src/commands/furnace/deploy.js +15 -6
- package/dist/src/commands/furnace/diff.js +7 -7
- package/dist/src/commands/furnace/index.js +1 -1
- package/dist/src/commands/furnace/init.js +17 -16
- package/dist/src/commands/furnace/list.js +2 -2
- package/dist/src/commands/furnace/override.d.ts +1 -1
- package/dist/src/commands/furnace/override.js +43 -34
- package/dist/src/commands/furnace/preview.js +17 -17
- package/dist/src/commands/furnace/refresh.js +15 -7
- package/dist/src/commands/furnace/remove-mutations.d.ts +9 -10
- package/dist/src/commands/furnace/remove-mutations.js +19 -19
- package/dist/src/commands/furnace/remove-state.d.ts +1 -1
- package/dist/src/commands/furnace/remove-state.js +1 -1
- package/dist/src/commands/furnace/remove.js +4 -8
- package/dist/src/commands/furnace/rename-browser-test.js +10 -15
- package/dist/src/commands/furnace/rename-xpcshell.d.ts +2 -2
- package/dist/src/commands/furnace/rename-xpcshell.js +3 -3
- package/dist/src/commands/furnace/rename.js +36 -36
- package/dist/src/commands/furnace/scan.js +3 -3
- package/dist/src/commands/furnace/status.js +19 -16
- package/dist/src/commands/furnace/sync.js +6 -6
- 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/validate.js +11 -12
- 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 +22 -29
- package/dist/src/commands/lint-per-patch.d.ts +2 -2
- package/dist/src/commands/lint-per-patch.js +27 -12
- package/dist/src/commands/lint-per-run-checkjs.d.ts +14 -15
- package/dist/src/commands/lint-per-run-checkjs.js +14 -15
- package/dist/src/commands/lint-report.d.ts +3 -3
- package/dist/src/commands/lint-report.js +4 -4
- package/dist/src/commands/lint.d.ts +5 -4
- package/dist/src/commands/lint.js +36 -36
- package/dist/src/commands/manifest.d.ts +4 -4
- package/dist/src/commands/manifest.js +1 -1
- package/dist/src/commands/package.js +4 -6
- package/dist/src/commands/patch/compact.d.ts +2 -2
- package/dist/src/commands/patch/compact.js +19 -20
- package/dist/src/commands/patch/delete.d.ts +1 -1
- package/dist/src/commands/patch/delete.js +23 -33
- 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 +3 -12
- package/dist/src/commands/patch/lint-ignore.js +33 -44
- package/dist/src/commands/patch/move-files-create.d.ts +2 -2
- package/dist/src/commands/patch/move-files-create.js +29 -15
- package/dist/src/commands/patch/move-files-into.d.ts +2 -2
- package/dist/src/commands/patch/move-files-into.js +41 -37
- package/dist/src/commands/patch/move-files.js +5 -14
- package/dist/src/commands/patch/patch-context.d.ts +1 -1
- package/dist/src/commands/patch/rename.d.ts +4 -4
- package/dist/src/commands/patch/rename.js +35 -49
- package/dist/src/commands/patch/reorder.js +35 -48
- package/dist/src/commands/patch/split-plan.d.ts +7 -8
- package/dist/src/commands/patch/split-plan.js +10 -13
- package/dist/src/commands/patch/split.d.ts +2 -2
- package/dist/src/commands/patch/split.js +50 -48
- package/dist/src/commands/patch/staged-dependency-validate.d.ts +1 -1
- package/dist/src/commands/patch/staged-dependency-validate.js +3 -3
- package/dist/src/commands/patch/staged-dependency.d.ts +1 -1
- package/dist/src/commands/patch/staged-dependency.js +22 -28
- package/dist/src/commands/patch/tier.d.ts +2 -2
- package/dist/src/commands/patch/tier.js +20 -30
- 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 +25 -3
- package/dist/src/commands/re-export-adjacent.js +40 -24
- package/dist/src/commands/re-export-bulk-scan.d.ts +3 -3
- package/dist/src/commands/re-export-bulk-scan.js +23 -27
- package/dist/src/commands/re-export-drift.d.ts +10 -10
- package/dist/src/commands/re-export-drift.js +33 -33
- package/dist/src/commands/re-export-files.d.ts +2 -3
- package/dist/src/commands/re-export-files.js +52 -44
- package/dist/src/commands/re-export-lint.d.ts +29 -30
- package/dist/src/commands/re-export-lint.js +36 -29
- package/dist/src/commands/re-export-options.d.ts +1 -1
- package/dist/src/commands/re-export-options.js +1 -1
- package/dist/src/commands/re-export-register.d.ts +1 -1
- package/dist/src/commands/re-export-register.js +1 -1
- package/dist/src/commands/re-export-scan.d.ts +1 -1
- package/dist/src/commands/re-export-scan.js +12 -9
- package/dist/src/commands/re-export-single.d.ts +23 -4
- package/dist/src/commands/re-export-single.js +39 -31
- package/dist/src/commands/re-export.js +35 -17
- package/dist/src/commands/rebase/abort.js +9 -14
- package/dist/src/commands/rebase/continue.js +20 -19
- package/dist/src/commands/rebase/index.d.ts +1 -1
- package/dist/src/commands/rebase/index.js +5 -5
- package/dist/src/commands/rebase/patch-loop.d.ts +2 -2
- package/dist/src/commands/rebase/patch-loop.js +20 -24
- package/dist/src/commands/register.js +5 -5
- package/dist/src/commands/reset.js +1 -1
- package/dist/src/commands/resolve.d.ts +2 -2
- package/dist/src/commands/resolve.js +21 -13
- package/dist/src/commands/run.d.ts +0 -13
- package/dist/src/commands/run.js +38 -51
- package/dist/src/commands/setup-support.d.ts +16 -4
- package/dist/src/commands/setup-support.js +20 -20
- package/dist/src/commands/setup.js +4 -10
- package/dist/src/commands/source.js +9 -2
- package/dist/src/commands/status-check.d.ts +3 -3
- package/dist/src/commands/status-check.js +6 -6
- package/dist/src/commands/status-json.d.ts +14 -13
- package/dist/src/commands/status-json.js +9 -8
- package/dist/src/commands/status-output.d.ts +3 -3
- package/dist/src/commands/status-output.js +5 -5
- package/dist/src/commands/status-ownership.d.ts +3 -3
- package/dist/src/commands/status-ownership.js +3 -3
- package/dist/src/commands/status.js +25 -26
- package/dist/src/commands/test-build-phase.d.ts +3 -3
- package/dist/src/commands/test-build-phase.js +48 -24
- package/dist/src/commands/test-diagnose.d.ts +1 -1
- package/dist/src/commands/test-diagnose.js +20 -20
- package/dist/src/commands/test-modes.d.ts +4 -4
- package/dist/src/commands/test-modes.js +4 -5
- package/dist/src/commands/test-register.js +5 -3
- package/dist/src/commands/test-run.d.ts +11 -11
- package/dist/src/commands/test-run.js +40 -33
- package/dist/src/commands/test-stale-gate.d.ts +12 -12
- package/dist/src/commands/test-stale-gate.js +17 -17
- package/dist/src/commands/test-verdict.d.ts +19 -5
- package/dist/src/commands/test-verdict.js +26 -11
- package/dist/src/commands/test.d.ts +3 -3
- package/dist/src/commands/test.js +73 -36
- package/dist/src/commands/token-coverage.js +3 -3
- 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 +26 -10
- package/dist/src/commands/tree.js +26 -21
- package/dist/src/commands/typecheck.d.ts +6 -6
- package/dist/src/commands/typecheck.js +16 -16
- package/dist/src/commands/verify.d.ts +3 -3
- package/dist/src/commands/verify.js +10 -10
- package/dist/src/commands/watch.js +11 -11
- package/dist/src/commands/wire.js +17 -16
- package/dist/src/core/ast-utils.d.ts +7 -7
- package/dist/src/core/ast-utils.js +8 -8
- package/dist/src/core/branding.d.ts +5 -12
- package/dist/src/core/branding.js +6 -5
- package/dist/src/core/browser-wire.d.ts +1 -1
- package/dist/src/core/browser-wire.js +10 -7
- package/dist/src/core/build-audit-platform.d.ts +32 -3
- package/dist/src/core/build-audit-platform.js +153 -13
- package/dist/src/core/build-audit-registration.d.ts +5 -5
- package/dist/src/core/build-audit-registration.js +10 -9
- package/dist/src/core/build-audit-resolve.d.ts +5 -5
- package/dist/src/core/build-audit-resolve.js +6 -6
- 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-transforms.d.ts +2 -2
- package/dist/src/core/build-audit-transforms.js +3 -3
- package/dist/src/core/build-audit.d.ts +21 -8
- package/dist/src/core/build-audit.js +142 -40
- package/dist/src/core/build-baseline-types.d.ts +19 -18
- package/dist/src/core/build-baseline-types.js +1 -1
- package/dist/src/core/build-baseline.d.ts +48 -31
- package/dist/src/core/build-baseline.js +20 -43
- package/dist/src/core/build-jar-escalation.d.ts +8 -8
- package/dist/src/core/build-jar-escalation.js +18 -17
- package/dist/src/core/build-overwrite-guard.d.ts +4 -4
- package/dist/src/core/build-overwrite-guard.js +14 -14
- package/dist/src/core/build-prepare.d.ts +4 -12
- package/dist/src/core/build-prepare.js +22 -26
- package/dist/src/core/config-mutate.js +4 -4
- 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 +3 -21
- 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 +1 -1
- package/dist/src/core/config-validate-file-size.js +3 -3
- 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 +22 -12
- package/dist/src/core/config.d.ts +12 -12
- package/dist/src/core/config.js +21 -25
- package/dist/src/core/coverage-extend.d.ts +16 -16
- package/dist/src/core/coverage-extend.js +20 -20
- package/dist/src/core/destructive.d.ts +14 -14
- package/dist/src/core/destructive.js +9 -9
- package/dist/src/core/diff-hunks.d.ts +2 -2
- package/dist/src/core/diff-hunks.js +7 -7
- package/dist/src/core/discard-baseline.d.ts +10 -10
- package/dist/src/core/discard-baseline.js +22 -23
- package/dist/src/core/display-state.d.ts +11 -11
- package/dist/src/core/display-state.js +12 -12
- package/dist/src/core/engine-changes.d.ts +2 -2
- package/dist/src/core/engine-changes.js +2 -2
- package/dist/src/core/engine-precondition.d.ts +5 -13
- package/dist/src/core/engine-precondition.js +5 -10
- package/dist/src/core/engine-session-lock.d.ts +18 -18
- package/dist/src/core/engine-session-lock.js +50 -54
- package/dist/src/core/export-moved-code-shape.d.ts +7 -7
- package/dist/src/core/export-moved-code-shape.js +10 -10
- 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 +14 -19
- package/dist/src/core/file-lock.js +90 -128
- package/dist/src/core/firefox-cache.d.ts +13 -1
- package/dist/src/core/firefox-cache.js +61 -36
- package/dist/src/core/firefox-download.d.ts +15 -0
- package/dist/src/core/firefox-download.js +38 -22
- package/dist/src/core/firefox-extract.d.ts +8 -7
- package/dist/src/core/firefox-extract.js +45 -27
- package/dist/src/core/firefox.d.ts +34 -36
- package/dist/src/core/firefox.js +13 -44
- package/dist/src/core/furnace-apply-dry-run.d.ts +1 -6
- package/dist/src/core/furnace-apply-dry-run.js +2 -8
- package/dist/src/core/furnace-apply-ftl.d.ts +5 -5
- package/dist/src/core/furnace-apply-ftl.js +8 -8
- package/dist/src/core/furnace-apply-helpers.d.ts +9 -20
- package/dist/src/core/furnace-apply-helpers.js +28 -39
- package/dist/src/core/furnace-apply-output.js +1 -1
- package/dist/src/core/furnace-apply-overwrite-warn.d.ts +9 -9
- package/dist/src/core/furnace-apply-overwrite-warn.js +13 -11
- package/dist/src/core/furnace-apply-undeploy-actions.d.ts +1 -1
- package/dist/src/core/furnace-apply-undeploy-actions.js +1 -1
- package/dist/src/core/furnace-apply.d.ts +4 -4
- package/dist/src/core/furnace-apply.js +50 -29
- package/dist/src/core/furnace-checksum-utils.d.ts +5 -5
- package/dist/src/core/furnace-checksum-utils.js +5 -5
- package/dist/src/core/furnace-config-custom.d.ts +1 -1
- package/dist/src/core/furnace-config-custom.js +2 -2
- package/dist/src/core/furnace-config-order.js +1 -1
- package/dist/src/core/furnace-config-tokens.d.ts +3 -3
- package/dist/src/core/furnace-config-tokens.js +3 -3
- package/dist/src/core/furnace-config-validate.js +2 -2
- package/dist/src/core/furnace-config.d.ts +5 -5
- package/dist/src/core/furnace-config.js +40 -53
- package/dist/src/core/furnace-constants.d.ts +6 -6
- package/dist/src/core/furnace-constants.js +9 -8
- package/dist/src/core/furnace-css-fragments.d.ts +6 -6
- package/dist/src/core/furnace-css-fragments.js +11 -11
- 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-jsconfig.d.ts +7 -7
- package/dist/src/core/furnace-jsconfig.js +22 -20
- package/dist/src/core/furnace-operation.d.ts +22 -19
- package/dist/src/core/furnace-operation.js +38 -34
- package/dist/src/core/furnace-precondition.d.ts +10 -10
- package/dist/src/core/furnace-precondition.js +8 -8
- package/dist/src/core/furnace-refresh.d.ts +18 -6
- package/dist/src/core/furnace-refresh.js +5 -8
- package/dist/src/core/furnace-registration-ast.d.ts +2 -3
- package/dist/src/core/furnace-registration-ast.js +9 -12
- package/dist/src/core/furnace-registration-remove.d.ts +4 -4
- package/dist/src/core/furnace-registration-remove.js +6 -6
- package/dist/src/core/furnace-registration-validate.d.ts +2 -2
- package/dist/src/core/furnace-registration-validate.js +2 -2
- package/dist/src/core/furnace-registration.d.ts +7 -6
- package/dist/src/core/furnace-registration.js +29 -36
- package/dist/src/core/furnace-rollback.d.ts +1 -1
- package/dist/src/core/furnace-rollback.js +5 -5
- package/dist/src/core/furnace-scanner.js +3 -6
- package/dist/src/core/furnace-stale-export.d.ts +17 -16
- package/dist/src/core/furnace-stale-export.js +16 -15
- package/dist/src/core/furnace-staleness.d.ts +2 -2
- package/dist/src/core/furnace-staleness.js +2 -2
- package/dist/src/core/furnace-state-persist.d.ts +12 -12
- package/dist/src/core/furnace-state-persist.js +10 -10
- package/dist/src/core/furnace-step-errors.d.ts +6 -6
- package/dist/src/core/furnace-step-errors.js +6 -6
- package/dist/src/core/furnace-validate-accessibility.js +14 -14
- package/dist/src/core/furnace-validate-compatibility.js +9 -9
- package/dist/src/core/furnace-validate-registration.d.ts +2 -2
- package/dist/src/core/furnace-validate-registration.js +18 -20
- package/dist/src/core/furnace-validate-structure.d.ts +1 -1
- package/dist/src/core/furnace-validate-structure.js +4 -4
- package/dist/src/core/furnace-validate.js +9 -9
- package/dist/src/core/furnace-version-drift.d.ts +5 -5
- package/dist/src/core/furnace-version-drift.js +5 -5
- package/dist/src/core/git-base.d.ts +6 -4
- package/dist/src/core/git-base.js +29 -7
- 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 +13 -13
- package/dist/src/core/git-diff.js +121 -189
- package/dist/src/core/git-file-ops.d.ts +6 -13
- package/dist/src/core/git-file-ops.js +11 -35
- package/dist/src/core/git-readonly-index.d.ts +12 -14
- package/dist/src/core/git-readonly-index.js +12 -16
- package/dist/src/core/git-status.d.ts +9 -2
- package/dist/src/core/git-status.js +23 -11
- package/dist/src/core/git.d.ts +3 -9
- package/dist/src/core/git.js +28 -57
- package/dist/src/core/harness-orphans.d.ts +17 -17
- package/dist/src/core/harness-orphans.js +28 -27
- package/dist/src/core/history-log.d.ts +19 -0
- package/dist/src/core/history-log.js +29 -0
- package/dist/src/core/license-headers.d.ts +19 -18
- package/dist/src/core/license-headers.js +29 -28
- package/dist/src/core/mach-build-artifacts.d.ts +21 -21
- package/dist/src/core/mach-build-artifacts.js +23 -23
- package/dist/src/core/mach-error-hints.d.ts +5 -10
- package/dist/src/core/mach-error-hints.js +14 -14
- package/dist/src/core/mach-known-noise-filter.d.ts +42 -38
- package/dist/src/core/mach-known-noise-filter.js +57 -56
- package/dist/src/core/mach-mozconfig.d.ts +6 -6
- package/dist/src/core/mach-mozconfig.js +17 -16
- package/dist/src/core/mach-python.d.ts +3 -0
- package/dist/src/core/mach-python.js +13 -7
- package/dist/src/core/mach-resource-shim.d.ts +24 -12
- package/dist/src/core/mach-resource-shim.js +124 -21
- package/dist/src/core/mach.d.ts +59 -73
- package/dist/src/core/mach.js +47 -115
- package/dist/src/core/marionette-port.d.ts +15 -30
- package/dist/src/core/marionette-port.js +46 -89
- package/dist/src/core/marionette-preflight.d.ts +6 -6
- package/dist/src/core/marionette-preflight.js +32 -50
- package/dist/src/core/markdown-table.d.ts +9 -9
- package/dist/src/core/markdown-table.js +14 -14
- package/dist/src/core/mochitest-server-port.d.ts +8 -8
- package/dist/src/core/mochitest-server-port.js +17 -17
- package/dist/src/core/module-resolution-preflight.d.ts +8 -8
- package/dist/src/core/module-resolution-preflight.js +11 -11
- package/dist/src/core/moz-manifest-helpers.d.ts +7 -7
- package/dist/src/core/moz-manifest-helpers.js +7 -7
- package/dist/src/core/moz-manifest-register.d.ts +1 -1
- package/dist/src/core/moz-manifest-register.js +2 -2
- package/dist/src/core/moz-manifest-rules.js +46 -42
- package/dist/src/core/moz-manifest-tokenizers.js +1 -1
- package/dist/src/core/ownership-table.d.ts +5 -5
- package/dist/src/core/ownership-table.js +7 -7
- package/dist/src/core/parser-fallback.d.ts +3 -3
- package/dist/src/core/parser-fallback.js +3 -3
- package/dist/src/core/patch-apply-fuzz.d.ts +5 -5
- package/dist/src/core/patch-apply-fuzz.js +13 -13
- package/dist/src/core/patch-apply.d.ts +13 -14
- package/dist/src/core/patch-apply.js +36 -42
- 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 +21 -4
- package/dist/src/core/patch-export-update.js +7 -6
- package/dist/src/core/patch-export.d.ts +20 -30
- package/dist/src/core/patch-export.js +55 -77
- package/dist/src/core/patch-files.d.ts +0 -4
- package/dist/src/core/patch-files.js +0 -11
- package/dist/src/core/patch-identifier-suggest.d.ts +1 -1
- package/dist/src/core/patch-identifier-suggest.js +4 -4
- package/dist/src/core/patch-lint-binary.d.ts +12 -18
- package/dist/src/core/patch-lint-cache.d.ts +18 -2
- package/dist/src/core/patch-lint-cache.js +16 -19
- package/dist/src/core/patch-lint-checkjs.d.ts +55 -38
- package/dist/src/core/patch-lint-checkjs.js +78 -64
- package/dist/src/core/patch-lint-chrome-jsdoc.d.ts +8 -9
- package/dist/src/core/patch-lint-chrome-jsdoc.js +10 -11
- package/dist/src/core/patch-lint-creators.d.ts +5 -9
- package/dist/src/core/patch-lint-creators.js +3 -3
- package/dist/src/core/patch-lint-cross.d.ts +27 -19
- package/dist/src/core/patch-lint-cross.js +67 -110
- package/dist/src/core/patch-lint-css.d.ts +1 -1
- package/dist/src/core/patch-lint-css.js +15 -11
- package/dist/src/core/patch-lint-diff-tag.d.ts +5 -5
- package/dist/src/core/patch-lint-diff-tag.js +5 -5
- package/dist/src/core/patch-lint-diff.d.ts +4 -4
- package/dist/src/core/patch-lint-diff.js +4 -4
- package/dist/src/core/patch-lint-file-size.d.ts +3 -3
- package/dist/src/core/patch-lint-file-size.js +6 -6
- 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.d.ts +2 -2
- package/dist/src/core/patch-lint-jsdoc.js +46 -46
- package/dist/src/core/patch-lint-module-registration.d.ts +3 -9
- package/dist/src/core/patch-lint-module-registration.js +1 -1
- package/dist/src/core/patch-lint-mozbuild.d.ts +1 -1
- package/dist/src/core/patch-lint-mozbuild.js +10 -10
- package/dist/src/core/patch-lint-observer.d.ts +3 -3
- package/dist/src/core/patch-lint-observer.js +7 -7
- package/dist/src/core/patch-lint-ownership.d.ts +6 -6
- package/dist/src/core/patch-lint-ownership.js +6 -6
- package/dist/src/core/patch-lint-prettier.d.ts +6 -6
- package/dist/src/core/patch-lint-prettier.js +7 -7
- 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 +23 -23
- package/dist/src/core/patch-lint-unmanaged-companion.js +26 -26
- package/dist/src/core/patch-lint.d.ts +41 -35
- package/dist/src/core/patch-lint.js +52 -49
- package/dist/src/core/patch-lock.d.ts +1 -1
- package/dist/src/core/patch-lock.js +11 -11
- package/dist/src/core/patch-manifest-consistency.d.ts +7 -7
- package/dist/src/core/patch-manifest-consistency.js +16 -17
- package/dist/src/core/patch-manifest-files-affected.d.ts +1 -1
- package/dist/src/core/patch-manifest-files-affected.js +3 -3
- package/dist/src/core/patch-manifest-io.d.ts +14 -14
- package/dist/src/core/patch-manifest-io.js +35 -34
- package/dist/src/core/patch-manifest-query.d.ts +1 -1
- package/dist/src/core/patch-manifest-query.js +4 -4
- package/dist/src/core/patch-manifest-resolve.d.ts +5 -5
- package/dist/src/core/patch-manifest-resolve.js +7 -7
- package/dist/src/core/patch-manifest-validate.js +3 -3
- package/dist/src/core/patch-manifest.d.ts +2 -2
- package/dist/src/core/patch-manifest.js +2 -2
- package/dist/src/core/patch-parse.d.ts +32 -21
- package/dist/src/core/patch-parse.js +40 -15
- package/dist/src/core/patch-policy.js +15 -27
- package/dist/src/core/patch-registration-refs.d.ts +4 -4
- package/dist/src/core/patch-registration-refs.js +7 -7
- 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 +8 -16
- package/dist/src/core/patch-transform.js +13 -23
- package/dist/src/core/process-cpu-time.d.ts +1 -1
- package/dist/src/core/process-cpu-time.js +6 -6
- package/dist/src/core/rebase-session.d.ts +9 -15
- package/dist/src/core/rebase-session.js +13 -25
- 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-result.d.ts +1 -1
- package/dist/src/core/register-result.js +1 -1
- package/dist/src/core/register-scaffold.d.ts +2 -2
- package/dist/src/core/register-scaffold.js +8 -7
- package/dist/src/core/register-shared-css.d.ts +3 -3
- package/dist/src/core/register-shared-css.js +6 -5
- package/dist/src/core/register-xpcshell-test.d.ts +2 -2
- package/dist/src/core/register-xpcshell-test.js +2 -2
- 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 +21 -10
- package/dist/src/core/run-log.js +76 -27
- package/dist/src/core/shared-ftl.d.ts +2 -2
- package/dist/src/core/shared-ftl.js +6 -6
- package/dist/src/core/signal-critical.d.ts +2 -2
- package/dist/src/core/signal-critical.js +4 -6
- package/dist/src/core/smoke-patterns.d.ts +5 -6
- package/dist/src/core/smoke-patterns.js +15 -20
- package/dist/src/core/state-file.d.ts +15 -4
- package/dist/src/core/state-file.js +14 -1
- package/dist/src/core/status-binary.d.ts +8 -8
- package/dist/src/core/status-binary.js +12 -12
- package/dist/src/core/status-classify.d.ts +17 -17
- package/dist/src/core/status-classify.js +13 -12
- package/dist/src/core/test-changed-prefs.d.ts +12 -12
- package/dist/src/core/test-changed-prefs.js +40 -25
- package/dist/src/core/test-harness-crash.d.ts +39 -39
- package/dist/src/core/test-harness-crash.js +69 -69
- package/dist/src/core/test-harness-output.d.ts +7 -7
- package/dist/src/core/test-harness-output.js +7 -7
- package/dist/src/core/test-harness-verdict-notes.d.ts +13 -14
- package/dist/src/core/test-harness-verdict-notes.js +4 -4
- package/dist/src/core/test-path-scope.d.ts +8 -8
- package/dist/src/core/test-path-scope.js +11 -11
- package/dist/src/core/test-stale-check.d.ts +22 -23
- package/dist/src/core/test-stale-check.js +31 -30
- package/dist/src/core/test-stale-symlink.d.ts +1 -1
- package/dist/src/core/test-stale-symlink.js +1 -1
- package/dist/src/core/test-stall-triage.d.ts +9 -9
- package/dist/src/core/test-stall-triage.js +22 -22
- 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 +35 -2
- package/dist/src/core/token-category.js +67 -58
- package/dist/src/core/token-coverage.js +4 -5
- package/dist/src/core/token-dark-mode.d.ts +9 -9
- package/dist/src/core/token-dark-mode.js +13 -25
- package/dist/src/core/token-docs.d.ts +1 -1
- 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 +4 -4
- package/dist/src/core/token-manager.js +22 -22
- package/dist/src/core/token-scaffold.d.ts +4 -4
- package/dist/src/core/token-scaffold.js +4 -4
- package/dist/src/core/token-variant.d.ts +14 -14
- package/dist/src/core/token-variant.js +52 -53
- package/dist/src/core/toolchain-preflight.d.ts +15 -15
- package/dist/src/core/toolchain-preflight.js +23 -23
- package/dist/src/core/tree-cow.d.ts +3 -5
- package/dist/src/core/tree-cow.js +8 -8
- package/dist/src/core/tree-guard.d.ts +3 -3
- package/dist/src/core/tree-guard.js +23 -23
- package/dist/src/core/tree-store.d.ts +15 -15
- package/dist/src/core/tree-store.js +39 -38
- package/dist/src/core/typecheck-shim.d.ts +16 -15
- package/dist/src/core/typecheck-shim.js +26 -25
- package/dist/src/core/typecheck.d.ts +12 -12
- package/dist/src/core/typecheck.js +33 -33
- package/dist/src/core/wire-destroy.d.ts +2 -2
- package/dist/src/core/wire-destroy.js +5 -5
- package/dist/src/core/wire-dom-fragment.d.ts +3 -3
- package/dist/src/core/wire-dom-fragment.js +12 -23
- package/dist/src/core/wire-init.d.ts +2 -2
- package/dist/src/core/wire-init.js +7 -7
- package/dist/src/core/wire-subscript.d.ts +1 -1
- package/dist/src/core/wire-subscript.js +3 -3
- package/dist/src/core/wire-utils.d.ts +9 -9
- package/dist/src/core/wire-utils.js +16 -28
- package/dist/src/core/xpcshell-appdir.d.ts +20 -20
- package/dist/src/core/xpcshell-appdir.js +28 -30
- package/dist/src/core/xpcshell-profile-dir.d.ts +3 -3
- package/dist/src/core/xpcshell-profile-dir.js +7 -7
- package/dist/src/errors/base.d.ts +69 -16
- package/dist/src/errors/base.js +95 -26
- package/dist/src/errors/build.d.ts +6 -6
- package/dist/src/errors/build.js +26 -34
- package/dist/src/errors/codes.d.ts +10 -10
- package/dist/src/errors/codes.js +10 -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.d.ts +2 -2
- package/dist/src/errors/furnace.js +8 -9
- package/dist/src/errors/git.d.ts +9 -9
- package/dist/src/errors/git.js +21 -31
- package/dist/src/errors/patch.d.ts +3 -3
- package/dist/src/errors/patch.js +11 -13
- package/dist/src/errors/rebase.d.ts +1 -1
- package/dist/src/errors/rebase.js +8 -8
- package/dist/src/errors/run.d.ts +1 -1
- package/dist/src/errors/run.js +1 -1
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +4 -4
- package/dist/src/types/commands/options.d.ts +155 -200
- package/dist/src/types/commands/patches.d.ts +19 -19
- package/dist/src/types/commands/project.d.ts +3 -3
- package/dist/src/types/config.d.ts +52 -19
- package/dist/src/types/furnace.d.ts +17 -17
- package/dist/src/types/index.d.ts +0 -1
- package/dist/src/types/json.d.ts +3 -3
- package/dist/src/types/json.js +2 -2
- package/dist/src/types/typecheck.d.ts +3 -3
- package/dist/src/utils/assert.d.ts +4 -16
- package/dist/src/utils/assert.js +7 -24
- package/dist/src/utils/build-info.d.ts +6 -6
- package/dist/src/utils/build-info.js +6 -6
- package/dist/src/utils/child-env.d.ts +7 -6
- package/dist/src/utils/child-env.js +5 -5
- package/dist/src/utils/concurrency.d.ts +2 -2
- package/dist/src/utils/concurrency.js +2 -2
- package/dist/src/utils/elapsed.js +10 -1
- package/dist/src/utils/errors.d.ts +8 -8
- package/dist/src/utils/errors.js +8 -8
- package/dist/src/utils/fs.d.ts +1 -1
- package/dist/src/utils/fs.js +15 -20
- 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/logger.d.ts +4 -4
- package/dist/src/utils/logger.js +11 -11
- package/dist/src/utils/machine-output.js +2 -2
- package/dist/src/utils/options.d.ts +14 -20
- package/dist/src/utils/options.js +26 -27
- package/dist/src/utils/package-root.js +5 -14
- package/dist/src/utils/paths.d.ts +4 -4
- package/dist/src/utils/paths.js +4 -4
- package/dist/src/utils/platform.d.ts +0 -4
- package/dist/src/utils/process-group.d.ts +10 -9
- package/dist/src/utils/process-group.js +37 -36
- package/dist/src/utils/process.d.ts +70 -55
- package/dist/src/utils/process.js +129 -179
- package/dist/src/utils/ps-duration.d.ts +4 -4
- package/dist/src/utils/ps-duration.js +9 -9
- package/dist/src/utils/regex.d.ts +4 -4
- package/dist/src/utils/regex.js +7 -7
- package/dist/src/utils/sleep.d.ts +26 -0
- package/dist/src/utils/sleep.js +31 -0
- package/dist/src/utils/stdio-drain.d.ts +7 -7
- package/dist/src/utils/stdio-drain.js +8 -8
- package/dist/src/utils/validation.d.ts +12 -49
- package/dist/src/utils/validation.js +26 -36
- package/docs/README.md +2 -2
- package/docs/configuration.md +163 -69
- package/docs/exit-codes.md +66 -49
- package/docs/furnace.md +20 -19
- package/docs/lifecycle-invariants.md +414 -247
- package/docs/machine-output.md +58 -34
- package/docs/patch-workflow.md +48 -44
- package/docs/run-logs.md +72 -28
- package/docs/testing.md +105 -98
- package/docs/verification-trees.md +23 -22
- package/package.json +7 -6
- 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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bounded stdio drain for delayed process exits.
|
|
3
3
|
*
|
|
4
|
-
* `process.exit()` discards whatever is still queued in an async writable
|
|
5
|
-
* and stdout
|
|
4
|
+
* `process.exit()` discards whatever is still queued in an async writable,
|
|
5
|
+
* and stdout is async when it is a pipe, with a 64 KiB kernel buffer on
|
|
6
6
|
* macOS/Linux. The observed failure: `status --json --fail-on` writes a
|
|
7
7
|
* 176 KB payload, the refusal makes `bin/fireforge.ts` exit non-zero, and a
|
|
8
8
|
* piped consumer receives exactly 65 536 bytes. The bin entry point awaits
|
|
9
|
-
* this helper before every delayed exit
|
|
9
|
+
* this helper before every delayed exit. The helper itself never calls
|
|
10
10
|
* `process.exit` (the process-boundary test keeps that a bin-only right).
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
* The structural slice of `Writable` the drain wait needs
|
|
13
|
+
* The structural slice of `Writable` the drain wait needs. Accepted instead
|
|
14
14
|
* of `NodeJS.WriteStream` so unit tests can drive synthetic streams.
|
|
15
15
|
*/
|
|
16
16
|
export interface DrainableStream {
|
|
@@ -21,8 +21,8 @@ export interface DrainableStream {
|
|
|
21
21
|
off(event: 'drain' | 'error' | 'close', listener: () => void): unknown;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Waits (bounded by `timeoutMs`) for every given stream
|
|
25
|
-
* by default
|
|
26
|
-
* either way, the bound only decides how much queued output survives.
|
|
24
|
+
* Waits (bounded by `timeoutMs`) for every given stream (stdout and stderr
|
|
25
|
+
* by default) to drain. Resolution is unconditional. The caller exits
|
|
26
|
+
* either way, and the bound only decides how much queued output survives.
|
|
27
27
|
*/
|
|
28
28
|
export declare function waitForStdioDrain(timeoutMs: number, streams?: readonly DrainableStream[]): Promise<void>;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Bounded stdio drain for delayed process exits.
|
|
4
4
|
*
|
|
5
|
-
* `process.exit()` discards whatever is still queued in an async writable
|
|
6
|
-
* and stdout
|
|
5
|
+
* `process.exit()` discards whatever is still queued in an async writable,
|
|
6
|
+
* and stdout is async when it is a pipe, with a 64 KiB kernel buffer on
|
|
7
7
|
* macOS/Linux. The observed failure: `status --json --fail-on` writes a
|
|
8
8
|
* 176 KB payload, the refusal makes `bin/fireforge.ts` exit non-zero, and a
|
|
9
9
|
* piped consumer receives exactly 65 536 bytes. The bin entry point awaits
|
|
10
|
-
* this helper before every delayed exit
|
|
10
|
+
* this helper before every delayed exit. The helper itself never calls
|
|
11
11
|
* `process.exit` (the process-boundary test keeps that a bin-only right).
|
|
12
12
|
*/
|
|
13
13
|
/** True when nothing the process is about to lose remains queued. */
|
|
@@ -16,8 +16,8 @@ function isFlushed(stream) {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Resolves once `stream` has drained its queued writes, and always within
|
|
19
|
-
* `timeoutMs`. Never rejects: `'error'` and `'close'` (an EPIPE'd pipe
|
|
20
|
-
* `installBrokenPipeHandler` already swallows
|
|
19
|
+
* `timeoutMs`. Never rejects: `'error'` and `'close'` (an EPIPE'd pipe,
|
|
20
|
+
* whose error `installBrokenPipeHandler` already swallows) resolve
|
|
21
21
|
* immediately, because a destroyed pipe can never drain and must not stall
|
|
22
22
|
* the exit behind it.
|
|
23
23
|
*/
|
|
@@ -45,9 +45,9 @@ function waitForStreamDrain(stream, timeoutMs) {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Waits (bounded by `timeoutMs`) for every given stream
|
|
49
|
-
* by default
|
|
50
|
-
* either way, the bound only decides how much queued output survives.
|
|
48
|
+
* Waits (bounded by `timeoutMs`) for every given stream (stdout and stderr
|
|
49
|
+
* by default) to drain. Resolution is unconditional. The caller exits
|
|
50
|
+
* either way, and the bound only decides how much queued output survives.
|
|
51
51
|
*/
|
|
52
52
|
export async function waitForStdioDrain(timeoutMs, streams = [process.stdout, process.stderr]) {
|
|
53
53
|
await Promise.all(streams.map((stream) => waitForStreamDrain(stream, timeoutMs)));
|
|
@@ -27,9 +27,9 @@ export declare function isPositiveInteger(value: unknown): value is number;
|
|
|
27
27
|
* orders instead of failing fast.
|
|
28
28
|
*
|
|
29
29
|
* Rejects leading-zero forms ("01"), decimals ("1.5"), whitespace, and
|
|
30
|
-
* non-numeric garbage via a strict regex
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* non-numeric garbage via a strict regex. Only the canonical representation
|
|
31
|
+
* is accepted, so there is no ambiguity between what the user typed and what
|
|
32
|
+
* the value becomes on disk.
|
|
33
33
|
*
|
|
34
34
|
* @param flagName - Flag name to include in the error (e.g. `--order`)
|
|
35
35
|
* @param rawValue - Raw string value from Commander
|
|
@@ -57,8 +57,8 @@ export declare function isArray(value: unknown): value is unknown[];
|
|
|
57
57
|
* Narrows a JSON value to a JSON object node (excludes arrays and `null`).
|
|
58
58
|
*
|
|
59
59
|
* Unlike {@link isObject} this accepts only values already known to be JSON
|
|
60
|
-
* data, so the narrowed `JsonObject` keeps its concrete value contract
|
|
61
|
-
*
|
|
60
|
+
* data, so the narrowed `JsonObject` keeps its concrete value contract.
|
|
61
|
+
* Use it when walking a `JsonValue` tree rather than at `unknown` boundaries.
|
|
62
62
|
* @param value - JSON value to check
|
|
63
63
|
* @returns True if value is a JSON object node
|
|
64
64
|
*/
|
|
@@ -73,55 +73,26 @@ export declare function isValidFirefoxVersion(version: string): boolean;
|
|
|
73
73
|
* Accepts formats like "build1", "build2", "build12" (no leading zero).
|
|
74
74
|
*/
|
|
75
75
|
export declare function isValidFirefoxCandidate(candidate: string): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Naming contract for this module's checks.
|
|
78
|
-
*
|
|
79
|
-
* `validate*` is easy to spread across incompatible return contracts — some
|
|
80
|
-
* throwing and returning void, some returning an issue list, some a parsed
|
|
81
|
-
* value, some a boolean, some an error MESSAGE — and a caller cannot tell
|
|
82
|
-
* which from the name. Passing a THROWING `validate*` to a clack `validate`
|
|
83
|
-
* callback, which expects a returned message, kills the prompt instead of
|
|
84
|
-
* re-prompting.
|
|
85
|
-
*
|
|
86
|
-
* The two dominant contracts keep the prefix:
|
|
87
|
-
* - `validate*` — throws on failure, or returns an issue list.
|
|
88
|
-
* - `is*` / `has*` — a type predicate or boolean.
|
|
89
|
-
* The message-returning minority is `describe*Problem`, which reads as what
|
|
90
|
-
* it is: a description of what is wrong, or `undefined`.
|
|
91
|
-
*
|
|
92
|
-
* `assert*` is uniform throughout: throw-or-continue.
|
|
93
|
-
*/
|
|
94
|
-
/**
|
|
95
|
-
* Valid Firefox product identifiers.
|
|
96
|
-
*
|
|
97
|
-
* `satisfies readonly FirefoxProduct[]` links the runtime list to the union
|
|
98
|
-
* in ONE direction: it rejects an entry here that the union does not
|
|
99
|
-
* declare. It cannot see a union member missing from this list — widening a
|
|
100
|
-
* `readonly T[]` check never fails for being short. The reverse direction is
|
|
101
|
-
* covered by the exhaustive switch in `utils/__tests__/validation.test.ts`,
|
|
102
|
-
* which fails to compile when the union grows.
|
|
103
|
-
*/
|
|
104
76
|
export declare const FIREFOX_PRODUCTS: readonly ["firefox", "firefox-esr", "firefox-beta", "firefox-devedition"];
|
|
105
77
|
/**
|
|
106
78
|
* Validates a Firefox product string.
|
|
107
79
|
*
|
|
108
|
-
* A type predicate, matching its
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* check IS the runtime proof.
|
|
80
|
+
* A type predicate, matching its sibling {@link isValidProjectLicense}.
|
|
81
|
+
* Returning plain `boolean` would force `as FirefoxProduct` casts at the
|
|
82
|
+
* call sites even though the `.includes` check is the runtime proof.
|
|
112
83
|
*/
|
|
113
84
|
export declare const isValidFirefoxProduct: (value: string) => value is "firefox" | "firefox-esr" | "firefox-beta" | "firefox-devedition";
|
|
114
85
|
/**
|
|
115
86
|
* Builds a type predicate from a `readonly` tuple of allowed values.
|
|
116
87
|
*
|
|
117
|
-
* Deriving the type from the list
|
|
118
|
-
* hand-maintaining a matching array
|
|
88
|
+
* Deriving the type from the list, rather than declaring a union and
|
|
89
|
+
* hand-maintaining a matching array, removes a whole class of drift: a
|
|
119
90
|
* union can otherwise accept a stale allowlist with no compile error, and a
|
|
120
91
|
* copy of the member list on the `fireforge.json` read path can silently
|
|
121
92
|
* reject a newly added value.
|
|
122
93
|
*
|
|
123
94
|
* Returning a predicate rather than a boolean is what removes the `as`
|
|
124
|
-
* casts: `.includes`
|
|
95
|
+
* casts: `.includes` is the runtime proof, so the caller should not have to
|
|
125
96
|
* re-assert it. `ParsedRecord.stringEnum` (src/utils/parse.ts) consumes
|
|
126
97
|
* exactly this shape.
|
|
127
98
|
*
|
|
@@ -141,10 +112,6 @@ export declare const isValidProjectLicense: (value: string) => value is "EUPL-1.
|
|
|
141
112
|
* Valid patch categories.
|
|
142
113
|
*/
|
|
143
114
|
export declare const PATCH_CATEGORIES: readonly ["branding", "ui", "privacy", "security", "infra"];
|
|
144
|
-
/**
|
|
145
|
-
* Validates a patch category string.
|
|
146
|
-
*/
|
|
147
|
-
export declare const isValidPatchCategory: (value: string) => value is "branding" | "ui" | "privacy" | "security" | "infra";
|
|
148
115
|
/**
|
|
149
116
|
* Infers the Firefox product type from a version string.
|
|
150
117
|
* Returns undefined if no clear inference can be made.
|
|
@@ -166,10 +133,6 @@ export declare function describeProductVersionIncompatibility(version: string, p
|
|
|
166
133
|
* Accepts reverse-domain format like "org.example.browser"
|
|
167
134
|
*/
|
|
168
135
|
export declare function isValidAppId(appId: string): boolean;
|
|
169
|
-
/**
|
|
170
|
-
* Checks if a value is defined (not undefined or null).
|
|
171
|
-
*/
|
|
172
|
-
export declare function isDefined<T>(value: T | undefined | null): value is T;
|
|
173
136
|
/**
|
|
174
137
|
* Validates that a string is a legal CSS custom property identifier (the part after `--`).
|
|
175
138
|
*
|
|
@@ -194,7 +157,7 @@ export declare function normalizeTokenName(name: string): string;
|
|
|
194
157
|
* Normalizes a patch display name against its category:
|
|
195
158
|
* strips a trailing `.patch` and any redundant `NNN-<category>-` /
|
|
196
159
|
* `<category>-` prefixes, case-insensitively and repeatedly, mirroring
|
|
197
|
-
* the filename slug pipeline's require-the-category-token rule
|
|
160
|
+
* the filename slug pipeline's require-the-category-token rule. A bare
|
|
198
161
|
* leading number is never stripped, so names like `2-step-verification`
|
|
199
162
|
* survive intact. Falls back to the `.patch`-stripped stem when the
|
|
200
163
|
* strip would empty the name.
|
|
@@ -19,7 +19,7 @@ export function isString(value) {
|
|
|
19
19
|
* @returns True if value is a finite number
|
|
20
20
|
*/
|
|
21
21
|
export function isNumber(value) {
|
|
22
|
-
// Number.isFinite matches the documented contract: NaN
|
|
22
|
+
// Number.isFinite matches the documented contract: NaN and ±Infinity are
|
|
23
23
|
// excluded (a JSON config field of 1e999 parses to Infinity and used to
|
|
24
24
|
// validate as a legal number).
|
|
25
25
|
return typeof value === 'number' && Number.isFinite(value);
|
|
@@ -42,9 +42,9 @@ export function isPositiveInteger(value) {
|
|
|
42
42
|
* orders instead of failing fast.
|
|
43
43
|
*
|
|
44
44
|
* Rejects leading-zero forms ("01"), decimals ("1.5"), whitespace, and
|
|
45
|
-
* non-numeric garbage via a strict regex
|
|
46
|
-
*
|
|
47
|
-
*
|
|
45
|
+
* non-numeric garbage via a strict regex. Only the canonical representation
|
|
46
|
+
* is accepted, so there is no ambiguity between what the user typed and what
|
|
47
|
+
* the value becomes on disk.
|
|
48
48
|
*
|
|
49
49
|
* @param flagName - Flag name to include in the error (e.g. `--order`)
|
|
50
50
|
* @param rawValue - Raw string value from Commander
|
|
@@ -83,13 +83,13 @@ export function isArray(value) {
|
|
|
83
83
|
* Narrows a JSON value to a JSON object node (excludes arrays and `null`).
|
|
84
84
|
*
|
|
85
85
|
* Unlike {@link isObject} this accepts only values already known to be JSON
|
|
86
|
-
* data, so the narrowed `JsonObject` keeps its concrete value contract
|
|
87
|
-
*
|
|
86
|
+
* data, so the narrowed `JsonObject` keeps its concrete value contract.
|
|
87
|
+
* Use it when walking a `JsonValue` tree rather than at `unknown` boundaries.
|
|
88
88
|
* @param value - JSON value to check
|
|
89
89
|
* @returns True if value is a JSON object node
|
|
90
90
|
*/
|
|
91
91
|
export function isJsonObject(value) {
|
|
92
|
-
return
|
|
92
|
+
return isObject(value);
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* Validates a Firefox version string.
|
|
@@ -110,16 +110,16 @@ export function isValidFirefoxCandidate(candidate) {
|
|
|
110
110
|
/**
|
|
111
111
|
* Naming contract for this module's checks.
|
|
112
112
|
*
|
|
113
|
-
* `validate*` is easy to spread across incompatible return contracts
|
|
113
|
+
* `validate*` is easy to spread across incompatible return contracts: some
|
|
114
114
|
* throwing and returning void, some returning an issue list, some a parsed
|
|
115
|
-
* value, some a boolean, some an error
|
|
116
|
-
*
|
|
115
|
+
* value, some a boolean, some an error message. A caller cannot tell which
|
|
116
|
+
* from the name. Passing a throwing `validate*` to a clack `validate`
|
|
117
117
|
* callback, which expects a returned message, kills the prompt instead of
|
|
118
118
|
* re-prompting.
|
|
119
119
|
*
|
|
120
120
|
* The two dominant contracts keep the prefix:
|
|
121
|
-
* - `validate
|
|
122
|
-
* - `is*` / `has
|
|
121
|
+
* - `validate*`: throws on failure, or returns an issue list.
|
|
122
|
+
* - `is*` / `has*`: a type predicate or boolean.
|
|
123
123
|
* The message-returning minority is `describe*Problem`, which reads as what
|
|
124
124
|
* it is: a description of what is wrong, or `undefined`.
|
|
125
125
|
*
|
|
@@ -129,38 +129,38 @@ export function isValidFirefoxCandidate(candidate) {
|
|
|
129
129
|
* Valid Firefox product identifiers.
|
|
130
130
|
*
|
|
131
131
|
* `satisfies readonly FirefoxProduct[]` links the runtime list to the union
|
|
132
|
-
* in
|
|
133
|
-
* declare. It cannot see a union member missing from this list
|
|
134
|
-
* `readonly T[]` check never fails for being short. The reverse direction is
|
|
135
|
-
* covered by the
|
|
136
|
-
*
|
|
132
|
+
* in one direction: it rejects an entry here that the union does not
|
|
133
|
+
* declare. It cannot see a union member missing from this list, because
|
|
134
|
+
* widening a `readonly T[]` check never fails for being short. The reverse direction is
|
|
135
|
+
* covered by the `ExhaustiveFirefoxProductList` operand below, which stops
|
|
136
|
+
* compiling when the union grows past this list.
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
const FIREFOX_PRODUCT_VALUES = [
|
|
139
139
|
'firefox',
|
|
140
140
|
'firefox-esr',
|
|
141
141
|
'firefox-beta',
|
|
142
142
|
'firefox-devedition',
|
|
143
143
|
];
|
|
144
|
+
export const FIREFOX_PRODUCTS = FIREFOX_PRODUCT_VALUES;
|
|
144
145
|
/**
|
|
145
146
|
* Validates a Firefox product string.
|
|
146
147
|
*
|
|
147
|
-
* A type predicate, matching its
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* check IS the runtime proof.
|
|
148
|
+
* A type predicate, matching its sibling {@link isValidProjectLicense}.
|
|
149
|
+
* Returning plain `boolean` would force `as FirefoxProduct` casts at the
|
|
150
|
+
* call sites even though the `.includes` check is the runtime proof.
|
|
151
151
|
*/
|
|
152
152
|
export const isValidFirefoxProduct = makeEnumGuard(FIREFOX_PRODUCTS);
|
|
153
153
|
/**
|
|
154
154
|
* Builds a type predicate from a `readonly` tuple of allowed values.
|
|
155
155
|
*
|
|
156
|
-
* Deriving the type from the list
|
|
157
|
-
* hand-maintaining a matching array
|
|
156
|
+
* Deriving the type from the list, rather than declaring a union and
|
|
157
|
+
* hand-maintaining a matching array, removes a whole class of drift: a
|
|
158
158
|
* union can otherwise accept a stale allowlist with no compile error, and a
|
|
159
159
|
* copy of the member list on the `fireforge.json` read path can silently
|
|
160
160
|
* reject a newly added value.
|
|
161
161
|
*
|
|
162
162
|
* Returning a predicate rather than a boolean is what removes the `as`
|
|
163
|
-
* casts: `.includes`
|
|
163
|
+
* casts: `.includes` is the runtime proof, so the caller should not have to
|
|
164
164
|
* re-assert it. `ParsedRecord.stringEnum` (src/utils/parse.ts) consumes
|
|
165
165
|
* exactly this shape.
|
|
166
166
|
*
|
|
@@ -182,10 +182,6 @@ export const isValidProjectLicense = makeEnumGuard(PROJECT_LICENSES);
|
|
|
182
182
|
* Valid patch categories.
|
|
183
183
|
*/
|
|
184
184
|
export const PATCH_CATEGORIES = ['branding', 'ui', 'privacy', 'security', 'infra'];
|
|
185
|
-
/**
|
|
186
|
-
* Validates a patch category string.
|
|
187
|
-
*/
|
|
188
|
-
export const isValidPatchCategory = makeEnumGuard(PATCH_CATEGORIES);
|
|
189
185
|
/**
|
|
190
186
|
* Checks whether a Firefox version string has an ESR suffix.
|
|
191
187
|
*/
|
|
@@ -257,12 +253,6 @@ export function describeProductVersionIncompatibility(version, product) {
|
|
|
257
253
|
export function isValidAppId(appId) {
|
|
258
254
|
return /^[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)+$/.test(appId);
|
|
259
255
|
}
|
|
260
|
-
/**
|
|
261
|
-
* Checks if a value is defined (not undefined or null).
|
|
262
|
-
*/
|
|
263
|
-
export function isDefined(value) {
|
|
264
|
-
return value !== undefined && value !== null;
|
|
265
|
-
}
|
|
266
256
|
/**
|
|
267
257
|
* Validates that a string is a legal CSS custom property identifier (the part after `--`).
|
|
268
258
|
*
|
|
@@ -320,7 +310,7 @@ export function normalizeTokenName(name) {
|
|
|
320
310
|
* Normalizes a patch display name against its category:
|
|
321
311
|
* strips a trailing `.patch` and any redundant `NNN-<category>-` /
|
|
322
312
|
* `<category>-` prefixes, case-insensitively and repeatedly, mirroring
|
|
323
|
-
* the filename slug pipeline's require-the-category-token rule
|
|
313
|
+
* the filename slug pipeline's require-the-category-token rule. A bare
|
|
324
314
|
* leading number is never stripped, so names like `2-step-verification`
|
|
325
315
|
* survive intact. Falls back to the `.patch`-stripped stem when the
|
|
326
316
|
* strip would empty the name.
|
package/docs/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
[`../README.md`](../README.md) is the getting-started page. These files are
|
|
6
6
|
the reference material behind it. `fireforge --help` (and
|
|
7
|
-
`fireforge <command> --help`)
|
|
8
|
-
|
|
7
|
+
`fireforge <command> --help`) is always the authority on flags. These docs
|
|
8
|
+
cover the things a flag list cannot say.
|
|
9
9
|
|
|
10
10
|
## Using FireForge
|
|
11
11
|
|