webext-schema 5.1.6 → 5.1.8
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 +2 -2
- package/modules/file-util.js +1 -1
- package/modules/schema.js +2 -2
- package/modules/update.js +1 -1
- package/package.json +3 -2
- package/types/modules/browser.d.ts +1 -1
package/modules/browser.js
CHANGED
|
@@ -41,7 +41,7 @@ export const createBookmark = async opt => {
|
|
|
41
41
|
/**
|
|
42
42
|
* get bookmark tree node
|
|
43
43
|
*
|
|
44
|
-
* @param {string|Array} id - bookmark ID or array of bookmark IDs
|
|
44
|
+
* @param {string|Array} [id] - bookmark ID or array of bookmark IDs
|
|
45
45
|
* @returns {Promise.<?Array>} - array of bookmarks.BookmarkTreeNode
|
|
46
46
|
*/
|
|
47
47
|
export const getBookmarkTreeNode = async id => {
|
|
@@ -178,7 +178,7 @@ export const updateCommand = async (id, value = '') => {
|
|
|
178
178
|
value.trim().replace(/\+([a-z])$/, (m, c) => `+${c.toUpperCase()}`);
|
|
179
179
|
if (shortcut === '') {
|
|
180
180
|
func = commands.reset(id);
|
|
181
|
-
} else if (/^(?:(?:
|
|
181
|
+
} else if (/^(?:(?:Alt|Command|(?:Mac)?Ctrl)(?:\+Shift)?|Alt\+(?:Command|(?:Mac)?Ctrl)|Command\+(?:Alt|MacCtrl)|Ctrl\+(?:Alt|MacCtrl)|MacCtrl\+(?:Alt|Command|Ctrl))\+[\dA-Z]|F[1-9]|Media(?:(?:Next|Prev)Track|PlayPause|Stop)$/.test(shortcut)) {
|
|
182
182
|
func = commands.update({
|
|
183
183
|
shortcut,
|
|
184
184
|
name: id
|
package/modules/file-util.js
CHANGED
|
@@ -128,7 +128,7 @@ export const getFileTimestamp = file => {
|
|
|
128
128
|
export const getFileNameFromFilePath = (file, subst = SUBST) => {
|
|
129
129
|
let name;
|
|
130
130
|
if (isString(file) && isFile(file) &&
|
|
131
|
-
/^
|
|
131
|
+
/^[^.]+(?:\..+)?$/.test(path.basename(file))) {
|
|
132
132
|
[, name] = /^([^.]+)(?:\..+)?$/.exec(path.basename(file));
|
|
133
133
|
}
|
|
134
134
|
return name || subst;
|
package/modules/schema.js
CHANGED
|
@@ -28,7 +28,7 @@ export class Schema {
|
|
|
28
28
|
constructor(...args) {
|
|
29
29
|
const [arg1, arg2] = args;
|
|
30
30
|
this.#channel =
|
|
31
|
-
isString(arg1) && /(?:
|
|
31
|
+
isString(arg1) && /(?:centra|mai)l|beta|esr|release/.test(arg1)
|
|
32
32
|
? arg1
|
|
33
33
|
: 'beta';
|
|
34
34
|
this._sandbox =
|
|
@@ -47,7 +47,7 @@ export class Schema {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
set channel(ch) {
|
|
50
|
-
if (isString(ch) && /(?:
|
|
50
|
+
if (isString(ch) && /(?:centra|mai)l|beta|esr|release/.test(ch)) {
|
|
51
51
|
this.#channel = ch;
|
|
52
52
|
}
|
|
53
53
|
}
|
package/modules/update.js
CHANGED
|
@@ -96,7 +96,7 @@ export const getFileList = async baseUrl => {
|
|
|
96
96
|
const { href } = new URL('jar.mn', baseUrl);
|
|
97
97
|
const text = await fetchText(href);
|
|
98
98
|
const reg =
|
|
99
|
-
/content\/(?:(?:brows|messeng)er|extensions)\/schemas\/(
|
|
99
|
+
/content\/(?:(?:brows|messeng)er|extensions)\/schemas\/(\w+\.json)/;
|
|
100
100
|
const items = text.split('\n');
|
|
101
101
|
const arr = [];
|
|
102
102
|
for (const item of items) {
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"types": "types/index.d.ts",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@types/firefox-webext-browser": "^109.0.0",
|
|
17
|
-
"@types/node": "^18.14.
|
|
17
|
+
"@types/node": "^18.14.2",
|
|
18
18
|
"@types/sinon": "^10.0.13",
|
|
19
19
|
"camelize": "^1.0.1",
|
|
20
20
|
"commander": "^10.0.0",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"eslint-plugin-jsdoc": "^40.0.0",
|
|
32
32
|
"eslint-plugin-node": "^11.1.0",
|
|
33
33
|
"eslint-plugin-promise": "^6.1.1",
|
|
34
|
+
"eslint-plugin-regexp": "^1.12.0",
|
|
34
35
|
"eslint-plugin-unicorn": "^45.0.2",
|
|
35
36
|
"mocha": "^10.2.0",
|
|
36
37
|
"npm-run-all": "^4.1.5",
|
|
@@ -55,5 +56,5 @@
|
|
|
55
56
|
"update-mail": "node index update --channel=mail -i",
|
|
56
57
|
"update-release": "node index update --channel=release -i"
|
|
57
58
|
},
|
|
58
|
-
"version": "5.1.
|
|
59
|
+
"version": "5.1.8"
|
|
59
60
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function isPermissionGranted(perm: object): Promise<boolean>;
|
|
2
2
|
export function createBookmark(opt: object): Promise<object>;
|
|
3
|
-
export function getBookmarkTreeNode(id
|
|
3
|
+
export function getBookmarkTreeNode(id?: string | any[]): Promise<any[] | null>;
|
|
4
4
|
export function getCloseTabsByDoubleClickValue(): Promise<object>;
|
|
5
5
|
export function setContextMenuOnMouseup(): Promise<boolean>;
|
|
6
6
|
export function clearContextMenuOnMouseup(): Promise<boolean>;
|