extension-develop 3.1.1 → 3.2.0-next.3

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.
@@ -0,0 +1,66 @@
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "Custom theme",
4
+ "version": "1.0",
5
+ "description": "A clean, minimal browser theme generated in the editor.",
6
+ "author": "Anonymous",
7
+ "theme": {
8
+ "colors": {
9
+ "frame": [
10
+ 37,
11
+ 37,
12
+ 39
13
+ ],
14
+ "frame_inactive": [
15
+ 49,
16
+ 49,
17
+ 53
18
+ ],
19
+ "toolbar": [
20
+ 25,
21
+ 25,
22
+ 26
23
+ ],
24
+ "tab_background_text": [
25
+ 28,
26
+ 28,
27
+ 30
28
+ ],
29
+ "tab_text": [
30
+ 255,
31
+ 255,
32
+ 255
33
+ ],
34
+ "tab_background_text_inactive": [
35
+ 62,
36
+ 62,
37
+ 66
38
+ ],
39
+ "tab_text_inactive": [
40
+ 255,
41
+ 255,
42
+ 255
43
+ ],
44
+ "bookmark_text": [
45
+ 153,
46
+ 153,
47
+ 159
48
+ ],
49
+ "ntp_background": [
50
+ 28,
51
+ 28,
52
+ 30
53
+ ],
54
+ "ntp_text": [
55
+ 255,
56
+ 255,
57
+ 255
58
+ ],
59
+ "button_background": [
60
+ 28,
61
+ 28,
62
+ 30
63
+ ]
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "Custom theme",
4
+ "version": "1.0",
5
+ "description": "A clean, minimal browser theme generated in the editor.",
6
+ "author": "Anonymous",
7
+ "theme": {
8
+ "colors": {
9
+ "frame": [
10
+ 37,
11
+ 37,
12
+ 39
13
+ ],
14
+ "frame_inactive": [
15
+ 49,
16
+ 49,
17
+ 53
18
+ ],
19
+ "toolbar": [
20
+ 25,
21
+ 25,
22
+ 26
23
+ ],
24
+ "tab_background_text": [
25
+ 28,
26
+ 28,
27
+ 30
28
+ ],
29
+ "tab_text": [
30
+ 255,
31
+ 255,
32
+ 255
33
+ ],
34
+ "tab_background_text_inactive": [
35
+ 62,
36
+ 62,
37
+ 66
38
+ ],
39
+ "tab_text_inactive": [
40
+ 255,
41
+ 255,
42
+ 255
43
+ ],
44
+ "bookmark_text": [
45
+ 153,
46
+ 153,
47
+ 159
48
+ ],
49
+ "ntp_background": [
50
+ 28,
51
+ 28,
52
+ 30
53
+ ],
54
+ "ntp_text": [
55
+ 255,
56
+ 255,
57
+ 255
58
+ ],
59
+ "button_background": [
60
+ 28,
61
+ 28,
62
+ 30
63
+ ]
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "Custom theme",
4
+ "version": "1.0",
5
+ "description": "A clean, minimal browser theme generated in the editor.",
6
+ "author": "Anonymous",
7
+ "theme": {
8
+ "colors": {
9
+ "frame": [
10
+ 37,
11
+ 37,
12
+ 39
13
+ ],
14
+ "frame_inactive": [
15
+ 49,
16
+ 49,
17
+ 53
18
+ ],
19
+ "toolbar": [
20
+ 25,
21
+ 25,
22
+ 26
23
+ ],
24
+ "tab_background_text": [
25
+ 28,
26
+ 28,
27
+ 30
28
+ ],
29
+ "tab_text": [
30
+ 255,
31
+ 255,
32
+ 255
33
+ ],
34
+ "tab_background_text_inactive": [
35
+ 62,
36
+ 62,
37
+ 66
38
+ ],
39
+ "tab_text_inactive": [
40
+ 255,
41
+ 255,
42
+ 255
43
+ ],
44
+ "bookmark_text": [
45
+ 153,
46
+ 153,
47
+ 159
48
+ ],
49
+ "ntp_background": [
50
+ 28,
51
+ 28,
52
+ 30
53
+ ],
54
+ "ntp_text": [
55
+ 255,
56
+ 255,
57
+ 255
58
+ ],
59
+ "button_background": [
60
+ 28,
61
+ 28,
62
+ 30
63
+ ]
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "Custom theme",
4
+ "version": "1.0",
5
+ "description": "A clean, minimal browser theme generated in the editor.",
6
+ "author": "Anonymous",
7
+ "theme": {
8
+ "colors": {
9
+ "frame": [
10
+ 37,
11
+ 37,
12
+ 39
13
+ ],
14
+ "frame_inactive": [
15
+ 49,
16
+ 49,
17
+ 53
18
+ ],
19
+ "toolbar": [
20
+ 25,
21
+ 25,
22
+ 26
23
+ ],
24
+ "tab_background_text": [
25
+ 28,
26
+ 28,
27
+ 30
28
+ ],
29
+ "tab_text": [
30
+ 255,
31
+ 255,
32
+ 255
33
+ ],
34
+ "tab_background_text_inactive": [
35
+ 62,
36
+ 62,
37
+ 66
38
+ ],
39
+ "tab_text_inactive": [
40
+ 255,
41
+ 255,
42
+ 255
43
+ ],
44
+ "bookmark_text": [
45
+ 153,
46
+ 153,
47
+ 159
48
+ ],
49
+ "ntp_background": [
50
+ 28,
51
+ 28,
52
+ 30
53
+ ],
54
+ "ntp_text": [
55
+ 255,
56
+ 255,
57
+ 255
58
+ ],
59
+ "button_background": [
60
+ 28,
61
+ 28,
62
+ 30
63
+ ]
64
+ }
65
+ }
66
+ }
package/dist/module.js CHANGED
@@ -130594,7 +130594,6 @@ var __webpack_modules__ = {
130594
130594
  var child_process__rspack_import_2 = __webpack_require__("child_process");
130595
130595
  var pintor__rspack_import_3 = __webpack_require__("pintor");
130596
130596
  var pintor__rspack_import_3_default = /*#__PURE__*/ __webpack_require__.n(pintor__rspack_import_3);
130597
- var package_manager_detector__rspack_import_4 = __webpack_require__("package-manager-detector");
130598
130597
  function parseJsonSafe(text) {
130599
130598
  const s = text && 0xfeff === text.charCodeAt(0) ? text.slice(1) : text;
130600
130599
  return JSON.parse(s || '{}');
@@ -130609,20 +130608,35 @@ var __webpack_modules__ = {
130609
130608
  }
130610
130609
  function getPackageManagerFromEnv() {
130611
130610
  const ua = process.env.npm_config_user_agent;
130612
- if (!ua) return;
130613
- if (ua.includes('pnpm')) return 'pnpm';
130614
- if (ua.includes('yarn')) return 'yarn';
130615
- if (ua.includes('bun')) return 'bun';
130616
- if (ua.includes('npm')) return 'npm';
130611
+ if (ua) {
130612
+ if (ua.includes('pnpm')) return 'pnpm';
130613
+ if (ua.includes('yarn')) return 'yarn';
130614
+ if (ua.includes('bun')) return 'bun';
130615
+ if (ua.includes('npm')) return 'npm';
130616
+ }
130617
+ const execPath = process.env.npm_execpath || process.env.NPM_EXEC_PATH;
130618
+ if (execPath) {
130619
+ if (execPath.includes('pnpm')) return 'pnpm';
130620
+ if (execPath.includes('yarn')) return 'yarn';
130621
+ if (execPath.includes('bun')) return 'bun';
130622
+ if (execPath.includes('npm')) return 'npm';
130623
+ }
130624
+ }
130625
+ function getLogPrefix(type) {
130626
+ if ('true' === process.env.EXTENSION_AUTHOR_MODE) {
130627
+ const base = 'error' === type ? 'ERROR Author says' : '►►► Author says';
130628
+ return pintor__rspack_import_3_default().brightMagenta(base);
130629
+ }
130630
+ return 'error' === type ? pintor__rspack_import_3_default().red('ERROR') : pintor__rspack_import_3_default().gray('►►►');
130617
130631
  }
130618
130632
  async function resolvePackageManager() {
130619
130633
  const envPm = getPackageManagerFromEnv();
130620
130634
  if (envPm) return envPm;
130621
- return (0, package_manager_detector__rspack_import_4.detect)();
130635
+ return 'npm';
130622
130636
  }
130623
130637
  function getOptionalInstallCommand(pm, dependencies) {
130624
130638
  const quotedDir = JSON.stringify(__dirname);
130625
- const pmName = 'string' == typeof pm ? pm : pm?.name;
130639
+ const pmName = pm;
130626
130640
  if ('yarn' === pmName) return `yarn --silent add ${dependencies.join(' ')} --cwd ${quotedDir} --optional`;
130627
130641
  if ('npm' === pmName || isFromNpx()) return `npm --silent install ${dependencies.join(' ')} --prefix ${quotedDir} --save-optional`;
130628
130642
  if (isFromPnpx()) return `pnpm --silent add ${dependencies.join(' ')} --prefix ${quotedDir} --save-optional`;
@@ -130630,7 +130644,7 @@ var __webpack_modules__ = {
130630
130644
  return `${fallback} --silent install ${dependencies.join(' ')} --cwd ${quotedDir} --optional`;
130631
130645
  }
130632
130646
  function getRootInstallCommand(pm) {
130633
- const pmName = 'string' == typeof pm ? pm : pm?.name;
130647
+ const pmName = pm;
130634
130648
  if ('yarn' === pmName) return "yarn install --silent";
130635
130649
  if ('npm' === pmName || isFromNpx()) return "npm install --silent";
130636
130650
  if (isFromPnpx()) return "pnpm install --silent";
@@ -130638,7 +130652,7 @@ var __webpack_modules__ = {
130638
130652
  }
130639
130653
  function formatToolingLabel(integrations, fallback) {
130640
130654
  const list = integrations && integrations.length > 0 ? integrations.join('/') : fallback;
130641
- return `Setting up ${list} tooling...`;
130655
+ return `${getLogPrefix('info')} Setting up ${list} tooling...`;
130642
130656
  }
130643
130657
  async function installOptionalDependencies(integration, dependencies) {
130644
130658
  if (!dependencies.length) return;
@@ -130660,7 +130674,7 @@ var __webpack_modules__ = {
130660
130674
  console.log(`${pintor__rspack_import_3_default().brightMagenta('►►► Author says')} ${integration} tooling ready.`);
130661
130675
  }
130662
130676
  } catch (error) {
130663
- console.error(`[${integration}] Failed to install dependencies.`, error);
130677
+ console.error(`${getLogPrefix('error')} [${integration}] Failed to install dependencies.\n${pintor__rspack_import_3_default().red(String(error?.message || error))}`);
130664
130678
  }
130665
130679
  }
130666
130680
  async function installOptionalDependenciesBatch(integration, dependencies, integrations) {
@@ -130681,7 +130695,7 @@ var __webpack_modules__ = {
130681
130695
  console.log(`${pintor__rspack_import_3_default().brightMagenta('►►► Author says')} ${integration} tooling ready.`);
130682
130696
  }
130683
130697
  } catch (error) {
130684
- console.error(`[${integration}] Failed to install dependencies.`, error);
130698
+ console.error(`${getLogPrefix('error')} [${integration}] Failed to install dependencies.\n${pintor__rspack_import_3_default().red(String(error?.message || error))}`);
130685
130699
  }
130686
130700
  }
130687
130701
  function hasDependency(projectPath, dependency) {
@@ -130751,7 +130765,7 @@ var __webpack_modules__ = {
130751
130765
  return `${pintor__rspack_import_0_default().gray('►►►')} Using ${pintor__rspack_import_0_default().brightBlue(name)}...`;
130752
130766
  }
130753
130767
  function youAreAllSet(name) {
130754
- return `${pintor__rspack_import_0_default().green('►►►')} ${name} installation completed. Run again to proceed.`;
130768
+ return `${pintor__rspack_import_0_default().green('►►►')} ${name} installation completed.`;
130755
130769
  }
130756
130770
  function missingSassDependency() {
130757
130771
  const prefix = pintor__rspack_import_0_default().red('►►►');
@@ -131197,7 +131211,7 @@ var __webpack_modules__ = {
131197
131211
  return `${pintor__rspack_import_0_default().gray('►►►')} Using ${pintor__rspack_import_0_default().brightBlue(name)}...`;
131198
131212
  }
131199
131213
  function youAreAllSet(name) {
131200
- return `${pintor__rspack_import_0_default().green('►►►')} ${name} installation completed. Run again to proceed.`;
131214
+ return `${pintor__rspack_import_0_default().green('►►►')} ${name} installation completed.`;
131201
131215
  }
131202
131216
  function optionalDepsReady(integrations) {
131203
131217
  const list = integrations.length > 0 ? integrations.map((name)=>pintor__rspack_import_0_default().yellow(name)).join(', ') : pintor__rspack_import_0_default().gray('optional');
@@ -132089,6 +132103,7 @@ var __webpack_modules__ = {
132089
132103
  I: ()=>buildWebpack,
132090
132104
  IV: ()=>packagingSourceFiles,
132091
132105
  Ke: ()=>installingDependenciesFailed,
132106
+ Px: ()=>buildDependenciesInstallError,
132092
132107
  RB: ()=>cantInstallDependencies,
132093
132108
  SG: ()=>debugDirs,
132094
132109
  Ud: ()=>downloadingText,
@@ -132108,7 +132123,10 @@ var __webpack_modules__ = {
132108
132123
  ng: ()=>writingTypeDefinitions,
132109
132124
  tQ: ()=>fetchingProjectPath,
132110
132125
  tc: ()=>invalidRemoteZip,
132126
+ um: ()=>buildDependenciesInstallFailed,
132111
132127
  v_: ()=>writingTypeDefinitionsError,
132128
+ vo: ()=>buildDependenciesManualInstall,
132129
+ xK: ()=>installingBuildDependencies,
132112
132130
  yp: ()=>noCompanionExtensionsResolved,
132113
132131
  zM: ()=>unpackagedSuccessfully
132114
132132
  });
@@ -132171,6 +132189,20 @@ var __webpack_modules__ = {
132171
132189
  function installingRequiredDependencies() {
132172
132190
  return `${getLoggingPrefix('info')} Installing required dependencies...`;
132173
132191
  }
132192
+ function installingBuildDependencies(dependencies) {
132193
+ const list = dependencies.map((dep)=>pintor__rspack_import_2_default().gray(dep)).join(', ');
132194
+ return `${getLoggingPrefix('info')} Installing build dependencies: ${list}`;
132195
+ }
132196
+ function buildDependenciesInstallFailed(command, args, code) {
132197
+ 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))}`)}`;
132198
+ }
132199
+ function buildDependenciesInstallError(error) {
132200
+ return `${getLoggingPrefix('error')} Error installing build dependencies.\n${pintor__rspack_import_2_default().red(String(error?.message || error))}`;
132201
+ }
132202
+ function buildDependenciesManualInstall(dependencies, dependenciesMap) {
132203
+ const list = dependencies.map((dep)=>`- ${pintor__rspack_import_2_default().gray(`${dep}@${dependenciesMap[dep]}`)}`).join('\n');
132204
+ return `${getLoggingPrefix('warn')} Please install the following build dependencies manually:\n${list}`;
132205
+ }
132174
132206
  function dependenciesInstalledRunAgain() {
132175
132207
  return `${getLoggingPrefix('success')} Dependencies installed. Run the command again to proceed.`;
132176
132208
  }
@@ -132534,10 +132566,6 @@ var __webpack_modules__ = {
132534
132566
  "use strict";
132535
132567
  module.exports = require("os");
132536
132568
  },
132537
- "package-manager-detector" (module) {
132538
- "use strict";
132539
- module.exports = require("package-manager-detector");
132540
- },
132541
132569
  "parse5-utilities" (module) {
132542
132570
  "use strict";
132543
132571
  module.exports = require("parse5-utilities");
@@ -132584,7 +132612,7 @@ var __webpack_modules__ = {
132584
132612
  },
132585
132613
  "./package.json" (module) {
132586
132614
  "use strict";
132587
- module.exports = JSON.parse('{"rE":"3.1.1","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","chokidar":"^5.0.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","package-manager-detector":"^1.6.0","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"}}');
132615
+ module.exports = JSON.parse('{"rE":"3.2.0-next.3","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","chokidar":"^5.0.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"}}');
132588
132616
  }
132589
132617
  };
132590
132618
  var __webpack_module_cache__ = {};
@@ -132930,20 +132958,28 @@ var __webpack_exports__ = {};
132930
132958
  return Object.keys(dependencies).filter((dep)=>!isDependencyInstalled(dep, packageRoot));
132931
132959
  }
132932
132960
  const external_cross_spawn_namespaceObject = require("cross-spawn");
132933
- var external_package_manager_detector_ = __webpack_require__("package-manager-detector");
132934
- async function getInstallCommand(packageRoot) {
132935
- const hasPnpmLock = external_fs_.existsSync(external_path_.join(packageRoot, 'pnpm-lock.yaml'));
132936
- const hasYarnLock = external_fs_.existsSync(external_path_.join(packageRoot, 'yarn.lock'));
132937
- const hasNpmLock = external_fs_.existsSync(external_path_.join(packageRoot, 'package-lock.json'));
132961
+ function detectPackageManagerFromEnv() {
132962
+ const userAgent = process.env.npm_config_user_agent || '';
132963
+ if (userAgent.includes('pnpm')) return 'pnpm';
132964
+ if (userAgent.includes('yarn')) return 'yarn';
132965
+ if (userAgent.includes('npm')) return 'npm';
132966
+ const execPath = process.env.npm_execpath || process.env.NPM_EXEC_PATH || '';
132967
+ if (execPath.includes('pnpm')) return 'pnpm';
132968
+ if (execPath.includes('yarn')) return 'yarn';
132969
+ execPath.includes('npm');
132970
+ return 'npm';
132971
+ }
132972
+ function getInstallCommandForPath(cwd) {
132973
+ const hasPnpmLock = external_fs_.existsSync(external_path_.join(cwd, 'pnpm-lock.yaml'));
132974
+ const hasYarnLock = external_fs_.existsSync(external_path_.join(cwd, 'yarn.lock'));
132975
+ const hasNpmLock = external_fs_.existsSync(external_path_.join(cwd, 'package-lock.json'));
132938
132976
  if (hasPnpmLock) return 'pnpm';
132939
132977
  if (hasYarnLock) return 'yarn';
132940
132978
  if (hasNpmLock) return 'npm';
132941
- const pm = await (0, external_package_manager_detector_.detect)({
132942
- cwd: packageRoot
132943
- });
132944
- if (pm?.name === 'yarn') return 'yarn';
132945
- if (pm?.name === 'pnpm') return 'pnpm';
132946
- return 'npm';
132979
+ return detectPackageManagerFromEnv();
132980
+ }
132981
+ async function getInstallCommand(packageRoot) {
132982
+ return getInstallCommandForPath(packageRoot);
132947
132983
  }
132948
132984
  function getInstallArgs(command, dependencies, dependenciesMap) {
132949
132985
  const depsWithVersions = dependencies.map((dep)=>`${dep}@${dependenciesMap[dep]}`);
@@ -132974,41 +133010,29 @@ var __webpack_exports__ = {};
132974
133010
  const command = await getInstallCommand(packageRoot);
132975
133011
  const installArgs = getInstallArgs(command, dependencies, dependenciesMap);
132976
133012
  const stdio = 'true' === process.env.EXTENSION_AUTHOR_MODE ? 'inherit' : 'ignore';
132977
- console.log(`Installing build dependencies: ${dependencies.join(', ')}`);
133013
+ console.log(messages.xK(dependencies));
132978
133014
  const child = (0, external_cross_spawn_namespaceObject.spawn)(command, installArgs, {
132979
133015
  stdio
132980
133016
  });
132981
133017
  await new Promise((resolve, reject)=>{
132982
133018
  child.on('close', (code)=>{
132983
- if (0 !== code) reject(new Error(`Failed to install build dependencies: ${command} ${installArgs.join(' ')} (exit code ${code})`));
133019
+ if (0 !== code) reject(new Error(messages.um(command, installArgs, code)));
132984
133020
  else resolve();
132985
133021
  });
132986
133022
  child.on('error', (error)=>{
132987
- reject(new Error(`Failed to install build dependencies: ${error.message}`));
133023
+ reject(error);
132988
133024
  });
132989
133025
  });
132990
133026
  } catch (error) {
132991
- console.error(`Error installing build dependencies: ${error.message}`);
132992
- console.error('Please install the following dependencies manually:', dependencies.map((dep)=>` ${dep}@${dependenciesMap[dep]}`).join('\n'));
133027
+ console.error(messages.Px(error));
133028
+ console.error(messages.vo(dependencies, dependenciesMap));
132993
133029
  process.exit(1);
132994
133030
  } finally{
132995
133031
  process.chdir(originalDirectory);
132996
133032
  }
132997
133033
  }
132998
133034
  async function install_dependencies_getInstallCommand() {
132999
- const cwd = process.cwd();
133000
- const hasPnpmLock = external_fs_.existsSync(external_path_.join(cwd, 'pnpm-lock.yaml'));
133001
- const hasYarnLock = external_fs_.existsSync(external_path_.join(cwd, 'yarn.lock'));
133002
- const hasNpmLock = external_fs_.existsSync(external_path_.join(cwd, 'package-lock.json'));
133003
- if (hasPnpmLock) return 'pnpm';
133004
- if (hasYarnLock) return 'yarn';
133005
- if (hasNpmLock) return 'npm';
133006
- const pm = await (0, external_package_manager_detector_.detect)({
133007
- cwd
133008
- });
133009
- if (pm?.name === 'yarn') return 'yarn';
133010
- if (pm?.name === 'pnpm') return 'pnpm';
133011
- return 'npm';
133035
+ return getInstallCommandForPath(process.cwd());
133012
133036
  }
133013
133037
  function install_dependencies_getInstallArgs() {
133014
133038
  return [
@@ -133301,19 +133325,14 @@ var __webpack_exports__ = {};
133301
133325
  const shouldExitOnError = (buildOptions?.exitOnError ?? true) && !isVitest;
133302
133326
  const browser = (0, paths.YN)(buildOptions?.browser || 'chrome', buildOptions?.chromiumBinary, buildOptions?.geckoBinary || buildOptions?.firefoxBinary);
133303
133327
  const { manifestDir, packageJsonDir } = (0, paths.fu)(projectStructure);
133328
+ const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
133304
133329
  try {
133305
- const depsResult = await ensureProjectReady(projectStructure, 'production', {
133306
- skipProjectInstall: isVitest || !projectStructure.packageJsonPath,
133307
- exitOnInstall: true
133330
+ const shouldInstallProjectDeps = !isAuthor || buildOptions?.install !== false;
133331
+ await ensureProjectReady(projectStructure, 'production', {
133332
+ skipProjectInstall: isVitest || !projectStructure.packageJsonPath || !shouldInstallProjectDeps,
133333
+ exitOnInstall: false,
133334
+ showRunAgainMessage: false
133308
133335
  });
133309
- if (depsResult.installed) return {
133310
- browser,
133311
- total_assets: 0,
133312
- total_bytes: 0,
133313
- largest_asset_bytes: 0,
133314
- warnings_count: 0,
133315
- errors_count: 0
133316
- };
133317
133336
  const [{ rspack }, { merge }, { handleStatsErrors }, { default: webpackConfig }] = await Promise.all([
133318
133337
  import("@rspack/core"),
133319
133338
  import("webpack-merge"),
@@ -133323,7 +133342,7 @@ var __webpack_exports__ = {};
133323
133342
  __webpack_require__.e("547")
133324
133343
  ]).then(__webpack_require__.bind(__webpack_require__, "./webpack/webpack-config.ts"))
133325
133344
  ]);
133326
- const debug = 'true' === process.env.EXTENSION_AUTHOR_MODE;
133345
+ const debug = isAuthor;
133327
133346
  if (projectStructure.packageJsonPath) assertNoManagedDependencyConflicts(projectStructure.packageJsonPath, manifestDir);
133328
133347
  const commandConfig = await (0, config_loader.eY)(manifestDir, 'build');
133329
133348
  const distPath = (0, paths.q4)(packageJsonDir, browser);
@@ -133421,13 +133440,15 @@ var __webpack_exports__ = {};
133421
133440
  async function extensionDev(pathOrRemoteUrl, devOptions) {
133422
133441
  const projectStructure = await getProjectStructure(pathOrRemoteUrl);
133423
133442
  try {
133424
- const debug = 'true' === process.env.EXTENSION_AUTHOR_MODE;
133443
+ const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
133444
+ const debug = isAuthor;
133425
133445
  const { manifestDir, packageJsonDir } = (0, paths.fu)(projectStructure);
133426
- const depsResult = await ensureProjectReady(projectStructure, 'development', {
133427
- skipProjectInstall: !projectStructure.packageJsonPath,
133428
- exitOnInstall: true
133446
+ const shouldInstallProjectDeps = !isAuthor || false !== devOptions.install;
133447
+ await ensureProjectReady(projectStructure, 'development', {
133448
+ skipProjectInstall: !projectStructure.packageJsonPath || !shouldInstallProjectDeps,
133449
+ exitOnInstall: false,
133450
+ showRunAgainMessage: false
133429
133451
  });
133430
- if (depsResult.installed) return;
133431
133452
  if ((0, typescript.eE)(manifestDir)) await generateExtensionTypes(manifestDir, packageJsonDir);
133432
133453
  if (projectStructure.packageJsonPath) assertNoManagedDependencyConflicts(projectStructure.packageJsonPath, manifestDir);
133433
133454
  const browser = (0, paths.YN)(devOptions.browser || 'chrome', devOptions.chromiumBinary, devOptions.geckoBinary || devOptions.firefoxBinary);
@@ -133592,12 +133613,14 @@ var __webpack_exports__ = {};
133592
133613
  async function extensionStart(pathOrRemoteUrl, startOptions) {
133593
133614
  const projectStructure = await getProjectStructure(pathOrRemoteUrl);
133594
133615
  try {
133595
- const debug = 'true' === process.env.EXTENSION_AUTHOR_MODE;
133596
- const depsResult = await ensureProjectReady(projectStructure, 'development', {
133597
- skipProjectInstall: !projectStructure.packageJsonPath,
133598
- exitOnInstall: true
133616
+ const isAuthor = 'true' === process.env.EXTENSION_AUTHOR_MODE;
133617
+ const debug = isAuthor;
133618
+ const shouldInstallProjectDeps = !isAuthor || false !== startOptions.install;
133619
+ await ensureProjectReady(projectStructure, 'development', {
133620
+ skipProjectInstall: !projectStructure.packageJsonPath || !shouldInstallProjectDeps,
133621
+ exitOnInstall: false,
133622
+ showRunAgainMessage: false
133599
133623
  });
133600
- if (depsResult.installed) return;
133601
133624
  const browser = (0, paths.YN)(startOptions.browser || 'chrome', startOptions.chromiumBinary, startOptions.geckoBinary || startOptions.firefoxBinary);
133602
133625
  const { manifestDir, packageJsonDir } = (0, paths.fu)(projectStructure);
133603
133626
  const commandConfig = await (0, config_loader.eY)(packageJsonDir, 'start');
package/package.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "name": "extension-develop",
25
- "version": "3.1.1",
25
+ "version": "3.2.0-next.3",
26
26
  "description": "Develop, build, preview, and package Extension.js projects.",
27
27
  "author": {
28
28
  "name": "Cezar Augusto",
@@ -89,7 +89,6 @@
89
89
  "ignore": "^7.0.5",
90
90
  "loader-utils": "^3.3.1",
91
91
  "magic-string": "^0.30.21",
92
- "package-manager-detector": "^1.6.0",
93
92
  "parse5": "^8.0.0",
94
93
  "parse5-utilities": "^1.0.0",
95
94
  "pintor": "0.3.0",