@hominis/fireforge 0.9.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 (316) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE.md +294 -0
  3. package/README.md +435 -0
  4. package/dist/bin/fireforge.d.ts +10 -0
  5. package/dist/bin/fireforge.js +29 -0
  6. package/dist/src/cli.d.ts +33 -0
  7. package/dist/src/cli.js +180 -0
  8. package/dist/src/commands/bootstrap.d.ts +9 -0
  9. package/dist/src/commands/bootstrap.js +73 -0
  10. package/dist/src/commands/build.d.ts +11 -0
  11. package/dist/src/commands/build.js +102 -0
  12. package/dist/src/commands/config.d.ts +13 -0
  13. package/dist/src/commands/config.js +135 -0
  14. package/dist/src/commands/discard.d.ts +12 -0
  15. package/dist/src/commands/discard.js +84 -0
  16. package/dist/src/commands/doctor.d.ts +18 -0
  17. package/dist/src/commands/doctor.js +356 -0
  18. package/dist/src/commands/download.d.ts +11 -0
  19. package/dist/src/commands/download.js +127 -0
  20. package/dist/src/commands/export-all.d.ts +11 -0
  21. package/dist/src/commands/export-all.js +122 -0
  22. package/dist/src/commands/export-shared.d.ts +48 -0
  23. package/dist/src/commands/export-shared.js +208 -0
  24. package/dist/src/commands/export.d.ts +13 -0
  25. package/dist/src/commands/export.js +178 -0
  26. package/dist/src/commands/furnace/apply.d.ts +7 -0
  27. package/dist/src/commands/furnace/apply.js +80 -0
  28. package/dist/src/commands/furnace/create.d.ts +8 -0
  29. package/dist/src/commands/furnace/create.js +377 -0
  30. package/dist/src/commands/furnace/deploy.d.ts +8 -0
  31. package/dist/src/commands/furnace/deploy.js +338 -0
  32. package/dist/src/commands/furnace/diff.d.ts +7 -0
  33. package/dist/src/commands/furnace/diff.js +119 -0
  34. package/dist/src/commands/furnace/index.d.ts +16 -0
  35. package/dist/src/commands/furnace/index.js +121 -0
  36. package/dist/src/commands/furnace/list.d.ts +5 -0
  37. package/dist/src/commands/furnace/list.js +65 -0
  38. package/dist/src/commands/furnace/override.d.ts +8 -0
  39. package/dist/src/commands/furnace/override.js +188 -0
  40. package/dist/src/commands/furnace/preview.d.ts +7 -0
  41. package/dist/src/commands/furnace/preview.js +96 -0
  42. package/dist/src/commands/furnace/remove.d.ts +8 -0
  43. package/dist/src/commands/furnace/remove.js +159 -0
  44. package/dist/src/commands/furnace/scan.d.ts +5 -0
  45. package/dist/src/commands/furnace/scan.js +112 -0
  46. package/dist/src/commands/furnace/status.d.ts +7 -0
  47. package/dist/src/commands/furnace/status.js +137 -0
  48. package/dist/src/commands/furnace/validate.d.ts +6 -0
  49. package/dist/src/commands/furnace/validate.js +91 -0
  50. package/dist/src/commands/furnace/validation-output.d.ts +7 -0
  51. package/dist/src/commands/furnace/validation-output.js +22 -0
  52. package/dist/src/commands/import.d.ts +11 -0
  53. package/dist/src/commands/import.js +241 -0
  54. package/dist/src/commands/lint.d.ts +10 -0
  55. package/dist/src/commands/lint.js +118 -0
  56. package/dist/src/commands/package.d.ts +11 -0
  57. package/dist/src/commands/package.js +80 -0
  58. package/dist/src/commands/re-export.d.ts +12 -0
  59. package/dist/src/commands/re-export.js +242 -0
  60. package/dist/src/commands/rebase/abort.d.ts +7 -0
  61. package/dist/src/commands/rebase/abort.js +49 -0
  62. package/dist/src/commands/rebase/confirm.d.ts +18 -0
  63. package/dist/src/commands/rebase/confirm.js +33 -0
  64. package/dist/src/commands/rebase/continue.d.ts +7 -0
  65. package/dist/src/commands/rebase/continue.js +81 -0
  66. package/dist/src/commands/rebase/index.d.ts +22 -0
  67. package/dist/src/commands/rebase/index.js +127 -0
  68. package/dist/src/commands/rebase/patch-loop.d.ts +9 -0
  69. package/dist/src/commands/rebase/patch-loop.js +135 -0
  70. package/dist/src/commands/rebase/summary.d.ts +12 -0
  71. package/dist/src/commands/rebase/summary.js +43 -0
  72. package/dist/src/commands/rebase.d.ts +4 -0
  73. package/dist/src/commands/rebase.js +6 -0
  74. package/dist/src/commands/register.d.ts +13 -0
  75. package/dist/src/commands/register.js +67 -0
  76. package/dist/src/commands/reset.d.ts +11 -0
  77. package/dist/src/commands/reset.js +83 -0
  78. package/dist/src/commands/resolve.d.ts +9 -0
  79. package/dist/src/commands/resolve.js +124 -0
  80. package/dist/src/commands/run.d.ts +9 -0
  81. package/dist/src/commands/run.js +91 -0
  82. package/dist/src/commands/setup-support.d.ts +23 -0
  83. package/dist/src/commands/setup-support.js +310 -0
  84. package/dist/src/commands/setup.d.ts +11 -0
  85. package/dist/src/commands/setup.js +94 -0
  86. package/dist/src/commands/status.d.ts +11 -0
  87. package/dist/src/commands/status.js +268 -0
  88. package/dist/src/commands/test.d.ts +12 -0
  89. package/dist/src/commands/test.js +182 -0
  90. package/dist/src/commands/token-coverage.d.ts +5 -0
  91. package/dist/src/commands/token-coverage.js +57 -0
  92. package/dist/src/commands/token.d.ts +14 -0
  93. package/dist/src/commands/token.js +121 -0
  94. package/dist/src/commands/watch.d.ts +9 -0
  95. package/dist/src/commands/watch.js +112 -0
  96. package/dist/src/commands/wire.d.ts +13 -0
  97. package/dist/src/commands/wire.js +149 -0
  98. package/dist/src/core/ast-utils.d.ts +47 -0
  99. package/dist/src/core/ast-utils.js +57 -0
  100. package/dist/src/core/brand-validation.d.ts +7 -0
  101. package/dist/src/core/brand-validation.js +15 -0
  102. package/dist/src/core/branding.d.ts +49 -0
  103. package/dist/src/core/branding.js +229 -0
  104. package/dist/src/core/browser-wire.d.ts +40 -0
  105. package/dist/src/core/browser-wire.js +66 -0
  106. package/dist/src/core/build-prepare.d.ts +25 -0
  107. package/dist/src/core/build-prepare.js +93 -0
  108. package/dist/src/core/config-mutate.d.ts +15 -0
  109. package/dist/src/core/config-mutate.js +51 -0
  110. package/dist/src/core/config-paths.d.ts +28 -0
  111. package/dist/src/core/config-paths.js +65 -0
  112. package/dist/src/core/config-state.d.ts +28 -0
  113. package/dist/src/core/config-state.js +152 -0
  114. package/dist/src/core/config-validate.d.ts +11 -0
  115. package/dist/src/core/config-validate.js +141 -0
  116. package/dist/src/core/config.d.ts +39 -0
  117. package/dist/src/core/config.js +70 -0
  118. package/dist/src/core/file-lock.d.ts +11 -0
  119. package/dist/src/core/file-lock.js +80 -0
  120. package/dist/src/core/firefox-archive.d.ts +40 -0
  121. package/dist/src/core/firefox-archive.js +63 -0
  122. package/dist/src/core/firefox-cache.d.ts +23 -0
  123. package/dist/src/core/firefox-cache.js +134 -0
  124. package/dist/src/core/firefox-download.d.ts +21 -0
  125. package/dist/src/core/firefox-download.js +129 -0
  126. package/dist/src/core/firefox-extract.d.ts +21 -0
  127. package/dist/src/core/firefox-extract.js +53 -0
  128. package/dist/src/core/firefox.d.ts +34 -0
  129. package/dist/src/core/firefox.js +78 -0
  130. package/dist/src/core/furnace-apply-helpers.d.ts +21 -0
  131. package/dist/src/core/furnace-apply-helpers.js +244 -0
  132. package/dist/src/core/furnace-apply.d.ts +16 -0
  133. package/dist/src/core/furnace-apply.js +147 -0
  134. package/dist/src/core/furnace-config.d.ts +94 -0
  135. package/dist/src/core/furnace-config.js +372 -0
  136. package/dist/src/core/furnace-constants.d.ts +4 -0
  137. package/dist/src/core/furnace-constants.js +6 -0
  138. package/dist/src/core/furnace-registration-ast.d.ts +24 -0
  139. package/dist/src/core/furnace-registration-ast.js +218 -0
  140. package/dist/src/core/furnace-registration-remove.d.ts +14 -0
  141. package/dist/src/core/furnace-registration-remove.js +89 -0
  142. package/dist/src/core/furnace-registration-validate.d.ts +20 -0
  143. package/dist/src/core/furnace-registration-validate.js +40 -0
  144. package/dist/src/core/furnace-registration.d.ts +29 -0
  145. package/dist/src/core/furnace-registration.js +96 -0
  146. package/dist/src/core/furnace-rollback.d.ts +20 -0
  147. package/dist/src/core/furnace-rollback.js +66 -0
  148. package/dist/src/core/furnace-scanner.d.ts +40 -0
  149. package/dist/src/core/furnace-scanner.js +143 -0
  150. package/dist/src/core/furnace-stories.d.ts +37 -0
  151. package/dist/src/core/furnace-stories.js +185 -0
  152. package/dist/src/core/furnace-validate-accessibility.d.ts +6 -0
  153. package/dist/src/core/furnace-validate-accessibility.js +32 -0
  154. package/dist/src/core/furnace-validate-checks.d.ts +4 -0
  155. package/dist/src/core/furnace-validate-checks.js +7 -0
  156. package/dist/src/core/furnace-validate-compatibility.d.ts +6 -0
  157. package/dist/src/core/furnace-validate-compatibility.js +57 -0
  158. package/dist/src/core/furnace-validate-helpers.d.ts +28 -0
  159. package/dist/src/core/furnace-validate-helpers.js +129 -0
  160. package/dist/src/core/furnace-validate-registration.d.ts +37 -0
  161. package/dist/src/core/furnace-validate-registration.js +220 -0
  162. package/dist/src/core/furnace-validate-structure.d.ts +6 -0
  163. package/dist/src/core/furnace-validate-structure.js +66 -0
  164. package/dist/src/core/furnace-validate.d.ts +16 -0
  165. package/dist/src/core/furnace-validate.js +103 -0
  166. package/dist/src/core/git-base.d.ts +47 -0
  167. package/dist/src/core/git-base.js +50 -0
  168. package/dist/src/core/git-diff.d.ts +63 -0
  169. package/dist/src/core/git-diff.js +246 -0
  170. package/dist/src/core/git-file-ops.d.ts +65 -0
  171. package/dist/src/core/git-file-ops.js +141 -0
  172. package/dist/src/core/git-status.d.ts +65 -0
  173. package/dist/src/core/git-status.js +163 -0
  174. package/dist/src/core/git.d.ts +113 -0
  175. package/dist/src/core/git.js +363 -0
  176. package/dist/src/core/license-headers.d.ts +36 -0
  177. package/dist/src/core/license-headers.js +83 -0
  178. package/dist/src/core/mach-build-artifacts.d.ts +29 -0
  179. package/dist/src/core/mach-build-artifacts.js +117 -0
  180. package/dist/src/core/mach-mozconfig.d.ts +17 -0
  181. package/dist/src/core/mach-mozconfig.js +50 -0
  182. package/dist/src/core/mach-python.d.ts +16 -0
  183. package/dist/src/core/mach-python.js +126 -0
  184. package/dist/src/core/mach.d.ts +106 -0
  185. package/dist/src/core/mach.js +166 -0
  186. package/dist/src/core/manifest-helpers.d.ts +25 -0
  187. package/dist/src/core/manifest-helpers.js +96 -0
  188. package/dist/src/core/manifest-register.d.ts +30 -0
  189. package/dist/src/core/manifest-register.js +65 -0
  190. package/dist/src/core/manifest-rules.d.ts +39 -0
  191. package/dist/src/core/manifest-rules.js +151 -0
  192. package/dist/src/core/manifest-tokenizers.d.ts +34 -0
  193. package/dist/src/core/manifest-tokenizers.js +84 -0
  194. package/dist/src/core/parser-fallback.d.ts +36 -0
  195. package/dist/src/core/parser-fallback.js +43 -0
  196. package/dist/src/core/patch-apply-fuzz.d.ts +29 -0
  197. package/dist/src/core/patch-apply-fuzz.js +70 -0
  198. package/dist/src/core/patch-apply.d.ts +46 -0
  199. package/dist/src/core/patch-apply.js +235 -0
  200. package/dist/src/core/patch-export.d.ts +99 -0
  201. package/dist/src/core/patch-export.js +314 -0
  202. package/dist/src/core/patch-files.d.ts +11 -0
  203. package/dist/src/core/patch-files.js +51 -0
  204. package/dist/src/core/patch-lint.d.ts +72 -0
  205. package/dist/src/core/patch-lint.js +403 -0
  206. package/dist/src/core/patch-lock.d.ts +8 -0
  207. package/dist/src/core/patch-lock.js +29 -0
  208. package/dist/src/core/patch-manifest-consistency.d.ts +24 -0
  209. package/dist/src/core/patch-manifest-consistency.js +135 -0
  210. package/dist/src/core/patch-manifest-io.d.ts +36 -0
  211. package/dist/src/core/patch-manifest-io.js +77 -0
  212. package/dist/src/core/patch-manifest-query.d.ts +48 -0
  213. package/dist/src/core/patch-manifest-query.js +124 -0
  214. package/dist/src/core/patch-manifest-validate.d.ts +22 -0
  215. package/dist/src/core/patch-manifest-validate.js +72 -0
  216. package/dist/src/core/patch-manifest.d.ts +11 -0
  217. package/dist/src/core/patch-manifest.js +12 -0
  218. package/dist/src/core/patch-parse.d.ts +43 -0
  219. package/dist/src/core/patch-parse.js +143 -0
  220. package/dist/src/core/patch-transform.d.ts +21 -0
  221. package/dist/src/core/patch-transform.js +138 -0
  222. package/dist/src/core/rebase-session.d.ts +47 -0
  223. package/dist/src/core/rebase-session.js +65 -0
  224. package/dist/src/core/register-browser-content.d.ts +11 -0
  225. package/dist/src/core/register-browser-content.js +116 -0
  226. package/dist/src/core/register-module.d.ts +11 -0
  227. package/dist/src/core/register-module.js +76 -0
  228. package/dist/src/core/register-shared-css.d.ts +11 -0
  229. package/dist/src/core/register-shared-css.js +117 -0
  230. package/dist/src/core/register-test-manifest.d.ts +18 -0
  231. package/dist/src/core/register-test-manifest.js +99 -0
  232. package/dist/src/core/state-file.d.ts +4 -0
  233. package/dist/src/core/state-file.js +25 -0
  234. package/dist/src/core/token-coverage.d.ts +12 -0
  235. package/dist/src/core/token-coverage.js +74 -0
  236. package/dist/src/core/token-manager.d.ts +55 -0
  237. package/dist/src/core/token-manager.js +387 -0
  238. package/dist/src/core/wire-destroy.d.ts +21 -0
  239. package/dist/src/core/wire-destroy.js +103 -0
  240. package/dist/src/core/wire-dom-fragment.d.ts +23 -0
  241. package/dist/src/core/wire-dom-fragment.js +129 -0
  242. package/dist/src/core/wire-init.d.ts +23 -0
  243. package/dist/src/core/wire-init.js +201 -0
  244. package/dist/src/core/wire-subscript.d.ts +20 -0
  245. package/dist/src/core/wire-subscript.js +134 -0
  246. package/dist/src/core/wire-targets.d.ts +7 -0
  247. package/dist/src/core/wire-targets.js +9 -0
  248. package/dist/src/core/wire-utils.d.ts +88 -0
  249. package/dist/src/core/wire-utils.js +279 -0
  250. package/dist/src/errors/base.d.ts +60 -0
  251. package/dist/src/errors/base.js +87 -0
  252. package/dist/src/errors/build.d.ts +52 -0
  253. package/dist/src/errors/build.js +114 -0
  254. package/dist/src/errors/codes.d.ts +29 -0
  255. package/dist/src/errors/codes.js +30 -0
  256. package/dist/src/errors/config.d.ts +31 -0
  257. package/dist/src/errors/config.js +61 -0
  258. package/dist/src/errors/download.d.ts +42 -0
  259. package/dist/src/errors/download.js +95 -0
  260. package/dist/src/errors/furnace.d.ts +10 -0
  261. package/dist/src/errors/furnace.js +22 -0
  262. package/dist/src/errors/git.d.ts +41 -0
  263. package/dist/src/errors/git.js +99 -0
  264. package/dist/src/errors/patch.d.ts +10 -0
  265. package/dist/src/errors/patch.js +26 -0
  266. package/dist/src/errors/rebase.d.ts +20 -0
  267. package/dist/src/errors/rebase.js +30 -0
  268. package/dist/src/index.d.ts +21 -0
  269. package/dist/src/index.js +21 -0
  270. package/dist/src/types/cli.d.ts +14 -0
  271. package/dist/src/types/cli.js +2 -0
  272. package/dist/src/types/commands/index.d.ts +6 -0
  273. package/dist/src/types/commands/index.js +6 -0
  274. package/dist/src/types/commands/options.d.ts +239 -0
  275. package/dist/src/types/commands/options.js +6 -0
  276. package/dist/src/types/commands/patches.d.ts +89 -0
  277. package/dist/src/types/commands/patches.js +6 -0
  278. package/dist/src/types/commands/project.d.ts +71 -0
  279. package/dist/src/types/commands/project.js +6 -0
  280. package/dist/src/types/config.d.ts +101 -0
  281. package/dist/src/types/config.js +2 -0
  282. package/dist/src/types/furnace.d.ts +158 -0
  283. package/dist/src/types/furnace.js +2 -0
  284. package/dist/src/types/index.d.ts +6 -0
  285. package/dist/src/types/index.js +6 -0
  286. package/dist/src/utils/errors.d.ts +2 -0
  287. package/dist/src/utils/errors.js +15 -0
  288. package/dist/src/utils/fs.d.ts +72 -0
  289. package/dist/src/utils/fs.js +179 -0
  290. package/dist/src/utils/logger.d.ts +58 -0
  291. package/dist/src/utils/logger.js +120 -0
  292. package/dist/src/utils/options.d.ts +8 -0
  293. package/dist/src/utils/options.js +16 -0
  294. package/dist/src/utils/package-root.d.ts +10 -0
  295. package/dist/src/utils/package-root.js +53 -0
  296. package/dist/src/utils/parse.d.ts +110 -0
  297. package/dist/src/utils/parse.js +200 -0
  298. package/dist/src/utils/paths.d.ts +10 -0
  299. package/dist/src/utils/paths.js +43 -0
  300. package/dist/src/utils/platform.d.ts +38 -0
  301. package/dist/src/utils/platform.js +56 -0
  302. package/dist/src/utils/process.d.ts +80 -0
  303. package/dist/src/utils/process.js +188 -0
  304. package/dist/src/utils/regex.d.ts +24 -0
  305. package/dist/src/utils/regex.js +40 -0
  306. package/dist/src/utils/validation.d.ts +133 -0
  307. package/dist/src/utils/validation.js +250 -0
  308. package/package.json +106 -0
  309. package/templates/configs/common.mozconfig +24 -0
  310. package/templates/configs/darwin.mozconfig +10 -0
  311. package/templates/configs/linux.mozconfig +12 -0
  312. package/templates/configs/win32.mozconfig +14 -0
  313. package/templates/licenses/0BSD.md +14 -0
  314. package/templates/licenses/EUPL-1.2.md +294 -0
  315. package/templates/licenses/GPL-2.0-or-later.md +339 -0
  316. package/templates/licenses/MPL-2.0.md +383 -0
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Command option types for CLI commands.
3
+ */
4
+ import type { FirefoxProduct, ProjectLicense } from '../config.js';
5
+ import type { PatchCategory } from './patches.js';
6
+ /**
7
+ * Options for the setup command.
8
+ */
9
+ export interface SetupOptions {
10
+ /** Browser name */
11
+ name?: string;
12
+ /** Vendor/company name */
13
+ vendor?: string;
14
+ /** Application ID (reverse-domain format) */
15
+ appId?: string;
16
+ /** Binary name (executable name) */
17
+ binaryName?: string;
18
+ /** Firefox version to base on */
19
+ firefoxVersion?: string;
20
+ /** Firefox product type (firefox, firefox-esr, firefox-beta) */
21
+ product?: FirefoxProduct;
22
+ /** Overwrite existing configuration without prompting */
23
+ force?: boolean;
24
+ /** Project license SPDX identifier */
25
+ license?: ProjectLicense;
26
+ }
27
+ /**
28
+ * Options for the download command.
29
+ */
30
+ export interface DownloadOptions {
31
+ /** Force re-download, deleting existing engine/ */
32
+ force?: boolean;
33
+ }
34
+ /**
35
+ * Options for the build command.
36
+ */
37
+ export interface BuildOptions {
38
+ /** Fast UI-only rebuild */
39
+ ui?: boolean;
40
+ /** Number of parallel jobs */
41
+ jobs?: number;
42
+ /** Brand to build (stable, esr, etc.) */
43
+ brand?: string;
44
+ }
45
+ /**
46
+ * Options for the export command.
47
+ */
48
+ export interface ExportOptions {
49
+ /** Name/description for the patch */
50
+ name?: string;
51
+ /** Category classification */
52
+ category?: PatchCategory;
53
+ /** Detailed description of what the patch does */
54
+ description?: string;
55
+ /** Allow superseding multiple existing patches without confirmation */
56
+ supersede?: boolean;
57
+ /** Skip patch lint checks (downgrade errors to warnings) */
58
+ skipLint?: boolean;
59
+ }
60
+ /**
61
+ * Options for the reset command.
62
+ */
63
+ export interface ResetOptions {
64
+ /** Skip confirmation prompt */
65
+ force?: boolean;
66
+ /** Show what would be reset without doing it */
67
+ dryRun?: boolean;
68
+ }
69
+ /**
70
+ * Options for the discard command.
71
+ */
72
+ export interface DiscardOptions {
73
+ /** Show what would be discarded without doing it */
74
+ dryRun?: boolean;
75
+ /** Skip confirmation prompt */
76
+ force?: boolean;
77
+ }
78
+ /**
79
+ * Options for the package command.
80
+ */
81
+ export interface PackageOptions {
82
+ /** Brand to package */
83
+ brand?: string;
84
+ }
85
+ /**
86
+ * Options for the import command.
87
+ */
88
+ export interface ImportOptions {
89
+ /** Specific patches to apply (by name) */
90
+ patches?: string[];
91
+ /** Continue applying patches even if one fails */
92
+ continue?: boolean;
93
+ /** Force import even when engine HEAD has drifted from base commit */
94
+ force?: boolean;
95
+ }
96
+ /**
97
+ * Options for the re-export command.
98
+ */
99
+ export interface ReExportOptions {
100
+ /** Re-export all patches */
101
+ all?: boolean;
102
+ /** Scan directories for new/removed files and update filesAffected */
103
+ scan?: boolean;
104
+ /** Show what would change without writing */
105
+ dryRun?: boolean;
106
+ /** Skip patch lint checks (downgrade errors to warnings) */
107
+ skipLint?: boolean;
108
+ }
109
+ /**
110
+ * Options for the rebase command.
111
+ */
112
+ export interface RebaseOptions {
113
+ /** Resume a previously interrupted rebase session */
114
+ continue?: boolean;
115
+ /** Cancel the current rebase session and restore engine */
116
+ abort?: boolean;
117
+ /** Show what would happen without modifying anything */
118
+ dryRun?: boolean;
119
+ /** Maximum fuzz factor for git apply (default 3) */
120
+ maxFuzz?: number;
121
+ /** Skip dirty-tree confirmation prompt */
122
+ force?: boolean;
123
+ }
124
+ /**
125
+ * Options for the run command.
126
+ */
127
+ export interface RunOptions {
128
+ /** Additional arguments to pass to the browser */
129
+ args?: string[];
130
+ }
131
+ /**
132
+ * Options for the test command.
133
+ */
134
+ export interface TestOptions {
135
+ /** Run tests in headless mode */
136
+ headless?: boolean;
137
+ /** Run incremental UI build before testing */
138
+ build?: boolean;
139
+ }
140
+ /**
141
+ * Options for the furnace apply command.
142
+ */
143
+ export interface FurnaceApplyOptions {
144
+ /** Show what would be changed without writing */
145
+ dryRun?: boolean;
146
+ }
147
+ /**
148
+ * Options for the furnace preview command.
149
+ */
150
+ export interface FurnacePreviewOptions {
151
+ /** Force reinstall Storybook dependencies */
152
+ install?: boolean;
153
+ }
154
+ /**
155
+ * Options for the furnace deploy command.
156
+ */
157
+ export interface FurnaceDeployOptions {
158
+ /** Show what would be changed without writing */
159
+ dryRun?: boolean;
160
+ }
161
+ /**
162
+ * Options for the furnace override command.
163
+ */
164
+ export interface FurnaceOverrideOptions {
165
+ /** Override type: css-only or full */
166
+ type?: 'css-only' | 'full';
167
+ /** Description of the override */
168
+ description?: string;
169
+ }
170
+ /**
171
+ * Options for the furnace remove command.
172
+ */
173
+ export interface FurnaceRemoveOptions {
174
+ /** Skip confirmation prompt */
175
+ force?: boolean;
176
+ }
177
+ /**
178
+ * Options for the furnace create command.
179
+ */
180
+ export interface FurnaceCreateOptions {
181
+ /** Component description */
182
+ description?: string;
183
+ /** Include Fluent l10n support */
184
+ localized?: boolean;
185
+ /** Register in customElements.js (default: true) */
186
+ register?: boolean;
187
+ /** Scaffold Mochitest directory and register in moz.build */
188
+ withTests?: boolean;
189
+ /** Stock component tag names composed internally by this component */
190
+ compose?: string[];
191
+ }
192
+ /**
193
+ * Options for the wire command.
194
+ */
195
+ export interface WireOptions {
196
+ init?: string;
197
+ destroy?: string;
198
+ dom?: string;
199
+ dryRun?: boolean;
200
+ after?: string;
201
+ subscriptDir?: string;
202
+ }
203
+ /**
204
+ * Options for the register command.
205
+ */
206
+ export interface RegisterOptions {
207
+ dryRun?: boolean;
208
+ after?: string;
209
+ }
210
+ /**
211
+ * Options for the status command.
212
+ */
213
+ export interface StatusOptions {
214
+ raw?: boolean;
215
+ unmanaged?: boolean;
216
+ }
217
+ /**
218
+ * Options for the token add command.
219
+ */
220
+ export interface TokenAddOptions {
221
+ category: string;
222
+ mode: string;
223
+ description?: string;
224
+ darkValue?: string;
225
+ dryRun?: boolean;
226
+ }
227
+ /**
228
+ * Options for the doctor command.
229
+ */
230
+ export interface DoctorOptions {
231
+ repairPatchesManifest?: boolean;
232
+ }
233
+ /**
234
+ * Global CLI options available to all commands.
235
+ */
236
+ export interface GlobalOptions {
237
+ /** Enable verbose/debug output */
238
+ verbose?: boolean;
239
+ }
@@ -0,0 +1,6 @@
1
+ // SPDX-License-Identifier: EUPL-1.2
2
+ /**
3
+ * Command option types for CLI commands.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Types for the patch system: patch metadata, manifests, lint, and import results.
3
+ */
4
+ /**
5
+ * Patch categories for organizational classification.
6
+ */
7
+ export type PatchCategory = 'branding' | 'ui' | 'privacy' | 'security' | 'infra';
8
+ /**
9
+ * Information about a patch file.
10
+ */
11
+ export interface PatchInfo {
12
+ /** Full path to patch file */
13
+ path: string;
14
+ /** Filename without directory */
15
+ filename: string;
16
+ /** Order index (extracted from filename prefix like "001-") */
17
+ order: number;
18
+ }
19
+ /**
20
+ * Result of patch application.
21
+ */
22
+ export interface PatchResult {
23
+ /** Patch that was applied */
24
+ patch: PatchInfo;
25
+ /** Whether application succeeded */
26
+ success: boolean;
27
+ /** Error message if failed */
28
+ error?: string;
29
+ /** Files that caused conflicts (if failed) */
30
+ conflictingFiles?: string[];
31
+ /** Whether the patch was auto-resolved (new file vs existing file conflict) */
32
+ autoResolved?: boolean;
33
+ }
34
+ /**
35
+ * Extended patch information with metadata.
36
+ */
37
+ export interface PatchMetadata {
38
+ /** Patch filename (e.g., "011-ui-sidebar.patch") */
39
+ filename: string;
40
+ /** Numeric order for application sequence */
41
+ order: number;
42
+ /** Category classification */
43
+ category: PatchCategory;
44
+ /** Human-readable name */
45
+ name: string;
46
+ /** Detailed description of what the patch does */
47
+ description: string;
48
+ /** ISO timestamp of when the patch was created */
49
+ createdAt: string;
50
+ /** ESR version the patch was created against (e.g., "140.0esr") */
51
+ sourceEsrVersion: string;
52
+ /** Array of file paths affected by this patch */
53
+ filesAffected: string[];
54
+ }
55
+ /**
56
+ * Schema for patches/patches.json file.
57
+ */
58
+ export interface PatchesManifest {
59
+ /** Schema version for future compatibility */
60
+ version: 1;
61
+ /** Array of patch metadata entries */
62
+ patches: PatchMetadata[];
63
+ }
64
+ /**
65
+ * Summary of import operation with continue mode.
66
+ */
67
+ export interface ImportSummary {
68
+ /** Total patches processed */
69
+ total: number;
70
+ /** Successfully applied patches */
71
+ succeeded: PatchResult[];
72
+ /** Failed patches */
73
+ failed: PatchResult[];
74
+ /** Skipped patches (not attempted after failure in default mode) */
75
+ skipped: PatchInfo[];
76
+ }
77
+ /**
78
+ * A single lint issue found in a patched CSS file.
79
+ */
80
+ export interface PatchLintIssue {
81
+ /** File path (relative to engine root) */
82
+ file: string;
83
+ /** Check identifier (e.g. "raw-color-value", "token-prefix-violation") */
84
+ check: string;
85
+ /** Human-readable description of the issue */
86
+ message: string;
87
+ /** Severity: errors block export, warnings are advisory */
88
+ severity: 'error' | 'warning';
89
+ }
@@ -0,0 +1,6 @@
1
+ // SPDX-License-Identifier: EUPL-1.2
2
+ /**
3
+ * Types for the patch system: patch metadata, manifests, lint, and import results.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=patches.js.map
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Project diagnostics, status, and token coverage types.
3
+ */
4
+ /**
5
+ * Result of a doctor check.
6
+ */
7
+ export interface DoctorCheck {
8
+ /** Name of the check */
9
+ name: string;
10
+ /** Whether the check passed */
11
+ passed: boolean;
12
+ /** Severity of the result */
13
+ severity?: 'ok' | 'warning' | 'error';
14
+ /** Description of the result */
15
+ message: string;
16
+ /** Suggested fix if check failed */
17
+ fix?: string;
18
+ /** Whether this check passed with a warning */
19
+ warning?: boolean;
20
+ }
21
+ /**
22
+ * Status of the project.
23
+ */
24
+ export interface ProjectStatus {
25
+ /** Whether fireforge.json exists */
26
+ hasConfig: boolean;
27
+ /** Whether engine/ exists */
28
+ hasEngine: boolean;
29
+ /** Whether patches/ exists */
30
+ hasPatches: boolean;
31
+ /** Number of patch files */
32
+ patchCount: number;
33
+ /** Whether build output exists */
34
+ hasBuild: boolean;
35
+ /** Firefox version from config */
36
+ firefoxVersion?: string;
37
+ /** Downloaded Firefox version */
38
+ downloadedVersion?: string;
39
+ }
40
+ /**
41
+ * Per-file token coverage breakdown.
42
+ */
43
+ export interface TokenCoverageFileEntry {
44
+ /** File path (relative to engine root) */
45
+ file: string;
46
+ /** var(--{prefix}*) usages — fully tokenized */
47
+ tokenUsages: number;
48
+ /** var(--*) usages referencing allowlisted tokens */
49
+ allowlisted: number;
50
+ /** var(--*) usages not in token namespace and not allowlisted */
51
+ unknownVars: number;
52
+ /** Raw color values (hex, rgb, hsl) found outside comments */
53
+ rawColors: number;
54
+ }
55
+ /**
56
+ * Aggregate token coverage report.
57
+ */
58
+ export interface TokenCoverageReport {
59
+ /** Total CSS files scanned */
60
+ filesScanned: number;
61
+ /** var(--{prefix}*) usages — fully tokenized */
62
+ tokenUsages: number;
63
+ /** var(--*) usages referencing allowlisted tokens */
64
+ allowlistedUsages: number;
65
+ /** var(--*) usages not in token namespace and not allowlisted */
66
+ unknownVarUsages: number;
67
+ /** Raw color values (hex, rgb, hsl) found outside comments */
68
+ rawColorCount: number;
69
+ /** Per-file breakdown */
70
+ files: TokenCoverageFileEntry[];
71
+ }
@@ -0,0 +1,6 @@
1
+ // SPDX-License-Identifier: EUPL-1.2
2
+ /**
3
+ * Project diagnostics, status, and token coverage types.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Firefox product type for downloads.
3
+ */
4
+ export type FirefoxProduct = 'firefox' | 'firefox-esr' | 'firefox-beta';
5
+ /**
6
+ * Firefox version configuration.
7
+ */
8
+ export interface FirefoxConfig {
9
+ /** Firefox release version (e.g., "140.0esr") */
10
+ version: string;
11
+ /** Firefox product type */
12
+ product: FirefoxProduct;
13
+ }
14
+ /**
15
+ * Supported project license SPDX identifiers.
16
+ */
17
+ export type ProjectLicense = 'EUPL-1.2' | 'MPL-2.0' | '0BSD' | 'GPL-2.0-or-later';
18
+ /**
19
+ * Build configuration options.
20
+ */
21
+ export interface BuildConfig {
22
+ /** Number of parallel jobs for mach build */
23
+ jobs?: number;
24
+ }
25
+ /**
26
+ * Main fireforge.json configuration schema.
27
+ */
28
+ export interface FireForgeConfig {
29
+ /** Display name of the browser */
30
+ name: string;
31
+ /** Vendor/company name */
32
+ vendor: string;
33
+ /** Application ID (e.g., "org.example.browser") */
34
+ appId: string;
35
+ /** Binary name for the executable */
36
+ binaryName: string;
37
+ /** Firefox version settings */
38
+ firefox: FirefoxConfig;
39
+ /** Build settings */
40
+ build?: BuildConfig;
41
+ /** Project license SPDX identifier */
42
+ license?: ProjectLicense;
43
+ /** Wire command configuration */
44
+ wire?: WireConfig;
45
+ }
46
+ /**
47
+ * Wire command configuration.
48
+ */
49
+ export interface WireConfig {
50
+ /** Subscript directory relative to engine/. Default: "browser/base/content" */
51
+ subscriptDir?: string;
52
+ }
53
+ /**
54
+ * Build mode for mach.
55
+ */
56
+ export type BuildMode = 'dev' | 'debug' | 'release';
57
+ /**
58
+ * Runtime state stored in .fireforge/state.json.
59
+ */
60
+ export interface FireForgeState {
61
+ /** Currently active brand */
62
+ brand?: string;
63
+ /** Build mode: dev, debug, release */
64
+ buildMode?: BuildMode;
65
+ /** Last successful build timestamp (ISO string) */
66
+ lastBuild?: string;
67
+ /** Firefox version that was downloaded */
68
+ downloadedVersion?: string;
69
+ /** Initial commit hash of the engine (baseline) */
70
+ baseCommit?: string;
71
+ /** State for a patch application that needs manual resolution */
72
+ pendingResolution?: {
73
+ /** Filename of the patch that failed to apply */
74
+ patchFilename: string;
75
+ /** The original error message from the failed apply */
76
+ originalError: string;
77
+ };
78
+ }
79
+ /**
80
+ * Project directory structure.
81
+ */
82
+ export interface ProjectPaths {
83
+ /** Root directory of the project */
84
+ root: string;
85
+ /** Path to fireforge.json */
86
+ config: string;
87
+ /** Path to .fireforge directory */
88
+ fireforgeDir: string;
89
+ /** Path to .fireforge/state.json */
90
+ state: string;
91
+ /** Path to engine directory (Firefox source) */
92
+ engine: string;
93
+ /** Path to patches directory */
94
+ patches: string;
95
+ /** Path to configs directory */
96
+ configs: string;
97
+ /** Path to src directory */
98
+ src: string;
99
+ /** Path to components directory */
100
+ componentsDir: string;
101
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1,158 @@
1
+ /**
2
+ * Component type classification.
3
+ */
4
+ export type ComponentType = 'stock' | 'override' | 'custom';
5
+ /**
6
+ * Override scope.
7
+ */
8
+ export type OverrideType = 'css-only' | 'full';
9
+ /**
10
+ * Info about a component discovered by scanning engine/.
11
+ */
12
+ export interface ScannedComponent {
13
+ /** Tag name (e.g., "moz-button") */
14
+ tagName: string;
15
+ /** Path relative to engine/ (e.g., "toolkit/content/widgets/moz-button") */
16
+ sourcePath: string;
17
+ /** Whether it has a .css file */
18
+ hasCSS: boolean;
19
+ /** Whether it has a .ftl localization file */
20
+ hasFTL: boolean;
21
+ /** Whether it's registered in customElements.js */
22
+ isRegistered: boolean;
23
+ }
24
+ /**
25
+ * Metadata for an override component in the workspace.
26
+ */
27
+ export interface OverrideComponentConfig {
28
+ /** Override scope */
29
+ type: OverrideType;
30
+ /** Description of the override */
31
+ description: string;
32
+ /** Path in engine/ where the original lives */
33
+ basePath: string;
34
+ /** Firefox version this override was based on */
35
+ baseVersion: string;
36
+ }
37
+ /**
38
+ * Metadata for a custom component in the workspace.
39
+ */
40
+ export interface CustomComponentConfig {
41
+ /** Description of the custom component */
42
+ description: string;
43
+ /** Target path in engine/ where this will be placed */
44
+ targetPath: string;
45
+ /** Whether to register in customElements.js */
46
+ register: boolean;
47
+ /** Whether this component uses Fluent l10n */
48
+ localized: boolean;
49
+ /** Stock component tag names composed internally by this component */
50
+ composes?: string[];
51
+ }
52
+ /**
53
+ * The furnace.json schema.
54
+ */
55
+ export interface FurnaceConfig {
56
+ /** Schema version */
57
+ version: 1;
58
+ /** Prefix for custom component tag names (default: "moz-") */
59
+ componentPrefix: string;
60
+ /** Optional CSS custom property prefix for design tokens (e.g. "--mybrowser-") */
61
+ tokenPrefix?: string;
62
+ /** Custom properties allowed even though they don't match tokenPrefix (e.g. ["--background-color-box"]) */
63
+ tokenAllowlist?: string[];
64
+ /** Stock components tracked for preview */
65
+ stock: string[];
66
+ /** Override components */
67
+ overrides: Record<string, OverrideComponentConfig>;
68
+ /** Custom components */
69
+ custom: Record<string, CustomComponentConfig>;
70
+ }
71
+ /**
72
+ * State tracking for apply operations (stored in .fireforge/furnace-state.json).
73
+ */
74
+ export interface FurnaceState {
75
+ /** ISO timestamp of last successful apply */
76
+ lastApply?: string;
77
+ /** Checksums of component files at last apply, keyed by relative path */
78
+ appliedChecksums?: Record<string, string>;
79
+ }
80
+ /**
81
+ * A registration-step error captured while applying a component.
82
+ * In non-dry-run apply/deploy workflows, these trigger rollback of touched files.
83
+ */
84
+ export interface StepError {
85
+ step: string;
86
+ error: string;
87
+ }
88
+ /**
89
+ * Result of applying all components to the engine source tree.
90
+ */
91
+ export interface ApplyResult {
92
+ /** Components that were successfully applied */
93
+ applied: Array<{
94
+ name: string;
95
+ type: ComponentType;
96
+ filesAffected: string[];
97
+ /** Non-fatal registration step errors */
98
+ stepErrors?: StepError[];
99
+ }>;
100
+ /** Components that were skipped (e.g., no changes) */
101
+ skipped: Array<{
102
+ name: string;
103
+ reason: string;
104
+ }>;
105
+ /** Components that failed to apply */
106
+ errors: Array<{
107
+ name: string;
108
+ error: string;
109
+ }>;
110
+ }
111
+ /**
112
+ * An action that would be performed during a dry-run deploy.
113
+ */
114
+ export interface DryRunAction {
115
+ component: string;
116
+ action: 'copy' | 'register-ce' | 'register-jar' | 'copy-ftl';
117
+ source?: string;
118
+ target?: string;
119
+ description: string;
120
+ }
121
+ /**
122
+ * Registration consistency status for a single component.
123
+ */
124
+ export interface RegistrationStatus {
125
+ sourceExists: boolean;
126
+ targetExists: boolean;
127
+ filesInSync: boolean;
128
+ jarMnCss: boolean;
129
+ jarMnMjs: boolean;
130
+ customElementsPresent: boolean;
131
+ customElementsCorrectBlock: boolean;
132
+ driftedFiles: string[];
133
+ missingTargetFiles: string[];
134
+ }
135
+ /**
136
+ * Result of syncing Storybook story files.
137
+ */
138
+ export interface SyncResult {
139
+ /** Story files that were created */
140
+ created: string[];
141
+ /** Story files that were updated (regenerated) */
142
+ updated: string[];
143
+ /** Story files that were removed */
144
+ removed: string[];
145
+ }
146
+ /**
147
+ * A single validation finding for a furnace component.
148
+ */
149
+ export interface ValidationIssue {
150
+ /** Component tag name */
151
+ component: string;
152
+ /** Severity: 'error' blocks apply, 'warning' is advisory */
153
+ severity: 'error' | 'warning';
154
+ /** Short machine-readable check name (e.g., "missing-mjs", "no-aria-role") */
155
+ check: string;
156
+ /** Human-readable description of the issue */
157
+ message: string;
158
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=furnace.js.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Re-exports all type definitions.
3
+ */
4
+ export type { BuildOptions, DiscardOptions, DoctorCheck, DownloadOptions, ExportOptions, FurnaceCreateOptions, FurnaceOverrideOptions, FurnaceRemoveOptions, GlobalOptions, ImportOptions, ImportSummary, PackageOptions, PatchCategory, PatchesManifest, PatchInfo, PatchLintIssue, PatchMetadata, PatchResult, ProjectStatus, ReExportOptions, ResetOptions, RunOptions, SetupOptions, TestOptions, TokenCoverageFileEntry, TokenCoverageReport, } from './commands/index.js';
5
+ export type { BuildConfig, BuildMode, FireForgeConfig, FireForgeState, FirefoxConfig, FirefoxProduct, ProjectLicense, ProjectPaths, WireConfig, } from './config.js';
6
+ export type { ApplyResult, ComponentType, CustomComponentConfig, DryRunAction, FurnaceConfig, FurnaceState, OverrideComponentConfig, OverrideType, RegistrationStatus, ScannedComponent, StepError, SyncResult, ValidationIssue, } from './furnace.js';