@adguard/filters-compiler 3.2.11 → 3.2.12
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/README.md +77 -14
- package/dist/index.cjs +348 -166
- package/dist/index.d.ts +16 -6
- package/dist/index.js +347 -167
- package/dist/main/optimization.d.ts +112 -0
- package/dist/types/src/main/optimization.d.ts +112 -0
- package/dist/types/src/main/utils/concurrent.d.ts +8 -0
- package/dist/types/src/main/utils/log.d.ts +31 -0
- package/dist/types/src/main/utils/webutils.d.ts +11 -0
- package/dist/types/test/optimization.test.d.ts +1 -0
- package/dist/types/test/webutils.test.d.ts +1 -0
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Type declarations for the public API of @adguard/filters-compiler.
|
|
3
3
|
*
|
|
4
4
|
* These declarations provide TypeScript consumers with typed signatures for
|
|
5
|
-
* the
|
|
5
|
+
* the exported functions. They are hand-written because the entry point
|
|
6
6
|
* (src/index.js) is JavaScript and is not processed by the TypeScript compiler.
|
|
7
7
|
*
|
|
8
8
|
* When src/index.js is eventually migrated to TypeScript, this file should be
|
|
@@ -28,17 +28,18 @@ export type CustomPlatformsConfig = Record<string, PlatformConfig>;
|
|
|
28
28
|
* @param logPath Path for the compilation log file (logging disabled if omitted).
|
|
29
29
|
* @param reportFile Path for the compilation report file.
|
|
30
30
|
* @param platformsPath Path for platform-specific output.
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
31
|
+
* @param includedFilterIds Filter IDs to include; empty (default) processes all.
|
|
32
|
+
* @param excludedFilterIds Filter IDs to exclude; empty (default) excludes none.
|
|
33
33
|
* @param customPlatformsConfig Optional custom platform configurations.
|
|
34
|
+
* @returns Promise that resolves when compilation is complete.
|
|
34
35
|
*/
|
|
35
36
|
export function compile(
|
|
36
37
|
path: string,
|
|
37
38
|
logPath: string | undefined,
|
|
38
39
|
reportFile: string | undefined,
|
|
39
|
-
platformsPath: string,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
platformsPath: string | null,
|
|
41
|
+
includedFilterIds?: number[] | null,
|
|
42
|
+
excludedFilterIds?: number[] | null,
|
|
42
43
|
customPlatformsConfig?: CustomPlatformsConfig,
|
|
43
44
|
): Promise<void>;
|
|
44
45
|
|
|
@@ -82,3 +83,12 @@ export function validateLocales(
|
|
|
82
83
|
localesDirPath: string,
|
|
83
84
|
requiredLocales: string[],
|
|
84
85
|
): ValidateLocalesResult;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* TS2834: Unable to resolve './main/optimization' on the consumer side.
|
|
89
|
+
* An explicit file extension is required to prevent this error.
|
|
90
|
+
* The mapping from `.js` to `.d.ts` is part of the specification;
|
|
91
|
+
* however, resolving a `.ts` file to a `.d.ts` file is not guaranteed.
|
|
92
|
+
* @see https://www.typescriptlang.org/docs/handbook/modules/reference.html#file-extension-substitution
|
|
93
|
+
*/
|
|
94
|
+
export { localOptimizationStatistics, OptimizationStatsError } from './main/optimization.js';
|