@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.
- package/CHANGELOG.md +7 -0
- package/LICENSE.md +294 -0
- package/README.md +435 -0
- package/dist/bin/fireforge.d.ts +10 -0
- package/dist/bin/fireforge.js +29 -0
- package/dist/src/cli.d.ts +33 -0
- package/dist/src/cli.js +180 -0
- package/dist/src/commands/bootstrap.d.ts +9 -0
- package/dist/src/commands/bootstrap.js +73 -0
- package/dist/src/commands/build.d.ts +11 -0
- package/dist/src/commands/build.js +102 -0
- package/dist/src/commands/config.d.ts +13 -0
- package/dist/src/commands/config.js +135 -0
- package/dist/src/commands/discard.d.ts +12 -0
- package/dist/src/commands/discard.js +84 -0
- package/dist/src/commands/doctor.d.ts +18 -0
- package/dist/src/commands/doctor.js +356 -0
- package/dist/src/commands/download.d.ts +11 -0
- package/dist/src/commands/download.js +127 -0
- package/dist/src/commands/export-all.d.ts +11 -0
- package/dist/src/commands/export-all.js +122 -0
- package/dist/src/commands/export-shared.d.ts +48 -0
- package/dist/src/commands/export-shared.js +208 -0
- package/dist/src/commands/export.d.ts +13 -0
- package/dist/src/commands/export.js +178 -0
- package/dist/src/commands/furnace/apply.d.ts +7 -0
- package/dist/src/commands/furnace/apply.js +80 -0
- package/dist/src/commands/furnace/create.d.ts +8 -0
- package/dist/src/commands/furnace/create.js +377 -0
- package/dist/src/commands/furnace/deploy.d.ts +8 -0
- package/dist/src/commands/furnace/deploy.js +338 -0
- package/dist/src/commands/furnace/diff.d.ts +7 -0
- package/dist/src/commands/furnace/diff.js +119 -0
- package/dist/src/commands/furnace/index.d.ts +16 -0
- package/dist/src/commands/furnace/index.js +121 -0
- package/dist/src/commands/furnace/list.d.ts +5 -0
- package/dist/src/commands/furnace/list.js +65 -0
- package/dist/src/commands/furnace/override.d.ts +8 -0
- package/dist/src/commands/furnace/override.js +188 -0
- package/dist/src/commands/furnace/preview.d.ts +7 -0
- package/dist/src/commands/furnace/preview.js +96 -0
- package/dist/src/commands/furnace/remove.d.ts +8 -0
- package/dist/src/commands/furnace/remove.js +159 -0
- package/dist/src/commands/furnace/scan.d.ts +5 -0
- package/dist/src/commands/furnace/scan.js +112 -0
- package/dist/src/commands/furnace/status.d.ts +7 -0
- package/dist/src/commands/furnace/status.js +137 -0
- package/dist/src/commands/furnace/validate.d.ts +6 -0
- package/dist/src/commands/furnace/validate.js +91 -0
- package/dist/src/commands/furnace/validation-output.d.ts +7 -0
- package/dist/src/commands/furnace/validation-output.js +22 -0
- package/dist/src/commands/import.d.ts +11 -0
- package/dist/src/commands/import.js +241 -0
- package/dist/src/commands/lint.d.ts +10 -0
- package/dist/src/commands/lint.js +118 -0
- package/dist/src/commands/package.d.ts +11 -0
- package/dist/src/commands/package.js +80 -0
- package/dist/src/commands/re-export.d.ts +12 -0
- package/dist/src/commands/re-export.js +242 -0
- package/dist/src/commands/rebase/abort.d.ts +7 -0
- package/dist/src/commands/rebase/abort.js +49 -0
- package/dist/src/commands/rebase/confirm.d.ts +18 -0
- package/dist/src/commands/rebase/confirm.js +33 -0
- package/dist/src/commands/rebase/continue.d.ts +7 -0
- package/dist/src/commands/rebase/continue.js +81 -0
- package/dist/src/commands/rebase/index.d.ts +22 -0
- package/dist/src/commands/rebase/index.js +127 -0
- package/dist/src/commands/rebase/patch-loop.d.ts +9 -0
- package/dist/src/commands/rebase/patch-loop.js +135 -0
- package/dist/src/commands/rebase/summary.d.ts +12 -0
- package/dist/src/commands/rebase/summary.js +43 -0
- package/dist/src/commands/rebase.d.ts +4 -0
- package/dist/src/commands/rebase.js +6 -0
- package/dist/src/commands/register.d.ts +13 -0
- package/dist/src/commands/register.js +67 -0
- package/dist/src/commands/reset.d.ts +11 -0
- package/dist/src/commands/reset.js +83 -0
- package/dist/src/commands/resolve.d.ts +9 -0
- package/dist/src/commands/resolve.js +124 -0
- package/dist/src/commands/run.d.ts +9 -0
- package/dist/src/commands/run.js +91 -0
- package/dist/src/commands/setup-support.d.ts +23 -0
- package/dist/src/commands/setup-support.js +310 -0
- package/dist/src/commands/setup.d.ts +11 -0
- package/dist/src/commands/setup.js +94 -0
- package/dist/src/commands/status.d.ts +11 -0
- package/dist/src/commands/status.js +268 -0
- package/dist/src/commands/test.d.ts +12 -0
- package/dist/src/commands/test.js +182 -0
- package/dist/src/commands/token-coverage.d.ts +5 -0
- package/dist/src/commands/token-coverage.js +57 -0
- package/dist/src/commands/token.d.ts +14 -0
- package/dist/src/commands/token.js +121 -0
- package/dist/src/commands/watch.d.ts +9 -0
- package/dist/src/commands/watch.js +112 -0
- package/dist/src/commands/wire.d.ts +13 -0
- package/dist/src/commands/wire.js +149 -0
- package/dist/src/core/ast-utils.d.ts +47 -0
- package/dist/src/core/ast-utils.js +57 -0
- package/dist/src/core/brand-validation.d.ts +7 -0
- package/dist/src/core/brand-validation.js +15 -0
- package/dist/src/core/branding.d.ts +49 -0
- package/dist/src/core/branding.js +229 -0
- package/dist/src/core/browser-wire.d.ts +40 -0
- package/dist/src/core/browser-wire.js +66 -0
- package/dist/src/core/build-prepare.d.ts +25 -0
- package/dist/src/core/build-prepare.js +93 -0
- package/dist/src/core/config-mutate.d.ts +15 -0
- package/dist/src/core/config-mutate.js +51 -0
- package/dist/src/core/config-paths.d.ts +28 -0
- package/dist/src/core/config-paths.js +65 -0
- package/dist/src/core/config-state.d.ts +28 -0
- package/dist/src/core/config-state.js +152 -0
- package/dist/src/core/config-validate.d.ts +11 -0
- package/dist/src/core/config-validate.js +141 -0
- package/dist/src/core/config.d.ts +39 -0
- package/dist/src/core/config.js +70 -0
- package/dist/src/core/file-lock.d.ts +11 -0
- package/dist/src/core/file-lock.js +80 -0
- package/dist/src/core/firefox-archive.d.ts +40 -0
- package/dist/src/core/firefox-archive.js +63 -0
- package/dist/src/core/firefox-cache.d.ts +23 -0
- package/dist/src/core/firefox-cache.js +134 -0
- package/dist/src/core/firefox-download.d.ts +21 -0
- package/dist/src/core/firefox-download.js +129 -0
- package/dist/src/core/firefox-extract.d.ts +21 -0
- package/dist/src/core/firefox-extract.js +53 -0
- package/dist/src/core/firefox.d.ts +34 -0
- package/dist/src/core/firefox.js +78 -0
- package/dist/src/core/furnace-apply-helpers.d.ts +21 -0
- package/dist/src/core/furnace-apply-helpers.js +244 -0
- package/dist/src/core/furnace-apply.d.ts +16 -0
- package/dist/src/core/furnace-apply.js +147 -0
- package/dist/src/core/furnace-config.d.ts +94 -0
- package/dist/src/core/furnace-config.js +372 -0
- package/dist/src/core/furnace-constants.d.ts +4 -0
- package/dist/src/core/furnace-constants.js +6 -0
- package/dist/src/core/furnace-registration-ast.d.ts +24 -0
- package/dist/src/core/furnace-registration-ast.js +218 -0
- package/dist/src/core/furnace-registration-remove.d.ts +14 -0
- package/dist/src/core/furnace-registration-remove.js +89 -0
- package/dist/src/core/furnace-registration-validate.d.ts +20 -0
- package/dist/src/core/furnace-registration-validate.js +40 -0
- package/dist/src/core/furnace-registration.d.ts +29 -0
- package/dist/src/core/furnace-registration.js +96 -0
- package/dist/src/core/furnace-rollback.d.ts +20 -0
- package/dist/src/core/furnace-rollback.js +66 -0
- package/dist/src/core/furnace-scanner.d.ts +40 -0
- package/dist/src/core/furnace-scanner.js +143 -0
- package/dist/src/core/furnace-stories.d.ts +37 -0
- package/dist/src/core/furnace-stories.js +185 -0
- package/dist/src/core/furnace-validate-accessibility.d.ts +6 -0
- package/dist/src/core/furnace-validate-accessibility.js +32 -0
- package/dist/src/core/furnace-validate-checks.d.ts +4 -0
- package/dist/src/core/furnace-validate-checks.js +7 -0
- package/dist/src/core/furnace-validate-compatibility.d.ts +6 -0
- package/dist/src/core/furnace-validate-compatibility.js +57 -0
- package/dist/src/core/furnace-validate-helpers.d.ts +28 -0
- package/dist/src/core/furnace-validate-helpers.js +129 -0
- package/dist/src/core/furnace-validate-registration.d.ts +37 -0
- package/dist/src/core/furnace-validate-registration.js +220 -0
- package/dist/src/core/furnace-validate-structure.d.ts +6 -0
- package/dist/src/core/furnace-validate-structure.js +66 -0
- package/dist/src/core/furnace-validate.d.ts +16 -0
- package/dist/src/core/furnace-validate.js +103 -0
- package/dist/src/core/git-base.d.ts +47 -0
- package/dist/src/core/git-base.js +50 -0
- package/dist/src/core/git-diff.d.ts +63 -0
- package/dist/src/core/git-diff.js +246 -0
- package/dist/src/core/git-file-ops.d.ts +65 -0
- package/dist/src/core/git-file-ops.js +141 -0
- package/dist/src/core/git-status.d.ts +65 -0
- package/dist/src/core/git-status.js +163 -0
- package/dist/src/core/git.d.ts +113 -0
- package/dist/src/core/git.js +363 -0
- package/dist/src/core/license-headers.d.ts +36 -0
- package/dist/src/core/license-headers.js +83 -0
- package/dist/src/core/mach-build-artifacts.d.ts +29 -0
- package/dist/src/core/mach-build-artifacts.js +117 -0
- package/dist/src/core/mach-mozconfig.d.ts +17 -0
- package/dist/src/core/mach-mozconfig.js +50 -0
- package/dist/src/core/mach-python.d.ts +16 -0
- package/dist/src/core/mach-python.js +126 -0
- package/dist/src/core/mach.d.ts +106 -0
- package/dist/src/core/mach.js +166 -0
- package/dist/src/core/manifest-helpers.d.ts +25 -0
- package/dist/src/core/manifest-helpers.js +96 -0
- package/dist/src/core/manifest-register.d.ts +30 -0
- package/dist/src/core/manifest-register.js +65 -0
- package/dist/src/core/manifest-rules.d.ts +39 -0
- package/dist/src/core/manifest-rules.js +151 -0
- package/dist/src/core/manifest-tokenizers.d.ts +34 -0
- package/dist/src/core/manifest-tokenizers.js +84 -0
- package/dist/src/core/parser-fallback.d.ts +36 -0
- package/dist/src/core/parser-fallback.js +43 -0
- package/dist/src/core/patch-apply-fuzz.d.ts +29 -0
- package/dist/src/core/patch-apply-fuzz.js +70 -0
- package/dist/src/core/patch-apply.d.ts +46 -0
- package/dist/src/core/patch-apply.js +235 -0
- package/dist/src/core/patch-export.d.ts +99 -0
- package/dist/src/core/patch-export.js +314 -0
- package/dist/src/core/patch-files.d.ts +11 -0
- package/dist/src/core/patch-files.js +51 -0
- package/dist/src/core/patch-lint.d.ts +72 -0
- package/dist/src/core/patch-lint.js +403 -0
- package/dist/src/core/patch-lock.d.ts +8 -0
- package/dist/src/core/patch-lock.js +29 -0
- package/dist/src/core/patch-manifest-consistency.d.ts +24 -0
- package/dist/src/core/patch-manifest-consistency.js +135 -0
- package/dist/src/core/patch-manifest-io.d.ts +36 -0
- package/dist/src/core/patch-manifest-io.js +77 -0
- package/dist/src/core/patch-manifest-query.d.ts +48 -0
- package/dist/src/core/patch-manifest-query.js +124 -0
- package/dist/src/core/patch-manifest-validate.d.ts +22 -0
- package/dist/src/core/patch-manifest-validate.js +72 -0
- package/dist/src/core/patch-manifest.d.ts +11 -0
- package/dist/src/core/patch-manifest.js +12 -0
- package/dist/src/core/patch-parse.d.ts +43 -0
- package/dist/src/core/patch-parse.js +143 -0
- package/dist/src/core/patch-transform.d.ts +21 -0
- package/dist/src/core/patch-transform.js +138 -0
- package/dist/src/core/rebase-session.d.ts +47 -0
- package/dist/src/core/rebase-session.js +65 -0
- package/dist/src/core/register-browser-content.d.ts +11 -0
- package/dist/src/core/register-browser-content.js +116 -0
- package/dist/src/core/register-module.d.ts +11 -0
- package/dist/src/core/register-module.js +76 -0
- package/dist/src/core/register-shared-css.d.ts +11 -0
- package/dist/src/core/register-shared-css.js +117 -0
- package/dist/src/core/register-test-manifest.d.ts +18 -0
- package/dist/src/core/register-test-manifest.js +99 -0
- package/dist/src/core/state-file.d.ts +4 -0
- package/dist/src/core/state-file.js +25 -0
- package/dist/src/core/token-coverage.d.ts +12 -0
- package/dist/src/core/token-coverage.js +74 -0
- package/dist/src/core/token-manager.d.ts +55 -0
- package/dist/src/core/token-manager.js +387 -0
- package/dist/src/core/wire-destroy.d.ts +21 -0
- package/dist/src/core/wire-destroy.js +103 -0
- package/dist/src/core/wire-dom-fragment.d.ts +23 -0
- package/dist/src/core/wire-dom-fragment.js +129 -0
- package/dist/src/core/wire-init.d.ts +23 -0
- package/dist/src/core/wire-init.js +201 -0
- package/dist/src/core/wire-subscript.d.ts +20 -0
- package/dist/src/core/wire-subscript.js +134 -0
- package/dist/src/core/wire-targets.d.ts +7 -0
- package/dist/src/core/wire-targets.js +9 -0
- package/dist/src/core/wire-utils.d.ts +88 -0
- package/dist/src/core/wire-utils.js +279 -0
- package/dist/src/errors/base.d.ts +60 -0
- package/dist/src/errors/base.js +87 -0
- package/dist/src/errors/build.d.ts +52 -0
- package/dist/src/errors/build.js +114 -0
- package/dist/src/errors/codes.d.ts +29 -0
- package/dist/src/errors/codes.js +30 -0
- package/dist/src/errors/config.d.ts +31 -0
- package/dist/src/errors/config.js +61 -0
- package/dist/src/errors/download.d.ts +42 -0
- package/dist/src/errors/download.js +95 -0
- package/dist/src/errors/furnace.d.ts +10 -0
- package/dist/src/errors/furnace.js +22 -0
- package/dist/src/errors/git.d.ts +41 -0
- package/dist/src/errors/git.js +99 -0
- package/dist/src/errors/patch.d.ts +10 -0
- package/dist/src/errors/patch.js +26 -0
- package/dist/src/errors/rebase.d.ts +20 -0
- package/dist/src/errors/rebase.js +30 -0
- package/dist/src/index.d.ts +21 -0
- package/dist/src/index.js +21 -0
- package/dist/src/types/cli.d.ts +14 -0
- package/dist/src/types/cli.js +2 -0
- package/dist/src/types/commands/index.d.ts +6 -0
- package/dist/src/types/commands/index.js +6 -0
- package/dist/src/types/commands/options.d.ts +239 -0
- package/dist/src/types/commands/options.js +6 -0
- package/dist/src/types/commands/patches.d.ts +89 -0
- package/dist/src/types/commands/patches.js +6 -0
- package/dist/src/types/commands/project.d.ts +71 -0
- package/dist/src/types/commands/project.js +6 -0
- package/dist/src/types/config.d.ts +101 -0
- package/dist/src/types/config.js +2 -0
- package/dist/src/types/furnace.d.ts +158 -0
- package/dist/src/types/furnace.js +2 -0
- package/dist/src/types/index.d.ts +6 -0
- package/dist/src/types/index.js +6 -0
- package/dist/src/utils/errors.d.ts +2 -0
- package/dist/src/utils/errors.js +15 -0
- package/dist/src/utils/fs.d.ts +72 -0
- package/dist/src/utils/fs.js +179 -0
- package/dist/src/utils/logger.d.ts +58 -0
- package/dist/src/utils/logger.js +120 -0
- package/dist/src/utils/options.d.ts +8 -0
- package/dist/src/utils/options.js +16 -0
- package/dist/src/utils/package-root.d.ts +10 -0
- package/dist/src/utils/package-root.js +53 -0
- package/dist/src/utils/parse.d.ts +110 -0
- package/dist/src/utils/parse.js +200 -0
- package/dist/src/utils/paths.d.ts +10 -0
- package/dist/src/utils/paths.js +43 -0
- package/dist/src/utils/platform.d.ts +38 -0
- package/dist/src/utils/platform.js +56 -0
- package/dist/src/utils/process.d.ts +80 -0
- package/dist/src/utils/process.js +188 -0
- package/dist/src/utils/regex.d.ts +24 -0
- package/dist/src/utils/regex.js +40 -0
- package/dist/src/utils/validation.d.ts +133 -0
- package/dist/src/utils/validation.js +250 -0
- package/package.json +106 -0
- package/templates/configs/common.mozconfig +24 -0
- package/templates/configs/darwin.mozconfig +10 -0
- package/templates/configs/linux.mozconfig +12 -0
- package/templates/configs/win32.mozconfig +14 -0
- package/templates/licenses/0BSD.md +14 -0
- package/templates/licenses/EUPL-1.2.md +294 -0
- package/templates/licenses/GPL-2.0-or-later.md +339 -0
- package/templates/licenses/MPL-2.0.md +383 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether a value is a string.
|
|
3
|
+
* @param value - Value to check
|
|
4
|
+
* @returns True if value is a string
|
|
5
|
+
*/
|
|
6
|
+
export declare function isString(value: unknown): value is string;
|
|
7
|
+
/**
|
|
8
|
+
* Checks whether a value is a finite number (excludes NaN).
|
|
9
|
+
* @param value - Value to check
|
|
10
|
+
* @returns True if value is a finite number
|
|
11
|
+
*/
|
|
12
|
+
export declare function isNumber(value: unknown): value is number;
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether a value is a positive integer (greater than zero).
|
|
15
|
+
* @param value - Value to check
|
|
16
|
+
* @returns True if value is a positive integer
|
|
17
|
+
*/
|
|
18
|
+
export declare function isPositiveInteger(value: unknown): value is number;
|
|
19
|
+
/**
|
|
20
|
+
* Checks whether a value is a boolean.
|
|
21
|
+
* @param value - Value to check
|
|
22
|
+
* @returns True if value is a boolean
|
|
23
|
+
*/
|
|
24
|
+
export declare function isBoolean(value: unknown): value is boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Checks whether a value is a non-null, non-array object.
|
|
27
|
+
* @param value - Value to check
|
|
28
|
+
* @returns True if value is a plain object
|
|
29
|
+
*/
|
|
30
|
+
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* Checks whether a value is an array.
|
|
33
|
+
* @param value - Value to check
|
|
34
|
+
* @returns True if value is an array
|
|
35
|
+
*/
|
|
36
|
+
export declare function isArray(value: unknown): value is unknown[];
|
|
37
|
+
/**
|
|
38
|
+
* Asserts that a value is a string or throws.
|
|
39
|
+
* @param value - Value to check
|
|
40
|
+
* @param name - Name of the field for error messages
|
|
41
|
+
*/
|
|
42
|
+
export declare function assertString(value: unknown, name: string): asserts value is string;
|
|
43
|
+
/**
|
|
44
|
+
* Asserts that a value is a non-null object or throws.
|
|
45
|
+
* @param value - Value to check
|
|
46
|
+
* @param name - Name of the field for error messages
|
|
47
|
+
*/
|
|
48
|
+
export declare function assertObject(value: unknown, name: string): asserts value is Record<string, unknown>;
|
|
49
|
+
/**
|
|
50
|
+
* Validates a Firefox version string.
|
|
51
|
+
* Accepts formats like "146.0", "146.0.1", "140.0esr", "147.0b1"
|
|
52
|
+
*/
|
|
53
|
+
export declare function isValidFirefoxVersion(version: string): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Validates a Firefox product string.
|
|
56
|
+
* Accepts: firefox, firefox-esr, firefox-beta
|
|
57
|
+
*/
|
|
58
|
+
export declare function isValidFirefoxProduct(product: string): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Valid project license SPDX identifiers.
|
|
61
|
+
*/
|
|
62
|
+
export declare const PROJECT_LICENSES: readonly ["EUPL-1.2", "MPL-2.0", "0BSD", "GPL-2.0-or-later"];
|
|
63
|
+
/**
|
|
64
|
+
* Validates a project license string.
|
|
65
|
+
*/
|
|
66
|
+
export declare function isValidProjectLicense(license: string): license is (typeof PROJECT_LICENSES)[number];
|
|
67
|
+
/**
|
|
68
|
+
* Valid patch categories.
|
|
69
|
+
*/
|
|
70
|
+
export declare const PATCH_CATEGORIES: readonly ["branding", "ui", "privacy", "security", "infra"];
|
|
71
|
+
/**
|
|
72
|
+
* Validates a patch category string.
|
|
73
|
+
*/
|
|
74
|
+
export declare function isValidPatchCategory(category: string): category is (typeof PATCH_CATEGORIES)[number];
|
|
75
|
+
/**
|
|
76
|
+
* Checks whether a Firefox version string has an ESR suffix.
|
|
77
|
+
*/
|
|
78
|
+
export declare function isEsrVersion(version: string): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Checks whether a Firefox version string is a beta version (e.g. "147.0b1").
|
|
81
|
+
*/
|
|
82
|
+
export declare function isBetaVersion(version: string): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Infers the Firefox product type from a version string.
|
|
85
|
+
* Returns undefined if no clear inference can be made.
|
|
86
|
+
*/
|
|
87
|
+
export declare function inferProductFromVersion(version: string): 'firefox' | 'firefox-esr' | 'firefox-beta' | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Validates that a Firefox product and version are compatible.
|
|
90
|
+
*
|
|
91
|
+
* Rules:
|
|
92
|
+
* - `firefox-esr` requires an ESR version (e.g. "140.0esr", "128.0.1esr").
|
|
93
|
+
* - `firefox-beta` requires a beta version (e.g. "147.0b1").
|
|
94
|
+
* - `firefox` (stable) rejects both ESR and beta version strings.
|
|
95
|
+
*
|
|
96
|
+
* @returns An error message if incompatible, or undefined if valid.
|
|
97
|
+
*/
|
|
98
|
+
export declare function validateFirefoxProductVersionCompatibility(version: string, product: string): string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Validates an application ID string.
|
|
101
|
+
* Accepts reverse-domain format like "org.example.browser"
|
|
102
|
+
*/
|
|
103
|
+
export declare function isValidAppId(appId: string): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Checks if a value is defined (not undefined or null).
|
|
106
|
+
*/
|
|
107
|
+
export declare function isDefined<T>(value: T | undefined | null): value is T;
|
|
108
|
+
/**
|
|
109
|
+
* Validates that a string is a legal CSS custom property identifier (the part after `--`).
|
|
110
|
+
*
|
|
111
|
+
* A valid CSS custom property name requires the ident portion to:
|
|
112
|
+
* - Be non-empty
|
|
113
|
+
* - Contain no whitespace or control characters
|
|
114
|
+
* - Contain no sequences that would break CSS syntax
|
|
115
|
+
* - Consist of printable, CSS-safe characters (letters, digits, hyphens, underscores, etc.)
|
|
116
|
+
*
|
|
117
|
+
* @returns An error message if invalid, or undefined if valid.
|
|
118
|
+
*/
|
|
119
|
+
export declare function validateTokenName(name: string): string | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Normalizes a CSS custom property token name.
|
|
122
|
+
* Strips leading `--` if present, then always prepends `--`.
|
|
123
|
+
* This allows users to pass either `--my-token` or `my-token`.
|
|
124
|
+
*
|
|
125
|
+
* @throws InvalidArgumentError if the resulting name is not a valid CSS custom property.
|
|
126
|
+
*/
|
|
127
|
+
export declare function normalizeTokenName(name: string): string;
|
|
128
|
+
/**
|
|
129
|
+
* Validates a patch name.
|
|
130
|
+
* @param name - The patch name to validate
|
|
131
|
+
* @returns Error message if invalid, undefined if valid
|
|
132
|
+
*/
|
|
133
|
+
export declare function validatePatchName(name: string): string | undefined;
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EUPL-1.2
|
|
2
|
+
/**
|
|
3
|
+
* Type guards and validation utilities.
|
|
4
|
+
* Used to safely narrow types from unknown values.
|
|
5
|
+
*/
|
|
6
|
+
import { InvalidArgumentError } from '../errors/base.js';
|
|
7
|
+
/**
|
|
8
|
+
* Checks whether a value is a string.
|
|
9
|
+
* @param value - Value to check
|
|
10
|
+
* @returns True if value is a string
|
|
11
|
+
*/
|
|
12
|
+
export function isString(value) {
|
|
13
|
+
return typeof value === 'string';
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Checks whether a value is a finite number (excludes NaN).
|
|
17
|
+
* @param value - Value to check
|
|
18
|
+
* @returns True if value is a finite number
|
|
19
|
+
*/
|
|
20
|
+
export function isNumber(value) {
|
|
21
|
+
return typeof value === 'number' && !Number.isNaN(value);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Checks whether a value is a positive integer (greater than zero).
|
|
25
|
+
* @param value - Value to check
|
|
26
|
+
* @returns True if value is a positive integer
|
|
27
|
+
*/
|
|
28
|
+
export function isPositiveInteger(value) {
|
|
29
|
+
return isNumber(value) && Number.isInteger(value) && value > 0;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Checks whether a value is a boolean.
|
|
33
|
+
* @param value - Value to check
|
|
34
|
+
* @returns True if value is a boolean
|
|
35
|
+
*/
|
|
36
|
+
export function isBoolean(value) {
|
|
37
|
+
return typeof value === 'boolean';
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Checks whether a value is a non-null, non-array object.
|
|
41
|
+
* @param value - Value to check
|
|
42
|
+
* @returns True if value is a plain object
|
|
43
|
+
*/
|
|
44
|
+
export function isObject(value) {
|
|
45
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Checks whether a value is an array.
|
|
49
|
+
* @param value - Value to check
|
|
50
|
+
* @returns True if value is an array
|
|
51
|
+
*/
|
|
52
|
+
export function isArray(value) {
|
|
53
|
+
return Array.isArray(value);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Asserts that a value is a string or throws.
|
|
57
|
+
* @param value - Value to check
|
|
58
|
+
* @param name - Name of the field for error messages
|
|
59
|
+
*/
|
|
60
|
+
export function assertString(value, name) {
|
|
61
|
+
if (!isString(value)) {
|
|
62
|
+
throw new InvalidArgumentError(`Expected ${name} to be a string, got ${typeof value}`, name);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Asserts that a value is a non-null object or throws.
|
|
67
|
+
* @param value - Value to check
|
|
68
|
+
* @param name - Name of the field for error messages
|
|
69
|
+
*/
|
|
70
|
+
export function assertObject(value, name) {
|
|
71
|
+
if (!isObject(value)) {
|
|
72
|
+
throw new InvalidArgumentError(`Expected ${name} to be an object, got ${typeof value}`, name);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Validates a Firefox version string.
|
|
77
|
+
* Accepts formats like "146.0", "146.0.1", "140.0esr", "147.0b1"
|
|
78
|
+
*/
|
|
79
|
+
export function isValidFirefoxVersion(version) {
|
|
80
|
+
// Stable/ESR: 146.0, 146.0.1, 140.0esr, 128.0.1esr
|
|
81
|
+
// Beta: 147.0b1, 147.0b2
|
|
82
|
+
return /^[1-9]\d{0,2}\.\d+(?:b[1-9]\d*|\.\d+(?:esr)?|esr)?$/.test(version);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Validates a Firefox product string.
|
|
86
|
+
* Accepts: firefox, firefox-esr, firefox-beta
|
|
87
|
+
*/
|
|
88
|
+
export function isValidFirefoxProduct(product) {
|
|
89
|
+
return ['firefox', 'firefox-esr', 'firefox-beta'].includes(product);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Valid project license SPDX identifiers.
|
|
93
|
+
*/
|
|
94
|
+
export const PROJECT_LICENSES = ['EUPL-1.2', 'MPL-2.0', '0BSD', 'GPL-2.0-or-later'];
|
|
95
|
+
/**
|
|
96
|
+
* Validates a project license string.
|
|
97
|
+
*/
|
|
98
|
+
export function isValidProjectLicense(license) {
|
|
99
|
+
return PROJECT_LICENSES.includes(license);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Valid patch categories.
|
|
103
|
+
*/
|
|
104
|
+
export const PATCH_CATEGORIES = ['branding', 'ui', 'privacy', 'security', 'infra'];
|
|
105
|
+
/**
|
|
106
|
+
* Validates a patch category string.
|
|
107
|
+
*/
|
|
108
|
+
export function isValidPatchCategory(category) {
|
|
109
|
+
return PATCH_CATEGORIES.includes(category);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Checks whether a Firefox version string has an ESR suffix.
|
|
113
|
+
*/
|
|
114
|
+
export function isEsrVersion(version) {
|
|
115
|
+
return /esr$/i.test(version);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Checks whether a Firefox version string is a beta version (e.g. "147.0b1").
|
|
119
|
+
*/
|
|
120
|
+
export function isBetaVersion(version) {
|
|
121
|
+
return /b\d+$/.test(version);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Infers the Firefox product type from a version string.
|
|
125
|
+
* Returns undefined if no clear inference can be made.
|
|
126
|
+
*/
|
|
127
|
+
export function inferProductFromVersion(version) {
|
|
128
|
+
if (isEsrVersion(version)) {
|
|
129
|
+
return 'firefox-esr';
|
|
130
|
+
}
|
|
131
|
+
if (isBetaVersion(version)) {
|
|
132
|
+
return 'firefox-beta';
|
|
133
|
+
}
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Validates that a Firefox product and version are compatible.
|
|
138
|
+
*
|
|
139
|
+
* Rules:
|
|
140
|
+
* - `firefox-esr` requires an ESR version (e.g. "140.0esr", "128.0.1esr").
|
|
141
|
+
* - `firefox-beta` requires a beta version (e.g. "147.0b1").
|
|
142
|
+
* - `firefox` (stable) rejects both ESR and beta version strings.
|
|
143
|
+
*
|
|
144
|
+
* @returns An error message if incompatible, or undefined if valid.
|
|
145
|
+
*/
|
|
146
|
+
export function validateFirefoxProductVersionCompatibility(version, product) {
|
|
147
|
+
const versionIsEsr = isEsrVersion(version);
|
|
148
|
+
const versionIsBeta = isBetaVersion(version);
|
|
149
|
+
switch (product) {
|
|
150
|
+
case 'firefox-esr':
|
|
151
|
+
if (!versionIsEsr) {
|
|
152
|
+
return (`Product "firefox-esr" requires an ESR version (e.g. "128.0esr"), ` +
|
|
153
|
+
`but got "${version}"`);
|
|
154
|
+
}
|
|
155
|
+
break;
|
|
156
|
+
case 'firefox-beta':
|
|
157
|
+
if (!versionIsBeta) {
|
|
158
|
+
return (`Product "firefox-beta" requires a beta version (e.g. "147.0b1"), ` +
|
|
159
|
+
`but got "${version}"`);
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
case 'firefox':
|
|
163
|
+
if (versionIsEsr) {
|
|
164
|
+
return (`Product "firefox" does not accept ESR versions. ` +
|
|
165
|
+
`Use product "firefox-esr" with version "${version}", or remove the "esr" suffix`);
|
|
166
|
+
}
|
|
167
|
+
if (versionIsBeta) {
|
|
168
|
+
return (`Product "firefox" does not accept beta versions. ` +
|
|
169
|
+
`Use product "firefox-beta" with version "${version}", or remove the beta suffix`);
|
|
170
|
+
}
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
return undefined;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Validates an application ID string.
|
|
177
|
+
* Accepts reverse-domain format like "org.example.browser"
|
|
178
|
+
*/
|
|
179
|
+
export function isValidAppId(appId) {
|
|
180
|
+
return /^[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)+$/.test(appId);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Checks if a value is defined (not undefined or null).
|
|
184
|
+
*/
|
|
185
|
+
export function isDefined(value) {
|
|
186
|
+
return value !== undefined && value !== null;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Validates that a string is a legal CSS custom property identifier (the part after `--`).
|
|
190
|
+
*
|
|
191
|
+
* A valid CSS custom property name requires the ident portion to:
|
|
192
|
+
* - Be non-empty
|
|
193
|
+
* - Contain no whitespace or control characters
|
|
194
|
+
* - Contain no sequences that would break CSS syntax
|
|
195
|
+
* - Consist of printable, CSS-safe characters (letters, digits, hyphens, underscores, etc.)
|
|
196
|
+
*
|
|
197
|
+
* @returns An error message if invalid, or undefined if valid.
|
|
198
|
+
*/
|
|
199
|
+
export function validateTokenName(name) {
|
|
200
|
+
// Strip leading -- for validation (callers may pass with or without)
|
|
201
|
+
const ident = name.replace(/^--/, '');
|
|
202
|
+
if (!ident) {
|
|
203
|
+
return 'Token name must not be empty';
|
|
204
|
+
}
|
|
205
|
+
if (/\s/.test(ident)) {
|
|
206
|
+
return `Token name must not contain whitespace: "${name}"`;
|
|
207
|
+
}
|
|
208
|
+
// eslint-disable-next-line no-control-regex
|
|
209
|
+
if (/[\x00-\x1f\x7f]/.test(ident)) {
|
|
210
|
+
return `Token name must not contain control characters: "${name}"`;
|
|
211
|
+
}
|
|
212
|
+
if (ident.includes('*/')) {
|
|
213
|
+
return `Token name must not contain "*/" (would break CSS comments): "${name}"`;
|
|
214
|
+
}
|
|
215
|
+
// Reject characters that would break CSS declaration syntax
|
|
216
|
+
if (/[{}();!]/.test(ident)) {
|
|
217
|
+
return `Token name contains characters that would corrupt CSS syntax: "${name}"`;
|
|
218
|
+
}
|
|
219
|
+
return undefined;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Normalizes a CSS custom property token name.
|
|
223
|
+
* Strips leading `--` if present, then always prepends `--`.
|
|
224
|
+
* This allows users to pass either `--my-token` or `my-token`.
|
|
225
|
+
*
|
|
226
|
+
* @throws InvalidArgumentError if the resulting name is not a valid CSS custom property.
|
|
227
|
+
*/
|
|
228
|
+
export function normalizeTokenName(name) {
|
|
229
|
+
const error = validateTokenName(name);
|
|
230
|
+
if (error) {
|
|
231
|
+
throw new InvalidArgumentError(error, 'tokenName');
|
|
232
|
+
}
|
|
233
|
+
const stripped = name.replace(/^--/, '');
|
|
234
|
+
return `--${stripped}`;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Validates a patch name.
|
|
238
|
+
* @param name - The patch name to validate
|
|
239
|
+
* @returns Error message if invalid, undefined if valid
|
|
240
|
+
*/
|
|
241
|
+
export function validatePatchName(name) {
|
|
242
|
+
if (!name.trim())
|
|
243
|
+
return 'Name is required';
|
|
244
|
+
if (name.length > 50)
|
|
245
|
+
return 'Name must be 50 characters or less';
|
|
246
|
+
if (!/^[a-zA-Z0-9\-_ ]+$/.test(name))
|
|
247
|
+
return 'Name can only contain letters, numbers, hyphens, underscores, and spaces';
|
|
248
|
+
return undefined;
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=validation.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hominis/fireforge",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "FireForge — a build tool for customizing Firefox",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/src/index.js",
|
|
7
|
+
"types": "./dist/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/src/index.d.ts",
|
|
11
|
+
"import": "./dist/src/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json",
|
|
14
|
+
"./*": null
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"fireforge": "./dist/bin/fireforge.js"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"fireforge": "tsx bin/fireforge.ts",
|
|
21
|
+
"build": "npm run clean && tsc -p tsconfig.build.json",
|
|
22
|
+
"clean": "node ./scripts/clean.mjs",
|
|
23
|
+
"lint": "eslint src/ bin/ scripts/ eslint.config.js vitest.config.ts",
|
|
24
|
+
"lint:ci": "eslint src/ bin/ scripts/ eslint.config.js vitest.config.ts --max-warnings 0",
|
|
25
|
+
"lint:fix": "eslint src/ bin/ scripts/ eslint.config.js vitest.config.ts --fix",
|
|
26
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"test:package": "npm run pack:verify",
|
|
29
|
+
"test:watch": "vitest",
|
|
30
|
+
"test:coverage": "vitest run --coverage && node ./scripts/check-coverage-thresholds.mjs",
|
|
31
|
+
"test:firefox-full": "node ./scripts/run-full-firefox-integration.mjs",
|
|
32
|
+
"pack:verify": "vitest run src/__tests__/wrapper-smoke.test.ts",
|
|
33
|
+
"pack:dry-run": "npm pack --dry-run --json --silent",
|
|
34
|
+
"format": "prettier --write --ignore-unknown \"src/**/*.ts\" \"bin/**/*.ts\" \"scripts/**/*.mjs\" \"package.json\" \"eslint.config.js\" \"vitest.config.ts\" \"tsconfig.json\" \"tsconfig.build.json\" \".lintstagedrc.json\" \".prettierignore\" \".prettierrc\" \".gitignore\" \"README.md\" \"CHANGELOG.md\"",
|
|
35
|
+
"format:check": "prettier --check --ignore-unknown \"src/**/*.ts\" \"bin/**/*.ts\" \"scripts/**/*.mjs\" \"package.json\" \"eslint.config.js\" \"vitest.config.ts\" \"tsconfig.json\" \"tsconfig.build.json\" \".lintstagedrc.json\" \".prettierignore\" \".prettierrc\" \".gitignore\" \"README.md\" \"CHANGELOG.md\"",
|
|
36
|
+
"prepare": "node -e \"import('./scripts/prepare.mjs').catch((error) => { if (error && typeof error === 'object' && 'code' in error && error.code === 'ERR_MODULE_NOT_FOUND') process.exit(0); throw error; })\"",
|
|
37
|
+
"prepack": "npm run build",
|
|
38
|
+
"release:check": "npm run format:check && npm run lint:ci && npm run typecheck && npm run test:coverage && npm run pack:verify && npm run pack:dry-run",
|
|
39
|
+
"prepublishOnly": "npm run release:check"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist/",
|
|
43
|
+
"!dist/**/*.test.*",
|
|
44
|
+
"!dist/**/__tests__/",
|
|
45
|
+
"!dist/**/test-utils/",
|
|
46
|
+
"!dist/**/*.js.map",
|
|
47
|
+
"templates/",
|
|
48
|
+
"README.md",
|
|
49
|
+
"CHANGELOG.md",
|
|
50
|
+
"LICENSE.md"
|
|
51
|
+
],
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@clack/prompts": "^1.2.0",
|
|
54
|
+
"acorn": "^8.14.0",
|
|
55
|
+
"commander": "^14.0.0",
|
|
56
|
+
"estree-walker": "^3.0.3",
|
|
57
|
+
"magic-string": "^0.30.17",
|
|
58
|
+
"picocolors": "^1.1.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@eslint/js": "^10.0.0",
|
|
62
|
+
"@types/estree": "^1.0.8",
|
|
63
|
+
"@types/node": "^25.5.2",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
65
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
66
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
67
|
+
"eslint": "^10.0.0",
|
|
68
|
+
"eslint-config-prettier": "^10.1.8",
|
|
69
|
+
"eslint-plugin-jsdoc": "^62.9.0",
|
|
70
|
+
"eslint-plugin-simple-import-sort": "^13.0.0",
|
|
71
|
+
"fast-check": "^4.6.0",
|
|
72
|
+
"husky": "^9.1.7",
|
|
73
|
+
"lint-staged": "^16.2.7",
|
|
74
|
+
"prettier": "^3.7.4",
|
|
75
|
+
"tsx": "^4.7.0",
|
|
76
|
+
"typescript": "~6.0.0",
|
|
77
|
+
"typescript-eslint": "^8.0.0",
|
|
78
|
+
"vite": "^8.0.7",
|
|
79
|
+
"vitest": "^4.0.18"
|
|
80
|
+
},
|
|
81
|
+
"engines": {
|
|
82
|
+
"node": ">=20.0.0"
|
|
83
|
+
},
|
|
84
|
+
"packageManager": "npm@11.12.1",
|
|
85
|
+
"license": "EUPL-1.2",
|
|
86
|
+
"repository": {
|
|
87
|
+
"type": "git",
|
|
88
|
+
"url": "https://github.com/topfi/fireforge.git"
|
|
89
|
+
},
|
|
90
|
+
"homepage": "https://github.com/topfi/fireforge",
|
|
91
|
+
"bugs": {
|
|
92
|
+
"url": "https://github.com/topfi/fireforge/issues"
|
|
93
|
+
},
|
|
94
|
+
"keywords": [
|
|
95
|
+
"fireforge",
|
|
96
|
+
"firefox",
|
|
97
|
+
"browser",
|
|
98
|
+
"build-tool",
|
|
99
|
+
"customization",
|
|
100
|
+
"patch-workflow"
|
|
101
|
+
],
|
|
102
|
+
"publishConfig": {
|
|
103
|
+
"access": "public",
|
|
104
|
+
"provenance": true
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Common mozconfig for ${name}
|
|
2
|
+
# This file is merged with platform-specific configs
|
|
3
|
+
|
|
4
|
+
# Application identity
|
|
5
|
+
ac_add_options --with-app-name=${binaryName}
|
|
6
|
+
ac_add_options --with-branding=browser/branding/${binaryName}
|
|
7
|
+
export MOZ_APP_BASENAME=${binaryName}
|
|
8
|
+
|
|
9
|
+
# Build options
|
|
10
|
+
ac_add_options --enable-application=browser
|
|
11
|
+
ac_add_options --enable-bootstrap
|
|
12
|
+
|
|
13
|
+
# Optimization (override in platform configs as needed)
|
|
14
|
+
ac_add_options --enable-optimize
|
|
15
|
+
ac_add_options --disable-debug
|
|
16
|
+
|
|
17
|
+
# Disable crash reporting
|
|
18
|
+
ac_add_options --disable-crashreporter
|
|
19
|
+
|
|
20
|
+
# Note: To disable telemetry, set MOZ_TELEMETRY_REPORTING= in your build environment
|
|
21
|
+
# or configure runtime prefs in user.js
|
|
22
|
+
|
|
23
|
+
# Disable features we don't need
|
|
24
|
+
ac_add_options --disable-updater
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# macOS-specific mozconfig for ${name}
|
|
2
|
+
|
|
3
|
+
# Note: MOZ_MACBUNDLE_ID must be set via branding/configure.sh, not mozconfig.
|
|
4
|
+
# It is automatically set when using --with-branding.
|
|
5
|
+
|
|
6
|
+
# Use system toolchain
|
|
7
|
+
ac_add_options --with-macos-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
|
|
8
|
+
|
|
9
|
+
# Code signing (disabled for development)
|
|
10
|
+
# ac_add_options --enable-apple-silicon (uncomment for ARM builds)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Linux-specific mozconfig for ${name}
|
|
2
|
+
|
|
3
|
+
# Use system libraries where available
|
|
4
|
+
ac_add_options --with-system-zlib
|
|
5
|
+
ac_add_options --with-system-jpeg
|
|
6
|
+
|
|
7
|
+
# PGO disabled by default (can enable for release builds)
|
|
8
|
+
# ac_add_options --enable-lto=cross
|
|
9
|
+
# ac_add_options --enable-profile-generate
|
|
10
|
+
|
|
11
|
+
# Wayland support
|
|
12
|
+
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Windows-specific mozconfig for ${name}
|
|
2
|
+
|
|
3
|
+
# Use Visual Studio toolchain
|
|
4
|
+
ac_add_options --host=x86_64-pc-mingw32
|
|
5
|
+
ac_add_options --target=x86_64-pc-mingw32
|
|
6
|
+
|
|
7
|
+
# Windows SDK
|
|
8
|
+
# ac_add_options --with-windows-version=10.0.19041.0
|
|
9
|
+
|
|
10
|
+
# Clang-cl
|
|
11
|
+
ac_add_options --enable-clang-cl
|
|
12
|
+
|
|
13
|
+
# Disable maintenance service
|
|
14
|
+
ac_add_options --disable-maintenance-service
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
BSD Zero Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [year] [fullname]
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|