extension-develop 3.1.0-next.8 → 3.2.0-next.10
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.js +234 -77
- package/dist/928.js +21 -7
- package/dist/content-script-wrapper.js +4 -1
- package/dist/ensure-hmr-for-scripts.js +2 -0
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/chrome/pages/centralized-logger.js +4 -5
- package/dist/extension-js-devtools/chrome/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chrome/pages/welcome.js +4 -4
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/chromium/pages/centralized-logger.js +4 -5
- package/dist/extension-js-devtools/chromium/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/chromium/pages/welcome.js +4 -4
- package/dist/extension-js-devtools/edge/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/edge/pages/centralized-logger.js +4 -5
- package/dist/extension-js-devtools/edge/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/edge/pages/welcome.js +4 -4
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.css +1 -1
- package/dist/extension-js-devtools/firefox/pages/centralized-logger.js +4 -5
- package/dist/extension-js-devtools/firefox/pages/welcome.css +1 -1
- package/dist/extension-js-devtools/firefox/pages/welcome.js +4 -4
- package/dist/extension-js-theme/chrome/manifest.json +66 -0
- package/dist/extension-js-theme/chromium/manifest.json +66 -0
- package/dist/extension-js-theme/edge/manifest.json +66 -0
- package/dist/extension-js-theme/firefox/manifest.json +66 -0
- package/dist/module.js +653 -175
- package/package.json +1 -3
- package/dist/add-centralized-logger-script-background.js +0 -220
- package/dist/add-centralized-logger-script-content.js +0 -172
- package/dist/add-centralized-logger-script.js +0 -323
- package/dist/extension-js-devtools/chrome/logo.png +0 -0
- package/dist/extension-js-devtools/chromium/logo.png +0 -0
- package/dist/extension-js-devtools/edge/logo.png +0 -0
- package/dist/extension-js-devtools/firefox/logo.png +0 -0
package/dist/module.js
CHANGED
|
@@ -127144,6 +127144,12 @@ var __webpack_modules__ = {
|
|
|
127144
127144
|
}
|
|
127145
127145
|
}
|
|
127146
127146
|
const printedKeys = new Set();
|
|
127147
|
+
function readUpdateSuffixOnce() {
|
|
127148
|
+
const suffix = process.env.EXTENSION_CLI_UPDATE_SUFFIX;
|
|
127149
|
+
if (!suffix) return null;
|
|
127150
|
+
delete process.env.EXTENSION_CLI_UPDATE_SUFFIX;
|
|
127151
|
+
return suffix;
|
|
127152
|
+
}
|
|
127147
127153
|
function keyFor(browser, outPath, hp) {
|
|
127148
127154
|
const host = (hp?.host || '127.0.0.1').toString();
|
|
127149
127155
|
const port = hp?.port == null ? '' : String(hp.port);
|
|
@@ -127154,6 +127160,7 @@ var __webpack_modules__ = {
|
|
|
127154
127160
|
if (printedKeys.has(k)) return false;
|
|
127155
127161
|
const info = await opts.getInfo() || null;
|
|
127156
127162
|
const manifestPath = external_path_.join(opts.outPath, 'manifest.json');
|
|
127163
|
+
const updateSuffix = readUpdateSuffixOnce();
|
|
127157
127164
|
if (!external_fs_.existsSync(manifestPath)) return false;
|
|
127158
127165
|
const manifest = JSON.parse(external_fs_.readFileSync(manifestPath, 'utf-8'));
|
|
127159
127166
|
const extensionId = info?.extensionId || opts.fallback?.extensionId || '(temporary)';
|
|
@@ -127169,9 +127176,10 @@ var __webpack_modules__ = {
|
|
|
127169
127176
|
}
|
|
127170
127177
|
};
|
|
127171
127178
|
console.log(messages.io8());
|
|
127172
|
-
console.log(messages.e_P(manifest, opts.browser, message, opts.browserVersionLine));
|
|
127179
|
+
console.log(messages.e_P(manifest, opts.browser, message, opts.browserVersionLine, updateSuffix || void 0));
|
|
127173
127180
|
console.log(messages.io8());
|
|
127174
127181
|
markBannerPrinted();
|
|
127182
|
+
process.env.EXTENSION_CLI_BANNER_PRINTED = 'true';
|
|
127175
127183
|
printedKeys.add(k);
|
|
127176
127184
|
return true;
|
|
127177
127185
|
}
|
|
@@ -127179,6 +127187,7 @@ var __webpack_modules__ = {
|
|
|
127179
127187
|
const k = keyFor(opts.browser, opts.outPath);
|
|
127180
127188
|
if (printedKeys.has(k)) return false;
|
|
127181
127189
|
const browserLabel = opts.browserVersionLine && opts.browserVersionLine.trim().length > 0 ? opts.browserVersionLine.trim() : String(opts.browser || 'unknown');
|
|
127190
|
+
const updateSuffix = readUpdateSuffixOnce();
|
|
127182
127191
|
try {
|
|
127183
127192
|
const manifestPath = external_path_.join(opts.outPath, 'manifest.json');
|
|
127184
127193
|
const manifest = JSON.parse(external_fs_.readFileSync(manifestPath, 'utf-8'));
|
|
@@ -127193,7 +127202,7 @@ var __webpack_modules__ = {
|
|
|
127193
127202
|
}
|
|
127194
127203
|
};
|
|
127195
127204
|
console.log(messages.io8());
|
|
127196
|
-
console.log(messages.e_P(manifest, opts.browser, message, browserLabel));
|
|
127205
|
+
console.log(messages.e_P(manifest, opts.browser, message, browserLabel, updateSuffix || void 0));
|
|
127197
127206
|
console.log(messages.io8());
|
|
127198
127207
|
} else {
|
|
127199
127208
|
const message = {
|
|
@@ -127206,7 +127215,7 @@ var __webpack_modules__ = {
|
|
|
127206
127215
|
}
|
|
127207
127216
|
};
|
|
127208
127217
|
console.log(messages.io8());
|
|
127209
|
-
console.log(messages.e_P(manifest, opts.browser, message, browserLabel));
|
|
127218
|
+
console.log(messages.e_P(manifest, opts.browser, message, browserLabel, updateSuffix || void 0));
|
|
127210
127219
|
console.log(messages.io8());
|
|
127211
127220
|
}
|
|
127212
127221
|
} catch {
|
|
@@ -127215,6 +127224,7 @@ var __webpack_modules__ = {
|
|
|
127215
127224
|
console.log(messages.io8());
|
|
127216
127225
|
}
|
|
127217
127226
|
markBannerPrinted();
|
|
127227
|
+
process.env.EXTENSION_CLI_BANNER_PRINTED = 'true';
|
|
127218
127228
|
printedKeys.add(k);
|
|
127219
127229
|
return true;
|
|
127220
127230
|
}
|
|
@@ -127412,6 +127422,11 @@ var __webpack_modules__ = {
|
|
|
127412
127422
|
const maybe = error?.message;
|
|
127413
127423
|
return String(maybe || error);
|
|
127414
127424
|
}
|
|
127425
|
+
function isWsl() {
|
|
127426
|
+
const hasEnv = Boolean(String(process.env.WSL_DISTRO_NAME || '').trim() || String(process.env.WSL_INTEROP || '').trim() || String(process.env.WSLENV || '').trim());
|
|
127427
|
+
if (hasEnv) return true;
|
|
127428
|
+
return false;
|
|
127429
|
+
}
|
|
127415
127430
|
function capitalizedBrowserName(browser) {
|
|
127416
127431
|
return `${browser.charAt(0).toUpperCase() + browser.slice(1)}`;
|
|
127417
127432
|
}
|
|
@@ -127458,7 +127473,12 @@ var __webpack_modules__ = {
|
|
|
127458
127473
|
}
|
|
127459
127474
|
function browserNotInstalledError(browser, browserBinaryLocation) {
|
|
127460
127475
|
const isUnreachable = 'null' == browserBinaryLocation ? `Browser ${capitalizedBrowserName(browser)} is not installed\n` : `Can't find the path for browser ${capitalizedBrowserName(browser)}\n`;
|
|
127461
|
-
|
|
127476
|
+
const wslHint = (()=>{
|
|
127477
|
+
if (!isWsl()) return '';
|
|
127478
|
+
const example = '/mnt/c/Program Files/Google/Chrome/Application/chrome.exe';
|
|
127479
|
+
return `\n\n${getLoggingPrefix('info')} WSL detected\n- Install a Linux browser in WSL, or\n- Provide a Windows binary path via ${pintor__rspack_import_0_default().blue('--chromium-binary')} ${pintor__rspack_import_0_default().gray(`\"${example}\"`)}\n (Tip: a shell alias like ${pintor__rspack_import_0_default().gray('google-chrome=...')} won't be used by Extension.js; use a real path or wrapper script.)`;
|
|
127480
|
+
})();
|
|
127481
|
+
return `${getLoggingPrefix('error')} ${isUnreachable}Either install the missing browser or choose a different one via ${pintor__rspack_import_0_default().blue('--browser')} ${pintor__rspack_import_0_default().gray('<chrome|edge|firefox>')}.\n\n${pintor__rspack_import_0_default().red('NOT FOUND')} ${pintor__rspack_import_0_default().underline(browserBinaryLocation || capitalizedBrowserName(browser) + 'BROWSER')}` + wslHint;
|
|
127462
127482
|
}
|
|
127463
127483
|
function browserLaunchError(browser, error) {
|
|
127464
127484
|
return `${getLoggingPrefix('error')} Error launching ${capitalizedBrowserName(browser)}:\n${pintor__rspack_import_0_default().red(errorDetail(error))}`;
|
|
@@ -127598,7 +127618,7 @@ var __webpack_modules__ = {
|
|
|
127598
127618
|
return body.join('\n') + '\n';
|
|
127599
127619
|
}
|
|
127600
127620
|
function firefoxLaunchCalled() {
|
|
127601
|
-
return `${getLoggingPrefix('info')}
|
|
127621
|
+
return `${getLoggingPrefix('info')} Firefox launch requested.`;
|
|
127602
127622
|
}
|
|
127603
127623
|
function firefoxBinaryArgsExtracted(args) {
|
|
127604
127624
|
return `${getLoggingPrefix('info')} Firefox binary args extracted: ${pintor__rspack_import_0_default().gray(args)}`;
|
|
@@ -127640,7 +127660,7 @@ var __webpack_modules__ = {
|
|
|
127640
127660
|
return `${getLoggingPrefix('info')} Waiting for Firefox to be ready with remote debugging...`;
|
|
127641
127661
|
}
|
|
127642
127662
|
function firefoxRemoteDebuggingReady() {
|
|
127643
|
-
return `${getLoggingPrefix('success')} Firefox is ready with remote debugging
|
|
127663
|
+
return `${getLoggingPrefix('success')} Firefox is ready with remote debugging.`;
|
|
127644
127664
|
}
|
|
127645
127665
|
function sourceInspectorFirefoxNotReadyYet(retries, maxRetries) {
|
|
127646
127666
|
return `${getLoggingPrefix('warn')} Firefox not ready yet, retrying... (${pintor__rspack_import_0_default().gray(retries.toString())}/${pintor__rspack_import_0_default().gray(maxRetries.toString())})`;
|
|
@@ -127649,7 +127669,7 @@ var __webpack_modules__ = {
|
|
|
127649
127669
|
return `${getLoggingPrefix('info')} Waiting for Chrome to be ready with remote debugging...`;
|
|
127650
127670
|
}
|
|
127651
127671
|
function chromeRemoteDebuggingReady() {
|
|
127652
|
-
return `${getLoggingPrefix('success')} Chrome is ready with remote debugging
|
|
127672
|
+
return `${getLoggingPrefix('success')} Chrome is ready with remote debugging.`;
|
|
127653
127673
|
}
|
|
127654
127674
|
function sourceInspectorChromeNotReadyYet(retries, maxRetries) {
|
|
127655
127675
|
return `${getLoggingPrefix('warn')} Chrome not ready yet, retrying... (${pintor__rspack_import_0_default().gray(retries.toString())}/${pintor__rspack_import_0_default().gray(maxRetries.toString())})`;
|
|
@@ -127679,7 +127699,7 @@ var __webpack_modules__ = {
|
|
|
127679
127699
|
return `${getLoggingPrefix('success')} Chrome is attached to the target with session ID: ${pintor__rspack_import_0_default().gray(sessionId)}`;
|
|
127680
127700
|
}
|
|
127681
127701
|
function sourceInspectorHTMLExtractionComplete() {
|
|
127682
|
-
return `${getLoggingPrefix('success')} Chrome HTML extraction is complete
|
|
127702
|
+
return `${getLoggingPrefix('success')} Chrome HTML extraction is complete.`;
|
|
127683
127703
|
}
|
|
127684
127704
|
function sourceInspectorInspectionFailed(error) {
|
|
127685
127705
|
return `${getLoggingPrefix('error')} Failed to inspect Chrome source: ${pintor__rspack_import_0_default().red(error)}`;
|
|
@@ -127736,7 +127756,7 @@ var __webpack_modules__ = {
|
|
|
127736
127756
|
return `${getLoggingPrefix('error')} Failed to update Chrome HTML: ${pintor__rspack_import_0_default().red(error)}`;
|
|
127737
127757
|
}
|
|
127738
127758
|
function sourceInspectorCleanupComplete() {
|
|
127739
|
-
return `${getLoggingPrefix('success')} Chrome source inspector cleaned up
|
|
127759
|
+
return `${getLoggingPrefix('success')} Chrome source inspector cleaned up.`;
|
|
127740
127760
|
}
|
|
127741
127761
|
function sourceInspectorCleanupError(error) {
|
|
127742
127762
|
return `${getLoggingPrefix('error')} Error during Chrome cleanup: ${pintor__rspack_import_0_default().red(error)}`;
|
|
@@ -127819,7 +127839,7 @@ var __webpack_modules__ = {
|
|
|
127819
127839
|
function firefoxRdpClientFailedToGetMainHTML() {
|
|
127820
127840
|
return `${getLoggingPrefix('error')} Failed to get Firefox main HTML`;
|
|
127821
127841
|
}
|
|
127822
|
-
function runningInDevelopment(manifest, browser, message, browserVersionLine) {
|
|
127842
|
+
function runningInDevelopment(manifest, browser, message, browserVersionLine, updateSuffix) {
|
|
127823
127843
|
const capitalize = (str)=>str.charAt(0).toUpperCase() + str.slice(1);
|
|
127824
127844
|
const manifestName = manifest.name || 'Extension.js';
|
|
127825
127845
|
const { hostPermissions, permissions } = manifest;
|
|
@@ -127843,7 +127863,13 @@ var __webpack_modules__ = {
|
|
|
127843
127863
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) return `${getLoggingPrefix('error')} No management API info received from client for ${manifestName}. Investigate.`;
|
|
127844
127864
|
}
|
|
127845
127865
|
const { name = '', version: version1 = '' } = management;
|
|
127846
|
-
const extensionVersion =
|
|
127866
|
+
const extensionVersion = process.env.EXTENSION_DEVELOP_VERSION || process.env.EXTENSION_CLI_VERSION || (()=>{
|
|
127867
|
+
try {
|
|
127868
|
+
return require1('../../../package.json').version;
|
|
127869
|
+
} catch {
|
|
127870
|
+
return 'unknown';
|
|
127871
|
+
}
|
|
127872
|
+
})();
|
|
127847
127873
|
let effectiveBrowserLine = browserVersionLine && browserVersionLine.trim().length > 0 ? browserVersionLine.trim() : '';
|
|
127848
127874
|
if (!effectiveBrowserLine) try {
|
|
127849
127875
|
if ('chromium' === browser || 'chromium-based' === browser) {
|
|
@@ -127903,7 +127929,8 @@ var __webpack_modules__ = {
|
|
|
127903
127929
|
hostPermissions && hostPermissions.length;
|
|
127904
127930
|
permissions && permissions.length;
|
|
127905
127931
|
const lines = [];
|
|
127906
|
-
|
|
127932
|
+
const updateNotice = updateSuffix ? ` ${updateSuffix}` : '';
|
|
127933
|
+
lines.push(` 🧩 ${pintor__rspack_import_0_default().brightBlue('Extension.js')} ${pintor__rspack_import_0_default().gray(`${extensionVersion}`)}${updateNotice}`, ` Browser ${pintor__rspack_import_0_default().gray(browserLabel)}`, ` Extension ${pintor__rspack_import_0_default().gray(version1 ? `${name} ${version1}` : name || manifestName)}`, ` Extension ID ${pintor__rspack_import_0_default().gray(cleanId)}`);
|
|
127907
127934
|
return lines.join('\n');
|
|
127908
127935
|
}
|
|
127909
127936
|
function emptyLine() {
|
|
@@ -128500,7 +128527,11 @@ var __webpack_modules__ = {
|
|
|
128500
128527
|
await this.launchChromium(stats.compilation);
|
|
128501
128528
|
this.didLaunch = true;
|
|
128502
128529
|
this.logger.info(messages.ACl(this.options.browser, stats.compilation.options.mode));
|
|
128503
|
-
} catch
|
|
128530
|
+
} catch (error) {
|
|
128531
|
+
try {
|
|
128532
|
+
this.logger.error(messages._D4(this.options.browser, error));
|
|
128533
|
+
} catch {}
|
|
128534
|
+
}
|
|
128504
128535
|
});
|
|
128505
128536
|
}
|
|
128506
128537
|
async launchChromium(compilation, opts) {
|
|
@@ -128804,7 +128835,7 @@ var __webpack_modules__ = {
|
|
|
128804
128835
|
group: process.getgid?.()
|
|
128805
128836
|
}
|
|
128806
128837
|
});
|
|
128807
|
-
this.logger.debug?.('[plugin-browsers] Final Chrome flags:', launchArgs.join(' '));
|
|
128838
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) this.logger.debug?.('[plugin-browsers] Final Chrome flags:', launchArgs.join(' '));
|
|
128808
128839
|
child.on('close', (code)=>{
|
|
128809
128840
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) this.logger.info(messages.nnm(code || 0));
|
|
128810
128841
|
});
|
|
@@ -129573,6 +129604,7 @@ var __webpack_modules__ = {
|
|
|
129573
129604
|
const excludeFlags = configOptions.excludeBrowserFlags || [];
|
|
129574
129605
|
const filteredFlags = (browserFlags || []).filter((flag)=>excludeFlags.every((ex)=>!String(flag).startsWith(ex)));
|
|
129575
129606
|
if (filteredFlags.length > 0) binaryArgs.push(...filteredFlags);
|
|
129607
|
+
if (configOptions.startingUrl && !configOptions.noOpen) binaryArgs.push(String(configOptions.startingUrl));
|
|
129576
129608
|
const outPath = compilation.options.output?.path || external_path_.resolve(process.cwd(), 'dist/firefox');
|
|
129577
129609
|
const distRoot = external_path_.dirname(outPath);
|
|
129578
129610
|
const useSystemProfile = 'true' === String(process.env.EXTENSION_USE_SYSTEM_PROFILE || process.env.EXTJS_USE_SYSTEM_PROFILE || '').toLowerCase().trim();
|
|
@@ -130563,15 +130595,15 @@ var __webpack_modules__ = {
|
|
|
130563
130595
|
"./webpack/plugin-css/css-lib/integrations.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
130564
130596
|
"use strict";
|
|
130565
130597
|
__webpack_require__.d(__webpack_exports__, {
|
|
130566
|
-
|
|
130567
|
-
|
|
130598
|
+
Dy: ()=>installOptionalDependenciesBatch,
|
|
130599
|
+
tm: ()=>installOptionalDependencies,
|
|
130600
|
+
ws: ()=>hasDependency
|
|
130568
130601
|
});
|
|
130569
130602
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
130570
130603
|
var fs__rspack_import_1 = __webpack_require__("fs");
|
|
130571
130604
|
var child_process__rspack_import_2 = __webpack_require__("child_process");
|
|
130572
130605
|
var pintor__rspack_import_3 = __webpack_require__("pintor");
|
|
130573
130606
|
var pintor__rspack_import_3_default = /*#__PURE__*/ __webpack_require__.n(pintor__rspack_import_3);
|
|
130574
|
-
var package_manager_detector__rspack_import_4 = __webpack_require__("package-manager-detector");
|
|
130575
130607
|
function parseJsonSafe(text) {
|
|
130576
130608
|
const s = text && 0xfeff === text.charCodeAt(0) ? text.slice(1) : text;
|
|
130577
130609
|
return JSON.parse(s || '{}');
|
|
@@ -130584,33 +130616,96 @@ var __webpack_modules__ = {
|
|
|
130584
130616
|
if (process.env['npm_execpath']) return 'npm';
|
|
130585
130617
|
return false;
|
|
130586
130618
|
}
|
|
130619
|
+
function getPackageManagerFromEnv() {
|
|
130620
|
+
const ua = process.env.npm_config_user_agent;
|
|
130621
|
+
if (ua) {
|
|
130622
|
+
if (ua.includes('pnpm')) return 'pnpm';
|
|
130623
|
+
if (ua.includes('yarn')) return 'yarn';
|
|
130624
|
+
if (ua.includes('bun')) return 'bun';
|
|
130625
|
+
if (ua.includes('npm')) return 'npm';
|
|
130626
|
+
}
|
|
130627
|
+
const execPath = process.env.npm_execpath || process.env.NPM_EXEC_PATH;
|
|
130628
|
+
if (execPath) {
|
|
130629
|
+
if (execPath.includes('pnpm')) return 'pnpm';
|
|
130630
|
+
if (execPath.includes('yarn')) return 'yarn';
|
|
130631
|
+
if (execPath.includes('bun')) return 'bun';
|
|
130632
|
+
if (execPath.includes('npm')) return 'npm';
|
|
130633
|
+
}
|
|
130634
|
+
}
|
|
130635
|
+
function getLogPrefix(type) {
|
|
130636
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) {
|
|
130637
|
+
const base = 'error' === type ? 'ERROR Author says' : '►►► Author says';
|
|
130638
|
+
return pintor__rspack_import_3_default().brightMagenta(base);
|
|
130639
|
+
}
|
|
130640
|
+
return 'error' === type ? pintor__rspack_import_3_default().red('ERROR') : pintor__rspack_import_3_default().gray('►►►');
|
|
130641
|
+
}
|
|
130642
|
+
async function resolvePackageManager() {
|
|
130643
|
+
const envPm = getPackageManagerFromEnv();
|
|
130644
|
+
if (envPm) return envPm;
|
|
130645
|
+
return 'npm';
|
|
130646
|
+
}
|
|
130647
|
+
function getOptionalInstallCommand(pm, dependencies) {
|
|
130648
|
+
const quotedDir = JSON.stringify(__dirname);
|
|
130649
|
+
const pmName = pm;
|
|
130650
|
+
if ('yarn' === pmName) return `yarn --silent add ${dependencies.join(' ')} --cwd ${quotedDir} --optional`;
|
|
130651
|
+
if ('npm' === pmName || isFromNpx()) return `npm --silent install ${dependencies.join(' ')} --prefix ${quotedDir} --save-optional`;
|
|
130652
|
+
if (isFromPnpx()) return `pnpm --silent add ${dependencies.join(' ')} --prefix ${quotedDir} --save-optional`;
|
|
130653
|
+
const fallback = pmName || 'npm';
|
|
130654
|
+
return `${fallback} --silent install ${dependencies.join(' ')} --cwd ${quotedDir} --optional`;
|
|
130655
|
+
}
|
|
130656
|
+
function getRootInstallCommand(pm) {
|
|
130657
|
+
const pmName = pm;
|
|
130658
|
+
if ('yarn' === pmName) return "yarn install --silent";
|
|
130659
|
+
if ('npm' === pmName || isFromNpx()) return "npm install --silent";
|
|
130660
|
+
if (isFromPnpx()) return "pnpm install --silent";
|
|
130661
|
+
return `${pmName || 'npm'} install --silent`;
|
|
130662
|
+
}
|
|
130663
|
+
function formatToolingLabel(integrations, fallback) {
|
|
130664
|
+
const list = integrations && integrations.length > 0 ? integrations.join('/') : fallback;
|
|
130665
|
+
return `${getLogPrefix('info')} Setting up ${list} tooling...`;
|
|
130666
|
+
}
|
|
130587
130667
|
async function installOptionalDependencies(integration, dependencies) {
|
|
130668
|
+
if (!dependencies.length) return;
|
|
130588
130669
|
try {
|
|
130589
|
-
const pm = await (
|
|
130590
|
-
|
|
130591
|
-
|
|
130592
|
-
|
|
130593
|
-
|
|
130594
|
-
|
|
130595
|
-
|
|
130596
|
-
|
|
130597
|
-
|
|
130670
|
+
const pm = await resolvePackageManager();
|
|
130671
|
+
const installCommand = getOptionalInstallCommand(pm, dependencies);
|
|
130672
|
+
console.log(formatToolingLabel([
|
|
130673
|
+
integration
|
|
130674
|
+
], integration));
|
|
130675
|
+
(0, child_process__rspack_import_2.execSync)(installCommand, {
|
|
130676
|
+
stdio: 'inherit'
|
|
130677
|
+
});
|
|
130678
|
+
await new Promise((r)=>setTimeout(r, 500));
|
|
130679
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) {
|
|
130680
|
+
console.log(`${pintor__rspack_import_3_default().brightMagenta('►►► Author says')} [${integration}] Installing root dependencies for dev...`);
|
|
130681
|
+
(0, child_process__rspack_import_2.execSync)(getRootInstallCommand(pm), {
|
|
130682
|
+
stdio: 'ignore'
|
|
130683
|
+
});
|
|
130684
|
+
console.log(`${pintor__rspack_import_3_default().brightMagenta('►►► Author says')} ${integration} tooling ready.`);
|
|
130598
130685
|
}
|
|
130599
|
-
|
|
130686
|
+
} catch (error) {
|
|
130687
|
+
console.error(`${getLogPrefix('error')} [${integration}] Failed to install dependencies.\n${pintor__rspack_import_3_default().red(String(error?.message || error))}`);
|
|
130688
|
+
}
|
|
130689
|
+
}
|
|
130690
|
+
async function installOptionalDependenciesBatch(integration, dependencies, integrations) {
|
|
130691
|
+
if (!dependencies.length) return;
|
|
130692
|
+
try {
|
|
130693
|
+
const pm = await resolvePackageManager();
|
|
130694
|
+
const installCommand = getOptionalInstallCommand(pm, dependencies);
|
|
130695
|
+
console.log(formatToolingLabel(integrations, integration));
|
|
130600
130696
|
(0, child_process__rspack_import_2.execSync)(installCommand, {
|
|
130601
130697
|
stdio: 'inherit'
|
|
130602
130698
|
});
|
|
130603
130699
|
await new Promise((r)=>setTimeout(r, 500));
|
|
130604
130700
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) {
|
|
130605
130701
|
console.log(`${pintor__rspack_import_3_default().brightMagenta('►►► Author says')} [${integration}] Installing root dependencies for dev...`);
|
|
130606
|
-
|
|
130607
|
-
(0, child_process__rspack_import_2.execSync)(devInstall, {
|
|
130702
|
+
(0, child_process__rspack_import_2.execSync)(getRootInstallCommand(pm), {
|
|
130608
130703
|
stdio: 'ignore'
|
|
130609
130704
|
});
|
|
130705
|
+
console.log(`${pintor__rspack_import_3_default().brightMagenta('►►► Author says')} ${integration} tooling ready.`);
|
|
130610
130706
|
}
|
|
130611
|
-
console.log(`[${integration}] Dependencies installed successfully.`);
|
|
130612
130707
|
} catch (error) {
|
|
130613
|
-
console.error(
|
|
130708
|
+
console.error(`${getLogPrefix('error')} [${integration}] Failed to install dependencies.\n${pintor__rspack_import_3_default().red(String(error?.message || error))}`);
|
|
130614
130709
|
}
|
|
130615
130710
|
}
|
|
130616
130711
|
function hasDependency(projectPath, dependency) {
|
|
@@ -130680,7 +130775,7 @@ var __webpack_modules__ = {
|
|
|
130680
130775
|
return `${pintor__rspack_import_0_default().gray('►►►')} Using ${pintor__rspack_import_0_default().brightBlue(name)}...`;
|
|
130681
130776
|
}
|
|
130682
130777
|
function youAreAllSet(name) {
|
|
130683
|
-
return `${pintor__rspack_import_0_default().green('►►►')} ${name} installation completed
|
|
130778
|
+
return `${pintor__rspack_import_0_default().green('►►►')} ${name} installation completed.`;
|
|
130684
130779
|
}
|
|
130685
130780
|
function missingSassDependency() {
|
|
130686
130781
|
const prefix = pintor__rspack_import_0_default().red('►►►');
|
|
@@ -130714,7 +130809,7 @@ var __webpack_modules__ = {
|
|
|
130714
130809
|
var _css_lib_is_content_script__rspack_import_4 = __webpack_require__("./webpack/plugin-css/css-lib/is-content-script.ts");
|
|
130715
130810
|
let userMessageDelivered = false;
|
|
130716
130811
|
function isUsingLess(projectPath) {
|
|
130717
|
-
if ((0, _css_lib_integrations__rspack_import_3.
|
|
130812
|
+
if ((0, _css_lib_integrations__rspack_import_3.ws)(projectPath, 'less')) {
|
|
130718
130813
|
if (!userMessageDelivered) {
|
|
130719
130814
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${pintor__rspack_import_1_default().brightMagenta('►►► Author says')} ${_css_lib_messages__rspack_import_2.zA('LESS')}`);
|
|
130720
130815
|
userMessageDelivered = true;
|
|
@@ -130733,7 +130828,7 @@ var __webpack_modules__ = {
|
|
|
130733
130828
|
'less',
|
|
130734
130829
|
'less-loader'
|
|
130735
130830
|
];
|
|
130736
|
-
await (0, _css_lib_integrations__rspack_import_3.
|
|
130831
|
+
await (0, _css_lib_integrations__rspack_import_3.tm)('LESS', lessDependencies);
|
|
130737
130832
|
console.log(_css_lib_messages__rspack_import_2.Jv('LESS'));
|
|
130738
130833
|
process.exit(0);
|
|
130739
130834
|
}
|
|
@@ -130808,7 +130903,7 @@ var __webpack_modules__ = {
|
|
|
130808
130903
|
}
|
|
130809
130904
|
}
|
|
130810
130905
|
function isUsingPostCss(projectPath) {
|
|
130811
|
-
if ((0, _css_lib_integrations__rspack_import_5.
|
|
130906
|
+
if ((0, _css_lib_integrations__rspack_import_5.ws)(projectPath, 'postcss')) {
|
|
130812
130907
|
if (!userMessageDelivered) {
|
|
130813
130908
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${pintor__rspack_import_3_default().brightMagenta('►►► Author says')} ${_css_lib_messages__rspack_import_4.zA('PostCSS')}`);
|
|
130814
130909
|
userMessageDelivered = true;
|
|
@@ -130858,7 +130953,7 @@ var __webpack_modules__ = {
|
|
|
130858
130953
|
'postcss',
|
|
130859
130954
|
'postcss-loader'
|
|
130860
130955
|
];
|
|
130861
|
-
await (0, _css_lib_integrations__rspack_import_5.
|
|
130956
|
+
await (0, _css_lib_integrations__rspack_import_5.tm)('PostCSS', postCssDependencies);
|
|
130862
130957
|
}
|
|
130863
130958
|
console.log(_css_lib_messages__rspack_import_4.Jv('PostCSS'));
|
|
130864
130959
|
process.exit(0);
|
|
@@ -130930,7 +131025,7 @@ var __webpack_modules__ = {
|
|
|
130930
131025
|
var _css_lib_integrations__rspack_import_4 = __webpack_require__("./webpack/plugin-css/css-lib/integrations.ts");
|
|
130931
131026
|
let userMessageDelivered = false;
|
|
130932
131027
|
function isUsingSass(projectPath) {
|
|
130933
|
-
if ((0, _css_lib_integrations__rspack_import_4.
|
|
131028
|
+
if ((0, _css_lib_integrations__rspack_import_4.ws)(projectPath, 'sass')) {
|
|
130934
131029
|
if (!userMessageDelivered) {
|
|
130935
131030
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${pintor__rspack_import_2_default().brightMagenta('►►► Author says')} ${_css_lib_messages__rspack_import_3.zA('SASS')}`);
|
|
130936
131031
|
userMessageDelivered = true;
|
|
@@ -130981,11 +131076,11 @@ var __webpack_modules__ = {
|
|
|
130981
131076
|
'postcss-scss',
|
|
130982
131077
|
'postcss-preset-env'
|
|
130983
131078
|
];
|
|
130984
|
-
await (0, _css_lib_integrations__rspack_import_4.
|
|
131079
|
+
await (0, _css_lib_integrations__rspack_import_4.tm)('PostCSS', postCssDependencies);
|
|
130985
131080
|
const sassDependencies = [
|
|
130986
131081
|
'sass-loader'
|
|
130987
131082
|
];
|
|
130988
|
-
await (0, _css_lib_integrations__rspack_import_4.
|
|
131083
|
+
await (0, _css_lib_integrations__rspack_import_4.tm)('SASS', sassDependencies);
|
|
130989
131084
|
console.log(_css_lib_messages__rspack_import_3.Jv('SASS'));
|
|
130990
131085
|
process.exit(0);
|
|
130991
131086
|
}
|
|
@@ -131026,7 +131121,7 @@ var __webpack_modules__ = {
|
|
|
131026
131121
|
var _css_lib_integrations__rspack_import_4 = __webpack_require__("./webpack/plugin-css/css-lib/integrations.ts");
|
|
131027
131122
|
let userMessageDelivered = false;
|
|
131028
131123
|
function isUsingTailwind(projectPath) {
|
|
131029
|
-
const isUsingTailwind = (0, _css_lib_integrations__rspack_import_4.
|
|
131124
|
+
const isUsingTailwind = (0, _css_lib_integrations__rspack_import_4.ws)(projectPath, 'tailwindcss') || (0, _css_lib_integrations__rspack_import_4.ws)(projectPath, '@tailwindcss/postcss');
|
|
131030
131125
|
if (isUsingTailwind) {
|
|
131031
131126
|
if (!userMessageDelivered) {
|
|
131032
131127
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${pintor__rspack_import_2_default().brightMagenta('►►► Author says')} ${_css_lib_messages__rspack_import_3.zA('Tailwind')}`);
|
|
@@ -131047,9 +131142,10 @@ var __webpack_modules__ = {
|
|
|
131047
131142
|
"./webpack/plugin-js-frameworks/frameworks-lib/integrations.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
131048
131143
|
"use strict";
|
|
131049
131144
|
__webpack_require__.d(__webpack_exports__, {
|
|
131145
|
+
Dy: ()=>_plugin_css_css_lib_integrations__rspack_import_0.Dy,
|
|
131050
131146
|
qQ: ()=>isUsingJSFramework,
|
|
131051
|
-
tm: ()=>_plugin_css_css_lib_integrations__rspack_import_0.
|
|
131052
|
-
ws: ()=>_plugin_css_css_lib_integrations__rspack_import_0.
|
|
131147
|
+
tm: ()=>_plugin_css_css_lib_integrations__rspack_import_0.tm,
|
|
131148
|
+
ws: ()=>_plugin_css_css_lib_integrations__rspack_import_0.ws
|
|
131053
131149
|
});
|
|
131054
131150
|
var _plugin_css_css_lib_integrations__rspack_import_0 = __webpack_require__("./webpack/plugin-css/css-lib/integrations.ts");
|
|
131055
131151
|
function isUsingJSFramework(projectPath) {
|
|
@@ -131061,7 +131157,7 @@ var __webpack_modules__ = {
|
|
|
131061
131157
|
'solid-js',
|
|
131062
131158
|
'preact'
|
|
131063
131159
|
];
|
|
131064
|
-
return frameworks.some((fw)=>__webpack_require__("./webpack/plugin-css/css-lib/integrations.ts").
|
|
131160
|
+
return frameworks.some((fw)=>__webpack_require__("./webpack/plugin-css/css-lib/integrations.ts").ws(projectPath, fw));
|
|
131065
131161
|
}
|
|
131066
131162
|
},
|
|
131067
131163
|
"./webpack/plugin-js-frameworks/js-frameworks-lib/load-loader-options.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -131114,6 +131210,7 @@ var __webpack_modules__ = {
|
|
|
131114
131210
|
Jv: ()=>youAreAllSet,
|
|
131115
131211
|
LR: ()=>creatingTSConfig,
|
|
131116
131212
|
MH: ()=>jsFrameworksConfigsDetected,
|
|
131213
|
+
Q2: ()=>optionalDepsReady,
|
|
131117
131214
|
Ty: ()=>isUsingCustomLoader,
|
|
131118
131215
|
jH: ()=>jsFrameworksIntegrationsEnabled,
|
|
131119
131216
|
zA: ()=>isUsingIntegration
|
|
@@ -131124,7 +131221,11 @@ var __webpack_modules__ = {
|
|
|
131124
131221
|
return `${pintor__rspack_import_0_default().gray('►►►')} Using ${pintor__rspack_import_0_default().brightBlue(name)}...`;
|
|
131125
131222
|
}
|
|
131126
131223
|
function youAreAllSet(name) {
|
|
131127
|
-
return `${pintor__rspack_import_0_default().green('►►►')} ${name} installation completed
|
|
131224
|
+
return `${pintor__rspack_import_0_default().green('►►►')} ${name} installation completed.`;
|
|
131225
|
+
}
|
|
131226
|
+
function optionalDepsReady(integrations) {
|
|
131227
|
+
const list = integrations.length > 0 ? integrations.map((name)=>pintor__rspack_import_0_default().yellow(name)).join(', ') : pintor__rspack_import_0_default().gray('optional');
|
|
131228
|
+
return `${pintor__rspack_import_0_default().green('►►►')} All set — ${list} tooling is ready.`;
|
|
131128
131229
|
}
|
|
131129
131230
|
function creatingTSConfig() {
|
|
131130
131231
|
return `${pintor__rspack_import_0_default().gray('►►►')} Creating default tsconfig.json...`;
|
|
@@ -131294,7 +131395,8 @@ var __webpack_modules__ = {
|
|
|
131294
131395
|
"./webpack/plugin-js-frameworks/js-tools/svelte.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
131295
131396
|
"use strict";
|
|
131296
131397
|
__webpack_require__.d(__webpack_exports__, {
|
|
131297
|
-
X: ()=>maybeUseSvelte
|
|
131398
|
+
X: ()=>maybeUseSvelte,
|
|
131399
|
+
a: ()=>isUsingSvelte
|
|
131298
131400
|
});
|
|
131299
131401
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
131300
131402
|
var _js_frameworks_lib_messages__rspack_import_1 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/messages.ts");
|
|
@@ -131434,8 +131536,7 @@ var __webpack_modules__ = {
|
|
|
131434
131536
|
"use strict";
|
|
131435
131537
|
__webpack_require__.d(__webpack_exports__, {
|
|
131436
131538
|
eE: ()=>isUsingTypeScript,
|
|
131437
|
-
hB: ()=>getUserTypeScriptConfigFile
|
|
131438
|
-
vv: ()=>maybeUseTypeScript
|
|
131539
|
+
hB: ()=>getUserTypeScriptConfigFile
|
|
131439
131540
|
});
|
|
131440
131541
|
var path__rspack_import_0 = __webpack_require__("path");
|
|
131441
131542
|
var fs__rspack_import_1 = __webpack_require__("fs");
|
|
@@ -131548,31 +131649,19 @@ var __webpack_modules__ = {
|
|
|
131548
131649
|
mode: 'development'
|
|
131549
131650
|
}), null, 2));
|
|
131550
131651
|
}
|
|
131551
|
-
async function maybeUseTypeScript(projectPath) {
|
|
131552
|
-
if (!isUsingTypeScript(projectPath)) return false;
|
|
131553
|
-
try {
|
|
131554
|
-
require.resolve("typescript");
|
|
131555
|
-
} catch (e) {
|
|
131556
|
-
const typescriptDependencies = [
|
|
131557
|
-
"typescript"
|
|
131558
|
-
];
|
|
131559
|
-
await (0, _frameworks_lib_integrations__rspack_import_4.tm)('TypeScript', typescriptDependencies);
|
|
131560
|
-
console.log(_js_frameworks_lib_messages__rspack_import_3.Jv('TypeScript'));
|
|
131561
|
-
process.exit(0);
|
|
131562
|
-
}
|
|
131563
|
-
return true;
|
|
131564
|
-
}
|
|
131565
131652
|
},
|
|
131566
131653
|
"./webpack/plugin-js-frameworks/js-tools/vue.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
131567
131654
|
"use strict";
|
|
131568
131655
|
__webpack_require__.d(__webpack_exports__, {
|
|
131569
|
-
K: ()=>maybeUseVue
|
|
131656
|
+
K: ()=>maybeUseVue,
|
|
131657
|
+
L: ()=>isUsingVue
|
|
131570
131658
|
});
|
|
131571
|
-
var
|
|
131572
|
-
var
|
|
131573
|
-
var
|
|
131574
|
-
var
|
|
131575
|
-
var
|
|
131659
|
+
var _rspack_core__rspack_import_0 = __webpack_require__("@rspack/core");
|
|
131660
|
+
var pintor__rspack_import_1 = __webpack_require__("pintor");
|
|
131661
|
+
var pintor__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(pintor__rspack_import_1);
|
|
131662
|
+
var _js_frameworks_lib_messages__rspack_import_2 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/messages.ts");
|
|
131663
|
+
var _frameworks_lib_integrations__rspack_import_3 = __webpack_require__("./webpack/plugin-js-frameworks/frameworks-lib/integrations.ts");
|
|
131664
|
+
var _js_frameworks_lib_load_loader_options__rspack_import_4 = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/load-loader-options.ts");
|
|
131576
131665
|
let userMessageDelivered = false;
|
|
131577
131666
|
let cachedVueLoaderPlugin;
|
|
131578
131667
|
function getVueLoaderPlugin() {
|
|
@@ -131587,14 +131676,14 @@ var __webpack_modules__ = {
|
|
|
131587
131676
|
} catch {}
|
|
131588
131677
|
}
|
|
131589
131678
|
function isUsingVue(projectPath) {
|
|
131590
|
-
const using = (0,
|
|
131679
|
+
const using = (0, _frameworks_lib_integrations__rspack_import_3.ws)(projectPath, 'vue');
|
|
131591
131680
|
if (using && !userMessageDelivered) {
|
|
131592
|
-
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${
|
|
131681
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${pintor__rspack_import_1_default().brightMagenta('►►► Author says')} ${_js_frameworks_lib_messages__rspack_import_2.zA('Vue')}`);
|
|
131593
131682
|
userMessageDelivered = true;
|
|
131594
131683
|
}
|
|
131595
131684
|
return using;
|
|
131596
131685
|
}
|
|
131597
|
-
async function maybeUseVue(projectPath) {
|
|
131686
|
+
async function maybeUseVue(projectPath, mode = 'development') {
|
|
131598
131687
|
if (!isUsingVue(projectPath)) return;
|
|
131599
131688
|
try {
|
|
131600
131689
|
require.resolve('vue-loader');
|
|
@@ -131603,13 +131692,13 @@ var __webpack_modules__ = {
|
|
|
131603
131692
|
'vue-loader',
|
|
131604
131693
|
'@vue/compiler-sfc'
|
|
131605
131694
|
];
|
|
131606
|
-
await (0,
|
|
131607
|
-
console.log(
|
|
131695
|
+
await (0, _frameworks_lib_integrations__rspack_import_3.tm)('Vue', vueDependencies);
|
|
131696
|
+
console.log(_js_frameworks_lib_messages__rspack_import_2.Jv('Vue'));
|
|
131608
131697
|
process.exit(0);
|
|
131609
131698
|
}
|
|
131610
131699
|
const VueLoaderPlugin = getVueLoaderPlugin();
|
|
131611
131700
|
if (!VueLoaderPlugin) throw new Error('[Vue] vue-loader is installed but VueLoaderPlugin could not be resolved.');
|
|
131612
|
-
const customOptions = await (0,
|
|
131701
|
+
const customOptions = await (0, _js_frameworks_lib_load_loader_options__rspack_import_4.g)(projectPath, 'vue');
|
|
131613
131702
|
const defaultLoaders = [
|
|
131614
131703
|
{
|
|
131615
131704
|
test: /\.vue$/,
|
|
@@ -131622,8 +131711,14 @@ var __webpack_modules__ = {
|
|
|
131622
131711
|
exclude: /node_modules/
|
|
131623
131712
|
}
|
|
131624
131713
|
];
|
|
131714
|
+
const isProd = 'production' === mode;
|
|
131625
131715
|
const defaultPlugins = [
|
|
131626
|
-
new VueLoaderPlugin()
|
|
131716
|
+
new VueLoaderPlugin(),
|
|
131717
|
+
new _rspack_core__rspack_import_0.DefinePlugin({
|
|
131718
|
+
__VUE_OPTIONS_API__: JSON.stringify(true),
|
|
131719
|
+
__VUE_PROD_DEVTOOLS__: JSON.stringify(!isProd),
|
|
131720
|
+
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: JSON.stringify(!isProd)
|
|
131721
|
+
})
|
|
131627
131722
|
];
|
|
131628
131723
|
return {
|
|
131629
131724
|
plugins: defaultPlugins,
|
|
@@ -132005,6 +132100,7 @@ var __webpack_modules__ = {
|
|
|
132005
132100
|
"./webpack/webpack-lib/messages.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
132006
132101
|
"use strict";
|
|
132007
132102
|
__webpack_require__.d(__webpack_exports__, {
|
|
132103
|
+
$3: ()=>buildCommandFailed,
|
|
132008
132104
|
AC: ()=>debugOutputPath,
|
|
132009
132105
|
Al: ()=>runningInProduction,
|
|
132010
132106
|
BT: ()=>treeWithSourceFiles,
|
|
@@ -132018,6 +132114,7 @@ var __webpack_modules__ = {
|
|
|
132018
132114
|
I: ()=>buildWebpack,
|
|
132019
132115
|
IV: ()=>packagingSourceFiles,
|
|
132020
132116
|
Ke: ()=>installingDependenciesFailed,
|
|
132117
|
+
Px: ()=>buildDependenciesInstallError,
|
|
132021
132118
|
RB: ()=>cantInstallDependencies,
|
|
132022
132119
|
SG: ()=>debugDirs,
|
|
132023
132120
|
Ud: ()=>downloadingText,
|
|
@@ -132037,7 +132134,10 @@ var __webpack_modules__ = {
|
|
|
132037
132134
|
ng: ()=>writingTypeDefinitions,
|
|
132038
132135
|
tQ: ()=>fetchingProjectPath,
|
|
132039
132136
|
tc: ()=>invalidRemoteZip,
|
|
132137
|
+
um: ()=>buildDependenciesInstallFailed,
|
|
132040
132138
|
v_: ()=>writingTypeDefinitionsError,
|
|
132139
|
+
vo: ()=>buildDependenciesManualInstall,
|
|
132140
|
+
xK: ()=>installingBuildDependencies,
|
|
132041
132141
|
yp: ()=>noCompanionExtensionsResolved,
|
|
132042
132142
|
zM: ()=>unpackagedSuccessfully
|
|
132043
132143
|
});
|
|
@@ -132100,6 +132200,20 @@ var __webpack_modules__ = {
|
|
|
132100
132200
|
function installingRequiredDependencies() {
|
|
132101
132201
|
return `${getLoggingPrefix('info')} Installing required dependencies...`;
|
|
132102
132202
|
}
|
|
132203
|
+
function installingBuildDependencies(dependencies) {
|
|
132204
|
+
const list = dependencies.map((dep)=>pintor__rspack_import_2_default().gray(dep)).join(', ');
|
|
132205
|
+
return `${getLoggingPrefix('info')} Installing build dependencies: ${list}`;
|
|
132206
|
+
}
|
|
132207
|
+
function buildDependenciesInstallFailed(command, args, code) {
|
|
132208
|
+
return `${getLoggingPrefix('error')} Failed to install build dependencies.\n${pintor__rspack_import_2_default().gray(command)} ${pintor__rspack_import_2_default().gray(args.join(' '))}\n${pintor__rspack_import_2_default().red(`exit code ${pintor__rspack_import_2_default().gray(String(code))}`)}`;
|
|
132209
|
+
}
|
|
132210
|
+
function buildDependenciesInstallError(error) {
|
|
132211
|
+
return `${getLoggingPrefix('error')} Error installing build dependencies.\n${pintor__rspack_import_2_default().red(String(error?.message || error))}`;
|
|
132212
|
+
}
|
|
132213
|
+
function buildDependenciesManualInstall(dependencies, dependenciesMap) {
|
|
132214
|
+
const list = dependencies.map((dep)=>`- ${pintor__rspack_import_2_default().gray(`${dep}@${dependenciesMap[dep]}`)}`).join('\n');
|
|
132215
|
+
return `${getLoggingPrefix('warn')} Please install the following build dependencies manually:\n${list}`;
|
|
132216
|
+
}
|
|
132103
132217
|
function dependenciesInstalledRunAgain() {
|
|
132104
132218
|
return `${getLoggingPrefix('success')} Dependencies installed. Run the command again to proceed.`;
|
|
132105
132219
|
}
|
|
@@ -132262,6 +132376,13 @@ var __webpack_modules__ = {
|
|
|
132262
132376
|
function configLoadingError(configPath, error) {
|
|
132263
132377
|
return `${pintor__rspack_import_2_default().red('ERROR')} ${pintor__rspack_import_2_default().brightBlue('config load failed')}\n${fmt.label('PATH')} ${fmt.val(configPath)}\n` + pintor__rspack_import_2_default().red(fmt.truncate(error, 1200));
|
|
132264
132378
|
}
|
|
132379
|
+
function buildCommandFailed(error) {
|
|
132380
|
+
const message = (()=>{
|
|
132381
|
+
if (error instanceof Error && error.message) return error.message;
|
|
132382
|
+
return String(error || 'Unknown error');
|
|
132383
|
+
})();
|
|
132384
|
+
return `${getLoggingPrefix('error')} Build failed.\n${pintor__rspack_import_2_default().red(fmt.truncate(message, 1200))}`;
|
|
132385
|
+
}
|
|
132265
132386
|
function managedDependencyConflict(duplicates, userPackageJsonPath) {
|
|
132266
132387
|
const list = duplicates.map((d)=>`- ${pintor__rspack_import_2_default().yellow(d)}`).join('\n');
|
|
132267
132388
|
return `${getLoggingPrefix('error')} Your project declares dependencies that are managed by ${pintor__rspack_import_2_default().blue('Extension.js')} and referenced in ${pintor__rspack_import_2_default().underline('extension.config.js')}\n${pintor__rspack_import_2_default().red('This can cause version conflicts and break the development/build process.')}\n\n${pintor__rspack_import_2_default().gray('Managed dependencies (remove these from your package.json):')}\n${list}\n\n${pintor__rspack_import_2_default().gray('PATH')} ${pintor__rspack_import_2_default().underline(userPackageJsonPath)}\nIf you need a different version, open an issue so we can consider bundling it safely.\nOperation aborted.`;
|
|
@@ -132403,10 +132524,6 @@ var __webpack_modules__ = {
|
|
|
132403
132524
|
"use strict";
|
|
132404
132525
|
module.exports = require("child_process");
|
|
132405
132526
|
},
|
|
132406
|
-
chokidar (module) {
|
|
132407
|
-
"use strict";
|
|
132408
|
-
module.exports = require("chokidar");
|
|
132409
|
-
},
|
|
132410
132527
|
"chrome-location2" (module) {
|
|
132411
132528
|
"use strict";
|
|
132412
132529
|
module.exports = require("chrome-location2");
|
|
@@ -132463,10 +132580,6 @@ var __webpack_modules__ = {
|
|
|
132463
132580
|
"use strict";
|
|
132464
132581
|
module.exports = require("os");
|
|
132465
132582
|
},
|
|
132466
|
-
"package-manager-detector" (module) {
|
|
132467
|
-
"use strict";
|
|
132468
|
-
module.exports = require("package-manager-detector");
|
|
132469
|
-
},
|
|
132470
132583
|
"parse5-utilities" (module) {
|
|
132471
132584
|
"use strict";
|
|
132472
132585
|
module.exports = require("parse5-utilities");
|
|
@@ -132513,7 +132626,7 @@ var __webpack_modules__ = {
|
|
|
132513
132626
|
},
|
|
132514
132627
|
"./package.json" (module) {
|
|
132515
132628
|
"use strict";
|
|
132516
|
-
module.exports = JSON.parse('{"rE":"3.
|
|
132629
|
+
module.exports = JSON.parse('{"rE":"3.2.0-next.10","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"}}');
|
|
132517
132630
|
}
|
|
132518
132631
|
};
|
|
132519
132632
|
var __webpack_module_cache__ = {};
|
|
@@ -132590,8 +132703,20 @@ var __webpack_exports__ = {};
|
|
|
132590
132703
|
extensionStart: ()=>extensionStart,
|
|
132591
132704
|
ensureDependencies: ()=>ensureDependencies,
|
|
132592
132705
|
extensionPreview: ()=>extensionPreview,
|
|
132593
|
-
extensionBuild: ()=>extensionBuild
|
|
132706
|
+
extensionBuild: ()=>extensionBuild,
|
|
132707
|
+
preflightOptionalDependenciesForProject: ()=>preflightOptionalDependenciesForProject
|
|
132594
132708
|
});
|
|
132709
|
+
function getBuildSummary(browser, info) {
|
|
132710
|
+
const assets = info?.assets || [];
|
|
132711
|
+
return {
|
|
132712
|
+
browser,
|
|
132713
|
+
total_assets: assets.length,
|
|
132714
|
+
total_bytes: assets.reduce((n, a)=>n + (a.size || 0), 0),
|
|
132715
|
+
largest_asset_bytes: assets.reduce((m, a)=>Math.max(m, a.size || 0), 0),
|
|
132716
|
+
warnings_count: (info?.warnings || []).length,
|
|
132717
|
+
errors_count: (info?.errors || []).length
|
|
132718
|
+
};
|
|
132719
|
+
}
|
|
132595
132720
|
var external_path_ = __webpack_require__("path");
|
|
132596
132721
|
var external_fs_ = __webpack_require__("fs");
|
|
132597
132722
|
var messages = __webpack_require__("./webpack/webpack-lib/messages.ts");
|
|
@@ -132813,39 +132938,6 @@ var __webpack_exports__ = {};
|
|
|
132813
132938
|
}
|
|
132814
132939
|
}
|
|
132815
132940
|
var paths = __webpack_require__("./webpack/webpack-lib/paths.ts");
|
|
132816
|
-
function getBuildSummary(browser, info) {
|
|
132817
|
-
const assets = info?.assets || [];
|
|
132818
|
-
return {
|
|
132819
|
-
browser,
|
|
132820
|
-
total_assets: assets.length,
|
|
132821
|
-
total_bytes: assets.reduce((n, a)=>n + (a.size || 0), 0),
|
|
132822
|
-
largest_asset_bytes: assets.reduce((m, a)=>Math.max(m, a.size || 0), 0),
|
|
132823
|
-
warnings_count: (info?.warnings || []).length,
|
|
132824
|
-
errors_count: (info?.errors || []).length
|
|
132825
|
-
};
|
|
132826
|
-
}
|
|
132827
|
-
var react = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/react.ts");
|
|
132828
|
-
var preact = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/preact.ts");
|
|
132829
|
-
var vue = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/vue.ts");
|
|
132830
|
-
var svelte = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/svelte.ts");
|
|
132831
|
-
var typescript = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/typescript.ts");
|
|
132832
|
-
var sass = __webpack_require__("./webpack/plugin-css/css-tools/sass.ts");
|
|
132833
|
-
var less = __webpack_require__("./webpack/plugin-css/css-tools/less.ts");
|
|
132834
|
-
var postcss = __webpack_require__("./webpack/plugin-css/css-tools/postcss.ts");
|
|
132835
|
-
async function preflightOptionalDependencies(projectStructure, mode) {
|
|
132836
|
-
const { packageJsonDir } = (0, paths.fu)(projectStructure);
|
|
132837
|
-
const projectPath = packageJsonDir;
|
|
132838
|
-
await (0, typescript.vv)(projectPath);
|
|
132839
|
-
await (0, react.b)(projectPath);
|
|
132840
|
-
await (0, preact.b)(projectPath);
|
|
132841
|
-
await (0, vue.K)(projectPath);
|
|
132842
|
-
await (0, svelte.X)(projectPath, mode);
|
|
132843
|
-
await (0, sass.IZ)(projectPath);
|
|
132844
|
-
await (0, less.V)(projectPath, projectStructure.manifestPath);
|
|
132845
|
-
await (0, postcss.t)(projectPath, {
|
|
132846
|
-
mode
|
|
132847
|
-
});
|
|
132848
|
-
}
|
|
132849
132941
|
function findExtensionDevelopRoot() {
|
|
132850
132942
|
const webpackLibDir = __dirname;
|
|
132851
132943
|
const webpackDir = external_path_.resolve(webpackLibDir, '..');
|
|
@@ -132880,20 +132972,28 @@ var __webpack_exports__ = {};
|
|
|
132880
132972
|
return Object.keys(dependencies).filter((dep)=>!isDependencyInstalled(dep, packageRoot));
|
|
132881
132973
|
}
|
|
132882
132974
|
const external_cross_spawn_namespaceObject = require("cross-spawn");
|
|
132883
|
-
|
|
132884
|
-
|
|
132885
|
-
|
|
132886
|
-
|
|
132887
|
-
|
|
132975
|
+
function detectPackageManagerFromEnv() {
|
|
132976
|
+
const userAgent = process.env.npm_config_user_agent || '';
|
|
132977
|
+
if (userAgent.includes('pnpm')) return 'pnpm';
|
|
132978
|
+
if (userAgent.includes('yarn')) return 'yarn';
|
|
132979
|
+
if (userAgent.includes('npm')) return 'npm';
|
|
132980
|
+
const execPath = process.env.npm_execpath || process.env.NPM_EXEC_PATH || '';
|
|
132981
|
+
if (execPath.includes('pnpm')) return 'pnpm';
|
|
132982
|
+
if (execPath.includes('yarn')) return 'yarn';
|
|
132983
|
+
execPath.includes('npm');
|
|
132984
|
+
return 'npm';
|
|
132985
|
+
}
|
|
132986
|
+
function getInstallCommandForPath(cwd) {
|
|
132987
|
+
const hasPnpmLock = external_fs_.existsSync(external_path_.join(cwd, 'pnpm-lock.yaml'));
|
|
132988
|
+
const hasYarnLock = external_fs_.existsSync(external_path_.join(cwd, 'yarn.lock'));
|
|
132989
|
+
const hasNpmLock = external_fs_.existsSync(external_path_.join(cwd, 'package-lock.json'));
|
|
132888
132990
|
if (hasPnpmLock) return 'pnpm';
|
|
132889
132991
|
if (hasYarnLock) return 'yarn';
|
|
132890
132992
|
if (hasNpmLock) return 'npm';
|
|
132891
|
-
|
|
132892
|
-
|
|
132893
|
-
|
|
132894
|
-
|
|
132895
|
-
if (pm?.name === 'pnpm') return 'pnpm';
|
|
132896
|
-
return 'npm';
|
|
132993
|
+
return detectPackageManagerFromEnv();
|
|
132994
|
+
}
|
|
132995
|
+
async function getInstallCommand(packageRoot) {
|
|
132996
|
+
return getInstallCommandForPath(packageRoot);
|
|
132897
132997
|
}
|
|
132898
132998
|
function getInstallArgs(command, dependencies, dependenciesMap) {
|
|
132899
132999
|
const depsWithVersions = dependencies.map((dep)=>`${dep}@${dependenciesMap[dep]}`);
|
|
@@ -132924,41 +133024,29 @@ var __webpack_exports__ = {};
|
|
|
132924
133024
|
const command = await getInstallCommand(packageRoot);
|
|
132925
133025
|
const installArgs = getInstallArgs(command, dependencies, dependenciesMap);
|
|
132926
133026
|
const stdio = 'true' === process.env.EXTENSION_AUTHOR_MODE ? 'inherit' : 'ignore';
|
|
132927
|
-
console.log(
|
|
133027
|
+
console.log(messages.xK(dependencies));
|
|
132928
133028
|
const child = (0, external_cross_spawn_namespaceObject.spawn)(command, installArgs, {
|
|
132929
133029
|
stdio
|
|
132930
133030
|
});
|
|
132931
133031
|
await new Promise((resolve, reject)=>{
|
|
132932
133032
|
child.on('close', (code)=>{
|
|
132933
|
-
if (0 !== code) reject(new Error(
|
|
133033
|
+
if (0 !== code) reject(new Error(messages.um(command, installArgs, code)));
|
|
132934
133034
|
else resolve();
|
|
132935
133035
|
});
|
|
132936
133036
|
child.on('error', (error)=>{
|
|
132937
|
-
reject(
|
|
133037
|
+
reject(error);
|
|
132938
133038
|
});
|
|
132939
133039
|
});
|
|
132940
133040
|
} catch (error) {
|
|
132941
|
-
console.error(
|
|
132942
|
-
console.error(
|
|
133041
|
+
console.error(messages.Px(error));
|
|
133042
|
+
console.error(messages.vo(dependencies, dependenciesMap));
|
|
132943
133043
|
process.exit(1);
|
|
132944
133044
|
} finally{
|
|
132945
133045
|
process.chdir(originalDirectory);
|
|
132946
133046
|
}
|
|
132947
133047
|
}
|
|
132948
133048
|
async function install_dependencies_getInstallCommand() {
|
|
132949
|
-
|
|
132950
|
-
const hasPnpmLock = external_fs_.existsSync(external_path_.join(cwd, 'pnpm-lock.yaml'));
|
|
132951
|
-
const hasYarnLock = external_fs_.existsSync(external_path_.join(cwd, 'yarn.lock'));
|
|
132952
|
-
const hasNpmLock = external_fs_.existsSync(external_path_.join(cwd, 'package-lock.json'));
|
|
132953
|
-
if (hasPnpmLock) return 'pnpm';
|
|
132954
|
-
if (hasYarnLock) return 'yarn';
|
|
132955
|
-
if (hasNpmLock) return 'npm';
|
|
132956
|
-
const pm = await (0, external_package_manager_detector_.detect)({
|
|
132957
|
-
cwd
|
|
132958
|
-
});
|
|
132959
|
-
if (pm?.name === 'yarn') return 'yarn';
|
|
132960
|
-
if (pm?.name === 'pnpm') return 'pnpm';
|
|
132961
|
-
return 'npm';
|
|
133049
|
+
return getInstallCommandForPath(process.cwd());
|
|
132962
133050
|
}
|
|
132963
133051
|
function install_dependencies_getInstallArgs() {
|
|
132964
133052
|
return [
|
|
@@ -133021,26 +133109,244 @@ var __webpack_exports__ = {};
|
|
|
133021
133109
|
installedUser: needsUserInstall
|
|
133022
133110
|
};
|
|
133023
133111
|
}
|
|
133112
|
+
var external_pintor_ = __webpack_require__("pintor");
|
|
133113
|
+
var external_pintor_default = /*#__PURE__*/ __webpack_require__.n(external_pintor_);
|
|
133114
|
+
var external_crypto_ = __webpack_require__("crypto");
|
|
133115
|
+
function getPreflightCacheDir(packageRoot) {
|
|
133116
|
+
return external_path_.join(packageRoot, '.cache', 'extensionjs', 'preflight');
|
|
133117
|
+
}
|
|
133118
|
+
function getProjectKey(projectPath) {
|
|
133119
|
+
return (0, external_crypto_.createHash)('sha1').update(external_path_.resolve(projectPath)).digest('hex');
|
|
133120
|
+
}
|
|
133121
|
+
function getCacheVersionPath(cacheDir) {
|
|
133122
|
+
return external_path_.join(cacheDir, 'version.json');
|
|
133123
|
+
}
|
|
133124
|
+
function getProjectDepsHash(projectPath) {
|
|
133125
|
+
try {
|
|
133126
|
+
const packageJsonPath = external_path_.join(projectPath, 'package.json');
|
|
133127
|
+
if (!external_fs_.existsSync(packageJsonPath)) return 'no-package-json';
|
|
133128
|
+
const raw = external_fs_.readFileSync(packageJsonPath, 'utf8');
|
|
133129
|
+
const parsed = JSON.parse(raw || '{}');
|
|
133130
|
+
const deps = parsed?.dependencies || {};
|
|
133131
|
+
const devDeps = parsed?.devDependencies || {};
|
|
133132
|
+
const normalize = (input)=>{
|
|
133133
|
+
const sortedKeys = Object.keys(input).sort();
|
|
133134
|
+
const normalized = {};
|
|
133135
|
+
for (const key of sortedKeys)normalized[key] = input[key];
|
|
133136
|
+
return normalized;
|
|
133137
|
+
};
|
|
133138
|
+
const stable = JSON.stringify({
|
|
133139
|
+
dependencies: normalize(deps),
|
|
133140
|
+
devDependencies: normalize(devDeps)
|
|
133141
|
+
});
|
|
133142
|
+
return (0, external_crypto_.createHash)('sha1').update(stable).digest('hex');
|
|
133143
|
+
} catch {
|
|
133144
|
+
return 'invalid-package-json';
|
|
133145
|
+
}
|
|
133146
|
+
}
|
|
133147
|
+
function ensureCacheVersion(cacheDir) {
|
|
133148
|
+
const versionPath = getCacheVersionPath(cacheDir);
|
|
133149
|
+
const expectedVersion = package_0.rE;
|
|
133150
|
+
try {
|
|
133151
|
+
if (!external_fs_.existsSync(versionPath)) return true;
|
|
133152
|
+
const raw = external_fs_.readFileSync(versionPath, 'utf8');
|
|
133153
|
+
const data = JSON.parse(raw || '{}');
|
|
133154
|
+
if (data?.version !== expectedVersion) {
|
|
133155
|
+
external_fs_.rmSync(cacheDir, {
|
|
133156
|
+
recursive: true,
|
|
133157
|
+
force: true
|
|
133158
|
+
});
|
|
133159
|
+
return false;
|
|
133160
|
+
}
|
|
133161
|
+
return true;
|
|
133162
|
+
} catch {
|
|
133163
|
+
try {
|
|
133164
|
+
external_fs_.rmSync(cacheDir, {
|
|
133165
|
+
recursive: true,
|
|
133166
|
+
force: true
|
|
133167
|
+
});
|
|
133168
|
+
} catch {}
|
|
133169
|
+
return false;
|
|
133170
|
+
}
|
|
133171
|
+
}
|
|
133172
|
+
function getPreflightMarkerPath(projectPath) {
|
|
133173
|
+
const packageRoot = findExtensionDevelopRoot();
|
|
133174
|
+
if (!packageRoot) return;
|
|
133175
|
+
const cacheDir = getPreflightCacheDir(packageRoot);
|
|
133176
|
+
return external_path_.join(cacheDir, `${getProjectKey(projectPath)}.json`);
|
|
133177
|
+
}
|
|
133178
|
+
function hasPreflightMarker(projectPath) {
|
|
133179
|
+
const marker = getPreflightMarkerPath(projectPath);
|
|
133180
|
+
if (!marker) return false;
|
|
133181
|
+
const cacheDir = external_path_.dirname(marker);
|
|
133182
|
+
if (!ensureCacheVersion(cacheDir)) return false;
|
|
133183
|
+
if (!external_fs_.existsSync(marker)) return false;
|
|
133184
|
+
try {
|
|
133185
|
+
const raw = external_fs_.readFileSync(marker, 'utf8');
|
|
133186
|
+
const data = JSON.parse(raw || '{}');
|
|
133187
|
+
const depsHash = getProjectDepsHash(projectPath);
|
|
133188
|
+
if (data?.depsHash !== depsHash) {
|
|
133189
|
+
external_fs_.rmSync(marker, {
|
|
133190
|
+
force: true
|
|
133191
|
+
});
|
|
133192
|
+
return false;
|
|
133193
|
+
}
|
|
133194
|
+
return true;
|
|
133195
|
+
} catch {
|
|
133196
|
+
try {
|
|
133197
|
+
external_fs_.rmSync(marker, {
|
|
133198
|
+
force: true
|
|
133199
|
+
});
|
|
133200
|
+
} catch {}
|
|
133201
|
+
return false;
|
|
133202
|
+
}
|
|
133203
|
+
}
|
|
133204
|
+
function writePreflightMarker(projectPath) {
|
|
133205
|
+
const marker = getPreflightMarkerPath(projectPath);
|
|
133206
|
+
if (!marker) return;
|
|
133207
|
+
const cacheDir = external_path_.dirname(marker);
|
|
133208
|
+
try {
|
|
133209
|
+
external_fs_.mkdirSync(cacheDir, {
|
|
133210
|
+
recursive: true
|
|
133211
|
+
});
|
|
133212
|
+
external_fs_.writeFileSync(getCacheVersionPath(cacheDir), JSON.stringify({
|
|
133213
|
+
version: package_0.rE
|
|
133214
|
+
}));
|
|
133215
|
+
external_fs_.writeFileSync(marker, JSON.stringify({
|
|
133216
|
+
projectPath: external_path_.resolve(projectPath),
|
|
133217
|
+
depsHash: getProjectDepsHash(projectPath),
|
|
133218
|
+
version: package_0.rE,
|
|
133219
|
+
ts: Date.now()
|
|
133220
|
+
}));
|
|
133221
|
+
} catch {}
|
|
133222
|
+
}
|
|
133223
|
+
var react = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/react.ts");
|
|
133224
|
+
var preact = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/preact.ts");
|
|
133225
|
+
var vue = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/vue.ts");
|
|
133226
|
+
var svelte = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/svelte.ts");
|
|
133227
|
+
var typescript = __webpack_require__("./webpack/plugin-js-frameworks/js-tools/typescript.ts");
|
|
133228
|
+
var integrations = __webpack_require__("./webpack/plugin-js-frameworks/frameworks-lib/integrations.ts");
|
|
133229
|
+
var sass = __webpack_require__("./webpack/plugin-css/css-tools/sass.ts");
|
|
133230
|
+
var less = __webpack_require__("./webpack/plugin-css/css-tools/less.ts");
|
|
133231
|
+
var postcss = __webpack_require__("./webpack/plugin-css/css-tools/postcss.ts");
|
|
133232
|
+
var js_frameworks_lib_messages = __webpack_require__("./webpack/plugin-js-frameworks/js-frameworks-lib/messages.ts");
|
|
133233
|
+
function canResolveFromProject(id, projectPath) {
|
|
133234
|
+
try {
|
|
133235
|
+
return require.resolve(id, {
|
|
133236
|
+
paths: [
|
|
133237
|
+
projectPath,
|
|
133238
|
+
process.cwd()
|
|
133239
|
+
]
|
|
133240
|
+
});
|
|
133241
|
+
} catch {
|
|
133242
|
+
return;
|
|
133243
|
+
}
|
|
133244
|
+
}
|
|
133245
|
+
function canResolve(id) {
|
|
133246
|
+
try {
|
|
133247
|
+
return require.resolve(id);
|
|
133248
|
+
} catch {
|
|
133249
|
+
return;
|
|
133250
|
+
}
|
|
133251
|
+
}
|
|
133252
|
+
async function preflightOptionalDependencies(projectStructure, mode, opts) {
|
|
133253
|
+
const { packageJsonDir } = (0, paths.fu)(projectStructure);
|
|
133254
|
+
const projectPath = packageJsonDir;
|
|
133255
|
+
if (hasPreflightMarker(projectPath)) {
|
|
133256
|
+
if ('true' === process.env.EXTENSION_AUTHOR_MODE) console.log(`${external_pintor_default().brightMagenta('►►► Author says')} Optional deps preflight skipped (cache hit).`);
|
|
133257
|
+
return;
|
|
133258
|
+
}
|
|
133259
|
+
const missingOptionalDeps = new Set();
|
|
133260
|
+
const usedIntegrations = [];
|
|
133261
|
+
const usesTypeScript = (0, typescript.eE)(projectPath);
|
|
133262
|
+
const usesReact = (0, react.S)(projectPath);
|
|
133263
|
+
const usesPreact = (0, preact.K)(projectPath);
|
|
133264
|
+
const usesVue = (0, vue.L)(projectPath);
|
|
133265
|
+
const usesSvelte = (0, svelte.a)(projectPath);
|
|
133266
|
+
const usesSass = (0, sass.fZ)(projectPath);
|
|
133267
|
+
const usesLess = (0, less.K)(projectPath);
|
|
133268
|
+
const usesPostCss = (0, postcss.A)(projectPath);
|
|
133269
|
+
if (usesTypeScript && !canResolveFromProject("typescript", projectPath)) {
|
|
133270
|
+
missingOptionalDeps.add("typescript");
|
|
133271
|
+
usedIntegrations.push('TypeScript');
|
|
133272
|
+
}
|
|
133273
|
+
if (usesReact) {
|
|
133274
|
+
if (!canResolve('react-refresh')) missingOptionalDeps.add('react-refresh');
|
|
133275
|
+
if (!canResolve('@rspack/plugin-react-refresh')) missingOptionalDeps.add('@rspack/plugin-react-refresh');
|
|
133276
|
+
usedIntegrations.push('React');
|
|
133277
|
+
}
|
|
133278
|
+
if (usesPreact) {
|
|
133279
|
+
if (!canResolve('@prefresh/core')) missingOptionalDeps.add('@prefresh/core');
|
|
133280
|
+
if (!canResolve('@prefresh/utils')) missingOptionalDeps.add('@prefresh/utils');
|
|
133281
|
+
if (!canResolve('@rspack/plugin-preact-refresh')) missingOptionalDeps.add('@rspack/plugin-preact-refresh');
|
|
133282
|
+
if (!canResolve('preact')) missingOptionalDeps.add('preact');
|
|
133283
|
+
usedIntegrations.push('Preact');
|
|
133284
|
+
}
|
|
133285
|
+
if (usesVue) {
|
|
133286
|
+
if (!canResolve('vue-loader')) missingOptionalDeps.add('vue-loader');
|
|
133287
|
+
if (!canResolve('@vue/compiler-sfc')) missingOptionalDeps.add('@vue/compiler-sfc');
|
|
133288
|
+
usedIntegrations.push('Vue');
|
|
133289
|
+
}
|
|
133290
|
+
if (usesSvelte) {
|
|
133291
|
+
if (!canResolveFromProject('svelte-loader', projectPath) && !canResolve('svelte-loader')) missingOptionalDeps.add('svelte-loader');
|
|
133292
|
+
if (!canResolveFromProject("typescript", projectPath)) missingOptionalDeps.add("typescript");
|
|
133293
|
+
usedIntegrations.push('Svelte');
|
|
133294
|
+
}
|
|
133295
|
+
if (usesSass && !canResolve('sass-loader')) {
|
|
133296
|
+
const postCssDeps = [
|
|
133297
|
+
'postcss-loader',
|
|
133298
|
+
'postcss-scss',
|
|
133299
|
+
'postcss-preset-env'
|
|
133300
|
+
];
|
|
133301
|
+
for (const dep of postCssDeps)if (!canResolve(dep)) missingOptionalDeps.add(dep);
|
|
133302
|
+
missingOptionalDeps.add('sass-loader');
|
|
133303
|
+
usedIntegrations.push('Sass');
|
|
133304
|
+
}
|
|
133305
|
+
if (usesLess && !canResolve('less-loader')) {
|
|
133306
|
+
if (!canResolve('less')) missingOptionalDeps.add('less');
|
|
133307
|
+
missingOptionalDeps.add('less-loader');
|
|
133308
|
+
usedIntegrations.push('Less');
|
|
133309
|
+
}
|
|
133310
|
+
if (usesPostCss && !canResolve('postcss-loader') && !usesSass && !usesLess) {
|
|
133311
|
+
if (!canResolve('postcss')) missingOptionalDeps.add('postcss');
|
|
133312
|
+
missingOptionalDeps.add('postcss-loader');
|
|
133313
|
+
usedIntegrations.push('PostCSS');
|
|
133314
|
+
}
|
|
133315
|
+
if (missingOptionalDeps.size > 0) {
|
|
133316
|
+
const uniqueIntegrations = Array.from(new Set(usedIntegrations));
|
|
133317
|
+
await (0, integrations.Dy)('Optional', Array.from(missingOptionalDeps), uniqueIntegrations);
|
|
133318
|
+
if (opts?.showRunAgainMessage !== false) console.log(js_frameworks_lib_messages.Q2(uniqueIntegrations));
|
|
133319
|
+
if (opts?.exitOnInstall !== false) process.exit(0);
|
|
133320
|
+
}
|
|
133321
|
+
writePreflightMarker(projectPath);
|
|
133322
|
+
}
|
|
133323
|
+
function shouldRunOptionalPreflight(projectStructure) {
|
|
133324
|
+
const { packageJsonDir } = (0, paths.fu)(projectStructure);
|
|
133325
|
+
const projectPath = packageJsonDir;
|
|
133326
|
+
return !hasPreflightMarker(projectPath);
|
|
133327
|
+
}
|
|
133328
|
+
async function ensureProjectReady(projectStructure, mode, opts) {
|
|
133329
|
+
const { packageJsonDir } = (0, paths.fu)(projectStructure);
|
|
133330
|
+
const result = await ensureDependencies(packageJsonDir, opts);
|
|
133331
|
+
if (shouldRunOptionalPreflight(projectStructure)) await preflightOptionalDependencies(projectStructure, mode, {
|
|
133332
|
+
exitOnInstall: opts?.exitOnInstall
|
|
133333
|
+
});
|
|
133334
|
+
return result;
|
|
133335
|
+
}
|
|
133024
133336
|
async function extensionBuild(pathOrRemoteUrl, buildOptions) {
|
|
133025
133337
|
const projectStructure = await getProjectStructure(pathOrRemoteUrl);
|
|
133026
133338
|
const isVitest = 'true' === process.env.VITEST;
|
|
133027
133339
|
const shouldExitOnError = (buildOptions?.exitOnError ?? true) && !isVitest;
|
|
133028
133340
|
const browser = (0, paths.YN)(buildOptions?.browser || 'chrome', buildOptions?.chromiumBinary, buildOptions?.geckoBinary || buildOptions?.firefoxBinary);
|
|
133029
133341
|
const { manifestDir, packageJsonDir } = (0, paths.fu)(projectStructure);
|
|
133342
|
+
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
133030
133343
|
try {
|
|
133031
|
-
const
|
|
133032
|
-
|
|
133033
|
-
|
|
133344
|
+
const shouldInstallProjectDeps = !isAuthor || buildOptions?.install !== false;
|
|
133345
|
+
await ensureProjectReady(projectStructure, 'production', {
|
|
133346
|
+
skipProjectInstall: isVitest || !projectStructure.packageJsonPath || !shouldInstallProjectDeps,
|
|
133347
|
+
exitOnInstall: false,
|
|
133348
|
+
showRunAgainMessage: false
|
|
133034
133349
|
});
|
|
133035
|
-
if (depsResult.installed) return {
|
|
133036
|
-
browser,
|
|
133037
|
-
total_assets: 0,
|
|
133038
|
-
total_bytes: 0,
|
|
133039
|
-
largest_asset_bytes: 0,
|
|
133040
|
-
warnings_count: 0,
|
|
133041
|
-
errors_count: 0
|
|
133042
|
-
};
|
|
133043
|
-
await preflightOptionalDependencies(projectStructure, 'production');
|
|
133044
133350
|
const [{ rspack }, { merge }, { handleStatsErrors }, { default: webpackConfig }] = await Promise.all([
|
|
133045
133351
|
import("@rspack/core"),
|
|
133046
133352
|
import("webpack-merge"),
|
|
@@ -133050,7 +133356,7 @@ var __webpack_exports__ = {};
|
|
|
133050
133356
|
__webpack_require__.e("547")
|
|
133051
133357
|
]).then(__webpack_require__.bind(__webpack_require__, "./webpack/webpack-config.ts"))
|
|
133052
133358
|
]);
|
|
133053
|
-
const debug =
|
|
133359
|
+
const debug = isAuthor;
|
|
133054
133360
|
if (projectStructure.packageJsonPath) assertNoManagedDependencyConflicts(projectStructure.packageJsonPath, manifestDir);
|
|
133055
133361
|
const commandConfig = await (0, config_loader.eY)(manifestDir, 'build');
|
|
133056
133362
|
const distPath = (0, paths.q4)(packageJsonDir, browser);
|
|
@@ -133110,7 +133416,9 @@ var __webpack_exports__ = {};
|
|
|
133110
133416
|
});
|
|
133111
133417
|
return summary;
|
|
133112
133418
|
} catch (error) {
|
|
133113
|
-
|
|
133419
|
+
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
133420
|
+
if (isAuthor) console.error(error);
|
|
133421
|
+
else console.error(messages.$3(error));
|
|
133114
133422
|
if (!shouldExitOnError) throw error;
|
|
133115
133423
|
process.exit(1);
|
|
133116
133424
|
}
|
|
@@ -133118,17 +133426,141 @@ var __webpack_exports__ = {};
|
|
|
133118
133426
|
const promises_namespaceObject = require("fs/promises");
|
|
133119
133427
|
async function generateExtensionTypes(manifestDir, packageJsonDir) {
|
|
133120
133428
|
const extensionEnvFile = external_path_.join(packageJsonDir, 'extension-env.d.ts');
|
|
133121
|
-
const
|
|
133429
|
+
const { dependencies, devDependencies, peerDependencies, optionalDependencies } = await readPackageJson(packageJsonDir);
|
|
133430
|
+
const hasDependency = (name)=>Boolean(dependencies[name] || devDependencies[name] || peerDependencies[name] || optionalDependencies[name]);
|
|
133431
|
+
const usesReact = hasDependency('react') || hasDependency('@types/react');
|
|
133432
|
+
const usesReactDom = hasDependency('react-dom') || hasDependency('@types/react-dom');
|
|
133433
|
+
const usesSvelte = hasDependency('svelte');
|
|
133434
|
+
const frameworkTypeRefs = [
|
|
133435
|
+
usesReact ? '/// <reference types="react" />' : '',
|
|
133436
|
+
usesReactDom ? '/// <reference types="react-dom" />' : '',
|
|
133437
|
+
usesSvelte ? '/// <reference types="svelte" />' : ''
|
|
133438
|
+
].filter(Boolean).join('\n');
|
|
133122
133439
|
const fileContent = `\
|
|
133123
133440
|
// Required Extension.js types for TypeScript projects.
|
|
133124
133441
|
// This file is auto-generated and should not be excluded.
|
|
133125
|
-
//
|
|
133126
|
-
|
|
133127
|
-
|
|
133128
|
-
/// <reference types="
|
|
133442
|
+
//
|
|
133443
|
+
/// <reference types="webextension-polyfill" />
|
|
133444
|
+
/// <reference types="node" />
|
|
133445
|
+
/// <reference types="chrome" />
|
|
133446
|
+
${frameworkTypeRefs}
|
|
133447
|
+
|
|
133448
|
+
declare global {
|
|
133449
|
+
// Align types with Extension.js runtime: we provide the browser global via
|
|
133450
|
+
// webextension-polyfill in Chromium, and it's natively available in Firefox.
|
|
133451
|
+
const browser: typeof import('webextension-polyfill')
|
|
133452
|
+
|
|
133453
|
+
type ExtensionBrowser =
|
|
133454
|
+
| 'chrome'
|
|
133455
|
+
| 'edge'
|
|
133456
|
+
| 'firefox'
|
|
133457
|
+
| 'chromium-based'
|
|
133458
|
+
| 'gecko-based'
|
|
133459
|
+
|
|
133460
|
+
type ExtensionMode = 'development' | 'production'
|
|
133461
|
+
|
|
133462
|
+
interface ExtensionEnv {
|
|
133463
|
+
EXTENSION_BROWSER: ExtensionBrowser
|
|
133464
|
+
EXTENSION_MODE: ExtensionMode
|
|
133465
|
+
EXTENSION_PUBLIC_BROWSER: ExtensionBrowser
|
|
133466
|
+
EXTENSION_PUBLIC_MODE: ExtensionMode
|
|
133467
|
+
EXTENSION_PUBLIC_DESCRIPTION_TEXT: string
|
|
133468
|
+
EXTENSION_PUBLIC_LLM_API_KEY: string
|
|
133469
|
+
EXTENSION_AUTHOR_MODE: string
|
|
133470
|
+
EXTENSION_PUBLIC_AUTHOR_MODE: string
|
|
133471
|
+
}
|
|
133472
|
+
|
|
133473
|
+
namespace NodeJS {
|
|
133474
|
+
interface ProcessEnv extends ExtensionEnv {
|
|
133475
|
+
[key: string]: string | undefined
|
|
133476
|
+
}
|
|
133477
|
+
}
|
|
133129
133478
|
|
|
133130
|
-
|
|
133131
|
-
|
|
133479
|
+
interface ImportMetaEnv extends ExtensionEnv {
|
|
133480
|
+
[key: string]: string | undefined
|
|
133481
|
+
}
|
|
133482
|
+
|
|
133483
|
+
interface ImportMeta {
|
|
133484
|
+
readonly env: ImportMetaEnv
|
|
133485
|
+
readonly webpackHot?: {
|
|
133486
|
+
accept: (module?: string | string[], callback?: () => void) => void
|
|
133487
|
+
dispose: (callback: () => void) => void
|
|
133488
|
+
}
|
|
133489
|
+
url: string
|
|
133490
|
+
}
|
|
133491
|
+
|
|
133492
|
+
interface Window {
|
|
133493
|
+
/**
|
|
133494
|
+
* @deprecated
|
|
133495
|
+
* @description
|
|
133496
|
+
* This is how Extension.js used to inject the shadow root into the window object.
|
|
133497
|
+
* Use the shadowRoot reference from the content script instead.
|
|
133498
|
+
*/
|
|
133499
|
+
__EXTENSION_SHADOW_ROOT__: ShadowRoot
|
|
133500
|
+
}
|
|
133501
|
+
}
|
|
133502
|
+
|
|
133503
|
+
// Asset imports (CSS modules + static images)
|
|
133504
|
+
type CSSContentData = Readonly<Record<string, string>>
|
|
133505
|
+
type CSSModuleData = Readonly<Record<string, string>>
|
|
133506
|
+
|
|
133507
|
+
declare module '*.css' {
|
|
133508
|
+
const content: CSSContentData
|
|
133509
|
+
export default content
|
|
133510
|
+
}
|
|
133511
|
+
|
|
133512
|
+
declare module '*.module.css' {
|
|
133513
|
+
const content: CSSModuleData
|
|
133514
|
+
export default content
|
|
133515
|
+
}
|
|
133516
|
+
declare module '*.module.scss' {
|
|
133517
|
+
const content: CSSModuleData
|
|
133518
|
+
export default content
|
|
133519
|
+
}
|
|
133520
|
+
declare module '*.module.sass' {
|
|
133521
|
+
const content: CSSModuleData
|
|
133522
|
+
export default content
|
|
133523
|
+
}
|
|
133524
|
+
|
|
133525
|
+
declare module '*.png' {
|
|
133526
|
+
const content: string
|
|
133527
|
+
export default content
|
|
133528
|
+
}
|
|
133529
|
+
declare module '*.jpg' {
|
|
133530
|
+
const content: string
|
|
133531
|
+
export default content
|
|
133532
|
+
}
|
|
133533
|
+
declare module '*.jpeg' {
|
|
133534
|
+
const content: string
|
|
133535
|
+
export default content
|
|
133536
|
+
}
|
|
133537
|
+
declare module '*.gif' {
|
|
133538
|
+
const content: string
|
|
133539
|
+
export default content
|
|
133540
|
+
}
|
|
133541
|
+
declare module '*.webp' {
|
|
133542
|
+
const content: string
|
|
133543
|
+
export default content
|
|
133544
|
+
}
|
|
133545
|
+
declare module '*.avif' {
|
|
133546
|
+
const content: string
|
|
133547
|
+
export default content
|
|
133548
|
+
}
|
|
133549
|
+
declare module '*.ico' {
|
|
133550
|
+
const content: string
|
|
133551
|
+
export default content
|
|
133552
|
+
}
|
|
133553
|
+
declare module '*.bmp' {
|
|
133554
|
+
const content: string
|
|
133555
|
+
export default content
|
|
133556
|
+
}
|
|
133557
|
+
declare module '*.svg' {
|
|
133558
|
+
// Use any to avoid conflicts with SVGR or other SVG loaders.
|
|
133559
|
+
const content: any
|
|
133560
|
+
export default content
|
|
133561
|
+
}
|
|
133562
|
+
|
|
133563
|
+
export {}
|
|
133132
133564
|
`;
|
|
133133
133565
|
try {
|
|
133134
133566
|
await promises_namespaceObject.access(extensionEnvFile);
|
|
@@ -133145,17 +133577,38 @@ var __webpack_exports__ = {};
|
|
|
133145
133577
|
}
|
|
133146
133578
|
}
|
|
133147
133579
|
}
|
|
133580
|
+
async function readPackageJson(projectPath) {
|
|
133581
|
+
const packageJsonPath = external_path_.join(projectPath, 'package.json');
|
|
133582
|
+
try {
|
|
133583
|
+
const content = await promises_namespaceObject.readFile(packageJsonPath, 'utf8');
|
|
133584
|
+
const parsed = JSON.parse(content) || {};
|
|
133585
|
+
return {
|
|
133586
|
+
dependencies: parsed.dependencies || {},
|
|
133587
|
+
devDependencies: parsed.devDependencies || {},
|
|
133588
|
+
peerDependencies: parsed.peerDependencies || {},
|
|
133589
|
+
optionalDependencies: parsed.optionalDependencies || {}
|
|
133590
|
+
};
|
|
133591
|
+
} catch {
|
|
133592
|
+
return {
|
|
133593
|
+
dependencies: {},
|
|
133594
|
+
devDependencies: {},
|
|
133595
|
+
peerDependencies: {},
|
|
133596
|
+
optionalDependencies: {}
|
|
133597
|
+
};
|
|
133598
|
+
}
|
|
133599
|
+
}
|
|
133148
133600
|
async function extensionDev(pathOrRemoteUrl, devOptions) {
|
|
133149
133601
|
const projectStructure = await getProjectStructure(pathOrRemoteUrl);
|
|
133150
133602
|
try {
|
|
133151
|
-
const
|
|
133603
|
+
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
133604
|
+
const debug = isAuthor;
|
|
133152
133605
|
const { manifestDir, packageJsonDir } = (0, paths.fu)(projectStructure);
|
|
133153
|
-
const
|
|
133154
|
-
|
|
133155
|
-
|
|
133606
|
+
const shouldInstallProjectDeps = !isAuthor || false !== devOptions.install;
|
|
133607
|
+
await ensureProjectReady(projectStructure, 'development', {
|
|
133608
|
+
skipProjectInstall: !projectStructure.packageJsonPath || !shouldInstallProjectDeps,
|
|
133609
|
+
exitOnInstall: false,
|
|
133610
|
+
showRunAgainMessage: false
|
|
133156
133611
|
});
|
|
133157
|
-
if (depsResult.installed) return;
|
|
133158
|
-
await preflightOptionalDependencies(projectStructure, 'development');
|
|
133159
133612
|
if ((0, typescript.eE)(manifestDir)) await generateExtensionTypes(manifestDir, packageJsonDir);
|
|
133160
133613
|
if (projectStructure.packageJsonPath) assertNoManagedDependencyConflicts(projectStructure.packageJsonPath, manifestDir);
|
|
133161
133614
|
const browser = (0, paths.YN)(devOptions.browser || 'chrome', devOptions.chromiumBinary, devOptions.geckoBinary || devOptions.firefoxBinary);
|
|
@@ -133192,6 +133645,15 @@ var __webpack_exports__ = {};
|
|
|
133192
133645
|
var firefox_launch = __webpack_require__("./webpack/plugin-browsers/run-firefox/firefox-launch/index.ts");
|
|
133193
133646
|
async function runOnlyPreviewBrowser(opts) {
|
|
133194
133647
|
const sourceEnabled = false;
|
|
133648
|
+
let exitScheduled = false;
|
|
133649
|
+
const scheduleExitOnSignal = ()=>{
|
|
133650
|
+
if (exitScheduled) return;
|
|
133651
|
+
exitScheduled = true;
|
|
133652
|
+
setTimeout(()=>process.exit(0), 10);
|
|
133653
|
+
};
|
|
133654
|
+
process.once('SIGINT', scheduleExitOnSignal);
|
|
133655
|
+
process.once('SIGTERM', scheduleExitOnSignal);
|
|
133656
|
+
process.once('SIGHUP', scheduleExitOnSignal);
|
|
133195
133657
|
const compilationLike = {
|
|
133196
133658
|
options: {
|
|
133197
133659
|
mode: 'production',
|
|
@@ -133311,7 +133773,14 @@ var __webpack_exports__ = {};
|
|
|
133311
133773
|
async function extensionStart(pathOrRemoteUrl, startOptions) {
|
|
133312
133774
|
const projectStructure = await getProjectStructure(pathOrRemoteUrl);
|
|
133313
133775
|
try {
|
|
133314
|
-
const
|
|
133776
|
+
const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
|
|
133777
|
+
const debug = isAuthor;
|
|
133778
|
+
const shouldInstallProjectDeps = !isAuthor || false !== startOptions.install;
|
|
133779
|
+
await ensureProjectReady(projectStructure, 'development', {
|
|
133780
|
+
skipProjectInstall: !projectStructure.packageJsonPath || !shouldInstallProjectDeps,
|
|
133781
|
+
exitOnInstall: false,
|
|
133782
|
+
showRunAgainMessage: false
|
|
133783
|
+
});
|
|
133315
133784
|
const browser = (0, paths.YN)(startOptions.browser || 'chrome', startOptions.chromiumBinary, startOptions.geckoBinary || startOptions.firefoxBinary);
|
|
133316
133785
|
const { manifestDir, packageJsonDir } = (0, paths.fu)(projectStructure);
|
|
133317
133786
|
const commandConfig = await (0, config_loader.eY)(packageJsonDir, 'start');
|
|
@@ -133342,18 +133811,27 @@ var __webpack_exports__ = {};
|
|
|
133342
133811
|
process.exit(1);
|
|
133343
133812
|
}
|
|
133344
133813
|
}
|
|
133814
|
+
async function preflightOptionalDependenciesForProject(pathOrRemoteUrl, mode = 'development') {
|
|
133815
|
+
const projectStructure = await getProjectStructure(pathOrRemoteUrl);
|
|
133816
|
+
await preflightOptionalDependencies(projectStructure, mode, {
|
|
133817
|
+
exitOnInstall: false,
|
|
133818
|
+
showRunAgainMessage: false
|
|
133819
|
+
});
|
|
133820
|
+
}
|
|
133345
133821
|
})();
|
|
133346
133822
|
exports.ensureDependencies = __webpack_exports__.ensureDependencies;
|
|
133347
133823
|
exports.extensionBuild = __webpack_exports__.extensionBuild;
|
|
133348
133824
|
exports.extensionDev = __webpack_exports__.extensionDev;
|
|
133349
133825
|
exports.extensionPreview = __webpack_exports__.extensionPreview;
|
|
133350
133826
|
exports.extensionStart = __webpack_exports__.extensionStart;
|
|
133827
|
+
exports.preflightOptionalDependenciesForProject = __webpack_exports__.preflightOptionalDependenciesForProject;
|
|
133351
133828
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
133352
133829
|
"ensureDependencies",
|
|
133353
133830
|
"extensionBuild",
|
|
133354
133831
|
"extensionDev",
|
|
133355
133832
|
"extensionPreview",
|
|
133356
|
-
"extensionStart"
|
|
133833
|
+
"extensionStart",
|
|
133834
|
+
"preflightOptionalDependenciesForProject"
|
|
133357
133835
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
133358
133836
|
Object.defineProperty(exports, '__esModule', {
|
|
133359
133837
|
value: true
|