webext-schema 3.0.2 → 3.0.3
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/modules/browser.js +6 -4
- package/package.json +2 -2
- package/schemas/beta/webext.json +27 -13
- package/schemas/mail/mailext.json +85 -5
package/modules/browser.js
CHANGED
|
@@ -424,8 +424,8 @@ export const getOs = async () => {
|
|
|
424
424
|
/**
|
|
425
425
|
* make a connection
|
|
426
426
|
*
|
|
427
|
-
* @param {number|string} [id] - tab ID / extension ID
|
|
428
|
-
* @param {object} [info] - info
|
|
427
|
+
* @param {number|string} [id] - tab ID / extension ID / host name
|
|
428
|
+
* @param {object|boolean} [info] - connection info / connect to native app
|
|
429
429
|
* @returns {object} - runtime.Port
|
|
430
430
|
*/
|
|
431
431
|
export const makeConnection = async (id, info) => {
|
|
@@ -437,7 +437,9 @@ export const makeConnection = async (id, info) => {
|
|
|
437
437
|
port = await tabs.connect(id);
|
|
438
438
|
}
|
|
439
439
|
} else if (isString(id)) {
|
|
440
|
-
if (
|
|
440
|
+
if (info && getType(info) === 'Boolean') {
|
|
441
|
+
port = await runtime.connectNative(id);
|
|
442
|
+
} else if (isObjectNotEmpty(info)) {
|
|
441
443
|
port = await runtime.connect(id, info);
|
|
442
444
|
} else {
|
|
443
445
|
port = await runtime.connect(id);
|
|
@@ -455,7 +457,7 @@ export const makeConnection = async (id, info) => {
|
|
|
455
457
|
/**
|
|
456
458
|
* send message
|
|
457
459
|
*
|
|
458
|
-
* @param {number|string} id -
|
|
460
|
+
* @param {number|string} id - tab ID / extension ID
|
|
459
461
|
* @param {*} msg - message
|
|
460
462
|
* @param {object} opt - options
|
|
461
463
|
* @returns {?Function} - tabs.sendMessage() | runtime.sendMessage()
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"camelize": "^1.0.0",
|
|
32
|
-
"commander": "^9.
|
|
32
|
+
"commander": "^9.3.0",
|
|
33
33
|
"decamelize": "^6.0.0",
|
|
34
34
|
"json5": "^2.2.1",
|
|
35
35
|
"node-fetch": "^3.2.4",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"nock": "^13.2.4",
|
|
49
49
|
"npm-run-all": "^4.1.5"
|
|
50
50
|
},
|
|
51
|
-
"version": "3.0.
|
|
51
|
+
"version": "3.0.3"
|
|
52
52
|
}
|
package/schemas/beta/webext.json
CHANGED
|
@@ -3066,7 +3066,7 @@
|
|
|
3066
3066
|
"namespace": "manifest",
|
|
3067
3067
|
"types": [
|
|
3068
3068
|
{
|
|
3069
|
-
"$extend": "
|
|
3069
|
+
"$extend": "PermissionPrivileged",
|
|
3070
3070
|
"choices": [
|
|
3071
3071
|
{
|
|
3072
3072
|
"type": "string",
|
|
@@ -6430,7 +6430,7 @@
|
|
|
6430
6430
|
"namespace": "manifest",
|
|
6431
6431
|
"types": [
|
|
6432
6432
|
{
|
|
6433
|
-
"$extend": "
|
|
6433
|
+
"$extend": "PermissionPrivileged",
|
|
6434
6434
|
"choices": [
|
|
6435
6435
|
{
|
|
6436
6436
|
"type": "string",
|
|
@@ -7275,7 +7275,7 @@
|
|
|
7275
7275
|
"namespace": "manifest",
|
|
7276
7276
|
"types": [
|
|
7277
7277
|
{
|
|
7278
|
-
"$extend": "
|
|
7278
|
+
"$extend": "PermissionPrivileged",
|
|
7279
7279
|
"choices": [
|
|
7280
7280
|
{
|
|
7281
7281
|
"type": "string",
|
|
@@ -10910,7 +10910,8 @@
|
|
|
10910
10910
|
"additionalProperties": {
|
|
10911
10911
|
"$ref": "experiments.ExperimentAPI"
|
|
10912
10912
|
},
|
|
10913
|
-
"optional": true
|
|
10913
|
+
"optional": true,
|
|
10914
|
+
"privileged": true
|
|
10914
10915
|
}
|
|
10915
10916
|
}
|
|
10916
10917
|
}
|
|
@@ -11761,7 +11762,8 @@
|
|
|
11761
11762
|
"items": {
|
|
11762
11763
|
"type": "string"
|
|
11763
11764
|
},
|
|
11764
|
-
"optional": true
|
|
11765
|
+
"optional": true,
|
|
11766
|
+
"privileged": true
|
|
11765
11767
|
}
|
|
11766
11768
|
}
|
|
11767
11769
|
}
|
|
@@ -13089,17 +13091,30 @@
|
|
|
13089
13091
|
}
|
|
13090
13092
|
]
|
|
13091
13093
|
},
|
|
13094
|
+
{
|
|
13095
|
+
"id": "PermissionPrivileged",
|
|
13096
|
+
"choices": [
|
|
13097
|
+
{
|
|
13098
|
+
"type": "string",
|
|
13099
|
+
"enum": [
|
|
13100
|
+
"mozillaAddons"
|
|
13101
|
+
]
|
|
13102
|
+
}
|
|
13103
|
+
]
|
|
13104
|
+
},
|
|
13092
13105
|
{
|
|
13093
13106
|
"id": "PermissionNoPrompt",
|
|
13094
13107
|
"choices": [
|
|
13095
13108
|
{
|
|
13096
|
-
"$ref": "
|
|
13109
|
+
"$ref": "OptionalPermissionNoPrompt"
|
|
13110
|
+
},
|
|
13111
|
+
{
|
|
13112
|
+
"$ref": "PermissionPrivileged"
|
|
13097
13113
|
},
|
|
13098
13114
|
{
|
|
13099
13115
|
"type": "string",
|
|
13100
13116
|
"enum": [
|
|
13101
13117
|
"alarms",
|
|
13102
|
-
"mozillaAddons",
|
|
13103
13118
|
"storage",
|
|
13104
13119
|
"unlimitedStorage"
|
|
13105
13120
|
]
|
|
@@ -13443,7 +13458,7 @@
|
|
|
13443
13458
|
"namespace": "manifest",
|
|
13444
13459
|
"types": [
|
|
13445
13460
|
{
|
|
13446
|
-
"$extend": "
|
|
13461
|
+
"$extend": "PermissionPrivileged",
|
|
13447
13462
|
"choices": [
|
|
13448
13463
|
{
|
|
13449
13464
|
"type": "string",
|
|
@@ -14865,7 +14880,8 @@
|
|
|
14865
14880
|
"type": "boolean",
|
|
14866
14881
|
"optional": true,
|
|
14867
14882
|
"default": false,
|
|
14868
|
-
"description": "Whether to create all cookies as nonPersistent (i.e., session) cookies."
|
|
14883
|
+
"description": "Whether to create all cookies as nonPersistent (i.e., session) cookies.",
|
|
14884
|
+
"deprecated": "This property has no effect anymore and its value is always <code>false<code>."
|
|
14869
14885
|
}
|
|
14870
14886
|
}
|
|
14871
14887
|
}
|
|
@@ -15720,8 +15736,7 @@
|
|
|
15720
15736
|
"type": "string",
|
|
15721
15737
|
"enum": [
|
|
15722
15738
|
"scripting"
|
|
15723
|
-
]
|
|
15724
|
-
"min_manifest_version": 3
|
|
15739
|
+
]
|
|
15725
15740
|
}
|
|
15726
15741
|
]
|
|
15727
15742
|
}
|
|
@@ -15733,7 +15748,6 @@
|
|
|
15733
15748
|
"permissions": [
|
|
15734
15749
|
"scripting"
|
|
15735
15750
|
],
|
|
15736
|
-
"min_manifest_version": 3,
|
|
15737
15751
|
"types": [
|
|
15738
15752
|
{
|
|
15739
15753
|
"id": "ScriptInjection",
|
|
@@ -16635,7 +16649,7 @@
|
|
|
16635
16649
|
}
|
|
16636
16650
|
},
|
|
16637
16651
|
{
|
|
16638
|
-
"$extend": "
|
|
16652
|
+
"$extend": "PermissionPrivileged",
|
|
16639
16653
|
"choices": [
|
|
16640
16654
|
{
|
|
16641
16655
|
"type": "string",
|
|
@@ -5269,6 +5269,7 @@
|
|
|
5269
5269
|
"type": "string",
|
|
5270
5270
|
"enum": [
|
|
5271
5271
|
"compose",
|
|
5272
|
+
"compose.save",
|
|
5272
5273
|
"compose.send"
|
|
5273
5274
|
]
|
|
5274
5275
|
}
|
|
@@ -5464,7 +5465,7 @@
|
|
|
5464
5465
|
"html",
|
|
5465
5466
|
"both"
|
|
5466
5467
|
],
|
|
5467
|
-
"description": "Defines the mime format of the
|
|
5468
|
+
"description": "Defines the mime format of the sent message (ignored on plain text messages). Defaults to ``auto``, which will send html messages as plain text, if they do not include any formatting, and as ``both`` otherwise (a multipart/mixed message).",
|
|
5468
5469
|
"optional": true
|
|
5469
5470
|
},
|
|
5470
5471
|
"customHeaders": {
|
|
@@ -6056,7 +6057,7 @@
|
|
|
6056
6057
|
"compose.send"
|
|
6057
6058
|
],
|
|
6058
6059
|
"type": "function",
|
|
6059
|
-
"description": "Sends the message currently being composed.",
|
|
6060
|
+
"description": "Sends the message currently being composed. If the send mode is not specified or set to ``default``, the message will be send directly if the user is online and placed in the users outbox otherwise. The returned Promise fulfills once the message has been successfully sent or placed in the user's outbox. Throws when the send process has been aborted by the user, by an :ref:`onBeforeSend` event or if there has been an error while sending the message to the outgoing mail server.",
|
|
6060
6061
|
"async": "callback",
|
|
6061
6062
|
"parameters": [
|
|
6062
6063
|
{
|
|
@@ -6081,12 +6082,90 @@
|
|
|
6081
6082
|
{
|
|
6082
6083
|
"type": "function",
|
|
6083
6084
|
"name": "callback",
|
|
6084
|
-
"description": "Returns false if the current state of the message composer prevented sending the message.",
|
|
6085
6085
|
"optional": true,
|
|
6086
6086
|
"parameters": [
|
|
6087
6087
|
{
|
|
6088
6088
|
"name": "return",
|
|
6089
|
-
"type": "
|
|
6089
|
+
"type": "object",
|
|
6090
|
+
"properties": {
|
|
6091
|
+
"mode": {
|
|
6092
|
+
"type": "string",
|
|
6093
|
+
"description": "The used send mode.",
|
|
6094
|
+
"enum": [
|
|
6095
|
+
"sendNow",
|
|
6096
|
+
"sendLater"
|
|
6097
|
+
]
|
|
6098
|
+
},
|
|
6099
|
+
"headerMessageId": {
|
|
6100
|
+
"type": "string",
|
|
6101
|
+
"description": "The header messageId of the outgoing message. Only included for actually sent messages.",
|
|
6102
|
+
"optional": true
|
|
6103
|
+
},
|
|
6104
|
+
"messages": {
|
|
6105
|
+
"type": "array",
|
|
6106
|
+
"items": {
|
|
6107
|
+
"$ref": "messages.MessageHeader"
|
|
6108
|
+
},
|
|
6109
|
+
"description": "Copies of the sent message. The number of created copies depends on the applied file carbon copy configuration (fcc)."
|
|
6110
|
+
}
|
|
6111
|
+
}
|
|
6112
|
+
}
|
|
6113
|
+
]
|
|
6114
|
+
}
|
|
6115
|
+
]
|
|
6116
|
+
},
|
|
6117
|
+
{
|
|
6118
|
+
"name": "saveMessage",
|
|
6119
|
+
"permissions": [
|
|
6120
|
+
"compose.save"
|
|
6121
|
+
],
|
|
6122
|
+
"type": "function",
|
|
6123
|
+
"description": "Saves the message currently being composed as a draft or as a template. If the save mode is not specified, the message will be saved as a draft. The returned Promise fulfills once the message has been successfully saved.",
|
|
6124
|
+
"async": "callback",
|
|
6125
|
+
"parameters": [
|
|
6126
|
+
{
|
|
6127
|
+
"name": "tabId",
|
|
6128
|
+
"type": "integer"
|
|
6129
|
+
},
|
|
6130
|
+
{
|
|
6131
|
+
"name": "options",
|
|
6132
|
+
"type": "object",
|
|
6133
|
+
"optional": true,
|
|
6134
|
+
"properties": {
|
|
6135
|
+
"mode": {
|
|
6136
|
+
"type": "string",
|
|
6137
|
+
"enum": [
|
|
6138
|
+
"draft",
|
|
6139
|
+
"template"
|
|
6140
|
+
]
|
|
6141
|
+
}
|
|
6142
|
+
}
|
|
6143
|
+
},
|
|
6144
|
+
{
|
|
6145
|
+
"type": "function",
|
|
6146
|
+
"name": "callback",
|
|
6147
|
+
"optional": true,
|
|
6148
|
+
"parameters": [
|
|
6149
|
+
{
|
|
6150
|
+
"name": "return",
|
|
6151
|
+
"type": "object",
|
|
6152
|
+
"properties": {
|
|
6153
|
+
"mode": {
|
|
6154
|
+
"type": "string",
|
|
6155
|
+
"description": "The used save mode.",
|
|
6156
|
+
"enum": [
|
|
6157
|
+
"draft",
|
|
6158
|
+
"template"
|
|
6159
|
+
]
|
|
6160
|
+
},
|
|
6161
|
+
"messages": {
|
|
6162
|
+
"type": "array",
|
|
6163
|
+
"items": {
|
|
6164
|
+
"$ref": "messages.MessageHeader"
|
|
6165
|
+
},
|
|
6166
|
+
"description": "The saved message(s). The number of saved messages depends on the applied file carbon copy configuration (fcc)."
|
|
6167
|
+
}
|
|
6168
|
+
}
|
|
6090
6169
|
}
|
|
6091
6170
|
]
|
|
6092
6171
|
}
|
|
@@ -9532,7 +9611,8 @@
|
|
|
9532
9611
|
},
|
|
9533
9612
|
"folder": {
|
|
9534
9613
|
"$ref": "folders.MailFolder",
|
|
9535
|
-
"description": "The <permission>accountsRead</permission> permission is required for this property to be included."
|
|
9614
|
+
"description": "The <permission>accountsRead</permission> permission is required for this property to be included.",
|
|
9615
|
+
"optional": true
|
|
9536
9616
|
},
|
|
9537
9617
|
"headerMessageId": {
|
|
9538
9618
|
"type": "string",
|