extension-develop 3.8.1 → 3.8.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.cjs +89 -44
- package/package.json +1 -1
package/dist/module.cjs
CHANGED
|
@@ -131913,16 +131913,17 @@ var __webpack_modules__ = {
|
|
|
131913
131913
|
V: ()=>maybeUseLess
|
|
131914
131914
|
});
|
|
131915
131915
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
131916
|
-
var
|
|
131917
|
-
var
|
|
131918
|
-
var
|
|
131919
|
-
var
|
|
131920
|
-
var
|
|
131916
|
+
var module__rspack_import_1 = __webpack_require__("module");
|
|
131917
|
+
var pintor__rspack_import_2 = __webpack_require__("pintor");
|
|
131918
|
+
var pintor__rspack_import_2_default = /*#__PURE__*/ __webpack_require__.n(pintor__rspack_import_2);
|
|
131919
|
+
var _css_lib_messages__rspack_import_3 = __webpack_require__("./webpack/plugin-css/css-lib/messages.ts");
|
|
131920
|
+
var _css_lib_integrations__rspack_import_4 = __webpack_require__("./webpack/plugin-css/css-lib/integrations.ts");
|
|
131921
|
+
var _css_lib_is_content_script__rspack_import_5 = __webpack_require__("./webpack/plugin-css/css-lib/is-content-script.ts");
|
|
131921
131922
|
let userMessageDelivered = false;
|
|
131922
131923
|
function isUsingLess(projectPath) {
|
|
131923
|
-
if ((0,
|
|
131924
|
+
if ((0, _css_lib_integrations__rspack_import_4.ws)(projectPath, 'less')) {
|
|
131924
131925
|
if (!userMessageDelivered) {
|
|
131925
|
-
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${
|
|
131926
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${pintor__rspack_import_2_default().brightMagenta('►►► Author says')} ${_css_lib_messages__rspack_import_3.zA('LESS')}`);
|
|
131926
131927
|
userMessageDelivered = true;
|
|
131927
131928
|
}
|
|
131928
131929
|
return true;
|
|
@@ -131930,15 +131931,19 @@ var __webpack_modules__ = {
|
|
|
131930
131931
|
return false;
|
|
131931
131932
|
}
|
|
131932
131933
|
function resolveLessLoader(projectPath) {
|
|
131933
|
-
const extensionRoot = (0,
|
|
131934
|
-
const
|
|
131934
|
+
const extensionRoot = (0, _css_lib_integrations__rspack_import_4.He)();
|
|
131935
|
+
const bases = [
|
|
131935
131936
|
projectPath,
|
|
131936
131937
|
extensionRoot || void 0,
|
|
131937
131938
|
process.cwd()
|
|
131938
131939
|
].filter(Boolean);
|
|
131940
|
+
for (const base of bases)try {
|
|
131941
|
+
const req = (0, module__rspack_import_1.createRequire)(path__rspack_import_0.join(base, 'package.json'));
|
|
131942
|
+
return req.resolve('less-loader');
|
|
131943
|
+
} catch {}
|
|
131939
131944
|
try {
|
|
131940
131945
|
return require.resolve('less-loader', {
|
|
131941
|
-
paths
|
|
131946
|
+
paths: bases
|
|
131942
131947
|
});
|
|
131943
131948
|
} catch {
|
|
131944
131949
|
return;
|
|
@@ -131953,11 +131958,11 @@ var __webpack_modules__ = {
|
|
|
131953
131958
|
'less',
|
|
131954
131959
|
'less-loader'
|
|
131955
131960
|
];
|
|
131956
|
-
const didInstall = await (0,
|
|
131961
|
+
const didInstall = await (0, _css_lib_integrations__rspack_import_4.tm)('LESS', lessDependencies);
|
|
131957
131962
|
if (!didInstall) throw new Error('[LESS] Optional dependencies failed to install.');
|
|
131958
131963
|
lessLoaderPath = resolveLessLoader(projectPath);
|
|
131959
131964
|
if (!lessLoaderPath) throw new Error('[LESS] less-loader could not be resolved after optional dependency installation.');
|
|
131960
|
-
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(
|
|
131965
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(_css_lib_messages__rspack_import_3.Jv('LESS'));
|
|
131961
131966
|
}
|
|
131962
131967
|
return [
|
|
131963
131968
|
{
|
|
@@ -131990,7 +131995,7 @@ var __webpack_modules__ = {
|
|
|
131990
131995
|
generator: {
|
|
131991
131996
|
filename: "content_scripts/[name].[contenthash:8].css"
|
|
131992
131997
|
},
|
|
131993
|
-
issuer: (issuer)=>(0,
|
|
131998
|
+
issuer: (issuer)=>(0, _css_lib_is_content_script__rspack_import_5.z)(issuer, resolvedManifestPath, projectPath)
|
|
131994
131999
|
}
|
|
131995
132000
|
];
|
|
131996
132001
|
}
|
|
@@ -132190,7 +132195,16 @@ var __webpack_modules__ = {
|
|
|
132190
132195
|
].filter(Boolean);
|
|
132191
132196
|
return Array.from(new Set(paths));
|
|
132192
132197
|
};
|
|
132198
|
+
const resolveWithCreateRequire = (id)=>{
|
|
132199
|
+
const bases = getResolutionPaths();
|
|
132200
|
+
for (const base of bases)try {
|
|
132201
|
+
const req = (0, module__rspack_import_2.createRequire)(path__rspack_import_0.join(base, 'package.json'));
|
|
132202
|
+
return req.resolve(id);
|
|
132203
|
+
} catch {}
|
|
132204
|
+
};
|
|
132193
132205
|
const resolvePostCssLoader = ()=>{
|
|
132206
|
+
const fromRuntimeRequire = resolveWithCreateRequire('postcss-loader');
|
|
132207
|
+
if (fromRuntimeRequire) return fromRuntimeRequire;
|
|
132194
132208
|
try {
|
|
132195
132209
|
return require.resolve('postcss-loader', {
|
|
132196
132210
|
paths: getResolutionPaths()
|
|
@@ -132376,24 +132390,30 @@ var __webpack_modules__ = {
|
|
|
132376
132390
|
}
|
|
132377
132391
|
function resolveSassLoader(projectPath) {
|
|
132378
132392
|
const extensionRoot = (0, _css_lib_integrations__rspack_import_4.He)();
|
|
132379
|
-
const
|
|
132393
|
+
const bases = [
|
|
132380
132394
|
projectPath,
|
|
132381
132395
|
extensionRoot || void 0,
|
|
132382
132396
|
process.cwd()
|
|
132383
132397
|
].filter(Boolean);
|
|
132398
|
+
for (const base of bases)try {
|
|
132399
|
+
const req = (0, module__rspack_import_1.createRequire)(path__rspack_import_0.join(base, 'package.json'));
|
|
132400
|
+
return req.resolve('sass-loader');
|
|
132401
|
+
} catch {}
|
|
132384
132402
|
try {
|
|
132385
132403
|
return require.resolve('sass-loader', {
|
|
132386
|
-
paths
|
|
132404
|
+
paths: bases
|
|
132387
132405
|
});
|
|
132388
132406
|
} catch {
|
|
132389
132407
|
return;
|
|
132390
132408
|
}
|
|
132391
132409
|
}
|
|
132392
132410
|
function resolveSassImplementation(projectPath) {
|
|
132411
|
+
const extensionRoot = (0, _css_lib_integrations__rspack_import_4.He)();
|
|
132393
132412
|
const bases = [
|
|
132394
132413
|
projectPath,
|
|
132414
|
+
extensionRoot || void 0,
|
|
132395
132415
|
process.cwd()
|
|
132396
|
-
];
|
|
132416
|
+
].filter(Boolean);
|
|
132397
132417
|
for (const base of bases)try {
|
|
132398
132418
|
const req = (0, module__rspack_import_1.createRequire)(path__rspack_import_0.join(base, 'package.json'));
|
|
132399
132419
|
let mod = req('sass');
|
|
@@ -132620,14 +132640,18 @@ var __webpack_modules__ = {
|
|
|
132620
132640
|
let userMessageDelivered = false;
|
|
132621
132641
|
function resolveWithRuntimePaths(id, projectPath) {
|
|
132622
132642
|
const extensionRoot = (0, _frameworks_lib_integrations__rspack_import_4.He)();
|
|
132623
|
-
const
|
|
132643
|
+
const bases = [
|
|
132624
132644
|
projectPath,
|
|
132625
132645
|
extensionRoot || void 0,
|
|
132626
132646
|
process.cwd()
|
|
132627
132647
|
].filter(Boolean);
|
|
132648
|
+
for (const base of bases)try {
|
|
132649
|
+
const req = (0, module__rspack_import_1.createRequire)(path__rspack_import_0.join(base, 'package.json'));
|
|
132650
|
+
return req.resolve(id);
|
|
132651
|
+
} catch {}
|
|
132628
132652
|
try {
|
|
132629
132653
|
return require.resolve(id, {
|
|
132630
|
-
paths
|
|
132654
|
+
paths: bases
|
|
132631
132655
|
});
|
|
132632
132656
|
} catch {
|
|
132633
132657
|
return;
|
|
@@ -132720,14 +132744,18 @@ var __webpack_modules__ = {
|
|
|
132720
132744
|
let userMessageDelivered = false;
|
|
132721
132745
|
function resolveWithRuntimePaths(id, projectPath) {
|
|
132722
132746
|
const extensionRoot = (0, _frameworks_lib_integrations__rspack_import_4.He)();
|
|
132723
|
-
const
|
|
132747
|
+
const bases = [
|
|
132724
132748
|
projectPath,
|
|
132725
132749
|
extensionRoot || void 0,
|
|
132726
132750
|
process.cwd()
|
|
132727
132751
|
].filter(Boolean);
|
|
132752
|
+
for (const base of bases)try {
|
|
132753
|
+
const req = (0, module__rspack_import_1.createRequire)(path__rspack_import_0.join(base, 'package.json'));
|
|
132754
|
+
return req.resolve(id);
|
|
132755
|
+
} catch {}
|
|
132728
132756
|
try {
|
|
132729
132757
|
return require.resolve(id, {
|
|
132730
|
-
paths
|
|
132758
|
+
paths: bases
|
|
132731
132759
|
});
|
|
132732
132760
|
} catch {
|
|
132733
132761
|
return;
|
|
@@ -132820,26 +132848,38 @@ var __webpack_modules__ = {
|
|
|
132820
132848
|
});
|
|
132821
132849
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
132822
132850
|
var fs__rspack_import_1 = __webpack_require__("fs");
|
|
132823
|
-
var
|
|
132824
|
-
var
|
|
132825
|
-
var
|
|
132851
|
+
var module__rspack_import_2 = __webpack_require__("module");
|
|
132852
|
+
var _js_frameworks_lib_messages__rspack_import_3 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/messages.ts");
|
|
132853
|
+
var _frameworks_lib_integrations__rspack_import_4 = __webpack_require__("./webpack/plugin-js-frameworks/frameworks-lib/integrations.ts");
|
|
132854
|
+
var _js_frameworks_lib_load_loader_options__rspack_import_5 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/load-loader-options.ts");
|
|
132826
132855
|
let userMessageDelivered = false;
|
|
132827
132856
|
function resolveWithRuntimePaths(id, projectPath) {
|
|
132828
|
-
const extensionRoot = (0,
|
|
132829
|
-
const
|
|
132857
|
+
const extensionRoot = (0, _frameworks_lib_integrations__rspack_import_4.He)();
|
|
132858
|
+
const bases = [
|
|
132830
132859
|
projectPath,
|
|
132831
132860
|
extensionRoot || void 0,
|
|
132832
132861
|
process.cwd()
|
|
132833
132862
|
].filter(Boolean);
|
|
132863
|
+
for (const base of bases)try {
|
|
132864
|
+
const req = (0, module__rspack_import_2.createRequire)(path__rspack_import_0.join(base, 'package.json'));
|
|
132865
|
+
return req.resolve(id);
|
|
132866
|
+
} catch {}
|
|
132834
132867
|
try {
|
|
132835
132868
|
return require.resolve(id, {
|
|
132836
|
-
paths
|
|
132869
|
+
paths: bases
|
|
132837
132870
|
});
|
|
132838
132871
|
} catch {
|
|
132839
132872
|
return;
|
|
132840
132873
|
}
|
|
132841
132874
|
}
|
|
132842
132875
|
function resolveFromProject(id, projectPath) {
|
|
132876
|
+
for (const base of [
|
|
132877
|
+
projectPath,
|
|
132878
|
+
process.cwd()
|
|
132879
|
+
])try {
|
|
132880
|
+
const req = (0, module__rspack_import_2.createRequire)(path__rspack_import_0.join(base, 'package.json'));
|
|
132881
|
+
return req.resolve(id);
|
|
132882
|
+
} catch {}
|
|
132843
132883
|
try {
|
|
132844
132884
|
return require.resolve(id, {
|
|
132845
132885
|
paths: [
|
|
@@ -132852,9 +132892,9 @@ var __webpack_modules__ = {
|
|
|
132852
132892
|
}
|
|
132853
132893
|
}
|
|
132854
132894
|
function isUsingSvelte(projectPath) {
|
|
132855
|
-
const using = (0,
|
|
132895
|
+
const using = (0, _frameworks_lib_integrations__rspack_import_4.ws)(projectPath, 'svelte');
|
|
132856
132896
|
if (using && !userMessageDelivered) {
|
|
132857
|
-
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(
|
|
132897
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(_js_frameworks_lib_messages__rspack_import_3.zA('Svelte'));
|
|
132858
132898
|
userMessageDelivered = true;
|
|
132859
132899
|
}
|
|
132860
132900
|
return using;
|
|
@@ -132866,29 +132906,29 @@ var __webpack_modules__ = {
|
|
|
132866
132906
|
const typeScriptDependencies = [
|
|
132867
132907
|
"typescript"
|
|
132868
132908
|
];
|
|
132869
|
-
const didInstallTs = await (0,
|
|
132909
|
+
const didInstallTs = await (0, _frameworks_lib_integrations__rspack_import_4.tm)('TypeScript', typeScriptDependencies);
|
|
132870
132910
|
if (!didInstallTs) throw new Error('[TypeScript] Optional dependencies failed to install.');
|
|
132871
132911
|
const svelteDependencies = [
|
|
132872
132912
|
'svelte-loader'
|
|
132873
132913
|
];
|
|
132874
|
-
const didInstallSvelte = await (0,
|
|
132914
|
+
const didInstallSvelte = await (0, _frameworks_lib_integrations__rspack_import_4.tm)('Svelte', svelteDependencies);
|
|
132875
132915
|
if (!didInstallSvelte) throw new Error('[Svelte] Optional dependencies failed to install.');
|
|
132876
132916
|
svelteLoaderPath = resolveFromProject('svelte-loader', projectPath) || resolveWithRuntimePaths('svelte-loader', projectPath);
|
|
132877
132917
|
if (!svelteLoaderPath) throw new Error('[Svelte] svelte-loader could not be resolved after optional dependency installation.');
|
|
132878
|
-
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(
|
|
132918
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(_js_frameworks_lib_messages__rspack_import_3.Jv('Svelte'));
|
|
132879
132919
|
}
|
|
132880
132920
|
const resolvedTypescript = resolveFromProject("typescript", projectPath) || resolveWithRuntimePaths("typescript", projectPath);
|
|
132881
132921
|
if (!resolvedTypescript) {
|
|
132882
132922
|
const typeScriptDependencies = [
|
|
132883
132923
|
"typescript"
|
|
132884
132924
|
];
|
|
132885
|
-
const didInstallTs = await (0,
|
|
132925
|
+
const didInstallTs = await (0, _frameworks_lib_integrations__rspack_import_4.tm)('TypeScript', typeScriptDependencies);
|
|
132886
132926
|
if (!didInstallTs) throw new Error('[TypeScript] Optional dependencies failed to install.');
|
|
132887
132927
|
const reResolvedTypescript = resolveFromProject("typescript", projectPath) || resolveWithRuntimePaths("typescript", projectPath);
|
|
132888
132928
|
if (!reResolvedTypescript) throw new Error('[TypeScript] TypeScript could not be resolved after optional dependency installation.');
|
|
132889
|
-
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(
|
|
132929
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(_js_frameworks_lib_messages__rspack_import_3.Jv('TypeScript'));
|
|
132890
132930
|
}
|
|
132891
|
-
const customOptions = await (0,
|
|
132931
|
+
const customOptions = await (0, _js_frameworks_lib_load_loader_options__rspack_import_5.g)(projectPath, 'svelte');
|
|
132892
132932
|
const defaultLoaders = [
|
|
132893
132933
|
{
|
|
132894
132934
|
test: /\.svelte\.ts$/,
|
|
@@ -132978,10 +133018,11 @@ var __webpack_modules__ = {
|
|
|
132978
133018
|
});
|
|
132979
133019
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
132980
133020
|
var fs__rspack_import_1 = __webpack_require__("fs");
|
|
132981
|
-
|
|
132982
|
-
var
|
|
132983
|
-
var
|
|
132984
|
-
var
|
|
133021
|
+
__webpack_require__("module");
|
|
133022
|
+
var pintor__rspack_import_3 = __webpack_require__("pintor");
|
|
133023
|
+
var pintor__rspack_import_3_default = /*#__PURE__*/ __webpack_require__.n(pintor__rspack_import_3);
|
|
133024
|
+
var _js_frameworks_lib_messages__rspack_import_4 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/messages.ts");
|
|
133025
|
+
var _frameworks_lib_integrations__rspack_import_5 = __webpack_require__("./webpack/plugin-js-frameworks/frameworks-lib/integrations.ts");
|
|
132985
133026
|
let hasShownUserMessage = false;
|
|
132986
133027
|
function findNearestPackageJsonDirectory(startPath) {
|
|
132987
133028
|
let currentDirectory = startPath;
|
|
@@ -133036,12 +133077,12 @@ var __webpack_modules__ = {
|
|
|
133036
133077
|
const hasTsFiles = hasTypeScriptSourceFiles(projectPath);
|
|
133037
133078
|
if (!hasShownUserMessage) {
|
|
133038
133079
|
if (TypeScriptAsDevDep || TypeScriptAsDep || hasTsFiles) if (tsConfigFilePath) {
|
|
133039
|
-
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${
|
|
133080
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${pintor__rspack_import_3_default().brightMagenta('►►► Author says')} ${_js_frameworks_lib_messages__rspack_import_4.zA('TypeScript')}`);
|
|
133040
133081
|
} else if (hasTsFiles) {
|
|
133041
133082
|
const errorMessage = '[Extension.js] Missing tsconfig.json next to package.json. Create one to use TypeScript.';
|
|
133042
133083
|
throw new Error(errorMessage);
|
|
133043
133084
|
} else {
|
|
133044
|
-
console.log(
|
|
133085
|
+
console.log(_js_frameworks_lib_messages__rspack_import_4.LR());
|
|
133045
133086
|
writeTsConfig(projectPath);
|
|
133046
133087
|
}
|
|
133047
133088
|
hasShownUserMessage = true;
|
|
@@ -133055,7 +133096,7 @@ var __webpack_modules__ = {
|
|
|
133055
133096
|
allowSyntheticDefaultImports: true,
|
|
133056
133097
|
esModuleInterop: true,
|
|
133057
133098
|
forceConsistentCasingInFileNames: true,
|
|
133058
|
-
jsx: (0,
|
|
133099
|
+
jsx: (0, _frameworks_lib_integrations__rspack_import_5.qQ)(projectPath) ? 'react-jsx' : 'preserve',
|
|
133059
133100
|
lib: [
|
|
133060
133101
|
'dom',
|
|
133061
133102
|
'dom.iterable',
|
|
@@ -133105,14 +133146,18 @@ var __webpack_modules__ = {
|
|
|
133105
133146
|
let userMessageDelivered = false;
|
|
133106
133147
|
function resolveWithRuntimePaths(id, projectPath) {
|
|
133107
133148
|
const extensionRoot = (0, _frameworks_lib_integrations__rspack_import_5.He)();
|
|
133108
|
-
const
|
|
133149
|
+
const bases = [
|
|
133109
133150
|
projectPath,
|
|
133110
133151
|
extensionRoot || void 0,
|
|
133111
133152
|
process.cwd()
|
|
133112
133153
|
].filter(Boolean);
|
|
133154
|
+
for (const base of bases)try {
|
|
133155
|
+
const req = (0, module__rspack_import_1.createRequire)(path__rspack_import_0.join(base, 'package.json'));
|
|
133156
|
+
return req.resolve(id);
|
|
133157
|
+
} catch {}
|
|
133113
133158
|
try {
|
|
133114
133159
|
return require.resolve(id, {
|
|
133115
|
-
paths
|
|
133160
|
+
paths: bases
|
|
133116
133161
|
});
|
|
133117
133162
|
} catch {
|
|
133118
133163
|
return;
|
|
@@ -134661,7 +134706,7 @@ var __webpack_modules__ = {
|
|
|
134661
134706
|
},
|
|
134662
134707
|
"./package.json" (module) {
|
|
134663
134708
|
"use strict";
|
|
134664
|
-
module.exports = JSON.parse('{"rE":"3.8.
|
|
134709
|
+
module.exports = JSON.parse('{"rE":"3.8.2","El":{"@rspack/core":"^1.7.5","@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","extension-from-store":"^0.1.1","firefox-location2":"3.0.0","go-git-it":"^5.1.1","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"}}');
|
|
134665
134710
|
}
|
|
134666
134711
|
};
|
|
134667
134712
|
var __webpack_module_cache__ = {};
|
package/package.json
CHANGED