@hominis/fireforge 0.54.0 → 0.60.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 +287 -6
- package/README.md +51 -17
- package/dist/bin/fireforge.js +34 -129
- package/dist/build-info.json +4 -4
- package/dist/src/check/check.js +394 -0
- package/dist/src/check/gate.js +448 -0
- package/dist/src/check/index.js +10 -0
- package/dist/src/check/record.js +155 -0
- package/dist/src/cli/command.js +286 -0
- package/dist/src/cli/output.js +96 -0
- package/dist/src/cli/program.js +231 -0
- package/dist/src/cli/stdio.js +59 -0
- package/dist/src/cli/version.js +99 -0
- package/dist/src/commands/bootstrap.js +17 -102
- package/dist/src/commands/build.js +34 -438
- package/dist/src/commands/check.js +44 -157
- package/dist/src/commands/config.js +50 -226
- package/dist/src/commands/discard.js +38 -215
- package/dist/src/commands/doctor.js +29 -456
- package/dist/src/commands/download.js +35 -499
- package/dist/src/commands/export.js +42 -431
- package/dist/src/commands/furnace.js +220 -0
- package/dist/src/commands/gate.js +127 -0
- package/dist/src/commands/import.js +44 -445
- package/dist/src/commands/index.js +86 -0
- package/dist/src/commands/lint.js +44 -546
- package/dist/src/commands/merge-driver.js +56 -0
- package/dist/src/commands/migrate.js +75 -0
- package/dist/src/commands/override.js +43 -0
- package/dist/src/commands/package.js +48 -77
- package/dist/src/commands/patch.js +221 -0
- package/dist/src/commands/re-export.js +55 -332
- package/dist/src/commands/rebase.js +69 -0
- package/dist/src/commands/register.js +62 -103
- package/dist/src/commands/reset.js +28 -91
- package/dist/src/commands/resolve.js +20 -167
- package/dist/src/commands/restore.js +19 -0
- package/dist/src/commands/run.js +60 -420
- package/dist/src/commands/setup.js +78 -90
- package/dist/src/commands/status.js +44 -413
- package/dist/src/commands/test.js +97 -422
- package/dist/src/commands/token.js +185 -228
- package/dist/src/commands/typecheck.js +59 -208
- package/dist/src/commands/verify.js +28 -334
- package/dist/src/commands/version.js +14 -0
- package/dist/src/commands/watch.js +20 -218
- package/dist/src/commands/wire.js +60 -349
- package/dist/src/commands/workspace.js +117 -0
- package/dist/src/config/edit.js +237 -0
- package/dist/src/config/index.js +15 -0
- package/dist/src/config/load.js +59 -0
- package/dist/src/config/previous.js +404 -0
- package/dist/src/config/schema/build.js +63 -0
- package/dist/src/config/schema/check.js +113 -0
- package/dist/src/config/schema/common.js +71 -0
- package/dist/src/config/schema/export-queue.js +36 -0
- package/dist/src/config/schema/firefox.js +69 -0
- package/dist/src/config/schema/gate.js +199 -0
- package/dist/src/config/schema/identity.js +55 -0
- package/dist/src/config/schema/index.js +45 -0
- package/dist/src/config/schema/lint.js +297 -0
- package/dist/src/config/schema/policy.js +111 -0
- package/dist/src/config/schema/source.js +90 -0
- package/dist/src/config/schema/test.js +17 -0
- package/dist/src/config/schema/toolchains.js +17 -0
- package/dist/src/config/schema/typecheck.js +29 -0
- package/dist/src/config/schema/wire.js +15 -0
- package/dist/src/diff/apply.js +129 -0
- package/dist/src/diff/index.js +16 -0
- package/dist/src/diff/model.js +267 -0
- package/dist/src/diff/query.js +65 -0
- package/dist/src/doctor/index.js +240 -0
- package/dist/src/engine/archive.js +396 -0
- package/dist/src/engine/audit.js +66 -0
- package/dist/src/engine/build.js +150 -0
- package/dist/src/engine/hostLocks.js +66 -0
- package/dist/src/engine/index.js +26 -0
- package/dist/src/engine/installManifests.js +147 -0
- package/dist/src/engine/mach.js +97 -0
- package/dist/src/engine/machHints.js +80 -0
- package/dist/src/engine/mozconfig.js +110 -0
- package/dist/src/engine/objdir.js +124 -0
- package/dist/src/engine/package.js +169 -0
- package/dist/src/engine/pin.js +12 -0
- package/dist/src/engine/pool.js +423 -0
- package/dist/src/engine/pristine.js +281 -0
- package/dist/src/engine/python.js +68 -0
- package/dist/src/engine/resourceGuard.js +582 -0
- package/dist/src/engine/run.js +259 -0
- package/dist/src/engine/smoke.js +204 -0
- package/dist/src/engine/staleness.js +229 -0
- package/dist/src/engine/watch.js +82 -0
- package/dist/src/engine/workspace.js +85 -0
- package/dist/src/furnace/config.js +360 -0
- package/dist/src/furnace/deploy.js +414 -0
- package/dist/src/furnace/diff.js +59 -0
- package/dist/src/furnace/edit.js +64 -0
- package/dist/src/furnace/fragments.js +53 -0
- package/dist/src/furnace/index.js +19 -0
- package/dist/src/furnace/operations.js +283 -0
- package/dist/src/furnace/registration.js +220 -0
- package/dist/src/furnace/scaffold.js +311 -0
- package/dist/src/furnace/typing.js +252 -0
- package/dist/src/furnace/validate.js +662 -0
- package/dist/src/git/apply.js +129 -0
- package/dist/src/git/diff.js +143 -0
- package/dist/src/git/index.js +33 -0
- package/dist/src/git/objects.js +201 -0
- package/dist/src/git/refs.js +85 -0
- package/dist/src/git/repo.js +222 -0
- package/dist/src/git/run.js +242 -0
- package/dist/src/git/status.js +156 -0
- package/dist/src/kernel/errors.js +123 -0
- package/dist/src/kernel/fs.js +515 -0
- package/dist/src/kernel/glob.js +63 -0
- package/dist/src/kernel/hash.js +28 -0
- package/dist/src/kernel/journal.js +524 -0
- package/dist/src/kernel/json-edit.js +198 -0
- package/dist/src/kernel/json.js +101 -0
- package/dist/src/kernel/lock.js +589 -0
- package/dist/src/kernel/log.js +154 -0
- package/dist/src/kernel/process/identity.js +313 -0
- package/dist/src/kernel/process/index.js +8 -0
- package/dist/src/kernel/process/listing.js +128 -0
- package/dist/src/kernel/process/spawn.js +430 -0
- package/dist/src/kernel/process/tree.js +301 -0
- package/dist/src/kernel/schema.js +308 -0
- package/dist/src/kernel/signals.js +171 -0
- package/dist/src/kernel/text.js +151 -0
- package/dist/src/kernel/time.js +83 -0
- package/dist/src/kernel/tty.js +84 -0
- package/dist/src/lint/cache.js +77 -0
- package/dist/src/lint/checkjs.js +400 -0
- package/dist/src/lint/index.js +3 -0
- package/dist/src/lint/input.js +100 -0
- package/dist/src/lint/report.js +107 -0
- package/dist/src/lint/rule.js +41 -0
- package/dist/src/lint/rules/css.js +308 -0
- package/dist/src/lint/rules/javascript.js +299 -0
- package/dist/src/lint/rules/jsdoc.js +249 -0
- package/dist/src/lint/rules/license.js +93 -0
- package/dist/src/lint/rules/policy.js +201 -0
- package/dist/src/lint/rules/registration.js +264 -0
- package/dist/src/lint/rules/size.js +299 -0
- package/dist/src/lint/run.js +126 -0
- package/dist/src/lint/shim.js +323 -0
- package/dist/src/lint/typescript.js +186 -0
- package/dist/src/lint/waivers.js +93 -0
- package/dist/src/mode/changes.js +264 -0
- package/dist/src/mode/diagnose.js +173 -0
- package/dist/src/mode/export.js +147 -0
- package/dist/src/mode/index.js +23 -0
- package/dist/src/mode/migrate.js +181 -0
- package/dist/src/mode/previousWaivers.js +206 -0
- package/dist/src/mode/pristine.js +61 -0
- package/dist/src/mode/rebase.js +197 -0
- package/dist/src/mode/report.js +157 -0
- package/dist/src/mode/setup.js +103 -0
- package/dist/src/mode/tracked.js +116 -0
- package/dist/src/mode/upgrade.js +281 -0
- package/dist/src/mode/watch.js +83 -0
- package/dist/src/mode/workspace.js +189 -0
- package/dist/src/mozbuild/index.js +6 -0
- package/dist/src/mozbuild/jar.js +366 -0
- package/dist/src/mozbuild/mozbuild.js +321 -0
- package/dist/src/mozbuild/paths.js +96 -0
- package/dist/src/mozbuild/references.js +39 -0
- package/dist/src/mozbuild/testManifest.js +343 -0
- package/dist/src/mozbuild/text.js +142 -0
- package/dist/src/project/changes.js +145 -0
- package/dist/src/project/checkout.js +66 -0
- package/dist/src/project/index.js +11 -0
- package/dist/src/project/license.js +119 -0
- package/dist/src/project/project.js +111 -0
- package/dist/src/project/state.js +85 -0
- package/dist/src/project/tracked.js +1 -0
- package/dist/src/queue/apply.js +270 -0
- package/dist/src/queue/attribute.js +159 -0
- package/dist/src/queue/baseline.js +409 -0
- package/dist/src/queue/capture.js +298 -0
- package/dist/src/queue/changes.js +234 -0
- package/dist/src/queue/index.js +50 -0
- package/dist/src/queue/manifest.js +341 -0
- package/dist/src/queue/operations.js +454 -0
- package/dist/src/queue/placement.js +220 -0
- package/dist/src/queue/queue.js +359 -0
- package/dist/src/queue/restore.js +103 -0
- package/dist/src/queue/session.js +685 -0
- package/dist/src/queue/status.js +137 -0
- package/dist/src/register/files.js +39 -0
- package/dist/src/register/index.js +8 -0
- package/dist/src/register/js.js +217 -0
- package/dist/src/register/register.js +359 -0
- package/dist/src/register/wire.js +146 -0
- package/dist/src/source/adopt.js +99 -0
- package/dist/src/source/changes.js +132 -0
- package/dist/src/source/edit.js +278 -0
- package/dist/src/source/export.js +70 -0
- package/dist/src/source/groups.js +131 -0
- package/dist/src/source/index.js +20 -0
- package/dist/src/source/materialize.js +382 -0
- package/dist/src/source/merge.js +255 -0
- package/dist/src/source/objects.js +102 -0
- package/dist/src/source/previous.js +166 -0
- package/dist/src/source/records.js +138 -0
- package/dist/src/source/refresh.js +264 -0
- package/dist/src/source/tree.js +337 -0
- package/dist/src/syntax/css.js +215 -0
- package/dist/src/syntax/fragments.js +63 -0
- package/dist/src/syntax/index.js +10 -0
- package/dist/src/syntax/js.js +270 -0
- package/dist/src/test/classify.js +826 -0
- package/dist/src/test/control.js +236 -0
- package/dist/src/test/host.js +266 -0
- package/dist/src/test/index.js +11 -0
- package/dist/src/test/plan.js +347 -0
- package/dist/src/test/rawLog.js +138 -0
- package/dist/src/test/run.js +404 -0
- package/dist/src/test/verdict.js +420 -0
- package/dist/src/test/xpcshell.js +143 -0
- package/dist/src/tokens/add.js +304 -0
- package/dist/src/tokens/coverage.js +65 -0
- package/dist/src/tokens/css.js +58 -0
- package/dist/src/tokens/index.js +12 -0
- package/dist/src/tokens/lint.js +96 -0
- package/dist/src/tokens/model.js +118 -0
- package/dist/src/tokens/settings.js +87 -0
- package/dist/src/tokens/siblings.js +104 -0
- package/dist/src/typecheck/explain.js +123 -0
- package/dist/src/typecheck/index.js +8 -0
- package/dist/src/typecheck/typecheck.js +332 -0
- package/docs/README.md +23 -28
- package/docs/authoring.md +97 -0
- package/docs/configuration.md +307 -692
- package/docs/exit-codes.md +76 -94
- package/docs/furnace.md +113 -181
- package/docs/gate.md +205 -0
- package/docs/getting-started.md +165 -0
- package/docs/machine-output.md +201 -277
- package/docs/migrating.md +261 -0
- package/docs/patch-workflow.md +163 -653
- package/docs/quality.md +220 -0
- package/docs/source-workflow.md +228 -0
- package/docs/testing.md +101 -712
- package/docs/workspaces.md +187 -0
- package/package.json +22 -30
- package/templates/configs/common.mozconfig +8 -2
- package/templates/configs/darwin.mozconfig +6 -7
- package/templates/configs/linux.mozconfig +5 -8
- package/templates/configs/win32.mozconfig +3 -9
- package/dist/bin/fireforge.d.ts +0 -9
- package/dist/src/cli-usage-error.d.ts +0 -46
- package/dist/src/cli-usage-error.js +0 -81
- package/dist/src/cli.d.ts +0 -41
- package/dist/src/cli.js +0 -380
- package/dist/src/commands/bootstrap-checks.d.ts +0 -16
- package/dist/src/commands/bootstrap-checks.js +0 -66
- package/dist/src/commands/bootstrap.d.ts +0 -10
- package/dist/src/commands/build-prelock.d.ts +0 -20
- package/dist/src/commands/build-prelock.js +0 -50
- package/dist/src/commands/build.d.ts +0 -13
- package/dist/src/commands/check-report.d.ts +0 -41
- package/dist/src/commands/check-report.js +0 -91
- package/dist/src/commands/check-run.d.ts +0 -33
- package/dist/src/commands/check-run.js +0 -112
- package/dist/src/commands/check-steps.d.ts +0 -75
- package/dist/src/commands/check-steps.js +0 -200
- package/dist/src/commands/check.d.ts +0 -32
- package/dist/src/commands/config.d.ts +0 -13
- package/dist/src/commands/declarations-report.d.ts +0 -49
- package/dist/src/commands/declarations-report.js +0 -83
- package/dist/src/commands/destructive-decision.d.ts +0 -19
- package/dist/src/commands/destructive-decision.js +0 -31
- package/dist/src/commands/discard.d.ts +0 -12
- package/dist/src/commands/doctor-check-core.d.ts +0 -110
- package/dist/src/commands/doctor-check-core.js +0 -24
- package/dist/src/commands/doctor-engine-eslint.d.ts +0 -3
- package/dist/src/commands/doctor-engine-eslint.js +0 -17
- package/dist/src/commands/doctor-external-toolchains.d.ts +0 -3
- package/dist/src/commands/doctor-external-toolchains.js +0 -56
- package/dist/src/commands/doctor-furnace-config-sync.d.ts +0 -18
- package/dist/src/commands/doctor-furnace-config-sync.js +0 -295
- package/dist/src/commands/doctor-furnace-jar.d.ts +0 -14
- package/dist/src/commands/doctor-furnace-jar.js +0 -44
- package/dist/src/commands/doctor-furnace.d.ts +0 -8
- package/dist/src/commands/doctor-furnace.js +0 -514
- package/dist/src/commands/doctor-macos-sdk.d.ts +0 -8
- package/dist/src/commands/doctor-macos-sdk.js +0 -158
- package/dist/src/commands/doctor-orphaned-harness.d.ts +0 -41
- package/dist/src/commands/doctor-orphaned-harness.js +0 -98
- package/dist/src/commands/doctor-patch-manifest.d.ts +0 -9
- package/dist/src/commands/doctor-patch-manifest.js +0 -156
- package/dist/src/commands/doctor-post-rebase-audit.d.ts +0 -2
- package/dist/src/commands/doctor-post-rebase-audit.js +0 -108
- package/dist/src/commands/doctor-source-pin.d.ts +0 -29
- package/dist/src/commands/doctor-source-pin.js +0 -91
- package/dist/src/commands/doctor-working-tree.d.ts +0 -27
- package/dist/src/commands/doctor-working-tree.js +0 -89
- package/dist/src/commands/doctor.d.ts +0 -49
- package/dist/src/commands/download.d.ts +0 -11
- package/dist/src/commands/export-adopt-check.d.ts +0 -37
- package/dist/src/commands/export-adopt-check.js +0 -97
- package/dist/src/commands/export-all.d.ts +0 -11
- package/dist/src/commands/export-all.js +0 -361
- package/dist/src/commands/export-flow.d.ts +0 -124
- package/dist/src/commands/export-flow.js +0 -423
- package/dist/src/commands/export-placement-conflicts.d.ts +0 -17
- package/dist/src/commands/export-placement-conflicts.js +0 -75
- package/dist/src/commands/export-placement-gate.d.ts +0 -42
- package/dist/src/commands/export-placement-gate.js +0 -107
- package/dist/src/commands/export-placement-policy.d.ts +0 -22
- package/dist/src/commands/export-placement-policy.js +0 -54
- package/dist/src/commands/export-shared.d.ts +0 -152
- package/dist/src/commands/export-shared.js +0 -396
- package/dist/src/commands/export-staged-registration.d.ts +0 -46
- package/dist/src/commands/export-staged-registration.js +0 -91
- package/dist/src/commands/export.d.ts +0 -13
- package/dist/src/commands/forward-import-remedy.d.ts +0 -31
- package/dist/src/commands/forward-import-remedy.js +0 -62
- package/dist/src/commands/furnace/apply.d.ts +0 -8
- package/dist/src/commands/furnace/apply.js +0 -327
- package/dist/src/commands/furnace/authoring-config.d.ts +0 -13
- package/dist/src/commands/furnace/authoring-config.js +0 -19
- package/dist/src/commands/furnace/chrome-doc-remove.d.ts +0 -14
- package/dist/src/commands/furnace/chrome-doc-remove.js +0 -148
- package/dist/src/commands/furnace/chrome-doc-templates.d.ts +0 -152
- package/dist/src/commands/furnace/chrome-doc-templates.js +0 -331
- package/dist/src/commands/furnace/chrome-doc-tests.d.ts +0 -23
- package/dist/src/commands/furnace/chrome-doc-tests.js +0 -148
- package/dist/src/commands/furnace/chrome-doc.d.ts +0 -87
- package/dist/src/commands/furnace/chrome-doc.js +0 -365
- package/dist/src/commands/furnace/create-browser-test.d.ts +0 -44
- package/dist/src/commands/furnace/create-browser-test.js +0 -179
- package/dist/src/commands/furnace/create-dry-run.d.ts +0 -49
- package/dist/src/commands/furnace/create-dry-run.js +0 -107
- package/dist/src/commands/furnace/create-features.d.ts +0 -24
- package/dist/src/commands/furnace/create-features.js +0 -55
- package/dist/src/commands/furnace/create-mochikit.d.ts +0 -29
- package/dist/src/commands/furnace/create-mochikit.js +0 -75
- package/dist/src/commands/furnace/create-readback.d.ts +0 -22
- package/dist/src/commands/furnace/create-readback.js +0 -32
- package/dist/src/commands/furnace/create-templates.d.ts +0 -119
- package/dist/src/commands/furnace/create-templates.js +0 -283
- package/dist/src/commands/furnace/create-validation.d.ts +0 -6
- package/dist/src/commands/furnace/create-validation.js +0 -59
- package/dist/src/commands/furnace/create-xpcshell.d.ts +0 -27
- package/dist/src/commands/furnace/create-xpcshell.js +0 -80
- package/dist/src/commands/furnace/create.d.ts +0 -24
- package/dist/src/commands/furnace/create.js +0 -407
- package/dist/src/commands/furnace/deploy-fragment-includers.d.ts +0 -59
- package/dist/src/commands/furnace/deploy-fragment-includers.js +0 -120
- package/dist/src/commands/furnace/deploy-named.d.ts +0 -48
- package/dist/src/commands/furnace/deploy-named.js +0 -107
- package/dist/src/commands/furnace/deploy.d.ts +0 -9
- package/dist/src/commands/furnace/deploy.js +0 -218
- package/dist/src/commands/furnace/diff.d.ts +0 -11
- package/dist/src/commands/furnace/diff.js +0 -238
- package/dist/src/commands/furnace/index.d.ts +0 -4
- package/dist/src/commands/furnace/index.js +0 -282
- package/dist/src/commands/furnace/init.d.ts +0 -11
- package/dist/src/commands/furnace/init.js +0 -287
- package/dist/src/commands/furnace/list.d.ts +0 -8
- package/dist/src/commands/furnace/list.js +0 -104
- package/dist/src/commands/furnace/override.d.ts +0 -16
- package/dist/src/commands/furnace/override.js +0 -454
- package/dist/src/commands/furnace/preview.d.ts +0 -19
- package/dist/src/commands/furnace/preview.js +0 -349
- package/dist/src/commands/furnace/refresh.d.ts +0 -10
- package/dist/src/commands/furnace/refresh.js +0 -303
- package/dist/src/commands/furnace/remove-mutations.d.ts +0 -36
- package/dist/src/commands/furnace/remove-mutations.js +0 -168
- package/dist/src/commands/furnace/remove-state.d.ts +0 -20
- package/dist/src/commands/furnace/remove-state.js +0 -60
- package/dist/src/commands/furnace/remove.d.ts +0 -8
- package/dist/src/commands/furnace/remove.js +0 -415
- package/dist/src/commands/furnace/rename-browser-test.d.ts +0 -2
- package/dist/src/commands/furnace/rename-browser-test.js +0 -68
- package/dist/src/commands/furnace/rename-dry-run.d.ts +0 -29
- package/dist/src/commands/furnace/rename-dry-run.js +0 -127
- package/dist/src/commands/furnace/rename-helpers.d.ts +0 -26
- package/dist/src/commands/furnace/rename-helpers.js +0 -85
- package/dist/src/commands/furnace/rename-registrations.d.ts +0 -41
- package/dist/src/commands/furnace/rename-registrations.js +0 -98
- package/dist/src/commands/furnace/rename-xpcshell.d.ts +0 -32
- package/dist/src/commands/furnace/rename-xpcshell.js +0 -95
- package/dist/src/commands/furnace/rename.d.ts +0 -6
- package/dist/src/commands/furnace/rename.js +0 -400
- package/dist/src/commands/furnace/scan.d.ts +0 -14
- package/dist/src/commands/furnace/scan.js +0 -192
- package/dist/src/commands/furnace/status.d.ts +0 -7
- package/dist/src/commands/furnace/status.js +0 -209
- package/dist/src/commands/furnace/sync.d.ts +0 -12
- package/dist/src/commands/furnace/sync.js +0 -145
- package/dist/src/commands/furnace/test-file-name.d.ts +0 -28
- package/dist/src/commands/furnace/test-file-name.js +0 -39
- package/dist/src/commands/furnace/validate-report.d.ts +0 -45
- package/dist/src/commands/furnace/validate-report.js +0 -91
- package/dist/src/commands/furnace/validate.d.ts +0 -8
- package/dist/src/commands/furnace/validate.js +0 -309
- package/dist/src/commands/furnace/validation-output.d.ts +0 -47
- package/dist/src/commands/furnace/validation-output.js +0 -161
- package/dist/src/commands/import.d.ts +0 -11
- package/dist/src/commands/lint-per-patch.d.ts +0 -10
- package/dist/src/commands/lint-per-patch.js +0 -428
- package/dist/src/commands/lint-per-run-checkjs.d.ts +0 -66
- package/dist/src/commands/lint-per-run-checkjs.js +0 -102
- package/dist/src/commands/lint-report.d.ts +0 -25
- package/dist/src/commands/lint-report.js +0 -76
- package/dist/src/commands/lint.d.ts +0 -47
- package/dist/src/commands/manifest.d.ts +0 -38
- package/dist/src/commands/manifest.js +0 -68
- package/dist/src/commands/package.d.ts +0 -11
- package/dist/src/commands/park.d.ts +0 -22
- package/dist/src/commands/park.js +0 -232
- package/dist/src/commands/patch/compact.d.ts +0 -28
- package/dist/src/commands/patch/compact.js +0 -208
- package/dist/src/commands/patch/delete-gap-notice.d.ts +0 -24
- package/dist/src/commands/patch/delete-gap-notice.js +0 -48
- package/dist/src/commands/patch/delete.d.ts +0 -28
- package/dist/src/commands/patch/delete.js +0 -131
- package/dist/src/commands/patch/entry-projection.d.ts +0 -13
- package/dist/src/commands/patch/entry-projection.js +0 -24
- package/dist/src/commands/patch/index.d.ts +0 -16
- package/dist/src/commands/patch/index.js +0 -52
- package/dist/src/commands/patch/lint-ignore-from.d.ts +0 -43
- package/dist/src/commands/patch/lint-ignore-from.js +0 -141
- package/dist/src/commands/patch/lint-ignore.d.ts +0 -42
- package/dist/src/commands/patch/lint-ignore.js +0 -261
- package/dist/src/commands/patch/move-files-adopt.d.ts +0 -33
- package/dist/src/commands/patch/move-files-adopt.js +0 -65
- package/dist/src/commands/patch/move-files-create.d.ts +0 -19
- package/dist/src/commands/patch/move-files-create.js +0 -187
- package/dist/src/commands/patch/move-files-into.d.ts +0 -65
- package/dist/src/commands/patch/move-files-into.js +0 -325
- package/dist/src/commands/patch/move-files-retire.d.ts +0 -39
- package/dist/src/commands/patch/move-files-retire.js +0 -91
- package/dist/src/commands/patch/move-files.d.ts +0 -28
- package/dist/src/commands/patch/move-files.js +0 -224
- package/dist/src/commands/patch/move-size-tier.d.ts +0 -27
- package/dist/src/commands/patch/move-size-tier.js +0 -66
- package/dist/src/commands/patch/patch-context.d.ts +0 -40
- package/dist/src/commands/patch/patch-context.js +0 -51
- package/dist/src/commands/patch/removal-created-files.d.ts +0 -48
- package/dist/src/commands/patch/removal-created-files.js +0 -83
- package/dist/src/commands/patch/removal-dependents.d.ts +0 -63
- package/dist/src/commands/patch/removal-dependents.js +0 -133
- package/dist/src/commands/patch/rename.d.ts +0 -35
- package/dist/src/commands/patch/rename.js +0 -378
- package/dist/src/commands/patch/reorder-projection.d.ts +0 -17
- package/dist/src/commands/patch/reorder-projection.js +0 -49
- package/dist/src/commands/patch/reorder-shift.d.ts +0 -30
- package/dist/src/commands/patch/reorder-shift.js +0 -307
- package/dist/src/commands/patch/reorder.d.ts +0 -34
- package/dist/src/commands/patch/reorder.js +0 -375
- package/dist/src/commands/patch/reserve.d.ts +0 -33
- package/dist/src/commands/patch/reserve.js +0 -152
- package/dist/src/commands/patch/retire.d.ts +0 -34
- package/dist/src/commands/patch/retire.js +0 -133
- package/dist/src/commands/patch/split-plan.d.ts +0 -125
- package/dist/src/commands/patch/split-plan.js +0 -313
- package/dist/src/commands/patch/split-staged.d.ts +0 -108
- package/dist/src/commands/patch/split-staged.js +0 -202
- package/dist/src/commands/patch/split.d.ts +0 -43
- package/dist/src/commands/patch/split.js +0 -367
- package/dist/src/commands/patch/stage.d.ts +0 -34
- package/dist/src/commands/patch/stage.js +0 -153
- package/dist/src/commands/patch/staged-dependency-batch.d.ts +0 -48
- package/dist/src/commands/patch/staged-dependency-batch.js +0 -176
- package/dist/src/commands/patch/staged-dependency-entries.d.ts +0 -44
- package/dist/src/commands/patch/staged-dependency-entries.js +0 -80
- package/dist/src/commands/patch/staged-dependency-from.d.ts +0 -14
- package/dist/src/commands/patch/staged-dependency-from.js +0 -114
- package/dist/src/commands/patch/staged-dependency-remove.d.ts +0 -53
- package/dist/src/commands/patch/staged-dependency-remove.js +0 -117
- package/dist/src/commands/patch/staged-dependency-validate.d.ts +0 -15
- package/dist/src/commands/patch/staged-dependency-validate.js +0 -49
- package/dist/src/commands/patch/staged-dependency.d.ts +0 -22
- package/dist/src/commands/patch/staged-dependency.js +0 -248
- package/dist/src/commands/patch/tier.d.ts +0 -34
- package/dist/src/commands/patch/tier.js +0 -125
- package/dist/src/commands/patch-rename-map.d.ts +0 -30
- package/dist/src/commands/patch-rename-map.js +0 -54
- package/dist/src/commands/pending-resolution.d.ts +0 -15
- package/dist/src/commands/pending-resolution.js +0 -25
- package/dist/src/commands/re-export-adjacent-registrations.d.ts +0 -20
- package/dist/src/commands/re-export-adjacent-registrations.js +0 -75
- package/dist/src/commands/re-export-adjacent.d.ts +0 -111
- package/dist/src/commands/re-export-adjacent.js +0 -267
- package/dist/src/commands/re-export-bulk-scan.d.ts +0 -19
- package/dist/src/commands/re-export-bulk-scan.js +0 -233
- package/dist/src/commands/re-export-drift.d.ts +0 -110
- package/dist/src/commands/re-export-drift.js +0 -358
- package/dist/src/commands/re-export-files.d.ts +0 -15
- package/dist/src/commands/re-export-files.js +0 -307
- package/dist/src/commands/re-export-hunks.d.ts +0 -35
- package/dist/src/commands/re-export-hunks.js +0 -220
- package/dist/src/commands/re-export-lint.d.ts +0 -137
- package/dist/src/commands/re-export-lint.js +0 -303
- package/dist/src/commands/re-export-options.d.ts +0 -29
- package/dist/src/commands/re-export-options.js +0 -191
- package/dist/src/commands/re-export-preflight.d.ts +0 -23
- package/dist/src/commands/re-export-preflight.js +0 -159
- package/dist/src/commands/re-export-purity-scope.d.ts +0 -18
- package/dist/src/commands/re-export-purity-scope.js +0 -137
- package/dist/src/commands/re-export-register.d.ts +0 -12
- package/dist/src/commands/re-export-register.js +0 -99
- package/dist/src/commands/re-export-removed.d.ts +0 -15
- package/dist/src/commands/re-export-removed.js +0 -94
- package/dist/src/commands/re-export-retired-declarations.d.ts +0 -22
- package/dist/src/commands/re-export-retired-declarations.js +0 -113
- package/dist/src/commands/re-export-scan-owner.d.ts +0 -44
- package/dist/src/commands/re-export-scan-owner.js +0 -116
- package/dist/src/commands/re-export-scan.d.ts +0 -72
- package/dist/src/commands/re-export-scan.js +0 -265
- package/dist/src/commands/re-export-single.d.ts +0 -39
- package/dist/src/commands/re-export-single.js +0 -388
- package/dist/src/commands/re-export-stale-registrations.d.ts +0 -39
- package/dist/src/commands/re-export-stale-registrations.js +0 -106
- package/dist/src/commands/re-export-summary.d.ts +0 -28
- package/dist/src/commands/re-export-summary.js +0 -36
- package/dist/src/commands/re-export.d.ts +0 -8
- package/dist/src/commands/rebase/abort.d.ts +0 -7
- package/dist/src/commands/rebase/abort.js +0 -67
- package/dist/src/commands/rebase/confirm.d.ts +0 -42
- package/dist/src/commands/rebase/confirm.js +0 -36
- package/dist/src/commands/rebase/conflict-summary.d.ts +0 -12
- package/dist/src/commands/rebase/conflict-summary.js +0 -37
- package/dist/src/commands/rebase/continue.d.ts +0 -7
- package/dist/src/commands/rebase/continue.js +0 -119
- package/dist/src/commands/rebase/index.d.ts +0 -22
- package/dist/src/commands/rebase/index.js +0 -209
- package/dist/src/commands/rebase/patch-loop.d.ts +0 -15
- package/dist/src/commands/rebase/patch-loop.js +0 -289
- package/dist/src/commands/rebase/summary.d.ts +0 -8
- package/dist/src/commands/rebase/summary.js +0 -47
- package/dist/src/commands/register.d.ts +0 -13
- package/dist/src/commands/reset.d.ts +0 -11
- package/dist/src/commands/resolve.d.ts +0 -36
- package/dist/src/commands/run.d.ts +0 -10
- package/dist/src/commands/setup-support.d.ts +0 -35
- package/dist/src/commands/setup-support.js +0 -386
- package/dist/src/commands/setup.d.ts +0 -11
- package/dist/src/commands/source.d.ts +0 -9
- package/dist/src/commands/source.js +0 -120
- package/dist/src/commands/status-check.d.ts +0 -87
- package/dist/src/commands/status-check.js +0 -161
- package/dist/src/commands/status-json.d.ts +0 -45
- package/dist/src/commands/status-json.js +0 -97
- package/dist/src/commands/status-output.d.ts +0 -23
- package/dist/src/commands/status-output.js +0 -231
- package/dist/src/commands/status-ownership.d.ts +0 -54
- package/dist/src/commands/status-ownership.js +0 -59
- package/dist/src/commands/status-scope.d.ts +0 -37
- package/dist/src/commands/status-scope.js +0 -54
- package/dist/src/commands/status.d.ts +0 -11
- package/dist/src/commands/test-appdir.d.ts +0 -6
- package/dist/src/commands/test-appdir.js +0 -29
- package/dist/src/commands/test-browser-preflight.d.ts +0 -28
- package/dist/src/commands/test-browser-preflight.js +0 -197
- package/dist/src/commands/test-build-furnace.d.ts +0 -21
- package/dist/src/commands/test-build-furnace.js +0 -53
- package/dist/src/commands/test-build-phase.d.ts +0 -29
- package/dist/src/commands/test-build-phase.js +0 -290
- package/dist/src/commands/test-checkjs.d.ts +0 -3
- package/dist/src/commands/test-checkjs.js +0 -35
- package/dist/src/commands/test-control-restore.d.ts +0 -40
- package/dist/src/commands/test-control-restore.js +0 -86
- package/dist/src/commands/test-diagnose.d.ts +0 -23
- package/dist/src/commands/test-diagnose.js +0 -317
- package/dist/src/commands/test-dispatch.d.ts +0 -39
- package/dist/src/commands/test-dispatch.js +0 -281
- package/dist/src/commands/test-furnace-reach.d.ts +0 -37
- package/dist/src/commands/test-furnace-reach.js +0 -132
- package/dist/src/commands/test-harness-env.d.ts +0 -23
- package/dist/src/commands/test-harness-env.js +0 -81
- package/dist/src/commands/test-harness-teardown.d.ts +0 -62
- package/dist/src/commands/test-harness-teardown.js +0 -128
- package/dist/src/commands/test-modes.d.ts +0 -57
- package/dist/src/commands/test-modes.js +0 -158
- package/dist/src/commands/test-multi-verdict.d.ts +0 -61
- package/dist/src/commands/test-multi-verdict.js +0 -112
- package/dist/src/commands/test-orchestrate.d.ts +0 -63
- package/dist/src/commands/test-orchestrate.js +0 -274
- package/dist/src/commands/test-perf-scope.d.ts +0 -50
- package/dist/src/commands/test-perf-scope.js +0 -138
- package/dist/src/commands/test-prelock.d.ts +0 -61
- package/dist/src/commands/test-prelock.js +0 -301
- package/dist/src/commands/test-register.d.ts +0 -4
- package/dist/src/commands/test-register.js +0 -181
- package/dist/src/commands/test-results.d.ts +0 -71
- package/dist/src/commands/test-results.js +0 -79
- package/dist/src/commands/test-run.d.ts +0 -89
- package/dist/src/commands/test-run.js +0 -251
- package/dist/src/commands/test-shards.d.ts +0 -114
- package/dist/src/commands/test-shards.js +0 -272
- package/dist/src/commands/test-stale-gate.d.ts +0 -52
- package/dist/src/commands/test-stale-gate.js +0 -165
- package/dist/src/commands/test-verdict.d.ts +0 -92
- package/dist/src/commands/test-verdict.js +0 -162
- package/dist/src/commands/test.d.ts +0 -22
- package/dist/src/commands/token-coverage.d.ts +0 -5
- package/dist/src/commands/token-coverage.js +0 -170
- package/dist/src/commands/token-lint.d.ts +0 -14
- package/dist/src/commands/token-lint.js +0 -151
- package/dist/src/commands/token-list.d.ts +0 -26
- package/dist/src/commands/token-list.js +0 -153
- package/dist/src/commands/token.d.ts +0 -14
- package/dist/src/commands/tree.d.ts +0 -19
- package/dist/src/commands/tree.js +0 -341
- package/dist/src/commands/typecheck.d.ts +0 -56
- package/dist/src/commands/verify-scope.d.ts +0 -28
- package/dist/src/commands/verify-scope.js +0 -67
- package/dist/src/commands/verify.d.ts +0 -58
- package/dist/src/commands/watch.d.ts +0 -9
- package/dist/src/commands/wire.d.ts +0 -13
- package/dist/src/core/ast-utils.d.ts +0 -73
- package/dist/src/core/ast-utils.js +0 -105
- package/dist/src/core/brand-validation.d.ts +0 -7
- package/dist/src/core/brand-validation.js +0 -14
- package/dist/src/core/branding.d.ts +0 -86
- package/dist/src/core/branding.js +0 -371
- package/dist/src/core/browser-wire.d.ts +0 -48
- package/dist/src/core/browser-wire.js +0 -133
- package/dist/src/core/build-audit-platform.d.ts +0 -67
- package/dist/src/core/build-audit-platform.js +0 -373
- package/dist/src/core/build-audit-registration.d.ts +0 -80
- package/dist/src/core/build-audit-registration.js +0 -181
- package/dist/src/core/build-audit-resolve.d.ts +0 -78
- package/dist/src/core/build-audit-resolve.js +0 -240
- package/dist/src/core/build-audit-skip.d.ts +0 -57
- package/dist/src/core/build-audit-skip.js +0 -112
- package/dist/src/core/build-audit-transforms.d.ts +0 -23
- package/dist/src/core/build-audit-transforms.js +0 -92
- package/dist/src/core/build-audit.d.ts +0 -93
- package/dist/src/core/build-audit.js +0 -633
- package/dist/src/core/build-baseline-types.d.ts +0 -225
- package/dist/src/core/build-baseline-types.js +0 -10
- package/dist/src/core/build-baseline-validate.d.ts +0 -32
- package/dist/src/core/build-baseline-validate.js +0 -173
- package/dist/src/core/build-baseline.d.ts +0 -103
- package/dist/src/core/build-baseline.js +0 -261
- package/dist/src/core/build-jar-escalation.d.ts +0 -61
- package/dist/src/core/build-jar-escalation.js +0 -125
- package/dist/src/core/build-overwrite-guard.d.ts +0 -92
- package/dist/src/core/build-overwrite-guard.js +0 -235
- package/dist/src/core/build-prepare.d.ts +0 -83
- package/dist/src/core/build-prepare.js +0 -414
- package/dist/src/core/build-run-record.d.ts +0 -74
- package/dist/src/core/build-run-record.js +0 -136
- package/dist/src/core/checkjs-support-heads.d.ts +0 -41
- package/dist/src/core/checkjs-support-heads.js +0 -104
- package/dist/src/core/component-source-guard.d.ts +0 -20
- package/dist/src/core/component-source-guard.js +0 -68
- package/dist/src/core/config-mutate.d.ts +0 -16
- package/dist/src/core/config-mutate.js +0 -76
- package/dist/src/core/config-paths.d.ts +0 -16
- package/dist/src/core/config-paths.js +0 -106
- package/dist/src/core/config-state.d.ts +0 -16
- package/dist/src/core/config-state.js +0 -141
- package/dist/src/core/config-validate-build-audit.d.ts +0 -8
- package/dist/src/core/config-validate-build-audit.js +0 -80
- package/dist/src/core/config-validate-check.d.ts +0 -8
- package/dist/src/core/config-validate-check.js +0 -219
- package/dist/src/core/config-validate-file-size.d.ts +0 -15
- package/dist/src/core/config-validate-file-size.js +0 -154
- package/dist/src/core/config-validate-history.d.ts +0 -11
- package/dist/src/core/config-validate-history.js +0 -38
- package/dist/src/core/config-validate-patch-policy.d.ts +0 -7
- package/dist/src/core/config-validate-patch-policy.js +0 -274
- package/dist/src/core/config-validate-test-toolchains.d.ts +0 -8
- package/dist/src/core/config-validate-test-toolchains.js +0 -133
- package/dist/src/core/config-validate-token-scales.d.ts +0 -9
- package/dist/src/core/config-validate-token-scales.js +0 -92
- package/dist/src/core/config-validate.d.ts +0 -11
- package/dist/src/core/config-validate.js +0 -503
- package/dist/src/core/config.d.ts +0 -92
- package/dist/src/core/config.js +0 -169
- package/dist/src/core/coverage-dispatch.d.ts +0 -24
- package/dist/src/core/coverage-dispatch.js +0 -44
- package/dist/src/core/coverage-extend.d.ts +0 -89
- package/dist/src/core/coverage-extend.js +0 -239
- package/dist/src/core/coverage-records.d.ts +0 -107
- package/dist/src/core/coverage-records.js +0 -383
- package/dist/src/core/destructive.d.ts +0 -144
- package/dist/src/core/destructive.js +0 -182
- package/dist/src/core/diff-hunks.d.ts +0 -73
- package/dist/src/core/diff-hunks.js +0 -286
- package/dist/src/core/discard-baseline.d.ts +0 -60
- package/dist/src/core/discard-baseline.js +0 -247
- package/dist/src/core/display-state.d.ts +0 -50
- package/dist/src/core/display-state.js +0 -87
- package/dist/src/core/engine-changes.d.ts +0 -40
- package/dist/src/core/engine-changes.js +0 -95
- package/dist/src/core/engine-precondition.d.ts +0 -42
- package/dist/src/core/engine-precondition.js +0 -60
- package/dist/src/core/engine-session-lock.d.ts +0 -119
- package/dist/src/core/engine-session-lock.js +0 -374
- package/dist/src/core/engine-write-boundary.d.ts +0 -5
- package/dist/src/core/engine-write-boundary.js +0 -41
- package/dist/src/core/export-moved-code-shape.d.ts +0 -98
- package/dist/src/core/export-moved-code-shape.js +0 -220
- package/dist/src/core/file-lock-owner.d.ts +0 -103
- package/dist/src/core/file-lock-owner.js +0 -259
- package/dist/src/core/file-lock-queue.d.ts +0 -67
- package/dist/src/core/file-lock-queue.js +0 -219
- package/dist/src/core/file-lock-shared.d.ts +0 -57
- package/dist/src/core/file-lock-shared.js +0 -117
- package/dist/src/core/file-lock.d.ts +0 -143
- package/dist/src/core/file-lock.js +0 -531
- package/dist/src/core/firefox-archive.d.ts +0 -45
- package/dist/src/core/firefox-archive.js +0 -96
- package/dist/src/core/firefox-cache.d.ts +0 -30
- package/dist/src/core/firefox-cache.js +0 -248
- package/dist/src/core/firefox-download.d.ts +0 -30
- package/dist/src/core/firefox-download.js +0 -152
- package/dist/src/core/firefox-extract.d.ts +0 -42
- package/dist/src/core/firefox-extract.js +0 -248
- package/dist/src/core/firefox-ignorefile.d.ts +0 -17
- package/dist/src/core/firefox-ignorefile.js +0 -30
- package/dist/src/core/firefox.d.ts +0 -66
- package/dist/src/core/firefox.js +0 -121
- package/dist/src/core/forward-registrations.d.ts +0 -33
- package/dist/src/core/forward-registrations.js +0 -16
- package/dist/src/core/furnace-apply-dry-run.d.ts +0 -12
- package/dist/src/core/furnace-apply-dry-run.js +0 -99
- package/dist/src/core/furnace-apply-ftl.d.ts +0 -49
- package/dist/src/core/furnace-apply-ftl.js +0 -210
- package/dist/src/core/furnace-apply-helpers.d.ts +0 -106
- package/dist/src/core/furnace-apply-helpers.js +0 -436
- package/dist/src/core/furnace-apply-output.d.ts +0 -36
- package/dist/src/core/furnace-apply-output.js +0 -111
- package/dist/src/core/furnace-apply-overwrite-warn.d.ts +0 -62
- package/dist/src/core/furnace-apply-overwrite-warn.js +0 -124
- package/dist/src/core/furnace-apply-undeploy-actions.d.ts +0 -10
- package/dist/src/core/furnace-apply-undeploy-actions.js +0 -48
- package/dist/src/core/furnace-apply.d.ts +0 -49
- package/dist/src/core/furnace-apply.js +0 -465
- package/dist/src/core/furnace-checksum-utils.d.ts +0 -25
- package/dist/src/core/furnace-checksum-utils.js +0 -54
- package/dist/src/core/furnace-composed-source.d.ts +0 -76
- package/dist/src/core/furnace-composed-source.js +0 -167
- package/dist/src/core/furnace-config-array-utils.d.ts +0 -11
- package/dist/src/core/furnace-config-array-utils.js +0 -26
- package/dist/src/core/furnace-config-custom.d.ts +0 -15
- package/dist/src/core/furnace-config-custom.js +0 -73
- package/dist/src/core/furnace-config-order.d.ts +0 -8
- package/dist/src/core/furnace-config-order.js +0 -90
- package/dist/src/core/furnace-config-tokens.d.ts +0 -17
- package/dist/src/core/furnace-config-tokens.js +0 -42
- package/dist/src/core/furnace-config-validate-exceptions.d.ts +0 -17
- package/dist/src/core/furnace-config-validate-exceptions.js +0 -122
- package/dist/src/core/furnace-config-validate.d.ts +0 -32
- package/dist/src/core/furnace-config-validate.js +0 -146
- package/dist/src/core/furnace-config.d.ts +0 -139
- package/dist/src/core/furnace-config.js +0 -511
- package/dist/src/core/furnace-constants.d.ts +0 -79
- package/dist/src/core/furnace-constants.js +0 -123
- package/dist/src/core/furnace-css-fragments.d.ts +0 -96
- package/dist/src/core/furnace-css-fragments.js +0 -279
- package/dist/src/core/furnace-dir-entry.d.ts +0 -20
- package/dist/src/core/furnace-dir-entry.js +0 -21
- package/dist/src/core/furnace-fragment-includers.d.ts +0 -56
- package/dist/src/core/furnace-fragment-includers.js +0 -122
- package/dist/src/core/furnace-graph-utils.d.ts +0 -11
- package/dist/src/core/furnace-graph-utils.js +0 -93
- package/dist/src/core/furnace-jsconfig.d.ts +0 -61
- package/dist/src/core/furnace-jsconfig.js +0 -208
- package/dist/src/core/furnace-marker.d.ts +0 -15
- package/dist/src/core/furnace-marker.js +0 -21
- package/dist/src/core/furnace-operation.d.ts +0 -195
- package/dist/src/core/furnace-operation.js +0 -444
- package/dist/src/core/furnace-precondition.d.ts +0 -61
- package/dist/src/core/furnace-precondition.js +0 -67
- package/dist/src/core/furnace-refresh.d.ts +0 -28
- package/dist/src/core/furnace-refresh.js +0 -125
- package/dist/src/core/furnace-registration-ast.d.ts +0 -53
- package/dist/src/core/furnace-registration-ast.js +0 -402
- package/dist/src/core/furnace-registration-jar-inplace.d.ts +0 -12
- package/dist/src/core/furnace-registration-jar-inplace.js +0 -79
- package/dist/src/core/furnace-registration-remove.d.ts +0 -56
- package/dist/src/core/furnace-registration-remove.js +0 -260
- package/dist/src/core/furnace-registration-rename.d.ts +0 -26
- package/dist/src/core/furnace-registration-rename.js +0 -77
- package/dist/src/core/furnace-registration-validate.d.ts +0 -53
- package/dist/src/core/furnace-registration-validate.js +0 -110
- package/dist/src/core/furnace-registration.d.ts +0 -112
- package/dist/src/core/furnace-registration.js +0 -348
- package/dist/src/core/furnace-rollback.d.ts +0 -48
- package/dist/src/core/furnace-rollback.js +0 -170
- package/dist/src/core/furnace-scanner.d.ts +0 -47
- package/dist/src/core/furnace-scanner.js +0 -236
- package/dist/src/core/furnace-stale-export.d.ts +0 -60
- package/dist/src/core/furnace-stale-export.js +0 -125
- package/dist/src/core/furnace-staleness.d.ts +0 -24
- package/dist/src/core/furnace-staleness.js +0 -67
- package/dist/src/core/furnace-state-persist.d.ts +0 -68
- package/dist/src/core/furnace-state-persist.js +0 -116
- package/dist/src/core/furnace-step-errors.d.ts +0 -23
- package/dist/src/core/furnace-step-errors.js +0 -25
- package/dist/src/core/furnace-stories.d.ts +0 -37
- package/dist/src/core/furnace-stories.js +0 -186
- package/dist/src/core/furnace-validate-accessibility.d.ts +0 -39
- package/dist/src/core/furnace-validate-accessibility.js +0 -417
- package/dist/src/core/furnace-validate-checks.d.ts +0 -4
- package/dist/src/core/furnace-validate-checks.js +0 -6
- package/dist/src/core/furnace-validate-compatibility.d.ts +0 -6
- package/dist/src/core/furnace-validate-compatibility.js +0 -295
- package/dist/src/core/furnace-validate-exceptions.d.ts +0 -49
- package/dist/src/core/furnace-validate-exceptions.js +0 -98
- package/dist/src/core/furnace-validate-helpers.d.ts +0 -7
- package/dist/src/core/furnace-validate-helpers.js +0 -4
- package/dist/src/core/furnace-validate-icon-button.d.ts +0 -7
- package/dist/src/core/furnace-validate-icon-button.js +0 -78
- package/dist/src/core/furnace-validate-registration.d.ts +0 -67
- package/dist/src/core/furnace-validate-registration.js +0 -487
- package/dist/src/core/furnace-validate-structure.d.ts +0 -22
- package/dist/src/core/furnace-validate-structure.js +0 -122
- package/dist/src/core/furnace-validate.d.ts +0 -41
- package/dist/src/core/furnace-validate.js +0 -302
- package/dist/src/core/furnace-version-drift.d.ts +0 -57
- package/dist/src/core/furnace-version-drift.js +0 -102
- package/dist/src/core/gecko-dom-types.d.ts +0 -2
- package/dist/src/core/gecko-dom-types.js +0 -17
- package/dist/src/core/git-base.d.ts +0 -101
- package/dist/src/core/git-base.js +0 -162
- package/dist/src/core/git-diff-new-file.d.ts +0 -40
- package/dist/src/core/git-diff-new-file.js +0 -118
- package/dist/src/core/git-diff.d.ts +0 -82
- package/dist/src/core/git-diff.js +0 -539
- package/dist/src/core/git-file-ops.d.ts +0 -108
- package/dist/src/core/git-file-ops.js +0 -280
- package/dist/src/core/git-readonly-index.d.ts +0 -91
- package/dist/src/core/git-readonly-index.js +0 -177
- package/dist/src/core/git-status.d.ts +0 -84
- package/dist/src/core/git-status.js +0 -208
- package/dist/src/core/git.d.ts +0 -114
- package/dist/src/core/git.js +0 -540
- package/dist/src/core/harness-helper-pids.d.ts +0 -98
- package/dist/src/core/harness-helper-pids.js +0 -240
- package/dist/src/core/harness-orphans.d.ts +0 -118
- package/dist/src/core/harness-orphans.js +0 -268
- package/dist/src/core/harness-port-fallback.d.ts +0 -60
- package/dist/src/core/harness-port-fallback.js +0 -96
- package/dist/src/core/harness-port-reservation.d.ts +0 -60
- package/dist/src/core/harness-port-reservation.js +0 -122
- package/dist/src/core/history-log-file.d.ts +0 -61
- package/dist/src/core/history-log-file.js +0 -164
- package/dist/src/core/history-log.d.ts +0 -20
- package/dist/src/core/history-log.js +0 -30
- package/dist/src/core/json-preserving-edit.d.ts +0 -22
- package/dist/src/core/json-preserving-edit.js +0 -199
- package/dist/src/core/launchable-build.d.ts +0 -39
- package/dist/src/core/launchable-build.js +0 -85
- package/dist/src/core/license-headers.d.ts +0 -103
- package/dist/src/core/license-headers.js +0 -318
- package/dist/src/core/line-prefixer.d.ts +0 -18
- package/dist/src/core/line-prefixer.js +0 -34
- package/dist/src/core/lit-template-regions.d.ts +0 -4
- package/dist/src/core/lit-template-regions.js +0 -50
- package/dist/src/core/mach-build-artifacts.d.ts +0 -176
- package/dist/src/core/mach-build-artifacts.js +0 -436
- package/dist/src/core/mach-error-hints.d.ts +0 -24
- package/dist/src/core/mach-error-hints.js +0 -135
- package/dist/src/core/mach-known-noise-filter.d.ts +0 -122
- package/dist/src/core/mach-known-noise-filter.js +0 -257
- package/dist/src/core/mach-mozconfig.d.ts +0 -57
- package/dist/src/core/mach-mozconfig.js +0 -166
- package/dist/src/core/mach-python.d.ts +0 -19
- package/dist/src/core/mach-python.js +0 -131
- package/dist/src/core/mach-resource-shim.d.ts +0 -107
- package/dist/src/core/mach-resource-shim.js +0 -640
- package/dist/src/core/mach.d.ts +0 -284
- package/dist/src/core/mach.js +0 -445
- package/dist/src/core/marionette-port.d.ts +0 -153
- package/dist/src/core/marionette-port.js +0 -474
- package/dist/src/core/marionette-preflight.d.ts +0 -58
- package/dist/src/core/marionette-preflight.js +0 -332
- package/dist/src/core/markdown-table.d.ts +0 -104
- package/dist/src/core/markdown-table.js +0 -265
- package/dist/src/core/mochitest-server-port.d.ts +0 -81
- package/dist/src/core/mochitest-server-port.js +0 -175
- package/dist/src/core/module-resolution-preflight.d.ts +0 -65
- package/dist/src/core/module-resolution-preflight.js +0 -171
- package/dist/src/core/moz-manifest-helpers.d.ts +0 -79
- package/dist/src/core/moz-manifest-helpers.js +0 -163
- package/dist/src/core/moz-manifest-register.d.ts +0 -19
- package/dist/src/core/moz-manifest-register.js +0 -51
- package/dist/src/core/moz-manifest-rules.d.ts +0 -58
- package/dist/src/core/moz-manifest-rules.js +0 -264
- package/dist/src/core/moz-manifest-tokenizers.d.ts +0 -38
- package/dist/src/core/moz-manifest-tokenizers.js +0 -108
- package/dist/src/core/negative-control-compiled.d.ts +0 -46
- package/dist/src/core/negative-control-compiled.js +0 -109
- package/dist/src/core/negative-control-diff.d.ts +0 -51
- package/dist/src/core/negative-control-diff.js +0 -204
- package/dist/src/core/negative-control.d.ts +0 -150
- package/dist/src/core/negative-control.js +0 -399
- package/dist/src/core/objdir-install-manifests.d.ts +0 -73
- package/dist/src/core/objdir-install-manifests.js +0 -226
- package/dist/src/core/objdir-maintenance.d.ts +0 -10
- package/dist/src/core/objdir-maintenance.js +0 -167
- package/dist/src/core/ownership-table.d.ts +0 -53
- package/dist/src/core/ownership-table.js +0 -159
- package/dist/src/core/parent-exit-watchdog.d.ts +0 -62
- package/dist/src/core/parent-exit-watchdog.js +0 -69
- package/dist/src/core/park-store.d.ts +0 -63
- package/dist/src/core/park-store.js +0 -216
- package/dist/src/core/parser-fallback.d.ts +0 -50
- package/dist/src/core/parser-fallback.js +0 -61
- package/dist/src/core/patch-apply-fuzz.d.ts +0 -57
- package/dist/src/core/patch-apply-fuzz.js +0 -125
- package/dist/src/core/patch-apply.d.ts +0 -88
- package/dist/src/core/patch-apply.js +0 -435
- package/dist/src/core/patch-export-coverage.d.ts +0 -49
- package/dist/src/core/patch-export-coverage.js +0 -73
- package/dist/src/core/patch-export-metadata.d.ts +0 -46
- package/dist/src/core/patch-export-metadata.js +0 -47
- package/dist/src/core/patch-export-update.d.ts +0 -55
- package/dist/src/core/patch-export-update.js +0 -95
- package/dist/src/core/patch-export.d.ts +0 -175
- package/dist/src/core/patch-export.js +0 -312
- package/dist/src/core/patch-files.d.ts +0 -17
- package/dist/src/core/patch-files.js +0 -59
- package/dist/src/core/patch-identifier-suggest.d.ts +0 -26
- package/dist/src/core/patch-identifier-suggest.js +0 -135
- package/dist/src/core/patch-lint-binary.d.ts +0 -45
- package/dist/src/core/patch-lint-binary.js +0 -39
- package/dist/src/core/patch-lint-cache.d.ts +0 -78
- package/dist/src/core/patch-lint-cache.js +0 -233
- package/dist/src/core/patch-lint-checkjs-any-import.d.ts +0 -39
- package/dist/src/core/patch-lint-checkjs-any-import.js +0 -63
- package/dist/src/core/patch-lint-checkjs-cache.d.ts +0 -18
- package/dist/src/core/patch-lint-checkjs-cache.js +0 -45
- package/dist/src/core/patch-lint-checkjs-diagnostics.d.ts +0 -17
- package/dist/src/core/patch-lint-checkjs-diagnostics.js +0 -32
- package/dist/src/core/patch-lint-checkjs.d.ts +0 -180
- package/dist/src/core/patch-lint-checkjs.js +0 -611
- package/dist/src/core/patch-lint-chrome-jsdoc.d.ts +0 -43
- package/dist/src/core/patch-lint-chrome-jsdoc.js +0 -90
- package/dist/src/core/patch-lint-code-lines.d.ts +0 -59
- package/dist/src/core/patch-lint-code-lines.js +0 -105
- package/dist/src/core/patch-lint-creators.d.ts +0 -26
- package/dist/src/core/patch-lint-creators.js +0 -45
- package/dist/src/core/patch-lint-cross.d.ts +0 -232
- package/dist/src/core/patch-lint-cross.js +0 -590
- package/dist/src/core/patch-lint-css.d.ts +0 -27
- package/dist/src/core/patch-lint-css.js +0 -228
- package/dist/src/core/patch-lint-diff-tag.d.ts +0 -51
- package/dist/src/core/patch-lint-diff-tag.js +0 -105
- package/dist/src/core/patch-lint-diff.d.ts +0 -42
- package/dist/src/core/patch-lint-diff.js +0 -100
- package/dist/src/core/patch-lint-file-size.d.ts +0 -57
- package/dist/src/core/patch-lint-file-size.js +0 -62
- package/dist/src/core/patch-lint-forward-registration-extended.d.ts +0 -61
- package/dist/src/core/patch-lint-forward-registration-extended.js +0 -265
- package/dist/src/core/patch-lint-forward-registration.d.ts +0 -71
- package/dist/src/core/patch-lint-forward-registration.js +0 -266
- package/dist/src/core/patch-lint-ignore.d.ts +0 -196
- package/dist/src/core/patch-lint-ignore.js +0 -429
- package/dist/src/core/patch-lint-imports.d.ts +0 -5
- package/dist/src/core/patch-lint-imports.js +0 -67
- package/dist/src/core/patch-lint-jsdoc.d.ts +0 -67
- package/dist/src/core/patch-lint-jsdoc.js +0 -471
- package/dist/src/core/patch-lint-module-registration.d.ts +0 -22
- package/dist/src/core/patch-lint-module-registration.js +0 -97
- package/dist/src/core/patch-lint-mozbuild.d.ts +0 -18
- package/dist/src/core/patch-lint-mozbuild.js +0 -192
- package/dist/src/core/patch-lint-observer.d.ts +0 -37
- package/dist/src/core/patch-lint-observer.js +0 -167
- package/dist/src/core/patch-lint-ownership.d.ts +0 -74
- package/dist/src/core/patch-lint-ownership.js +0 -125
- package/dist/src/core/patch-lint-prettier.d.ts +0 -34
- package/dist/src/core/patch-lint-prettier.js +0 -124
- package/dist/src/core/patch-lint-projection.d.ts +0 -25
- package/dist/src/core/patch-lint-projection.js +0 -43
- package/dist/src/core/patch-lint-queue-types.d.ts +0 -60
- package/dist/src/core/patch-lint-queue-types.js +0 -12
- package/dist/src/core/patch-lint-size-thresholds.d.ts +0 -52
- package/dist/src/core/patch-lint-size-thresholds.js +0 -110
- package/dist/src/core/patch-lint-size.d.ts +0 -117
- package/dist/src/core/patch-lint-size.js +0 -331
- package/dist/src/core/patch-lint-staged-registration.d.ts +0 -78
- package/dist/src/core/patch-lint-staged-registration.js +0 -110
- package/dist/src/core/patch-lint-token-scale.d.ts +0 -57
- package/dist/src/core/patch-lint-token-scale.js +0 -286
- package/dist/src/core/patch-lint-unmanaged-companion.d.ts +0 -106
- package/dist/src/core/patch-lint-unmanaged-companion.js +0 -214
- package/dist/src/core/patch-lint.d.ts +0 -191
- package/dist/src/core/patch-lint.js +0 -529
- package/dist/src/core/patch-lock.d.ts +0 -40
- package/dist/src/core/patch-lock.js +0 -129
- package/dist/src/core/patch-manifest-consistency.d.ts +0 -95
- package/dist/src/core/patch-manifest-consistency.js +0 -256
- package/dist/src/core/patch-manifest-files-affected.d.ts +0 -43
- package/dist/src/core/patch-manifest-files-affected.js +0 -77
- package/dist/src/core/patch-manifest-io.d.ts +0 -199
- package/dist/src/core/patch-manifest-io.js +0 -556
- package/dist/src/core/patch-manifest-key-order.d.ts +0 -23
- package/dist/src/core/patch-manifest-key-order.js +0 -60
- package/dist/src/core/patch-manifest-query.d.ts +0 -55
- package/dist/src/core/patch-manifest-query.js +0 -139
- package/dist/src/core/patch-manifest-resolve.d.ts +0 -21
- package/dist/src/core/patch-manifest-resolve.js +0 -35
- package/dist/src/core/patch-manifest-stage.d.ts +0 -46
- package/dist/src/core/patch-manifest-stage.js +0 -96
- package/dist/src/core/patch-manifest-validate.d.ts +0 -20
- package/dist/src/core/patch-manifest-validate.js +0 -240
- package/dist/src/core/patch-manifest.d.ts +0 -12
- package/dist/src/core/patch-manifest.js +0 -13
- package/dist/src/core/patch-order-legal.d.ts +0 -26
- package/dist/src/core/patch-order-legal.js +0 -88
- package/dist/src/core/patch-parse.d.ts +0 -161
- package/dist/src/core/patch-parse.js +0 -347
- package/dist/src/core/patch-policy-content.d.ts +0 -40
- package/dist/src/core/patch-policy-content.js +0 -216
- package/dist/src/core/patch-policy.d.ts +0 -80
- package/dist/src/core/patch-policy.js +0 -394
- package/dist/src/core/patch-registration-refs.d.ts +0 -41
- package/dist/src/core/patch-registration-refs.js +0 -107
- package/dist/src/core/patch-retired.d.ts +0 -57
- package/dist/src/core/patch-retired.js +0 -92
- package/dist/src/core/patch-source-metadata.d.ts +0 -6
- package/dist/src/core/patch-source-metadata.js +0 -12
- package/dist/src/core/patch-subset.d.ts +0 -18
- package/dist/src/core/patch-subset.js +0 -67
- package/dist/src/core/patch-transform.d.ts +0 -61
- package/dist/src/core/patch-transform.js +0 -198
- package/dist/src/core/preflight-wait.d.ts +0 -22
- package/dist/src/core/preflight-wait.js +0 -62
- package/dist/src/core/process-cpu-time.d.ts +0 -12
- package/dist/src/core/process-cpu-time.js +0 -52
- package/dist/src/core/process-owner.d.ts +0 -9
- package/dist/src/core/process-owner.js +0 -43
- package/dist/src/core/rebase-dry-run.d.ts +0 -48
- package/dist/src/core/rebase-dry-run.js +0 -105
- package/dist/src/core/rebase-from-version.d.ts +0 -46
- package/dist/src/core/rebase-from-version.js +0 -71
- package/dist/src/core/rebase-session.d.ts +0 -100
- package/dist/src/core/rebase-session.js +0 -174
- package/dist/src/core/register-browser-content.d.ts +0 -11
- package/dist/src/core/register-browser-content.js +0 -52
- package/dist/src/core/register-browser-test.d.ts +0 -18
- package/dist/src/core/register-browser-test.js +0 -66
- package/dist/src/core/register-module.d.ts +0 -11
- package/dist/src/core/register-module.js +0 -56
- package/dist/src/core/register-result.d.ts +0 -30
- package/dist/src/core/register-result.js +0 -8
- package/dist/src/core/register-scaffold.d.ts +0 -55
- package/dist/src/core/register-scaffold.js +0 -146
- package/dist/src/core/register-shared-css.d.ts +0 -36
- package/dist/src/core/register-shared-css.js +0 -112
- package/dist/src/core/register-xpcshell-test.d.ts +0 -50
- package/dist/src/core/register-xpcshell-test.js +0 -143
- package/dist/src/core/run-log-redact.d.ts +0 -38
- package/dist/src/core/run-log-redact.js +0 -69
- package/dist/src/core/run-log.d.ts +0 -97
- package/dist/src/core/run-log.js +0 -334
- package/dist/src/core/run-profile.d.ts +0 -57
- package/dist/src/core/run-profile.js +0 -137
- package/dist/src/core/shared-ftl.d.ts +0 -28
- package/dist/src/core/shared-ftl.js +0 -49
- package/dist/src/core/signal-critical.d.ts +0 -38
- package/dist/src/core/signal-critical.js +0 -62
- package/dist/src/core/smoke-patterns.d.ts +0 -81
- package/dist/src/core/smoke-patterns.js +0 -176
- package/dist/src/core/state-file.d.ts +0 -60
- package/dist/src/core/state-file.js +0 -71
- package/dist/src/core/status-binary.d.ts +0 -62
- package/dist/src/core/status-binary.js +0 -133
- package/dist/src/core/status-classify.d.ts +0 -96
- package/dist/src/core/status-classify.js +0 -244
- package/dist/src/core/test-changed-prefs.d.ts +0 -30
- package/dist/src/core/test-changed-prefs.js +0 -93
- package/dist/src/core/test-harness-crash.d.ts +0 -251
- package/dist/src/core/test-harness-crash.js +0 -780
- package/dist/src/core/test-harness-infra.d.ts +0 -32
- package/dist/src/core/test-harness-infra.js +0 -69
- package/dist/src/core/test-harness-output.d.ts +0 -45
- package/dist/src/core/test-harness-output.js +0 -119
- package/dist/src/core/test-harness-signature.d.ts +0 -57
- package/dist/src/core/test-harness-signature.js +0 -35
- package/dist/src/core/test-harness-verdict-notes.d.ts +0 -54
- package/dist/src/core/test-harness-verdict-notes.js +0 -48
- package/dist/src/core/test-host-state.d.ts +0 -14
- package/dist/src/core/test-host-state.js +0 -80
- package/dist/src/core/test-path-scope.d.ts +0 -59
- package/dist/src/core/test-path-scope.js +0 -147
- package/dist/src/core/test-profile-files.d.ts +0 -17
- package/dist/src/core/test-profile-files.js +0 -75
- package/dist/src/core/test-raw-log.d.ts +0 -66
- package/dist/src/core/test-raw-log.js +0 -122
- package/dist/src/core/test-run-completeness.d.ts +0 -97
- package/dist/src/core/test-run-completeness.js +0 -191
- package/dist/src/core/test-stale-check.d.ts +0 -213
- package/dist/src/core/test-stale-check.js +0 -396
- package/dist/src/core/test-stale-exempt.d.ts +0 -40
- package/dist/src/core/test-stale-exempt.js +0 -70
- package/dist/src/core/test-stale-symlink.d.ts +0 -12
- package/dist/src/core/test-stale-symlink.js +0 -39
- package/dist/src/core/test-stall-triage.d.ts +0 -51
- package/dist/src/core/test-stall-triage.js +0 -142
- package/dist/src/core/test-xpcshell-retry.d.ts +0 -35
- package/dist/src/core/test-xpcshell-retry.js +0 -31
- package/dist/src/core/token-category.d.ts +0 -54
- package/dist/src/core/token-category.js +0 -299
- package/dist/src/core/token-coverage.d.ts +0 -12
- package/dist/src/core/token-coverage.js +0 -96
- package/dist/src/core/token-dark-mode.d.ts +0 -64
- package/dist/src/core/token-dark-mode.js +0 -186
- package/dist/src/core/token-docs.d.ts +0 -34
- package/dist/src/core/token-docs.js +0 -102
- package/dist/src/core/token-inventory.d.ts +0 -56
- package/dist/src/core/token-inventory.js +0 -114
- package/dist/src/core/token-lint.d.ts +0 -53
- package/dist/src/core/token-lint.js +0 -131
- package/dist/src/core/token-manager.d.ts +0 -87
- package/dist/src/core/token-manager.js +0 -407
- package/dist/src/core/token-scaffold.d.ts +0 -36
- package/dist/src/core/token-scaffold.js +0 -73
- package/dist/src/core/token-sibling-sheets.d.ts +0 -46
- package/dist/src/core/token-sibling-sheets.js +0 -119
- package/dist/src/core/token-variant.d.ts +0 -90
- package/dist/src/core/token-variant.js +0 -327
- package/dist/src/core/toolchain-preflight.d.ts +0 -90
- package/dist/src/core/toolchain-preflight.js +0 -251
- package/dist/src/core/tree-cow.d.ts +0 -16
- package/dist/src/core/tree-cow.js +0 -71
- package/dist/src/core/tree-guard.d.ts +0 -35
- package/dist/src/core/tree-guard.js +0 -194
- package/dist/src/core/tree-store.d.ts +0 -143
- package/dist/src/core/tree-store.js +0 -478
- package/dist/src/core/typecheck-shim.d.ts +0 -90
- package/dist/src/core/typecheck-shim.js +0 -507
- package/dist/src/core/typecheck.d.ts +0 -75
- package/dist/src/core/typecheck.js +0 -433
- package/dist/src/core/wire-destroy.d.ts +0 -25
- package/dist/src/core/wire-destroy.js +0 -126
- package/dist/src/core/wire-dom-fragment.d.ts +0 -44
- package/dist/src/core/wire-dom-fragment.js +0 -139
- package/dist/src/core/wire-init.d.ts +0 -28
- package/dist/src/core/wire-init.js +0 -219
- package/dist/src/core/wire-subscript.d.ts +0 -23
- package/dist/src/core/wire-subscript.js +0 -145
- package/dist/src/core/wire-utils.d.ts +0 -149
- package/dist/src/core/wire-utils.js +0 -338
- package/dist/src/core/xpcshell-appdir.d.ts +0 -157
- package/dist/src/core/xpcshell-appdir.js +0 -299
- package/dist/src/core/xpcshell-profile-dir.d.ts +0 -12
- package/dist/src/core/xpcshell-profile-dir.js +0 -45
- package/dist/src/errors/base.d.ts +0 -217
- package/dist/src/errors/base.js +0 -279
- package/dist/src/errors/build.d.ts +0 -92
- package/dist/src/errors/build.js +0 -166
- package/dist/src/errors/codes.d.ts +0 -74
- package/dist/src/errors/codes.js +0 -74
- package/dist/src/errors/config.d.ts +0 -17
- package/dist/src/errors/config.js +0 -39
- package/dist/src/errors/download.d.ts +0 -66
- package/dist/src/errors/download.js +0 -160
- package/dist/src/errors/furnace.d.ts +0 -20
- package/dist/src/errors/furnace.js +0 -28
- package/dist/src/errors/git.d.ts +0 -65
- package/dist/src/errors/git.js +0 -140
- package/dist/src/errors/patch.d.ts +0 -27
- package/dist/src/errors/patch.js +0 -52
- package/dist/src/errors/rebase.d.ts +0 -42
- package/dist/src/errors/rebase.js +0 -71
- package/dist/src/errors/run.d.ts +0 -16
- package/dist/src/errors/run.js +0 -22
- package/dist/src/index.d.ts +0 -42
- package/dist/src/index.js +0 -32
- package/dist/src/types/cli.d.ts +0 -14
- package/dist/src/types/commands/index.d.ts +0 -6
- package/dist/src/types/commands/index.js +0 -5
- package/dist/src/types/commands/options.d.ts +0 -1367
- package/dist/src/types/commands/options.js +0 -5
- package/dist/src/types/commands/patches.d.ts +0 -352
- package/dist/src/types/commands/patches.js +0 -5
- package/dist/src/types/commands/project.d.ts +0 -51
- package/dist/src/types/commands/project.js +0 -5
- package/dist/src/types/config.d.ts +0 -703
- package/dist/src/types/config.js +0 -15
- package/dist/src/types/furnace.d.ts +0 -415
- package/dist/src/types/furnace.js +0 -26
- package/dist/src/types/index.d.ts +0 -5
- package/dist/src/types/index.js +0 -5
- package/dist/src/types/json.d.ts +0 -22
- package/dist/src/types/json.js +0 -11
- package/dist/src/types/typecheck.d.ts +0 -51
- package/dist/src/types/typecheck.js +0 -14
- package/dist/src/utils/assert.d.ts +0 -34
- package/dist/src/utils/assert.js +0 -61
- package/dist/src/utils/build-info.d.ts +0 -30
- package/dist/src/utils/build-info.js +0 -99
- package/dist/src/utils/child-env.d.ts +0 -28
- package/dist/src/utils/child-env.js +0 -27
- package/dist/src/utils/concurrency.d.ts +0 -8
- package/dist/src/utils/concurrency.js +0 -32
- package/dist/src/utils/elapsed.d.ts +0 -2
- package/dist/src/utils/elapsed.js +0 -23
- package/dist/src/utils/errors.d.ts +0 -39
- package/dist/src/utils/errors.js +0 -67
- package/dist/src/utils/fs.d.ts +0 -113
- package/dist/src/utils/fs.js +0 -337
- package/dist/src/utils/hash.d.ts +0 -12
- package/dist/src/utils/hash.js +0 -16
- package/dist/src/utils/line-dispatch.d.ts +0 -15
- package/dist/src/utils/line-dispatch.js +0 -48
- package/dist/src/utils/logger.d.ts +0 -109
- package/dist/src/utils/logger.js +0 -270
- package/dist/src/utils/machine-output.d.ts +0 -12
- package/dist/src/utils/machine-output.js +0 -33
- package/dist/src/utils/options.d.ts +0 -155
- package/dist/src/utils/options.js +0 -312
- package/dist/src/utils/package-root.d.ts +0 -21
- package/dist/src/utils/package-root.js +0 -70
- package/dist/src/utils/parse.d.ts +0 -117
- package/dist/src/utils/parse.js +0 -214
- package/dist/src/utils/path-glob.d.ts +0 -15
- package/dist/src/utils/path-glob.js +0 -47
- package/dist/src/utils/paths.d.ts +0 -31
- package/dist/src/utils/paths.js +0 -80
- package/dist/src/utils/platform.d.ts +0 -9
- package/dist/src/utils/platform.js +0 -14
- package/dist/src/utils/process-group.d.ts +0 -42
- package/dist/src/utils/process-group.js +0 -190
- package/dist/src/utils/process-input.d.ts +0 -27
- package/dist/src/utils/process-input.js +0 -46
- package/dist/src/utils/process.d.ts +0 -293
- package/dist/src/utils/process.js +0 -593
- package/dist/src/utils/ps-duration.d.ts +0 -31
- package/dist/src/utils/ps-duration.js +0 -70
- package/dist/src/utils/regex.d.ts +0 -39
- package/dist/src/utils/regex.js +0 -109
- package/dist/src/utils/sleep.d.ts +0 -25
- package/dist/src/utils/sleep.js +0 -30
- package/dist/src/utils/stdio-drain.d.ts +0 -28
- package/dist/src/utils/stdio-drain.js +0 -54
- package/dist/src/utils/validation.d.ts +0 -182
- package/dist/src/utils/validation.js +0 -394
- package/docs/lifecycle-invariants.md +0 -523
- package/docs/run-logs.md +0 -122
- package/docs/verification-trees.md +0 -49
- /package/dist/src/{types/cli.js → cli/context.js} +0 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { sleep } from '../time.js';
|
|
2
|
+
import { isAliveIn, listProcesses, signalIfAlive, snapshotProcesses, } from './identity.js';
|
|
3
|
+
import { commandNamesRoot } from './listing.js';
|
|
4
|
+
/** First sampling gap: short commands fork most of their tree right away. */
|
|
5
|
+
const INITIAL_INTERVAL_MS = 100;
|
|
6
|
+
/** Sampling gap after a tick that learned something. */
|
|
7
|
+
const ACTIVE_INTERVAL_MS = 250;
|
|
8
|
+
/** Sampling gap once the tree is quiet. */
|
|
9
|
+
const QUIET_INTERVAL_MS = 2_000;
|
|
10
|
+
/**
|
|
11
|
+
* How long group authority survives without seeing a member. Far below a pid
|
|
12
|
+
* wrap and above the quiet interval plus one slow `ps`, so a stalled host
|
|
13
|
+
* loses authority rather than keeping stale authority.
|
|
14
|
+
*/
|
|
15
|
+
const GROUP_CONTINUITY_MS = 5_000;
|
|
16
|
+
/** Attempts at the snapshot that a teardown decision depends on. */
|
|
17
|
+
const DECISION_ATTEMPTS = 3;
|
|
18
|
+
const DECISION_RETRY_MS = 200;
|
|
19
|
+
/** Poll gap while waiting for signalled processes to exit. */
|
|
20
|
+
const EXIT_POLL_MS = 100;
|
|
21
|
+
/** How long a SIGKILLed process gets to disappear from the snapshot. */
|
|
22
|
+
const KILL_SETTLE_MS = 500;
|
|
23
|
+
/** Follows one leader's tree. Holds live processes only. */
|
|
24
|
+
class TreeSampler {
|
|
25
|
+
leaderPid;
|
|
26
|
+
isLeaderRunning;
|
|
27
|
+
known = new Map();
|
|
28
|
+
timer;
|
|
29
|
+
stopped = false;
|
|
30
|
+
running;
|
|
31
|
+
intervalMs = INITIAL_INTERVAL_MS;
|
|
32
|
+
groupSeenAt = Date.now();
|
|
33
|
+
leaderSeen = false;
|
|
34
|
+
constructor(leaderPid, isLeaderRunning) {
|
|
35
|
+
this.leaderPid = leaderPid;
|
|
36
|
+
this.isLeaderRunning = isLeaderRunning;
|
|
37
|
+
}
|
|
38
|
+
/** Takes the first sample and starts ticking. */
|
|
39
|
+
async start() {
|
|
40
|
+
await this.sample();
|
|
41
|
+
this.schedule();
|
|
42
|
+
}
|
|
43
|
+
/** Stops ticking. `sample` stays usable for a final decision. */
|
|
44
|
+
stop() {
|
|
45
|
+
this.stopped = true;
|
|
46
|
+
if (this.timer !== undefined)
|
|
47
|
+
clearTimeout(this.timer);
|
|
48
|
+
}
|
|
49
|
+
/** Takes one snapshot that started no earlier than this call and absorbs it. Never rejects. */
|
|
50
|
+
async sample() {
|
|
51
|
+
while (this.running !== undefined)
|
|
52
|
+
await this.running;
|
|
53
|
+
this.running = this.takeSample();
|
|
54
|
+
try {
|
|
55
|
+
return await this.running;
|
|
56
|
+
}
|
|
57
|
+
finally {
|
|
58
|
+
this.running = undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** {@link sample}, retrying a transient failure, for a decision that signals. */
|
|
62
|
+
async sampleForDecision() {
|
|
63
|
+
for (let attempt = 1;; attempt += 1) {
|
|
64
|
+
const snapshot = await this.sample();
|
|
65
|
+
if (snapshot !== undefined || attempt >= DECISION_ATTEMPTS)
|
|
66
|
+
return snapshot;
|
|
67
|
+
await sleep(DECISION_RETRY_MS);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** The processes known alive as of the last sample. */
|
|
71
|
+
owned() {
|
|
72
|
+
return [...this.known.values()];
|
|
73
|
+
}
|
|
74
|
+
schedule() {
|
|
75
|
+
if (this.stopped)
|
|
76
|
+
return;
|
|
77
|
+
this.timer = setTimeout(() => {
|
|
78
|
+
void this.sample().then(() => {
|
|
79
|
+
this.schedule();
|
|
80
|
+
});
|
|
81
|
+
}, this.intervalMs);
|
|
82
|
+
this.timer.unref();
|
|
83
|
+
}
|
|
84
|
+
async takeSample() {
|
|
85
|
+
const startedAt = Date.now();
|
|
86
|
+
const leaderRunning = this.isLeaderRunning();
|
|
87
|
+
const snapshot = await snapshotProcesses().catch(() => undefined);
|
|
88
|
+
if (snapshot === undefined)
|
|
89
|
+
return undefined;
|
|
90
|
+
const learned = this.absorb(snapshot, startedAt, leaderRunning);
|
|
91
|
+
this.intervalMs = learned
|
|
92
|
+
? Math.min(this.intervalMs, ACTIVE_INTERVAL_MS)
|
|
93
|
+
: Math.min(this.intervalMs * 2, QUIET_INTERVAL_MS);
|
|
94
|
+
return snapshot;
|
|
95
|
+
}
|
|
96
|
+
/** @returns Whether the snapshot showed a process this sampler did not know. */
|
|
97
|
+
absorb(snapshot, startedAt, leaderRunning) {
|
|
98
|
+
for (const [pid, entry] of this.known) {
|
|
99
|
+
const row = snapshot.get(pid);
|
|
100
|
+
if (row?.start === entry.start)
|
|
101
|
+
this.known.set(pid, row);
|
|
102
|
+
else
|
|
103
|
+
this.known.delete(pid);
|
|
104
|
+
}
|
|
105
|
+
let learned = false;
|
|
106
|
+
const adopt = (row) => {
|
|
107
|
+
if (this.known.has(row.pid) || row.pid === process.pid)
|
|
108
|
+
return;
|
|
109
|
+
this.known.set(row.pid, row);
|
|
110
|
+
learned = true;
|
|
111
|
+
};
|
|
112
|
+
if (!this.leaderSeen && leaderRunning) {
|
|
113
|
+
const leader = snapshot.get(this.leaderPid);
|
|
114
|
+
if (leader !== undefined) {
|
|
115
|
+
adopt(leader);
|
|
116
|
+
this.leaderSeen = true;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
for (const member of this.continuousGroupMembers(snapshot, startedAt, leaderRunning)) {
|
|
120
|
+
adopt(member);
|
|
121
|
+
}
|
|
122
|
+
const children = new Map();
|
|
123
|
+
for (const row of snapshot.values()) {
|
|
124
|
+
const siblings = children.get(row.parent);
|
|
125
|
+
if (siblings)
|
|
126
|
+
siblings.push(row);
|
|
127
|
+
else
|
|
128
|
+
children.set(row.parent, [row]);
|
|
129
|
+
}
|
|
130
|
+
const frontier = [...this.known.keys()];
|
|
131
|
+
for (let pid = frontier.pop(); pid !== undefined; pid = frontier.pop()) {
|
|
132
|
+
for (const child of children.get(pid) ?? []) {
|
|
133
|
+
if (this.known.has(child.pid))
|
|
134
|
+
continue;
|
|
135
|
+
adopt(child);
|
|
136
|
+
frontier.push(child.pid);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return learned;
|
|
140
|
+
}
|
|
141
|
+
continuousGroupMembers(snapshot, startedAt, leaderRunning) {
|
|
142
|
+
if (this.groupSeenAt === undefined)
|
|
143
|
+
return [];
|
|
144
|
+
const members = [...snapshot.values()].filter((entry) => entry.group === this.leaderPid);
|
|
145
|
+
if (leaderRunning ||
|
|
146
|
+
(members.length > 0 && startedAt - this.groupSeenAt <= GROUP_CONTINUITY_MS)) {
|
|
147
|
+
this.groupSeenAt = Date.now();
|
|
148
|
+
return members;
|
|
149
|
+
}
|
|
150
|
+
this.groupSeenAt = undefined;
|
|
151
|
+
return [];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Splits a live tree by signalling authority: group members are owned, and a
|
|
156
|
+
* process outside the group only when its command line names an owned root.
|
|
157
|
+
*
|
|
158
|
+
* @param group - The leader's group id
|
|
159
|
+
* @param known - The live tree
|
|
160
|
+
* @param roots - Absolute directories this run owns
|
|
161
|
+
*/
|
|
162
|
+
async function partitionByAuthority(group, known, roots) {
|
|
163
|
+
const owned = known.filter((entry) => entry.group === group || entry.pid === group);
|
|
164
|
+
const others = known.filter((entry) => entry.group !== group && entry.pid !== group);
|
|
165
|
+
if (others.length === 0)
|
|
166
|
+
return { owned, detached: [] };
|
|
167
|
+
const rows = await listProcesses(['pid', 'command'], { pids: others.map((entry) => entry.pid) });
|
|
168
|
+
const commands = new Map(rows.map((row) => [row.pid, row.command]));
|
|
169
|
+
const detached = [];
|
|
170
|
+
for (const entry of others) {
|
|
171
|
+
const command = commands.get(entry.pid);
|
|
172
|
+
if (command !== undefined && roots.some((root) => commandNamesRoot(command, root))) {
|
|
173
|
+
owned.push(entry);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
detached.push({
|
|
177
|
+
pid: entry.pid,
|
|
178
|
+
group: entry.group,
|
|
179
|
+
...(command === undefined ? {} : { command }),
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return { owned, detached };
|
|
184
|
+
}
|
|
185
|
+
/** A direct child that can still take a signal. A failed spawn has no pid to signal. */
|
|
186
|
+
export function signalChild(child, signal) {
|
|
187
|
+
if (child.pid === undefined ||
|
|
188
|
+
child.pid <= 1 ||
|
|
189
|
+
child.exitCode !== null ||
|
|
190
|
+
child.signalCode !== null) {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
try {
|
|
194
|
+
return child.kill(signal);
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Starts observing a spawned detached group leader.
|
|
202
|
+
*
|
|
203
|
+
* @param child - The spawned leader
|
|
204
|
+
* @returns The ownership token, or undefined where there is no group or no pid
|
|
205
|
+
*/
|
|
206
|
+
export function ownProcessTree(child) {
|
|
207
|
+
const pid = child.pid;
|
|
208
|
+
if (pid === undefined || process.platform === 'win32')
|
|
209
|
+
return undefined;
|
|
210
|
+
const isRunning = () => child.exitCode === null && child.signalCode === null;
|
|
211
|
+
const sampler = new TreeSampler(pid, isRunning);
|
|
212
|
+
const roots = [];
|
|
213
|
+
const partition = () => partitionByAuthority(pid, sampler.owned(), roots);
|
|
214
|
+
const signalOwned = (snapshot, owned, signal, signalled) => {
|
|
215
|
+
if (snapshot === undefined)
|
|
216
|
+
return;
|
|
217
|
+
for (const entry of owned) {
|
|
218
|
+
if (signalIfAlive(snapshot, entry, signal) && entry.pid !== pid) {
|
|
219
|
+
signalled?.set(entry.pid, entry);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
const waitForExit = async (budgetMs) => {
|
|
224
|
+
const deadline = Date.now() + budgetMs;
|
|
225
|
+
for (;;) {
|
|
226
|
+
const { owned } = await partition();
|
|
227
|
+
const remaining = deadline - Date.now();
|
|
228
|
+
if (owned.length === 0 || remaining <= 0)
|
|
229
|
+
return;
|
|
230
|
+
await sleep(Math.min(EXIT_POLL_MS, remaining));
|
|
231
|
+
await sampler.sample();
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
const teardown = async (graceMs) => {
|
|
235
|
+
sampler.stop();
|
|
236
|
+
const signalled = new Map();
|
|
237
|
+
const first = await sampler.sampleForDecision();
|
|
238
|
+
if (first !== undefined) {
|
|
239
|
+
const { owned } = await partition();
|
|
240
|
+
if (owned.length > 0) {
|
|
241
|
+
signalOwned(first, owned, 'SIGTERM', signalled);
|
|
242
|
+
await waitForExit(graceMs);
|
|
243
|
+
const afterGrace = await sampler.sampleForDecision();
|
|
244
|
+
const remaining = await partition();
|
|
245
|
+
signalOwned(afterGrace, remaining.owned, 'SIGKILL', signalled);
|
|
246
|
+
if (remaining.owned.length > 0)
|
|
247
|
+
await waitForExit(KILL_SETTLE_MS);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
const last = first === undefined ? undefined : await sampler.sampleForDecision();
|
|
251
|
+
const { owned, detached } = await partition();
|
|
252
|
+
const base = { signalled: [...signalled.values()], detached };
|
|
253
|
+
if (last === undefined) {
|
|
254
|
+
return { ...base, stillAlive: [], uncertain: 'the process table could not be read' };
|
|
255
|
+
}
|
|
256
|
+
const stranded = [...last.values()].filter((entry) => entry.group === pid && !owned.some((known) => known.pid === entry.pid));
|
|
257
|
+
return {
|
|
258
|
+
...base,
|
|
259
|
+
stillAlive: owned.filter((entry) => isAliveIn(last, entry)),
|
|
260
|
+
...(stranded.length === 0
|
|
261
|
+
? {}
|
|
262
|
+
: {
|
|
263
|
+
uncertain: `group ${pid} still has members it can no longer claim: PID ${stranded.map((entry) => entry.pid).join(', ')}`,
|
|
264
|
+
}),
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
let finished;
|
|
268
|
+
void sampler.start();
|
|
269
|
+
return {
|
|
270
|
+
pid,
|
|
271
|
+
signal(signal) {
|
|
272
|
+
// An unreaped leader keeps its pid, so a handle that has not seen the
|
|
273
|
+
// exit proves the group is this one. Afterwards only exact births may
|
|
274
|
+
// be signalled, which takes a fresh snapshot.
|
|
275
|
+
if (isRunning()) {
|
|
276
|
+
try {
|
|
277
|
+
process.kill(-pid, signal);
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
catch {
|
|
281
|
+
if (signalChild(child, signal))
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
void sampler.sample().then(async (snapshot) => {
|
|
286
|
+
signalOwned(snapshot, (await partition()).owned, signal);
|
|
287
|
+
});
|
|
288
|
+
},
|
|
289
|
+
anchorTo(extra) {
|
|
290
|
+
roots.push(...extra);
|
|
291
|
+
},
|
|
292
|
+
async owns(candidate) {
|
|
293
|
+
await sampler.sample();
|
|
294
|
+
return sampler.owned().some((entry) => entry.pid === candidate);
|
|
295
|
+
},
|
|
296
|
+
finish(graceMs) {
|
|
297
|
+
finished ??= teardown(graceMs);
|
|
298
|
+
return finished;
|
|
299
|
+
},
|
|
300
|
+
};
|
|
301
|
+
}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EUPL-1.2
|
|
2
|
+
/**
|
|
3
|
+
* Combinators that validate an untrusted document and give it a TypeScript
|
|
4
|
+
* type. A schema is the single description of a document: its type is
|
|
5
|
+
* inferred with {@link Infer}, every refusal names the full key path, and
|
|
6
|
+
* {@link describeKeys} enumerates the keys with their documentation.
|
|
7
|
+
*
|
|
8
|
+
* const Config = s.object({
|
|
9
|
+
* name: s.string({ min: 1 }).describe('Display name'),
|
|
10
|
+
* jobs: s.int({ min: 1, max: 64 }).default(4),
|
|
11
|
+
* tags: s.array(s.string()).optional(),
|
|
12
|
+
* });
|
|
13
|
+
* type Config = Infer<typeof Config>; // { name: string; jobs: number; tags?: string[] }
|
|
14
|
+
*/
|
|
15
|
+
import { FireForgeError } from './errors.js';
|
|
16
|
+
import { nearest } from './text.js';
|
|
17
|
+
const INVALID = Symbol('invalid');
|
|
18
|
+
function show(value) {
|
|
19
|
+
const text = value === undefined ? 'undefined' : JSON.stringify(value);
|
|
20
|
+
return text.length > 60 ? `${text.slice(0, 57)}...` : text;
|
|
21
|
+
}
|
|
22
|
+
function refuse(issues, path, message) {
|
|
23
|
+
issues.push({ path, message });
|
|
24
|
+
return INVALID;
|
|
25
|
+
}
|
|
26
|
+
function childPath(path, key) {
|
|
27
|
+
if (typeof key === 'number')
|
|
28
|
+
return `${path}[${key}]`;
|
|
29
|
+
const segment = /^[\w$-]+$/.test(key) ? key : `[${JSON.stringify(key)}]`;
|
|
30
|
+
return path === '' || segment.startsWith('[') ? `${path}${segment}` : `${path}.${segment}`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A validator for one value. `Optional` is a type-level marker that makes the
|
|
34
|
+
* key optional in an enclosing {@link s.object}.
|
|
35
|
+
*/
|
|
36
|
+
export class Schema {
|
|
37
|
+
type;
|
|
38
|
+
check;
|
|
39
|
+
structure;
|
|
40
|
+
/** Documentation attached with {@link Schema.describe}. */
|
|
41
|
+
doc;
|
|
42
|
+
/** Whether an absent key is accepted. */
|
|
43
|
+
isOptional;
|
|
44
|
+
/** The value an absent key takes, when one was given with {@link Schema.default}. */
|
|
45
|
+
fallback;
|
|
46
|
+
/** @internal Use the combinators in {@link s}. */
|
|
47
|
+
constructor(
|
|
48
|
+
/** What the schema accepts, phrased to follow "must be". */
|
|
49
|
+
type,
|
|
50
|
+
/** @internal */
|
|
51
|
+
check,
|
|
52
|
+
/** @internal */
|
|
53
|
+
structure = {}, extra = {}) {
|
|
54
|
+
this.type = type;
|
|
55
|
+
this.check = check;
|
|
56
|
+
this.structure = structure;
|
|
57
|
+
this.doc = extra.doc;
|
|
58
|
+
this.isOptional = (extra.optional ?? false);
|
|
59
|
+
this.fallback = extra.fallback;
|
|
60
|
+
}
|
|
61
|
+
/** Validates without throwing, collecting every issue in the document. */
|
|
62
|
+
validate(value) {
|
|
63
|
+
const issues = [];
|
|
64
|
+
const checked = this.check(value, '', issues);
|
|
65
|
+
return checked === INVALID || issues.length > 0
|
|
66
|
+
? { ok: false, issues }
|
|
67
|
+
: { ok: true, value: checked };
|
|
68
|
+
}
|
|
69
|
+
/** Validates and returns the typed value, or throws one error listing every issue. */
|
|
70
|
+
parse(value, options = {}) {
|
|
71
|
+
const result = this.validate(value);
|
|
72
|
+
if (result.ok)
|
|
73
|
+
return result.value;
|
|
74
|
+
const { source, code, ...details } = options;
|
|
75
|
+
const lines = result.issues.map((issue) => `${issue.path === '' ? 'The document' : `"${issue.path}"`} ${issue.message}`);
|
|
76
|
+
const prefix = source === undefined ? '' : `${source}: `;
|
|
77
|
+
const message = lines.length === 1 ? `${prefix}${lines[0]}` : `${prefix}\n ${lines.join('\n ')}`;
|
|
78
|
+
throw new FireForgeError(code ?? 'document-invalid', message, details);
|
|
79
|
+
}
|
|
80
|
+
/** The same schema with a documentation string, shown by {@link describeKeys}. */
|
|
81
|
+
describe(doc) {
|
|
82
|
+
return new Schema(this.type, this.check, this.structure, { ...this.extra(), doc });
|
|
83
|
+
}
|
|
84
|
+
/** Accepts an absent (or `undefined`) value. In an object the key becomes optional. */
|
|
85
|
+
optional() {
|
|
86
|
+
const check = (value, path, issues) => value === undefined ? undefined : this.check(value, path, issues);
|
|
87
|
+
return new Schema(this.type, check, this.structure, { doc: this.doc, optional: true });
|
|
88
|
+
}
|
|
89
|
+
/** Fills in `value` when the key is absent. The result is never undefined. */
|
|
90
|
+
default(value) {
|
|
91
|
+
const check = (input, path, issues) => input === undefined ? value : this.check(input, path, issues);
|
|
92
|
+
return new Schema(this.type, check, this.structure, { doc: this.doc, fallback: { value } });
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Adds a constraint the combinators cannot express. `test` returns what is
|
|
96
|
+
* wrong, phrased to follow the key path ("must name an existing lane"), or
|
|
97
|
+
* undefined when the value is fine.
|
|
98
|
+
*/
|
|
99
|
+
refine(test) {
|
|
100
|
+
const check = (value, path, issues) => {
|
|
101
|
+
const checked = this.check(value, path, issues);
|
|
102
|
+
if (checked === INVALID || (checked === undefined && this.isOptional))
|
|
103
|
+
return checked;
|
|
104
|
+
const problem = test(checked);
|
|
105
|
+
return problem === undefined ? checked : refuse(issues, path, problem);
|
|
106
|
+
};
|
|
107
|
+
return new Schema(this.type, check, this.structure, this.extra());
|
|
108
|
+
}
|
|
109
|
+
extra() {
|
|
110
|
+
return {
|
|
111
|
+
doc: this.doc,
|
|
112
|
+
optional: this.isOptional,
|
|
113
|
+
...(this.fallback === undefined ? {} : { fallback: this.fallback }),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function primitive(type, accepts) {
|
|
118
|
+
return new Schema(type, (value, path, issues) => accepts(value) ? value : refuse(issues, path, `must be ${type} (got ${show(value)})`));
|
|
119
|
+
}
|
|
120
|
+
function range(noun, bounds) {
|
|
121
|
+
const { min, max } = bounds;
|
|
122
|
+
if (min !== undefined && max !== undefined)
|
|
123
|
+
return `${noun} between ${min} and ${max}`;
|
|
124
|
+
if (min !== undefined)
|
|
125
|
+
return `${noun} of at least ${min}`;
|
|
126
|
+
return max !== undefined ? `${noun} of at most ${max}` : noun;
|
|
127
|
+
}
|
|
128
|
+
function numeric(noun, bounds, accepts) {
|
|
129
|
+
return primitive(range(noun, bounds), (value) => typeof value === 'number' &&
|
|
130
|
+
accepts(value) &&
|
|
131
|
+
value >= (bounds.min ?? -Infinity) &&
|
|
132
|
+
value <= (bounds.max ?? Infinity));
|
|
133
|
+
}
|
|
134
|
+
function isPlainObject(value) {
|
|
135
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
136
|
+
}
|
|
137
|
+
function object(shape, options = {}) {
|
|
138
|
+
const known = Object.keys(shape);
|
|
139
|
+
const check = (value, path, issues) => {
|
|
140
|
+
if (!isPlainObject(value))
|
|
141
|
+
return refuse(issues, path, `must be an object (got ${show(value)})`);
|
|
142
|
+
const result = {};
|
|
143
|
+
let valid = true;
|
|
144
|
+
for (const key of Object.keys(value)) {
|
|
145
|
+
if (Object.hasOwn(shape, key))
|
|
146
|
+
continue;
|
|
147
|
+
if (options.unknownKeys === 'keep') {
|
|
148
|
+
result[key] = value[key];
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
const suggestion = nearest(key, known);
|
|
152
|
+
const hint = suggestion === undefined ? '' : ` Did you mean "${suggestion}"?`;
|
|
153
|
+
refuse(issues, childPath(path, key), `is not a known key.${hint}`);
|
|
154
|
+
valid = false;
|
|
155
|
+
}
|
|
156
|
+
for (const [key, schema] of Object.entries(shape)) {
|
|
157
|
+
const raw = value[key];
|
|
158
|
+
if (raw === undefined && !schema.isOptional && schema.fallback === undefined) {
|
|
159
|
+
refuse(issues, childPath(path, key), 'is required');
|
|
160
|
+
valid = false;
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
const checked = schema.check(raw, childPath(path, key), issues);
|
|
164
|
+
if (checked === INVALID)
|
|
165
|
+
valid = false;
|
|
166
|
+
else if (checked !== undefined)
|
|
167
|
+
result[key] = checked;
|
|
168
|
+
}
|
|
169
|
+
return valid ? result : INVALID;
|
|
170
|
+
};
|
|
171
|
+
return new Schema('an object', check, { shape });
|
|
172
|
+
}
|
|
173
|
+
function array(item, bounds = {}) {
|
|
174
|
+
const type = `an array of ${item.type}`;
|
|
175
|
+
const check = (value, path, issues) => {
|
|
176
|
+
if (!Array.isArray(value))
|
|
177
|
+
return refuse(issues, path, `must be ${type} (got ${show(value)})`);
|
|
178
|
+
if (value.length < (bounds.min ?? 0) || value.length > (bounds.max ?? Infinity)) {
|
|
179
|
+
return refuse(issues, path, `must have ${range('a length', bounds)} (got ${value.length})`);
|
|
180
|
+
}
|
|
181
|
+
const checked = value.map((entry, index) => item.check(entry, childPath(path, index), issues));
|
|
182
|
+
return checked.includes(INVALID) ? INVALID : checked;
|
|
183
|
+
};
|
|
184
|
+
return new Schema(type, check, { element: item });
|
|
185
|
+
}
|
|
186
|
+
function record(value, options = {}) {
|
|
187
|
+
const check = (input, path, issues) => {
|
|
188
|
+
if (!isPlainObject(input))
|
|
189
|
+
return refuse(issues, path, `must be an object (got ${show(input)})`);
|
|
190
|
+
const result = {};
|
|
191
|
+
let valid = true;
|
|
192
|
+
for (const [key, raw] of Object.entries(input)) {
|
|
193
|
+
const at = childPath(path, key);
|
|
194
|
+
const keyOk = options.key === undefined || options.key.check(key, at, issues) !== INVALID;
|
|
195
|
+
const checked = value.check(raw, at, issues);
|
|
196
|
+
if (!keyOk || checked === INVALID)
|
|
197
|
+
valid = false;
|
|
198
|
+
else
|
|
199
|
+
result[key] = checked;
|
|
200
|
+
}
|
|
201
|
+
return valid ? result : INVALID;
|
|
202
|
+
};
|
|
203
|
+
return new Schema(`an object of ${value.type}`, check, { element: value });
|
|
204
|
+
}
|
|
205
|
+
function union(...members) {
|
|
206
|
+
const type = members.map((member) => member.type).join(', or ');
|
|
207
|
+
const check = (value, path, issues) => {
|
|
208
|
+
const attempts = [];
|
|
209
|
+
for (const member of members) {
|
|
210
|
+
const own = [];
|
|
211
|
+
const checked = member.check(value, path, own);
|
|
212
|
+
if (checked !== INVALID && own.length === 0)
|
|
213
|
+
return checked;
|
|
214
|
+
attempts.push(own);
|
|
215
|
+
}
|
|
216
|
+
// A member that accepted the value's outer type and failed inside it is the
|
|
217
|
+
// one the author meant, so its issues are the useful ones.
|
|
218
|
+
const inner = attempts.filter((own) => own.every((issue) => issue.path !== path));
|
|
219
|
+
const [only] = inner;
|
|
220
|
+
if (inner.length === 1 && only !== undefined) {
|
|
221
|
+
issues.push(...only);
|
|
222
|
+
return INVALID;
|
|
223
|
+
}
|
|
224
|
+
return refuse(issues, path, `must be ${type} (got ${show(value)})`);
|
|
225
|
+
};
|
|
226
|
+
return new Schema(type, check);
|
|
227
|
+
}
|
|
228
|
+
/** The schema combinators. */
|
|
229
|
+
export const s = {
|
|
230
|
+
/** A string, optionally bounded in length or matching `pattern` (described by `format`). */
|
|
231
|
+
string(options = {}) {
|
|
232
|
+
const bounded = options.min !== undefined || options.max !== undefined;
|
|
233
|
+
const noun = options.format ??
|
|
234
|
+
(options.pattern !== undefined
|
|
235
|
+
? `a string matching ${String(options.pattern)}`
|
|
236
|
+
: options.min === 1 && options.max === undefined
|
|
237
|
+
? 'a non-empty string'
|
|
238
|
+
: range(bounded ? 'a string with a length' : 'a string', options));
|
|
239
|
+
return primitive(noun, (value) => typeof value === 'string' &&
|
|
240
|
+
value.length >= (options.min ?? 0) &&
|
|
241
|
+
value.length <= (options.max ?? Infinity) &&
|
|
242
|
+
(options.pattern?.test(value) ?? true));
|
|
243
|
+
},
|
|
244
|
+
/** A finite number within optional bounds. */
|
|
245
|
+
number: (bounds = {}) => numeric('a number', bounds, Number.isFinite),
|
|
246
|
+
/** A safe integer within optional bounds. */
|
|
247
|
+
int: (bounds = {}) => numeric('an integer', bounds, Number.isSafeInteger),
|
|
248
|
+
/** `true` or `false`. */
|
|
249
|
+
boolean: () => primitive('a boolean', (value) => typeof value === 'boolean'),
|
|
250
|
+
/** Exactly one value. */
|
|
251
|
+
literal: (expected) => primitive(show(expected), (value) => value === expected),
|
|
252
|
+
/** One of a fixed set of strings. */
|
|
253
|
+
enum: (values) => primitive(`one of: ${values.join(', ')}`, (value) => values.some((candidate) => candidate === value)),
|
|
254
|
+
/** Anything at all. For a subtree a later reader validates. */
|
|
255
|
+
unknown: () => new Schema('any value', (value) => value),
|
|
256
|
+
/**
|
|
257
|
+
* An object with exactly the keys of `shape`. An unknown key is refused,
|
|
258
|
+
* naming the nearest known one, unless `unknownKeys: 'keep'` passes it through.
|
|
259
|
+
*/
|
|
260
|
+
object,
|
|
261
|
+
/** An array of `item`, optionally bounded in length. */
|
|
262
|
+
array,
|
|
263
|
+
/** An object used as a dictionary: any keys (optionally validated), values of one schema. */
|
|
264
|
+
record,
|
|
265
|
+
/** The first member that accepts the value. */
|
|
266
|
+
union,
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Lists every key an object schema declares, depth first, including the
|
|
270
|
+
* containers. Arrays and dictionaries are values: their inside is not listed.
|
|
271
|
+
*
|
|
272
|
+
* @param schema - An object schema
|
|
273
|
+
* @param prefix - Path of `schema` itself within a larger document
|
|
274
|
+
*/
|
|
275
|
+
export function describeKeys(schema, prefix = '') {
|
|
276
|
+
const keys = [];
|
|
277
|
+
for (const [name, child] of Object.entries(schema.structure.shape ?? {})) {
|
|
278
|
+
const path = childPath(prefix, name);
|
|
279
|
+
keys.push({
|
|
280
|
+
path,
|
|
281
|
+
type: child.type,
|
|
282
|
+
doc: child.doc,
|
|
283
|
+
required: !child.isOptional && child.fallback === undefined,
|
|
284
|
+
container: child.structure.shape !== undefined,
|
|
285
|
+
schema: child,
|
|
286
|
+
});
|
|
287
|
+
keys.push(...describeKeys(child, path));
|
|
288
|
+
}
|
|
289
|
+
return keys;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* The schema of the value at a dotted key path, following object keys,
|
|
293
|
+
* dictionary keys and array indices, or undefined when the path names nothing.
|
|
294
|
+
*
|
|
295
|
+
* @param schema - The document's schema
|
|
296
|
+
* @param path - Dotted path such as `build.targets.0.name`
|
|
297
|
+
*/
|
|
298
|
+
export function schemaAt(schema, path) {
|
|
299
|
+
let current = schema;
|
|
300
|
+
for (const segment of path.split('.').filter((part) => part.length > 0)) {
|
|
301
|
+
if (current === undefined)
|
|
302
|
+
return undefined;
|
|
303
|
+
const { shape, element } = current.structure;
|
|
304
|
+
current =
|
|
305
|
+
shape === undefined ? element : Object.hasOwn(shape, segment) ? shape[segment] : undefined;
|
|
306
|
+
}
|
|
307
|
+
return current;
|
|
308
|
+
}
|