webext-schema 2.0.0 → 2.0.4
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 -0
- package/modules/update.js +10 -4
- package/package.json +10 -10
- package/schemas/beta/webext.json +10 -1
- package/schemas/central/webext.json +209 -49
- package/schemas/mail/mailext.json +433 -61
- package/schemas/release/webext.json +56 -1
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
[](https://github.com/asamuzaK/webext-schema/actions?query=workflow%3Abuild)
|
|
2
|
+
[](https://github.com/asamuzaK/webext-schema/actions?query=workflow%3ACodeQL)
|
|
2
3
|
[](https://david-dm.org/asamuzaK/webext-schema)
|
|
3
4
|
[](https://david-dm.org/asamuzaK/webext-schema?type=dev)
|
|
4
5
|
[](https://badge.fury.io/js/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
|
@@ -24,23 +24,23 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"camelize": "^1.0.0",
|
|
27
|
-
"commander": "^8.
|
|
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
|
-
"c8": "^7.
|
|
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.
|
|
39
|
-
"eslint-plugin-jsdoc": "^
|
|
38
|
+
"eslint-plugin-import": "^2.25.3",
|
|
39
|
+
"eslint-plugin-jsdoc": "^37.0.3",
|
|
40
40
|
"eslint-plugin-node": "^11.1.0",
|
|
41
|
-
"eslint-plugin-promise": "^5.1.
|
|
42
|
-
"mocha": "^9.1.
|
|
43
|
-
"nock": "^13.1
|
|
41
|
+
"eslint-plugin-promise": "^5.1.1",
|
|
42
|
+
"mocha": "^9.1.3",
|
|
43
|
+
"nock": "^13.2.1"
|
|
44
44
|
},
|
|
45
|
-
"version": "2.0.
|
|
45
|
+
"version": "2.0.4"
|
|
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."
|
|
@@ -14923,6 +14927,10 @@
|
|
|
14923
14927
|
"httpsOnlyMode": {
|
|
14924
14928
|
"$ref": "types.Setting",
|
|
14925
14929
|
"description": "Allow users to query the mode for 'HTTPS-Only Mode'. This setting's value is of type HTTPSOnlyModeOption, defaulting to <code>never</code>."
|
|
14930
|
+
},
|
|
14931
|
+
"globalPrivacyControl": {
|
|
14932
|
+
"$ref": "types.Setting",
|
|
14933
|
+
"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
14934
|
}
|
|
14927
14935
|
}
|
|
14928
14936
|
},
|
|
@@ -18504,7 +18512,8 @@
|
|
|
18504
18512
|
"type": "string",
|
|
18505
18513
|
"enum": [
|
|
18506
18514
|
"webRequest",
|
|
18507
|
-
"webRequestBlocking"
|
|
18515
|
+
"webRequestBlocking",
|
|
18516
|
+
"webRequestFilterResponse.serviceWorkerScript"
|
|
18508
18517
|
]
|
|
18509
18518
|
}
|
|
18510
18519
|
]
|
|
@@ -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,16 @@
|
|
|
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
|
+
"responsiveness"
|
|
11747
11754
|
]
|
|
11748
11755
|
},
|
|
11749
11756
|
{
|
|
@@ -12753,34 +12760,13 @@
|
|
|
12753
12760
|
"postprocess": "manifestVersionCheck"
|
|
12754
12761
|
},
|
|
12755
12762
|
"applications": {
|
|
12756
|
-
"
|
|
12757
|
-
"
|
|
12758
|
-
"
|
|
12759
|
-
"gecko": {
|
|
12760
|
-
"$ref": "FirefoxSpecificProperties",
|
|
12761
|
-
"optional": true
|
|
12762
|
-
}
|
|
12763
|
-
}
|
|
12763
|
+
"$ref": "BrowserSpecificSettings",
|
|
12764
|
+
"description": "The applications property is deprecated, please use 'browser_specific_settings'",
|
|
12765
|
+
"optional": true
|
|
12764
12766
|
},
|
|
12765
12767
|
"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
|
-
}
|
|
12768
|
+
"$ref": "BrowserSpecificSettings",
|
|
12769
|
+
"optional": true
|
|
12784
12770
|
},
|
|
12785
12771
|
"name": {
|
|
12786
12772
|
"type": "string",
|
|
@@ -12812,6 +12798,32 @@
|
|
|
12812
12798
|
"format": "url",
|
|
12813
12799
|
"optional": true,
|
|
12814
12800
|
"preprocess": "localize"
|
|
12801
|
+
},
|
|
12802
|
+
"install_origins": {
|
|
12803
|
+
"type": "array",
|
|
12804
|
+
"optional": true,
|
|
12805
|
+
"items": {
|
|
12806
|
+
"type": "string",
|
|
12807
|
+
"format": "origin"
|
|
12808
|
+
}
|
|
12809
|
+
},
|
|
12810
|
+
"developer": {
|
|
12811
|
+
"type": "object",
|
|
12812
|
+
"optional": true,
|
|
12813
|
+
"properties": {
|
|
12814
|
+
"name": {
|
|
12815
|
+
"type": "string",
|
|
12816
|
+
"optional": true,
|
|
12817
|
+
"preprocess": "localize"
|
|
12818
|
+
},
|
|
12819
|
+
"url": {
|
|
12820
|
+
"type": "string",
|
|
12821
|
+
"format": "url",
|
|
12822
|
+
"optional": true,
|
|
12823
|
+
"preprocess": "localize",
|
|
12824
|
+
"onError": "warn"
|
|
12825
|
+
}
|
|
12826
|
+
}
|
|
12815
12827
|
}
|
|
12816
12828
|
}
|
|
12817
12829
|
},
|
|
@@ -13027,22 +13039,6 @@
|
|
|
13027
13039
|
}
|
|
13028
13040
|
]
|
|
13029
13041
|
},
|
|
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
13042
|
"hidden": {
|
|
13047
13043
|
"type": "boolean",
|
|
13048
13044
|
"optional": true,
|
|
@@ -13308,6 +13304,19 @@
|
|
|
13308
13304
|
}
|
|
13309
13305
|
}
|
|
13310
13306
|
},
|
|
13307
|
+
{
|
|
13308
|
+
"id": "BrowserSpecificSettings",
|
|
13309
|
+
"type": "object",
|
|
13310
|
+
"properties": {
|
|
13311
|
+
"gecko": {
|
|
13312
|
+
"$ref": "FirefoxSpecificProperties",
|
|
13313
|
+
"optional": true
|
|
13314
|
+
}
|
|
13315
|
+
},
|
|
13316
|
+
"additionalProperties": {
|
|
13317
|
+
"type": "any"
|
|
13318
|
+
}
|
|
13319
|
+
},
|
|
13311
13320
|
{
|
|
13312
13321
|
"id": "MatchPattern",
|
|
13313
13322
|
"choices": [
|
|
@@ -14923,6 +14932,10 @@
|
|
|
14923
14932
|
"httpsOnlyMode": {
|
|
14924
14933
|
"$ref": "types.Setting",
|
|
14925
14934
|
"description": "Allow users to query the mode for 'HTTPS-Only Mode'. This setting's value is of type HTTPSOnlyModeOption, defaulting to <code>never</code>."
|
|
14935
|
+
},
|
|
14936
|
+
"globalPrivacyControl": {
|
|
14937
|
+
"$ref": "types.Setting",
|
|
14938
|
+
"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
14939
|
}
|
|
14927
14940
|
}
|
|
14928
14941
|
},
|
|
@@ -15349,6 +15362,27 @@
|
|
|
15349
15362
|
"description": "The fully-qualified URL to the resource."
|
|
15350
15363
|
}
|
|
15351
15364
|
},
|
|
15365
|
+
{
|
|
15366
|
+
"name": "getFrameId",
|
|
15367
|
+
"type": "function",
|
|
15368
|
+
"allowedContexts": [
|
|
15369
|
+
"content",
|
|
15370
|
+
"devtools"
|
|
15371
|
+
],
|
|
15372
|
+
"description": "Get the frameId of any window global or frame element.",
|
|
15373
|
+
"parameters": [
|
|
15374
|
+
{
|
|
15375
|
+
"type": "any",
|
|
15376
|
+
"name": "target",
|
|
15377
|
+
"description": "A WindowProxy or a Browsing Context container element (IFrame, Frame, Embed, Object) for the target frame."
|
|
15378
|
+
}
|
|
15379
|
+
],
|
|
15380
|
+
"allowCrossOriginArguments": true,
|
|
15381
|
+
"returns": {
|
|
15382
|
+
"type": "number",
|
|
15383
|
+
"description": "The frameId of the target frame, or -1 if it doesn't exist."
|
|
15384
|
+
}
|
|
15385
|
+
},
|
|
15352
15386
|
{
|
|
15353
15387
|
"name": "setUninstallURL",
|
|
15354
15388
|
"type": "function",
|
|
@@ -15803,6 +15837,131 @@
|
|
|
15803
15837
|
]
|
|
15804
15838
|
}
|
|
15805
15839
|
],
|
|
15840
|
+
"scripting.json": [
|
|
15841
|
+
{
|
|
15842
|
+
"namespace": "manifest",
|
|
15843
|
+
"types": [
|
|
15844
|
+
{
|
|
15845
|
+
"$extend": "OptionalPermissionNoPrompt",
|
|
15846
|
+
"choices": [
|
|
15847
|
+
{
|
|
15848
|
+
"type": "string",
|
|
15849
|
+
"enum": [
|
|
15850
|
+
"scripting"
|
|
15851
|
+
],
|
|
15852
|
+
"min_manifest_version": 3
|
|
15853
|
+
}
|
|
15854
|
+
]
|
|
15855
|
+
}
|
|
15856
|
+
]
|
|
15857
|
+
},
|
|
15858
|
+
{
|
|
15859
|
+
"namespace": "scripting",
|
|
15860
|
+
"description": "Use the scripting API to execute script in different contexts.",
|
|
15861
|
+
"permissions": [
|
|
15862
|
+
"scripting"
|
|
15863
|
+
],
|
|
15864
|
+
"min_manifest_version": 3,
|
|
15865
|
+
"types": [
|
|
15866
|
+
{
|
|
15867
|
+
"id": "ScriptInjection",
|
|
15868
|
+
"type": "object",
|
|
15869
|
+
"description": "Details of a script injection",
|
|
15870
|
+
"properties": {
|
|
15871
|
+
"args": {
|
|
15872
|
+
"type": "array",
|
|
15873
|
+
"optional": true,
|
|
15874
|
+
"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.",
|
|
15875
|
+
"items": {
|
|
15876
|
+
"type": "any"
|
|
15877
|
+
}
|
|
15878
|
+
},
|
|
15879
|
+
"files": {
|
|
15880
|
+
"type": "array",
|
|
15881
|
+
"optional": true,
|
|
15882
|
+
"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.",
|
|
15883
|
+
"minItems": 1,
|
|
15884
|
+
"items": {
|
|
15885
|
+
"type": "string"
|
|
15886
|
+
}
|
|
15887
|
+
},
|
|
15888
|
+
"func": {
|
|
15889
|
+
"type": "function",
|
|
15890
|
+
"optional": true,
|
|
15891
|
+
"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."
|
|
15892
|
+
},
|
|
15893
|
+
"target": {
|
|
15894
|
+
"$ref": "InjectionTarget",
|
|
15895
|
+
"description": "Details specifying the target into which to inject the script."
|
|
15896
|
+
}
|
|
15897
|
+
}
|
|
15898
|
+
},
|
|
15899
|
+
{
|
|
15900
|
+
"id": "InjectionResult",
|
|
15901
|
+
"type": "object",
|
|
15902
|
+
"description": "Result of a script injection.",
|
|
15903
|
+
"properties": {
|
|
15904
|
+
"frameId": {
|
|
15905
|
+
"type": "number",
|
|
15906
|
+
"description": "The frame ID associated with the injection."
|
|
15907
|
+
},
|
|
15908
|
+
"result": {
|
|
15909
|
+
"type": "any",
|
|
15910
|
+
"optional": true,
|
|
15911
|
+
"description": "The result of the script execution."
|
|
15912
|
+
}
|
|
15913
|
+
}
|
|
15914
|
+
},
|
|
15915
|
+
{
|
|
15916
|
+
"id": "InjectionTarget",
|
|
15917
|
+
"type": "object",
|
|
15918
|
+
"properties": {
|
|
15919
|
+
"frameIds": {
|
|
15920
|
+
"type": "array",
|
|
15921
|
+
"optional": true,
|
|
15922
|
+
"description": "The IDs of specific frames to inject into.",
|
|
15923
|
+
"items": {
|
|
15924
|
+
"type": "number"
|
|
15925
|
+
}
|
|
15926
|
+
},
|
|
15927
|
+
"tabId": {
|
|
15928
|
+
"type": "number",
|
|
15929
|
+
"description": "The ID of the tab into which to inject."
|
|
15930
|
+
}
|
|
15931
|
+
}
|
|
15932
|
+
}
|
|
15933
|
+
],
|
|
15934
|
+
"functions": [
|
|
15935
|
+
{
|
|
15936
|
+
"name": "executeScript",
|
|
15937
|
+
"type": "function",
|
|
15938
|
+
"description": "Injects a script into a target context. The script will be run at <code>document_idle</code>.",
|
|
15939
|
+
"async": "callback",
|
|
15940
|
+
"parameters": [
|
|
15941
|
+
{
|
|
15942
|
+
"name": "injection",
|
|
15943
|
+
"$ref": "ScriptInjection",
|
|
15944
|
+
"description": "The details of the script which to inject."
|
|
15945
|
+
},
|
|
15946
|
+
{
|
|
15947
|
+
"name": "callback",
|
|
15948
|
+
"type": "function",
|
|
15949
|
+
"description": "Invoked upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.",
|
|
15950
|
+
"parameters": [
|
|
15951
|
+
{
|
|
15952
|
+
"name": "results",
|
|
15953
|
+
"type": "array",
|
|
15954
|
+
"items": {
|
|
15955
|
+
"$ref": "InjectionResult"
|
|
15956
|
+
}
|
|
15957
|
+
}
|
|
15958
|
+
]
|
|
15959
|
+
}
|
|
15960
|
+
]
|
|
15961
|
+
}
|
|
15962
|
+
]
|
|
15963
|
+
}
|
|
15964
|
+
],
|
|
15806
15965
|
"storage.json": [
|
|
15807
15966
|
{
|
|
15808
15967
|
"namespace": "storage",
|
|
@@ -18504,7 +18663,8 @@
|
|
|
18504
18663
|
"type": "string",
|
|
18505
18664
|
"enum": [
|
|
18506
18665
|
"webRequest",
|
|
18507
|
-
"webRequestBlocking"
|
|
18666
|
+
"webRequestBlocking",
|
|
18667
|
+
"webRequestFilterResponse.serviceWorkerScript"
|
|
18508
18668
|
]
|
|
18509
18669
|
}
|
|
18510
18670
|
]
|