webext-schema 2.0.1 → 2.0.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/README.md +2 -0
- package/modules/update.js +10 -4
- package/package.json +7 -7
- package/schemas/beta/webext.json +210 -49
- package/schemas/central/webext.json +206 -49
- package/schemas/mail/mailext.json +428 -61
- package/schemas/release/webext.json +10 -1
package/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
[](https://github.com/asamuzaK/webext-schema/actions?query=workflow%3Abuild)
|
|
2
2
|
[](https://github.com/asamuzaK/webext-schema/actions?query=workflow%3ACodeQL)
|
|
3
|
+
<!--
|
|
3
4
|
[](https://david-dm.org/asamuzaK/webext-schema)
|
|
4
5
|
[](https://david-dm.org/asamuzaK/webext-schema?type=dev)
|
|
6
|
+
-->
|
|
5
7
|
[](https://badge.fury.io/js/webext-schema)
|
|
6
8
|
|
|
7
9
|
# webext-schema
|
package/modules/update.js
CHANGED
|
@@ -7,7 +7,7 @@ import { CHAR, INDENT } from './constant.js';
|
|
|
7
7
|
import { URL } from 'url';
|
|
8
8
|
import JSON5 from 'json5';
|
|
9
9
|
import { createFile } from './file-util.js';
|
|
10
|
-
import { getType, isString
|
|
10
|
+
import { getType, isString } from './common.js';
|
|
11
11
|
import commander from 'commander';
|
|
12
12
|
import fetch from 'node-fetch';
|
|
13
13
|
import path from 'path';
|
|
@@ -248,9 +248,9 @@ export const saveSchemaFile = async (channel, info) => {
|
|
|
248
248
|
* update schemas files
|
|
249
249
|
*
|
|
250
250
|
* @param {object} cmdOpts - command options
|
|
251
|
-
* @returns {
|
|
251
|
+
* @returns {void}
|
|
252
252
|
*/
|
|
253
|
-
export const updateSchemas = (cmdOpts = {}) => {
|
|
253
|
+
export const updateSchemas = async (cmdOpts = {}) => {
|
|
254
254
|
const { channel, info } = cmdOpts;
|
|
255
255
|
const func = [];
|
|
256
256
|
if (channel) {
|
|
@@ -264,7 +264,13 @@ export const updateSchemas = (cmdOpts = {}) => {
|
|
|
264
264
|
saveSchemaFile('mail', info)
|
|
265
265
|
);
|
|
266
266
|
}
|
|
267
|
-
|
|
267
|
+
const arr = await Promise.allSettled(func);
|
|
268
|
+
for (const i of arr) {
|
|
269
|
+
const { reason, status } = i;
|
|
270
|
+
if (status === 'rejected' && reason) {
|
|
271
|
+
console.trace(reason);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
268
274
|
};
|
|
269
275
|
|
|
270
276
|
/**
|
package/package.json
CHANGED
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
"commander": "^8.3.0",
|
|
28
28
|
"decamelize": "^6.0.0",
|
|
29
29
|
"json5": "^2.2.0",
|
|
30
|
-
"node-fetch": "^3.
|
|
31
|
-
"sinon": "^
|
|
30
|
+
"node-fetch": "^3.1.0",
|
|
31
|
+
"sinon": "^12.0.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"c8": "^7.10.0",
|
|
35
35
|
"chai": "^4.3.4",
|
|
36
36
|
"eslint": "^7.32.0",
|
|
37
37
|
"eslint-config-standard": "^16.0.3",
|
|
38
|
-
"eslint-plugin-import": "^2.25.
|
|
39
|
-
"eslint-plugin-jsdoc": "^
|
|
38
|
+
"eslint-plugin-import": "^2.25.3",
|
|
39
|
+
"eslint-plugin-jsdoc": "^37.1.0",
|
|
40
40
|
"eslint-plugin-node": "^11.1.0",
|
|
41
|
-
"eslint-plugin-promise": "^5.
|
|
41
|
+
"eslint-plugin-promise": "^5.2.0",
|
|
42
42
|
"mocha": "^9.1.3",
|
|
43
|
-
"nock": "^13.1
|
|
43
|
+
"nock": "^13.2.1"
|
|
44
44
|
},
|
|
45
|
-
"version": "2.0.
|
|
45
|
+
"version": "2.0.5"
|
|
46
46
|
}
|
package/schemas/beta/webext.json
CHANGED
|
@@ -8376,6 +8376,10 @@
|
|
|
8376
8376
|
"$ref": "types.Setting",
|
|
8377
8377
|
"description": "This setting controls whether the user-chosen colors override the page's colors."
|
|
8378
8378
|
},
|
|
8379
|
+
"overrideContentColorScheme": {
|
|
8380
|
+
"$ref": "types.Setting",
|
|
8381
|
+
"description": "This setting controls whether a light or dark color scheme overrides the page's preferred color scheme."
|
|
8382
|
+
},
|
|
8379
8383
|
"useDocumentFonts": {
|
|
8380
8384
|
"$ref": "types.Setting",
|
|
8381
8385
|
"description": "This setting controls whether the document's fonts are used."
|
|
@@ -11727,7 +11731,9 @@
|
|
|
11727
11731
|
"js",
|
|
11728
11732
|
"leaf",
|
|
11729
11733
|
"mainthreadio",
|
|
11730
|
-
"
|
|
11734
|
+
"fileio",
|
|
11735
|
+
"fileioall",
|
|
11736
|
+
"noiostacks",
|
|
11731
11737
|
"screenshots",
|
|
11732
11738
|
"seqstyle",
|
|
11733
11739
|
"stackwalk",
|
|
@@ -11735,15 +11741,17 @@
|
|
|
11735
11741
|
"jstracer",
|
|
11736
11742
|
"jsallocations",
|
|
11737
11743
|
"nostacksampling",
|
|
11738
|
-
"nativeallocations",
|
|
11739
11744
|
"preferencereads",
|
|
11745
|
+
"nativeallocations",
|
|
11740
11746
|
"ipcmessages",
|
|
11741
|
-
"fileio",
|
|
11742
|
-
"fileioall",
|
|
11743
|
-
"noiostacks",
|
|
11744
11747
|
"audiocallbacktracing",
|
|
11745
11748
|
"cpu",
|
|
11746
|
-
"notimerresolutionchange"
|
|
11749
|
+
"notimerresolutionchange",
|
|
11750
|
+
"cpuallthreads",
|
|
11751
|
+
"samplingallthreads",
|
|
11752
|
+
"markersallthreads",
|
|
11753
|
+
"unregisteredthreads",
|
|
11754
|
+
"responsiveness"
|
|
11747
11755
|
]
|
|
11748
11756
|
},
|
|
11749
11757
|
{
|
|
@@ -12753,34 +12761,13 @@
|
|
|
12753
12761
|
"postprocess": "manifestVersionCheck"
|
|
12754
12762
|
},
|
|
12755
12763
|
"applications": {
|
|
12756
|
-
"
|
|
12757
|
-
"
|
|
12758
|
-
"
|
|
12759
|
-
"gecko": {
|
|
12760
|
-
"$ref": "FirefoxSpecificProperties",
|
|
12761
|
-
"optional": true
|
|
12762
|
-
}
|
|
12763
|
-
}
|
|
12764
|
+
"$ref": "BrowserSpecificSettings",
|
|
12765
|
+
"description": "The applications property is deprecated, please use 'browser_specific_settings'",
|
|
12766
|
+
"optional": true
|
|
12764
12767
|
},
|
|
12765
12768
|
"browser_specific_settings": {
|
|
12766
|
-
"
|
|
12767
|
-
"optional": true
|
|
12768
|
-
"properties": {
|
|
12769
|
-
"gecko": {
|
|
12770
|
-
"$ref": "FirefoxSpecificProperties",
|
|
12771
|
-
"optional": true
|
|
12772
|
-
},
|
|
12773
|
-
"edge": {
|
|
12774
|
-
"type": "object",
|
|
12775
|
-
"additionalProperties": {
|
|
12776
|
-
"type": "any"
|
|
12777
|
-
},
|
|
12778
|
-
"optional": true
|
|
12779
|
-
}
|
|
12780
|
-
},
|
|
12781
|
-
"additionalProperties": {
|
|
12782
|
-
"$ref": "UnrecognizedProperty"
|
|
12783
|
-
}
|
|
12769
|
+
"$ref": "BrowserSpecificSettings",
|
|
12770
|
+
"optional": true
|
|
12784
12771
|
},
|
|
12785
12772
|
"name": {
|
|
12786
12773
|
"type": "string",
|
|
@@ -12812,6 +12799,32 @@
|
|
|
12812
12799
|
"format": "url",
|
|
12813
12800
|
"optional": true,
|
|
12814
12801
|
"preprocess": "localize"
|
|
12802
|
+
},
|
|
12803
|
+
"install_origins": {
|
|
12804
|
+
"type": "array",
|
|
12805
|
+
"optional": true,
|
|
12806
|
+
"items": {
|
|
12807
|
+
"type": "string",
|
|
12808
|
+
"format": "origin"
|
|
12809
|
+
}
|
|
12810
|
+
},
|
|
12811
|
+
"developer": {
|
|
12812
|
+
"type": "object",
|
|
12813
|
+
"optional": true,
|
|
12814
|
+
"properties": {
|
|
12815
|
+
"name": {
|
|
12816
|
+
"type": "string",
|
|
12817
|
+
"optional": true,
|
|
12818
|
+
"preprocess": "localize"
|
|
12819
|
+
},
|
|
12820
|
+
"url": {
|
|
12821
|
+
"type": "string",
|
|
12822
|
+
"format": "url",
|
|
12823
|
+
"optional": true,
|
|
12824
|
+
"preprocess": "localize",
|
|
12825
|
+
"onError": "warn"
|
|
12826
|
+
}
|
|
12827
|
+
}
|
|
12815
12828
|
}
|
|
12816
12829
|
}
|
|
12817
12830
|
},
|
|
@@ -13027,22 +13040,6 @@
|
|
|
13027
13040
|
}
|
|
13028
13041
|
]
|
|
13029
13042
|
},
|
|
13030
|
-
"developer": {
|
|
13031
|
-
"type": "object",
|
|
13032
|
-
"optional": true,
|
|
13033
|
-
"properties": {
|
|
13034
|
-
"name": {
|
|
13035
|
-
"type": "string",
|
|
13036
|
-
"optional": true,
|
|
13037
|
-
"preprocess": "localize"
|
|
13038
|
-
},
|
|
13039
|
-
"url": {
|
|
13040
|
-
"type": "string",
|
|
13041
|
-
"optional": true,
|
|
13042
|
-
"preprocess": "localize"
|
|
13043
|
-
}
|
|
13044
|
-
}
|
|
13045
|
-
},
|
|
13046
13043
|
"hidden": {
|
|
13047
13044
|
"type": "boolean",
|
|
13048
13045
|
"optional": true,
|
|
@@ -13308,6 +13305,19 @@
|
|
|
13308
13305
|
}
|
|
13309
13306
|
}
|
|
13310
13307
|
},
|
|
13308
|
+
{
|
|
13309
|
+
"id": "BrowserSpecificSettings",
|
|
13310
|
+
"type": "object",
|
|
13311
|
+
"properties": {
|
|
13312
|
+
"gecko": {
|
|
13313
|
+
"$ref": "FirefoxSpecificProperties",
|
|
13314
|
+
"optional": true
|
|
13315
|
+
}
|
|
13316
|
+
},
|
|
13317
|
+
"additionalProperties": {
|
|
13318
|
+
"type": "any"
|
|
13319
|
+
}
|
|
13320
|
+
},
|
|
13311
13321
|
{
|
|
13312
13322
|
"id": "MatchPattern",
|
|
13313
13323
|
"choices": [
|
|
@@ -14923,6 +14933,10 @@
|
|
|
14923
14933
|
"httpsOnlyMode": {
|
|
14924
14934
|
"$ref": "types.Setting",
|
|
14925
14935
|
"description": "Allow users to query the mode for 'HTTPS-Only Mode'. This setting's value is of type HTTPSOnlyModeOption, defaulting to <code>never</code>."
|
|
14936
|
+
},
|
|
14937
|
+
"globalPrivacyControl": {
|
|
14938
|
+
"$ref": "types.Setting",
|
|
14939
|
+
"description": "Allow users to query the status of 'Global Privacy Control'. This setting's value is of type boolean, defaulting to <code>false</code>."
|
|
14926
14940
|
}
|
|
14927
14941
|
}
|
|
14928
14942
|
},
|
|
@@ -15349,6 +15363,27 @@
|
|
|
15349
15363
|
"description": "The fully-qualified URL to the resource."
|
|
15350
15364
|
}
|
|
15351
15365
|
},
|
|
15366
|
+
{
|
|
15367
|
+
"name": "getFrameId",
|
|
15368
|
+
"type": "function",
|
|
15369
|
+
"allowedContexts": [
|
|
15370
|
+
"content",
|
|
15371
|
+
"devtools"
|
|
15372
|
+
],
|
|
15373
|
+
"description": "Get the frameId of any window global or frame element.",
|
|
15374
|
+
"parameters": [
|
|
15375
|
+
{
|
|
15376
|
+
"type": "any",
|
|
15377
|
+
"name": "target",
|
|
15378
|
+
"description": "A WindowProxy or a Browsing Context container element (IFrame, Frame, Embed, Object) for the target frame."
|
|
15379
|
+
}
|
|
15380
|
+
],
|
|
15381
|
+
"allowCrossOriginArguments": true,
|
|
15382
|
+
"returns": {
|
|
15383
|
+
"type": "number",
|
|
15384
|
+
"description": "The frameId of the target frame, or -1 if it doesn't exist."
|
|
15385
|
+
}
|
|
15386
|
+
},
|
|
15352
15387
|
{
|
|
15353
15388
|
"name": "setUninstallURL",
|
|
15354
15389
|
"type": "function",
|
|
@@ -15803,6 +15838,131 @@
|
|
|
15803
15838
|
]
|
|
15804
15839
|
}
|
|
15805
15840
|
],
|
|
15841
|
+
"scripting.json": [
|
|
15842
|
+
{
|
|
15843
|
+
"namespace": "manifest",
|
|
15844
|
+
"types": [
|
|
15845
|
+
{
|
|
15846
|
+
"$extend": "OptionalPermissionNoPrompt",
|
|
15847
|
+
"choices": [
|
|
15848
|
+
{
|
|
15849
|
+
"type": "string",
|
|
15850
|
+
"enum": [
|
|
15851
|
+
"scripting"
|
|
15852
|
+
],
|
|
15853
|
+
"min_manifest_version": 3
|
|
15854
|
+
}
|
|
15855
|
+
]
|
|
15856
|
+
}
|
|
15857
|
+
]
|
|
15858
|
+
},
|
|
15859
|
+
{
|
|
15860
|
+
"namespace": "scripting",
|
|
15861
|
+
"description": "Use the scripting API to execute script in different contexts.",
|
|
15862
|
+
"permissions": [
|
|
15863
|
+
"scripting"
|
|
15864
|
+
],
|
|
15865
|
+
"min_manifest_version": 3,
|
|
15866
|
+
"types": [
|
|
15867
|
+
{
|
|
15868
|
+
"id": "ScriptInjection",
|
|
15869
|
+
"type": "object",
|
|
15870
|
+
"description": "Details of a script injection",
|
|
15871
|
+
"properties": {
|
|
15872
|
+
"args": {
|
|
15873
|
+
"type": "array",
|
|
15874
|
+
"optional": true,
|
|
15875
|
+
"description": "The arguments to curry into a provided function. This is only valid if the <code>func</code> parameter is specified. These arguments must be JSON-serializable.",
|
|
15876
|
+
"items": {
|
|
15877
|
+
"type": "any"
|
|
15878
|
+
}
|
|
15879
|
+
},
|
|
15880
|
+
"files": {
|
|
15881
|
+
"type": "array",
|
|
15882
|
+
"optional": true,
|
|
15883
|
+
"description": "The path of the JS or CSS files to inject, relative to the extension's root directory. Exactly one of <code>files</code> and <code>func</code> must be specified.",
|
|
15884
|
+
"minItems": 1,
|
|
15885
|
+
"items": {
|
|
15886
|
+
"type": "string"
|
|
15887
|
+
}
|
|
15888
|
+
},
|
|
15889
|
+
"func": {
|
|
15890
|
+
"type": "function",
|
|
15891
|
+
"optional": true,
|
|
15892
|
+
"description": "A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of <code>files</code> and <code>func</code> must be specified."
|
|
15893
|
+
},
|
|
15894
|
+
"target": {
|
|
15895
|
+
"$ref": "InjectionTarget",
|
|
15896
|
+
"description": "Details specifying the target into which to inject the script."
|
|
15897
|
+
}
|
|
15898
|
+
}
|
|
15899
|
+
},
|
|
15900
|
+
{
|
|
15901
|
+
"id": "InjectionResult",
|
|
15902
|
+
"type": "object",
|
|
15903
|
+
"description": "Result of a script injection.",
|
|
15904
|
+
"properties": {
|
|
15905
|
+
"frameId": {
|
|
15906
|
+
"type": "number",
|
|
15907
|
+
"description": "The frame ID associated with the injection."
|
|
15908
|
+
},
|
|
15909
|
+
"result": {
|
|
15910
|
+
"type": "any",
|
|
15911
|
+
"optional": true,
|
|
15912
|
+
"description": "The result of the script execution."
|
|
15913
|
+
}
|
|
15914
|
+
}
|
|
15915
|
+
},
|
|
15916
|
+
{
|
|
15917
|
+
"id": "InjectionTarget",
|
|
15918
|
+
"type": "object",
|
|
15919
|
+
"properties": {
|
|
15920
|
+
"frameIds": {
|
|
15921
|
+
"type": "array",
|
|
15922
|
+
"optional": true,
|
|
15923
|
+
"description": "The IDs of specific frames to inject into.",
|
|
15924
|
+
"items": {
|
|
15925
|
+
"type": "number"
|
|
15926
|
+
}
|
|
15927
|
+
},
|
|
15928
|
+
"tabId": {
|
|
15929
|
+
"type": "number",
|
|
15930
|
+
"description": "The ID of the tab into which to inject."
|
|
15931
|
+
}
|
|
15932
|
+
}
|
|
15933
|
+
}
|
|
15934
|
+
],
|
|
15935
|
+
"functions": [
|
|
15936
|
+
{
|
|
15937
|
+
"name": "executeScript",
|
|
15938
|
+
"type": "function",
|
|
15939
|
+
"description": "Injects a script into a target context. The script will be run at <code>document_idle</code>.",
|
|
15940
|
+
"async": "callback",
|
|
15941
|
+
"parameters": [
|
|
15942
|
+
{
|
|
15943
|
+
"name": "injection",
|
|
15944
|
+
"$ref": "ScriptInjection",
|
|
15945
|
+
"description": "The details of the script which to inject."
|
|
15946
|
+
},
|
|
15947
|
+
{
|
|
15948
|
+
"name": "callback",
|
|
15949
|
+
"type": "function",
|
|
15950
|
+
"description": "Invoked upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.",
|
|
15951
|
+
"parameters": [
|
|
15952
|
+
{
|
|
15953
|
+
"name": "results",
|
|
15954
|
+
"type": "array",
|
|
15955
|
+
"items": {
|
|
15956
|
+
"$ref": "InjectionResult"
|
|
15957
|
+
}
|
|
15958
|
+
}
|
|
15959
|
+
]
|
|
15960
|
+
}
|
|
15961
|
+
]
|
|
15962
|
+
}
|
|
15963
|
+
]
|
|
15964
|
+
}
|
|
15965
|
+
],
|
|
15806
15966
|
"storage.json": [
|
|
15807
15967
|
{
|
|
15808
15968
|
"namespace": "storage",
|
|
@@ -18504,7 +18664,8 @@
|
|
|
18504
18664
|
"type": "string",
|
|
18505
18665
|
"enum": [
|
|
18506
18666
|
"webRequest",
|
|
18507
|
-
"webRequestBlocking"
|
|
18667
|
+
"webRequestBlocking",
|
|
18668
|
+
"webRequestFilterResponse.serviceWorkerScript"
|
|
18508
18669
|
]
|
|
18509
18670
|
}
|
|
18510
18671
|
]
|