wxt 0.17.2-alpha4 → 0.17.2-alpha6

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,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * A alias around `publish-extension` that is always installed on the path without having to install
4
+ * `publish-browser-extension` as a direct dependency (like for PNPM, which doesn't link
5
+ * sub-dependency binaries to "node_modules/.bin")
6
+ */
7
+ require('publish-browser-extension/cli');
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.17.2-alpha4";
2
+ var version = "0.17.2-alpha6";
3
3
 
4
4
  // src/core/utils/paths.ts
5
5
  import systemPath from "node:path";
@@ -1322,7 +1322,7 @@ function cssEntrypoints(entrypoint, config) {
1322
1322
  }
1323
1323
 
1324
1324
  // src/core/builders/vite/plugins/bundleAnalysis.ts
1325
- import { visualizer } from "rollup-plugin-visualizer";
1325
+ import { visualizer } from "@aklinker1/rollup-plugin-visualizer";
1326
1326
  import path3 from "node:path";
1327
1327
  var increment = 0;
1328
1328
  function bundleAnalysis(config) {
@@ -2849,6 +2849,7 @@ var ValidationError = class extends Error {
2849
2849
 
2850
2850
  // src/core/utils/building/internal-build.ts
2851
2851
  import consola3 from "consola";
2852
+ import { mergeJsonOutputs } from "@aklinker1/rollup-plugin-visualizer";
2852
2853
  async function internalBuild() {
2853
2854
  await wxt.hooks.callHook("build:before", wxt);
2854
2855
  const verb = wxt.config.command === "serve" ? "Pre-rendering" : "Building";
@@ -2900,18 +2901,11 @@ async function combineAnalysisStats() {
2900
2901
  absolute: true
2901
2902
  });
2902
2903
  const absolutePaths = unixFiles.map(unnormalizePath);
2903
- const { execa } = await import("./execa-4F7CCWCA.js");
2904
- await execa(
2905
- "rollup-plugin-visualizer",
2906
- [
2907
- ...absolutePaths,
2908
- "--template",
2909
- wxt.config.analysis.template,
2910
- "--filename",
2911
- wxt.config.analysis.outputFile
2912
- ],
2913
- { cwd: wxt.config.root, stdio: "inherit" }
2914
- );
2904
+ await mergeJsonOutputs({
2905
+ inputs: absolutePaths,
2906
+ template: wxt.config.analysis.template,
2907
+ filename: wxt.config.analysis.outputFile
2908
+ });
2915
2909
  if (!wxt.config.analysis.keepArtifacts) {
2916
2910
  await Promise.all(absolutePaths.map((statsFile) => fs12.remove(statsFile)));
2917
2911
  }
package/dist/cli.js CHANGED
@@ -1347,7 +1347,7 @@ function cssEntrypoints(entrypoint, config) {
1347
1347
  }
1348
1348
 
1349
1349
  // src/core/builders/vite/plugins/bundleAnalysis.ts
1350
- import { visualizer } from "rollup-plugin-visualizer";
1350
+ import { visualizer } from "@aklinker1/rollup-plugin-visualizer";
1351
1351
  import path3 from "node:path";
1352
1352
  var increment = 0;
1353
1353
  function bundleAnalysis(config) {
@@ -2181,7 +2181,7 @@ function getChunkSortWeight(filename) {
2181
2181
  import pc4 from "picocolors";
2182
2182
 
2183
2183
  // package.json
2184
- var version = "0.17.2-alpha4";
2184
+ var version = "0.17.2-alpha6";
2185
2185
 
2186
2186
  // src/core/utils/log/printHeader.ts
2187
2187
  import { consola as consola2 } from "consola";
@@ -2858,6 +2858,7 @@ var ValidationError = class extends Error {
2858
2858
 
2859
2859
  // src/core/utils/building/internal-build.ts
2860
2860
  import consola3 from "consola";
2861
+ import { mergeJsonOutputs } from "@aklinker1/rollup-plugin-visualizer";
2861
2862
  async function internalBuild() {
2862
2863
  await wxt.hooks.callHook("build:before", wxt);
2863
2864
  const verb = wxt.config.command === "serve" ? "Pre-rendering" : "Building";
@@ -2909,18 +2910,11 @@ async function combineAnalysisStats() {
2909
2910
  absolute: true
2910
2911
  });
2911
2912
  const absolutePaths = unixFiles.map(unnormalizePath);
2912
- const { execa } = await import("./execa-Y2EWTC4S.js");
2913
- await execa(
2914
- "rollup-plugin-visualizer",
2915
- [
2916
- ...absolutePaths,
2917
- "--template",
2918
- wxt.config.analysis.template,
2919
- "--filename",
2920
- wxt.config.analysis.outputFile
2921
- ],
2922
- { cwd: wxt.config.root, stdio: "inherit" }
2923
- );
2913
+ await mergeJsonOutputs({
2914
+ inputs: absolutePaths,
2915
+ template: wxt.config.analysis.template,
2916
+ filename: wxt.config.analysis.outputFile
2917
+ });
2924
2918
  if (!wxt.config.analysis.keepArtifacts) {
2925
2919
  await Promise.all(absolutePaths.map((statsFile) => fs12.remove(statsFile)));
2926
2920
  }
@@ -2953,14 +2947,8 @@ function printValidationResults({
2953
2947
  }
2954
2948
 
2955
2949
  // src/core/build.ts
2956
- import { ensureDependencyInstalled } from "nypm";
2957
2950
  async function build(config) {
2958
2951
  await registerWxt("build", config);
2959
- if (wxt.config.analysis.enabled) {
2960
- await ensureDependencyInstalled("rollup-plugin-visualizer", {
2961
- dev: true
2962
- });
2963
- }
2964
2952
  return await internalBuild();
2965
2953
  }
2966
2954
 
@@ -3522,7 +3510,6 @@ async function zip(config) {
3522
3510
 
3523
3511
  // src/cli/cli-utils.ts
3524
3512
  import consola7, { LogLevels as LogLevels2 } from "consola";
3525
- import { ensureDependencyInstalled as ensureDependencyInstalled2 } from "nypm";
3526
3513
  function wrapAction(cb, options) {
3527
3514
  return async (...args) => {
3528
3515
  const isDebug = !!args.find((arg) => arg?.debug);
@@ -3555,16 +3542,15 @@ function getArrayFromFlags(flags, name) {
3555
3542
  return result.length ? result : void 0;
3556
3543
  }
3557
3544
  var aliasCommandNames = /* @__PURE__ */ new Set();
3558
- function createAliasedCommand(base, name, alias, packageName, docsUrl) {
3545
+ function createAliasedCommand(base, name, alias, bin, docsUrl) {
3559
3546
  const aliasedCommand = base.command(name, `Alias for ${alias} (${docsUrl})`).allowUnknownOptions().action(async () => {
3560
3547
  try {
3561
- await ensureDependencyInstalled2(packageName, { dev: true });
3562
3548
  await registerWxt("build");
3563
3549
  const args = process.argv.slice(
3564
3550
  process.argv.indexOf(aliasedCommand.name) + 1
3565
3551
  );
3566
3552
  const { execa } = await import("./execa-Y2EWTC4S.js");
3567
- await execa(alias, args, {
3553
+ await execa(bin, args, {
3568
3554
  stdio: "inherit"
3569
3555
  });
3570
3556
  } catch {
@@ -3663,7 +3649,7 @@ createAliasedCommand(
3663
3649
  cli,
3664
3650
  "submit",
3665
3651
  "publish-extension",
3666
- "publish-browser-extension",
3652
+ "wxt-publish-extension",
3667
3653
  "https://www.npmjs.com/publish-browser-extension"
3668
3654
  );
3669
3655
  var commands_default = cli;
@@ -2,7 +2,7 @@ import * as vite from 'vite';
2
2
  import { Manifest, Scripting } from 'webextension-polyfill';
3
3
  import { UnimportOptions } from 'unimport';
4
4
  import { LogLevel } from 'consola';
5
- import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
5
+ import { PluginVisualizerOptions } from '@aklinker1/rollup-plugin-visualizer';
6
6
  import { FSWatcher } from 'chokidar';
7
7
  import { ResolvedConfig as ResolvedConfig$1 } from 'c12';
8
8
  import { NestedHooks, Hookable } from 'hookable';
@@ -2,7 +2,7 @@ import * as vite from 'vite';
2
2
  import { Manifest, Scripting } from 'webextension-polyfill';
3
3
  import { UnimportOptions } from 'unimport';
4
4
  import { LogLevel } from 'consola';
5
- import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
5
+ import { PluginVisualizerOptions } from '@aklinker1/rollup-plugin-visualizer';
6
6
  import { FSWatcher } from 'chokidar';
7
7
  import { ResolvedConfig as ResolvedConfig$1 } from 'c12';
8
8
  import { NestedHooks, Hookable } from 'hookable';