wxt 0.18.5 → 0.18.7

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.
Files changed (35) hide show
  1. package/dist/{chunk-7AOGIMIM.js → chunk-A3R6ZPUA.js} +120 -175
  2. package/dist/{chunk-5X3S6AWF.js → chunk-BERPNPEZ.js} +2 -4
  3. package/dist/{chunk-ZZCTFNQ5.js → chunk-BM6QYGAW.js} +1 -1
  4. package/dist/{chunk-NAMV4VWQ.js → chunk-KPD5J7PZ.js} +1 -1
  5. package/dist/{chunk-VBXJIVYU.js → chunk-QGM4M3NI.js} +1 -2
  6. package/dist/{chunk-73I7FAJU.js → chunk-SGKCDMVR.js} +1 -2
  7. package/dist/cli.js +141 -213
  8. package/dist/client.js +12 -24
  9. package/dist/{execa-QQUOQNS3.js → execa-ATHZH2Y4.js} +1576 -610
  10. package/dist/{execa-5TSWMF32.js → execa-D7CMCKO2.js} +1576 -610
  11. package/dist/{index-q2ZwJBs6.d.cts → index-D6lH9OkP.d.cts} +7 -3
  12. package/dist/{index-q2ZwJBs6.d.ts → index-D6lH9OkP.d.ts} +7 -3
  13. package/dist/index.cjs +2187 -1176
  14. package/dist/index.d.cts +3 -3
  15. package/dist/index.d.ts +3 -3
  16. package/dist/index.js +23 -38
  17. package/dist/modules.cjs +11 -2
  18. package/dist/modules.d.cts +31 -3
  19. package/dist/modules.d.ts +31 -3
  20. package/dist/modules.js +11 -3
  21. package/dist/{prompt-Y7B5HSD5.js → prompt-25QIVJDC.js} +28 -55
  22. package/dist/{prompt-TFJ7OLL7.js → prompt-7BMKNSWS.js} +28 -55
  23. package/dist/sandbox.js +2 -4
  24. package/dist/storage.cjs +4 -8
  25. package/dist/storage.js +6 -10
  26. package/dist/testing.cjs +47 -72
  27. package/dist/testing.d.cts +1 -1
  28. package/dist/testing.d.ts +1 -1
  29. package/dist/testing.js +4 -4
  30. package/dist/virtual/background-entrypoint.js +3 -6
  31. package/dist/virtual/content-script-isolated-world-entrypoint.js +1 -2
  32. package/dist/virtual/content-script-main-world-entrypoint.js +1 -2
  33. package/dist/virtual/reload-html.js +1 -2
  34. package/dist/virtual/unlisted-script-entrypoint.js +1 -2
  35. package/package.json +34 -33
@@ -1190,7 +1190,7 @@ interface ResolvedConfig {
1190
1190
  reloadCommand: string | false;
1191
1191
  };
1192
1192
  hooks: NestedHooks<WxtHooks>;
1193
- modules: WxtModule<any>[];
1193
+ modules: WxtModuleWithMetadata<any>[];
1194
1194
  /**
1195
1195
  * An array of string to import plugins from. These paths should be
1196
1196
  * resolvable by vite, and they should `export default defineWxtPlugin(...)`.
@@ -1287,7 +1287,7 @@ interface Dependency {
1287
1287
  version: string;
1288
1288
  }
1289
1289
  type WxtModuleOptions = Record<string, any>;
1290
- type WxtModuleSetup<TOptions extends WxtModuleOptions> = (wxt: Wxt, moduleOptions: TOptions) => void | Promise<void>;
1290
+ type WxtModuleSetup<TOptions extends WxtModuleOptions> = (wxt: Wxt, moduleOptions?: TOptions) => void | Promise<void>;
1291
1291
  interface WxtModule<TOptions extends WxtModuleOptions> {
1292
1292
  name?: string;
1293
1293
  /**
@@ -1309,6 +1309,10 @@ interface WxtModule<TOptions extends WxtModuleOptions> {
1309
1309
  */
1310
1310
  setup?: WxtModuleSetup<TOptions>;
1311
1311
  }
1312
+ interface WxtModuleWithMetadata<TOptions extends WxtModuleOptions> extends WxtModule<TOptions> {
1313
+ type: 'local' | 'node_module';
1314
+ id: string;
1315
+ }
1312
1316
  interface ResolvedPublicFile {
1313
1317
  /**
1314
1318
  * The absolute path to the file that will be copied to the output directory.
@@ -1325,4 +1329,4 @@ interface ResolvedPublicFile {
1325
1329
  }
1326
1330
  type WxtPlugin = () => void;
1327
1331
 
1328
- export type { EslintGlobalsPropValue as $, PerBrowserMap as A, BuildOutput as B, ContentScriptEntrypoint as C, ResolvedPerBrowserOptions as D, ExtensionRunnerConfig as E, UserManifest as F, GenericEntrypoint as G, UserManifestFn as H, InlineConfig as I, ConfigEnv as J, WxtCommand as K, Logger as L, MainWorldContentScriptEntrypointOptions as M, WxtBuilder as N, OutputFile as O, PopupEntrypointOptions as P, WxtBuilderServer as Q, ResolvedConfig as R, SidepanelEntrypointOptions as S, TargetBrowser as T, UserConfig as U, ServerInfo as V, WxtDevServer as W, HookResult as X, Wxt as Y, FsCache as Z, ExtensionRunner as _, WxtViteConfig as a, Eslintrc as a0, ResolvedEslintrc as a1, WxtUnimportOptions as a2, WxtResolvedUnimportOptions as a3, WxtPackageManager as a4, Dependency as a5, WxtModuleOptions as a6, WxtModuleSetup as a7, WxtModule as a8, ResolvedPublicFile as a9, WxtPlugin as aa, WxtHooks as b, OutputChunk as c, OutputAsset as d, BuildStepOutput as e, ReloadContentScriptPayload as f, TargetManifestVersion as g, BaseEntrypointOptions as h, BackgroundEntrypointOptions as i, BaseContentScriptEntrypointOptions as j, IsolatedWorldContentScriptEntrypointOptions as k, OptionsEntrypointOptions as l, BaseEntrypoint as m, BackgroundEntrypoint as n, PopupEntrypoint as o, OptionsEntrypoint as p, SidepanelEntrypoint as q, Entrypoint as r, EntrypointGroup as s, OnContentScriptStopped as t, IsolatedWorldContentScriptDefinition as u, MainWorldContentScriptDefinition as v, ContentScriptDefinition as w, BackgroundDefinition as x, UnlistedScriptDefinition as y, PerBrowserOption as z };
1332
+ export type { EslintGlobalsPropValue as $, PerBrowserMap as A, BuildOutput as B, ContentScriptEntrypoint as C, ResolvedPerBrowserOptions as D, ExtensionRunnerConfig as E, UserManifest as F, GenericEntrypoint as G, UserManifestFn as H, InlineConfig as I, ConfigEnv as J, WxtCommand as K, Logger as L, MainWorldContentScriptEntrypointOptions as M, WxtBuilder as N, OutputFile as O, PopupEntrypointOptions as P, WxtBuilderServer as Q, ResolvedConfig as R, SidepanelEntrypointOptions as S, TargetBrowser as T, UserConfig as U, ServerInfo as V, WxtDevServer as W, HookResult as X, Wxt as Y, FsCache as Z, ExtensionRunner as _, WxtViteConfig as a, Eslintrc as a0, ResolvedEslintrc as a1, WxtUnimportOptions as a2, WxtResolvedUnimportOptions as a3, WxtPackageManager as a4, Dependency as a5, WxtModuleOptions as a6, WxtModuleSetup as a7, WxtModule as a8, WxtModuleWithMetadata as a9, ResolvedPublicFile as aa, WxtPlugin as ab, WxtHooks as b, OutputChunk as c, OutputAsset as d, BuildStepOutput as e, ReloadContentScriptPayload as f, TargetManifestVersion as g, BaseEntrypointOptions as h, BackgroundEntrypointOptions as i, BaseContentScriptEntrypointOptions as j, IsolatedWorldContentScriptEntrypointOptions as k, OptionsEntrypointOptions as l, BaseEntrypoint as m, BackgroundEntrypoint as n, PopupEntrypoint as o, OptionsEntrypoint as p, SidepanelEntrypoint as q, Entrypoint as r, EntrypointGroup as s, OnContentScriptStopped as t, IsolatedWorldContentScriptDefinition as u, MainWorldContentScriptDefinition as v, ContentScriptDefinition as w, BackgroundDefinition as x, UnlistedScriptDefinition as y, PerBrowserOption as z };
@@ -1190,7 +1190,7 @@ interface ResolvedConfig {
1190
1190
  reloadCommand: string | false;
1191
1191
  };
1192
1192
  hooks: NestedHooks<WxtHooks>;
1193
- modules: WxtModule<any>[];
1193
+ modules: WxtModuleWithMetadata<any>[];
1194
1194
  /**
1195
1195
  * An array of string to import plugins from. These paths should be
1196
1196
  * resolvable by vite, and they should `export default defineWxtPlugin(...)`.
@@ -1287,7 +1287,7 @@ interface Dependency {
1287
1287
  version: string;
1288
1288
  }
1289
1289
  type WxtModuleOptions = Record<string, any>;
1290
- type WxtModuleSetup<TOptions extends WxtModuleOptions> = (wxt: Wxt, moduleOptions: TOptions) => void | Promise<void>;
1290
+ type WxtModuleSetup<TOptions extends WxtModuleOptions> = (wxt: Wxt, moduleOptions?: TOptions) => void | Promise<void>;
1291
1291
  interface WxtModule<TOptions extends WxtModuleOptions> {
1292
1292
  name?: string;
1293
1293
  /**
@@ -1309,6 +1309,10 @@ interface WxtModule<TOptions extends WxtModuleOptions> {
1309
1309
  */
1310
1310
  setup?: WxtModuleSetup<TOptions>;
1311
1311
  }
1312
+ interface WxtModuleWithMetadata<TOptions extends WxtModuleOptions> extends WxtModule<TOptions> {
1313
+ type: 'local' | 'node_module';
1314
+ id: string;
1315
+ }
1312
1316
  interface ResolvedPublicFile {
1313
1317
  /**
1314
1318
  * The absolute path to the file that will be copied to the output directory.
@@ -1325,4 +1329,4 @@ interface ResolvedPublicFile {
1325
1329
  }
1326
1330
  type WxtPlugin = () => void;
1327
1331
 
1328
- export type { EslintGlobalsPropValue as $, PerBrowserMap as A, BuildOutput as B, ContentScriptEntrypoint as C, ResolvedPerBrowserOptions as D, ExtensionRunnerConfig as E, UserManifest as F, GenericEntrypoint as G, UserManifestFn as H, InlineConfig as I, ConfigEnv as J, WxtCommand as K, Logger as L, MainWorldContentScriptEntrypointOptions as M, WxtBuilder as N, OutputFile as O, PopupEntrypointOptions as P, WxtBuilderServer as Q, ResolvedConfig as R, SidepanelEntrypointOptions as S, TargetBrowser as T, UserConfig as U, ServerInfo as V, WxtDevServer as W, HookResult as X, Wxt as Y, FsCache as Z, ExtensionRunner as _, WxtViteConfig as a, Eslintrc as a0, ResolvedEslintrc as a1, WxtUnimportOptions as a2, WxtResolvedUnimportOptions as a3, WxtPackageManager as a4, Dependency as a5, WxtModuleOptions as a6, WxtModuleSetup as a7, WxtModule as a8, ResolvedPublicFile as a9, WxtPlugin as aa, WxtHooks as b, OutputChunk as c, OutputAsset as d, BuildStepOutput as e, ReloadContentScriptPayload as f, TargetManifestVersion as g, BaseEntrypointOptions as h, BackgroundEntrypointOptions as i, BaseContentScriptEntrypointOptions as j, IsolatedWorldContentScriptEntrypointOptions as k, OptionsEntrypointOptions as l, BaseEntrypoint as m, BackgroundEntrypoint as n, PopupEntrypoint as o, OptionsEntrypoint as p, SidepanelEntrypoint as q, Entrypoint as r, EntrypointGroup as s, OnContentScriptStopped as t, IsolatedWorldContentScriptDefinition as u, MainWorldContentScriptDefinition as v, ContentScriptDefinition as w, BackgroundDefinition as x, UnlistedScriptDefinition as y, PerBrowserOption as z };
1332
+ export type { EslintGlobalsPropValue as $, PerBrowserMap as A, BuildOutput as B, ContentScriptEntrypoint as C, ResolvedPerBrowserOptions as D, ExtensionRunnerConfig as E, UserManifest as F, GenericEntrypoint as G, UserManifestFn as H, InlineConfig as I, ConfigEnv as J, WxtCommand as K, Logger as L, MainWorldContentScriptEntrypointOptions as M, WxtBuilder as N, OutputFile as O, PopupEntrypointOptions as P, WxtBuilderServer as Q, ResolvedConfig as R, SidepanelEntrypointOptions as S, TargetBrowser as T, UserConfig as U, ServerInfo as V, WxtDevServer as W, HookResult as X, Wxt as Y, FsCache as Z, ExtensionRunner as _, WxtViteConfig as a, Eslintrc as a0, ResolvedEslintrc as a1, WxtUnimportOptions as a2, WxtResolvedUnimportOptions as a3, WxtPackageManager as a4, Dependency as a5, WxtModuleOptions as a6, WxtModuleSetup as a7, WxtModule as a8, WxtModuleWithMetadata as a9, ResolvedPublicFile as aa, WxtPlugin as ab, WxtHooks as b, OutputChunk as c, OutputAsset as d, BuildStepOutput as e, ReloadContentScriptPayload as f, TargetManifestVersion as g, BaseEntrypointOptions as h, BackgroundEntrypointOptions as i, BaseContentScriptEntrypointOptions as j, IsolatedWorldContentScriptEntrypointOptions as k, OptionsEntrypointOptions as l, BaseEntrypoint as m, BackgroundEntrypoint as n, PopupEntrypoint as o, OptionsEntrypoint as p, SidepanelEntrypoint as q, Entrypoint as r, EntrypointGroup as s, OnContentScriptStopped as t, IsolatedWorldContentScriptDefinition as u, MainWorldContentScriptDefinition as v, ContentScriptDefinition as w, BackgroundDefinition as x, UnlistedScriptDefinition as y, PerBrowserOption as z };