webext-schema 5.5.5 → 5.6.0
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/update.js +32 -20
- package/package.json +21 -21
- package/schemas/beta/webext.json +482 -1
- package/schemas/central/webext.json +495 -4
- package/schemas/esr/webext.json +341 -497
- package/schemas/mail/mailext.json +103 -1
- package/schemas/release/webext.json +114 -3
- package/types/modules/update.d.ts +1 -1
package/modules/update.js
CHANGED
|
@@ -14,7 +14,7 @@ import { createFile } from './file-util.js';
|
|
|
14
14
|
import { CHAR, INDENT } from './constant.js';
|
|
15
15
|
const DIR_CWD = process.cwd();
|
|
16
16
|
const PERM_FILE = 0o644;
|
|
17
|
-
export const ESR_VER =
|
|
17
|
+
export const ESR_VER = 115;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* fetch text
|
|
@@ -116,8 +116,8 @@ export const getAllSchemaData = async (baseUrl, info) => {
|
|
|
116
116
|
if (!isString(baseUrl)) {
|
|
117
117
|
throw new TypeError(`Expected String but got ${getType(baseUrl)}.`);
|
|
118
118
|
}
|
|
119
|
-
const schemas = [];
|
|
120
119
|
const items = await getFileList(baseUrl);
|
|
120
|
+
const schemas = [];
|
|
121
121
|
for (const item of items) {
|
|
122
122
|
if (info) {
|
|
123
123
|
console.info(`Fetching ${item}`);
|
|
@@ -191,35 +191,47 @@ export const getMailExtSchemaData = async (baseUrl, info) => {
|
|
|
191
191
|
export const createUnifiedSchema = async (channel, info) => {
|
|
192
192
|
const channelUrl = getChannelUrl(channel);
|
|
193
193
|
const schema = {};
|
|
194
|
-
let arr;
|
|
195
194
|
if (channel === 'mail') {
|
|
196
195
|
const browserItems = [
|
|
197
196
|
'commands.json',
|
|
198
197
|
'pkcs11.json'
|
|
199
198
|
];
|
|
199
|
+
const browserUrl =
|
|
200
|
+
`${getChannelUrl('central')}browser/components/extensions/schemas/`;
|
|
201
|
+
const browserSchemas =
|
|
202
|
+
await getListedSchemaData(browserUrl, browserItems, info);
|
|
203
|
+
for (const item of browserSchemas) {
|
|
204
|
+
const { file, schema: itemSchema } = item;
|
|
205
|
+
schema[file] = itemSchema;
|
|
206
|
+
}
|
|
200
207
|
const toolkitItems = [
|
|
201
208
|
'content_scripts.json', 'experiments.json', 'extension.json', 'i18n.json',
|
|
202
209
|
'management.json', 'permissions.json', 'runtime.json', 'theme.json'
|
|
203
210
|
];
|
|
204
|
-
const
|
|
205
|
-
`${getChannelUrl('central')}browser/components/extensions/schemas/`;
|
|
206
|
-
const toolkitBaseUrl =
|
|
211
|
+
const toolkitUrl =
|
|
207
212
|
`${getChannelUrl('central')}toolkit/components/extensions/schemas/`;
|
|
208
|
-
|
|
209
|
-
getListedSchemaData(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
+
const toolkitSchemas =
|
|
214
|
+
await getListedSchemaData(toolkitUrl, toolkitItems, info);
|
|
215
|
+
for (const item of toolkitSchemas) {
|
|
216
|
+
const { file, schema: itemSchema } = item;
|
|
217
|
+
schema[file] = itemSchema;
|
|
218
|
+
}
|
|
219
|
+
const mailUrl = `${channelUrl}mail/components/extensions/`;
|
|
220
|
+
const mailSchemas = await getMailExtSchemaData(mailUrl, info);
|
|
221
|
+
for (const item of mailSchemas) {
|
|
222
|
+
const { file, schema: itemSchema } = item;
|
|
223
|
+
schema[file] = itemSchema;
|
|
224
|
+
}
|
|
213
225
|
} else {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
for (const item of
|
|
226
|
+
const browserUrl = `${channelUrl}browser/components/extensions/schemas/`;
|
|
227
|
+
const browserSchemas = await getAllSchemaData(browserUrl, info);
|
|
228
|
+
for (const item of browserSchemas) {
|
|
229
|
+
const { file, schema: itemSchema } = item;
|
|
230
|
+
schema[file] = itemSchema;
|
|
231
|
+
}
|
|
232
|
+
const toolkitUrl = `${channelUrl}toolkit/components/extensions/schemas/`;
|
|
233
|
+
const toolkitSchemas = await getAllSchemaData(toolkitUrl, info);
|
|
234
|
+
for (const item of toolkitSchemas) {
|
|
223
235
|
const { file, schema: itemSchema } = item;
|
|
224
236
|
schema[file] = itemSchema;
|
|
225
237
|
}
|
package/package.json
CHANGED
|
@@ -19,44 +19,44 @@
|
|
|
19
19
|
"types": "types/index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"camelize": "^1.0.1",
|
|
22
|
-
"commander": "^
|
|
22
|
+
"commander": "^14.0.0",
|
|
23
23
|
"decamelize": "^6.0.0",
|
|
24
24
|
"json5": "^2.2.3",
|
|
25
25
|
"sinon": "^20.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/firefox-webext-browser": "^120.0.4",
|
|
29
|
-
"@types/node": "^22.
|
|
29
|
+
"@types/node": "^22.15.21",
|
|
30
30
|
"@types/sinon": "^17.0.4",
|
|
31
31
|
"c8": "^10.1.3",
|
|
32
|
-
"eslint": "^9.
|
|
33
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
32
|
+
"eslint": "^9.27.0",
|
|
33
|
+
"eslint-plugin-jsdoc": "^50.6.17",
|
|
34
34
|
"eslint-plugin-regexp": "^2.7.0",
|
|
35
|
-
"eslint-plugin-unicorn": "^
|
|
36
|
-
"globals": "^16.
|
|
37
|
-
"mocha": "^11.
|
|
35
|
+
"eslint-plugin-unicorn": "^59.0.1",
|
|
36
|
+
"globals": "^16.2.0",
|
|
37
|
+
"mocha": "^11.5.0",
|
|
38
38
|
"neostandard": "^0.12.1",
|
|
39
|
-
"npm-run-all2": "^
|
|
39
|
+
"npm-run-all2": "^8.0.4",
|
|
40
40
|
"typescript": "^5.8.3",
|
|
41
|
-
"undici": "^7.
|
|
41
|
+
"undici": "^7.10.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "npm run tsc && npm run lint && npm run test",
|
|
45
45
|
"lint": "eslint . --fix",
|
|
46
46
|
"start": "node index",
|
|
47
|
-
"test": "npm run test
|
|
48
|
-
"test
|
|
49
|
-
"test
|
|
50
|
-
"test
|
|
51
|
-
"test
|
|
52
|
-
"
|
|
47
|
+
"test": "npm run test:central",
|
|
48
|
+
"test:beta": "c8 mocha --require=test/mocha/setup.js --channel=beta --exit test/*.test.js",
|
|
49
|
+
"test:central": "c8 mocha --require=test/mocha/setup.js --channel=central --exit test/*.test.js",
|
|
50
|
+
"test:esr": "c8 mocha --require=test/mocha/setup.js --channel=esr --exit test/*.test.js",
|
|
51
|
+
"test:release": "c8 mocha --require=test/mocha/setup.js --channel=release --exit test/*.test.js",
|
|
52
|
+
"testall": "npm-run-all -s test:*",
|
|
53
53
|
"tsc": "node index clean --dir=types -i && npx tsc",
|
|
54
54
|
"update": "node index update -i",
|
|
55
|
-
"update
|
|
56
|
-
"update
|
|
57
|
-
"update
|
|
58
|
-
"update
|
|
59
|
-
"update
|
|
55
|
+
"update:beta": "node index update --channel=beta -i",
|
|
56
|
+
"update:central": "node index update --channel=central -i",
|
|
57
|
+
"update:esr": "node index update --channel=esr -i",
|
|
58
|
+
"update:mail": "node index update --channel=mail -i",
|
|
59
|
+
"update:release": "node index update --channel=release -i"
|
|
60
60
|
},
|
|
61
|
-
"version": "5.
|
|
61
|
+
"version": "5.6.0"
|
|
62
62
|
}
|