webext-schema 7.0.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/.github/workflows/node.js.yml +2 -2
- package/.prettierignore +8 -0
- package/README.md +37 -6
- package/SECURITY.md +30 -0
- package/eslint.config.mjs +27 -19
- package/index.js +9 -3
- package/modules/browser.js +81 -25
- 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 +25 -24
- package/prettier.config.mjs +14 -0
- package/schemas/beta/webext.json +902 -204
- package/schemas/central/webext.json +902 -204
- package/schemas/mail/mailext.json +552 -17
- package/test/browser.test.js +1045 -495
- 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 +55 -1
- package/test/schema.test.js +839 -430
- package/test/update.test.js +872 -511
- package/types/index.d.ts +8 -1
- package/types/modules/browser.d.ts +61 -61
- package/types/modules/commander.d.ts +3 -3
- package/types/modules/common.d.ts +7 -7
- package/types/modules/constant.d.ts +3 -3
- package/types/modules/file-util.d.ts +16 -16
- package/types/modules/schema.d.ts +6 -6
- package/types/modules/update.d.ts +10 -10
package/types/index.d.ts
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
-
export
|
|
1
|
+
export declare const isPermissionGranted: (perm: object) => Promise<boolean>;
|
|
2
|
+
export declare const createBookmark: (opt: object) => Promise<object>;
|
|
3
|
+
export declare const getBookmarkTreeNode: (id?: string | any[]) => Promise<Array<object> | null>;
|
|
4
|
+
export declare const getCloseTabsByDoubleClickValue: () => Promise<object>;
|
|
5
|
+
export declare const setContextMenuOnMouseup: () => Promise<boolean>;
|
|
6
|
+
export declare const clearContextMenuOnMouseup: () => Promise<boolean>;
|
|
7
|
+
export declare const getNewTabPositionValue: () => Promise<object>;
|
|
8
|
+
export declare const isCommandCustomizable: () => Promise<boolean>;
|
|
9
|
+
export declare const updateCommand: (id: string, value?: string) => Promise<void | null>;
|
|
10
|
+
export declare const getAllContextualIdentities: () => Promise<Array<object> | null>;
|
|
11
|
+
export declare const getContextualId: (cookieStoreId: string) => Promise<object>;
|
|
12
|
+
export declare const getEnabledTheme: () => Promise<Array<object> | null>;
|
|
13
|
+
export declare const getExtensionInfo: (id: string) => Promise<object>;
|
|
14
|
+
export declare const getExternalExtensions: () => Promise<Array<object> | null>;
|
|
15
|
+
export declare const clearNotification: (id: string) => Promise<boolean | null>;
|
|
16
|
+
export declare const createNotification: (id: string, opt: object) => Promise<string | null>;
|
|
17
|
+
export declare const removePermission: (perm: string | any[]) => Promise<boolean>;
|
|
18
|
+
export declare const requestPermission: (perm: string | any[]) => Promise<boolean>;
|
|
19
|
+
export declare const getManifestIcons: () => object | string;
|
|
20
|
+
export declare const getManifestVersion: () => number;
|
|
21
|
+
export declare const getOs: () => Promise<string>;
|
|
22
|
+
export declare const makeConnection: (id?: number | string, info?: object | boolean) => Promise<object>;
|
|
23
|
+
export declare const sendMessage: (id: number | string, msg: string | any[] | object, opt: object) => Promise<object>;
|
|
24
|
+
export declare const isScriptingAvailable: () => Promise<boolean>;
|
|
25
|
+
export declare const executeScriptToTab: (opt?: object) => Promise<Array<object> | null>;
|
|
26
|
+
export declare const searchInNewTab: (text: string, opt: object) => Promise<object>;
|
|
27
|
+
export declare const searchWithSearchEngine: (query: string, opt?: object) => Promise<void>;
|
|
28
|
+
export declare const getRecentlyClosedTab: (windowId?: number) => Promise<object>;
|
|
29
|
+
export declare const getSessionWindowValue: (key: string, windowId?: number) => Promise<string | null>;
|
|
30
|
+
export declare const restoreSession: (sessionId: string) => Promise<object>;
|
|
31
|
+
export declare const setSessionWindowValue: (key: string, value: string | object, windowId?: number) => Promise<void>;
|
|
32
|
+
export declare const clearStorage: (area?: string) => Promise<void>;
|
|
33
|
+
export declare const getAllStorage: (area?: string) => Promise<object>;
|
|
34
|
+
export declare const getStorage: (key: string | any[] | object, area?: string) => Promise<object>;
|
|
35
|
+
export declare const removeStorage: (key: string | any[] | object, area?: string) => Promise<void>;
|
|
36
|
+
export declare const setStorage: (obj: object, area?: string) => Promise<void>;
|
|
37
|
+
export declare const createTab: (opt?: object) => Promise<object>;
|
|
38
|
+
export declare const duplicateTab: (tabId: number, opt: object) => Promise<object>;
|
|
39
|
+
export declare const queryTabs: (opt: object) => Promise<Array<object>>;
|
|
40
|
+
export declare const execScriptToTab: (tabId: number | object, opt?: object) => Promise<(any[] | null) | boolean>;
|
|
41
|
+
export declare const execScriptToTabs: (opt?: object) => Promise<any[]>;
|
|
42
|
+
export declare const execScriptsToTabInOrder: (tabId: number | any[], opts?: any[]) => Promise<(any[] | null) | boolean>;
|
|
43
|
+
export declare const getActiveTab: (windowId?: number) => Promise<object>;
|
|
44
|
+
export declare const getActiveTabId: (windowId?: number) => Promise<number | null>;
|
|
45
|
+
export declare const getAllTabsInWindow: (windowId?: number) => Promise<Array<object>>;
|
|
46
|
+
export declare const getHighlightedTab: (windowId?: number) => Promise<Array<object>>;
|
|
47
|
+
export declare const getTab: (tabId: number) => Promise<object>;
|
|
48
|
+
export declare const highlightTab: (index: number | any[], windowId?: number) => Promise<object>;
|
|
49
|
+
export declare const moveTab: (tabId: number | any[], opt?: object) => Promise<Array<object> | null>;
|
|
50
|
+
export declare const reloadTab: (tabId: number, opt: object) => Promise<void>;
|
|
51
|
+
export declare const removeTab: (arg: number | any[]) => Promise<void>;
|
|
52
|
+
export declare const updateTab: (tabId: number, opt: object) => Promise<object>;
|
|
53
|
+
export declare const warmupTab: (tabId: number) => Promise<void>;
|
|
54
|
+
export declare const captureVisibleTab: (windowId: number, opt: object) => Promise<string | null>;
|
|
55
|
+
export declare const isTab: (tabId: number) => Promise<boolean>;
|
|
56
|
+
export declare const getCurrentTheme: (windowId?: number) => Promise<object>;
|
|
57
|
+
export declare const createNewWindow: (opt: object) => Promise<object>;
|
|
58
|
+
export declare const getAllNormalWindows: (populate?: boolean) => Promise<Array<object>>;
|
|
59
|
+
export declare const getCurrentWindow: (opt: object) => Promise<object>;
|
|
60
|
+
export declare const getWindow: (windowId: number, opt: object) => Promise<object>;
|
|
61
|
+
export declare const checkIncognitoWindowExists: () => Promise<boolean>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function cleanDirectory(cmdOpts?: object): void;
|
|
2
|
-
export function parseCommand(args: any[]): void;
|
|
3
|
-
export { commander };
|
|
4
1
|
import { program as commander } from 'commander';
|
|
2
|
+
export declare const cleanDirectory: (cmdOpts?: object) => void;
|
|
3
|
+
export declare const parseCommand: (args: any[]) => void;
|
|
4
|
+
export { commander };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export declare const throwErr: (e: object) => never;
|
|
2
|
+
export declare const logErr: (e: object) => boolean;
|
|
3
|
+
export declare const logWarn: (msg: string | object) => boolean;
|
|
4
|
+
export declare const logMsg: (msg: string | object) => string | object;
|
|
5
|
+
export declare const getType: (o: object) => string;
|
|
6
|
+
export declare const isObjectNotEmpty: (o: object) => boolean;
|
|
7
|
+
export declare const isString: (o: object) => boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const CHAR
|
|
2
|
-
export const INDENT
|
|
3
|
-
export const IS_WIN: boolean;
|
|
1
|
+
export declare const CHAR = "utf8";
|
|
2
|
+
export declare const INDENT = 2;
|
|
3
|
+
export declare const IS_WIN: boolean;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
1
|
+
export declare const convertUriToFilePath: (uri: string) => string | null;
|
|
2
|
+
export declare const getAbsPath: (file: string) => string | null;
|
|
3
|
+
export declare const getStat: (file: string) => object;
|
|
4
|
+
export declare const isDir: (dir: string) => boolean;
|
|
5
|
+
export declare const isSubDir: (dir: string, baseDir: string) => boolean;
|
|
6
|
+
export declare const isFile: (file: string) => boolean;
|
|
7
|
+
export declare const isExecutable: (file: string, mask?: number) => boolean;
|
|
8
|
+
export declare const getFileTimestamp: (file: string) => number;
|
|
9
|
+
export declare const getFileNameFromFilePath: (file: string, subst?: string) => string;
|
|
10
|
+
export declare const removeDir: (dir: string, baseDir: string) => void;
|
|
11
|
+
export declare const removeDirectory: (dir: string, baseDir: string) => Promise<void>;
|
|
12
|
+
export declare const createDirectory: (dir: string, mode?: number) => Promise<string>;
|
|
13
|
+
export declare const createFile: (file: string, value: string | Buffer | Uint8Array, opt?: {
|
|
14
14
|
encoding?: string;
|
|
15
15
|
flag?: string;
|
|
16
16
|
mode?: number | string;
|
|
17
|
-
})
|
|
18
|
-
export
|
|
17
|
+
}) => Promise<string>;
|
|
18
|
+
export declare const readFile: (file: string, opt?: {
|
|
19
19
|
encoding?: string;
|
|
20
20
|
flag?: string;
|
|
21
|
-
})
|
|
21
|
+
}) => Promise<string | Buffer>;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
export declare class Schema {
|
|
3
|
+
#private;
|
|
3
4
|
_sandbox: sinon.SinonSandbox;
|
|
4
5
|
_importMap: Map<any, any>;
|
|
5
6
|
_refMap: Map<any, any>;
|
|
6
7
|
_browser: {
|
|
7
8
|
_sandbox: sinon.SinonSandbox;
|
|
8
|
-
};
|
|
9
|
+
} | null;
|
|
9
10
|
_schema: any;
|
|
10
|
-
|
|
11
|
+
constructor(...args?: (string | object)[]);
|
|
11
12
|
get channel(): any;
|
|
13
|
+
set channel(ch: any);
|
|
12
14
|
private _getTargetFromNamespace;
|
|
13
15
|
private _assignImportMap;
|
|
14
16
|
private _assignRefMap;
|
|
@@ -21,6 +23,4 @@ export class Schema {
|
|
|
21
23
|
getAll(): object;
|
|
22
24
|
list(): Array<string>;
|
|
23
25
|
mock(): object;
|
|
24
|
-
#private;
|
|
25
26
|
}
|
|
26
|
-
import sinon from 'sinon';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
1
|
+
export declare const fetchText: (url: string) => Promise<string>;
|
|
2
|
+
export declare const getChannelUrl: (channel: string) => string;
|
|
3
|
+
export declare const getSchemaData: (file: string, baseUrl: string) => Promise<object>;
|
|
4
|
+
export declare const getFileList: (baseUrl: string) => Promise<Array<string>>;
|
|
5
|
+
export declare const getAllSchemaData: (baseUrl: string, info: boolean) => Promise<Array<object>>;
|
|
6
|
+
export declare const getListedSchemaData: (baseUrl: string, arr: any[], info: boolean) => Promise<Array<object>>;
|
|
7
|
+
export declare const getMailExtSchemaData: (baseUrl: string, info: boolean) => Promise<Array<object>>;
|
|
8
|
+
export declare const createUnifiedSchema: (channel: string, info: boolean) => Promise<object>;
|
|
9
|
+
export declare const saveSchemaFile: (channel: string, info: boolean) => Promise<string>;
|
|
10
|
+
export declare const updateSchemas: (cmdOpts?: object) => Promise<void>;
|