@hominis/fireforge 0.45.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/bin/fireforge.js +6 -0
  3. package/dist/build-info.json +4 -4
  4. package/dist/src/cli-usage-error.d.ts +46 -0
  5. package/dist/src/cli-usage-error.js +81 -0
  6. package/dist/src/cli.d.ts +5 -1
  7. package/dist/src/cli.js +20 -21
  8. package/dist/src/commands/bootstrap.js +1 -2
  9. package/dist/src/commands/build.js +15 -6
  10. package/dist/src/commands/destructive-decision.d.ts +19 -0
  11. package/dist/src/commands/destructive-decision.js +31 -0
  12. package/dist/src/commands/doctor-check-core.d.ts +0 -6
  13. package/dist/src/commands/doctor-check-core.js +0 -8
  14. package/dist/src/commands/doctor-orphaned-harness.d.ts +0 -6
  15. package/dist/src/commands/doctor-orphaned-harness.js +4 -12
  16. package/dist/src/commands/doctor-post-rebase-audit.js +1 -1
  17. package/dist/src/commands/doctor.d.ts +2 -0
  18. package/dist/src/commands/doctor.js +7 -8
  19. package/dist/src/commands/download.js +35 -24
  20. package/dist/src/commands/export-all.js +21 -4
  21. package/dist/src/commands/export-flow.js +15 -45
  22. package/dist/src/commands/export-placement-conflicts.js +3 -3
  23. package/dist/src/commands/export-placement-gate.js +2 -8
  24. package/dist/src/commands/export-placement-policy.js +3 -5
  25. package/dist/src/commands/export-shared.d.ts +42 -23
  26. package/dist/src/commands/export-shared.js +4 -19
  27. package/dist/src/commands/export.js +10 -1
  28. package/dist/src/commands/furnace/authoring-config.d.ts +13 -0
  29. package/dist/src/commands/furnace/authoring-config.js +19 -0
  30. package/dist/src/commands/furnace/chrome-doc-remove.js +1 -1
  31. package/dist/src/commands/furnace/create-browser-test.js +3 -8
  32. package/dist/src/commands/furnace/create-dry-run.js +2 -5
  33. package/dist/src/commands/furnace/create-templates.d.ts +17 -1
  34. package/dist/src/commands/furnace/create-templates.js +2 -1
  35. package/dist/src/commands/furnace/create.js +25 -19
  36. package/dist/src/commands/furnace/deploy.js +11 -2
  37. package/dist/src/commands/furnace/init.js +2 -1
  38. package/dist/src/commands/furnace/override.js +28 -19
  39. package/dist/src/commands/furnace/refresh.js +9 -1
  40. package/dist/src/commands/furnace/remove-mutations.d.ts +6 -7
  41. package/dist/src/commands/furnace/remove-mutations.js +0 -1
  42. package/dist/src/commands/furnace/remove.js +2 -6
  43. package/dist/src/commands/furnace/rename-browser-test.js +1 -7
  44. package/dist/src/commands/furnace/rename.js +29 -29
  45. package/dist/src/commands/furnace/status.js +12 -9
  46. package/dist/src/commands/furnace/test-file-name.d.ts +28 -0
  47. package/dist/src/commands/furnace/test-file-name.js +39 -0
  48. package/dist/src/commands/furnace/validation-output.d.ts +21 -9
  49. package/dist/src/commands/furnace/validation-output.js +3 -8
  50. package/dist/src/commands/import.js +2 -9
  51. package/dist/src/commands/lint-per-patch.d.ts +2 -2
  52. package/dist/src/commands/lint-per-patch.js +19 -4
  53. package/dist/src/commands/lint-per-run-checkjs.d.ts +2 -2
  54. package/dist/src/commands/lint.d.ts +2 -1
  55. package/dist/src/commands/lint.js +1 -1
  56. package/dist/src/commands/manifest.js +1 -1
  57. package/dist/src/commands/package.js +2 -4
  58. package/dist/src/commands/patch/compact.js +14 -15
  59. package/dist/src/commands/patch/delete.js +15 -25
  60. package/dist/src/commands/patch/entry-projection.d.ts +13 -0
  61. package/dist/src/commands/patch/entry-projection.js +24 -0
  62. package/dist/src/commands/patch/lint-ignore.d.ts +0 -8
  63. package/dist/src/commands/patch/lint-ignore.js +19 -29
  64. package/dist/src/commands/patch/move-files-create.js +24 -10
  65. package/dist/src/commands/patch/move-files-into.js +38 -34
  66. package/dist/src/commands/patch/move-files.js +4 -13
  67. package/dist/src/commands/patch/rename.js +27 -41
  68. package/dist/src/commands/patch/reorder.js +25 -38
  69. package/dist/src/commands/patch/split-plan.d.ts +4 -5
  70. package/dist/src/commands/patch/split-plan.js +4 -8
  71. package/dist/src/commands/patch/split.js +45 -43
  72. package/dist/src/commands/patch/staged-dependency.js +16 -22
  73. package/dist/src/commands/patch/tier.js +15 -25
  74. package/dist/src/commands/patch-rename-map.d.ts +19 -0
  75. package/dist/src/commands/patch-rename-map.js +36 -0
  76. package/dist/src/commands/pending-resolution.d.ts +15 -0
  77. package/dist/src/commands/pending-resolution.js +25 -0
  78. package/dist/src/commands/re-export-adjacent.d.ts +24 -2
  79. package/dist/src/commands/re-export-adjacent.js +32 -16
  80. package/dist/src/commands/re-export-bulk-scan.js +6 -10
  81. package/dist/src/commands/re-export-drift.js +4 -4
  82. package/dist/src/commands/re-export-files.d.ts +2 -3
  83. package/dist/src/commands/re-export-files.js +38 -29
  84. package/dist/src/commands/re-export-lint.d.ts +3 -4
  85. package/dist/src/commands/re-export-lint.js +9 -2
  86. package/dist/src/commands/re-export-scan.js +5 -2
  87. package/dist/src/commands/re-export-single.d.ts +22 -3
  88. package/dist/src/commands/re-export-single.js +19 -11
  89. package/dist/src/commands/re-export.js +28 -11
  90. package/dist/src/commands/rebase/abort.js +3 -8
  91. package/dist/src/commands/rebase/continue.js +12 -12
  92. package/dist/src/commands/rebase/index.js +2 -2
  93. package/dist/src/commands/rebase/patch-loop.d.ts +2 -2
  94. package/dist/src/commands/rebase/patch-loop.js +2 -7
  95. package/dist/src/commands/resolve.js +18 -10
  96. package/dist/src/commands/run.d.ts +0 -13
  97. package/dist/src/commands/run.js +12 -25
  98. package/dist/src/commands/setup-support.d.ts +16 -4
  99. package/dist/src/commands/setup-support.js +16 -16
  100. package/dist/src/commands/setup.js +3 -9
  101. package/dist/src/commands/source.js +8 -1
  102. package/dist/src/commands/status-check.js +2 -2
  103. package/dist/src/commands/status-output.js +2 -2
  104. package/dist/src/commands/status.js +3 -4
  105. package/dist/src/commands/test-build-phase.d.ts +2 -2
  106. package/dist/src/commands/test-build-phase.js +31 -7
  107. package/dist/src/commands/test-modes.d.ts +2 -2
  108. package/dist/src/commands/test-modes.js +0 -1
  109. package/dist/src/commands/test-register.js +5 -3
  110. package/dist/src/commands/test-run.js +25 -18
  111. package/dist/src/commands/test-stale-gate.js +4 -4
  112. package/dist/src/commands/test-verdict.d.ts +16 -2
  113. package/dist/src/commands/test-verdict.js +18 -3
  114. package/dist/src/commands/test.js +42 -5
  115. package/dist/src/commands/token-list.d.ts +26 -0
  116. package/dist/src/commands/token-list.js +153 -0
  117. package/dist/src/commands/token.js +17 -1
  118. package/dist/src/commands/tree.js +7 -2
  119. package/dist/src/commands/typecheck.js +9 -9
  120. package/dist/src/commands/wire.js +4 -3
  121. package/dist/src/core/branding.d.ts +0 -7
  122. package/dist/src/core/branding.js +3 -2
  123. package/dist/src/core/browser-wire.js +6 -3
  124. package/dist/src/core/build-audit-platform.d.ts +29 -0
  125. package/dist/src/core/build-audit-platform.js +140 -0
  126. package/dist/src/core/build-audit-registration.js +3 -2
  127. package/dist/src/core/build-audit-skip.d.ts +57 -0
  128. package/dist/src/core/build-audit-skip.js +112 -0
  129. package/dist/src/core/build-audit.d.ts +15 -2
  130. package/dist/src/core/build-audit.js +110 -10
  131. package/dist/src/core/build-baseline.d.ts +45 -28
  132. package/dist/src/core/build-baseline.js +6 -29
  133. package/dist/src/core/build-jar-escalation.js +3 -2
  134. package/dist/src/core/build-overwrite-guard.js +1 -1
  135. package/dist/src/core/build-prepare.d.ts +0 -8
  136. package/dist/src/core/build-prepare.js +7 -12
  137. package/dist/src/core/config-paths.d.ts +2 -6
  138. package/dist/src/core/config-paths.js +4 -2
  139. package/dist/src/core/config-state.d.ts +0 -6
  140. package/dist/src/core/config-state.js +1 -19
  141. package/dist/src/core/config-validate-build-audit.d.ts +8 -0
  142. package/dist/src/core/config-validate-build-audit.js +80 -0
  143. package/dist/src/core/config-validate-file-size.js +1 -1
  144. package/dist/src/core/config-validate-patch-policy.d.ts +2 -2
  145. package/dist/src/core/config-validate-patch-policy.js +3 -3
  146. package/dist/src/core/config-validate-test-toolchains.d.ts +2 -2
  147. package/dist/src/core/config-validate-test-toolchains.js +4 -5
  148. package/dist/src/core/config-validate.js +14 -3
  149. package/dist/src/core/config.d.ts +2 -2
  150. package/dist/src/core/config.js +11 -15
  151. package/dist/src/core/coverage-extend.js +4 -4
  152. package/dist/src/core/discard-baseline.js +7 -7
  153. package/dist/src/core/engine-precondition.d.ts +1 -9
  154. package/dist/src/core/engine-precondition.js +3 -8
  155. package/dist/src/core/engine-session-lock.js +13 -17
  156. package/dist/src/core/export-moved-code-shape.js +2 -2
  157. package/dist/src/core/file-lock-owner.d.ts +103 -0
  158. package/dist/src/core/file-lock-owner.js +259 -0
  159. package/dist/src/core/file-lock.d.ts +2 -7
  160. package/dist/src/core/file-lock.js +40 -91
  161. package/dist/src/core/firefox-cache.d.ts +13 -1
  162. package/dist/src/core/firefox-cache.js +59 -34
  163. package/dist/src/core/firefox-download.d.ts +15 -0
  164. package/dist/src/core/firefox-download.js +37 -21
  165. package/dist/src/core/firefox-extract.d.ts +6 -5
  166. package/dist/src/core/firefox-extract.js +36 -18
  167. package/dist/src/core/firefox.d.ts +30 -32
  168. package/dist/src/core/firefox.js +5 -36
  169. package/dist/src/core/furnace-apply-dry-run.d.ts +1 -6
  170. package/dist/src/core/furnace-apply-dry-run.js +1 -7
  171. package/dist/src/core/furnace-apply-helpers.d.ts +0 -11
  172. package/dist/src/core/furnace-apply-helpers.js +8 -19
  173. package/dist/src/core/furnace-apply-overwrite-warn.js +4 -2
  174. package/dist/src/core/furnace-apply.d.ts +1 -1
  175. package/dist/src/core/furnace-apply.js +30 -10
  176. package/dist/src/core/furnace-config.d.ts +1 -1
  177. package/dist/src/core/furnace-config.js +23 -36
  178. package/dist/src/core/furnace-constants.js +3 -2
  179. package/dist/src/core/furnace-dir-entry.d.ts +20 -0
  180. package/dist/src/core/furnace-dir-entry.js +21 -0
  181. package/dist/src/core/furnace-operation.d.ts +2 -0
  182. package/dist/src/core/furnace-operation.js +3 -1
  183. package/dist/src/core/furnace-refresh.d.ts +18 -6
  184. package/dist/src/core/furnace-refresh.js +3 -6
  185. package/dist/src/core/furnace-registration-ast.d.ts +0 -1
  186. package/dist/src/core/furnace-registration-ast.js +0 -3
  187. package/dist/src/core/furnace-registration.d.ts +2 -1
  188. package/dist/src/core/furnace-registration.js +22 -29
  189. package/dist/src/core/furnace-scanner.js +3 -6
  190. package/dist/src/core/furnace-state-persist.d.ts +2 -2
  191. package/dist/src/core/furnace-validate-registration.js +5 -7
  192. package/dist/src/core/git-base.d.ts +3 -1
  193. package/dist/src/core/git-base.js +25 -3
  194. package/dist/src/core/git-diff-new-file.d.ts +40 -0
  195. package/dist/src/core/git-diff-new-file.js +119 -0
  196. package/dist/src/core/git-diff.d.ts +9 -9
  197. package/dist/src/core/git-diff.js +88 -157
  198. package/dist/src/core/git-file-ops.d.ts +0 -7
  199. package/dist/src/core/git-file-ops.js +4 -28
  200. package/dist/src/core/git-readonly-index.d.ts +0 -2
  201. package/dist/src/core/git-readonly-index.js +0 -4
  202. package/dist/src/core/git-status.d.ts +7 -0
  203. package/dist/src/core/git-status.js +21 -9
  204. package/dist/src/core/git.d.ts +0 -6
  205. package/dist/src/core/git.js +14 -43
  206. package/dist/src/core/harness-orphans.js +8 -7
  207. package/dist/src/core/history-log.d.ts +19 -0
  208. package/dist/src/core/history-log.js +29 -0
  209. package/dist/src/core/mach-error-hints.d.ts +0 -5
  210. package/dist/src/core/mach-error-hints.js +1 -1
  211. package/dist/src/core/mach-known-noise-filter.d.ts +4 -3
  212. package/dist/src/core/mach-known-noise-filter.js +7 -9
  213. package/dist/src/core/mach-mozconfig.js +2 -1
  214. package/dist/src/core/mach-python.d.ts +2 -0
  215. package/dist/src/core/mach-python.js +12 -7
  216. package/dist/src/core/mach-resource-shim.d.ts +13 -1
  217. package/dist/src/core/mach-resource-shim.js +112 -9
  218. package/dist/src/core/mach.d.ts +39 -53
  219. package/dist/src/core/mach.js +13 -81
  220. package/dist/src/core/marionette-port.d.ts +0 -17
  221. package/dist/src/core/marionette-port.js +12 -58
  222. package/dist/src/core/marionette-preflight.js +9 -27
  223. package/dist/src/core/mochitest-server-port.js +3 -3
  224. package/dist/src/core/moz-manifest-rules.js +37 -33
  225. package/dist/src/core/patch-apply-fuzz.js +4 -4
  226. package/dist/src/core/patch-apply.d.ts +4 -5
  227. package/dist/src/core/patch-apply.js +6 -12
  228. package/dist/src/core/patch-export-coverage.d.ts +0 -9
  229. package/dist/src/core/patch-export-coverage.js +1 -30
  230. package/dist/src/core/patch-export-update.d.ts +18 -1
  231. package/dist/src/core/patch-export-update.js +4 -3
  232. package/dist/src/core/patch-export.d.ts +11 -21
  233. package/dist/src/core/patch-export.js +44 -66
  234. package/dist/src/core/patch-files.d.ts +0 -4
  235. package/dist/src/core/patch-files.js +0 -11
  236. package/dist/src/core/patch-lint-binary.d.ts +6 -12
  237. package/dist/src/core/patch-lint-cache.d.ts +17 -1
  238. package/dist/src/core/patch-lint-cache.js +3 -6
  239. package/dist/src/core/patch-lint-checkjs.d.ts +33 -16
  240. package/dist/src/core/patch-lint-checkjs.js +37 -24
  241. package/dist/src/core/patch-lint-creators.d.ts +2 -6
  242. package/dist/src/core/patch-lint-cross.d.ts +16 -8
  243. package/dist/src/core/patch-lint-cross.js +49 -92
  244. package/dist/src/core/patch-lint-css.js +10 -6
  245. package/dist/src/core/patch-lint-file-size.js +3 -3
  246. package/dist/src/core/patch-lint-forward-registration.d.ts +58 -0
  247. package/dist/src/core/patch-lint-forward-registration.js +210 -0
  248. package/dist/src/core/patch-lint-jsdoc.js +36 -36
  249. package/dist/src/core/patch-lint-module-registration.d.ts +2 -8
  250. package/dist/src/core/patch-lint-prettier.js +1 -1
  251. package/dist/src/core/patch-lint-queue-types.d.ts +60 -0
  252. package/dist/src/core/patch-lint-queue-types.js +12 -0
  253. package/dist/src/core/patch-lint-staged-registration.d.ts +61 -0
  254. package/dist/src/core/patch-lint-staged-registration.js +90 -0
  255. package/dist/src/core/patch-lint.d.ts +14 -9
  256. package/dist/src/core/patch-lint.js +4 -3
  257. package/dist/src/core/patch-lock.js +3 -3
  258. package/dist/src/core/patch-manifest-io.js +8 -7
  259. package/dist/src/core/patch-parse.d.ts +19 -8
  260. package/dist/src/core/patch-parse.js +25 -0
  261. package/dist/src/core/patch-policy.js +15 -27
  262. package/dist/src/core/patch-source-metadata.d.ts +1 -3
  263. package/dist/src/core/patch-source-metadata.js +0 -4
  264. package/dist/src/core/patch-transform.d.ts +0 -8
  265. package/dist/src/core/patch-transform.js +0 -10
  266. package/dist/src/core/process-cpu-time.js +1 -1
  267. package/dist/src/core/rebase-session.d.ts +2 -8
  268. package/dist/src/core/rebase-session.js +5 -17
  269. package/dist/src/core/register-browser-content.js +3 -2
  270. package/dist/src/core/register-browser-test.js +2 -1
  271. package/dist/src/core/register-module.js +2 -1
  272. package/dist/src/core/register-scaffold.js +5 -4
  273. package/dist/src/core/register-shared-css.js +2 -1
  274. package/dist/src/core/run-log-redact.d.ts +38 -0
  275. package/dist/src/core/run-log-redact.js +69 -0
  276. package/dist/src/core/run-log.d.ts +13 -2
  277. package/dist/src/core/run-log.js +67 -18
  278. package/dist/src/core/signal-critical.js +2 -4
  279. package/dist/src/core/smoke-patterns.d.ts +0 -1
  280. package/dist/src/core/smoke-patterns.js +6 -11
  281. package/dist/src/core/state-file.d.ts +12 -1
  282. package/dist/src/core/state-file.js +14 -1
  283. package/dist/src/core/status-classify.js +2 -1
  284. package/dist/src/core/test-changed-prefs.js +26 -11
  285. package/dist/src/core/test-harness-crash.js +2 -2
  286. package/dist/src/core/test-stale-check.d.ts +0 -2
  287. package/dist/src/core/test-stale-check.js +2 -2
  288. package/dist/src/core/test-xpcshell-retry.d.ts +26 -7
  289. package/dist/src/core/test-xpcshell-retry.js +14 -11
  290. package/dist/src/core/token-category.d.ts +33 -0
  291. package/dist/src/core/token-category.js +56 -48
  292. package/dist/src/core/token-dark-mode.js +2 -14
  293. package/dist/src/core/token-inventory.d.ts +56 -0
  294. package/dist/src/core/token-inventory.js +109 -0
  295. package/dist/src/core/token-manager.d.ts +1 -1
  296. package/dist/src/core/token-manager.js +1 -1
  297. package/dist/src/core/token-variant.js +21 -22
  298. package/dist/src/core/toolchain-preflight.js +1 -1
  299. package/dist/src/core/tree-cow.d.ts +0 -2
  300. package/dist/src/core/tree-cow.js +2 -2
  301. package/dist/src/core/tree-store.js +4 -5
  302. package/dist/src/core/typecheck.js +2 -2
  303. package/dist/src/core/wire-dom-fragment.js +6 -17
  304. package/dist/src/core/wire-utils.js +5 -17
  305. package/dist/src/core/xpcshell-appdir.js +2 -4
  306. package/dist/src/errors/base.d.ts +53 -1
  307. package/dist/src/errors/base.js +79 -11
  308. package/dist/src/errors/build.js +20 -28
  309. package/dist/src/errors/config.d.ts +0 -14
  310. package/dist/src/errors/config.js +13 -34
  311. package/dist/src/errors/download.d.ts +13 -0
  312. package/dist/src/errors/download.js +53 -24
  313. package/dist/src/errors/furnace.js +8 -9
  314. package/dist/src/errors/git.d.ts +8 -8
  315. package/dist/src/errors/git.js +20 -30
  316. package/dist/src/errors/patch.js +8 -10
  317. package/dist/src/errors/rebase.js +7 -7
  318. package/dist/src/types/commands/options.d.ts +77 -123
  319. package/dist/src/types/config.d.ts +34 -2
  320. package/dist/src/types/index.d.ts +0 -1
  321. package/dist/src/utils/assert.d.ts +3 -15
  322. package/dist/src/utils/assert.js +1 -18
  323. package/dist/src/utils/build-info.d.ts +1 -1
  324. package/dist/src/utils/child-env.d.ts +2 -1
  325. package/dist/src/utils/elapsed.js +10 -1
  326. package/dist/src/utils/fs.js +8 -13
  327. package/dist/src/utils/hash.d.ts +12 -0
  328. package/dist/src/utils/hash.js +16 -0
  329. package/dist/src/utils/line-dispatch.d.ts +15 -0
  330. package/dist/src/utils/line-dispatch.js +48 -0
  331. package/dist/src/utils/options.d.ts +1 -7
  332. package/dist/src/utils/options.js +6 -7
  333. package/dist/src/utils/package-root.js +3 -12
  334. package/dist/src/utils/platform.d.ts +0 -4
  335. package/dist/src/utils/process-group.d.ts +2 -1
  336. package/dist/src/utils/process-group.js +20 -19
  337. package/dist/src/utils/process.d.ts +40 -26
  338. package/dist/src/utils/process.js +115 -166
  339. package/dist/src/utils/ps-duration.js +3 -3
  340. package/dist/src/utils/sleep.d.ts +26 -0
  341. package/dist/src/utils/sleep.js +31 -0
  342. package/dist/src/utils/validation.d.ts +2 -38
  343. package/dist/src/utils/validation.js +7 -16
  344. package/docs/configuration.md +89 -1
  345. package/docs/exit-codes.md +31 -19
  346. package/docs/lifecycle-invariants.md +18 -12
  347. package/docs/machine-output.md +31 -8
  348. package/docs/patch-workflow.md +2 -1
  349. package/docs/run-logs.md +44 -4
  350. package/docs/testing.md +8 -1
  351. package/package.json +8 -7
  352. package/dist/src/commands/rebase.d.ts +0 -4
  353. package/dist/src/commands/rebase.js +0 -5
  354. package/dist/src/core/patch-artifact-normalize.d.ts +0 -21
  355. package/dist/src/core/patch-artifact-normalize.js +0 -24
  356. package/dist/src/core/patch-lint-reexports.d.ts +0 -7
  357. package/dist/src/core/patch-lint-reexports.js +0 -8
  358. package/dist/src/core/wire-targets.d.ts +0 -7
  359. package/dist/src/core/wire-targets.js +0 -8
@@ -1,17 +1,24 @@
1
1
  import { FireForgeError } from './base.js';
2
+ import { ExitCode } from './codes.js';
2
3
  /**
3
4
  * Error thrown when a git operation fails.
4
5
  */
5
6
  export declare class GitError extends FireForgeError {
6
7
  readonly command?: string | undefined;
7
- readonly code: 4;
8
+ readonly code: ExitCode;
8
9
  constructor(message: string, command?: string | undefined, cause?: Error);
9
10
  get userMessage(): string;
10
11
  }
11
12
  /**
12
13
  * Error thrown when git is not installed.
14
+ *
15
+ * MISSING_DEPENDENCY, not GIT_ERROR: the fact is "a required tool is
16
+ * absent", the same fact `PythonNotFoundError` and `MachNotFoundError`
17
+ * report, and a consumer should install something rather than inspect a
18
+ * repository.
13
19
  */
14
20
  export declare class GitNotFoundError extends GitError {
21
+ readonly code: 7;
15
22
  constructor();
16
23
  get userMessage(): string;
17
24
  }
@@ -23,13 +30,6 @@ export declare class PatchApplyError extends GitError {
23
30
  constructor(patchPath: string, cause?: Error);
24
31
  get userMessage(): string;
25
32
  }
26
- /**
27
- * Error thrown when the repository is in a dirty state.
28
- */
29
- export declare class DirtyRepositoryError extends GitError {
30
- constructor();
31
- get userMessage(): string;
32
- }
33
33
  /**
34
34
  * Error thrown when a stale git index lock blocks repository initialization.
35
35
  */
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: EUPL-1.2
2
- import { FireForgeError } from './base.js';
2
+ import { FireForgeError, remedies } from './base.js';
3
3
  import { ExitCode } from './codes.js';
4
4
  /**
5
5
  * Error thrown when a git operation fails.
@@ -12,21 +12,25 @@ export class GitError extends FireForgeError {
12
12
  this.command = command;
13
13
  }
14
14
  get userMessage() {
15
- let msg = `Git Error: ${this.message}`;
16
- if (this.command) {
17
- msg += `\n\nCommand: git ${this.command}`;
18
- }
19
- msg += '\n\nTo fix this:\n';
20
- msg += ' 1. Ensure git is installed and in your PATH\n';
21
- msg += ' 2. Check if the repository is in a valid state\n';
22
- msg += ' 3. Try running "fireforge reset" to start fresh';
23
- return msg;
15
+ return (`Git Error: ${this.message}` +
16
+ (this.command ? `\n\nCommand: git ${this.command}` : '') +
17
+ remedies([
18
+ 'Ensure git is installed and in your PATH',
19
+ 'Check if the repository is in a valid state',
20
+ 'Try running "fireforge reset" to start fresh',
21
+ ]));
24
22
  }
25
23
  }
26
24
  /**
27
25
  * Error thrown when git is not installed.
26
+ *
27
+ * MISSING_DEPENDENCY, not GIT_ERROR: the fact is "a required tool is
28
+ * absent", the same fact `PythonNotFoundError` and `MachNotFoundError`
29
+ * report, and a consumer should install something rather than inspect a
30
+ * repository.
28
31
  */
29
32
  export class GitNotFoundError extends GitError {
33
+ code = ExitCode.MISSING_DEPENDENCY;
30
34
  constructor() {
31
35
  super('Git is not installed or not found in PATH');
32
36
  }
@@ -50,26 +54,12 @@ export class PatchApplyError extends GitError {
50
54
  get userMessage() {
51
55
  return (`Git Error: Failed to apply patch.\n\n` +
52
56
  `Patch: ${this.patchPath}\n\n` +
53
- 'This usually means the patch conflicts with existing changes.\n\n' +
54
- 'To fix this:\n' +
55
- ' 1. Check if the Firefox version matches the patch\n' +
56
- ' 2. Use "fireforge reset" to start with clean source\n' +
57
- ' 3. Update the patch to match the current Firefox version');
58
- }
59
- }
60
- /**
61
- * Error thrown when the repository is in a dirty state.
62
- */
63
- export class DirtyRepositoryError extends GitError {
64
- constructor() {
65
- super('Repository has uncommitted changes');
66
- }
67
- get userMessage() {
68
- return ('Git Error: The Firefox source has uncommitted changes.\n\n' +
69
- 'To fix this:\n' +
70
- ' 1. Export your changes with "fireforge export"\n' +
71
- ' 2. Use "fireforge reset" to restore clean state\n' +
72
- ' 3. Then run "fireforge import" to reapply patches');
57
+ 'This usually means the patch conflicts with existing changes.' +
58
+ remedies([
59
+ 'Check if the Firefox version matches the patch',
60
+ 'Use "fireforge reset" to start with clean source',
61
+ 'Update the patch to match the current Firefox version',
62
+ ]));
73
63
  }
74
64
  }
75
65
  /**
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: EUPL-1.2
2
- import { FireForgeError } from './base.js';
2
+ import { FireForgeError, remedies } from './base.js';
3
3
  import { ExitCode } from './codes.js';
4
4
  /**
5
5
  * Error thrown when `patches.json` exists but cannot be parsed or validated.
@@ -41,14 +41,12 @@ export class PatchError extends FireForgeError {
41
41
  this.patchName = patchName;
42
42
  }
43
43
  get userMessage() {
44
- let msg = `Patch Error: ${this.message}`;
45
- if (this.patchName) {
46
- msg += `\n\nPatch: ${this.patchName}`;
47
- }
48
- msg += '\n\nTo fix this:\n';
49
- msg += ' 1. Check if the patch is compatible with the Firefox version\n';
50
- msg += ' 2. Use "fireforge reset" to start with clean source\n';
51
- msg += ' 3. Update the patch for the current Firefox version';
52
- return msg;
44
+ return (`Patch Error: ${this.message}` +
45
+ (this.patchName ? `\n\nPatch: ${this.patchName}` : '') +
46
+ remedies([
47
+ 'Check if the patch is compatible with the Firefox version',
48
+ 'Use "fireforge reset" to start with clean source',
49
+ 'Update the patch for the current Firefox version',
50
+ ]));
53
51
  }
54
52
  }
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: EUPL-1.2
2
- import { FireForgeError } from './base.js';
2
+ import { FireForgeError, remedies } from './base.js';
3
3
  import { ExitCode } from './codes.js';
4
4
  /**
5
5
  * Base error for rebase operations.
@@ -7,12 +7,12 @@ import { ExitCode } from './codes.js';
7
7
  export class RebaseError extends FireForgeError {
8
8
  code = ExitCode.PATCH_ERROR;
9
9
  get userMessage() {
10
- let msg = `Rebase Error: ${this.message}`;
11
- msg += '\n\nTo fix this:\n';
12
- msg += ' 1. Check the error message above for specifics\n';
13
- msg += ' 2. Use "fireforge rebase --continue" to resume an interrupted rebase\n';
14
- msg += ' 3. Use "fireforge rebase --abort" to cancel and restore engine state';
15
- return msg;
10
+ return (`Rebase Error: ${this.message}` +
11
+ remedies([
12
+ 'Check the error message above for specifics',
13
+ 'Use "fireforge rebase --continue" to resume an interrupted rebase',
14
+ 'Use "fireforge rebase --abort" to cancel and restore engine state',
15
+ ]));
16
16
  }
17
17
  }
18
18
  /**
@@ -3,6 +3,61 @@
3
3
  */
4
4
  import type { FirefoxProduct, ProjectLicense } from '../config.js';
5
5
  import type { PatchCategory } from './patches.js';
6
+ /**
7
+ * `--dry-run`: print the planned change and exit without writing anything.
8
+ *
9
+ * Twenty-four option types spelled this field with five different doc
10
+ * comments for one behaviour. The contract is uniform and load-bearing — a
11
+ * dry run must perform every check the real run does and then write nothing —
12
+ * so it is stated once.
13
+ */
14
+ export interface DryRunnable {
15
+ /** Print the planned change without writing anything. */
16
+ dryRun?: boolean;
17
+ }
18
+ /**
19
+ * `--yes`: answer the confirmation prompt non-interactively.
20
+ *
21
+ * Required for non-TTY runs, where there is no prompt to answer. It waives
22
+ * the prompt only — never a safety gate; flags that waive a refusal are
23
+ * spelled `--force*` and live on their own types.
24
+ */
25
+ export interface Confirmable {
26
+ /** Skip the confirmation prompt; required for non-TTY runs. */
27
+ yes?: boolean;
28
+ }
29
+ /**
30
+ * `--force-unsafe`: proceed past a refusal the command would otherwise raise.
31
+ *
32
+ * Distinct from {@link Confirmable}: this waives a correctness gate (a
33
+ * projected-lint failure, a patchPolicy violation), not a prompt.
34
+ */
35
+ export interface UnsafeOverridable {
36
+ /** Bypass refusals the command would otherwise raise. */
37
+ forceUnsafe?: boolean;
38
+ }
39
+ /**
40
+ * `--wait-lock [seconds]` for commands that take the ENGINE SESSION lock.
41
+ *
42
+ * Parsed at the CLI layer (`true` for the bare flag, meaning 60 seconds) and
43
+ * consumed there to bound the wait; the command implementation ignores it.
44
+ */
45
+ export interface EngineLockWaitable {
46
+ /** Parsed `--wait-lock [seconds]` value; `true` means the 60-second default. */
47
+ waitLock?: number | boolean;
48
+ }
49
+ /**
50
+ * `--wait-lock [seconds]` for commands that mutate patch metadata under the
51
+ * PATCH DIRECTORY lock.
52
+ *
53
+ * Deliberately separate from {@link EngineLockWaitable}: the two flags share a
54
+ * spelling but bound different locks, and a reader needs to know which one a
55
+ * command contends for.
56
+ */
57
+ export interface PatchLockWaitable {
58
+ /** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
59
+ waitLock?: number | boolean;
60
+ }
6
61
  /**
7
62
  * Options for the setup command.
8
63
  */
@@ -51,7 +106,7 @@ export interface SourceSetOptions {
51
106
  /**
52
107
  * Options for the build command.
53
108
  */
54
- export interface BuildOptions {
109
+ export interface BuildOptions extends EngineLockWaitable {
55
110
  /** Fast UI-only rebuild */
56
111
  ui?: boolean;
57
112
  /** Number of parallel jobs */
@@ -74,17 +129,11 @@ export interface BuildOptions {
74
129
  * multi-session checkout wants the hard stop.
75
130
  */
76
131
  refuseUnexportedDrift?: boolean;
77
- /**
78
- * Parsed `--wait-lock [seconds]` value (`true` for the bare flag, meaning
79
- * 60). Consumed at the CLI layer to bound the engine-session-lock wait;
80
- * the command implementation ignores it.
81
- */
82
- waitLock?: number | boolean;
83
132
  }
84
133
  /**
85
134
  * Options for the export command.
86
135
  */
87
- export interface ExportOptions {
136
+ export interface ExportOptions extends EngineLockWaitable {
88
137
  /** Name/description for the patch */
89
138
  name?: string;
90
139
  /** Category classification */
@@ -130,12 +179,6 @@ export interface ExportOptions {
130
179
  * another patch, because the resulting queue fails `verify` immediately.
131
180
  */
132
181
  allowOverlap?: boolean;
133
- /**
134
- * Parsed `--wait-lock [seconds]` value (`true` for the bare flag, meaning
135
- * 60). Consumed at the CLI layer to bound the engine-session-lock wait;
136
- * the command implementation ignores it.
137
- */
138
- waitLock?: number | boolean;
139
182
  /**
140
183
  * Force a tier override on the new patch's `PatchMetadata.tier`. Only
141
184
  * `"branding"` is currently recognised — Commander rejects other values
@@ -158,16 +201,14 @@ export interface ExportOptions {
158
201
  /**
159
202
  * Options for the reset command.
160
203
  */
161
- export interface ResetOptions {
162
- /** Skip confirmation prompt */
163
- yes?: boolean;
204
+ export interface ResetOptions extends Confirmable {
164
205
  /** Show what would be reset without doing it */
165
206
  dryRun?: boolean;
166
207
  }
167
208
  /**
168
209
  * Options for the discard command.
169
210
  */
170
- export interface DiscardOptions {
211
+ export interface DiscardOptions extends Confirmable {
171
212
  /**
172
213
  * Restore to pristine upstream (HEAD) instead of the patch-applied
173
214
  * baseline, deleting patch-created files.
@@ -175,8 +216,6 @@ export interface DiscardOptions {
175
216
  toUpstream?: boolean;
176
217
  /** Show what would be discarded without doing it */
177
218
  dryRun?: boolean;
178
- /** Skip confirmation prompt */
179
- yes?: boolean;
180
219
  }
181
220
  /**
182
221
  * Options for the package command.
@@ -212,7 +251,7 @@ export interface ImportOptions {
212
251
  /**
213
252
  * Options for the re-export command.
214
253
  */
215
- export interface ReExportOptions {
254
+ export interface ReExportOptions extends EngineLockWaitable {
216
255
  /** Re-export all patches */
217
256
  all?: boolean;
218
257
  /** Scan directories for new/removed files and update filesAffected */
@@ -282,12 +321,6 @@ export interface ReExportOptions {
282
321
  * which has explicit `--add` / `--remove` / `--clear` modes.
283
322
  */
284
323
  lintIgnore?: string[];
285
- /**
286
- * Parsed `--wait-lock [seconds]` value (`true` for the bare flag, meaning
287
- * 60). Consumed at the CLI layer to bound the engine-session-lock wait;
288
- * the command implementation ignores it.
289
- */
290
- waitLock?: number | boolean;
291
324
  /**
292
325
  * Refuse (non-zero exit, patch not written) a scan-less re-export when
293
326
  * unmanaged files exist adjacent to the patch's ownership, instead of
@@ -338,54 +371,31 @@ export interface ReExportOptions {
338
371
  * `PatchMetadata.tier` field on a single patch without rewriting the
339
372
  * `.patch` file body — the manifest is the only thing that changes.
340
373
  */
341
- export interface PatchTierOptions {
342
- /**
343
- * Seconds to wait for the patch directory lock. This command mutates patch
344
- * metadata under that lock.
345
- */
346
- waitLock?: number | boolean;
374
+ export interface PatchTierOptions extends Confirmable, DryRunnable, PatchLockWaitable {
347
375
  /** Force the named tier on the patch. Only `"branding"` is recognised. */
348
376
  tier?: 'branding';
349
377
  /** Remove the `tier` override entirely, restoring auto-detection. */
350
378
  clear?: boolean;
351
- /** Print the planned change without writing. */
352
- dryRun?: boolean;
353
- /** Skip the confirmation prompt (required for non-TTY). */
354
- yes?: boolean;
355
379
  }
356
380
  /**
357
381
  * Options for the `fireforge patch lint-ignore` subcommand. Modes are
358
382
  * mutually exclusive — exactly one of `add`, `remove`, or `clear` must
359
383
  * be set per invocation.
360
384
  */
361
- export interface PatchLintIgnoreOptions {
362
- /**
363
- * Seconds to wait for the patch directory lock. This command mutates patch
364
- * metadata under that lock.
365
- */
366
- waitLock?: number | boolean;
385
+ export interface PatchLintIgnoreOptions extends Confirmable, DryRunnable, PatchLockWaitable {
367
386
  /** Lint check IDs to add to the patch's `lintIgnore` list (union, de-duped). */
368
387
  add?: string[];
369
388
  /** Lint check IDs to remove from the patch's `lintIgnore` list. */
370
389
  remove?: string[];
371
390
  /** Drop the `lintIgnore` field entirely. */
372
391
  clear?: boolean;
373
- /** Print the planned change without writing. */
374
- dryRun?: boolean;
375
- /** Skip the confirmation prompt (required for non-TTY). */
376
- yes?: boolean;
377
392
  }
378
393
  /**
379
394
  * Options for the `fireforge patch staged-dependency` subcommand. Modes are
380
395
  * mutually exclusive: add a declaration, remove one or more matching
381
396
  * declarations, or clear all staged dependencies from the patch.
382
397
  */
383
- export interface PatchStagedDependencyOptions {
384
- /**
385
- * Seconds to wait for the patch directory lock. This command mutates patch
386
- * metadata under that lock.
387
- */
388
- waitLock?: number | boolean;
398
+ export interface PatchStagedDependencyOptions extends Confirmable, DryRunnable, PatchLockWaitable {
389
399
  /** Add a staged dependency declaration. */
390
400
  add?: boolean;
391
401
  /** Remove matching staged dependency declarations. */
@@ -413,15 +423,11 @@ export interface PatchStagedDependencyOptions {
413
423
  owner?: string;
414
424
  /** Optional human-readable rationale stored with the declaration. */
415
425
  reason?: string;
416
- /** Print the planned change without writing. */
417
- dryRun?: boolean;
418
- /** Skip the confirmation prompt (required for non-TTY). */
419
- yes?: boolean;
420
426
  }
421
427
  /**
422
428
  * Options for the `patch split` command.
423
429
  */
424
- export interface PatchSplitOptions {
430
+ export interface PatchSplitOptions extends Confirmable, PatchLockWaitable, UnsafeOverridable {
425
431
  /** Files to move out of the source patch (engine-relative). */
426
432
  files: string[];
427
433
  /** Name for the new patch (used in its filename slug). */
@@ -438,14 +444,8 @@ export interface PatchSplitOptions {
438
444
  after?: string;
439
445
  /** Preview without writing. */
440
446
  dryRun?: boolean;
441
- /** Skip interactive confirmation (required for non-TTY). */
442
- yes?: boolean;
443
- /** Bypass projected-lint refusals. */
444
- forceUnsafe?: boolean;
445
447
  /** Skip per-patch lint of the projected bodies. */
446
448
  skipLint?: boolean;
447
- /** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
448
- waitLock?: number | boolean;
449
449
  }
450
450
  /**
451
451
  * Options for the `fireforge patch move-files` subcommand. Without
@@ -454,7 +454,7 @@ export interface PatchSplitOptions {
454
454
  * With `--create --order <n>` the target patch is created at that order
455
455
  * and the files move into it as one split-style transaction.
456
456
  */
457
- export interface PatchMoveFilesOptions {
457
+ export interface PatchMoveFilesOptions extends Confirmable, PatchLockWaitable, UnsafeOverridable {
458
458
  /** File paths relative to engine/ to move from the source patch to the target patch. */
459
459
  file?: string[];
460
460
  /** Create the target patch (transactional bootstrap of a split). Requires `order`. */
@@ -467,14 +467,8 @@ export interface PatchMoveFilesOptions {
467
467
  description?: string;
468
468
  /** Preview the create+move without writing. */
469
469
  dryRun?: boolean;
470
- /** Skip interactive confirmation (required for non-TTY). */
471
- yes?: boolean;
472
- /** Bypass projected-lint refusals. */
473
- forceUnsafe?: boolean;
474
470
  /** Skip per-patch lint of the projected bodies. */
475
471
  skipLint?: boolean;
476
- /** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
477
- waitLock?: number | boolean;
478
472
  }
479
473
  /**
480
474
  * Options for the rebase command.
@@ -546,7 +540,7 @@ export interface RunOptions {
546
540
  /**
547
541
  * Options for the test command.
548
542
  */
549
- export interface TestOptions {
543
+ export interface TestOptions extends EngineLockWaitable {
550
544
  /** Run tests in headless mode */
551
545
  headless?: boolean;
552
546
  /**
@@ -660,19 +654,11 @@ export interface TestOptions {
660
654
  * checkers that consume a sample artifact after the run.
661
655
  */
662
656
  perfSamples?: string;
663
- /**
664
- * Parsed `--wait-lock [seconds]` value (`true` for the bare flag, meaning
665
- * 60). Consumed at the CLI layer to bound the engine-session-lock wait;
666
- * the command implementation ignores it.
667
- */
668
- waitLock?: number | boolean;
669
657
  }
670
658
  /**
671
659
  * Options for the furnace apply command.
672
660
  */
673
- export interface FurnaceApplyOptions {
674
- /** Show what would be changed without writing */
675
- dryRun?: boolean;
661
+ export interface FurnaceApplyOptions extends DryRunnable {
676
662
  /** Proceed despite baseVersion drift (stale overrides) */
677
663
  force?: boolean;
678
664
  /** Watch component directories and re-apply on changes */
@@ -694,9 +680,7 @@ export interface FurnacePreviewOptions {
694
680
  /**
695
681
  * Options for the furnace deploy command.
696
682
  */
697
- export interface FurnaceDeployOptions {
698
- /** Show what would be changed without writing */
699
- dryRun?: boolean;
683
+ export interface FurnaceDeployOptions extends DryRunnable {
700
684
  /** Proceed despite baseVersion drift (stale overrides) */
701
685
  force?: boolean;
702
686
  /** Skip the validation step (apply only, no accessibility/compatibility checks) */
@@ -711,9 +695,7 @@ export interface FurnaceDeployOptions {
711
695
  /**
712
696
  * Options for the furnace refresh command.
713
697
  */
714
- export interface FurnaceRefreshOptions {
715
- /** Show what would change without modifying files */
716
- dryRun?: boolean;
698
+ export interface FurnaceRefreshOptions extends DryRunnable {
717
699
  /** Refresh all overrides in a single batch */
718
700
  all?: boolean;
719
701
  /** Conflict resolution strategy for automated use (ours = keep local, theirs = accept upstream) */
@@ -724,9 +706,7 @@ export interface FurnaceRefreshOptions {
724
706
  /**
725
707
  * Options for the furnace sync command.
726
708
  */
727
- export interface FurnaceSyncOptions {
728
- /** Show what would change without modifying files */
729
- dryRun?: boolean;
709
+ export interface FurnaceSyncOptions extends DryRunnable {
730
710
  /** Conflict resolution strategy for three-way merge (ours = keep local, theirs = accept upstream) */
731
711
  strategy?: 'ours' | 'theirs';
732
712
  /**
@@ -753,12 +733,10 @@ export interface FurnaceOverrideOptions {
753
733
  description?: string;
754
734
  }
755
735
  /**
756
- * Options for the furnace remove command.
736
+ * Options for the furnace remove command. `--yes` is the only flag it takes,
737
+ * so the type is the confirmation mixin under a command-specific name.
757
738
  */
758
- export interface FurnaceRemoveOptions {
759
- /** Skip confirmation prompt */
760
- yes?: boolean;
761
- }
739
+ export type FurnaceRemoveOptions = Confirmable;
762
740
  /**
763
741
  * Options for the furnace create command.
764
742
  */
@@ -865,15 +843,9 @@ export interface RegisterOptions {
865
843
  /**
866
844
  * Options for the patch delete command.
867
845
  */
868
- export interface PatchDeleteOptions {
869
- /** Skip confirmation prompt; required for non-TTY runs. */
870
- yes?: boolean;
871
- /** Print what would happen without writing anything. */
872
- dryRun?: boolean;
846
+ export interface PatchDeleteOptions extends Confirmable, DryRunnable, PatchLockWaitable {
873
847
  /** Bypass the hard refusal when later patches depend on the target. */
874
848
  forceUnsafe?: boolean;
875
- /** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
876
- waitLock?: number | boolean;
877
849
  }
878
850
  /**
879
851
  * Options for the `fireforge patch rename` subcommand. Updates the patch's
@@ -882,7 +854,7 @@ export interface PatchDeleteOptions {
882
854
  * for the case where the body is already correct but the patch's identity
883
855
  * describes a pre-shrink scope.
884
856
  */
885
- export interface PatchRenameOptions {
857
+ export interface PatchRenameOptions extends Confirmable, DryRunnable, PatchLockWaitable, UnsafeOverridable {
886
858
  /**
887
859
  * New human-readable name. Sanitised the same way `export --name`
888
860
  * sanitises into the filename slug (lowercase, non-alphanumerics
@@ -909,40 +881,22 @@ export interface PatchRenameOptions {
909
881
  * without touching the description).
910
882
  */
911
883
  description?: string;
912
- /** Print the planned change without writing. */
913
- dryRun?: boolean;
914
- /** Skip the confirmation prompt (required for non-TTY). */
915
- yes?: boolean;
916
- /** Bypass force-mode patchPolicy refusals. */
917
- forceUnsafe?: boolean;
918
- /** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
919
- waitLock?: number | boolean;
920
884
  }
921
885
  /**
922
886
  * Options for the patch reorder command.
923
887
  */
924
- export interface PatchReorderOptions {
888
+ export interface PatchReorderOptions extends PatchLockWaitable {
925
889
  to?: number;
926
890
  before?: string;
927
891
  after?: string;
928
892
  yes?: boolean;
929
893
  dryRun?: boolean;
930
894
  forceUnsafe?: boolean;
931
- /** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
932
- waitLock?: number | boolean;
933
895
  }
934
896
  /**
935
897
  * Options for the patch compact command.
936
898
  */
937
- export interface PatchCompactOptions {
938
- /** Skip confirmation prompt; required for non-TTY runs. */
939
- yes?: boolean;
940
- /** Print what would happen without writing anything. */
941
- dryRun?: boolean;
942
- /** Bypass force-mode patchPolicy refusals. */
943
- forceUnsafe?: boolean;
944
- /** Wait budget for the patch directory lock (`--wait-lock [seconds]`). */
945
- waitLock?: number | boolean;
899
+ export interface PatchCompactOptions extends Confirmable, DryRunnable, PatchLockWaitable, UnsafeOverridable {
946
900
  }
947
901
  /**
948
902
  * Options for the status command.
@@ -12,6 +12,13 @@ export interface FirefoxConfig {
12
12
  product: FirefoxProduct;
13
13
  /** Optional pinned SHA-256 for the resolved source archive */
14
14
  sha256?: string;
15
+ /**
16
+ * Accept a freshly downloaded archive when Mozilla's published SHA256SUMS
17
+ * cannot be fetched or does not list it, instead of failing closed. The
18
+ * download is then trusted on TLS alone (with a warning). Ignored when
19
+ * `sha256` is pinned. Default false.
20
+ */
21
+ allowUnverifiedDownload?: boolean;
15
22
  /**
16
23
  * Optional release-candidate build directory (e.g. "build2"). When set,
17
24
  * the source archive resolves under
@@ -124,6 +131,8 @@ export interface FireForgeConfig {
124
131
  firefox: FirefoxConfig;
125
132
  /** Build settings */
126
133
  build?: BuildConfig;
134
+ /** Post-build packaging audit configuration */
135
+ buildAudit?: BuildAuditConfig;
127
136
  /** Test command defaults */
128
137
  test?: TestConfig;
129
138
  /** Optional project-specific external toolchains checked by doctor. */
@@ -192,6 +201,31 @@ export interface TypecheckConfig {
192
201
  /**
193
202
  * Wire command configuration.
194
203
  */
204
+ /**
205
+ * One deliberately-unpackaged source, declared so the post-build audit stops
206
+ * reporting it as a missing registration.
207
+ *
208
+ * `reason` is required and must be non-empty. A carve-out whose rationale
209
+ * nobody wrote down is indistinguishable from a mistake by the time someone
210
+ * reads it, and this is the one audit class FireForge cannot derive from the
211
+ * tree — the file's own header may say "never loaded", but nothing in
212
+ * `moz.build` or `jar.mn` records that.
213
+ */
214
+ export interface BuildAuditUnpackagedDeclaration {
215
+ /** Engine-relative path, exact or with a `*` inside one path segment. */
216
+ path: string;
217
+ /** Why this file is never packaged. Required, non-empty. */
218
+ reason: string;
219
+ }
220
+ /** Post-build packaging audit configuration. */
221
+ export interface BuildAuditConfig {
222
+ /**
223
+ * Sources the audit must treat as deliberately unpackaged. Admitted paths
224
+ * are LISTED in the audit output rather than silenced, and one that DOES
225
+ * resolve to a packaged artifact is reported as a stale carve-out.
226
+ */
227
+ unpackaged?: BuildAuditUnpackagedDeclaration[];
228
+ }
195
229
  export interface WireConfig {
196
230
  /** Subscript directory relative to engine/. Default: "browser/base/content" */
197
231
  subscriptDir?: string;
@@ -352,8 +386,6 @@ export interface FireForgeState {
352
386
  brand?: string;
353
387
  /** Build mode: dev, debug, release */
354
388
  buildMode?: BuildMode;
355
- /** Last successful build timestamp (ISO string) */
356
- lastBuild?: string;
357
389
  /** Firefox version that was downloaded */
358
390
  downloadedVersion?: string;
359
391
  /** Initial commit hash of the engine (baseline) */
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Re-exports all type definitions.
3
3
  */
4
- export type {} from './commands/index.js';
5
4
  export type { BuildConfig, FireForgeConfig, FirefoxConfig, FirefoxProduct, ProjectLicense, ProjectPaths, WireConfig, } from './config.js';
6
5
  export type { ApplyResult, ComponentType, CustomComponentConfig, DryRunAction, FurnaceConfig, FurnaceState, OverrideComponentConfig, OverrideType, StepError, ValidationIssue, } from './furnace.js';