extension-develop 3.0.0 → 3.1.0-next.11
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/dist/215.js +546 -0
- package/dist/323.js +425 -0
- package/dist/419.js +44 -0
- package/dist/547.js +8444 -0
- package/dist/552.js +54 -0
- package/dist/928.js +416 -0
- package/dist/add-centralized-logger-script-background.js +3 -3
- package/dist/add-centralized-logger-script-content.js +4 -4
- package/dist/add-centralized-logger-script.js +18 -27
- package/dist/add-hmr-accept-code.js +3 -3
- package/dist/content-script-wrapper.js +82 -23
- package/dist/ensure-hmr-for-scripts.js +3 -3
- package/dist/extension-js-devtools/chrome/background/service_worker.js +1 -1
- package/dist/extension-js-devtools/chrome/devtools/index.js +1 -1
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.js +5 -5
- package/dist/extension-js-devtools/chrome/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chrome/pages/welcome.js +3 -3
- package/dist/extension-js-devtools/chrome/scripts/logger-client.js +1 -1
- package/dist/extension-js-devtools/chromium/background/service_worker.js +1 -1
- package/dist/extension-js-devtools/chromium/devtools/index.js +1 -1
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.js +5 -5
- package/dist/extension-js-devtools/chromium/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chromium/pages/welcome.js +3 -3
- package/dist/extension-js-devtools/chromium/scripts/logger-client.js +1 -1
- package/dist/extension-js-devtools/edge/background/service_worker.js +1 -1
- package/dist/extension-js-devtools/edge/devtools/index.js +1 -1
- package/dist/extension-js-devtools/edge/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/edge/pages/centralized-logger.js +5 -5
- package/dist/extension-js-devtools/edge/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/edge/pages/welcome.js +3 -3
- package/dist/extension-js-devtools/edge/scripts/logger-client.js +1 -1
- package/dist/extension-js-devtools/firefox/background/scripts.js +1 -1
- package/dist/extension-js-devtools/firefox/devtools/index.js +1 -1
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.js +5 -5
- package/dist/extension-js-devtools/firefox/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/firefox/pages/welcome.js +3 -3
- package/dist/extension-js-devtools/firefox/scripts/logger-client.js +1 -1
- package/dist/main-world-bridge.js +15 -3
- package/dist/minimum-chromium-file.js +2 -3
- package/dist/minimum-firefox-file.js +2 -3
- package/dist/minimum-script-file.js +2 -2
- package/dist/module.js +13108 -19289
- package/dist/resolve-paths-loader.js +61 -102
- package/dist/warn-no-default-export.js +168 -9
- package/package.json +44 -42
- package/dist/930.js +0 -44
- package/dist/extension-js-theme/chrome/manifest.json +0 -65
- package/dist/extension-js-theme/chromium/manifest.json +0 -65
- package/dist/extension-js-theme/edge/manifest.json +0 -65
- package/dist/extension-js-theme/firefox/manifest.json +0 -6
|
@@ -22,7 +22,7 @@ var __webpack_require__ = {};
|
|
|
22
22
|
})();
|
|
23
23
|
(()=>{
|
|
24
24
|
__webpack_require__.r = (exports1)=>{
|
|
25
|
-
if (
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
26
|
value: 'Module'
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -39,6 +39,7 @@ const external_fs_namespaceObject = require("fs");
|
|
|
39
39
|
var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
|
|
40
40
|
const external_path_namespaceObject = require("path");
|
|
41
41
|
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
42
|
+
const core_namespaceObject = require("@swc/core");
|
|
42
43
|
const external_schema_utils_namespaceObject = require("schema-utils");
|
|
43
44
|
const schema = {
|
|
44
45
|
type: 'object',
|
|
@@ -54,6 +55,136 @@ const schema = {
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
};
|
|
58
|
+
function getSourceSignature(source) {
|
|
59
|
+
const head = source.slice(0, 64);
|
|
60
|
+
const tail = source.slice(-64);
|
|
61
|
+
return `${source.length}:${head}:${tail}`;
|
|
62
|
+
}
|
|
63
|
+
function analyzeDefaultExport(source, resourcePath, compilation) {
|
|
64
|
+
const abs = external_path_default().normalize(resourcePath);
|
|
65
|
+
const sig = getSourceSignature(source);
|
|
66
|
+
const cacheKey = `${abs}|${sig}`;
|
|
67
|
+
try {
|
|
68
|
+
const compilationAny = compilation;
|
|
69
|
+
if (compilationAny) {
|
|
70
|
+
compilationAny.__extjsDefaultExportAnalysisCache ??= new Map();
|
|
71
|
+
const cached = compilationAny.__extjsDefaultExportAnalysisCache.get(cacheKey);
|
|
72
|
+
if (cached) return cached;
|
|
73
|
+
}
|
|
74
|
+
const ext = external_path_default().extname(resourcePath).toLowerCase();
|
|
75
|
+
const isTS = '.ts' === ext || '.tsx' === ext || '.mts' === ext || '.mtsx' === ext;
|
|
76
|
+
const isJSX = '.jsx' === ext || '.tsx' === ext || '.mjsx' === ext || '.mtsx' === ext;
|
|
77
|
+
const ast = (0, core_namespaceObject.parseSync)(source, {
|
|
78
|
+
syntax: isTS ? "typescript" : "ecmascript",
|
|
79
|
+
tsx: isTS && isJSX,
|
|
80
|
+
jsx: !isTS && isJSX,
|
|
81
|
+
decorators: true,
|
|
82
|
+
dynamicImport: true,
|
|
83
|
+
importAssertions: true,
|
|
84
|
+
topLevelAwait: true
|
|
85
|
+
});
|
|
86
|
+
const body = Array.isArray(ast?.body) ? ast.body : [];
|
|
87
|
+
const bindings = new Map();
|
|
88
|
+
const recordBinding = (name, kind)=>{
|
|
89
|
+
if ('string' == typeof name && name) bindings.set(name, kind);
|
|
90
|
+
};
|
|
91
|
+
const inspectDecl = (node)=>{
|
|
92
|
+
if ('FunctionDeclaration' === node.type) {
|
|
93
|
+
const id = node.identifier;
|
|
94
|
+
recordBinding(id?.value, 'function');
|
|
95
|
+
} else if ('ClassDeclaration' === node.type) {
|
|
96
|
+
const id = node.identifier;
|
|
97
|
+
recordBinding(id?.value, 'class');
|
|
98
|
+
} else if ('VariableDeclaration' === node.type) {
|
|
99
|
+
const decls = node.declarations;
|
|
100
|
+
if (!Array.isArray(decls)) return;
|
|
101
|
+
for (const d of decls){
|
|
102
|
+
if (!d || 'object' != typeof d) continue;
|
|
103
|
+
const dd = d;
|
|
104
|
+
const id = dd.id;
|
|
105
|
+
const init = dd.init;
|
|
106
|
+
if (id?.type !== 'Identifier') continue;
|
|
107
|
+
const name = id.value;
|
|
108
|
+
const initType = init?.type;
|
|
109
|
+
if ('FunctionExpression' === initType || 'ArrowFunctionExpression' === initType) recordBinding(name, 'function');
|
|
110
|
+
else if ('ClassExpression' === initType) recordBinding(name, 'class');
|
|
111
|
+
else if (initType) recordBinding(name, 'other');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
for (const item of body){
|
|
116
|
+
if (!item || 'object' != typeof item) continue;
|
|
117
|
+
const it = item;
|
|
118
|
+
if ('FunctionDeclaration' === it.type || 'ClassDeclaration' === it.type || 'VariableDeclaration' === it.type) inspectDecl(it);
|
|
119
|
+
if ('ExportNamedDeclaration' === it.type) {
|
|
120
|
+
const decl = it.declaration;
|
|
121
|
+
if (decl && 'object' == typeof decl) inspectDecl(decl);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const resolveIdentifierKind = (name)=>bindings.get(name) ?? 'unknown';
|
|
125
|
+
const analysis = {
|
|
126
|
+
hasDefaultExport: false,
|
|
127
|
+
kind: 'none'
|
|
128
|
+
};
|
|
129
|
+
for (const item of body){
|
|
130
|
+
if (!item || 'object' != typeof item) continue;
|
|
131
|
+
const it = item;
|
|
132
|
+
if ('ExportDefaultDeclaration' === it.type) {
|
|
133
|
+
analysis.hasDefaultExport = true;
|
|
134
|
+
const decl = it.decl;
|
|
135
|
+
const declType = decl?.type;
|
|
136
|
+
if ('FunctionDeclaration' === declType || 'FunctionExpression' === declType) analysis.kind = 'function';
|
|
137
|
+
else if ('ClassDeclaration' === declType || 'ClassExpression' === declType) analysis.kind = 'class';
|
|
138
|
+
else analysis.kind = 'other';
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
if ('ExportDefaultExpression' === it.type) {
|
|
142
|
+
analysis.hasDefaultExport = true;
|
|
143
|
+
const expr = it.expression;
|
|
144
|
+
const exprType = expr?.type;
|
|
145
|
+
if ('FunctionExpression' === exprType || 'ArrowFunctionExpression' === exprType) analysis.kind = 'function';
|
|
146
|
+
else if ('ClassExpression' === exprType) analysis.kind = 'class';
|
|
147
|
+
else if ('Identifier' === exprType && 'string' == typeof expr?.value) analysis.kind = resolveIdentifierKind(expr.value);
|
|
148
|
+
else analysis.kind = 'other';
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
if ('ExportNamedDeclaration' === it.type && Array.isArray(it.specifiers)) {
|
|
152
|
+
for (const specifier of it.specifiers){
|
|
153
|
+
if (!specifier || 'object' != typeof specifier) continue;
|
|
154
|
+
const spec = specifier;
|
|
155
|
+
if ('ExportSpecifier' !== spec.type) continue;
|
|
156
|
+
const exported = spec.exported;
|
|
157
|
+
const orig = spec.orig;
|
|
158
|
+
const exportedType = exported?.type;
|
|
159
|
+
const exportedValue = exported?.value;
|
|
160
|
+
const isDefault = 'Identifier' === exportedType ? 'default' === exportedValue : 'Ident' === exportedType ? 'default' === exportedValue : 'Str' === exportedType ? 'default' === exportedValue : false;
|
|
161
|
+
if (isDefault) {
|
|
162
|
+
analysis.hasDefaultExport = true;
|
|
163
|
+
if (orig?.type === 'Identifier' && 'string' == typeof orig?.value) analysis.kind = resolveIdentifierKind(orig.value);
|
|
164
|
+
else analysis.kind = 'unknown';
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (analysis.hasDefaultExport) break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (compilationAny) compilationAny.__extjsDefaultExportAnalysisCache.set(cacheKey, analysis);
|
|
172
|
+
return analysis;
|
|
173
|
+
} catch {
|
|
174
|
+
const fallback = source.includes('export default') ? {
|
|
175
|
+
hasDefaultExport: true,
|
|
176
|
+
kind: 'unknown'
|
|
177
|
+
} : {
|
|
178
|
+
hasDefaultExport: false,
|
|
179
|
+
kind: 'none'
|
|
180
|
+
};
|
|
181
|
+
try {
|
|
182
|
+
const compilationAny = compilation;
|
|
183
|
+
if (compilationAny?.__extjsDefaultExportAnalysisCache) compilationAny.__extjsDefaultExportAnalysisCache.set(cacheKey, fallback);
|
|
184
|
+
} catch {}
|
|
185
|
+
return fallback;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
57
188
|
function warn_no_default_export(source) {
|
|
58
189
|
const options = this.getOptions();
|
|
59
190
|
const manifestPath = options.manifestPath;
|
|
@@ -76,7 +207,7 @@ function warn_no_default_export(source) {
|
|
|
76
207
|
const declaredContentJsAbsPaths = [];
|
|
77
208
|
const contentScripts = Array.isArray(manifest.content_scripts) ? manifest.content_scripts : [];
|
|
78
209
|
for (const contentScript of contentScripts){
|
|
79
|
-
const contentScriptJsList = Array.isArray(
|
|
210
|
+
const contentScriptJsList = Array.isArray(contentScript?.js) ? contentScript.js : [];
|
|
80
211
|
for (const contentScriptJs of contentScriptJsList)declaredContentJsAbsPaths.push(external_path_default().resolve(projectPath, contentScriptJs));
|
|
81
212
|
}
|
|
82
213
|
const isDeclaredContentScript = declaredContentJsAbsPaths.some((abs)=>resourceAbsPath === external_path_default().normalize(abs));
|
|
@@ -85,9 +216,37 @@ function warn_no_default_export(source) {
|
|
|
85
216
|
const isScriptsFolderScript = relToScripts && !relToScripts.startsWith('..') && !external_path_default().isAbsolute(relToScripts);
|
|
86
217
|
const isContentScriptLike = isDeclaredContentScript || isScriptsFolderScript;
|
|
87
218
|
if (isContentScriptLike) {
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
|
|
219
|
+
const analysis = analyzeDefaultExport(source, this.resourcePath, compilation);
|
|
220
|
+
if (analysis.hasDefaultExport) {
|
|
221
|
+
if ('class' === analysis.kind || 'other' === analysis.kind) {
|
|
222
|
+
const dedupeKindKey = `default-not-callable:${resourceAbsPath}`;
|
|
223
|
+
if (compilation) {
|
|
224
|
+
compilation.__extjsWarnedDefaultExportKinds ??= new Set();
|
|
225
|
+
if (compilation.__extjsWarnedDefaultExportKinds.has(dedupeKindKey)) return source;
|
|
226
|
+
}
|
|
227
|
+
const relativeFile = external_path_default().relative(projectPath, resourceAbsPath);
|
|
228
|
+
const found = 'class' === analysis.kind ? 'class' : 'non-callable value';
|
|
229
|
+
const message = [
|
|
230
|
+
"Content script default export must be a function.",
|
|
231
|
+
`File: ${relativeFile}`,
|
|
232
|
+
"",
|
|
233
|
+
`Found: ${found}`,
|
|
234
|
+
"",
|
|
235
|
+
"Fix:",
|
|
236
|
+
" - Export a default function that sets up your script and returns optional cleanup.",
|
|
237
|
+
" - If you want to use a class, instantiate it inside the default function and call its methods.",
|
|
238
|
+
"",
|
|
239
|
+
"Example:",
|
|
240
|
+
" class App { start(){} stop(){} }",
|
|
241
|
+
" export default function main(){",
|
|
242
|
+
" const app = new App(); app.start();",
|
|
243
|
+
" return () => app.stop();",
|
|
244
|
+
" }"
|
|
245
|
+
].join('\n');
|
|
246
|
+
compilation?.warnings.push(message);
|
|
247
|
+
compilation?.__extjsWarnedDefaultExportKinds?.add(dedupeKindKey);
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
91
250
|
const relativeFile = external_path_default().relative(projectPath, resourceAbsPath);
|
|
92
251
|
const message = [
|
|
93
252
|
"Content script requires a default export.",
|
|
@@ -109,17 +268,17 @@ function warn_no_default_export(source) {
|
|
|
109
268
|
"Side effects if omitted:",
|
|
110
269
|
" - Duplicate UI mounts, memory leaks, and inconsistent state during development."
|
|
111
270
|
].join('\n');
|
|
112
|
-
|
|
113
|
-
|
|
271
|
+
compilation?.warnings.push(message);
|
|
272
|
+
compilation?.__extjsWarnedDefaultExport?.add(dedupeKey);
|
|
114
273
|
}
|
|
115
274
|
}
|
|
116
275
|
} catch {}
|
|
117
276
|
return source;
|
|
118
277
|
}
|
|
119
278
|
exports["default"] = __webpack_exports__["default"];
|
|
120
|
-
for(var
|
|
279
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
121
280
|
"default"
|
|
122
|
-
].indexOf(
|
|
281
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
123
282
|
Object.defineProperty(exports, '__esModule', {
|
|
124
283
|
value: true
|
|
125
284
|
});
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"development": "./module.ts",
|
|
13
14
|
"types": "./dist/module.d.ts",
|
|
14
15
|
"import": "./dist/module.js",
|
|
15
16
|
"require": "./dist/module.js"
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
"dist"
|
|
22
23
|
],
|
|
23
24
|
"name": "extension-develop",
|
|
24
|
-
"version": "3.0.
|
|
25
|
+
"version": "3.1.0-next.11",
|
|
25
26
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
26
27
|
"author": {
|
|
27
28
|
"name": "Cezar Augusto",
|
|
@@ -37,7 +38,8 @@
|
|
|
37
38
|
"registry": "https://registry.npmjs.org"
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
|
-
"prepublishOnly": "rslib build && node ../../scripts/build-extensions.cjs",
|
|
41
|
+
"prepublishOnly": "node scripts/sync-build-dependencies.mjs && rslib build && node ../../scripts/build-extensions.cjs",
|
|
42
|
+
"sync-build-deps": "node scripts/sync-build-dependencies.mjs",
|
|
41
43
|
"compile": "rslib build",
|
|
42
44
|
"watch": "rslib build --watch",
|
|
43
45
|
"test": "vitest run"
|
|
@@ -68,67 +70,67 @@
|
|
|
68
70
|
"edge-extension"
|
|
69
71
|
],
|
|
70
72
|
"dependencies": {
|
|
71
|
-
"@rspack/core": "^1.
|
|
72
|
-
"@rspack/dev-server": "^1.1.
|
|
73
|
-
"@swc/core": "^1.
|
|
74
|
-
"@swc/helpers": "^0.5.
|
|
73
|
+
"@rspack/core": "^1.7.2",
|
|
74
|
+
"@rspack/dev-server": "^1.1.5",
|
|
75
|
+
"@swc/core": "^1.15.8",
|
|
76
|
+
"@swc/helpers": "^0.5.18",
|
|
75
77
|
"adm-zip": "^0.5.16",
|
|
76
78
|
"browser-extension-manifest-fields": "^2.2.1",
|
|
77
79
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
78
|
-
"chokidar": "^
|
|
80
|
+
"chokidar": "^5.0.0",
|
|
79
81
|
"chrome-location2": "4.0.0",
|
|
80
82
|
"chromium-location": "2.0.0",
|
|
81
83
|
"content-security-policy-parser": "^0.6.0",
|
|
82
84
|
"cross-spawn": "^7.0.6",
|
|
83
|
-
"dotenv": "^
|
|
85
|
+
"dotenv": "^17.2.3",
|
|
84
86
|
"edge-location": "2.2.0",
|
|
85
87
|
"firefox-location2": "3.0.0",
|
|
86
|
-
"go-git-it": "^5.0.
|
|
87
|
-
"ignore": "^
|
|
88
|
+
"go-git-it": "^5.0.3",
|
|
89
|
+
"ignore": "^7.0.5",
|
|
88
90
|
"loader-utils": "^3.3.1",
|
|
89
|
-
"magic-string": "^0.30.
|
|
90
|
-
"package-manager-detector": "^
|
|
91
|
-
"parse5": "^
|
|
91
|
+
"magic-string": "^0.30.21",
|
|
92
|
+
"package-manager-detector": "^1.6.0",
|
|
93
|
+
"parse5": "^8.0.0",
|
|
92
94
|
"parse5-utilities": "^1.0.0",
|
|
93
95
|
"pintor": "0.3.0",
|
|
94
|
-
"schema-utils": "^4.
|
|
96
|
+
"schema-utils": "^4.3.3",
|
|
95
97
|
"tiny-glob": "^0.2.9",
|
|
96
98
|
"unique-names-generator": "^4.7.1",
|
|
97
99
|
"webextension-polyfill": "^0.12.0",
|
|
98
100
|
"webpack-merge": "^6.0.1",
|
|
99
101
|
"webpack-target-webextension": "^2.1.3",
|
|
100
|
-
"ws": "^8.
|
|
102
|
+
"ws": "^8.19.0"
|
|
101
103
|
},
|
|
102
104
|
"devDependencies": {
|
|
103
|
-
"@
|
|
105
|
+
"@prefresh/core": "1.5.9",
|
|
106
|
+
"@prefresh/utils": "1.2.1",
|
|
107
|
+
"@prefresh/webpack": "4.0.6",
|
|
108
|
+
"@rslib/core": "^0.19.2",
|
|
109
|
+
"@rspack/plugin-preact-refresh": "1.1.4",
|
|
110
|
+
"@rspack/plugin-react-refresh": "1.6.0",
|
|
104
111
|
"@types/adm-zip": "^0.5.7",
|
|
105
112
|
"@types/case-sensitive-paths-webpack-plugin": "^2.1.9",
|
|
106
|
-
"@types/chrome": "^0.
|
|
113
|
+
"@types/chrome": "^0.1.33",
|
|
107
114
|
"@types/cross-spawn": "^6.0.6",
|
|
108
|
-
"@types/loader-utils": "^
|
|
109
|
-
"@types/node": "^
|
|
110
|
-
"@types/sass-loader": "8.0.
|
|
111
|
-
"@types/webextension-polyfill": "0.12.
|
|
112
|
-
"@types/ws": "^8.
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"react-refresh": "^0.14.2",
|
|
129
|
-
"sass-loader": "^16.0.4",
|
|
130
|
-
"svelte-loader": "^3.2.4",
|
|
131
|
-
"vue-loader": "^17.4.2",
|
|
132
|
-
"vue-style-loader": "^4.1.3"
|
|
115
|
+
"@types/loader-utils": "^3.0.0",
|
|
116
|
+
"@types/node": "^25.0.9",
|
|
117
|
+
"@types/sass-loader": "8.0.10",
|
|
118
|
+
"@types/webextension-polyfill": "0.12.4",
|
|
119
|
+
"@types/ws": "^8.18.1",
|
|
120
|
+
"@vue/compiler-sfc": "3.5.26",
|
|
121
|
+
"less": "4.5.1",
|
|
122
|
+
"less-loader": "12.3.0",
|
|
123
|
+
"postcss": "^8.5.6",
|
|
124
|
+
"postcss-loader": "8.2.0",
|
|
125
|
+
"postcss-preset-env": "11.1.1",
|
|
126
|
+
"postcss-scss": "4.0.9",
|
|
127
|
+
"react-refresh": "0.18.0",
|
|
128
|
+
"sass-loader": "16.0.6",
|
|
129
|
+
"svelte-loader": "3.2.4",
|
|
130
|
+
"tsup": "^8.5.1",
|
|
131
|
+
"typescript": "5.9.3",
|
|
132
|
+
"vitest": "^4.0.17",
|
|
133
|
+
"vue-loader": "17.4.2",
|
|
134
|
+
"vue-style-loader": "4.1.3"
|
|
133
135
|
}
|
|
134
136
|
}
|
package/dist/930.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.ids = [
|
|
3
|
-
"930"
|
|
4
|
-
];
|
|
5
|
-
exports.modules = {
|
|
6
|
-
"./webpack/webpack-lib/zip.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
8
|
-
downloadAndExtractZip: ()=>downloadAndExtractZip
|
|
9
|
-
});
|
|
10
|
-
var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("path");
|
|
11
|
-
var adm_zip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("adm-zip");
|
|
12
|
-
var adm_zip__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(adm_zip__WEBPACK_IMPORTED_MODULE_1__);
|
|
13
|
-
var _messages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./webpack/webpack-lib/messages.ts");
|
|
14
|
-
async function downloadAndExtractZip(url, targetPath) {
|
|
15
|
-
const urlNoSearchParams = url.split('?')[0];
|
|
16
|
-
try {
|
|
17
|
-
console.log(_messages__WEBPACK_IMPORTED_MODULE_2__.cq(urlNoSearchParams));
|
|
18
|
-
const res = await fetch(url, {
|
|
19
|
-
redirect: 'follow'
|
|
20
|
-
});
|
|
21
|
-
if (!res.ok || !res.body) throw new Error(`HTTP ${res.status} ${res.statusText}`);
|
|
22
|
-
const contentType = String(res.headers.get('content-type') || '');
|
|
23
|
-
const isZipExt = '.zip' === path__WEBPACK_IMPORTED_MODULE_0__.extname(urlNoSearchParams).toLowerCase();
|
|
24
|
-
const isZipType = /zip|octet-stream/i.test(contentType);
|
|
25
|
-
if (!isZipExt && !isZipType) throw new Error(`${_messages__WEBPACK_IMPORTED_MODULE_2__.wX(urlNoSearchParams, contentType)}`);
|
|
26
|
-
const extname = path__WEBPACK_IMPORTED_MODULE_0__.extname(urlNoSearchParams);
|
|
27
|
-
const basename = path__WEBPACK_IMPORTED_MODULE_0__.basename(urlNoSearchParams, extname);
|
|
28
|
-
const destinationPath = path__WEBPACK_IMPORTED_MODULE_0__.join(targetPath, basename);
|
|
29
|
-
console.log(_messages__WEBPACK_IMPORTED_MODULE_2__.WF(destinationPath));
|
|
30
|
-
const arrayBuffer = await res.arrayBuffer();
|
|
31
|
-
const zipBuffer = Buffer.from(arrayBuffer);
|
|
32
|
-
const zip = new (adm_zip__WEBPACK_IMPORTED_MODULE_1___default())(zipBuffer);
|
|
33
|
-
zip.extractAllTo(destinationPath, true);
|
|
34
|
-
console.log(_messages__WEBPACK_IMPORTED_MODULE_2__.aP());
|
|
35
|
-
return destinationPath;
|
|
36
|
-
} catch (error) {
|
|
37
|
-
console.error(_messages__WEBPACK_IMPORTED_MODULE_2__.QC(error));
|
|
38
|
-
const err = new Error(`${_messages__WEBPACK_IMPORTED_MODULE_2__.QC(error)}`);
|
|
39
|
-
err.code = 'EZIP';
|
|
40
|
-
throw err;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Extension.js Theme",
|
|
3
|
-
"version": "0.2.0",
|
|
4
|
-
"description": "Browser theme for Extension.js",
|
|
5
|
-
"manifest_version": 3,
|
|
6
|
-
"theme": {
|
|
7
|
-
"colors": {
|
|
8
|
-
"frame": [
|
|
9
|
-
37,
|
|
10
|
-
37,
|
|
11
|
-
39
|
|
12
|
-
],
|
|
13
|
-
"frame_inactive": [
|
|
14
|
-
49,
|
|
15
|
-
49,
|
|
16
|
-
53
|
|
17
|
-
],
|
|
18
|
-
"toolbar": [
|
|
19
|
-
25,
|
|
20
|
-
25,
|
|
21
|
-
26
|
|
22
|
-
],
|
|
23
|
-
"tab_background_text": [
|
|
24
|
-
255,
|
|
25
|
-
255,
|
|
26
|
-
255
|
|
27
|
-
],
|
|
28
|
-
"tab_text": [
|
|
29
|
-
255,
|
|
30
|
-
255,
|
|
31
|
-
255
|
|
32
|
-
],
|
|
33
|
-
"tab_background_text_inactive": [
|
|
34
|
-
62,
|
|
35
|
-
62,
|
|
36
|
-
66
|
|
37
|
-
],
|
|
38
|
-
"tab_text_inactive": [
|
|
39
|
-
255,
|
|
40
|
-
255,
|
|
41
|
-
255
|
|
42
|
-
],
|
|
43
|
-
"bookmark_text": [
|
|
44
|
-
153,
|
|
45
|
-
153,
|
|
46
|
-
159
|
|
47
|
-
],
|
|
48
|
-
"ntp_background": [
|
|
49
|
-
179,
|
|
50
|
-
179,
|
|
51
|
-
183
|
|
52
|
-
],
|
|
53
|
-
"ntp_text": [
|
|
54
|
-
37,
|
|
55
|
-
37,
|
|
56
|
-
39
|
|
57
|
-
],
|
|
58
|
-
"button_background": [
|
|
59
|
-
28,
|
|
60
|
-
28,
|
|
61
|
-
30
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Extension.js Theme",
|
|
3
|
-
"version": "0.2.0",
|
|
4
|
-
"description": "Browser theme for Extension.js",
|
|
5
|
-
"manifest_version": 3,
|
|
6
|
-
"theme": {
|
|
7
|
-
"colors": {
|
|
8
|
-
"frame": [
|
|
9
|
-
37,
|
|
10
|
-
37,
|
|
11
|
-
39
|
|
12
|
-
],
|
|
13
|
-
"frame_inactive": [
|
|
14
|
-
49,
|
|
15
|
-
49,
|
|
16
|
-
53
|
|
17
|
-
],
|
|
18
|
-
"toolbar": [
|
|
19
|
-
25,
|
|
20
|
-
25,
|
|
21
|
-
26
|
|
22
|
-
],
|
|
23
|
-
"tab_background_text": [
|
|
24
|
-
255,
|
|
25
|
-
255,
|
|
26
|
-
255
|
|
27
|
-
],
|
|
28
|
-
"tab_text": [
|
|
29
|
-
255,
|
|
30
|
-
255,
|
|
31
|
-
255
|
|
32
|
-
],
|
|
33
|
-
"tab_background_text_inactive": [
|
|
34
|
-
62,
|
|
35
|
-
62,
|
|
36
|
-
66
|
|
37
|
-
],
|
|
38
|
-
"tab_text_inactive": [
|
|
39
|
-
255,
|
|
40
|
-
255,
|
|
41
|
-
255
|
|
42
|
-
],
|
|
43
|
-
"bookmark_text": [
|
|
44
|
-
153,
|
|
45
|
-
153,
|
|
46
|
-
159
|
|
47
|
-
],
|
|
48
|
-
"ntp_background": [
|
|
49
|
-
179,
|
|
50
|
-
179,
|
|
51
|
-
183
|
|
52
|
-
],
|
|
53
|
-
"ntp_text": [
|
|
54
|
-
37,
|
|
55
|
-
37,
|
|
56
|
-
39
|
|
57
|
-
],
|
|
58
|
-
"button_background": [
|
|
59
|
-
28,
|
|
60
|
-
28,
|
|
61
|
-
30
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Extension.js Theme",
|
|
3
|
-
"version": "0.2.0",
|
|
4
|
-
"description": "Browser theme for Extension.js",
|
|
5
|
-
"manifest_version": 3,
|
|
6
|
-
"theme": {
|
|
7
|
-
"colors": {
|
|
8
|
-
"frame": [
|
|
9
|
-
37,
|
|
10
|
-
37,
|
|
11
|
-
39
|
|
12
|
-
],
|
|
13
|
-
"frame_inactive": [
|
|
14
|
-
49,
|
|
15
|
-
49,
|
|
16
|
-
53
|
|
17
|
-
],
|
|
18
|
-
"toolbar": [
|
|
19
|
-
25,
|
|
20
|
-
25,
|
|
21
|
-
26
|
|
22
|
-
],
|
|
23
|
-
"tab_background_text": [
|
|
24
|
-
255,
|
|
25
|
-
255,
|
|
26
|
-
255
|
|
27
|
-
],
|
|
28
|
-
"tab_text": [
|
|
29
|
-
255,
|
|
30
|
-
255,
|
|
31
|
-
255
|
|
32
|
-
],
|
|
33
|
-
"tab_background_text_inactive": [
|
|
34
|
-
62,
|
|
35
|
-
62,
|
|
36
|
-
66
|
|
37
|
-
],
|
|
38
|
-
"tab_text_inactive": [
|
|
39
|
-
255,
|
|
40
|
-
255,
|
|
41
|
-
255
|
|
42
|
-
],
|
|
43
|
-
"bookmark_text": [
|
|
44
|
-
153,
|
|
45
|
-
153,
|
|
46
|
-
159
|
|
47
|
-
],
|
|
48
|
-
"ntp_background": [
|
|
49
|
-
179,
|
|
50
|
-
179,
|
|
51
|
-
183
|
|
52
|
-
],
|
|
53
|
-
"ntp_text": [
|
|
54
|
-
37,
|
|
55
|
-
37,
|
|
56
|
-
39
|
|
57
|
-
],
|
|
58
|
-
"button_background": [
|
|
59
|
-
28,
|
|
60
|
-
28,
|
|
61
|
-
30
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|