extension-develop 3.5.0-next.6 → 3.5.0-next.9
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 +95 -132
- package/package.json +3 -4
- package/dist/postinstall.cjs +0 -128845
- package/dist/postinstall.cjs.LICENSE.txt +0 -24
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
|
@@ -130962,77 +130962,39 @@ var __webpack_modules__ = {
|
|
|
130962
130962
|
return;
|
|
130963
130963
|
}
|
|
130964
130964
|
}
|
|
130965
|
-
function getOptionalInstallCommand(pm, dependencies, installBaseDir
|
|
130965
|
+
function getOptionalInstallCommand(pm, dependencies, installBaseDir) {
|
|
130966
130966
|
const pmName = pm.name;
|
|
130967
|
-
if ('yarn' === pmName)
|
|
130968
|
-
|
|
130969
|
-
|
|
130970
|
-
|
|
130971
|
-
|
|
130972
|
-
|
|
130973
|
-
|
|
130974
|
-
|
|
130975
|
-
|
|
130976
|
-
|
|
130977
|
-
|
|
130978
|
-
|
|
130979
|
-
|
|
130980
|
-
|
|
130981
|
-
|
|
130982
|
-
|
|
130983
|
-
|
|
130984
|
-
|
|
130985
|
-
|
|
130986
|
-
|
|
130987
|
-
|
|
130988
|
-
|
|
130989
|
-
|
|
130990
|
-
|
|
130991
|
-
|
|
130992
|
-
|
|
130993
|
-
|
|
130994
|
-
|
|
130995
|
-
|
|
130996
|
-
|
|
130997
|
-
|
|
130998
|
-
'--prefix',
|
|
130999
|
-
installBaseDir,
|
|
131000
|
-
'dev' === saveMode ? '--save-dev' : '--save-optional'
|
|
131001
|
-
]);
|
|
131002
|
-
}
|
|
131003
|
-
if ('pnpm' === pmName) {
|
|
131004
|
-
if ('none' === saveMode) return (0, _webpack_lib_package_manager__rspack_import_4.tj)(pm, [
|
|
131005
|
-
'add',
|
|
131006
|
-
...dependencies,
|
|
131007
|
-
'--dir',
|
|
131008
|
-
installBaseDir,
|
|
131009
|
-
'--no-save',
|
|
131010
|
-
'--silent'
|
|
131011
|
-
]);
|
|
131012
|
-
return (0, _webpack_lib_package_manager__rspack_import_4.tj)(pm, [
|
|
131013
|
-
'add',
|
|
131014
|
-
...dependencies,
|
|
131015
|
-
'--dir',
|
|
131016
|
-
installBaseDir,
|
|
131017
|
-
'dev' === saveMode ? '--save-dev' : '--save-optional',
|
|
131018
|
-
'--silent'
|
|
131019
|
-
]);
|
|
131020
|
-
}
|
|
131021
|
-
if ('bun' === pmName) {
|
|
131022
|
-
if ('none' === saveMode) return (0, _webpack_lib_package_manager__rspack_import_4.tj)(pm, [
|
|
131023
|
-
'add',
|
|
131024
|
-
...dependencies,
|
|
131025
|
-
'--cwd',
|
|
131026
|
-
installBaseDir
|
|
131027
|
-
]);
|
|
131028
|
-
return (0, _webpack_lib_package_manager__rspack_import_4.tj)(pm, [
|
|
131029
|
-
'add',
|
|
131030
|
-
...dependencies,
|
|
131031
|
-
'--cwd',
|
|
131032
|
-
installBaseDir,
|
|
131033
|
-
'dev' === saveMode ? '--dev' : '--optional'
|
|
131034
|
-
]);
|
|
131035
|
-
}
|
|
130967
|
+
if ('yarn' === pmName) return (0, _webpack_lib_package_manager__rspack_import_4.tj)(pm, [
|
|
130968
|
+
'--silent',
|
|
130969
|
+
'add',
|
|
130970
|
+
...dependencies,
|
|
130971
|
+
'--cwd',
|
|
130972
|
+
installBaseDir,
|
|
130973
|
+
'--optional'
|
|
130974
|
+
]);
|
|
130975
|
+
if ('npm' === pmName) return (0, _webpack_lib_package_manager__rspack_import_4.tj)(pm, [
|
|
130976
|
+
'--silent',
|
|
130977
|
+
'install',
|
|
130978
|
+
...dependencies,
|
|
130979
|
+
'--prefix',
|
|
130980
|
+
installBaseDir,
|
|
130981
|
+
'--save-optional'
|
|
130982
|
+
]);
|
|
130983
|
+
if ('pnpm' === pmName) return (0, _webpack_lib_package_manager__rspack_import_4.tj)(pm, [
|
|
130984
|
+
'add',
|
|
130985
|
+
...dependencies,
|
|
130986
|
+
'--dir',
|
|
130987
|
+
installBaseDir,
|
|
130988
|
+
'--save-optional',
|
|
130989
|
+
'--silent'
|
|
130990
|
+
]);
|
|
130991
|
+
if ('bun' === pmName) return (0, _webpack_lib_package_manager__rspack_import_4.tj)(pm, [
|
|
130992
|
+
'add',
|
|
130993
|
+
...dependencies,
|
|
130994
|
+
'--cwd',
|
|
130995
|
+
installBaseDir,
|
|
130996
|
+
'--optional'
|
|
130997
|
+
]);
|
|
131036
130998
|
return (0, _webpack_lib_package_manager__rspack_import_4.tj)(pm, [
|
|
131037
130999
|
'--silent',
|
|
131038
131000
|
'install',
|
|
@@ -131164,20 +131126,20 @@ var __webpack_modules__ = {
|
|
|
131164
131126
|
return false;
|
|
131165
131127
|
}
|
|
131166
131128
|
}
|
|
131167
|
-
async function installOptionalDependenciesBatch(integration, dependencies, integrations
|
|
131129
|
+
async function installOptionalDependenciesBatch(integration, dependencies, integrations) {
|
|
131168
131130
|
if (!dependencies.length) return;
|
|
131169
131131
|
let pm;
|
|
131170
131132
|
let wslContext;
|
|
131171
131133
|
let installBaseDir;
|
|
131172
131134
|
try {
|
|
131173
|
-
installBaseDir =
|
|
131135
|
+
installBaseDir = resolveDevelopInstallRoot();
|
|
131174
131136
|
if (!installBaseDir) throw new Error(_messages__rspack_import_2.eG(integration));
|
|
131175
131137
|
pm = (0, _webpack_lib_package_manager__rspack_import_4._c)({
|
|
131176
131138
|
cwd: installBaseDir
|
|
131177
131139
|
});
|
|
131178
131140
|
wslContext = resolveWslContext(installBaseDir);
|
|
131179
131141
|
if (!wslContext.useWsl) pm = await preferCorepackFallback(pm);
|
|
131180
|
-
const installCommand = getOptionalInstallCommand(pm, dependencies, wslContext.installDir || installBaseDir
|
|
131142
|
+
const installCommand = getOptionalInstallCommand(pm, dependencies, wslContext.installDir || installBaseDir);
|
|
131181
131143
|
const execCommand = wrapCommandForWsl(installCommand, wslContext);
|
|
131182
131144
|
const fallbackNpmCommand = wslContext.useWsl ? void 0 : (0, _webpack_lib_package_manager__rspack_import_4.sX)([
|
|
131183
131145
|
'--silent',
|
|
@@ -131320,9 +131282,14 @@ var __webpack_modules__ = {
|
|
|
131320
131282
|
return `${pintor__rspack_import_0_default().green('►►►')} ${name} installation completed.`;
|
|
131321
131283
|
}
|
|
131322
131284
|
function optionalToolingSetup(integrations, fallback, isAuthor) {
|
|
131323
|
-
const
|
|
131285
|
+
const formatList = (items)=>{
|
|
131286
|
+
if (1 === items.length) return items[0];
|
|
131287
|
+
if (2 === items.length) return `${items[0]} and ${items[1]}`;
|
|
131288
|
+
return `${items.slice(0, -1).join(', ')}, and ${items[items.length - 1]}`;
|
|
131289
|
+
};
|
|
131290
|
+
const list = integrations && integrations.length > 0 ? formatList(integrations) : fallback;
|
|
131324
131291
|
const prefix = isAuthor ? pintor__rspack_import_0_default().brightMagenta('►►► Author says') : pintor__rspack_import_0_default().gray('►►►');
|
|
131325
|
-
return `${prefix}
|
|
131292
|
+
return `${prefix} Installing project integrations for ${list} (this is a one time operation)`;
|
|
131326
131293
|
}
|
|
131327
131294
|
function optionalToolingRootInstall(integration) {
|
|
131328
131295
|
return `${pintor__rspack_import_0_default().brightMagenta('►►► Author says')} [${integration}] Installing root dependencies for dev...`;
|
|
@@ -132751,6 +132718,7 @@ var __webpack_modules__ = {
|
|
|
132751
132718
|
Ud: ()=>downloadingText,
|
|
132752
132719
|
Ut: ()=>treeWithDistFilesbrowser,
|
|
132753
132720
|
V_: ()=>previewing,
|
|
132721
|
+
Vy: ()=>installingDependencies,
|
|
132754
132722
|
W4: ()=>creatingProjectPath,
|
|
132755
132723
|
W6: ()=>treeWithSourceAndDistFiles,
|
|
132756
132724
|
Z0: ()=>dependenciesInstalledRunAgain,
|
|
@@ -132978,6 +132946,9 @@ var __webpack_modules__ = {
|
|
|
132978
132946
|
function isUsingExperimentalConfig(integration) {
|
|
132979
132947
|
return `${getLoggingPrefix('info')} Using ${pintor__rspack_import_2_default().yellow(integration)}.`;
|
|
132980
132948
|
}
|
|
132949
|
+
function installingDependencies() {
|
|
132950
|
+
return `${getLoggingPrefix('info')} Installing project dependencies...`;
|
|
132951
|
+
}
|
|
132981
132952
|
function debugDirs(manifestDir, packageJsonDir) {
|
|
132982
132953
|
return `${getLoggingPrefix('info')} Directories\n${pintor__rspack_import_2_default().gray('MANIFEST_DIR')} ${pintor__rspack_import_2_default().underline(manifestDir)}\n${pintor__rspack_import_2_default().gray('PACKAGE_JSON_DIR')} ${pintor__rspack_import_2_default().underline(packageJsonDir)}`;
|
|
132983
132954
|
}
|
|
@@ -133609,7 +133580,7 @@ var __webpack_modules__ = {
|
|
|
133609
133580
|
},
|
|
133610
133581
|
"./package.json" (module) {
|
|
133611
133582
|
"use strict";
|
|
133612
|
-
module.exports = JSON.parse('{"rE":"3.5.0-next.
|
|
133583
|
+
module.exports = JSON.parse('{"rE":"3.5.0-next.9","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
133584
|
}
|
|
133614
133585
|
};
|
|
133615
133586
|
var __webpack_module_cache__ = {};
|
|
@@ -133686,9 +133657,9 @@ var __webpack_exports__ = {};
|
|
|
133686
133657
|
extensionStart: ()=>extensionStart,
|
|
133687
133658
|
ensureDependencies: ()=>ensureDependencies,
|
|
133688
133659
|
extensionPreview: ()=>extensionPreview,
|
|
133689
|
-
extensionBuild: ()=>extensionBuild
|
|
133660
|
+
extensionBuild: ()=>extensionBuild,
|
|
133661
|
+
preflightOptionalDependenciesForProject: ()=>preflightOptionalDependenciesForProject
|
|
133690
133662
|
});
|
|
133691
|
-
var external_module_ = __webpack_require__("module");
|
|
133692
133663
|
function getBuildSummary(browser, info) {
|
|
133693
133664
|
const assets = info?.assets || [];
|
|
133694
133665
|
return {
|
|
@@ -133700,6 +133671,7 @@ var __webpack_exports__ = {};
|
|
|
133700
133671
|
errors_count: (info?.errors || []).length
|
|
133701
133672
|
};
|
|
133702
133673
|
}
|
|
133674
|
+
var external_module_ = __webpack_require__("module");
|
|
133703
133675
|
var external_path_ = __webpack_require__("path");
|
|
133704
133676
|
var external_fs_ = __webpack_require__("fs");
|
|
133705
133677
|
var messages = __webpack_require__("./webpack/webpack-lib/messages.ts");
|
|
@@ -133988,6 +133960,7 @@ var __webpack_exports__ = {};
|
|
|
133988
133960
|
async function installDependencies(projectPath) {
|
|
133989
133961
|
const nodeModulesPath = external_path_.join(projectPath, 'node_modules');
|
|
133990
133962
|
const originalDirectory = process.cwd();
|
|
133963
|
+
const progressLabel = messages.Vy();
|
|
133991
133964
|
try {
|
|
133992
133965
|
process.chdir(projectPath);
|
|
133993
133966
|
const pm = (0, package_manager._c)({
|
|
@@ -134003,12 +133976,21 @@ var __webpack_exports__ = {};
|
|
|
134003
133976
|
});
|
|
134004
133977
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
134005
133978
|
const stdio = isAuthor ? 'inherit' : 'ignore';
|
|
133979
|
+
const progressEnabled = !isAuthor && (0, webpack_lib_progress.u)();
|
|
133980
|
+
const progress = (0, webpack_lib_progress.J)(progressLabel, {
|
|
133981
|
+
enabled: progressEnabled
|
|
133982
|
+
});
|
|
133983
|
+
if (!progressEnabled) console.log(progressLabel);
|
|
134006
133984
|
if (isAuthor) console.warn(messages.TL('project dependencies'));
|
|
134007
133985
|
const command = (0, package_manager.tj)(pm, dependenciesArgs);
|
|
134008
|
-
|
|
134009
|
-
|
|
134010
|
-
|
|
134011
|
-
|
|
133986
|
+
try {
|
|
133987
|
+
await (0, package_manager.Qt)(command.command, command.args, {
|
|
133988
|
+
cwd: projectPath,
|
|
133989
|
+
stdio
|
|
133990
|
+
});
|
|
133991
|
+
} finally{
|
|
133992
|
+
progress.stop();
|
|
133993
|
+
}
|
|
134012
133994
|
} catch (error) {
|
|
134013
133995
|
console.error(messages.RB(error));
|
|
134014
133996
|
process.exit(1);
|
|
@@ -134018,10 +134000,8 @@ var __webpack_exports__ = {};
|
|
|
134018
134000
|
}
|
|
134019
134001
|
async function ensureDependencies(projectPath, opts) {
|
|
134020
134002
|
const packageRoot = (0, check_build_dependencies.w1)();
|
|
134021
|
-
const
|
|
134022
|
-
const
|
|
134023
|
-
const shouldCheckUserDeps = opts?.installUserDeps !== false;
|
|
134024
|
-
const shouldInstallUserDeps = shouldCheckUserDeps && !!projectPath && (0, webpack_lib_paths.Bi)((0, webpack_lib_paths.G6)(projectPath));
|
|
134003
|
+
const missingBuild = packageRoot && !(0, check_build_dependencies.S)(packageRoot) ? (0, check_build_dependencies.Cf)(packageRoot) : [];
|
|
134004
|
+
const shouldInstallUserDeps = !!projectPath && !opts?.skipProjectInstall && (0, webpack_lib_paths.Bi)((0, webpack_lib_paths.G6)(projectPath));
|
|
134025
134005
|
const needsBuildInstall = missingBuild.length > 0;
|
|
134026
134006
|
const needsUserInstall = shouldInstallUserDeps;
|
|
134027
134007
|
if (!needsBuildInstall && !needsUserInstall) return {
|
|
@@ -134189,7 +134169,13 @@ var __webpack_exports__ = {};
|
|
|
134189
134169
|
return;
|
|
134190
134170
|
}
|
|
134191
134171
|
}
|
|
134192
|
-
function
|
|
134172
|
+
async function preflightOptionalDependencies(projectStructure, mode, opts) {
|
|
134173
|
+
const { packageJsonDir } = (0, webpack_lib_paths.fu)(projectStructure);
|
|
134174
|
+
const projectPath = packageJsonDir;
|
|
134175
|
+
if (hasPreflightMarker(projectPath)) {
|
|
134176
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${external_pintor_default().brightMagenta('►►► Author says')} Optional deps preflight skipped (cache hit).`);
|
|
134177
|
+
return;
|
|
134178
|
+
}
|
|
134193
134179
|
const missingOptionalDeps = new Set();
|
|
134194
134180
|
const usedIntegrations = [];
|
|
134195
134181
|
const usesTypeScript = (0, typescript.eE)(projectPath);
|
|
@@ -134254,25 +134240,9 @@ var __webpack_exports__ = {};
|
|
|
134254
134240
|
missingOptionalDeps.add('postcss-loader');
|
|
134255
134241
|
usedIntegrations.push('PostCSS');
|
|
134256
134242
|
}
|
|
134257
|
-
|
|
134258
|
-
missingOptionalDeps: Array.from(missingOptionalDeps),
|
|
134259
|
-
usedIntegrations
|
|
134260
|
-
};
|
|
134261
|
-
}
|
|
134262
|
-
async function preflightOptionalDependencies(projectStructure, mode, opts) {
|
|
134263
|
-
const { packageJsonDir } = (0, webpack_lib_paths.fu)(projectStructure);
|
|
134264
|
-
const projectPath = packageJsonDir;
|
|
134265
|
-
if (hasPreflightMarker(projectPath)) {
|
|
134266
|
-
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${external_pintor_default().brightMagenta('►►► Author says')} Optional deps preflight skipped (cache hit).`);
|
|
134267
|
-
return;
|
|
134268
|
-
}
|
|
134269
|
-
const { missingOptionalDeps, usedIntegrations } = getMissingOptionalDependencies(projectPath);
|
|
134270
|
-
if (missingOptionalDeps.length > 0) {
|
|
134243
|
+
if (missingOptionalDeps.size > 0) {
|
|
134271
134244
|
const uniqueIntegrations = Array.from(new Set(usedIntegrations));
|
|
134272
|
-
const didInstall = await (0, frameworks_lib_integrations.Dy)('Optional', missingOptionalDeps, uniqueIntegrations
|
|
134273
|
-
installBaseDir: opts?.installBaseDir,
|
|
134274
|
-
saveMode: opts?.saveMode
|
|
134275
|
-
});
|
|
134245
|
+
const didInstall = await (0, frameworks_lib_integrations.Dy)('Optional', Array.from(missingOptionalDeps), uniqueIntegrations);
|
|
134276
134246
|
if (!didInstall) throw new Error('[Optional] Optional dependencies failed to install.');
|
|
134277
134247
|
if (opts?.showRunAgainMessage !== false && 'true' === process.env.EXTENSION_AUTHOR_MODE) console.log(js_frameworks_lib_messages.Q2(uniqueIntegrations));
|
|
134278
134248
|
if (opts?.exitOnInstall !== false) {
|
|
@@ -134290,24 +134260,11 @@ var __webpack_exports__ = {};
|
|
|
134290
134260
|
}
|
|
134291
134261
|
async function ensureProjectReady(projectStructure, mode, opts) {
|
|
134292
134262
|
const { packageJsonDir } = (0, webpack_lib_paths.fu)(projectStructure);
|
|
134293
|
-
const result = await ensureDependencies(packageJsonDir,
|
|
134294
|
-
|
|
134295
|
-
|
|
134296
|
-
exitOnInstall: opts?.exitOnInstall
|
|
134297
|
-
showRunAgainMessage: opts?.showRunAgainMessage
|
|
134263
|
+
const result = await ensureDependencies(packageJsonDir, opts);
|
|
134264
|
+
await ensureDevelopArtifacts();
|
|
134265
|
+
if (shouldRunOptionalPreflight(projectStructure)) await preflightOptionalDependencies(projectStructure, mode, {
|
|
134266
|
+
exitOnInstall: opts?.exitOnInstall
|
|
134298
134267
|
});
|
|
134299
|
-
if (opts?.installBuildDeps !== false) await ensureDevelopArtifacts();
|
|
134300
|
-
const shouldInstallOptional = opts?.installOptionalDeps !== false;
|
|
134301
|
-
if (shouldInstallOptional && shouldRunOptionalPreflight(projectStructure)) {
|
|
134302
|
-
const runOptional = ()=>preflightOptionalDependencies(projectStructure, mode, {
|
|
134303
|
-
exitOnInstall: opts?.exitOnInstall,
|
|
134304
|
-
showRunAgainMessage: opts?.showRunAgainMessage
|
|
134305
|
-
});
|
|
134306
|
-
if (opts?.backgroundOptionalDeps) runOptional().catch((error)=>{
|
|
134307
|
-
console.error(error);
|
|
134308
|
-
});
|
|
134309
|
-
else await runOptional();
|
|
134310
|
-
}
|
|
134311
134268
|
return result;
|
|
134312
134269
|
}
|
|
134313
134270
|
async function ensureDevelopArtifacts() {
|
|
@@ -134343,10 +134300,9 @@ var __webpack_exports__ = {};
|
|
|
134343
134300
|
const { manifestDir, packageJsonDir } = (0, webpack_lib_paths.fu)(projectStructure);
|
|
134344
134301
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
134345
134302
|
try {
|
|
134303
|
+
const shouldInstallProjectDeps = !isAuthor || buildOptions?.install !== false;
|
|
134346
134304
|
await ensureProjectReady(projectStructure, 'production', {
|
|
134347
|
-
|
|
134348
|
-
installBuildDeps: false,
|
|
134349
|
-
installOptionalDeps: false,
|
|
134305
|
+
skipProjectInstall: isVitest || !projectStructure.packageJsonPath || !shouldInstallProjectDeps,
|
|
134350
134306
|
exitOnInstall: false,
|
|
134351
134307
|
showRunAgainMessage: false
|
|
134352
134308
|
});
|
|
@@ -134462,10 +134418,9 @@ var __webpack_exports__ = {};
|
|
|
134462
134418
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
134463
134419
|
const debug = isAuthor;
|
|
134464
134420
|
const { manifestDir, packageJsonDir } = (0, webpack_lib_paths.fu)(projectStructure);
|
|
134421
|
+
const shouldInstallProjectDeps = !isAuthor || false !== devOptions.install;
|
|
134465
134422
|
await ensureProjectReady(projectStructure, 'development', {
|
|
134466
|
-
|
|
134467
|
-
installBuildDeps: false,
|
|
134468
|
-
installOptionalDeps: false,
|
|
134423
|
+
skipProjectInstall: !projectStructure.packageJsonPath || !shouldInstallProjectDeps,
|
|
134469
134424
|
exitOnInstall: false,
|
|
134470
134425
|
showRunAgainMessage: false
|
|
134471
134426
|
});
|
|
@@ -134637,10 +134592,9 @@ var __webpack_exports__ = {};
|
|
|
134637
134592
|
try {
|
|
134638
134593
|
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
134639
134594
|
const debug = isAuthor;
|
|
134595
|
+
const shouldInstallProjectDeps = !isAuthor || false !== startOptions.install;
|
|
134640
134596
|
await ensureProjectReady(projectStructure, 'development', {
|
|
134641
|
-
|
|
134642
|
-
installBuildDeps: false,
|
|
134643
|
-
installOptionalDeps: false,
|
|
134597
|
+
skipProjectInstall: !projectStructure.packageJsonPath || !shouldInstallProjectDeps,
|
|
134644
134598
|
exitOnInstall: false,
|
|
134645
134599
|
showRunAgainMessage: false
|
|
134646
134600
|
});
|
|
@@ -134674,18 +134628,27 @@ var __webpack_exports__ = {};
|
|
|
134674
134628
|
process.exit(1);
|
|
134675
134629
|
}
|
|
134676
134630
|
}
|
|
134631
|
+
async function preflightOptionalDependenciesForProject(pathOrRemoteUrl, mode = 'development') {
|
|
134632
|
+
const projectStructure = await getProjectStructure(pathOrRemoteUrl);
|
|
134633
|
+
await preflightOptionalDependencies(projectStructure, mode, {
|
|
134634
|
+
exitOnInstall: false,
|
|
134635
|
+
showRunAgainMessage: false
|
|
134636
|
+
});
|
|
134637
|
+
}
|
|
134677
134638
|
})();
|
|
134678
134639
|
exports.ensureDependencies = __webpack_exports__.ensureDependencies;
|
|
134679
134640
|
exports.extensionBuild = __webpack_exports__.extensionBuild;
|
|
134680
134641
|
exports.extensionDev = __webpack_exports__.extensionDev;
|
|
134681
134642
|
exports.extensionPreview = __webpack_exports__.extensionPreview;
|
|
134682
134643
|
exports.extensionStart = __webpack_exports__.extensionStart;
|
|
134644
|
+
exports.preflightOptionalDependenciesForProject = __webpack_exports__.preflightOptionalDependenciesForProject;
|
|
134683
134645
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
134684
134646
|
"ensureDependencies",
|
|
134685
134647
|
"extensionBuild",
|
|
134686
134648
|
"extensionDev",
|
|
134687
134649
|
"extensionPreview",
|
|
134688
|
-
"extensionStart"
|
|
134650
|
+
"extensionStart",
|
|
134651
|
+
"preflightOptionalDependenciesForProject"
|
|
134689
134652
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
134690
134653
|
Object.defineProperty(exports, '__esModule', {
|
|
134691
134654
|
value: true
|
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.9",
|
|
27
27
|
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
28
28
|
"author": {
|
|
29
29
|
"name": "Cezar Augusto",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"registry": "https://registry.npmjs.org"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
-
"postinstall": "node -e \"const fs=require('fs');const path=require('path');const entry=path.join(__dirname,'dist','postinstall.cjs');if(fs.existsSync(entry))require(entry);\"",
|
|
43
42
|
"prepublishOnly": "node scripts/sync-build-dependencies.mjs && rslib build && node ../../scripts/build-extensions.cjs",
|
|
44
43
|
"sync-build-deps": "node scripts/sync-build-dependencies.mjs",
|
|
45
44
|
"compile": "rslib build",
|
|
@@ -105,7 +104,7 @@
|
|
|
105
104
|
"@prefresh/core": "1.5.9",
|
|
106
105
|
"@prefresh/utils": "1.2.1",
|
|
107
106
|
"@prefresh/webpack": "4.0.6",
|
|
108
|
-
"@rslib/core": "^0.19.
|
|
107
|
+
"@rslib/core": "^0.19.4",
|
|
109
108
|
"@rspack/plugin-preact-refresh": "1.1.4",
|
|
110
109
|
"@rspack/plugin-react-refresh": "1.6.0",
|
|
111
110
|
"@types/adm-zip": "^0.5.7",
|
|
@@ -113,7 +112,7 @@
|
|
|
113
112
|
"@types/chrome": "^0.1.33",
|
|
114
113
|
"@types/cross-spawn": "^6.0.6",
|
|
115
114
|
"@types/loader-utils": "^3.0.0",
|
|
116
|
-
"@types/node": "^25.0
|
|
115
|
+
"@types/node": "^25.2.0",
|
|
117
116
|
"@types/sass-loader": "8.0.10",
|
|
118
117
|
"@types/webextension-polyfill": "0.12.4",
|
|
119
118
|
"@types/ws": "^8.18.1",
|