webext-schema 7.1.0 → 7.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/.prettierignore +8 -0
- package/SECURITY.md +1 -7
- package/eslint.config.mjs +28 -14
- package/modules/browser.js +43 -23
- package/modules/commander.js +8 -5
- package/modules/common.js +1 -1
- package/modules/file-util.js +23 -10
- package/modules/schema.js +21 -14
- package/modules/update.js +34 -23
- package/package.json +15 -24
- package/prettier.config.mjs +14 -0
- package/schemas/beta/webext.json +168 -147
- package/schemas/central/webext.json +168 -147
- package/schemas/mail/mailext.json +28 -5
- package/test/browser.test.js +1045 -494
- package/test/commander.test.js +7 -21
- package/test/common.test.js +7 -1
- package/test/file-util.test.js +65 -35
- package/test/index.test.js +16 -8
- package/test/schema.test.js +839 -430
- package/test/update.test.js +839 -510
|
@@ -3059,146 +3059,6 @@
|
|
|
3059
3059
|
]
|
|
3060
3060
|
}
|
|
3061
3061
|
],
|
|
3062
|
-
"normandyAddonStudy.json": [
|
|
3063
|
-
{
|
|
3064
|
-
"namespace": "manifest",
|
|
3065
|
-
"types": [
|
|
3066
|
-
{
|
|
3067
|
-
"$extend": "PermissionPrivileged",
|
|
3068
|
-
"choices": [
|
|
3069
|
-
{
|
|
3070
|
-
"type": "string",
|
|
3071
|
-
"enum": [
|
|
3072
|
-
"normandyAddonStudy"
|
|
3073
|
-
]
|
|
3074
|
-
}
|
|
3075
|
-
]
|
|
3076
|
-
}
|
|
3077
|
-
]
|
|
3078
|
-
},
|
|
3079
|
-
{
|
|
3080
|
-
"namespace": "normandyAddonStudy",
|
|
3081
|
-
"description": "Normandy Study API",
|
|
3082
|
-
"allowedContexts": [
|
|
3083
|
-
"content",
|
|
3084
|
-
"devtools"
|
|
3085
|
-
],
|
|
3086
|
-
"defaultContexts": [
|
|
3087
|
-
"content",
|
|
3088
|
-
"devtools"
|
|
3089
|
-
],
|
|
3090
|
-
"permissions": [
|
|
3091
|
-
"normandyAddonStudy"
|
|
3092
|
-
],
|
|
3093
|
-
"types": [
|
|
3094
|
-
{
|
|
3095
|
-
"id": "Study",
|
|
3096
|
-
"type": "object",
|
|
3097
|
-
"properties": {
|
|
3098
|
-
"recipeId": {
|
|
3099
|
-
"type": "integer",
|
|
3100
|
-
"description": "The ID of the recipe for the study."
|
|
3101
|
-
},
|
|
3102
|
-
"slug": {
|
|
3103
|
-
"type": "string",
|
|
3104
|
-
"description": "A slug to identify the study."
|
|
3105
|
-
},
|
|
3106
|
-
"userFacingName": {
|
|
3107
|
-
"type": "string",
|
|
3108
|
-
"description": "The name presented on about:studies."
|
|
3109
|
-
},
|
|
3110
|
-
"userFacingDescription": {
|
|
3111
|
-
"type": "string",
|
|
3112
|
-
"description": "The description presented on about:studies."
|
|
3113
|
-
},
|
|
3114
|
-
"branch": {
|
|
3115
|
-
"type": "string",
|
|
3116
|
-
"description": "The study branch in which the user is enrolled."
|
|
3117
|
-
},
|
|
3118
|
-
"active": {
|
|
3119
|
-
"type": "boolean",
|
|
3120
|
-
"description": "The state of the study."
|
|
3121
|
-
},
|
|
3122
|
-
"addonId": {
|
|
3123
|
-
"type": "string",
|
|
3124
|
-
"description": "The ID of the extension installed by the study."
|
|
3125
|
-
},
|
|
3126
|
-
"addonUrl": {
|
|
3127
|
-
"type": "string",
|
|
3128
|
-
"description": "The URL of the XPI that was downloaded and installed by the study."
|
|
3129
|
-
},
|
|
3130
|
-
"addonVersion": {
|
|
3131
|
-
"type": "string",
|
|
3132
|
-
"description": "The version of the extension installed by the study."
|
|
3133
|
-
},
|
|
3134
|
-
"studyStartDate": {
|
|
3135
|
-
"$ref": "extensionTypes.Date",
|
|
3136
|
-
"description": "The start date for the study."
|
|
3137
|
-
},
|
|
3138
|
-
"studyEndDate": {
|
|
3139
|
-
"$ref": "extensionTypes.Date",
|
|
3140
|
-
"description": "The end date for the study."
|
|
3141
|
-
},
|
|
3142
|
-
"extensionApiId": {
|
|
3143
|
-
"type": "integer",
|
|
3144
|
-
"description": "The record ID for the extension in Normandy server's database."
|
|
3145
|
-
},
|
|
3146
|
-
"extensionHash": {
|
|
3147
|
-
"type": "string",
|
|
3148
|
-
"description": "A hash of the extension XPI file."
|
|
3149
|
-
},
|
|
3150
|
-
"extensionHashAlgorithm": {
|
|
3151
|
-
"type": "string",
|
|
3152
|
-
"description": "The algorithm used to hash the extension XPI file."
|
|
3153
|
-
}
|
|
3154
|
-
}
|
|
3155
|
-
}
|
|
3156
|
-
],
|
|
3157
|
-
"functions": [
|
|
3158
|
-
{
|
|
3159
|
-
"name": "getStudy",
|
|
3160
|
-
"type": "function",
|
|
3161
|
-
"description": "Returns a study object for the current study.",
|
|
3162
|
-
"async": true,
|
|
3163
|
-
"parameters": []
|
|
3164
|
-
},
|
|
3165
|
-
{
|
|
3166
|
-
"name": "endStudy",
|
|
3167
|
-
"type": "function",
|
|
3168
|
-
"description": "Marks the study as ended and then uninstalls the addon.",
|
|
3169
|
-
"async": true,
|
|
3170
|
-
"parameters": [
|
|
3171
|
-
{
|
|
3172
|
-
"type": "string",
|
|
3173
|
-
"name": "reason",
|
|
3174
|
-
"description": "The reason why the study is ending."
|
|
3175
|
-
}
|
|
3176
|
-
]
|
|
3177
|
-
},
|
|
3178
|
-
{
|
|
3179
|
-
"name": "getClientMetadata",
|
|
3180
|
-
"type": "function",
|
|
3181
|
-
"description": "Returns an object with metadata about the client which may be required for constructing survey URLs.",
|
|
3182
|
-
"async": true,
|
|
3183
|
-
"parameters": []
|
|
3184
|
-
}
|
|
3185
|
-
],
|
|
3186
|
-
"events": [
|
|
3187
|
-
{
|
|
3188
|
-
"name": "onUnenroll",
|
|
3189
|
-
"type": "function",
|
|
3190
|
-
"description": "Fired when a user unenrolls from a study but before the addon is uninstalled.",
|
|
3191
|
-
"parameters": [
|
|
3192
|
-
{
|
|
3193
|
-
"type": "string",
|
|
3194
|
-
"name": "reason",
|
|
3195
|
-
"description": "The reason why the study is ending."
|
|
3196
|
-
}
|
|
3197
|
-
]
|
|
3198
|
-
}
|
|
3199
|
-
]
|
|
3200
|
-
}
|
|
3201
|
-
],
|
|
3202
3062
|
"omnibox.json": [
|
|
3203
3063
|
{
|
|
3204
3064
|
"namespace": "manifest",
|
|
@@ -7733,13 +7593,7 @@
|
|
|
7733
7593
|
{
|
|
7734
7594
|
"type": "function",
|
|
7735
7595
|
"name": "callback",
|
|
7736
|
-
"parameters": [
|
|
7737
|
-
{
|
|
7738
|
-
"name": "wasCleared",
|
|
7739
|
-
"type": "boolean",
|
|
7740
|
-
"description": "Whether any alarm was found to clear."
|
|
7741
|
-
}
|
|
7742
|
-
]
|
|
7596
|
+
"parameters": []
|
|
7743
7597
|
}
|
|
7744
7598
|
]
|
|
7745
7599
|
}
|
|
@@ -9273,6 +9127,21 @@
|
|
|
9273
9127
|
"description": "The cookie store ID of the contextual identity."
|
|
9274
9128
|
}
|
|
9275
9129
|
}
|
|
9130
|
+
},
|
|
9131
|
+
{
|
|
9132
|
+
"id": "SiteAssociation",
|
|
9133
|
+
"type": "object",
|
|
9134
|
+
"description": "Represents the association between a site and a contextual identity.",
|
|
9135
|
+
"properties": {
|
|
9136
|
+
"site": {
|
|
9137
|
+
"type": "string",
|
|
9138
|
+
"description": "The associated host, normalized to lower case and encoded as ASCII."
|
|
9139
|
+
},
|
|
9140
|
+
"cookieStoreId": {
|
|
9141
|
+
"type": "string",
|
|
9142
|
+
"description": "The cookie store ID of the contextual identity the host is associated with."
|
|
9143
|
+
}
|
|
9144
|
+
}
|
|
9276
9145
|
}
|
|
9277
9146
|
],
|
|
9278
9147
|
"functions": [
|
|
@@ -9476,6 +9345,113 @@
|
|
|
9476
9345
|
"description": "The ID of the contextual identity cookie store. "
|
|
9477
9346
|
}
|
|
9478
9347
|
]
|
|
9348
|
+
},
|
|
9349
|
+
{
|
|
9350
|
+
"name": "setSiteAssociation",
|
|
9351
|
+
"type": "function",
|
|
9352
|
+
"description": "Associates a site with a container. Top-level navigations to that site will load in the given container.",
|
|
9353
|
+
"async": true,
|
|
9354
|
+
"parameters": [
|
|
9355
|
+
{
|
|
9356
|
+
"type": "object",
|
|
9357
|
+
"name": "details",
|
|
9358
|
+
"description": "Details about the site association.",
|
|
9359
|
+
"properties": {
|
|
9360
|
+
"site": {
|
|
9361
|
+
"type": "string",
|
|
9362
|
+
"description": "The host to associate with the container (matched as an exact host)."
|
|
9363
|
+
},
|
|
9364
|
+
"cookieStoreId": {
|
|
9365
|
+
"type": "string",
|
|
9366
|
+
"description": "The cookie store ID of the container to associate the site with."
|
|
9367
|
+
}
|
|
9368
|
+
}
|
|
9369
|
+
}
|
|
9370
|
+
]
|
|
9371
|
+
},
|
|
9372
|
+
{
|
|
9373
|
+
"name": "removeSiteAssociation",
|
|
9374
|
+
"type": "function",
|
|
9375
|
+
"description": "Removes the container association for a site.",
|
|
9376
|
+
"async": true,
|
|
9377
|
+
"parameters": [
|
|
9378
|
+
{
|
|
9379
|
+
"type": "object",
|
|
9380
|
+
"name": "details",
|
|
9381
|
+
"description": "Details about the site association to remove.",
|
|
9382
|
+
"properties": {
|
|
9383
|
+
"site": {
|
|
9384
|
+
"type": "string",
|
|
9385
|
+
"description": "The host whose container association should be removed."
|
|
9386
|
+
}
|
|
9387
|
+
}
|
|
9388
|
+
}
|
|
9389
|
+
]
|
|
9390
|
+
},
|
|
9391
|
+
{
|
|
9392
|
+
"name": "getSiteAssociation",
|
|
9393
|
+
"type": "function",
|
|
9394
|
+
"description": "Retrieves the association of a site, or null if the site is not associated with any container.",
|
|
9395
|
+
"async": "callback",
|
|
9396
|
+
"parameters": [
|
|
9397
|
+
{
|
|
9398
|
+
"type": "object",
|
|
9399
|
+
"name": "details",
|
|
9400
|
+
"description": "Details about the site to look up.",
|
|
9401
|
+
"properties": {
|
|
9402
|
+
"site": {
|
|
9403
|
+
"type": "string",
|
|
9404
|
+
"description": "The host to look up."
|
|
9405
|
+
}
|
|
9406
|
+
}
|
|
9407
|
+
},
|
|
9408
|
+
{
|
|
9409
|
+
"type": "function",
|
|
9410
|
+
"name": "callback",
|
|
9411
|
+
"parameters": [
|
|
9412
|
+
{
|
|
9413
|
+
"name": "association",
|
|
9414
|
+
"$ref": "SiteAssociation",
|
|
9415
|
+
"optional": true,
|
|
9416
|
+
"description": "The association of the site, null if the site is not associated with any container."
|
|
9417
|
+
}
|
|
9418
|
+
]
|
|
9419
|
+
}
|
|
9420
|
+
]
|
|
9421
|
+
},
|
|
9422
|
+
{
|
|
9423
|
+
"name": "querySiteAssociations",
|
|
9424
|
+
"type": "function",
|
|
9425
|
+
"description": "Retrieves the list of site-to-container associations.",
|
|
9426
|
+
"async": "callback",
|
|
9427
|
+
"parameters": [
|
|
9428
|
+
{
|
|
9429
|
+
"type": "object",
|
|
9430
|
+
"name": "details",
|
|
9431
|
+
"description": "Information to filter the associations being retrieved.",
|
|
9432
|
+
"properties": {
|
|
9433
|
+
"cookieStoreId": {
|
|
9434
|
+
"type": "string",
|
|
9435
|
+
"optional": true,
|
|
9436
|
+
"description": "If provided, only associations for this container are returned."
|
|
9437
|
+
}
|
|
9438
|
+
}
|
|
9439
|
+
},
|
|
9440
|
+
{
|
|
9441
|
+
"type": "function",
|
|
9442
|
+
"name": "callback",
|
|
9443
|
+
"parameters": [
|
|
9444
|
+
{
|
|
9445
|
+
"name": "associations",
|
|
9446
|
+
"type": "array",
|
|
9447
|
+
"items": {
|
|
9448
|
+
"$ref": "SiteAssociation"
|
|
9449
|
+
},
|
|
9450
|
+
"description": "The site-to-container associations."
|
|
9451
|
+
}
|
|
9452
|
+
]
|
|
9453
|
+
}
|
|
9454
|
+
]
|
|
9479
9455
|
}
|
|
9480
9456
|
],
|
|
9481
9457
|
"events": [
|
|
@@ -9529,6 +9505,28 @@
|
|
|
9529
9505
|
}
|
|
9530
9506
|
}
|
|
9531
9507
|
]
|
|
9508
|
+
},
|
|
9509
|
+
{
|
|
9510
|
+
"name": "onSiteAssociationChanged",
|
|
9511
|
+
"type": "function",
|
|
9512
|
+
"description": "Fired when a site-to-container association is added, changed, or removed.",
|
|
9513
|
+
"parameters": [
|
|
9514
|
+
{
|
|
9515
|
+
"type": "object",
|
|
9516
|
+
"name": "changeInfo",
|
|
9517
|
+
"properties": {
|
|
9518
|
+
"site": {
|
|
9519
|
+
"type": "string",
|
|
9520
|
+
"description": "The host whose association changed."
|
|
9521
|
+
},
|
|
9522
|
+
"cookieStoreId": {
|
|
9523
|
+
"type": "string",
|
|
9524
|
+
"optional": true,
|
|
9525
|
+
"description": "The cookie store ID of the now-associated container, or omitted if the association was removed."
|
|
9526
|
+
}
|
|
9527
|
+
}
|
|
9528
|
+
}
|
|
9529
|
+
]
|
|
9532
9530
|
}
|
|
9533
9531
|
]
|
|
9534
9532
|
}
|
|
@@ -17118,6 +17116,20 @@
|
|
|
17118
17116
|
"description": "The manifest details."
|
|
17119
17117
|
}
|
|
17120
17118
|
},
|
|
17119
|
+
{
|
|
17120
|
+
"name": "getVersion",
|
|
17121
|
+
"allowedContexts": [
|
|
17122
|
+
"content",
|
|
17123
|
+
"devtools"
|
|
17124
|
+
],
|
|
17125
|
+
"description": "Returns the extension version as declared in the manifest.",
|
|
17126
|
+
"type": "function",
|
|
17127
|
+
"parameters": [],
|
|
17128
|
+
"returns": {
|
|
17129
|
+
"type": "string",
|
|
17130
|
+
"description": "The extension version."
|
|
17131
|
+
}
|
|
17132
|
+
},
|
|
17121
17133
|
{
|
|
17122
17134
|
"name": "getURL",
|
|
17123
17135
|
"type": "function",
|
|
@@ -19578,6 +19590,15 @@
|
|
|
19578
19590
|
"type": "object",
|
|
19579
19591
|
"optional": true,
|
|
19580
19592
|
"properties": {
|
|
19593
|
+
"backgrounds_area": {
|
|
19594
|
+
"type": "string",
|
|
19595
|
+
"enum": [
|
|
19596
|
+
"auto",
|
|
19597
|
+
"window",
|
|
19598
|
+
"top_toolbars"
|
|
19599
|
+
],
|
|
19600
|
+
"optional": true
|
|
19601
|
+
},
|
|
19581
19602
|
"additional_backgrounds_alignment": {
|
|
19582
19603
|
"type": "array",
|
|
19583
19604
|
"items": {
|
|
@@ -2054,6 +2054,20 @@
|
|
|
2054
2054
|
"description": "The manifest details."
|
|
2055
2055
|
}
|
|
2056
2056
|
},
|
|
2057
|
+
{
|
|
2058
|
+
"name": "getVersion",
|
|
2059
|
+
"allowedContexts": [
|
|
2060
|
+
"content",
|
|
2061
|
+
"devtools"
|
|
2062
|
+
],
|
|
2063
|
+
"description": "Returns the extension version as declared in the manifest.",
|
|
2064
|
+
"type": "function",
|
|
2065
|
+
"parameters": [],
|
|
2066
|
+
"returns": {
|
|
2067
|
+
"type": "string",
|
|
2068
|
+
"description": "The extension version."
|
|
2069
|
+
}
|
|
2070
|
+
},
|
|
2057
2071
|
{
|
|
2058
2072
|
"name": "getURL",
|
|
2059
2073
|
"type": "function",
|
|
@@ -15013,8 +15027,8 @@
|
|
|
15013
15027
|
{
|
|
15014
15028
|
"type": "string",
|
|
15015
15029
|
"name": "key",
|
|
15016
|
-
"description": "Unique tag identifier (will be converted to lower case). Must
|
|
15017
|
-
"pattern": "^[^
|
|
15030
|
+
"description": "Unique tag identifier (will be converted to lower case). Must be an ASCII string that is safe to use as an IMAP keyword.",
|
|
15031
|
+
"pattern": "^[!#$&'+,\\-.0-9:=?@A-Z^_`a-z|~]+$"
|
|
15018
15032
|
},
|
|
15019
15033
|
{
|
|
15020
15034
|
"type": "string",
|
|
@@ -15280,8 +15294,8 @@
|
|
|
15280
15294
|
"type": "string",
|
|
15281
15295
|
"name": "key",
|
|
15282
15296
|
"optional": true,
|
|
15283
|
-
"description": "Unique tag identifier (will be converted to lower case). Must
|
|
15284
|
-
"pattern": "^[^
|
|
15297
|
+
"description": "Unique tag identifier (will be converted to lower case). Must be an ASCII string that is safe to use as an IMAP keyword. Will be auto-generated if not provided.",
|
|
15298
|
+
"pattern": "^[!#$&'+,\\-.0-9:=?@A-Z^_`a-z|~]+$"
|
|
15285
15299
|
},
|
|
15286
15300
|
{
|
|
15287
15301
|
"type": "string",
|
|
@@ -15708,13 +15722,22 @@
|
|
|
15708
15722
|
"optional": true
|
|
15709
15723
|
},
|
|
15710
15724
|
"hostnames": {
|
|
15711
|
-
"description": "One or more hostnames
|
|
15725
|
+
"description": "One or more server hostnames that use this OAuth provider. Include any service or autodiscovery hostnames that may initiate OAuth authentication. For example, to override many Microsoft configurations, both of these would be needed - [\"office365.com\", \"outlook.com\"]",
|
|
15712
15726
|
"type": "array",
|
|
15713
15727
|
"items": {
|
|
15714
15728
|
"type": "string"
|
|
15715
15729
|
},
|
|
15716
15730
|
"minItems": 1
|
|
15717
15731
|
},
|
|
15732
|
+
"emailDomains": {
|
|
15733
|
+
"description": "Email domains for which this OAuth provider should be used. If omitted, the provider applies to all domains in use with a given hostname",
|
|
15734
|
+
"type": "array",
|
|
15735
|
+
"items": {
|
|
15736
|
+
"type": "string"
|
|
15737
|
+
},
|
|
15738
|
+
"minItems": 1,
|
|
15739
|
+
"optional": true
|
|
15740
|
+
},
|
|
15718
15741
|
"scopes": {
|
|
15719
15742
|
"description": "The scopes to request when using this OAuth provider.",
|
|
15720
15743
|
"type": "string"
|