webext-schema 5.3.3 → 5.3.5

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/package.json CHANGED
@@ -20,21 +20,21 @@
20
20
  "sinon": "^18.0.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@types/firefox-webext-browser": "^120.0.3",
24
- "@types/node": "^20.14.2",
23
+ "@types/firefox-webext-browser": "^120.0.4",
24
+ "@types/node": "^20.14.10",
25
25
  "@types/sinon": "^17.0.3",
26
- "c8": "^9.1.0",
26
+ "c8": "^10.1.2",
27
27
  "chai": "^5.1.1",
28
28
  "eslint": "^8.57.0",
29
29
  "eslint-config-standard": "^17.1.0",
30
30
  "eslint-plugin-import": "^2.29.1",
31
- "eslint-plugin-jsdoc": "^48.2.9",
31
+ "eslint-plugin-jsdoc": "^48.5.2",
32
32
  "eslint-plugin-regexp": "^2.6.0",
33
- "eslint-plugin-unicorn": "^53.0.0",
34
- "mocha": "^10.4.0",
33
+ "eslint-plugin-unicorn": "^54.0.0",
34
+ "mocha": "^10.6.0",
35
35
  "npm-run-all": "^4.1.5",
36
- "typescript": "^5.4.5",
37
- "undici": "^6.18.2"
36
+ "typescript": "^5.5.3",
37
+ "undici": "^6.19.2"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "npm run tsc && npm run lint && npm run test",
@@ -54,5 +54,5 @@
54
54
  "update-mail": "node index update --channel=mail -i",
55
55
  "update-release": "node index update --channel=release -i"
56
56
  },
57
- "version": "5.3.3"
57
+ "version": "5.3.5"
58
58
  }
@@ -918,7 +918,7 @@
918
918
  },
919
919
  {
920
920
  "name": "tab",
921
- "$ref": "tags.Tab",
921
+ "$ref": "tabs.Tab",
922
922
  "optional": true,
923
923
  "description": "Details of the $(ref:tabs.Tab) where the command was activated."
924
924
  }
@@ -8723,13 +8723,23 @@
8723
8723
  "matchAboutBlank": {
8724
8724
  "type": "boolean",
8725
8725
  "optional": true,
8726
- "description": "If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is <code>false</code>."
8726
+ "description": "If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Ignored if matchOriginAsFallback is specified. By default it is <code>false</code>."
8727
+ },
8728
+ "matchOriginAsFallback": {
8729
+ "type": "boolean",
8730
+ "optional": true,
8731
+ "description": "If matchOriginAsFallback is true, then the code is also injected in about:, data:, blob: when their origin matches the pattern in 'matches', even if the actual document origin is opaque (due to the use of CSP sandbox or iframe sandbox). Match patterns in 'matches' must specify a wildcard path glob. By default it is <code>false</code>."
8727
8732
  },
8728
8733
  "runAt": {
8729
8734
  "$ref": "extensionTypes.RunAt",
8730
8735
  "optional": true,
8731
8736
  "description": "The soonest that the JavaScript or CSS will be injected into the tab. Defaults to \"document_idle\"."
8732
8737
  },
8738
+ "world": {
8739
+ "$ref": "extensionTypes.ExecutionWorld",
8740
+ "optional": true,
8741
+ "description": "The JavaScript world for a script to execute within. Defaults to \"ISOLATED\"."
8742
+ },
8733
8743
  "cookieStoreId": {
8734
8744
  "choices": [
8735
8745
  {
@@ -10094,7 +10104,7 @@
10094
10104
  {
10095
10105
  "name": "updateEnabledRulesets",
10096
10106
  "type": "function",
10097
- "description": "Returns the ids for the current set of enabled static rulesets.",
10107
+ "description": "Modifies the static rulesets enabled/disabled state.",
10098
10108
  "async": "callback",
10099
10109
  "parameters": [
10100
10110
  {
@@ -10126,6 +10136,44 @@
10126
10136
  }
10127
10137
  ]
10128
10138
  },
10139
+ {
10140
+ "name": "updateStaticRules",
10141
+ "type": "function",
10142
+ "description": "Modified individual static rules enabled/disabled state. Changes to rules belonging to a disabled ruleset will take effect when the ruleset becomes enabled.",
10143
+ "async": "callback",
10144
+ "parameters": [
10145
+ {
10146
+ "name": "options",
10147
+ "type": "object",
10148
+ "properties": {
10149
+ "rulesetId": {
10150
+ "type": "string"
10151
+ },
10152
+ "disableRuleIds": {
10153
+ "type": "array",
10154
+ "items": {
10155
+ "type": "integer"
10156
+ },
10157
+ "optional": true,
10158
+ "default": []
10159
+ },
10160
+ "enableRuleIds": {
10161
+ "type": "array",
10162
+ "items": {
10163
+ "type": "integer"
10164
+ },
10165
+ "optional": true,
10166
+ "default": []
10167
+ }
10168
+ }
10169
+ },
10170
+ {
10171
+ "name": "callback",
10172
+ "type": "function",
10173
+ "parameters": []
10174
+ }
10175
+ ]
10176
+ },
10129
10177
  {
10130
10178
  "name": "getAvailableStaticRuleCount",
10131
10179
  "type": "function",
@@ -10144,6 +10192,36 @@
10144
10192
  }
10145
10193
  ]
10146
10194
  },
10195
+ {
10196
+ "name": "getDisabledRuleIds",
10197
+ "type": "function",
10198
+ "description": "Returns the list of individual disabled static rules from a given static ruleset id.",
10199
+ "async": "callback",
10200
+ "parameters": [
10201
+ {
10202
+ "name": "options",
10203
+ "type": "object",
10204
+ "properties": {
10205
+ "rulesetId": {
10206
+ "type": "string"
10207
+ }
10208
+ }
10209
+ },
10210
+ {
10211
+ "name": "callback",
10212
+ "type": "function",
10213
+ "parameters": [
10214
+ {
10215
+ "name": "disabledRuleIds",
10216
+ "type": "array",
10217
+ "items": {
10218
+ "type": "integer"
10219
+ }
10220
+ }
10221
+ ]
10222
+ }
10223
+ ]
10224
+ },
10147
10225
  {
10148
10226
  "name": "getDynamicRules",
10149
10227
  "type": "function",
@@ -10339,13 +10417,25 @@
10339
10417
  "type": "number",
10340
10418
  "description": "The maximum number of static Rulesets an extension can specify as part of the rule_resources manifest key."
10341
10419
  },
10420
+ "MAX_NUMBER_OF_DISABLED_STATIC_RULES": {
10421
+ "type": "number",
10422
+ "description": "The maximum number of static rules that can be disabled on each static ruleset."
10423
+ },
10342
10424
  "MAX_NUMBER_OF_ENABLED_STATIC_RULESETS": {
10343
10425
  "type": "number",
10344
10426
  "description": "The maximum number of static Rulesets an extension can enable at any one time."
10345
10427
  },
10346
10428
  "MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES": {
10347
10429
  "type": "number",
10348
- "description": "The maximum number of dynamic and session rules an extension can add. NOTE: in the Firefox we are enforcing this limit to the session and dynamic rules count separately, instead of enforcing it to the rules count for both combined as the Chrome implementation does."
10430
+ "description": "Deprecated property returning the maximum number of dynamic and session rules an extension can add, replaced by MAX_NUMBER_OF_DYNAMIC_RULES/MAX_NUMBER_OF_SESSION_RULES."
10431
+ },
10432
+ "MAX_NUMBER_OF_DYNAMIC_RULES": {
10433
+ "type": "number",
10434
+ "description": "The maximum number of dynamic session rules an extension can add."
10435
+ },
10436
+ "MAX_NUMBER_OF_SESSION_RULES": {
10437
+ "type": "number",
10438
+ "description": "The maximum number of dynamic session rules an extension can add."
10349
10439
  },
10350
10440
  "MAX_NUMBER_OF_REGEX_RULES": {
10351
10441
  "type": "number",
@@ -12075,6 +12165,15 @@
12075
12165
  ],
12076
12166
  "description": "The soonest that the JavaScript or CSS will be injected into the tab."
12077
12167
  },
12168
+ {
12169
+ "id": "ExecutionWorld",
12170
+ "type": "string",
12171
+ "enum": [
12172
+ "ISOLATED",
12173
+ "MAIN"
12174
+ ],
12175
+ "description": "The JavaScript world for a script to execute within. <code>ISOLATED</code> is the default execution environment of content scripts, <code>MAIN</code> is the web page's execution environment."
12176
+ },
12078
12177
  {
12079
12178
  "id": "CSSOrigin",
12080
12179
  "type": "string",
@@ -13616,6 +13715,16 @@
13616
13715
  "optional": true,
13617
13716
  "default": []
13618
13717
  },
13718
+ "optional_host_permissions": {
13719
+ "min_manifest_version": 3,
13720
+ "type": "array",
13721
+ "items": {
13722
+ "$ref": "MatchPattern",
13723
+ "onError": "warn"
13724
+ },
13725
+ "optional": true,
13726
+ "default": []
13727
+ },
13619
13728
  "optional_permissions": {
13620
13729
  "type": "array",
13621
13730
  "items": {
@@ -13979,7 +14088,14 @@
13979
14088
  "strict_max_version": {
13980
14089
  "type": "string",
13981
14090
  "optional": true
14091
+ },
14092
+ "admin_install_only": {
14093
+ "type": "boolean",
14094
+ "optional": true
13982
14095
  }
14096
+ },
14097
+ "additionalProperties": {
14098
+ "$ref": "UnrecognizedProperty"
13983
14099
  }
13984
14100
  },
13985
14101
  {
@@ -13996,7 +14112,7 @@
13996
14112
  }
13997
14113
  },
13998
14114
  "additionalProperties": {
13999
- "type": "any"
14115
+ "$ref": "UnrecognizedProperty"
14000
14116
  }
14001
14117
  },
14002
14118
  {
@@ -14137,13 +14253,24 @@
14137
14253
  "match_about_blank": {
14138
14254
  "type": "boolean",
14139
14255
  "optional": true,
14140
- "description": "If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is <code>false</code>."
14256
+ "description": "If match_about_blank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Ignored if match_origin_as_fallback is specified. By default it is <code>false</code>."
14257
+ },
14258
+ "match_origin_as_fallback": {
14259
+ "type": "boolean",
14260
+ "optional": true,
14261
+ "description": "If match_origin_as_fallback is true, then the code is also injected in about:, data:, blob: when their origin matches the pattern in 'matches', even if the actual document origin is opaque (due to the use of CSP sandbox or iframe sandbox). Match patterns in 'matches' must specify a wildcard path glob. By default it is <code>false</code>."
14141
14262
  },
14142
14263
  "run_at": {
14143
14264
  "$ref": "extensionTypes.RunAt",
14144
14265
  "optional": true,
14145
14266
  "default": "document_idle",
14146
14267
  "description": "The soonest that the JavaScript or CSS will be injected into the tab. Defaults to \"document_idle\"."
14268
+ },
14269
+ "world": {
14270
+ "$ref": "extensionTypes.ExecutionWorld",
14271
+ "optional": true,
14272
+ "default": "ISOLATED",
14273
+ "description": "The JavaScript world for a script to execute within. Defaults to \"ISOLATED\"."
14147
14274
  }
14148
14275
  }
14149
14276
  },
@@ -15392,7 +15519,7 @@
15392
15519
  "proxyDNS": {
15393
15520
  "type": "boolean",
15394
15521
  "optional": true,
15395
- "description": "Proxy DNS when using SOCKS v5."
15522
+ "description": "Proxy DNS when using SOCKS. DNS queries get leaked to the network when set to false. True by default for SOCKS v5. False by default for SOCKS v4."
15396
15523
  },
15397
15524
  "respectBeConservative": {
15398
15525
  "type": "boolean",
@@ -16895,9 +17022,10 @@
16895
17022
  "id": "ExecutionWorld",
16896
17023
  "type": "string",
16897
17024
  "enum": [
16898
- "ISOLATED"
17025
+ "ISOLATED",
17026
+ "MAIN"
16899
17027
  ],
16900
- "description": "The JavaScript world for a script to execute within. We currently only support the <code>'ISOLATED'</code> world."
17028
+ "description": "The JavaScript world for a script to execute within. <code>ISOLATED</code> is the default execution environment of content scripts, <code>MAIN</code> is the web page's execution environment."
16901
17029
  },
16902
17030
  {
16903
17031
  "id": "RegisteredContentScript",
@@ -16936,11 +17064,21 @@
16936
17064
  "type": "string"
16937
17065
  }
16938
17066
  },
17067
+ "matchOriginAsFallback": {
17068
+ "type": "boolean",
17069
+ "optional": true,
17070
+ "description": "If matchOriginAsFallback is true, then the code is also injected in about:, data:, blob: when their origin matches the pattern in 'matches', even if the actual document origin is opaque (due to the use of CSP sandbox or iframe sandbox). Match patterns in 'matches' must specify a wildcard path glob. By default it is <code>false</code>."
17071
+ },
16939
17072
  "runAt": {
16940
17073
  "$ref": "extensionTypes.RunAt",
16941
17074
  "optional": true,
16942
17075
  "description": "Specifies when JavaScript files are injected into the web page. The preferred and default value is <code>document_idle</code>."
16943
17076
  },
17077
+ "world": {
17078
+ "$ref": "ExecutionWorld",
17079
+ "optional": true,
17080
+ "description": "The JavaScript world for a script to execute within. Defaults to \"ISOLATED\"."
17081
+ },
16944
17082
  "persistAcrossSessions": {
16945
17083
  "type": "boolean",
16946
17084
  "optional": true,
@@ -21004,7 +21142,7 @@
21004
21142
  {
21005
21143
  "type": "function",
21006
21144
  "optional": true,
21007
- "name": "callback",
21145
+ "name": "asyncCallback",
21008
21146
  "parameters": [
21009
21147
  {
21010
21148
  "name": "response",
@@ -21023,6 +21161,7 @@
21023
21161
  "type": "array",
21024
21162
  "optional": true,
21025
21163
  "name": "extraInfoSpec",
21164
+ "postprocess": "mutuallyExclusiveBlockingOrAsyncBlocking",
21026
21165
  "description": "Array of extra information that should be passed to the listener function.",
21027
21166
  "items": {
21028
21167
  "$ref": "OnAuthRequiredOptions"
@@ -721,7 +721,8 @@
721
721
  "optional": true,
722
722
  "format": "url",
723
723
  "pattern": "^(https://|http://(localhost|127\\.0\\.0\\.1|\\[::1\\])(:\\d*)?(/|$)).*$",
724
- "preprocess": "localize"
724
+ "preprocess": "localize",
725
+ "deprecated": "Unsupported on Firefox at this time."
725
726
  },
726
727
  "alternate_urls": {
727
728
  "type": "array",
@@ -13884,30 +13885,6 @@
13884
13885
  }
13885
13886
  }
13886
13887
  },
13887
- {
13888
- "id": "WebExtensionSitePermissionsManifest",
13889
- "type": "object",
13890
- "description": "Represents a WebExtension site permissions manifest.json file",
13891
- "$import": "ManifestBase",
13892
- "properties": {
13893
- "site_permissions": {
13894
- "type": "array",
13895
- "minItems": 1,
13896
- "items": {
13897
- "$ref": "SitePermission"
13898
- }
13899
- },
13900
- "install_origins": {
13901
- "type": "array",
13902
- "minItems": 1,
13903
- "maxItems": 1,
13904
- "items": {
13905
- "type": "string",
13906
- "format": "origin"
13907
- }
13908
- }
13909
- }
13910
- },
13911
13888
  {
13912
13889
  "id": "ThemeIcons",
13913
13890
  "type": "object",
@@ -14020,18 +13997,6 @@
14020
13997
  }
14021
13998
  ]
14022
13999
  },
14023
- {
14024
- "id": "SitePermission",
14025
- "choices": [
14026
- {
14027
- "type": "string",
14028
- "enum": [
14029
- "midi",
14030
- "midi-sysex"
14031
- ]
14032
- }
14033
- ]
14034
- },
14035
14000
  {
14036
14001
  "id": "HttpURL",
14037
14002
  "type": "string",
@@ -14088,6 +14053,10 @@
14088
14053
  "strict_max_version": {
14089
14054
  "type": "string",
14090
14055
  "optional": true
14056
+ },
14057
+ "admin_install_only": {
14058
+ "type": "boolean",
14059
+ "optional": true
14091
14060
  }
14092
14061
  },
14093
14062
  "additionalProperties": {