webext-schema 5.1.0 → 5.1.1

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
@@ -2,31 +2,15 @@
2
2
  "name": "webext-schema",
3
3
  "description": "WebExtensions schemas fetched from hg.mozilla.org",
4
4
  "author": "asamuzaK",
5
+ "license": "MPL-2.0",
5
6
  "homepage": "https://github.com/asamuzaK/webext-schema",
6
7
  "bugs": "https://github.com/asamuzaK/webext-schema/issues",
7
8
  "repository": {
8
9
  "type": "git",
9
10
  "url": "https://github.com/asamuzaK/webext-schema.git"
10
11
  },
11
- "license": "MPL-2.0",
12
- "main": "index.js",
13
12
  "type": "module",
14
- "scripts": {
15
- "lint": "eslint --fix .",
16
- "start": "node index",
17
- "test": "npm run test-central",
18
- "test-beta": "c8 mocha --require=test/mocha/setup.js --channel=beta --exit test/*.test.js",
19
- "test-central": "c8 mocha --require=test/mocha/setup.js --channel=central --exit test/*.test.js",
20
- "test-esr": "c8 mocha --require=test/mocha/setup.js --channel=esr --exit test/*.test.js",
21
- "test-release": "c8 mocha --require=test/mocha/setup.js --channel=release --exit test/*.test.js",
22
- "test_all": "npm-run-all -s test-*",
23
- "update": "node index update -i",
24
- "update-beta": "node index update --channel=beta -i",
25
- "update-central": "node index update --channel=central -i",
26
- "update-esr": "node index update --channel=esr -i",
27
- "update-mail": "node index update --channel=mail -i",
28
- "update-release": "node index update --channel=release -i"
29
- },
13
+ "main": "index.js",
30
14
  "dependencies": {
31
15
  "camelize": "^1.0.1",
32
16
  "commander": "^10.0.0",
@@ -37,16 +21,32 @@
37
21
  "devDependencies": {
38
22
  "c8": "^7.12.0",
39
23
  "chai": "^4.3.7",
40
- "eslint": "^8.32.0",
24
+ "eslint": "^8.34.0",
41
25
  "eslint-config-standard": "^17.0.0",
42
- "eslint-plugin-import": "^2.27.4",
43
- "eslint-plugin-jsdoc": "^39.6.4",
26
+ "eslint-plugin-import": "^2.27.5",
27
+ "eslint-plugin-jsdoc": "^40.0.0",
44
28
  "eslint-plugin-node": "^11.1.0",
45
29
  "eslint-plugin-promise": "^6.1.1",
46
30
  "eslint-plugin-unicorn": "^45.0.2",
47
31
  "mocha": "^10.2.0",
48
32
  "npm-run-all": "^4.1.5",
49
- "undici": "^5.15.0"
33
+ "undici": "^5.18.0"
34
+ },
35
+ "scripts": {
36
+ "lint": "eslint --fix .",
37
+ "start": "node index",
38
+ "test": "npm run test-central",
39
+ "test-beta": "c8 mocha --require=test/mocha/setup.js --channel=beta --exit test/*.test.js",
40
+ "test-central": "c8 mocha --require=test/mocha/setup.js --channel=central --exit test/*.test.js",
41
+ "test-esr": "c8 mocha --require=test/mocha/setup.js --channel=esr --exit test/*.test.js",
42
+ "test-release": "c8 mocha --require=test/mocha/setup.js --channel=release --exit test/*.test.js",
43
+ "test_all": "npm-run-all -s test-*",
44
+ "update": "node index update -i",
45
+ "update-beta": "node index update --channel=beta -i",
46
+ "update-central": "node index update --channel=central -i",
47
+ "update-esr": "node index update --channel=esr -i",
48
+ "update-mail": "node index update --channel=mail -i",
49
+ "update-release": "node index update --channel=release -i"
50
50
  },
51
- "version": "5.1.0"
51
+ "version": "5.1.1"
52
52
  }
@@ -3582,6 +3582,16 @@
3582
3582
  "format": "url"
3583
3583
  }
3584
3584
  }
3585
+ },
3586
+ {
3587
+ "id": "Disposition",
3588
+ "type": "string",
3589
+ "description": "Location where search results should be displayed.",
3590
+ "enum": [
3591
+ "CURRENT_TAB",
3592
+ "NEW_TAB",
3593
+ "NEW_WINDOW"
3594
+ ]
3585
3595
  }
3586
3596
  ],
3587
3597
  "functions": [
@@ -3611,14 +3621,53 @@
3611
3621
  "optional": true,
3612
3622
  "description": "Search engine to use. Uses the default if not specified."
3613
3623
  },
3624
+ "disposition": {
3625
+ "$ref": "Disposition",
3626
+ "optional": true,
3627
+ "description": "Location where search results should be displayed. NEW_TAB is the default."
3628
+ },
3614
3629
  "tabId": {
3615
3630
  "type": "integer",
3616
3631
  "optional": true,
3617
- "description": "The ID of the tab for the search results. If not specified, a new tab is created."
3632
+ "description": "The ID of the tab for the search results. If not specified, a new tab is created, unless disposition is set. tabId cannot be used with disposition."
3618
3633
  }
3619
3634
  }
3620
3635
  }
3621
3636
  ]
3637
+ },
3638
+ {
3639
+ "name": "query",
3640
+ "type": "function",
3641
+ "async": "callback",
3642
+ "description": "Use the chrome.search API to search via the default provider.",
3643
+ "parameters": [
3644
+ {
3645
+ "type": "object",
3646
+ "name": "queryInfo",
3647
+ "properties": {
3648
+ "text": {
3649
+ "type": "string",
3650
+ "description": "String to query with the default search provider."
3651
+ },
3652
+ "disposition": {
3653
+ "$ref": "Disposition",
3654
+ "optional": true,
3655
+ "description": "Location where search results should be displayed. CURRENT_TAB is the default."
3656
+ },
3657
+ "tabId": {
3658
+ "type": "integer",
3659
+ "optional": true,
3660
+ "description": "Location where search results should be displayed. tabId cannot be used with disposition."
3661
+ }
3662
+ }
3663
+ },
3664
+ {
3665
+ "type": "function",
3666
+ "name": "callback",
3667
+ "optional": true,
3668
+ "parameters": []
3669
+ }
3670
+ ]
3622
3671
  }
3623
3672
  ]
3624
3673
  }
@@ -9903,7 +9952,7 @@
9903
9952
  "isUrlFilterCaseSensitive": {
9904
9953
  "type": "boolean",
9905
9954
  "optional": true,
9906
- "description": "Whether 'urlFilter' or 'regexFilter' is case-sensitive. Defaults to true."
9955
+ "description": "Whether 'urlFilter' or 'regexFilter' is case-sensitive."
9907
9956
  },
9908
9957
  "initiatorDomains": {
9909
9958
  "type": "array",
@@ -10375,7 +10424,25 @@
10375
10424
  }
10376
10425
  ]
10377
10426
  }
10378
- ]
10427
+ ],
10428
+ "properties": {
10429
+ "GUARANTEED_MINIMUM_STATIC_RULES": {
10430
+ "type": "number",
10431
+ "description": "The minimum number of static rules guaranteed to an extension across its enabled static rulesets. Any rules above this limit will count towards the global static rule limit."
10432
+ },
10433
+ "MAX_NUMBER_OF_STATIC_RULESETS": {
10434
+ "type": "number",
10435
+ "description": "The maximum number of static Rulesets an extension can specify as part of the rule_resources manifest key."
10436
+ },
10437
+ "MAX_NUMBER_OF_ENABLED_STATIC_RULESETS": {
10438
+ "type": "number",
10439
+ "description": "The maximum number of static Rulesets an extension can enable at any one time."
10440
+ },
10441
+ "MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES": {
10442
+ "type": "number",
10443
+ "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."
10444
+ }
10445
+ }
10379
10446
  }
10380
10447
  ],
10381
10448
  "dns.json": [
@@ -12344,7 +12411,6 @@
12344
12411
  "stackwalk",
12345
12412
  "jsallocations",
12346
12413
  "nostacksampling",
12347
- "preferencereads",
12348
12414
  "nativeallocations",
12349
12415
  "ipcmessages",
12350
12416
  "audiocallbacktracing",
@@ -13695,12 +13761,6 @@
13695
13761
  "description": "Represents a WebExtension language pack manifest.json file",
13696
13762
  "$import": "ManifestBase",
13697
13763
  "properties": {
13698
- "homepage_url": {
13699
- "type": "string",
13700
- "format": "url",
13701
- "optional": true,
13702
- "preprocess": "localize"
13703
- },
13704
13764
  "langpack_id": {
13705
13765
  "type": "string",
13706
13766
  "pattern": "^[a-zA-Z][a-zA-Z-]+$"
@@ -13768,12 +13828,6 @@
13768
13828
  "description": "Represents a WebExtension dictionary manifest.json file",
13769
13829
  "$import": "ManifestBase",
13770
13830
  "properties": {
13771
- "homepage_url": {
13772
- "type": "string",
13773
- "format": "url",
13774
- "optional": true,
13775
- "preprocess": "localize"
13776
- },
13777
13831
  "dictionaries": {
13778
13832
  "type": "object",
13779
13833
  "patternProperties": {
@@ -8564,24 +8564,25 @@
8564
8564
  "type": "string",
8565
8565
  "enum": [
8566
8566
  "all",
8567
- "page",
8568
- "frame",
8569
- "selection",
8570
- "link",
8571
- "editable",
8572
- "password",
8573
- "image",
8574
- "video",
8567
+ "all_message_attachments",
8575
8568
  "audio",
8576
8569
  "compose_action",
8577
- "message_display_action",
8578
- "tab",
8579
- "message_list",
8580
- "folder_pane",
8581
8570
  "compose_attachments",
8571
+ "compose_body",
8572
+ "editable",
8573
+ "folder_pane",
8574
+ "frame",
8575
+ "image",
8576
+ "link",
8582
8577
  "message_attachments",
8583
- "all_message_attachments",
8584
- "tools_menu"
8578
+ "message_display_action",
8579
+ "message_list",
8580
+ "page",
8581
+ "password",
8582
+ "selection",
8583
+ "tab",
8584
+ "tools_menu",
8585
+ "video"
8585
8586
  ]
8586
8587
  },
8587
8588
  {
@@ -11536,7 +11537,7 @@
11536
11537
  {
11537
11538
  "name": "create",
11538
11539
  "type": "function",
11539
- "description": "Creates a new content tab. Use the :ref:`messageDisplay_api` to open messages. Only supported in <value>normal</value> windows.",
11540
+ "description": "Creates a new content tab. Use the :ref:`messageDisplay_api` to open messages. Only supported in <value>normal</value> windows. Same-site links in the loaded page are opened within Thunderbird, all other links are opened in the user's default browser. To override this behavior, add-ons have to register a `content script <https://bugzilla.mozilla.org/show_bug.cgi?id=1618828#c3>`__ , capture click events and handle them manually.",
11540
11541
  "async": "callback",
11541
11542
  "parameters": [
11542
11543
  {
@@ -12420,7 +12421,7 @@
12420
12421
  {
12421
12422
  "name": "create",
12422
12423
  "type": "function",
12423
- "description": "Creates (opens) a new window with any optional sizing, position or default URL provided.",
12424
+ "description": "Creates (opens) a new window with any optional sizing, position or default URL provided. When loading a page into a popup window, same-site links are opened within the same window, all other links are opened in the user's default browser. To override this behavior, add-ons have to register a `content script <https://bugzilla.mozilla.org/show_bug.cgi?id=1618828#c3>`__ , capture click events and handle them manually. Same-site links with targets other than <value>_self</value> are opened in a new tab in the most recent ``normal`` Thunderbird window.",
12424
12425
  "async": "callback",
12425
12426
  "parameters": [
12426
12427
  {
@@ -2507,6 +2507,7 @@
2507
2507
  },
2508
2508
  "bookmarkId": {
2509
2509
  "type": "string",
2510
+ "optional": true,
2510
2511
  "description": "The id of the bookmark where the context menu was clicked, if it was on a bookmark."
2511
2512
  },
2512
2513
  "modifiers": {
@@ -10106,6 +10107,42 @@
10106
10107
  }
10107
10108
  ],
10108
10109
  "functions": [
10110
+ {
10111
+ "name": "updateDynamicRules",
10112
+ "type": "function",
10113
+ "description": "Modifies the current set of dynamic rules for the extension. The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added. These rules are persisted across browser sessions and extension updates.",
10114
+ "async": "callback",
10115
+ "parameters": [
10116
+ {
10117
+ "name": "options",
10118
+ "type": "object",
10119
+ "properties": {
10120
+ "removeRuleIds": {
10121
+ "type": "array",
10122
+ "optional": true,
10123
+ "description": "IDs of the rules to remove. Any invalid IDs will be ignored.",
10124
+ "items": {
10125
+ "type": "integer"
10126
+ }
10127
+ },
10128
+ "addRules": {
10129
+ "type": "array",
10130
+ "optional": true,
10131
+ "description": "Rules to add.",
10132
+ "items": {
10133
+ "$ref": "Rule"
10134
+ }
10135
+ }
10136
+ }
10137
+ },
10138
+ {
10139
+ "name": "callback",
10140
+ "type": "function",
10141
+ "description": "Called when the dynamic rules have been updated",
10142
+ "parameters": []
10143
+ }
10144
+ ]
10145
+ },
10109
10146
  {
10110
10147
  "name": "updateSessionRules",
10111
10148
  "type": "function",
@@ -10216,6 +10253,27 @@
10216
10253
  }
10217
10254
  ]
10218
10255
  },
10256
+ {
10257
+ "name": "getDynamicRules",
10258
+ "type": "function",
10259
+ "description": "Returns the current set of dynamic rules for the extension.",
10260
+ "async": "callback",
10261
+ "parameters": [
10262
+ {
10263
+ "name": "callback",
10264
+ "type": "function",
10265
+ "parameters": [
10266
+ {
10267
+ "name": "dynamicRules",
10268
+ "type": "array",
10269
+ "items": {
10270
+ "$ref": "Rule"
10271
+ }
10272
+ }
10273
+ ]
10274
+ }
10275
+ ]
10276
+ },
10219
10277
  {
10220
10278
  "name": "getSessionRules",
10221
10279
  "type": "function",
@@ -10227,6 +10285,7 @@
10227
10285
  "type": "function",
10228
10286
  "parameters": [
10229
10287
  {
10288
+ "name": "sessionRules",
10230
10289
  "type": "array",
10231
10290
  "items": {
10232
10291
  "$ref": "Rule"
@@ -13596,7 +13655,6 @@
13596
13655
  "extension_ids": {
13597
13656
  "optional": true,
13598
13657
  "type": "array",
13599
- "minItems": 1,
13600
13658
  "items": {
13601
13659
  "choices": [
13602
13660
  {
@@ -17457,7 +17515,7 @@
17457
17515
  {
17458
17516
  "name": "submitPing",
17459
17517
  "type": "function",
17460
- "description": "Submits a custom ping to the Telemetry back-end. See <code>submitExternalPing</code> inside TelemetryController.jsm for more details.",
17518
+ "description": "Submits a custom ping to the Telemetry back-end. See <code>submitExternalPing</code> inside TelemetryController.sys.mjs for more details.",
17461
17519
  "async": true,
17462
17520
  "parameters": [
17463
17521
  {
@@ -19614,6 +19672,7 @@
19614
19672
  "enum": [
19615
19673
  "webRequest",
19616
19674
  "webRequestBlocking",
19675
+ "webRequestFilterResponse",
19617
19676
  "webRequestFilterResponse.serviceWorkerScript"
19618
19677
  ]
19619
19678
  }