From 04dd99a5e2f2d0a0c1cd8eefd24b0b41e687fc4b Mon Sep 17 00:00:00 2001 From: Luca Greco Date: Mon, 27 Feb 2023 17:54:13 +0100 Subject: [PATCH] feat: Imported Firefox 111.0b7 API schema (#4733) --- .../imported/declarative_net_request.json | 30 ++++++++- src/schema/imported/find.json | 4 ++ src/schema/imported/geckoProfiler.json | 1 - src/schema/imported/manifest.json | 10 --- src/schema/imported/search.json | 62 ++++++++++++++++++- 5 files changed, 94 insertions(+), 13 deletions(-) diff --git a/src/schema/imported/declarative_net_request.json b/src/schema/imported/declarative_net_request.json index 8d0b96374e8..2b9f8ffd1e1 100644 --- a/src/schema/imported/declarative_net_request.json +++ b/src/schema/imported/declarative_net_request.json @@ -273,6 +273,34 @@ ] } ], + "properties": { + "DYNAMIC_RULESET_ID": { + "type": "string", + "value": "_dynamic", + "description": "Ruleset ID for the dynamic rules added by the extension." + }, + "GUARANTEED_MINIMUM_STATIC_RULES": { + "type": "number", + "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." + }, + "MAX_NUMBER_OF_STATIC_RULESETS": { + "type": "number", + "description": "The maximum number of static Rulesets an extension can specify as part of the rule_resources manifest key." + }, + "MAX_NUMBER_OF_ENABLED_STATIC_RULESETS": { + "type": "number", + "description": "The maximum number of static Rulesets an extension can enable at any one time." + }, + "MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES": { + "type": "number", + "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." + }, + "SESSION_RULESET_ID": { + "type": "string", + "value": "_session", + "description": "Ruleset ID for the session-scoped rules added by the extension." + } + }, "definitions": { "Permission": { "anyOf": [ @@ -514,7 +542,7 @@ }, "isUrlFilterCaseSensitive": { "type": "boolean", - "description": "Whether 'urlFilter' or 'regexFilter' is case-sensitive. Defaults to true." + "description": "Whether 'urlFilter' or 'regexFilter' is case-sensitive." }, "initiatorDomains": { "type": "array", diff --git a/src/schema/imported/find.json b/src/schema/imported/find.json index 729634365e1..7913566a2d8 100644 --- a/src/schema/imported/find.json +++ b/src/schema/imported/find.json @@ -31,6 +31,10 @@ "type": "boolean", "description": "Find only ranges with case sensitive match." }, + "matchDiacritics": { + "type": "boolean", + "description": "Find only ranges with diacritic sensitive match." + }, "entireWord": { "type": "boolean", "description": "Find only ranges that match entire word." diff --git a/src/schema/imported/geckoProfiler.json b/src/schema/imported/geckoProfiler.json index a5999b18a98..63e7e3c9397 100644 --- a/src/schema/imported/geckoProfiler.json +++ b/src/schema/imported/geckoProfiler.json @@ -172,7 +172,6 @@ "stackwalk", "jsallocations", "nostacksampling", - "preferencereads", "nativeallocations", "ipcmessages", "audiocallbacktracing", diff --git a/src/schema/imported/manifest.json b/src/schema/imported/manifest.json index 2b13590ec75..0e400f9e11b 100644 --- a/src/schema/imported/manifest.json +++ b/src/schema/imported/manifest.json @@ -454,11 +454,6 @@ "type": "object", "description": "Represents a WebExtension language pack manifest.json file", "properties": { - "homepage_url": { - "type": "string", - "format": "url", - "preprocess": "localize" - }, "langpack_id": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z-]+$" @@ -540,11 +535,6 @@ "type": "object", "description": "Represents a WebExtension dictionary manifest.json file", "properties": { - "homepage_url": { - "type": "string", - "format": "url", - "preprocess": "localize" - }, "dictionaries": { "type": "object", "patternProperties": { diff --git a/src/schema/imported/search.json b/src/schema/imported/search.json index 6d9b62248d9..f739d9c882d 100644 --- a/src/schema/imported/search.json +++ b/src/schema/imported/search.json @@ -30,9 +30,19 @@ "type": "string", "description": "Search engine to use. Uses the default if not specified." }, + "disposition": { + "allOf": [ + { + "$ref": "#/types/Disposition" + }, + { + "description": "Location where search results should be displayed. NEW_TAB is the default." + } + ] + }, "tabId": { "type": "integer", - "description": "The ID of the tab for the search results. If not specified, a new tab is created." + "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." } }, "required": [ @@ -40,6 +50,47 @@ ] } ] + }, + { + "name": "query", + "type": "function", + "async": "callback", + "description": "Use the chrome.search API to search via the default provider.", + "parameters": [ + { + "type": "object", + "name": "queryInfo", + "properties": { + "text": { + "type": "string", + "description": "String to query with the default search provider." + }, + "disposition": { + "allOf": [ + { + "$ref": "#/types/Disposition" + }, + { + "description": "Location where search results should be displayed. CURRENT_TAB is the default." + } + ] + }, + "tabId": { + "type": "integer", + "description": "Location where search results should be displayed. tabId cannot be used with disposition." + } + }, + "required": [ + "text" + ] + }, + { + "type": "function", + "name": "callback", + "optional": true, + "parameters": [] + } + ] } ], "definitions": { @@ -83,6 +134,15 @@ "name", "isDefault" ] + }, + "Disposition": { + "type": "string", + "description": "Location where search results should be displayed.", + "enum": [ + "CURRENT_TAB", + "NEW_TAB", + "NEW_WINDOW" + ] } } }