extension-develop 3.5.0-next.5 → 3.5.0-next.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/dist/547.cjs +2 -2
- package/dist/928.cjs +4 -4
- package/dist/module.cjs +1 -1
- package/dist/postinstall.cjs +44 -2
- package/package.json +3 -3
package/dist/547.cjs
CHANGED
|
@@ -1118,7 +1118,7 @@ exports.modules = {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
function legacyManifestPathWarning(legacyPath) {
|
|
1120
1120
|
const lines = [];
|
|
1121
|
-
lines.push(
|
|
1121
|
+
lines.push("⚠ Deprecated manifest path detected. This will be rewritten to standardized folders in the next major.");
|
|
1122
1122
|
lines.push('');
|
|
1123
1123
|
lines.push(`${external_pintor_default().brightBlue('PATH')} ${external_pintor_default().underline(legacyPath)}`);
|
|
1124
1124
|
return lines.join('\n');
|
|
@@ -3786,7 +3786,7 @@ exports.modules = {
|
|
|
3786
3786
|
'}'
|
|
3787
3787
|
])) + ';';
|
|
3788
3788
|
const ClassicLoaderDisabled = `${_const} ${CLASSIC_LOADER} = ` + f('', [
|
|
3789
|
-
|
|
3789
|
+
"throw new Error(\"[webpack-target-webextension] Failed to load async chunk in the content script. No script loader is found. You can either\\n - Set output.environment.dynamicImport to true if your environment supports native ES Module\\n - Specify the background entry to enable the fallback loader\\n - Set module.parser.javascript.dynamicImportMode to 'eager' to inline all async chunks.\");"
|
|
3790
3790
|
]);
|
|
3791
3791
|
return Template.asString([
|
|
3792
3792
|
this.supportDynamicImport ? `${_let} bug816121warned, isNotIframe;` : '',
|
package/dist/928.cjs
CHANGED
|
@@ -61,16 +61,16 @@ exports.modules = {
|
|
|
61
61
|
return `Build failed to start:\n${external_pintor_default().red(text)}`;
|
|
62
62
|
}
|
|
63
63
|
function bundlerRecompiling() {
|
|
64
|
-
return
|
|
64
|
+
return "Recompiling due to file changes…";
|
|
65
65
|
}
|
|
66
66
|
function noEntrypointsDetected(port) {
|
|
67
67
|
return [
|
|
68
68
|
"No entrypoints or assets were produced by the initial compilation.",
|
|
69
69
|
`The dev server is running on 127.0.0.1:${external_pintor_default().brightBlue(port.toString())}, but nothing is being built.`,
|
|
70
70
|
"Possible causes:",
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
" • Empty or missing entry configuration.",
|
|
72
|
+
" • Extension-related plugins are disabled (entries not derived from manifest).",
|
|
73
|
+
" • All sources are ignored or excluded.",
|
|
74
74
|
`Try enabling verbose logs with ${external_pintor_default().brightBlue('EXTENSION_VERBOSE=1')} or review your extension config.`
|
|
75
75
|
].join('\n');
|
|
76
76
|
}
|
package/dist/module.cjs
CHANGED
|
@@ -133609,7 +133609,7 @@ var __webpack_modules__ = {
|
|
|
133609
133609
|
},
|
|
133610
133610
|
"./package.json" (module) {
|
|
133611
133611
|
"use strict";
|
|
133612
|
-
module.exports = JSON.parse('{"rE":"3.5.0-next.
|
|
133612
|
+
module.exports = JSON.parse('{"rE":"3.5.0-next.8","El":{"@rspack/core":"^1.7.2","@rspack/dev-server":"^1.1.5","@swc/core":"^1.15.8","@swc/helpers":"^0.5.18","adm-zip":"^0.5.16","browser-extension-manifest-fields":"^2.2.1","case-sensitive-paths-webpack-plugin":"^2.4.0","chrome-location2":"4.0.0","chromium-location":"2.0.0","content-security-policy-parser":"^0.6.0","cross-spawn":"^7.0.6","dotenv":"^17.2.3","edge-location":"2.2.0","firefox-location2":"3.0.0","go-git-it":"^5.0.3","ignore":"^7.0.5","loader-utils":"^3.3.1","magic-string":"^0.30.21","parse5":"^8.0.0","parse5-utilities":"^1.0.0","pintor":"0.3.0","schema-utils":"^4.3.3","tiny-glob":"^0.2.9","unique-names-generator":"^4.7.1","webextension-polyfill":"^0.12.0","webpack-merge":"^6.0.1","webpack-target-webextension":"^2.1.3","ws":"^8.19.0"}}');
|
|
133613
133613
|
}
|
|
133614
133614
|
};
|
|
133615
133615
|
var __webpack_module_cache__ = {};
|
package/dist/postinstall.cjs
CHANGED
|
@@ -128028,7 +128028,7 @@ var __webpack_exports__ = {};
|
|
|
128028
128028
|
var external_path_ = __webpack_require__("path");
|
|
128029
128029
|
var external_pintor_ = __webpack_require__("pintor");
|
|
128030
128030
|
var external_pintor_default = /*#__PURE__*/ __webpack_require__.n(external_pintor_);
|
|
128031
|
-
var package_namespaceObject = JSON.parse('{"rE":"3.5.0-next.
|
|
128031
|
+
var package_namespaceObject = JSON.parse('{"rE":"3.5.0-next.8"}');
|
|
128032
128032
|
function getLoggingPrefix(type) {
|
|
128033
128033
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
128034
128034
|
if (isAuthor) {
|
|
@@ -128737,11 +128737,27 @@ var __webpack_exports__ = {};
|
|
|
128737
128737
|
'add',
|
|
128738
128738
|
'ci'
|
|
128739
128739
|
]);
|
|
128740
|
+
const EXTENSION_DEPENDENCY_NAMES = new Set([
|
|
128741
|
+
'extension',
|
|
128742
|
+
'extension-develop'
|
|
128743
|
+
]);
|
|
128744
|
+
function getPostinstallModuleDir() {
|
|
128745
|
+
return process.env.EXTENSION_POSTINSTALL_MODULE_DIR || __dirname;
|
|
128746
|
+
}
|
|
128747
|
+
function isPathWithin(parent, child) {
|
|
128748
|
+
const normalizedParent = external_path_.resolve(parent);
|
|
128749
|
+
const normalizedChild = external_path_.resolve(child);
|
|
128750
|
+
return normalizedChild.startsWith(`${normalizedParent}${external_path_.sep}`);
|
|
128751
|
+
}
|
|
128740
128752
|
function isNpxExec() {
|
|
128741
128753
|
const command = process.env.npm_config_command || '';
|
|
128742
128754
|
if ('exec' === command || 'dlx' === command || 'npx' === command) return true;
|
|
128743
128755
|
const cwd = process.cwd();
|
|
128744
128756
|
if (cwd.includes(`${external_path_.sep}.npm${external_path_.sep}_npx${external_path_.sep}`) || cwd.includes(`${external_path_.sep}.pnpm${external_path_.sep}dlx${external_path_.sep}`) || cwd.includes(`${external_path_.sep}.bun${external_path_.sep}install${external_path_.sep}cache${external_path_.sep}`)) return true;
|
|
128757
|
+
const moduleDir = getPostinstallModuleDir();
|
|
128758
|
+
if (moduleDir.includes(`${external_path_.sep}.npm${external_path_.sep}_npx${external_path_.sep}`) || moduleDir.includes(`${external_path_.sep}.pnpm${external_path_.sep}dlx${external_path_.sep}`) || moduleDir.includes(`${external_path_.sep}.bun${external_path_.sep}install${external_path_.sep}cache${external_path_.sep}`)) return true;
|
|
128759
|
+
const npmCache = process.env.npm_config_cache || '';
|
|
128760
|
+
if (npmCache && isPathWithin(npmCache, moduleDir) && moduleDir.includes(`${external_path_.sep}_npx${external_path_.sep}`)) return true;
|
|
128745
128761
|
const argv = process.env.npm_config_argv;
|
|
128746
128762
|
if (argv) try {
|
|
128747
128763
|
const parsed = JSON.parse(argv);
|
|
@@ -128768,15 +128784,40 @@ var __webpack_exports__ = {};
|
|
|
128768
128784
|
return false;
|
|
128769
128785
|
}
|
|
128770
128786
|
}
|
|
128787
|
+
function hasExtensionDependency(packageJsonPath, argv) {
|
|
128788
|
+
try {
|
|
128789
|
+
const contents = external_fs_.readFileSync(packageJsonPath, 'utf8');
|
|
128790
|
+
const parsed = JSON.parse(contents);
|
|
128791
|
+
const dependencies = {
|
|
128792
|
+
...parsed.dependencies || {},
|
|
128793
|
+
...parsed.devDependencies || {},
|
|
128794
|
+
...parsed.optionalDependencies || {}
|
|
128795
|
+
};
|
|
128796
|
+
if (Object.keys(dependencies).some((name)=>EXTENSION_DEPENDENCY_NAMES.has(name))) return true;
|
|
128797
|
+
} catch {
|
|
128798
|
+
return false;
|
|
128799
|
+
}
|
|
128800
|
+
if (!argv) return false;
|
|
128801
|
+
try {
|
|
128802
|
+
const parsed = JSON.parse(argv);
|
|
128803
|
+
const original = parsed.original || parsed.cooked || [];
|
|
128804
|
+
return original.some((value)=>EXTENSION_DEPENDENCY_NAMES.has(value));
|
|
128805
|
+
} catch {
|
|
128806
|
+
return false;
|
|
128807
|
+
}
|
|
128808
|
+
}
|
|
128771
128809
|
function logPostinstallDebug() {
|
|
128772
128810
|
if ('1' !== process.env.EXTENSION_DEBUG_POSTINSTALL) return;
|
|
128773
128811
|
try {
|
|
128774
128812
|
const payload = {
|
|
128775
128813
|
cwd: process.cwd(),
|
|
128814
|
+
moduleDir: getPostinstallModuleDir(),
|
|
128776
128815
|
initCwd: process.env.INIT_CWD || '',
|
|
128777
128816
|
npmConfigCommand: process.env.npm_config_command || '',
|
|
128778
128817
|
npmConfigArgv: process.env.npm_config_argv || '',
|
|
128779
|
-
npmConfigUserAgent: process.env.npm_config_user_agent || ''
|
|
128818
|
+
npmConfigUserAgent: process.env.npm_config_user_agent || '',
|
|
128819
|
+
npmConfigPrefix: process.env.npm_config_prefix || '',
|
|
128820
|
+
npmConfigCache: process.env.npm_config_cache || ''
|
|
128780
128821
|
};
|
|
128781
128822
|
const logPath = external_path_.join(external_os_namespaceObject.tmpdir(), 'extension-postinstall-debug.log');
|
|
128782
128823
|
external_fs_.appendFileSync(logPath, `${JSON.stringify(payload)}\n`);
|
|
@@ -128790,6 +128831,7 @@ var __webpack_exports__ = {};
|
|
|
128790
128831
|
const initCwd = process.env.INIT_CWD || process.cwd();
|
|
128791
128832
|
const packageJsonPath = external_path_.join(initCwd, 'package.json');
|
|
128792
128833
|
if (!external_fs_.existsSync(packageJsonPath)) return;
|
|
128834
|
+
if (!hasExtensionDependency(packageJsonPath, process.env.npm_config_argv)) return;
|
|
128793
128835
|
try {
|
|
128794
128836
|
const projectStructure = {
|
|
128795
128837
|
manifestPath: external_path_.join(initCwd, 'manifest.json'),
|
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"name": "extension-develop",
|
|
26
|
-
"version": "3.5.0-next.
|
|
26
|
+
"version": "3.5.0-next.8",
|
|
27
27
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
28
28
|
"author": {
|
|
29
29
|
"name": "Cezar Augusto",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@prefresh/core": "1.5.9",
|
|
106
106
|
"@prefresh/utils": "1.2.1",
|
|
107
107
|
"@prefresh/webpack": "4.0.6",
|
|
108
|
-
"@rslib/core": "^0.19.
|
|
108
|
+
"@rslib/core": "^0.19.4",
|
|
109
109
|
"@rspack/plugin-preact-refresh": "1.1.4",
|
|
110
110
|
"@rspack/plugin-react-refresh": "1.6.0",
|
|
111
111
|
"@types/adm-zip": "^0.5.7",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@types/chrome": "^0.1.33",
|
|
114
114
|
"@types/cross-spawn": "^6.0.6",
|
|
115
115
|
"@types/loader-utils": "^3.0.0",
|
|
116
|
-
"@types/node": "^25.0
|
|
116
|
+
"@types/node": "^25.2.0",
|
|
117
117
|
"@types/sass-loader": "8.0.10",
|
|
118
118
|
"@types/webextension-polyfill": "0.12.4",
|
|
119
119
|
"@types/ws": "^8.18.1",
|