extension-develop 3.18.3 → 3.18.4-canary.321.403955d
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/0~dev-server.mjs +6 -2
- package/dist/0~rslib-runtime.mjs +1 -17
- package/dist/0~rspack-config.mjs +261 -47
- package/dist/946.mjs +544 -534
- package/dist/962.mjs +4 -2
- package/dist/extension-js-devtools/chrome/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chrome/devtools/index.js +1 -1
- package/dist/extension-js-devtools/chrome/manifest.json +3 -3
- package/dist/extension-js-devtools/chromium/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/chromium/devtools/index.js +1 -1
- package/dist/extension-js-devtools/chromium/manifest.json +3 -3
- package/dist/extension-js-devtools/edge/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/edge/devtools/index.js +1 -1
- package/dist/extension-js-devtools/edge/manifest.json +3 -3
- package/dist/extension-js-devtools/extension-js/chrome/events.ndjson +2 -2
- package/dist/extension-js-devtools/extension-js/chrome/ready.json +5 -5
- package/dist/extension-js-devtools/extension-js/chromium/events.ndjson +2 -2
- package/dist/extension-js-devtools/extension-js/chromium/ready.json +5 -5
- package/dist/extension-js-devtools/extension-js/edge/events.ndjson +2 -2
- package/dist/extension-js-devtools/extension-js/edge/ready.json +5 -5
- package/dist/extension-js-devtools/extension-js/firefox/events.ndjson +2 -2
- package/dist/extension-js-devtools/extension-js/firefox/ready.json +5 -5
- package/dist/extension-js-devtools/firefox/content_scripts/content-0.js +2 -2
- package/dist/extension-js-devtools/firefox/devtools/index.js +1 -1
- package/dist/extension-js-theme/extension-js/chrome/events.ndjson +2 -2
- package/dist/extension-js-theme/extension-js/chrome/ready.json +5 -5
- package/dist/extension-js-theme/extension-js/chromium/events.ndjson +2 -2
- package/dist/extension-js-theme/extension-js/chromium/ready.json +5 -5
- package/dist/extension-js-theme/extension-js/edge/events.ndjson +2 -2
- package/dist/extension-js-theme/extension-js/edge/ready.json +5 -5
- package/dist/extension-js-theme/extension-js/firefox/events.ndjson +4 -4
- package/dist/extension-js-theme/extension-js/firefox/ready.json +5 -5
- package/dist/feature-scripts-content-script-wrapper.js +7 -37
- package/dist/feature-scripts-content-script-wrapper.mjs +7 -37
- package/package.json +2 -7
- package/dist/resolve-paths-loader.js +0 -1300
- package/dist/resolve-paths-loader.mjs +0 -1300
|
@@ -1 +1 @@
|
|
|
1
|
-
try{chrome.devtools?.panels.create("Extension Logs","images/logo.png","pages/centralized-logger.html")}catch{console.error("[Extension.js] Failed to create devtools panel")}
|
|
1
|
+
(()=>{"use strict";try{chrome.devtools?.panels.create("Extension Logs","images/logo.png","pages/centralized-logger.html")}catch{console.error("[Extension.js] Failed to create devtools panel")}})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
{"type":"compile_start","ts":"2026-06-
|
|
2
|
-
{"type":"compile_success","ts":"2026-06-
|
|
1
|
+
{"type":"compile_start","ts":"2026-06-18T20:47:57.116Z","command":"start","browser":"chrome"}
|
|
2
|
+
{"type":"compile_success","ts":"2026-06-18T20:47:57.141Z","command":"start","browser":"chrome","durationMs":26,"errorCount":0}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"command": "start",
|
|
4
4
|
"browser": "chrome",
|
|
5
|
-
"runId": "
|
|
6
|
-
"startedAt": "2026-06-
|
|
5
|
+
"runId": "mqjz1rjc-4475nwgh",
|
|
6
|
+
"startedAt": "2026-06-18T20:47:57.096Z",
|
|
7
7
|
"distPath": "/home/runner/work/extension.js/extension.js/extensions/extension-js-theme/dist/chrome",
|
|
8
8
|
"manifestPath": "/home/runner/work/extension.js/extension.js/extensions/extension-js-theme/manifest.json",
|
|
9
9
|
"port": null,
|
|
10
10
|
"controlPort": null,
|
|
11
11
|
"status": "ready",
|
|
12
|
-
"pid":
|
|
13
|
-
"ts": "2026-06-
|
|
14
|
-
"compiledAt": "2026-06-
|
|
12
|
+
"pid": 2907,
|
|
13
|
+
"ts": "2026-06-18T20:47:57.141Z",
|
|
14
|
+
"compiledAt": "2026-06-18T20:47:57.141Z",
|
|
15
15
|
"errors": []
|
|
16
16
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
{"type":"compile_start","ts":"2026-06-
|
|
2
|
-
{"type":"compile_success","ts":"2026-06-
|
|
1
|
+
{"type":"compile_start","ts":"2026-06-18T20:47:56.457Z","command":"start","browser":"chromium"}
|
|
2
|
+
{"type":"compile_success","ts":"2026-06-18T20:47:56.487Z","command":"start","browser":"chromium","durationMs":30,"errorCount":0}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"command": "start",
|
|
4
4
|
"browser": "chromium",
|
|
5
|
-
"runId": "
|
|
6
|
-
"startedAt": "2026-06-
|
|
5
|
+
"runId": "mqjz1r0x-ujbs00ry",
|
|
6
|
+
"startedAt": "2026-06-18T20:47:56.433Z",
|
|
7
7
|
"distPath": "/home/runner/work/extension.js/extension.js/extensions/extension-js-theme/dist/chromium",
|
|
8
8
|
"manifestPath": "/home/runner/work/extension.js/extension.js/extensions/extension-js-theme/manifest.json",
|
|
9
9
|
"port": null,
|
|
10
10
|
"controlPort": null,
|
|
11
11
|
"status": "ready",
|
|
12
|
-
"pid":
|
|
13
|
-
"ts": "2026-06-
|
|
14
|
-
"compiledAt": "2026-06-
|
|
12
|
+
"pid": 2869,
|
|
13
|
+
"ts": "2026-06-18T20:47:56.487Z",
|
|
14
|
+
"compiledAt": "2026-06-18T20:47:56.487Z",
|
|
15
15
|
"errors": []
|
|
16
16
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
{"type":"compile_start","ts":"2026-06-
|
|
2
|
-
{"type":"compile_success","ts":"2026-06-
|
|
1
|
+
{"type":"compile_start","ts":"2026-06-18T20:47:58.427Z","command":"start","browser":"edge"}
|
|
2
|
+
{"type":"compile_success","ts":"2026-06-18T20:47:58.456Z","command":"start","browser":"edge","durationMs":30,"errorCount":0}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"command": "start",
|
|
4
4
|
"browser": "edge",
|
|
5
|
-
"runId": "
|
|
6
|
-
"startedAt": "2026-06-
|
|
5
|
+
"runId": "mqjz1sjm-r0u3pg9v",
|
|
6
|
+
"startedAt": "2026-06-18T20:47:58.402Z",
|
|
7
7
|
"distPath": "/home/runner/work/extension.js/extension.js/extensions/extension-js-theme/dist/edge",
|
|
8
8
|
"manifestPath": "/home/runner/work/extension.js/extension.js/extensions/extension-js-theme/manifest.json",
|
|
9
9
|
"port": null,
|
|
10
10
|
"controlPort": null,
|
|
11
11
|
"status": "ready",
|
|
12
|
-
"pid":
|
|
13
|
-
"ts": "2026-06-
|
|
14
|
-
"compiledAt": "2026-06-
|
|
12
|
+
"pid": 2983,
|
|
13
|
+
"ts": "2026-06-18T20:47:58.456Z",
|
|
14
|
+
"compiledAt": "2026-06-18T20:47:58.456Z",
|
|
15
15
|
"errors": []
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{"type":"compile_start","ts":"2026-06-
|
|
2
|
-
{"type":"compile_success","ts":"2026-06-
|
|
3
|
-
{"type":"compile_start","ts":"2026-06-
|
|
4
|
-
{"type":"compile_success","ts":"2026-06-
|
|
1
|
+
{"type":"compile_start","ts":"2026-06-18T20:47:57.766Z","command":"start","browser":"firefox"}
|
|
2
|
+
{"type":"compile_success","ts":"2026-06-18T20:47:57.791Z","command":"start","browser":"firefox","durationMs":25,"errorCount":0}
|
|
3
|
+
{"type":"compile_start","ts":"2026-06-18T20:48:17.186Z","command":"start","browser":"firefox"}
|
|
4
|
+
{"type":"compile_success","ts":"2026-06-18T20:48:17.230Z","command":"start","browser":"firefox","durationMs":45,"errorCount":0}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"command": "start",
|
|
4
4
|
"browser": "firefox",
|
|
5
|
-
"runId": "
|
|
6
|
-
"startedAt": "2026-06-
|
|
5
|
+
"runId": "mqjz270d-a09buipc",
|
|
6
|
+
"startedAt": "2026-06-18T20:48:17.149Z",
|
|
7
7
|
"distPath": "/home/runner/work/extension.js/extension.js/extensions/extension-js-theme/dist/firefox",
|
|
8
8
|
"manifestPath": "/home/runner/work/extension.js/extension.js/extensions/extension-js-theme/manifest.json",
|
|
9
9
|
"port": null,
|
|
10
10
|
"controlPort": null,
|
|
11
11
|
"status": "ready",
|
|
12
|
-
"pid":
|
|
13
|
-
"ts": "2026-06-
|
|
14
|
-
"compiledAt": "2026-06-
|
|
12
|
+
"pid": 4211,
|
|
13
|
+
"ts": "2026-06-18T20:48:17.230Z",
|
|
14
|
+
"compiledAt": "2026-06-18T20:48:17.230Z",
|
|
15
15
|
"errors": []
|
|
16
16
|
}
|
|
@@ -2,7 +2,7 @@ import { createRequire as __extjsCreateRequire } from "node:module"; const requi
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { validate } from "schema-utils";
|
|
5
|
-
import {
|
|
5
|
+
import { parse } from "es-module-lexer/js";
|
|
6
6
|
import { findNearestPackageJsonSync, reservedScriptsFolder } from "./314.mjs";
|
|
7
7
|
import { getCanonicalContentScriptEntryName, CANONICAL_CONTENT_SCRIPT_ENTRY_PREFIX } from "./526.mjs";
|
|
8
8
|
const schema = {
|
|
@@ -62,9 +62,6 @@ function collectStyleAssetSpecifiers(source) {
|
|
|
62
62
|
}
|
|
63
63
|
function hasDefaultExport(source, resourcePath, compilation) {
|
|
64
64
|
try {
|
|
65
|
-
const ext = path.extname(resourcePath).toLowerCase();
|
|
66
|
-
const isTS = '.ts' === ext || '.tsx' === ext || '.mts' === ext || '.mtsx' === ext;
|
|
67
|
-
const isJSX = '.jsx' === ext || '.tsx' === ext || '.mjsx' === ext || '.mtsx' === ext;
|
|
68
65
|
const abs = path.normalize(resourcePath);
|
|
69
66
|
const sig = getSourceSignature(source);
|
|
70
67
|
if (compilation) {
|
|
@@ -73,39 +70,10 @@ function hasDefaultExport(source, resourcePath, compilation) {
|
|
|
73
70
|
const cached = compilation.__extjsHasDefaultExportCache.get(cacheKey);
|
|
74
71
|
if ('boolean' == typeof cached) return cached;
|
|
75
72
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
decorators: true,
|
|
81
|
-
dynamicImport: true,
|
|
82
|
-
importAssertions: true,
|
|
83
|
-
topLevelAwait: true
|
|
84
|
-
});
|
|
85
|
-
const body = Array.isArray(ast?.body) ? ast.body : [];
|
|
86
|
-
for (const item of body)if (item && 'object' == typeof item) {
|
|
87
|
-
if ('ExportDefaultDeclaration' === item.type || 'ExportDefaultExpression' === item.type) {
|
|
88
|
-
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, true);
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
if ('ExportNamedDeclaration' === item.type && Array.isArray(item.specifiers)) {
|
|
92
|
-
for (const specifier of item.specifiers)if (specifier && 'object' == typeof specifier) {
|
|
93
|
-
if ('ExportDefaultSpecifier' === specifier.type) {
|
|
94
|
-
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, true);
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
if ('ExportSpecifier' === specifier.type) {
|
|
98
|
-
const exported = specifier.exported;
|
|
99
|
-
if (exported && 'object' == typeof exported && ('Identifier' === exported.type && 'default' === exported.value || 'Ident' === exported.type && 'default' === exported.value || 'Str' === exported.type && 'default' === exported.value)) {
|
|
100
|
-
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, true);
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, false);
|
|
108
|
-
return false;
|
|
73
|
+
const [, moduleExports] = parse(source);
|
|
74
|
+
const result = moduleExports.some((entry)=>'default' === entry.n);
|
|
75
|
+
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, result);
|
|
76
|
+
return result;
|
|
109
77
|
} catch {
|
|
110
78
|
const fallback = source.includes('export default');
|
|
111
79
|
try {
|
|
@@ -174,6 +142,8 @@ function contentScriptWrapper(source) {
|
|
|
174
142
|
throw new Error(reservedScriptsFolder(relFromProject, nodeIndicators));
|
|
175
143
|
}
|
|
176
144
|
}
|
|
145
|
+
const isVendoredMinifiedScript = /\.min\.[cm]?js$/i.test(resourceAbsPath);
|
|
146
|
+
if (isVendoredMinifiedScript && !declaredEntry) return rewrittenSource;
|
|
177
147
|
const isContentScriptLike = Boolean(declaredEntry || isScriptsFolderScript);
|
|
178
148
|
if (!isContentScriptLike) return rewrittenSource;
|
|
179
149
|
const runAt = declaredEntry?.runAt || 'document_idle';
|
|
@@ -2,7 +2,7 @@ import { createRequire as __extjsCreateRequire } from "node:module"; const requi
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { validate } from "schema-utils";
|
|
5
|
-
import {
|
|
5
|
+
import { parse } from "es-module-lexer/js";
|
|
6
6
|
import { findNearestPackageJsonSync, reservedScriptsFolder } from "./314.mjs";
|
|
7
7
|
import { getCanonicalContentScriptEntryName, CANONICAL_CONTENT_SCRIPT_ENTRY_PREFIX } from "./526.mjs";
|
|
8
8
|
const schema = {
|
|
@@ -62,9 +62,6 @@ function collectStyleAssetSpecifiers(source) {
|
|
|
62
62
|
}
|
|
63
63
|
function hasDefaultExport(source, resourcePath, compilation) {
|
|
64
64
|
try {
|
|
65
|
-
const ext = path.extname(resourcePath).toLowerCase();
|
|
66
|
-
const isTS = '.ts' === ext || '.tsx' === ext || '.mts' === ext || '.mtsx' === ext;
|
|
67
|
-
const isJSX = '.jsx' === ext || '.tsx' === ext || '.mjsx' === ext || '.mtsx' === ext;
|
|
68
65
|
const abs = path.normalize(resourcePath);
|
|
69
66
|
const sig = getSourceSignature(source);
|
|
70
67
|
if (compilation) {
|
|
@@ -73,39 +70,10 @@ function hasDefaultExport(source, resourcePath, compilation) {
|
|
|
73
70
|
const cached = compilation.__extjsHasDefaultExportCache.get(cacheKey);
|
|
74
71
|
if ('boolean' == typeof cached) return cached;
|
|
75
72
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
decorators: true,
|
|
81
|
-
dynamicImport: true,
|
|
82
|
-
importAssertions: true,
|
|
83
|
-
topLevelAwait: true
|
|
84
|
-
});
|
|
85
|
-
const body = Array.isArray(ast?.body) ? ast.body : [];
|
|
86
|
-
for (const item of body)if (item && 'object' == typeof item) {
|
|
87
|
-
if ('ExportDefaultDeclaration' === item.type || 'ExportDefaultExpression' === item.type) {
|
|
88
|
-
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, true);
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
if ('ExportNamedDeclaration' === item.type && Array.isArray(item.specifiers)) {
|
|
92
|
-
for (const specifier of item.specifiers)if (specifier && 'object' == typeof specifier) {
|
|
93
|
-
if ('ExportDefaultSpecifier' === specifier.type) {
|
|
94
|
-
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, true);
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
if ('ExportSpecifier' === specifier.type) {
|
|
98
|
-
const exported = specifier.exported;
|
|
99
|
-
if (exported && 'object' == typeof exported && ('Identifier' === exported.type && 'default' === exported.value || 'Ident' === exported.type && 'default' === exported.value || 'Str' === exported.type && 'default' === exported.value)) {
|
|
100
|
-
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, true);
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, false);
|
|
108
|
-
return false;
|
|
73
|
+
const [, moduleExports] = parse(source);
|
|
74
|
+
const result = moduleExports.some((entry)=>'default' === entry.n);
|
|
75
|
+
compilation?.__extjsHasDefaultExportCache?.set(`${abs}|${sig}`, result);
|
|
76
|
+
return result;
|
|
109
77
|
} catch {
|
|
110
78
|
const fallback = source.includes('export default');
|
|
111
79
|
try {
|
|
@@ -174,6 +142,8 @@ function contentScriptWrapper(source) {
|
|
|
174
142
|
throw new Error(reservedScriptsFolder(relFromProject, nodeIndicators));
|
|
175
143
|
}
|
|
176
144
|
}
|
|
145
|
+
const isVendoredMinifiedScript = /\.min\.[cm]?js$/i.test(resourceAbsPath);
|
|
146
|
+
if (isVendoredMinifiedScript && !declaredEntry) return rewrittenSource;
|
|
177
147
|
const isContentScriptLike = Boolean(declaredEntry || isScriptsFolderScript);
|
|
178
148
|
if (!isContentScriptLike) return rewrittenSource;
|
|
179
149
|
const runAt = declaredEntry?.runAt || 'document_idle';
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"runtime"
|
|
35
35
|
],
|
|
36
36
|
"name": "extension-develop",
|
|
37
|
-
"version": "3.18.
|
|
37
|
+
"version": "3.18.4-canary.321.403955d",
|
|
38
38
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
39
39
|
"author": {
|
|
40
40
|
"name": "Cezar Augusto",
|
|
@@ -88,22 +88,18 @@
|
|
|
88
88
|
"@rspack/dev-server": "2.0.1",
|
|
89
89
|
"@rspack/plugin-preact-refresh": "2.0.1",
|
|
90
90
|
"@rspack/plugin-react-refresh": "1.6.2",
|
|
91
|
-
"@swc/core": "^1.15.8",
|
|
92
|
-
"@swc/helpers": "^0.5.18",
|
|
93
91
|
"@vue/compiler-sfc": "3.5.26",
|
|
94
92
|
"adm-zip": "^0.5.16",
|
|
95
93
|
"browser-extension-manifest-fields": "^2.2.3",
|
|
96
94
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
97
95
|
"content-security-policy-parser": "^0.6.0",
|
|
98
|
-
"cross-spawn": "^7.0.6",
|
|
99
96
|
"dotenv": "^17.2.3",
|
|
97
|
+
"es-module-lexer": "^1.7.0",
|
|
100
98
|
"extension-from-store": "^0.1.1",
|
|
101
99
|
"go-git-it": "^5.1.5",
|
|
102
100
|
"ignore": "^7.0.5",
|
|
103
101
|
"less": "4.5.1",
|
|
104
102
|
"less-loader": "12.3.2",
|
|
105
|
-
"loader-utils": "^3.3.1",
|
|
106
|
-
"magic-string": "^0.30.21",
|
|
107
103
|
"parse5-utilities": "^1.0.0",
|
|
108
104
|
"pintor": "0.3.0",
|
|
109
105
|
"postcss": "8.5.10",
|
|
@@ -117,7 +113,6 @@
|
|
|
117
113
|
"svelte-loader": "3.2.4",
|
|
118
114
|
"tiny-glob": "^0.2.9",
|
|
119
115
|
"typescript": "5.9.3",
|
|
120
|
-
"unique-names-generator": "^4.7.1",
|
|
121
116
|
"vue": "3.5.26",
|
|
122
117
|
"vue-loader": "17.4.2",
|
|
123
118
|
"webextension-polyfill": "^0.12.0",
|