@adguard/agtree 2.2.0 → 3.0.0-alpha.2
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 +1 -1
- package/dist/ast-utils/clone.js +61 -0
- package/dist/ast-utils/modifiers.js +53 -0
- package/dist/ast-utils/network-rules.js +41 -0
- package/dist/ast-utils/scriptlets.js +87 -0
- package/dist/common/abp-snippet-injection-body-common.js +23 -0
- package/dist/common/agent-common.js +56 -0
- package/dist/common/ubo-selector-common.js +17 -0
- package/dist/compatibility-tables/base.js +262 -0
- package/dist/compatibility-tables/compatibility-table-data.js +11 -0
- package/dist/compatibility-tables/modifiers.js +55 -0
- package/dist/compatibility-tables/platforms.js +76 -0
- package/dist/compatibility-tables/redirects.js +100 -0
- package/dist/compatibility-tables/schemas/base.js +111 -0
- package/dist/compatibility-tables/schemas/modifier.js +129 -0
- package/dist/compatibility-tables/schemas/platform.js +69 -0
- package/dist/compatibility-tables/schemas/redirect.js +29 -0
- package/dist/compatibility-tables/schemas/resource-type.js +36 -0
- package/dist/compatibility-tables/schemas/scriptlet.js +79 -0
- package/dist/compatibility-tables/scriptlets.js +28 -0
- package/dist/compatibility-tables/utils/platform-helpers.js +105 -0
- package/dist/compatibility-tables/utils/resource-type-helpers.js +61 -0
- package/dist/compatibility-tables/utils/zod-camelcase.js +25 -0
- package/dist/converter/base-interfaces/base-converter.js +59 -0
- package/dist/converter/base-interfaces/conversion-result.js +38 -0
- package/dist/converter/base-interfaces/rule-converter-base.js +60 -0
- package/dist/converter/comment/index.js +54 -0
- package/dist/converter/cosmetic/css.js +69 -0
- package/dist/converter/cosmetic/element-hiding.js +62 -0
- package/dist/converter/cosmetic/header-removal.js +123 -0
- package/dist/converter/cosmetic/html.js +379 -0
- package/dist/converter/cosmetic/index.js +118 -0
- package/dist/converter/cosmetic/rule-modifiers/adg.js +79 -0
- package/dist/converter/cosmetic/scriptlet.js +354 -0
- package/dist/converter/css/index.js +188 -0
- package/dist/converter/data/css.js +126 -0
- package/dist/converter/filter-list.js +88 -0
- package/dist/converter/index.js +8 -0
- package/dist/converter/misc/network-rule-modifier.js +311 -0
- package/dist/converter/network/index.js +99 -0
- package/dist/converter/raw-filter-list.js +56 -0
- package/dist/converter/rule.js +81 -0
- package/dist/deserializer/base-deserializer.js +29 -0
- package/dist/deserializer/comment/agent-comment-deserializer.js +79 -0
- package/dist/deserializer/comment/agent-deserializer.js +65 -0
- package/dist/deserializer/comment/comment-rule-deserializer.js +54 -0
- package/dist/deserializer/comment/config-comment-deserializer.js +111 -0
- package/dist/deserializer/comment/hint-comment-deserializer.js +72 -0
- package/dist/deserializer/comment/hint-deserializer.js +85 -0
- package/dist/deserializer/comment/metadata-comment-deserializer.js +69 -0
- package/dist/deserializer/comment/pre-processor-comment-deserializer.js +112 -0
- package/dist/deserializer/comment/simple-comment-deserializer.js +65 -0
- package/dist/deserializer/cosmetic/cosmetic-rule-deserializer.js +131 -0
- package/dist/deserializer/cosmetic/css-injection-body-deserializer.js +56 -0
- package/dist/deserializer/cosmetic/element-hiding-body-deserializer.js +48 -0
- package/dist/deserializer/cosmetic/scriptlet-body/abp-snippet-injection-body-deserializer.js +39 -0
- package/dist/deserializer/cosmetic/scriptlet-body/adg-scriptlet-injection-body-deserializer.js +40 -0
- package/dist/deserializer/cosmetic/scriptlet-body/scriptlet-body-deserializer.js +54 -0
- package/dist/deserializer/cosmetic/scriptlet-body/ubo-scriptlet-injection-body-deserializer.js +38 -0
- package/dist/deserializer/empty-rule-deserializer.js +48 -0
- package/dist/deserializer/filterlist-deserializer.js +85 -0
- package/dist/deserializer/index.js +8 -0
- package/dist/deserializer/invalid-rule-deserializer.js +50 -0
- package/dist/deserializer/invalid-rule-error-node-deserializer.js +50 -0
- package/dist/deserializer/misc/domain-list-deserializer.js +64 -0
- package/dist/deserializer/misc/list-item-deserializer.js +69 -0
- package/dist/deserializer/misc/list-items-deserializer.js +30 -0
- package/dist/deserializer/misc/logical-expression-deserializer.js +196 -0
- package/dist/deserializer/misc/modifier-deserializer.js +87 -0
- package/dist/deserializer/misc/modifier-list-deserializer.js +61 -0
- package/dist/deserializer/misc/parameter-list-deserializer.js +64 -0
- package/dist/deserializer/misc/value-deserializer.js +50 -0
- package/dist/deserializer/network/host-rule-deserializer.js +67 -0
- package/dist/deserializer/network/hostname-list-deserializer.js +56 -0
- package/dist/deserializer/network/network-rule-deserializer.js +65 -0
- package/dist/deserializer/rule-deserializer.js +65 -0
- package/dist/deserializer/syntax-deserialization-map.js +21 -0
- package/dist/errors/adblock-syntax-error.js +39 -0
- package/dist/errors/binary-schema-mismatch-error.js +37 -0
- package/dist/errors/not-implemented-error.js +31 -0
- package/dist/errors/rule-conversion-error.js +26 -0
- package/dist/generator/base-generator.js +27 -0
- package/dist/generator/comment/agent-comment-generator.js +31 -0
- package/dist/generator/comment/agent-generator.js +36 -0
- package/dist/generator/comment/comment-rule-generator.js +47 -0
- package/dist/generator/comment/config-comment-generator.js +45 -0
- package/dist/generator/comment/hint-comment-generator.js +28 -0
- package/dist/generator/comment/hint-generator.js +33 -0
- package/dist/generator/comment/metadata-comment-generator.js +33 -0
- package/dist/generator/comment/pre-processor-comment-generator.js +48 -0
- package/dist/generator/comment/simple-comment-generator.js +29 -0
- package/dist/generator/cosmetic/body/abp-snippet-injection-body-generator.js +38 -0
- package/dist/generator/cosmetic/body/adg-scriptlet-injection-body-generator.js +43 -0
- package/dist/generator/cosmetic/body/ubo-scriptlet-injection-body-generator.js +45 -0
- package/dist/generator/cosmetic/cosmetic-rule-body-generator.js +94 -0
- package/dist/generator/cosmetic/cosmetic-rule-generator.js +54 -0
- package/dist/generator/cosmetic/cosmetic-rule-pattern-generator.js +42 -0
- package/dist/generator/css/adg-css-injection-generator.js +42 -0
- package/dist/generator/filterlist-generator.js +67 -0
- package/dist/generator/index.js +9 -0
- package/dist/generator/misc/domain-list-generator.js +26 -0
- package/dist/generator/misc/list-items-generator.js +39 -0
- package/dist/generator/misc/logical-expression-generator.js +48 -0
- package/dist/generator/misc/modifier-generator.js +34 -0
- package/dist/generator/misc/modifier-list-generator.js +29 -0
- package/dist/generator/misc/parameter-list-generator.js +41 -0
- package/dist/generator/misc/value-generator.js +24 -0
- package/dist/generator/network/host-rule-generator.js +39 -0
- package/dist/generator/network/network-rule-generator.js +38 -0
- package/dist/generator/rule-generator.js +65 -0
- package/dist/index.js +70 -0
- package/dist/marshalling-utils/comment/agent-comment-common.js +21 -0
- package/dist/marshalling-utils/comment/agent-common.js +40 -0
- package/dist/marshalling-utils/comment/config-comment-common.js +54 -0
- package/dist/marshalling-utils/comment/hint-comment-common.js +22 -0
- package/dist/marshalling-utils/comment/hint-common.js +56 -0
- package/dist/marshalling-utils/comment/metadata-comment-common.js +41 -0
- package/dist/marshalling-utils/comment/pre-processor-comment-common.js +59 -0
- package/dist/marshalling-utils/comment/simple-comment-common.js +22 -0
- package/dist/marshalling-utils/cosmetic/body/abp-snippet-injection-body-common.js +61 -0
- package/dist/marshalling-utils/cosmetic/body/adg-scriptlet-injection-body-common.js +66 -0
- package/dist/marshalling-utils/cosmetic/body/css-injection-body-common.js +24 -0
- package/dist/marshalling-utils/cosmetic/body/element-hiding-body-common.js +21 -0
- package/dist/marshalling-utils/cosmetic/body/ubo-scriptlet-injection-body-common.js +114 -0
- package/dist/marshalling-utils/cosmetic/cosmetic-rule-common.js +48 -0
- package/dist/marshalling-utils/empty-rule-common.js +20 -0
- package/dist/marshalling-utils/filter-list-common.js +21 -0
- package/dist/marshalling-utils/invalid-rule-common.js +21 -0
- package/dist/marshalling-utils/invalid-rule-error-node-common.js +22 -0
- package/dist/marshalling-utils/misc/binary-type-common.js +66 -0
- package/dist/marshalling-utils/misc/domain-list-common.js +36 -0
- package/dist/marshalling-utils/misc/host-rule-common.js +25 -0
- package/dist/marshalling-utils/misc/hostname-list-common.js +21 -0
- package/dist/marshalling-utils/misc/list-item-common.js +22 -0
- package/dist/marshalling-utils/misc/logical-expression-common.js +83 -0
- package/dist/marshalling-utils/misc/modifier-common.js +231 -0
- package/dist/marshalling-utils/misc/modifier-list-common.js +21 -0
- package/dist/marshalling-utils/misc/parameter-list-common.js +21 -0
- package/dist/marshalling-utils/misc/value-common.js +22 -0
- package/dist/marshalling-utils/network/network-rule-common.js +25 -0
- package/dist/marshalling-utils/syntax-serialization-map.js +30 -0
- package/dist/nodes/index.js +168 -0
- package/dist/package.json.js +9 -0
- package/dist/parser/base-parser.js +30 -0
- package/dist/parser/comment/agent-comment-parser.js +119 -0
- package/dist/parser/comment/agent-parser.js +110 -0
- package/dist/parser/comment/comment-parser.js +108 -0
- package/dist/parser/comment/config-comment-parser.js +137 -0
- package/dist/parser/comment/hint-comment-parser.js +117 -0
- package/dist/parser/comment/hint-parser.js +129 -0
- package/dist/parser/comment/metadata-comment-parser.js +129 -0
- package/dist/parser/comment/preprocessor-parser.js +199 -0
- package/dist/parser/comment/simple-comment-parser.js +106 -0
- package/dist/parser/cosmetic/body/abp-snippet-injection-body-parser.js +79 -0
- package/dist/parser/cosmetic/body/adg-scriptlet-injection-body-parser.js +149 -0
- package/dist/parser/cosmetic/body/ubo-scriptlet-injection-body-parser.js +110 -0
- package/dist/parser/cosmetic/cosmetic-rule-parser.js +453 -0
- package/dist/parser/css/adg-css-injection-parser.js +208 -0
- package/dist/parser/css/balancing.js +94 -0
- package/dist/parser/css/constants.js +18 -0
- package/dist/parser/css/css-token-stream.js +343 -0
- package/dist/parser/css/ubo-selector-parser.js +369 -0
- package/dist/parser/filterlist-parser.js +102 -0
- package/dist/parser/index.js +12 -0
- package/dist/parser/misc/app-list-parser.js +45 -0
- package/dist/parser/misc/domain-list-parser.js +52 -0
- package/dist/parser/misc/list-items-parser.js +116 -0
- package/dist/parser/misc/logical-expression-parser.js +279 -0
- package/dist/parser/misc/method-list-parser.js +46 -0
- package/dist/parser/misc/modifier-list.js +70 -0
- package/dist/parser/misc/modifier-parser.js +89 -0
- package/dist/parser/misc/parameter-list-parser.js +75 -0
- package/dist/parser/misc/stealth-option-list-parser.js +46 -0
- package/dist/parser/misc/ubo-parameter-list-parser.js +149 -0
- package/dist/parser/misc/value-parser.js +37 -0
- package/dist/parser/network/host-rule-parser.js +130 -0
- package/dist/parser/network/network-rule-parser.js +117 -0
- package/dist/parser/options.js +23 -0
- package/dist/parser/rule-parser.js +192 -0
- package/dist/serializer/base-serializer.js +29 -0
- package/dist/serializer/comment/agent-comment-serializer.js +74 -0
- package/dist/serializer/comment/agent-serializer.js +59 -0
- package/dist/serializer/comment/comment-rule-serializer.js +105 -0
- package/dist/serializer/comment/config-comment-serializer.js +82 -0
- package/dist/serializer/comment/hint-comment-serializer.js +65 -0
- package/dist/serializer/comment/hint-serializer.js +54 -0
- package/dist/serializer/comment/metadata-comment-serializer.js +73 -0
- package/dist/serializer/comment/pre-processor-comment-serializer.js +71 -0
- package/dist/serializer/comment/simple-comment-serializer.js +52 -0
- package/dist/serializer/cosmetic/body/abp-snippet-injection-body-serializer.js +36 -0
- package/dist/serializer/cosmetic/body/adg-scriptlet-injection-body-serializer.js +36 -0
- package/dist/serializer/cosmetic/body/scriptlet-body-serializer.js +50 -0
- package/dist/serializer/cosmetic/body/ubo-scriptlet-injection-body-serializer.js +36 -0
- package/dist/serializer/cosmetic/cosmetic-rule-serializer.js +120 -0
- package/dist/serializer/cosmetic/css-injection-body-serializer.js +51 -0
- package/dist/serializer/cosmetic/element-hiding-body-serializer.js +40 -0
- package/dist/serializer/empty-rule-serializer.js +37 -0
- package/dist/serializer/filterlist-serializer.js +45 -0
- package/dist/serializer/index.js +7 -0
- package/dist/serializer/invalid-rule-error-node-serializer.js +41 -0
- package/dist/serializer/invalid-rule-serializer.js +40 -0
- package/dist/serializer/misc/domain-list-serializer.js +64 -0
- package/dist/serializer/misc/list-item-serializer.js +58 -0
- package/dist/serializer/misc/list-items-serializer.js +29 -0
- package/dist/serializer/misc/logical-expression-serializer.js +136 -0
- package/dist/serializer/misc/modifier-list-serializer.js +58 -0
- package/dist/serializer/misc/modifier-serializer.js +49 -0
- package/dist/serializer/misc/parameter-list-serializer.js +52 -0
- package/dist/serializer/misc/value-serializer.js +50 -0
- package/dist/serializer/network/host-rule-serializer.js +70 -0
- package/dist/serializer/network/hostname-list-serializer.js +53 -0
- package/dist/serializer/network/network-rule-serializer.js +54 -0
- package/dist/serializer/rule-serializer.js +61 -0
- package/dist/types/ast-utils/clone.d.ts +26 -0
- package/dist/types/ast-utils/filter-list.d.ts +11 -0
- package/dist/types/ast-utils/modifiers.d.ts +20 -0
- package/dist/types/ast-utils/network-rules.d.ts +15 -0
- package/dist/types/ast-utils/scriptlets.d.ts +52 -0
- package/dist/types/common/abp-snippet-injection-body-common.d.ts +15 -0
- package/dist/types/common/agent-common.d.ts +10 -0
- package/dist/types/common/ubo-selector-common.d.ts +10 -0
- package/dist/types/compatibility-tables/base.d.ts +157 -0
- package/dist/types/compatibility-tables/compatibility-table-data.d.ts +68 -0
- package/dist/types/compatibility-tables/index.d.ts +13 -0
- package/dist/types/compatibility-tables/modifiers.d.ts +22 -0
- package/dist/types/compatibility-tables/platforms.d.ts +49 -0
- package/dist/types/compatibility-tables/redirects.d.ts +33 -0
- package/dist/types/compatibility-tables/schemas/base.d.ts +124 -0
- package/dist/types/compatibility-tables/schemas/index.d.ts +8 -0
- package/dist/types/compatibility-tables/schemas/modifier.d.ts +36 -0
- package/dist/types/compatibility-tables/schemas/platform.d.ts +16 -0
- package/dist/types/compatibility-tables/schemas/redirect.d.ts +25 -0
- package/dist/types/compatibility-tables/schemas/resource-type.d.ts +41 -0
- package/dist/types/compatibility-tables/schemas/scriptlet.d.ts +31 -0
- package/dist/types/compatibility-tables/scriptlets.d.ts +15 -0
- package/dist/types/compatibility-tables/types.d.ts +34 -0
- package/dist/types/compatibility-tables/utils/platform-helpers.d.ts +44 -0
- package/dist/types/compatibility-tables/utils/resource-type-helpers.d.ts +20 -0
- package/dist/types/compatibility-tables/utils/zod-camelcase.d.ts +15 -0
- package/dist/types/converter/base-interfaces/base-converter.d.ts +42 -0
- package/dist/types/converter/base-interfaces/conversion-result.d.ts +43 -0
- package/dist/types/converter/base-interfaces/rule-converter-base.d.ts +44 -0
- package/dist/types/converter/comment/index.d.ts +23 -0
- package/dist/types/converter/cosmetic/css.d.ts +23 -0
- package/dist/types/converter/cosmetic/element-hiding.d.ts +23 -0
- package/dist/types/converter/cosmetic/header-removal.d.ts +37 -0
- package/dist/types/converter/cosmetic/html.d.ts +54 -0
- package/dist/types/converter/cosmetic/index.d.ts +33 -0
- package/dist/types/converter/cosmetic/rule-modifiers/adg.d.ts +21 -0
- package/dist/types/converter/cosmetic/scriptlet.d.ts +33 -0
- package/dist/types/converter/css/index.d.ts +40 -0
- package/dist/types/converter/data/css.d.ts +48 -0
- package/dist/types/converter/filter-list.d.ts +31 -0
- package/dist/types/converter/index.d.ts +5 -0
- package/dist/types/converter/misc/network-rule-modifier.d.ts +35 -0
- package/dist/types/converter/network/index.d.ts +33 -0
- package/dist/types/converter/raw-filter-list.d.ts +31 -0
- package/dist/types/converter/raw-rule.d.ts +28 -0
- package/dist/types/converter/rule.d.ts +37 -0
- package/dist/types/deserializer/base-deserializer.d.ts +15 -0
- package/dist/types/deserializer/comment/agent-comment-deserializer.d.ts +34 -0
- package/dist/types/deserializer/comment/agent-deserializer.d.ts +25 -0
- package/dist/types/deserializer/comment/comment-rule-deserializer.d.ts +16 -0
- package/dist/types/deserializer/comment/config-comment-deserializer.d.ts +27 -0
- package/dist/types/deserializer/comment/hint-comment-deserializer.d.ts +24 -0
- package/dist/types/deserializer/comment/hint-deserializer.d.ts +26 -0
- package/dist/types/deserializer/comment/metadata-comment-deserializer.d.ts +26 -0
- package/dist/types/deserializer/comment/pre-processor-comment-deserializer.d.ts +29 -0
- package/dist/types/deserializer/comment/simple-comment-deserializer.d.ts +26 -0
- package/dist/types/deserializer/cosmetic/cosmetic-rule-deserializer.d.ts +18 -0
- package/dist/types/deserializer/cosmetic/css-injection-body-deserializer.d.ts +15 -0
- package/dist/types/deserializer/cosmetic/element-hiding-body-deserializer.d.ts +16 -0
- package/dist/types/deserializer/cosmetic/scriptlet-body/abp-snippet-injection-body-deserializer.d.ts +17 -0
- package/dist/types/deserializer/cosmetic/scriptlet-body/adg-scriptlet-injection-body-deserializer.d.ts +18 -0
- package/dist/types/deserializer/cosmetic/scriptlet-body/scriptlet-body-deserializer.d.ts +19 -0
- package/dist/types/deserializer/cosmetic/scriptlet-body/ubo-scriptlet-injection-body-deserializer.d.ts +17 -0
- package/dist/types/deserializer/empty-rule-deserializer.d.ts +16 -0
- package/dist/types/deserializer/filterlist-deserializer.d.ts +34 -0
- package/dist/types/deserializer/index.d.ts +2 -0
- package/dist/types/deserializer/invalid-rule-deserializer.d.ts +16 -0
- package/dist/types/deserializer/invalid-rule-error-node-deserializer.d.ts +16 -0
- package/dist/types/deserializer/misc/domain-list-deserializer.d.ts +15 -0
- package/dist/types/deserializer/misc/list-item-deserializer.d.ts +19 -0
- package/dist/types/deserializer/misc/list-items-deserializer.d.ts +16 -0
- package/dist/types/deserializer/misc/logical-expression-deserializer.d.ts +55 -0
- package/dist/types/deserializer/misc/modifier-deserializer.d.ts +18 -0
- package/dist/types/deserializer/misc/modifier-list-deserializer.d.ts +20 -0
- package/dist/types/deserializer/misc/parameter-list-deserializer.d.ts +18 -0
- package/dist/types/deserializer/misc/value-deserializer.d.ts +17 -0
- package/dist/types/deserializer/network/host-rule-deserializer.d.ts +18 -0
- package/dist/types/deserializer/network/hostname-list-deserializer.d.ts +15 -0
- package/dist/types/deserializer/network/network-rule-deserializer.d.ts +18 -0
- package/dist/types/deserializer/rule-deserializer.d.ts +17 -0
- package/dist/types/deserializer/syntax-deserialization-map.d.ts +2 -0
- package/dist/types/errors/adblock-syntax-error.d.ts +25 -0
- package/dist/types/errors/binary-schema-mismatch-error.d.ts +23 -0
- package/dist/types/errors/not-implemented-error.d.ts +14 -0
- package/dist/types/errors/rule-conversion-error.d.ts +14 -0
- package/dist/types/generator/base-generator.d.ts +12 -0
- package/dist/types/generator/comment/agent-comment-generator.d.ts +14 -0
- package/dist/types/generator/comment/agent-generator.d.ts +15 -0
- package/dist/types/generator/comment/comment-rule-generator.d.ts +14 -0
- package/dist/types/generator/comment/config-comment-generator.d.ts +14 -0
- package/dist/types/generator/comment/hint-comment-generator.d.ts +14 -0
- package/dist/types/generator/comment/hint-generator.d.ts +14 -0
- package/dist/types/generator/comment/index.d.ts +1 -0
- package/dist/types/generator/comment/metadata-comment-generator.d.ts +14 -0
- package/dist/types/generator/comment/pre-processor-comment-generator.d.ts +14 -0
- package/dist/types/generator/comment/simple-comment-generator.d.ts +14 -0
- package/dist/types/generator/cosmetic/body/abp-snippet-injection-body-generator.d.ts +15 -0
- package/dist/types/generator/cosmetic/body/adg-scriptlet-injection-body-generator.d.ts +21 -0
- package/dist/types/generator/cosmetic/body/ubo-scriptlet-injection-body-generator.d.ts +21 -0
- package/dist/types/generator/cosmetic/cosmetic-rule-body-generator.d.ts +20 -0
- package/dist/types/generator/cosmetic/cosmetic-rule-generator.d.ts +28 -0
- package/dist/types/generator/cosmetic/cosmetic-rule-pattern-generator.d.ts +18 -0
- package/dist/types/generator/cosmetic/index.d.ts +1 -0
- package/dist/types/generator/css/adg-css-injection-generator.d.ts +15 -0
- package/dist/types/generator/css/ubo-selector-generator.d.ts +14 -0
- package/dist/types/generator/filterlist-generator.d.ts +18 -0
- package/dist/types/generator/index.d.ts +3 -0
- package/dist/types/generator/misc/domain-list-generator.d.ts +15 -0
- package/dist/types/generator/misc/list-items-generator.d.ts +25 -0
- package/dist/types/generator/misc/logical-expression-generator.d.ts +14 -0
- package/dist/types/generator/misc/modifier-generator.d.ts +14 -0
- package/dist/types/generator/misc/modifier-list-generator.d.ts +14 -0
- package/dist/types/generator/misc/parameter-list-generator.d.ts +15 -0
- package/dist/types/generator/misc/value-generator.d.ts +14 -0
- package/dist/types/generator/network/host-rule-generator.d.ts +14 -0
- package/dist/types/generator/network/index.d.ts +2 -0
- package/dist/types/generator/network/network-rule-generator.d.ts +14 -0
- package/dist/types/generator/rule-generator.d.ts +24 -0
- package/dist/types/index.d.ts +55 -0
- package/dist/types/marshalling-utils/comment/agent-comment-common.d.ts +14 -0
- package/dist/types/marshalling-utils/comment/agent-common.d.ts +20 -0
- package/dist/types/marshalling-utils/comment/config-comment-common.d.ts +42 -0
- package/dist/types/marshalling-utils/comment/hint-comment-common.d.ts +15 -0
- package/dist/types/marshalling-utils/comment/hint-common.d.ts +33 -0
- package/dist/types/marshalling-utils/comment/metadata-comment-common.d.ts +21 -0
- package/dist/types/marshalling-utils/comment/pre-processor-comment-common.d.ts +37 -0
- package/dist/types/marshalling-utils/comment/simple-comment-common.d.ts +15 -0
- package/dist/types/marshalling-utils/cosmetic/body/abp-snippet-injection-body-common.d.ts +23 -0
- package/dist/types/marshalling-utils/cosmetic/body/adg-scriptlet-injection-body-common.d.ts +9 -0
- package/dist/types/marshalling-utils/cosmetic/body/css-injection-body-common.d.ts +17 -0
- package/dist/types/marshalling-utils/cosmetic/body/element-hiding-body-common.d.ts +14 -0
- package/dist/types/marshalling-utils/cosmetic/body/ubo-scriptlet-injection-body-common.d.ts +9 -0
- package/dist/types/marshalling-utils/cosmetic/cosmetic-rule-common.d.ts +28 -0
- package/dist/types/marshalling-utils/empty-rule-common.d.ts +13 -0
- package/dist/types/marshalling-utils/filter-list-common.d.ts +14 -0
- package/dist/types/marshalling-utils/invalid-rule-common.d.ts +14 -0
- package/dist/types/marshalling-utils/invalid-rule-error-node-common.d.ts +15 -0
- package/dist/types/marshalling-utils/misc/binary-type-common.d.ts +57 -0
- package/dist/types/marshalling-utils/misc/domain-list-common.d.ts +24 -0
- package/dist/types/marshalling-utils/misc/host-rule-common.d.ts +18 -0
- package/dist/types/marshalling-utils/misc/hostname-list-common.d.ts +14 -0
- package/dist/types/marshalling-utils/misc/list-item-common.d.ts +15 -0
- package/dist/types/marshalling-utils/misc/logical-expression-common.d.ts +47 -0
- package/dist/types/marshalling-utils/misc/modifier-common.d.ts +41 -0
- package/dist/types/marshalling-utils/misc/modifier-list-common.d.ts +14 -0
- package/dist/types/marshalling-utils/misc/parameter-list-common.d.ts +14 -0
- package/dist/types/marshalling-utils/misc/value-common.d.ts +15 -0
- package/dist/types/marshalling-utils/network/network-rule-common.d.ts +18 -0
- package/dist/types/marshalling-utils/syntax-serialization-map.d.ts +2 -0
- package/dist/types/nodes/index.d.ts +1183 -0
- package/dist/types/parser/base-parser.d.ts +16 -0
- package/dist/types/parser/comment/agent-comment-parser.d.ts +42 -0
- package/dist/types/parser/comment/agent-parser.d.ts +33 -0
- package/dist/types/parser/comment/comment-parser.d.ts +76 -0
- package/dist/types/parser/comment/config-comment-parser.d.ts +31 -0
- package/dist/types/parser/comment/hint-comment-parser.d.ts +33 -0
- package/dist/types/parser/comment/hint-parser.d.ts +30 -0
- package/dist/types/parser/comment/metadata-comment-parser.d.ts +29 -0
- package/dist/types/parser/comment/preprocessor-parser.d.ts +43 -0
- package/dist/types/parser/comment/simple-comment-parser.d.ts +33 -0
- package/dist/types/parser/cosmetic/body/abp-snippet-injection-body-parser.d.ts +34 -0
- package/dist/types/parser/cosmetic/body/adg-scriptlet-injection-body-parser.d.ts +47 -0
- package/dist/types/parser/cosmetic/body/ubo-scriptlet-injection-body-parser.d.ts +44 -0
- package/dist/types/parser/cosmetic/cosmetic-rule-parser.d.ts +51 -0
- package/dist/types/parser/css/adg-css-injection-parser.d.ts +28 -0
- package/dist/types/parser/css/balancing.d.ts +36 -0
- package/dist/types/parser/css/constants.d.ts +10 -0
- package/dist/types/parser/css/css-token-stream.d.ts +210 -0
- package/dist/types/parser/css/ubo-selector-parser.d.ts +46 -0
- package/dist/types/parser/filterlist-parser.d.ts +29 -0
- package/dist/types/parser/index.d.ts +6 -0
- package/dist/types/parser/misc/app-list-parser.d.ts +22 -0
- package/dist/types/parser/misc/domain-list-parser.d.ts +26 -0
- package/dist/types/parser/misc/list-items-parser.d.ts +37 -0
- package/dist/types/parser/misc/logical-expression-parser.d.ts +42 -0
- package/dist/types/parser/misc/method-list-parser.d.ts +22 -0
- package/dist/types/parser/misc/modifier-list.d.ts +24 -0
- package/dist/types/parser/misc/modifier-parser.d.ts +21 -0
- package/dist/types/parser/misc/parameter-list-parser.d.ts +17 -0
- package/dist/types/parser/misc/stealth-option-list-parser.d.ts +22 -0
- package/dist/types/parser/misc/ubo-parameter-list-parser.d.ts +21 -0
- package/dist/types/parser/misc/value-parser.d.ts +18 -0
- package/dist/types/parser/network/host-rule-parser.d.ts +35 -0
- package/dist/types/parser/network/network-rule-parser.d.ts +31 -0
- package/dist/types/parser/options.d.ts +41 -0
- package/dist/types/parser/rule-parser.d.ts +78 -0
- package/dist/types/serializer/base-serializer.d.ts +15 -0
- package/dist/types/serializer/comment/agent-comment-serializer.d.ts +34 -0
- package/dist/types/serializer/comment/agent-serializer.d.ts +15 -0
- package/dist/types/serializer/comment/comment-rule-serializer.d.ts +68 -0
- package/dist/types/serializer/comment/config-comment-serializer.d.ts +25 -0
- package/dist/types/serializer/comment/hint-comment-serializer.d.ts +23 -0
- package/dist/types/serializer/comment/hint-serializer.d.ts +24 -0
- package/dist/types/serializer/comment/metadata-comment-serializer.d.ts +25 -0
- package/dist/types/serializer/comment/pre-processor-comment-serializer.d.ts +28 -0
- package/dist/types/serializer/comment/simple-comment-serializer.d.ts +24 -0
- package/dist/types/serializer/cosmetic/body/abp-snippet-injection-body-serializer.d.ts +25 -0
- package/dist/types/serializer/cosmetic/body/adg-scriptlet-injection-body-serializer.d.ts +25 -0
- package/dist/types/serializer/cosmetic/body/scriptlet-body-serializer.d.ts +17 -0
- package/dist/types/serializer/cosmetic/body/ubo-scriptlet-injection-body-serializer.d.ts +25 -0
- package/dist/types/serializer/cosmetic/cosmetic-rule-serializer.d.ts +19 -0
- package/dist/types/serializer/cosmetic/css-injection-body-serializer.d.ts +15 -0
- package/dist/types/serializer/cosmetic/element-hiding-body-serializer.d.ts +15 -0
- package/dist/types/serializer/empty-rule-serializer.d.ts +15 -0
- package/dist/types/serializer/filterlist-serializer.d.ts +15 -0
- package/dist/types/serializer/index.d.ts +1 -0
- package/dist/types/serializer/invalid-rule-error-node-serializer.d.ts +15 -0
- package/dist/types/serializer/invalid-rule-serializer.d.ts +15 -0
- package/dist/types/serializer/misc/domain-list-serializer.d.ts +21 -0
- package/dist/types/serializer/misc/list-item-serializer.d.ts +16 -0
- package/dist/types/serializer/misc/list-items-serializer.d.ts +15 -0
- package/dist/types/serializer/misc/logical-expression-serializer.d.ts +52 -0
- package/dist/types/serializer/misc/modifier-list-serializer.d.ts +20 -0
- package/dist/types/serializer/misc/modifier-serializer.d.ts +18 -0
- package/dist/types/serializer/misc/parameter-list-serializer.d.ts +17 -0
- package/dist/types/serializer/misc/value-serializer.d.ts +17 -0
- package/dist/types/serializer/network/host-rule-serializer.d.ts +30 -0
- package/dist/types/serializer/network/hostname-list-serializer.d.ts +15 -0
- package/dist/types/serializer/network/network-rule-serializer.d.ts +18 -0
- package/dist/types/serializer/rule-serializer.d.ts +17 -0
- package/dist/types/utils/adblockers.d.ts +49 -0
- package/dist/types/utils/binary-schema-version.d.ts +9 -0
- package/dist/types/utils/byte-buffer.d.ts +54 -0
- package/dist/types/utils/categorizer.d.ts +14 -0
- package/dist/types/utils/clone.d.ts +15 -0
- package/dist/types/utils/constants.d.ts +188 -0
- package/dist/types/utils/cosmetic-rule-separator.d.ts +45 -0
- package/dist/types/utils/deep-freeze.d.ts +13 -0
- package/dist/types/utils/domain.d.ts +29 -0
- package/dist/types/utils/error.d.ts +8 -0
- package/dist/types/utils/index.d.ts +15 -0
- package/dist/types/utils/input-byte-buffer.d.ts +146 -0
- package/dist/types/utils/is-chromium.d.ts +7 -0
- package/dist/types/utils/logical-expression.d.ts +45 -0
- package/dist/types/utils/multi-value-map.d.ts +16 -0
- package/dist/types/utils/output-byte-buffer.d.ts +132 -0
- package/dist/types/utils/position-provider.d.ts +46 -0
- package/dist/types/utils/quotes.d.ts +94 -0
- package/dist/types/utils/regexp.d.ts +54 -0
- package/dist/types/utils/storage-interface.d.ts +23 -0
- package/dist/types/utils/string.d.ts +280 -0
- package/dist/types/utils/text-decoder-polyfill.d.ts +14 -0
- package/dist/types/utils/text-encoder-polyfill.d.ts +18 -0
- package/dist/types/utils/type-guards.d.ts +47 -0
- package/dist/types/validator/constants.d.ts +89 -0
- package/dist/types/validator/helpers.d.ts +37 -0
- package/dist/types/validator/index.d.ts +38 -0
- package/dist/types/validator/value.d.ts +12 -0
- package/dist/types/version.d.ts +5 -0
- package/dist/utils/adblockers.js +56 -0
- package/dist/utils/binary-schema-version.js +17 -0
- package/dist/utils/byte-buffer.js +91 -0
- package/dist/utils/categorizer.js +44 -0
- package/dist/utils/clone.js +28 -0
- package/dist/utils/constants.js +249 -0
- package/dist/utils/cosmetic-rule-separator.js +127 -0
- package/dist/utils/deep-freeze.js +32 -0
- package/dist/utils/domain.js +59 -0
- package/dist/utils/error.js +49 -0
- package/dist/utils/index.js +21 -0
- package/dist/utils/input-byte-buffer.js +265 -0
- package/dist/utils/is-chromium.js +20 -0
- package/dist/utils/logical-expression.js +92 -0
- package/dist/utils/multi-value-map.js +33 -0
- package/dist/utils/output-byte-buffer.js +231 -0
- package/dist/utils/position-provider.js +73 -0
- package/dist/utils/quotes.js +214 -0
- package/dist/utils/regexp.js +176 -0
- package/dist/utils/string.js +559 -0
- package/dist/utils/text-decoder-polyfill.js +107 -0
- package/dist/utils/text-encoder-polyfill.js +78 -0
- package/dist/utils/type-guards.js +47 -0
- package/dist/validator/constants.js +210 -0
- package/dist/validator/helpers.js +45 -0
- package/dist/validator/index.js +174 -0
- package/dist/validator/value.js +568 -0
- package/dist/version.js +18 -0
- package/package.json +61 -39
- package/dist/agtree.d.ts +0 -4155
- package/dist/agtree.js +0 -15819
- package/dist/agtree.mjs +0 -15720
- package/dist/compatibility-table-data.js +0 -12782
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ConfigCommentRuleMarshallingMap: {
|
|
10
|
+
readonly Marker: 1;
|
|
11
|
+
readonly Command: 2;
|
|
12
|
+
readonly Params: 3;
|
|
13
|
+
readonly Comment: 4;
|
|
14
|
+
readonly Start: 5;
|
|
15
|
+
readonly End: 6;
|
|
16
|
+
};
|
|
17
|
+
export type ConfigCommentRuleMarshallingMap = typeof ConfigCommentRuleMarshallingMap[keyof typeof ConfigCommentRuleMarshallingMap];
|
|
18
|
+
/**
|
|
19
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
20
|
+
* as it allows us to use a single byte to represent a property.
|
|
21
|
+
*
|
|
22
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
23
|
+
*
|
|
24
|
+
* @note Only 256 values can be represented this way.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ConfigNodeMarshallingMap: {
|
|
27
|
+
readonly Value: 1;
|
|
28
|
+
readonly Start: 2;
|
|
29
|
+
readonly End: 3;
|
|
30
|
+
};
|
|
31
|
+
export type ConfigNodeMarshallingMap = typeof ConfigNodeMarshallingMap[keyof typeof ConfigNodeMarshallingMap];
|
|
32
|
+
/**
|
|
33
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
34
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
35
|
+
*
|
|
36
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
37
|
+
*
|
|
38
|
+
* @note Only 256 values can be represented this way.
|
|
39
|
+
*
|
|
40
|
+
* @see {@link https://github.com/AdguardTeam/AGLint/blob/master/src/linter/inline-config.ts}
|
|
41
|
+
*/
|
|
42
|
+
export declare const FREQUENT_COMMANDS_SERIALIZATION_MAP: Map<string, number>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const HintCommentMarshallingMap: {
|
|
10
|
+
readonly Syntax: 1;
|
|
11
|
+
readonly Children: 2;
|
|
12
|
+
readonly Start: 3;
|
|
13
|
+
readonly End: 4;
|
|
14
|
+
};
|
|
15
|
+
export type HintCommentMarshallingMap = typeof HintCommentMarshallingMap[keyof typeof HintCommentMarshallingMap];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const HintNodeMarshallingMap: {
|
|
10
|
+
readonly Name: 1;
|
|
11
|
+
readonly Params: 2;
|
|
12
|
+
readonly Start: 3;
|
|
13
|
+
readonly End: 4;
|
|
14
|
+
};
|
|
15
|
+
export type HintNodeMarshallingMap = typeof HintNodeMarshallingMap[keyof typeof HintNodeMarshallingMap];
|
|
16
|
+
/**
|
|
17
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
18
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
19
|
+
*
|
|
20
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
21
|
+
*
|
|
22
|
+
* @note Only 256 values can be represented this way.
|
|
23
|
+
*/
|
|
24
|
+
export declare const FREQUENT_HINTS_SERIALIZATION_MAP: Map<string, number>;
|
|
25
|
+
/**
|
|
26
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
27
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
28
|
+
*
|
|
29
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
30
|
+
*
|
|
31
|
+
* @note Only 256 values can be represented this way.
|
|
32
|
+
*/
|
|
33
|
+
export declare const FREQUENT_PLATFORMS_SERIALIZATION_MAP: Map<string, number>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MetadataCommentMarshallingMap: {
|
|
10
|
+
readonly Marker: 1;
|
|
11
|
+
readonly Header: 2;
|
|
12
|
+
readonly Value: 3;
|
|
13
|
+
readonly Start: 4;
|
|
14
|
+
readonly End: 5;
|
|
15
|
+
};
|
|
16
|
+
export type MetadataCommentMarshallingMap = typeof MetadataCommentMarshallingMap[keyof typeof MetadataCommentMarshallingMap];
|
|
17
|
+
/**
|
|
18
|
+
* Value map for binary deserialization. This helps to reduce the size of the serialized data,
|
|
19
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
20
|
+
*/
|
|
21
|
+
export declare const FREQUENT_HEADERS_DESERIALIZATION_MAP: Map<number, string>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PreProcessorRuleMarshallingMap: {
|
|
10
|
+
readonly Name: 1;
|
|
11
|
+
readonly Params: 2;
|
|
12
|
+
readonly Syntax: 3;
|
|
13
|
+
readonly Start: 4;
|
|
14
|
+
readonly End: 5;
|
|
15
|
+
};
|
|
16
|
+
export type PreProcessorRuleMarshallingMap = typeof PreProcessorRuleMarshallingMap[keyof typeof PreProcessorRuleMarshallingMap];
|
|
17
|
+
/**
|
|
18
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
19
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
20
|
+
*
|
|
21
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
22
|
+
*
|
|
23
|
+
* @note Only 256 values can be represented this way.
|
|
24
|
+
*
|
|
25
|
+
* @see {@link https://adguard.com/kb/general/ad-filtering/create-own-filters/#preprocessor-directives}
|
|
26
|
+
* @see {@link https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#pre-parsing-directives}
|
|
27
|
+
*/
|
|
28
|
+
export declare const FREQUENT_DIRECTIVES_SERIALIZATION_MAP: Map<string, number>;
|
|
29
|
+
/**
|
|
30
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
31
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
32
|
+
*
|
|
33
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
34
|
+
*
|
|
35
|
+
* @note Only 256 values can be represented this way.
|
|
36
|
+
*/
|
|
37
|
+
export declare const FREQUENT_PARAMS_SERIALIZATION_MAP: Map<string, number>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SimpleCommentMarshallingMap: {
|
|
10
|
+
readonly Marker: 1;
|
|
11
|
+
readonly Text: 2;
|
|
12
|
+
readonly Start: 3;
|
|
13
|
+
readonly End: 4;
|
|
14
|
+
};
|
|
15
|
+
export type SimpleCommentMarshallingMap = typeof SimpleCommentMarshallingMap[keyof typeof SimpleCommentMarshallingMap];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const AbpSnippetBodyMarshallingMap: {
|
|
10
|
+
readonly Children: 1;
|
|
11
|
+
readonly Start: 2;
|
|
12
|
+
readonly End: 3;
|
|
13
|
+
};
|
|
14
|
+
export type AbpSnippetBodyMarshallingMap = typeof AbpSnippetBodyMarshallingMap[keyof typeof AbpSnippetBodyMarshallingMap];
|
|
15
|
+
/**
|
|
16
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
17
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
18
|
+
*
|
|
19
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
20
|
+
*
|
|
21
|
+
* @note Only 256 values can be represented this way.
|
|
22
|
+
*/
|
|
23
|
+
export declare const FREQUENT_ABP_SNIPPET_ARGS_SERIALIZATION_MAP: Map<string, number>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FREQUENT_ADG_SCRIPTLET_ARGS_SERIALIZATION_MAP: Map<string, number>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CssInjectionRuleMarshallingMap: {
|
|
10
|
+
readonly SelectorList: 1;
|
|
11
|
+
readonly DeclarationList: 2;
|
|
12
|
+
readonly MediaQueryList: 3;
|
|
13
|
+
readonly Remove: 4;
|
|
14
|
+
readonly Start: 5;
|
|
15
|
+
readonly End: 6;
|
|
16
|
+
};
|
|
17
|
+
export type CssInjectionRuleMarshallingMap = typeof CssInjectionRuleMarshallingMap[keyof typeof CssInjectionRuleMarshallingMap];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ElementHidingRuleMarshallingMap: {
|
|
10
|
+
readonly SelectorList: 1;
|
|
11
|
+
readonly Start: 2;
|
|
12
|
+
readonly End: 3;
|
|
13
|
+
};
|
|
14
|
+
export type ElementHidingRuleMarshallingMap = typeof ElementHidingRuleMarshallingMap[keyof typeof ElementHidingRuleMarshallingMap];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FREQUENT_UBO_SCRIPTLET_ARGS_SERIALIZATION_MAP: Map<string, number>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CosmeticRuleMarshallingMap: {
|
|
10
|
+
readonly Syntax: 1;
|
|
11
|
+
readonly Exception: 2;
|
|
12
|
+
readonly Separator: 3;
|
|
13
|
+
readonly Modifiers: 4;
|
|
14
|
+
readonly Domains: 5;
|
|
15
|
+
readonly Body: 6;
|
|
16
|
+
readonly Start: 7;
|
|
17
|
+
readonly End: 8;
|
|
18
|
+
};
|
|
19
|
+
export type CosmeticRuleMarshallingMap = typeof CosmeticRuleMarshallingMap[keyof typeof CosmeticRuleMarshallingMap];
|
|
20
|
+
/**
|
|
21
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
22
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
23
|
+
*
|
|
24
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
25
|
+
*
|
|
26
|
+
* @note Only 256 values can be represented this way.
|
|
27
|
+
*/
|
|
28
|
+
export declare const COSMETIC_RULE_SEPARATOR_SERIALIZATION_MAP: Map<string, number>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const EmptyRuleMarshallingMap: {
|
|
10
|
+
readonly Start: 1;
|
|
11
|
+
readonly End: 2;
|
|
12
|
+
};
|
|
13
|
+
export type EmptyRuleMarshallingMap = typeof EmptyRuleMarshallingMap[keyof typeof EmptyRuleMarshallingMap];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FilterListNodeMarshallingMap: {
|
|
10
|
+
readonly Children: 1;
|
|
11
|
+
readonly Start: 2;
|
|
12
|
+
readonly End: 3;
|
|
13
|
+
};
|
|
14
|
+
export type FilterListNodeMarshallingMap = typeof FilterListNodeMarshallingMap[keyof typeof FilterListNodeMarshallingMap];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const InvalidRuleMarshallingMap: {
|
|
10
|
+
readonly Error: 1;
|
|
11
|
+
readonly Start: 2;
|
|
12
|
+
readonly End: 3;
|
|
13
|
+
};
|
|
14
|
+
export type InvalidRuleMarshallingMap = typeof InvalidRuleMarshallingMap[keyof typeof InvalidRuleMarshallingMap];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const InvalidRuleErrorNodeMarshallingMap: {
|
|
10
|
+
readonly Name: 1;
|
|
11
|
+
readonly Message: 2;
|
|
12
|
+
readonly Start: 3;
|
|
13
|
+
readonly End: 4;
|
|
14
|
+
};
|
|
15
|
+
export type InvalidRuleErrorNodeMarshallingMap = typeof InvalidRuleErrorNodeMarshallingMap[keyof typeof InvalidRuleErrorNodeMarshallingMap];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type map for binary serialization.
|
|
3
|
+
*
|
|
4
|
+
* @note Values should be fit into 8 bits.
|
|
5
|
+
*/
|
|
6
|
+
export declare const BinaryTypeMarshallingMap: {
|
|
7
|
+
readonly Null: 1;
|
|
8
|
+
readonly Undefined: 2;
|
|
9
|
+
readonly Boolean: 3;
|
|
10
|
+
readonly Int: 4;
|
|
11
|
+
readonly Float: 5;
|
|
12
|
+
readonly NotANumber: 6;
|
|
13
|
+
readonly String: 7;
|
|
14
|
+
readonly FilterListNode: 8;
|
|
15
|
+
readonly EmptyRule: 9;
|
|
16
|
+
readonly InvalidRule: 10;
|
|
17
|
+
readonly CommentRuleNode: 11;
|
|
18
|
+
readonly AgentNode: 12;
|
|
19
|
+
readonly AgentRuleNode: 13;
|
|
20
|
+
readonly HintNode: 14;
|
|
21
|
+
readonly HintRuleNode: 15;
|
|
22
|
+
readonly MetadataCommentRuleNode: 16;
|
|
23
|
+
readonly ConfigCommentRuleNode: 17;
|
|
24
|
+
readonly PreProcessorCommentRuleNode: 18;
|
|
25
|
+
readonly ConfigNode: 19;
|
|
26
|
+
readonly NetworkRuleNode: 20;
|
|
27
|
+
readonly HostRuleNode: 21;
|
|
28
|
+
readonly ElementHidingRule: 22;
|
|
29
|
+
readonly CssInjectionRule: 23;
|
|
30
|
+
readonly ScriptletInjectionRule: 24;
|
|
31
|
+
readonly JsInjectionRule: 25;
|
|
32
|
+
readonly HtmlFilteringRule: 26;
|
|
33
|
+
readonly ScriptletInjectionRuleBodyNode: 27;
|
|
34
|
+
readonly ElementHidingRuleBody: 28;
|
|
35
|
+
readonly CssInjectionRuleBody: 29;
|
|
36
|
+
readonly HtmlFilteringRuleBody: 30;
|
|
37
|
+
readonly JsInjectionRuleBody: 31;
|
|
38
|
+
readonly ValueNode: 32;
|
|
39
|
+
readonly RawNode: 33;
|
|
40
|
+
readonly ModifierNode: 34;
|
|
41
|
+
readonly ModifierListNode: 35;
|
|
42
|
+
readonly ParameterListNode: 36;
|
|
43
|
+
readonly DomainListNode: 37;
|
|
44
|
+
readonly DomainNode: 38;
|
|
45
|
+
readonly MethodListNode: 39;
|
|
46
|
+
readonly MethodNode: 40;
|
|
47
|
+
readonly StealthOptionListNode: 41;
|
|
48
|
+
readonly StealthOptionNode: 42;
|
|
49
|
+
readonly AppListNode: 43;
|
|
50
|
+
readonly AppNode: 44;
|
|
51
|
+
readonly HostnameListNode: 45;
|
|
52
|
+
readonly InvalidRuleErrorNode: 46;
|
|
53
|
+
readonly ExpressionVariableNode: 47;
|
|
54
|
+
readonly ExpressionOperatorNode: 48;
|
|
55
|
+
readonly ExpressionParenthesisNode: 49;
|
|
56
|
+
};
|
|
57
|
+
export type BinaryTypeMarshallingMap = typeof BinaryTypeMarshallingMap[keyof typeof BinaryTypeMarshallingMap];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DomainListMarshallingMap: {
|
|
10
|
+
readonly Separator: 1;
|
|
11
|
+
readonly Children: 2;
|
|
12
|
+
readonly Start: 3;
|
|
13
|
+
readonly End: 4;
|
|
14
|
+
};
|
|
15
|
+
export type DomainListMarshallingMap = typeof DomainListMarshallingMap[keyof typeof DomainListMarshallingMap];
|
|
16
|
+
/**
|
|
17
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
18
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
19
|
+
*
|
|
20
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
21
|
+
*
|
|
22
|
+
* @note Only 256 values can be represented this way.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SEPARATOR_SERIALIZATION_MAP: Map<string, number>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const HostRuleMarshallingMap: {
|
|
10
|
+
readonly Syntax: 1;
|
|
11
|
+
readonly Raws: 2;
|
|
12
|
+
readonly Ip: 3;
|
|
13
|
+
readonly HostnameList: 4;
|
|
14
|
+
readonly Comment: 5;
|
|
15
|
+
readonly Start: 6;
|
|
16
|
+
readonly End: 7;
|
|
17
|
+
};
|
|
18
|
+
export type HostRuleMarshallingMap = typeof HostRuleMarshallingMap[keyof typeof HostRuleMarshallingMap];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const HostnameListNodeMarshallingMap: {
|
|
10
|
+
readonly Children: 1;
|
|
11
|
+
readonly Start: 2;
|
|
12
|
+
readonly End: 3;
|
|
13
|
+
};
|
|
14
|
+
export type HostnameListNodeMarshallingMap = typeof HostnameListNodeMarshallingMap[keyof typeof HostnameListNodeMarshallingMap];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ListItemMarshallingMap: {
|
|
10
|
+
readonly Exception: 1;
|
|
11
|
+
readonly Value: 2;
|
|
12
|
+
readonly Start: 3;
|
|
13
|
+
readonly End: 4;
|
|
14
|
+
};
|
|
15
|
+
export type ListItemMarshallingMap = typeof ListItemMarshallingMap[keyof typeof ListItemMarshallingMap];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { OperatorValue } from '../../nodes';
|
|
2
|
+
/**
|
|
3
|
+
* Property map for binary serialization.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION} !
|
|
6
|
+
*/
|
|
7
|
+
export declare const VariableNodeBinaryPropMarshallingMap: {
|
|
8
|
+
readonly Name: 1;
|
|
9
|
+
readonly FrequentName: 2;
|
|
10
|
+
readonly Start: 3;
|
|
11
|
+
readonly End: 4;
|
|
12
|
+
};
|
|
13
|
+
export type VariableNodeBinaryPropMarshallingMap = typeof VariableNodeBinaryPropMarshallingMap[keyof typeof VariableNodeBinaryPropMarshallingMap];
|
|
14
|
+
/**
|
|
15
|
+
* Property map for binary serialization.
|
|
16
|
+
*
|
|
17
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION} !
|
|
18
|
+
*/
|
|
19
|
+
export declare const OperatorNodeBinaryPropMarshallingMap: {
|
|
20
|
+
readonly Operator: 1;
|
|
21
|
+
readonly Left: 2;
|
|
22
|
+
readonly Right: 3;
|
|
23
|
+
readonly Start: 4;
|
|
24
|
+
readonly End: 5;
|
|
25
|
+
};
|
|
26
|
+
export type OperatorNodeBinaryPropMarshallingMap = typeof OperatorNodeBinaryPropMarshallingMap[keyof typeof OperatorNodeBinaryPropMarshallingMap];
|
|
27
|
+
/**
|
|
28
|
+
* Property map for binary serialization.
|
|
29
|
+
*
|
|
30
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION} !
|
|
31
|
+
*/
|
|
32
|
+
export declare const ParenthesisNodeBinaryPropMarshallingMap: {
|
|
33
|
+
readonly Expression: 1;
|
|
34
|
+
readonly Start: 2;
|
|
35
|
+
readonly End: 3;
|
|
36
|
+
};
|
|
37
|
+
export type ParenthesisNodeBinaryPropMarshallingMap = typeof ParenthesisNodeBinaryPropMarshallingMap[keyof typeof ParenthesisNodeBinaryPropMarshallingMap];
|
|
38
|
+
/**
|
|
39
|
+
* Property map for binary serialization.
|
|
40
|
+
*
|
|
41
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION} !
|
|
42
|
+
*/
|
|
43
|
+
export declare const LOGICAL_EXPRESSION_OPERATOR_SERIALISATION_MAP: Map<OperatorValue, number>;
|
|
44
|
+
/**
|
|
45
|
+
* Serialization map for known variables.
|
|
46
|
+
*/
|
|
47
|
+
export declare const KNOWN_VARIABLES_SERIALIZATION_MAP: Map<string, number>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ModifierNodeMarshallingMap: {
|
|
10
|
+
readonly Name: 1;
|
|
11
|
+
readonly Value: 2;
|
|
12
|
+
readonly Exception: 3;
|
|
13
|
+
readonly Start: 4;
|
|
14
|
+
readonly End: 5;
|
|
15
|
+
};
|
|
16
|
+
export type ModifierNodeMarshallingMap = typeof ModifierNodeMarshallingMap[keyof typeof ModifierNodeMarshallingMap];
|
|
17
|
+
/**
|
|
18
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
19
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
20
|
+
*
|
|
21
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
22
|
+
*
|
|
23
|
+
* @note Only 256 values can be represented this way.
|
|
24
|
+
*/
|
|
25
|
+
export declare const FREQUENT_MODIFIERS_SERIALIZATION_MAP: Map<string, number>;
|
|
26
|
+
/**
|
|
27
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
28
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
29
|
+
*
|
|
30
|
+
* ! IMPORTANT: If you change values here, please update the binary schema version
|
|
31
|
+
*
|
|
32
|
+
* @note Only 256 values can be represented this way.
|
|
33
|
+
*/
|
|
34
|
+
export declare const FREQUENT_REDIRECT_VALUES_SERIALIZATION_MAP: Map<string, number>;
|
|
35
|
+
/**
|
|
36
|
+
* Value map for binary serialization. This helps to reduce the size of the serialized data,
|
|
37
|
+
* as it allows us to use a single byte to represent frequently used values.
|
|
38
|
+
*
|
|
39
|
+
* @note This is a special map which allows us to use different value maps for different modifiers.
|
|
40
|
+
*/
|
|
41
|
+
export declare const FREQUENT_REDIRECT_MODIFIERS_SERIALIZATION_MAP: Map<string, Map<string, number>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ModifierListNodeMarshallingMap: {
|
|
10
|
+
readonly Children: 1;
|
|
11
|
+
readonly Start: 2;
|
|
12
|
+
readonly End: 3;
|
|
13
|
+
};
|
|
14
|
+
export type ModifierListNodeMarshallingMap = typeof ModifierListNodeMarshallingMap[keyof typeof ModifierListNodeMarshallingMap];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ParameterListNodeMarshallingMap: {
|
|
10
|
+
readonly Children: 1;
|
|
11
|
+
readonly Start: 2;
|
|
12
|
+
readonly End: 3;
|
|
13
|
+
};
|
|
14
|
+
export type ParameterListNodeMarshallingMap = typeof ParameterListNodeMarshallingMap[keyof typeof ParameterListNodeMarshallingMap];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ValueNodeMarshallingMap: {
|
|
10
|
+
readonly Value: 1;
|
|
11
|
+
readonly FrequentValue: 2;
|
|
12
|
+
readonly Start: 3;
|
|
13
|
+
readonly End: 4;
|
|
14
|
+
};
|
|
15
|
+
export type ValueNodeMarshallingMap = typeof ValueNodeMarshallingMap[keyof typeof ValueNodeMarshallingMap];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property map for binary serialization. This helps to reduce the size of the serialized data,
|
|
3
|
+
* as it allows us to use a single byte to represent a property.
|
|
4
|
+
*
|
|
5
|
+
* ! IMPORTANT: If you change values here, please update the {@link BINARY_SCHEMA_VERSION}!
|
|
6
|
+
*
|
|
7
|
+
* @note Only 256 values can be represented this way.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NetworkRuleMarshallingMap: {
|
|
10
|
+
readonly Syntax: 1;
|
|
11
|
+
readonly Raws: 2;
|
|
12
|
+
readonly Exception: 3;
|
|
13
|
+
readonly Pattern: 4;
|
|
14
|
+
readonly ModifierList: 5;
|
|
15
|
+
readonly Start: 6;
|
|
16
|
+
readonly End: 7;
|
|
17
|
+
};
|
|
18
|
+
export type NetworkRuleMarshallingMap = typeof NetworkRuleMarshallingMap[keyof typeof NetworkRuleMarshallingMap];
|