extension-develop 3.3.1 → 3.3.2
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/module.js +39 -5
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -130608,6 +130608,25 @@ var __webpack_modules__ = {
|
|
|
130608
130608
|
const s = text && 0xfeff === text.charCodeAt(0) ? text.slice(1) : text;
|
|
130609
130609
|
return JSON.parse(s || '{}');
|
|
130610
130610
|
}
|
|
130611
|
+
function resolveDevelopRootFromDir(dir) {
|
|
130612
|
+
try {
|
|
130613
|
+
const packageJsonPath = path__rspack_import_0.join(dir, 'package.json');
|
|
130614
|
+
if (!fs__rspack_import_1.existsSync(packageJsonPath)) return;
|
|
130615
|
+
const pkg = parseJsonSafe(fs__rspack_import_1.readFileSync(packageJsonPath, 'utf8'));
|
|
130616
|
+
if (pkg?.name === 'extension-develop') return dir;
|
|
130617
|
+
} catch {}
|
|
130618
|
+
}
|
|
130619
|
+
function findDevelopRootFrom(startDir) {
|
|
130620
|
+
let currentDir = startDir;
|
|
130621
|
+
const maxDepth = 6;
|
|
130622
|
+
for(let i = 0; i < maxDepth; i++){
|
|
130623
|
+
const root = resolveDevelopRootFromDir(currentDir);
|
|
130624
|
+
if (root) return root;
|
|
130625
|
+
const parent = path__rspack_import_0.dirname(currentDir);
|
|
130626
|
+
if (parent === currentDir) break;
|
|
130627
|
+
currentDir = parent;
|
|
130628
|
+
}
|
|
130629
|
+
}
|
|
130611
130630
|
function isFromPnpx() {
|
|
130612
130631
|
if (process.env.npm_config_user_agent?.includes('pnpm')) return 'pnpm';
|
|
130613
130632
|
return false;
|
|
@@ -130640,13 +130659,17 @@ var __webpack_modules__ = {
|
|
|
130640
130659
|
function resolveDevelopInstallRoot() {
|
|
130641
130660
|
const directRoot = (0, _webpack_lib_check_build_dependencies__rspack_import_4.w1)();
|
|
130642
130661
|
if (directRoot) return directRoot;
|
|
130662
|
+
try {
|
|
130663
|
+
const candidateRoot = findDevelopRootFrom(__dirname);
|
|
130664
|
+
if (candidateRoot) return candidateRoot;
|
|
130665
|
+
} catch {}
|
|
130643
130666
|
try {
|
|
130644
130667
|
const pkgPath = require.resolve('extension-develop/package.json', {
|
|
130645
130668
|
paths: [
|
|
130646
|
-
|
|
130669
|
+
__dirname
|
|
130647
130670
|
]
|
|
130648
130671
|
});
|
|
130649
|
-
return path__rspack_import_0.dirname(pkgPath);
|
|
130672
|
+
return resolveDevelopRootFromDir(path__rspack_import_0.dirname(pkgPath));
|
|
130650
130673
|
} catch {
|
|
130651
130674
|
return;
|
|
130652
130675
|
}
|
|
@@ -130734,7 +130757,8 @@ var __webpack_modules__ = {
|
|
|
130734
130757
|
if (!dependencies.length) return;
|
|
130735
130758
|
try {
|
|
130736
130759
|
const pm = await resolvePackageManager();
|
|
130737
|
-
const installBaseDir = resolveDevelopInstallRoot()
|
|
130760
|
+
const installBaseDir = resolveDevelopInstallRoot();
|
|
130761
|
+
if (!installBaseDir) throw new Error(_messages__rspack_import_3.eG(integration));
|
|
130738
130762
|
const installCommand = getOptionalInstallCommand(pm, dependencies, installBaseDir);
|
|
130739
130763
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
130740
130764
|
console.log(_messages__rspack_import_3._j([
|
|
@@ -130763,7 +130787,8 @@ var __webpack_modules__ = {
|
|
|
130763
130787
|
if (!dependencies.length) return;
|
|
130764
130788
|
try {
|
|
130765
130789
|
const pm = await resolvePackageManager();
|
|
130766
|
-
const installBaseDir = resolveDevelopInstallRoot()
|
|
130790
|
+
const installBaseDir = resolveDevelopInstallRoot();
|
|
130791
|
+
if (!installBaseDir) throw new Error(_messages__rspack_import_3.eG(integration));
|
|
130767
130792
|
const installCommand = getOptionalInstallCommand(pm, dependencies, installBaseDir);
|
|
130768
130793
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
130769
130794
|
console.log(_messages__rspack_import_3._j(integrations, integration, isAuthor));
|
|
@@ -130838,6 +130863,7 @@ var __webpack_modules__ = {
|
|
|
130838
130863
|
Se: ()=>missingSassDependency,
|
|
130839
130864
|
_j: ()=>optionalToolingSetup,
|
|
130840
130865
|
cr: ()=>optionalToolingRootInstall,
|
|
130866
|
+
eG: ()=>optionalInstallRootMissing,
|
|
130841
130867
|
fD: ()=>cssConfigsDetected,
|
|
130842
130868
|
uo: ()=>cssIntegrationsEnabled,
|
|
130843
130869
|
ys: ()=>optionalToolingReady,
|
|
@@ -130874,6 +130900,14 @@ var __webpack_modules__ = {
|
|
|
130874
130900
|
const prefix = isAuthor ? pintor__rspack_import_0_default().brightMagenta('ERROR Author says') : pintor__rspack_import_0_default().red('ERROR');
|
|
130875
130901
|
return `${prefix} [${integration}] Failed to install dependencies.\n${pintor__rspack_import_0_default().red(String(error?.message || error))}`;
|
|
130876
130902
|
}
|
|
130903
|
+
function optionalInstallRootMissing(integration) {
|
|
130904
|
+
const prefix = pintor__rspack_import_0_default().red('ERROR');
|
|
130905
|
+
return [
|
|
130906
|
+
`${prefix} [${integration}] Failed to locate the extension-develop runtime.`,
|
|
130907
|
+
'Optional tooling must install into the extension-develop package, not the user project.',
|
|
130908
|
+
'Reinstall Extension.js or run the command from a valid Extension.js installation.'
|
|
130909
|
+
].join('\n');
|
|
130910
|
+
}
|
|
130877
130911
|
function missingSassDependency() {
|
|
130878
130912
|
const prefix = pintor__rspack_import_0_default().red('►►►');
|
|
130879
130913
|
return [
|
|
@@ -132767,7 +132801,7 @@ var __webpack_modules__ = {
|
|
|
132767
132801
|
},
|
|
132768
132802
|
"./package.json" (module) {
|
|
132769
132803
|
"use strict";
|
|
132770
|
-
module.exports = JSON.parse('{"rE":"3.3.
|
|
132804
|
+
module.exports = JSON.parse('{"rE":"3.3.2","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"}}');
|
|
132771
132805
|
}
|
|
132772
132806
|
};
|
|
132773
132807
|
var __webpack_module_cache__ = {};
|