webext-schema 5.1.11 → 5.1.13

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
@@ -13,8 +13,8 @@
13
13
  "main": "index.js",
14
14
  "types": "types/index.d.ts",
15
15
  "dependencies": {
16
- "@types/firefox-webext-browser": "^111.0.0",
17
- "@types/node": "^18.15.10",
16
+ "@types/firefox-webext-browser": "^111.0.1",
17
+ "@types/node": "^18.15.11",
18
18
  "@types/sinon": "^10.0.13",
19
19
  "camelize": "^1.0.1",
20
20
  "commander": "^10.0.0",
@@ -25,18 +25,18 @@
25
25
  "devDependencies": {
26
26
  "c8": "^7.13.0",
27
27
  "chai": "^4.3.7",
28
- "eslint": "^8.36.0",
28
+ "eslint": "^8.38.0",
29
29
  "eslint-config-standard": "^17.0.0",
30
30
  "eslint-plugin-import": "^2.27.5",
31
- "eslint-plugin-jsdoc": "^40.1.0",
31
+ "eslint-plugin-jsdoc": "^41.1.1",
32
32
  "eslint-plugin-node": "^11.1.0",
33
33
  "eslint-plugin-promise": "^6.1.1",
34
- "eslint-plugin-regexp": "^1.13.0",
34
+ "eslint-plugin-regexp": "^1.14.0",
35
35
  "eslint-plugin-unicorn": "^46.0.0",
36
36
  "mocha": "^10.2.0",
37
37
  "npm-run-all": "^4.1.5",
38
- "typescript": "^5.0.2",
39
- "undici": "^5.21.0"
38
+ "typescript": "^5.0.4",
39
+ "undici": "^5.21.2"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "npm run tsc && npm run lint && npm run test",
@@ -56,5 +56,5 @@
56
56
  "update-mail": "node index update --channel=mail -i",
57
57
  "update-release": "node index update --channel=release -i"
58
58
  },
59
- "version": "5.1.11"
59
+ "version": "5.1.13"
60
60
  }
@@ -9716,8 +9716,7 @@
9716
9716
  "type": "string",
9717
9717
  "enum": [
9718
9718
  "declarativeNetRequest"
9719
- ],
9720
- "min_manifest_version": 3
9719
+ ]
9721
9720
  }
9722
9721
  ]
9723
9722
  },
@@ -9728,8 +9727,7 @@
9728
9727
  "type": "string",
9729
9728
  "enum": [
9730
9729
  "declarativeNetRequestFeedback"
9731
- ],
9732
- "min_manifest_version": 3
9730
+ ]
9733
9731
  }
9734
9732
  ]
9735
9733
  },
@@ -9740,8 +9738,7 @@
9740
9738
  "type": "string",
9741
9739
  "enum": [
9742
9740
  "declarativeNetRequestWithHostAccess"
9743
- ],
9744
- "min_manifest_version": 3
9741
+ ]
9745
9742
  }
9746
9743
  ]
9747
9744
  },
@@ -9750,7 +9747,6 @@
9750
9747
  "properties": {
9751
9748
  "declarative_net_request": {
9752
9749
  "type": "object",
9753
- "min_manifest_version": 3,
9754
9750
  "optional": true,
9755
9751
  "additionalProperties": {
9756
9752
  "$ref": "UnrecognizedProperty"
@@ -13518,7 +13514,7 @@
13518
13514
  "postprocess": "manifestVersionCheck"
13519
13515
  },
13520
13516
  "applications": {
13521
- "$ref": "BrowserSpecificSettings",
13517
+ "$ref": "DeprecatedApplications",
13522
13518
  "description": "The applications property is deprecated, please use 'browser_specific_settings'",
13523
13519
  "optional": true,
13524
13520
  "max_manifest_version": 2
@@ -14140,6 +14136,41 @@
14140
14136
  }
14141
14137
  }
14142
14138
  },
14139
+ {
14140
+ "id": "GeckoAndroidSpecificProperties",
14141
+ "type": "object",
14142
+ "properties": {
14143
+ "strict_min_version": {
14144
+ "type": "string",
14145
+ "optional": true
14146
+ },
14147
+ "strict_max_version": {
14148
+ "type": "string",
14149
+ "optional": true
14150
+ }
14151
+ },
14152
+ "additionalProperties": {
14153
+ "type": "any"
14154
+ }
14155
+ },
14156
+ {
14157
+ "id": "DeprecatedApplications",
14158
+ "type": "object",
14159
+ "properties": {
14160
+ "gecko": {
14161
+ "$ref": "FirefoxSpecificProperties",
14162
+ "optional": true
14163
+ },
14164
+ "gecko_android": {
14165
+ "$ref": "GeckoAndroidSpecificProperties",
14166
+ "optional": true,
14167
+ "unsupported": true
14168
+ }
14169
+ },
14170
+ "additionalProperties": {
14171
+ "type": "any"
14172
+ }
14173
+ },
14143
14174
  {
14144
14175
  "id": "BrowserSpecificSettings",
14145
14176
  "type": "object",
@@ -14147,6 +14178,10 @@
14147
14178
  "gecko": {
14148
14179
  "$ref": "FirefoxSpecificProperties",
14149
14180
  "optional": true
14181
+ },
14182
+ "gecko_android": {
14183
+ "$ref": "GeckoAndroidSpecificProperties",
14184
+ "optional": true
14150
14185
  }
14151
14186
  },
14152
14187
  "additionalProperties": {
@@ -9716,8 +9716,7 @@
9716
9716
  "type": "string",
9717
9717
  "enum": [
9718
9718
  "declarativeNetRequest"
9719
- ],
9720
- "min_manifest_version": 3
9719
+ ]
9721
9720
  }
9722
9721
  ]
9723
9722
  },
@@ -9728,8 +9727,7 @@
9728
9727
  "type": "string",
9729
9728
  "enum": [
9730
9729
  "declarativeNetRequestFeedback"
9731
- ],
9732
- "min_manifest_version": 3
9730
+ ]
9733
9731
  }
9734
9732
  ]
9735
9733
  },
@@ -9740,8 +9738,7 @@
9740
9738
  "type": "string",
9741
9739
  "enum": [
9742
9740
  "declarativeNetRequestWithHostAccess"
9743
- ],
9744
- "min_manifest_version": 3
9741
+ ]
9745
9742
  }
9746
9743
  ]
9747
9744
  },
@@ -9750,7 +9747,6 @@
9750
9747
  "properties": {
9751
9748
  "declarative_net_request": {
9752
9749
  "type": "object",
9753
- "min_manifest_version": 3,
9754
9750
  "optional": true,
9755
9751
  "additionalProperties": {
9756
9752
  "$ref": "UnrecognizedProperty"
@@ -13518,7 +13514,7 @@
13518
13514
  "postprocess": "manifestVersionCheck"
13519
13515
  },
13520
13516
  "applications": {
13521
- "$ref": "BrowserSpecificSettings",
13517
+ "$ref": "DeprecatedApplications",
13522
13518
  "description": "The applications property is deprecated, please use 'browser_specific_settings'",
13523
13519
  "optional": true,
13524
13520
  "max_manifest_version": 2
@@ -14140,6 +14136,41 @@
14140
14136
  }
14141
14137
  }
14142
14138
  },
14139
+ {
14140
+ "id": "GeckoAndroidSpecificProperties",
14141
+ "type": "object",
14142
+ "properties": {
14143
+ "strict_min_version": {
14144
+ "type": "string",
14145
+ "optional": true
14146
+ },
14147
+ "strict_max_version": {
14148
+ "type": "string",
14149
+ "optional": true
14150
+ }
14151
+ },
14152
+ "additionalProperties": {
14153
+ "type": "any"
14154
+ }
14155
+ },
14156
+ {
14157
+ "id": "DeprecatedApplications",
14158
+ "type": "object",
14159
+ "properties": {
14160
+ "gecko": {
14161
+ "$ref": "FirefoxSpecificProperties",
14162
+ "optional": true
14163
+ },
14164
+ "gecko_android": {
14165
+ "$ref": "GeckoAndroidSpecificProperties",
14166
+ "optional": true,
14167
+ "unsupported": true
14168
+ }
14169
+ },
14170
+ "additionalProperties": {
14171
+ "type": "any"
14172
+ }
14173
+ },
14143
14174
  {
14144
14175
  "id": "BrowserSpecificSettings",
14145
14176
  "type": "object",
@@ -14147,6 +14178,10 @@
14147
14178
  "gecko": {
14148
14179
  "$ref": "FirefoxSpecificProperties",
14149
14180
  "optional": true
14181
+ },
14182
+ "gecko_android": {
14183
+ "$ref": "GeckoAndroidSpecificProperties",
14184
+ "optional": true
14150
14185
  }
14151
14186
  },
14152
14187
  "additionalProperties": {
@@ -4764,9 +4764,34 @@
4764
4764
  {
4765
4765
  "name": "openPopup",
4766
4766
  "type": "function",
4767
- "description": "Opens the action's popup window in the active window.",
4768
- "async": true,
4769
- "parameters": []
4767
+ "description": "Opens the action's popup window in the specified window. Defaults to the current window. Returns false if the popup could not be opened because the action is disabled or has been removed from the toolbar.",
4768
+ "async": "callback",
4769
+ "parameters": [
4770
+ {
4771
+ "name": "options",
4772
+ "optional": true,
4773
+ "type": "object",
4774
+ "description": "An object with information about the popup to open.",
4775
+ "properties": {
4776
+ "windowId": {
4777
+ "type": "integer",
4778
+ "minimum": -2,
4779
+ "optional": true,
4780
+ "description": "Defaults to the current window."
4781
+ }
4782
+ }
4783
+ },
4784
+ {
4785
+ "type": "function",
4786
+ "name": "callback",
4787
+ "optional": true,
4788
+ "parameters": [
4789
+ {
4790
+ "type": "boolean"
4791
+ }
4792
+ ]
4793
+ }
4794
+ ]
4770
4795
  }
4771
4796
  ],
4772
4797
  "events": [
@@ -6178,7 +6203,7 @@
6178
6203
  "name": "setComposeDetails",
6179
6204
  "type": "function",
6180
6205
  "async": true,
6181
- "description": "Updates the compose window. Only fields that are to be changed should be specified. Currently only a limited amount of information can be set, more will be added in later versions.\n\n**Note:** The compose format of an existing compose window cannot be changed. Since Thunderbird 98, setting conflicting values for ``details.body``, ``details.plainTextBody`` or ``details.isPlaintext`` no longer throw an exception, instead the compose window chooses the matching ``details.body`` or ``details.plainTextBody`` value and ignores the other.",
6206
+ "description": "Updates the compose window. The properties of the given :ref:`compose.ComposeDetails` object will be used to overwrite the current values of the specified compose window, so only properties that are to be changed should be included.\n\nWhen updating any of the array properties (``customHeaders`` and most address fields), make sure to first get the current values to not accidentally remove all existing entries when setting the new value.\n\n**Note:** The compose format of an existing compose window cannot be changed. Since Thunderbird 98, setting conflicting values for ``details.body``, ``details.plainTextBody`` or ``details.isPlaintext`` no longer throws an exception, instead the compose window chooses the matching ``details.body`` or ``details.plainTextBody`` value and ignores the other.",
6182
6207
  "permissions": [
6183
6208
  "compose"
6184
6209
  ],
@@ -7206,10 +7231,34 @@
7206
7231
  {
7207
7232
  "name": "openPopup",
7208
7233
  "type": "function",
7209
- "requireUserInput": true,
7210
- "description": "Opens the action's popup window in the active window.",
7211
- "async": true,
7212
- "parameters": []
7234
+ "description": "Opens the action's popup window in the specified window. Defaults to the current window. Returns false if the popup could not be opened because the action is disabled or has been removed from the toolbar.",
7235
+ "async": "callback",
7236
+ "parameters": [
7237
+ {
7238
+ "name": "options",
7239
+ "optional": true,
7240
+ "type": "object",
7241
+ "description": "An object with information about the popup to open.",
7242
+ "properties": {
7243
+ "windowId": {
7244
+ "type": "integer",
7245
+ "minimum": -2,
7246
+ "optional": true,
7247
+ "description": "Defaults to the current window."
7248
+ }
7249
+ }
7250
+ },
7251
+ {
7252
+ "type": "function",
7253
+ "name": "callback",
7254
+ "optional": true,
7255
+ "parameters": [
7256
+ {
7257
+ "type": "boolean"
7258
+ }
7259
+ ]
7260
+ }
7261
+ ]
7213
7262
  }
7214
7263
  ],
7215
7264
  "events": [
@@ -10172,10 +10221,34 @@
10172
10221
  {
10173
10222
  "name": "openPopup",
10174
10223
  "type": "function",
10175
- "requireUserInput": true,
10176
- "description": "Opens the action's popup window in the active window.",
10177
- "async": true,
10178
- "parameters": []
10224
+ "description": "Opens the action's popup window in the specified window. Defaults to the current window. Returns false if the popup could not be opened because the action is disabled or has been removed from the toolbar.",
10225
+ "async": "callback",
10226
+ "parameters": [
10227
+ {
10228
+ "name": "options",
10229
+ "optional": true,
10230
+ "type": "object",
10231
+ "description": "An object with information about the popup to open.",
10232
+ "properties": {
10233
+ "windowId": {
10234
+ "type": "integer",
10235
+ "minimum": -2,
10236
+ "optional": true,
10237
+ "description": "Defaults to the current window."
10238
+ }
10239
+ }
10240
+ },
10241
+ {
10242
+ "type": "function",
10243
+ "name": "callback",
10244
+ "optional": true,
10245
+ "parameters": [
10246
+ {
10247
+ "type": "boolean"
10248
+ }
10249
+ ]
10250
+ }
10251
+ ]
10179
10252
  }
10180
10253
  ],
10181
10254
  "events": [
@@ -9721,13 +9721,24 @@
9721
9721
  }
9722
9722
  ]
9723
9723
  },
9724
+ {
9725
+ "$extend": "OptionalPermission",
9726
+ "choices": [
9727
+ {
9728
+ "type": "string",
9729
+ "enum": [
9730
+ "declarativeNetRequestFeedback"
9731
+ ],
9732
+ "min_manifest_version": 3
9733
+ }
9734
+ ]
9735
+ },
9724
9736
  {
9725
9737
  "$extend": "PermissionNoPrompt",
9726
9738
  "choices": [
9727
9739
  {
9728
9740
  "type": "string",
9729
9741
  "enum": [
9730
- "declarativeNetRequestFeedback",
9731
9742
  "declarativeNetRequestWithHostAccess"
9732
9743
  ],
9733
9744
  "min_manifest_version": 3
@@ -9811,6 +9822,15 @@
9811
9822
  "other"
9812
9823
  ]
9813
9824
  },
9825
+ {
9826
+ "id": "UnsupportedRegexReason",
9827
+ "type": "string",
9828
+ "description": "Describes the reason why a given regular expression isn't supported.",
9829
+ "enum": [
9830
+ "syntaxError",
9831
+ "memoryLimitExceeded"
9832
+ ]
9833
+ },
9814
9834
  {
9815
9835
  "id": "MatchedRule",
9816
9836
  "type": "object",
@@ -10093,7 +10113,7 @@
10093
10113
  "regexSubstitution": {
10094
10114
  "type": "string",
10095
10115
  "optional": true,
10096
- "description": "TODO with regexFilter + Substitution pattern for rules which specify a 'regexFilter'."
10116
+ "description": "Substitution pattern for rules which specify a 'regexFilter'. The first match of regexFilter within the url will be replaced with this pattern. Within regexSubstitution, backslash-escaped digits (\\1 to \\9) can be used to insert the corresponding capture groups. \\0 refers to the entire matching text."
10097
10117
  }
10098
10118
  }
10099
10119
  },
@@ -10349,6 +10369,57 @@
10349
10369
  }
10350
10370
  ]
10351
10371
  },
10372
+ {
10373
+ "name": "isRegexSupported",
10374
+ "type": "function",
10375
+ "description": "Checks if the given regular expression will be supported as a 'regexFilter' rule condition.",
10376
+ "async": "callback",
10377
+ "parameters": [
10378
+ {
10379
+ "name": "regexOptions",
10380
+ "type": "object",
10381
+ "properties": {
10382
+ "regex": {
10383
+ "type": "string",
10384
+ "description": "The regular expresson to check."
10385
+ },
10386
+ "isCaseSensitive": {
10387
+ "type": "boolean",
10388
+ "optional": true,
10389
+ "description": "Whether the 'regex' specified is case sensitive.",
10390
+ "default": false
10391
+ },
10392
+ "requireCapturing": {
10393
+ "type": "boolean",
10394
+ "optional": true,
10395
+ "description": "Whether the 'regex' specified requires capturing. Capturing is only required for redirect rules which specify a 'regexSubstition' action.",
10396
+ "default": false
10397
+ }
10398
+ }
10399
+ },
10400
+ {
10401
+ "name": "callback",
10402
+ "type": "function",
10403
+ "parameters": [
10404
+ {
10405
+ "name": "result",
10406
+ "type": "object",
10407
+ "properties": {
10408
+ "isSupported": {
10409
+ "type": "boolean",
10410
+ "description": "Whether the given regex is supported"
10411
+ },
10412
+ "reason": {
10413
+ "$ref": "UnsupportedRegexReason",
10414
+ "optional": true,
10415
+ "description": "Specifies the reason why the regular expression is not supported. Only provided if 'isSupported' is false."
10416
+ }
10417
+ }
10418
+ }
10419
+ ]
10420
+ }
10421
+ ]
10422
+ },
10352
10423
  {
10353
10424
  "name": "testMatchOutcome",
10354
10425
  "type": "function",
@@ -10447,6 +10518,10 @@
10447
10518
  "type": "number",
10448
10519
  "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."
10449
10520
  },
10521
+ "MAX_NUMBER_OF_REGEX_RULES": {
10522
+ "type": "number",
10523
+ "description": "The maximum number of regular expression rules that an extension can add. This limit is evaluated separately for the set of session rules, dynamic rules and those specified in the rule_resources file."
10524
+ },
10450
10525
  "SESSION_RULESET_ID": {
10451
10526
  "type": "string",
10452
10527
  "value": "_session",
@@ -12415,7 +12490,7 @@
12415
12490
  "mainthreadio",
12416
12491
  "fileio",
12417
12492
  "fileioall",
12418
- "noiostacks",
12493
+ "nomarkerstacks",
12419
12494
  "screenshots",
12420
12495
  "seqstyle",
12421
12496
  "stackwalk",
@@ -13572,6 +13647,14 @@
13572
13647
  "$ref": "ExtensionURL"
13573
13648
  }
13574
13649
  },
13650
+ "type": {
13651
+ "optional": true,
13652
+ "type": "string",
13653
+ "enum": [
13654
+ "module",
13655
+ "classic"
13656
+ ]
13657
+ },
13575
13658
  "persistent": {
13576
13659
  "optional": true,
13577
13660
  "type": "boolean",
@@ -20148,6 +20231,26 @@
20148
20231
  },
20149
20232
  "description": "list of reasons that cause the request to be considered weak, if state is \"weak\"",
20150
20233
  "optional": true
20234
+ },
20235
+ "usedEch": {
20236
+ "type": "boolean",
20237
+ "description": "True if the TLS connection used Encrypted Client Hello.",
20238
+ "optional": true
20239
+ },
20240
+ "usedDelegatedCredentials": {
20241
+ "type": "boolean",
20242
+ "description": "True if the TLS connection used Delegated Credentials.",
20243
+ "optional": true
20244
+ },
20245
+ "usedOcsp": {
20246
+ "type": "boolean",
20247
+ "description": "True if the TLS connection made OCSP requests.",
20248
+ "optional": true
20249
+ },
20250
+ "usedPrivateDns": {
20251
+ "type": "boolean",
20252
+ "description": "True if the TLS connection used a privacy-preserving DNS transport like DNS-over-HTTPS.",
20253
+ "optional": true
20151
20254
  }
20152
20255
  }
20153
20256
  },