wxt 0.18.15 → 0.19.0-alpha1

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 (259) hide show
  1. package/bin/wxt.mjs +1 -1
  2. package/dist/browser/chrome.d.ts +17 -0
  3. package/dist/browser/chrome.mjs +7 -0
  4. package/dist/browser/index.d.ts +4 -0
  5. package/dist/browser/index.mjs +1 -0
  6. package/dist/browser/webextension-polyfill.d.ts +18 -0
  7. package/dist/browser/webextension-polyfill.mjs +2 -0
  8. package/dist/builtin-modules/index.d.ts +2 -0
  9. package/dist/builtin-modules/index.mjs +2 -0
  10. package/dist/builtin-modules/unimport.d.ts +8 -0
  11. package/dist/builtin-modules/unimport.mjs +99 -0
  12. package/dist/cli/cli-utils.d.ts +25 -0
  13. package/dist/cli/cli-utils.mjs +58 -0
  14. package/dist/cli/commands.d.ts +2 -0
  15. package/dist/cli/commands.mjs +104 -0
  16. package/dist/cli/index.d.ts +1 -0
  17. package/dist/cli/index.mjs +11 -0
  18. package/dist/client/app-config.d.ts +2 -0
  19. package/dist/client/app-config.mjs +4 -0
  20. package/dist/client/content-scripts/content-script-context.d.ts +114 -0
  21. package/dist/client/content-scripts/content-script-context.mjs +169 -0
  22. package/dist/client/content-scripts/custom-events.d.ts +10 -0
  23. package/dist/client/content-scripts/custom-events.mjs +13 -0
  24. package/dist/client/content-scripts/index.d.ts +2 -0
  25. package/dist/client/content-scripts/index.mjs +2 -0
  26. package/dist/client/content-scripts/location-watcher.d.ts +12 -0
  27. package/dist/client/content-scripts/location-watcher.mjs +22 -0
  28. package/dist/client/content-scripts/ui/index.d.ts +23 -0
  29. package/dist/client/content-scripts/ui/index.mjs +188 -0
  30. package/dist/{client.d.ts → client/content-scripts/ui/types.d.ts} +15 -43
  31. package/dist/client/content-scripts/ui/types.mjs +0 -0
  32. package/dist/client/index.d.ts +7 -0
  33. package/dist/client/index.mjs +2 -0
  34. package/dist/core/build.d.ts +15 -0
  35. package/dist/core/build.mjs +6 -0
  36. package/dist/core/builders/vite/index.d.ts +3 -0
  37. package/dist/core/builders/vite/index.mjs +297 -0
  38. package/dist/core/builders/vite/plugins/bundleAnalysis.d.ts +7 -0
  39. package/dist/core/builders/vite/plugins/bundleAnalysis.mjs +15 -0
  40. package/dist/core/builders/vite/plugins/cssEntrypoints.d.ts +13 -0
  41. package/dist/core/builders/vite/plugins/cssEntrypoints.mjs +22 -0
  42. package/dist/core/builders/vite/plugins/defineImportMeta.d.ts +14 -0
  43. package/dist/core/builders/vite/plugins/defineImportMeta.mjs +13 -0
  44. package/dist/core/builders/vite/plugins/devHtmlPrerender.d.ts +7 -0
  45. package/dist/core/builders/vite/plugins/devHtmlPrerender.mjs +140 -0
  46. package/dist/core/builders/vite/plugins/devServerGlobals.d.ts +6 -0
  47. package/dist/core/builders/vite/plugins/devServerGlobals.mjs +15 -0
  48. package/dist/core/builders/vite/plugins/download.d.ts +10 -0
  49. package/dist/core/builders/vite/plugins/download.mjs +14 -0
  50. package/dist/core/builders/vite/plugins/entrypointGroupGlobals.d.ts +6 -0
  51. package/dist/core/builders/vite/plugins/entrypointGroupGlobals.mjs +16 -0
  52. package/dist/core/builders/vite/plugins/extensionApiMock.d.ts +11 -0
  53. package/dist/core/builders/vite/plugins/extensionApiMock.mjs +26 -0
  54. package/dist/core/builders/vite/plugins/globals.d.ts +3 -0
  55. package/dist/core/builders/vite/plugins/globals.mjs +15 -0
  56. package/dist/core/builders/vite/plugins/index.d.ts +17 -0
  57. package/dist/core/builders/vite/plugins/index.mjs +17 -0
  58. package/dist/core/builders/vite/plugins/multipageMove.d.ts +20 -0
  59. package/dist/core/builders/vite/plugins/multipageMove.mjs +59 -0
  60. package/dist/core/builders/vite/plugins/noopBackground.d.ts +6 -0
  61. package/dist/core/builders/vite/plugins/noopBackground.mjs +17 -0
  62. package/dist/core/builders/vite/plugins/removeEntrypointMainFunction.d.ts +6 -0
  63. package/dist/core/builders/vite/plugins/removeEntrypointMainFunction.mjs +12 -0
  64. package/dist/core/builders/vite/plugins/resolveAppConfig.d.ts +6 -0
  65. package/dist/core/builders/vite/plugins/resolveAppConfig.mjs +26 -0
  66. package/dist/core/builders/vite/plugins/resolveExtensionApi.d.ts +10 -0
  67. package/dist/core/builders/vite/plugins/resolveExtensionApi.mjs +15 -0
  68. package/dist/core/builders/vite/plugins/resolveVirtualModules.d.ts +6 -0
  69. package/dist/core/builders/vite/plugins/resolveVirtualModules.mjs +30 -0
  70. package/dist/core/builders/vite/plugins/tsconfigPaths.d.ts +3 -0
  71. package/dist/core/builders/vite/plugins/tsconfigPaths.mjs +12 -0
  72. package/dist/core/builders/vite/plugins/wxtPluginLoader.d.ts +6 -0
  73. package/dist/core/builders/vite/plugins/wxtPluginLoader.mjs +56 -0
  74. package/dist/core/clean.d.ts +21 -0
  75. package/dist/core/clean.mjs +38 -0
  76. package/dist/core/create-server.d.ts +11 -0
  77. package/dist/core/create-server.mjs +206 -0
  78. package/dist/core/define-config.d.ts +2 -0
  79. package/dist/core/define-config.mjs +3 -0
  80. package/dist/core/define-runner-config.d.ts +2 -0
  81. package/dist/core/define-runner-config.mjs +3 -0
  82. package/dist/core/index.d.ts +8 -0
  83. package/dist/core/index.mjs +8 -0
  84. package/dist/core/initialize.d.ts +5 -0
  85. package/dist/core/initialize.mjs +128 -0
  86. package/dist/core/package-managers/bun.d.ts +2 -0
  87. package/dist/core/package-managers/bun.mjs +19 -0
  88. package/dist/core/package-managers/index.d.ts +2 -0
  89. package/dist/core/package-managers/index.mjs +65 -0
  90. package/dist/core/package-managers/npm.d.ts +17 -0
  91. package/dist/core/package-managers/npm.mjs +58 -0
  92. package/dist/core/package-managers/pnpm.d.ts +2 -0
  93. package/dist/core/package-managers/pnpm.mjs +21 -0
  94. package/dist/core/package-managers/types.d.ts +2 -0
  95. package/dist/core/package-managers/types.mjs +0 -0
  96. package/dist/core/package-managers/yarn.d.ts +2 -0
  97. package/dist/core/package-managers/yarn.mjs +31 -0
  98. package/dist/core/prepare.d.ts +2 -0
  99. package/dist/core/prepare.mjs +8 -0
  100. package/dist/core/runners/index.d.ts +2 -0
  101. package/dist/core/runners/index.mjs +12 -0
  102. package/dist/core/runners/manual.d.ts +5 -0
  103. package/dist/core/runners/manual.mjs +16 -0
  104. package/dist/core/runners/safari.d.ts +5 -0
  105. package/dist/core/runners/safari.mjs +16 -0
  106. package/dist/core/runners/web-ext.d.ts +5 -0
  107. package/dist/core/runners/web-ext.mjs +78 -0
  108. package/dist/core/runners/wsl.d.ts +5 -0
  109. package/dist/core/runners/wsl.mjs +16 -0
  110. package/dist/core/utils/arrays.d.ts +13 -0
  111. package/dist/{chunk-BERPNPEZ.js → core/utils/arrays.mjs} +6 -10
  112. package/dist/core/utils/building/build-entrypoints.d.ts +3 -0
  113. package/dist/core/utils/building/build-entrypoints.mjs +47 -0
  114. package/dist/core/utils/building/detect-dev-changes.d.ts +57 -0
  115. package/dist/core/utils/building/detect-dev-changes.mjs +93 -0
  116. package/dist/core/utils/building/find-entrypoints.d.ts +5 -0
  117. package/dist/core/utils/building/find-entrypoints.mjs +385 -0
  118. package/dist/core/utils/building/generate-wxt-dir.d.ts +5 -0
  119. package/dist/core/utils/building/generate-wxt-dir.mjs +190 -0
  120. package/dist/core/utils/building/group-entrypoints.d.ts +8 -0
  121. package/dist/core/utils/building/group-entrypoints.mjs +37 -0
  122. package/dist/core/utils/building/import-entrypoint.d.ts +16 -0
  123. package/dist/core/utils/building/import-entrypoint.mjs +97 -0
  124. package/dist/core/utils/building/index.d.ts +9 -0
  125. package/dist/core/utils/building/index.mjs +9 -0
  126. package/dist/core/utils/building/internal-build.d.ts +12 -0
  127. package/dist/core/utils/building/internal-build.mjs +112 -0
  128. package/dist/core/utils/building/rebuild.d.ts +23 -0
  129. package/dist/core/utils/building/rebuild.mjs +39 -0
  130. package/dist/core/utils/building/resolve-config.d.ts +11 -0
  131. package/dist/core/utils/building/resolve-config.mjs +365 -0
  132. package/dist/core/utils/cache.d.ts +8 -0
  133. package/dist/core/utils/cache.mjs +21 -0
  134. package/dist/core/utils/cli.d.ts +3 -0
  135. package/dist/core/utils/cli.mjs +26 -0
  136. package/dist/core/utils/constants.d.ts +5 -0
  137. package/dist/core/utils/constants.mjs +1 -0
  138. package/dist/core/utils/content-scripts.d.ts +11 -0
  139. package/dist/core/utils/content-scripts.mjs +60 -0
  140. package/dist/core/utils/content-security-policy.d.ts +14 -0
  141. package/dist/core/utils/content-security-policy.mjs +39 -0
  142. package/dist/core/utils/entrypoints.d.ts +25 -0
  143. package/dist/core/utils/entrypoints.mjs +31 -0
  144. package/dist/core/utils/eslint.d.ts +1 -0
  145. package/dist/core/utils/eslint.mjs +11 -0
  146. package/dist/core/utils/fs.d.ts +13 -0
  147. package/dist/core/utils/fs.mjs +15 -0
  148. package/dist/core/utils/globals.d.ts +11 -0
  149. package/dist/core/utils/globals.mjs +53 -0
  150. package/dist/core/utils/i18n.d.ts +11 -0
  151. package/dist/core/utils/i18n.mjs +35 -0
  152. package/dist/core/utils/log/index.d.ts +4 -0
  153. package/dist/core/utils/log/index.mjs +4 -0
  154. package/dist/core/utils/log/printBuildSummary.d.ts +2 -0
  155. package/dist/core/utils/log/printBuildSummary.mjs +32 -0
  156. package/dist/core/utils/log/printFileList.d.ts +1 -0
  157. package/dist/core/utils/log/printFileList.mjs +42 -0
  158. package/dist/core/utils/log/printHeader.d.ts +1 -0
  159. package/dist/core/utils/log/printHeader.mjs +7 -0
  160. package/dist/core/utils/log/printTable.d.ts +1 -0
  161. package/dist/core/utils/log/printTable.mjs +22 -0
  162. package/dist/core/utils/manifest.d.ts +44 -0
  163. package/dist/core/utils/manifest.mjs +512 -0
  164. package/dist/core/utils/network.d.ts +7 -0
  165. package/dist/core/utils/network.mjs +38 -0
  166. package/dist/core/utils/package.d.ts +6 -0
  167. package/dist/core/utils/package.mjs +14 -0
  168. package/dist/core/utils/paths.d.ts +11 -0
  169. package/dist/core/utils/paths.mjs +10 -0
  170. package/dist/core/utils/strings.d.ts +14 -0
  171. package/dist/core/utils/strings.mjs +18 -0
  172. package/dist/core/utils/testing/fake-objects.d.ts +4520 -0
  173. package/dist/core/utils/testing/fake-objects.mjs +323 -0
  174. package/dist/core/utils/time.d.ts +9 -0
  175. package/dist/core/utils/time.mjs +17 -0
  176. package/dist/core/utils/transform.d.ts +9 -0
  177. package/dist/core/utils/transform.mjs +17 -0
  178. package/dist/core/utils/types.d.ts +10 -0
  179. package/dist/core/utils/types.mjs +0 -0
  180. package/dist/core/utils/validation.d.ts +15 -0
  181. package/dist/core/utils/validation.mjs +55 -0
  182. package/dist/core/utils/virtual-modules.d.ts +22 -0
  183. package/dist/core/utils/virtual-modules.mjs +14 -0
  184. package/dist/core/utils/wsl.d.ts +4 -0
  185. package/dist/core/utils/wsl.mjs +4 -0
  186. package/dist/core/wxt.d.ts +19 -0
  187. package/dist/core/wxt.mjs +41 -0
  188. package/dist/core/zip.d.ts +7 -0
  189. package/dist/core/zip.mjs +137 -0
  190. package/dist/index.d.ts +4 -79
  191. package/dist/index.mjs +3 -0
  192. package/dist/modules.d.ts +10 -20
  193. package/dist/{chunk-6XSIWUWF.js → modules.mjs} +7 -16
  194. package/dist/sandbox/define-app-config.d.ts +19 -0
  195. package/dist/sandbox/define-app-config.mjs +3 -0
  196. package/dist/sandbox/define-background.d.ts +3 -0
  197. package/dist/sandbox/define-background.mjs +4 -0
  198. package/dist/sandbox/define-content-script.d.ts +2 -0
  199. package/dist/sandbox/define-content-script.mjs +3 -0
  200. package/dist/sandbox/define-unlisted-script.d.ts +3 -0
  201. package/dist/sandbox/define-unlisted-script.mjs +4 -0
  202. package/dist/sandbox/define-wxt-plugin.d.ts +2 -0
  203. package/dist/sandbox/define-wxt-plugin.mjs +3 -0
  204. package/dist/sandbox/dev-server-websocket.d.ts +21 -0
  205. package/dist/sandbox/dev-server-websocket.mjs +37 -0
  206. package/dist/sandbox/index.d.ts +11 -0
  207. package/dist/sandbox/index.mjs +6 -0
  208. package/dist/sandbox/utils/logger.d.ts +9 -0
  209. package/dist/sandbox/utils/logger.mjs +15 -0
  210. package/dist/storage.d.ts +12 -14
  211. package/dist/{storage.js → storage.mjs} +4 -33
  212. package/dist/testing/fake-browser.d.ts +1 -0
  213. package/dist/testing/fake-browser.mjs +1 -0
  214. package/dist/testing/index.d.ts +5 -0
  215. package/dist/testing/index.mjs +2 -0
  216. package/dist/{testing.d.ts → testing/wxt-vitest-plugin.d.ts} +3 -15
  217. package/dist/testing/wxt-vitest-plugin.mjs +26 -0
  218. package/dist/{index-nWRfwAJi.d.cts → types.d.ts} +118 -249
  219. package/dist/types.mjs +0 -0
  220. package/dist/version.d.ts +1 -0
  221. package/dist/version.mjs +1 -0
  222. package/dist/virtual/{background-entrypoint.js → background-entrypoint.mjs} +31 -40
  223. package/dist/virtual/{content-script-isolated-world-entrypoint.js → content-script-isolated-world-entrypoint.mjs} +9 -13
  224. package/dist/virtual/{content-script-main-world-entrypoint.js → content-script-main-world-entrypoint.mjs} +9 -14
  225. package/dist/virtual/mock-browser.mjs +6 -0
  226. package/dist/virtual/{reload-html.js → reload-html.mjs} +8 -9
  227. package/dist/virtual/{unlisted-script-entrypoint.js → unlisted-script-entrypoint.mjs} +8 -12
  228. package/package.json +51 -57
  229. package/dist/browser.d.ts +0 -18
  230. package/dist/browser.js +0 -6
  231. package/dist/chunk-BM6QYGAW.js +0 -1063
  232. package/dist/chunk-FNTE2L27.js +0 -7
  233. package/dist/chunk-FP7RYLVL.js +0 -3617
  234. package/dist/chunk-KPD5J7PZ.js +0 -1065
  235. package/dist/chunk-QGM4M3NI.js +0 -37
  236. package/dist/chunk-SGKCDMVR.js +0 -38
  237. package/dist/cli.d.ts +0 -2
  238. package/dist/cli.js +0 -4438
  239. package/dist/client.js +0 -424
  240. package/dist/define-app-config-bg54F_lV.d.ts +0 -294
  241. package/dist/execa-4UBDUBJZ.js +0 -7244
  242. package/dist/execa-QLUM2B3W.js +0 -7245
  243. package/dist/index-nWRfwAJi.d.ts +0 -1401
  244. package/dist/index.cjs +0 -14473
  245. package/dist/index.d.cts +0 -81
  246. package/dist/index.js +0 -696
  247. package/dist/modules.cjs +0 -96
  248. package/dist/modules.d.cts +0 -119
  249. package/dist/modules.js +0 -17
  250. package/dist/prompt-25QIVJDC.js +0 -755
  251. package/dist/prompt-7BMKNSWS.js +0 -754
  252. package/dist/sandbox.d.ts +0 -16
  253. package/dist/sandbox.js +0 -36
  254. package/dist/storage.cjs +0 -439
  255. package/dist/storage.d.cts +0 -200
  256. package/dist/testing.cjs +0 -2815
  257. package/dist/testing.d.cts +0 -30
  258. package/dist/testing.js +0 -40
  259. package/dist/virtual/mock-browser.js +0 -6
@@ -0,0 +1,137 @@
1
+ import path from "node:path";
2
+ import fs from "fs-extra";
3
+ import { kebabCaseAlphanumeric } from "./utils/strings.mjs";
4
+ import { getPackageJson } from "./utils/package.mjs";
5
+ import { minimatch } from "minimatch";
6
+ import { formatDuration } from "./utils/time.mjs";
7
+ import { printFileList } from "./utils/log/printFileList.mjs";
8
+ import { internalBuild } from "./utils/building/index.mjs";
9
+ import { registerWxt, wxt } from "./wxt.mjs";
10
+ import JSZip from "jszip";
11
+ import glob from "fast-glob";
12
+ import { normalizePath } from "./utils/paths.mjs";
13
+ export async function zip(config) {
14
+ await registerWxt("build", config);
15
+ const output = await internalBuild();
16
+ const start = Date.now();
17
+ wxt.logger.info("Zipping extension...");
18
+ const zipFiles = [];
19
+ const projectName = wxt.config.zip.name ?? kebabCaseAlphanumeric(
20
+ (await getPackageJson())?.name || path.dirname(process.cwd())
21
+ );
22
+ const applyTemplate = (template) => template.replaceAll("{{name}}", projectName).replaceAll("{{browser}}", wxt.config.browser).replaceAll(
23
+ "{{version}}",
24
+ output.manifest.version_name ?? output.manifest.version
25
+ ).replaceAll("{{mode}}", wxt.config.mode).replaceAll("{{manifestVersion}}", `mv${wxt.config.manifestVersion}`);
26
+ await fs.ensureDir(wxt.config.outBaseDir);
27
+ const outZipFilename = applyTemplate(wxt.config.zip.artifactTemplate);
28
+ const outZipPath = path.resolve(wxt.config.outBaseDir, outZipFilename);
29
+ await zipDir(wxt.config.outDir, outZipPath);
30
+ zipFiles.push(outZipPath);
31
+ if (wxt.config.browser === "firefox") {
32
+ const { overrides, files: downloadedPackages } = await downloadPrivatePackages();
33
+ const sourcesZipFilename = applyTemplate(wxt.config.zip.sourcesTemplate);
34
+ const sourcesZipPath = path.resolve(
35
+ wxt.config.outBaseDir,
36
+ sourcesZipFilename
37
+ );
38
+ await zipDir(wxt.config.zip.sourcesRoot, sourcesZipPath, {
39
+ include: wxt.config.zip.includeSources,
40
+ exclude: wxt.config.zip.excludeSources,
41
+ transform(absolutePath, zipPath, content) {
42
+ if (zipPath.endsWith("package.json")) {
43
+ return addOverridesToPackageJson(absolutePath, content, overrides);
44
+ }
45
+ },
46
+ additionalFiles: downloadedPackages
47
+ });
48
+ zipFiles.push(sourcesZipPath);
49
+ }
50
+ await printFileList(
51
+ wxt.logger.success,
52
+ `Zipped extension in ${formatDuration(Date.now() - start)}`,
53
+ wxt.config.outBaseDir,
54
+ zipFiles
55
+ );
56
+ return zipFiles;
57
+ }
58
+ async function zipDir(directory, outputPath, options) {
59
+ const archive = new JSZip();
60
+ const files = (await glob("**/*", {
61
+ cwd: directory,
62
+ // Ignore node_modules, otherwise this glob step takes forever
63
+ ignore: ["**/node_modules"],
64
+ onlyFiles: true
65
+ // TODO: Fix #738
66
+ // dot: true,
67
+ })).filter((relativePath) => {
68
+ return options?.include?.some((pattern) => minimatch(relativePath, pattern)) || !options?.exclude?.some((pattern) => minimatch(relativePath, pattern));
69
+ });
70
+ const filesToZip = [
71
+ ...files,
72
+ ...(options?.additionalFiles ?? []).map(
73
+ (file) => path.relative(directory, file)
74
+ )
75
+ ];
76
+ for (const file of filesToZip) {
77
+ const absolutePath = path.resolve(directory, file);
78
+ if (file.endsWith(".json")) {
79
+ const content = await fs.readFile(absolutePath, "utf-8");
80
+ archive.file(
81
+ file,
82
+ await options?.transform?.(absolutePath, file, content) || content
83
+ );
84
+ } else {
85
+ const content = await fs.readFile(absolutePath);
86
+ archive.file(file, content);
87
+ }
88
+ }
89
+ await options?.additionalWork?.(archive);
90
+ await new Promise(
91
+ (resolve, reject) => archive.generateNodeStream({
92
+ type: "nodebuffer",
93
+ ...wxt.config.zip.compressionLevel === 0 ? { compression: "STORE" } : {
94
+ compression: "DEFLATE",
95
+ compressionOptions: { level: wxt.config.zip.compressionLevel }
96
+ }
97
+ }).pipe(fs.createWriteStream(outputPath)).on("error", reject).on("close", resolve)
98
+ );
99
+ }
100
+ async function downloadPrivatePackages() {
101
+ const overrides = {};
102
+ const files = [];
103
+ if (wxt.config.zip.downloadPackages.length > 0) {
104
+ const _downloadPackages = new Set(wxt.config.zip.downloadPackages);
105
+ const allPackages = await wxt.pm.listDependencies({
106
+ all: true,
107
+ cwd: wxt.config.root
108
+ });
109
+ const downloadPackages = allPackages.filter(
110
+ (pkg) => _downloadPackages.has(pkg.name)
111
+ );
112
+ for (const pkg of downloadPackages) {
113
+ wxt.logger.info(`Downloading package: ${pkg.name}@${pkg.version}`);
114
+ const id = `${pkg.name}@${pkg.version}`;
115
+ const tgzPath = await wxt.pm.downloadDependency(
116
+ id,
117
+ wxt.config.zip.downloadedPackagesDir
118
+ );
119
+ files.push(tgzPath);
120
+ overrides[id] = tgzPath;
121
+ }
122
+ }
123
+ return { overrides, files };
124
+ }
125
+ function addOverridesToPackageJson(absolutePackageJsonPath, content, overrides) {
126
+ if (Object.keys(overrides).length === 0) return content;
127
+ const packageJsonDir = path.dirname(absolutePackageJsonPath);
128
+ const oldPackage = JSON.parse(content);
129
+ const newPackage = {
130
+ ...oldPackage,
131
+ [wxt.pm.overridesKey]: { ...oldPackage[wxt.pm.overridesKey] }
132
+ };
133
+ Object.entries(overrides).forEach(([key, absolutePath]) => {
134
+ newPackage[wxt.pm.overridesKey][key] = "file://./" + normalizePath(path.relative(packageJsonDir, absolutePath));
135
+ });
136
+ return JSON.stringify(newPackage, null, 2);
137
+ }
package/dist/index.d.ts CHANGED
@@ -1,81 +1,6 @@
1
- import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-nWRfwAJi.js';
2
- export { x as BackgroundDefinition, n as BackgroundEntrypoint, i as BackgroundEntrypointOptions, j as BaseContentScriptEntrypointOptions, m as BaseEntrypoint, h as BaseEntrypointOptions, e as BuildStepOutput, J as ConfigEnv, w as ContentScriptDefinition, C as ContentScriptEntrypoint, ac as CopiedPublicFile, a5 as Dependency, r as Entrypoint, s as EntrypointGroup, $ as EslintGlobalsPropValue, a0 as Eslintrc, _ as ExtensionRunner, Z as FsCache, ad as GeneratedPublicFile, G as GenericEntrypoint, X as HookResult, u as IsolatedWorldContentScriptDefinition, k as IsolatedWorldContentScriptEntrypointOptions, L as Logger, v as MainWorldContentScriptDefinition, M as MainWorldContentScriptEntrypointOptions, t as OnContentScriptStopped, p as OptionsEntrypoint, l as OptionsEntrypointOptions, d as OutputAsset, c as OutputChunk, O as OutputFile, A as PerBrowserMap, z as PerBrowserOption, o as PopupEntrypoint, P as PopupEntrypointOptions, f as ReloadContentScriptPayload, ab as ResolvedBasePublicFile, R as ResolvedConfig, a1 as ResolvedEslintrc, D as ResolvedPerBrowserOptions, aa as ResolvedPublicFile, V as ServerInfo, q as SidepanelEntrypoint, S as SidepanelEntrypointOptions, T as TargetBrowser, g as TargetManifestVersion, y as UnlistedScriptDefinition, F as UserManifest, H as UserManifestFn, Y as Wxt, N as WxtBuilder, Q as WxtBuilderServer, K as WxtCommand, af as WxtDirEntry, ah as WxtDirFileEntry, ag as WxtDirTypeReferenceEntry, b as WxtHooks, a8 as WxtModule, a6 as WxtModuleOptions, a7 as WxtModuleSetup, a9 as WxtModuleWithMetadata, a4 as WxtPackageManager, ae as WxtPlugin, a3 as WxtResolvedUnimportOptions, a2 as WxtUnimportOptions, a as WxtViteConfig } from './index-nWRfwAJi.js';
3
- import 'vite';
4
- import 'webextension-polyfill';
5
- import 'unimport';
6
- import 'consola';
7
- import '@aklinker1/rollup-plugin-visualizer';
8
- import 'chokidar';
9
- import 'c12';
10
- import 'hookable';
11
- import 'nypm';
12
-
13
1
  /**
14
- * Bundles the extension for production. Returns a promise of the build result. Discovers the `wxt.config.ts` file in
15
- * the root directory, and merges that config with what is passed in.
16
- *
17
- * @example
18
- * // Use config from `wxt.config.ts`
19
- * const res = await build()
20
- *
21
- * // or override config `from wxt.config.ts`
22
- * const res = await build({
23
- * // Override config...
24
- * })
2
+ * @module wxt
25
3
  */
26
- declare function build(config?: InlineConfig): Promise<BuildOutput>;
27
-
28
- /**
29
- * Remove generated/temp files from the directory.
30
- *
31
- * @param config Optional config that will override your `<root>/wxt.config.ts`.
32
- *
33
- * @example
34
- * await clean();
35
- */
36
- declare function clean(config?: InlineConfig): Promise<void>;
37
- /**
38
- * Remove generated/temp files from the directory.
39
- *
40
- * @deprecated
41
- *
42
- * @param root The directory to look for generated/temp files in. Defaults to `process.cwd()`. Can be relative to `process.cwd()` or absolute.
43
- *
44
- * @example
45
- * await clean();
46
- */
47
- declare function clean(root?: string): Promise<void>;
48
-
49
- declare function defineConfig(config: UserConfig): UserConfig;
50
-
51
- declare function defineRunnerConfig(config: ExtensionRunnerConfig): ExtensionRunnerConfig;
52
-
53
- /**
54
- * Creates a dev server and pre-builds all the files that need to exist before loading the extension.
55
- *
56
- * @example
57
- * const server = await wxt.createServer({
58
- * // Enter config...
59
- * });
60
- * await server.start();
61
- */
62
- declare function createServer(inlineConfig?: InlineConfig): Promise<WxtDevServer>;
63
-
64
- declare function initialize(options: {
65
- directory: string;
66
- template: string;
67
- packageManager: string;
68
- }): Promise<void>;
69
-
70
- declare function prepare(config: InlineConfig): Promise<void>;
71
-
72
- /**
73
- * Build and zip the extension for distribution.
74
- * @param config Optional config that will override your `<root>/wxt.config.ts`.
75
- * @returns A list of all files included in the ZIP.
76
- */
77
- declare function zip(config?: InlineConfig): Promise<string[]>;
78
-
79
- var version = "0.18.14";
80
-
81
- export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
4
+ export * from './core';
5
+ export * from './types';
6
+ export * from './version';
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ export * from "./core/index.mjs";
2
+ export * from "./types.mjs";
3
+ export * from "./version.mjs";
package/dist/modules.d.ts CHANGED
@@ -1,21 +1,13 @@
1
- import { a6 as WxtModuleOptions, a8 as WxtModule, a7 as WxtModuleSetup, Y as Wxt, r as Entrypoint } from './index-nWRfwAJi.js';
2
- import * as vite from 'vite';
3
- import { UnimportOptions } from 'unimport';
4
- import 'webextension-polyfill';
5
- import 'consola';
6
- import '@aklinker1/rollup-plugin-visualizer';
7
- import 'chokidar';
8
- import 'c12';
9
- import 'hookable';
10
- import 'nypm';
11
-
12
1
  /**
13
2
  * Utilities for creating reusable, build-time modules for WXT.
14
3
  *
15
4
  * @module wxt/modules
16
5
  */
17
-
18
- declare function defineWxtModule<TOptions extends WxtModuleOptions>(module: WxtModule<TOptions> | WxtModuleSetup<TOptions>): WxtModule<TOptions>;
6
+ import type { Entrypoint, Wxt, WxtModule, WxtModuleOptions, WxtModuleSetup } from './types';
7
+ import * as vite from 'vite';
8
+ import type { UnimportOptions } from 'unimport';
9
+ export { WxtModule };
10
+ export declare function defineWxtModule<TOptions extends WxtModuleOptions>(module: WxtModule<TOptions> | WxtModuleSetup<TOptions>): WxtModule<TOptions>;
19
11
  /**
20
12
  * Adds a TS/JS file as an entrypoint to the project. This file will be bundled
21
13
  * along with the other entrypoints.
@@ -39,7 +31,7 @@ declare function defineWxtModule<TOptions extends WxtModuleOptions>(module: WxtM
39
31
  * });
40
32
  * });
41
33
  */
42
- declare function addEntrypoint(wxt: Wxt, entrypoint: Entrypoint): void;
34
+ export declare function addEntrypoint(wxt: Wxt, entrypoint: Entrypoint): void;
43
35
  /**
44
36
  * Copy files inside a directory (as if it were the public directory) into the
45
37
  * extension's output directory. The directory itself is not copied, just the
@@ -53,7 +45,7 @@ declare function addEntrypoint(wxt: Wxt, entrypoint: Entrypoint): void;
53
45
  * addPublicAssets(wxt, "./dist/prebundled");
54
46
  * });
55
47
  */
56
- declare function addPublicAssets(wxt: Wxt, dir: string): void;
48
+ export declare function addPublicAssets(wxt: Wxt, dir: string): void;
57
49
  /**
58
50
  * Merge additional vite config for one or more entrypoint "groups" that make
59
51
  * up individual builds. Config in the project's `wxt.config.ts` file takes
@@ -72,7 +64,7 @@ declare function addPublicAssets(wxt: Wxt, dir: string): void;
72
64
  * });
73
65
  * });
74
66
  */
75
- declare function addViteConfig(wxt: Wxt, viteConfig: (env: vite.ConfigEnv) => vite.UserConfig | undefined): void;
67
+ export declare function addViteConfig(wxt: Wxt, viteConfig: (env: vite.ConfigEnv) => vite.UserConfig | undefined): void;
76
68
  /**
77
69
  * Add a runtime plugin to the project. In each entrypoint, before executing
78
70
  * the `main` function, plugins are executed.
@@ -86,7 +78,7 @@ declare function addViteConfig(wxt: Wxt, viteConfig: (env: vite.ConfigEnv) => vi
86
78
  * addWxtPlugin(wxt, "wxt-module-analytics/client-plugin");
87
79
  * });
88
80
  */
89
- declare function addWxtPlugin(wxt: Wxt, plugin: string): void;
81
+ export declare function addWxtPlugin(wxt: Wxt, plugin: string): void;
90
82
  /**
91
83
  * Add an Unimport preset ([built-in](https://github.com/unjs/unimport?tab=readme-ov-file#built-in-presets),
92
84
  * [custom](https://github.com/unjs/unimport?tab=readme-ov-file#custom-presets),
@@ -114,6 +106,4 @@ declare function addWxtPlugin(wxt: Wxt, plugin: string): void;
114
106
  * addImportPreset(wxt, { package: "vue" });
115
107
  * });
116
108
  */
117
- declare function addImportPreset(wxt: Wxt, preset: UnimportOptions['presets'][0]): void;
118
-
119
- export { WxtModule, addEntrypoint, addImportPreset, addPublicAssets, addViteConfig, addWxtPlugin, defineWxtModule };
109
+ export declare function addImportPreset(wxt: Wxt, preset: UnimportOptions['presets'][0]): void;
@@ -1,17 +1,17 @@
1
- // src/modules.ts
2
1
  import * as vite from "vite";
3
2
  import glob from "fast-glob";
4
3
  import { resolve } from "node:path";
5
- function defineWxtModule(module) {
4
+ export {};
5
+ export function defineWxtModule(module) {
6
6
  if (typeof module === "function") return { setup: module };
7
7
  return module;
8
8
  }
9
- function addEntrypoint(wxt, entrypoint) {
9
+ export function addEntrypoint(wxt, entrypoint) {
10
10
  wxt.hooks.hook("entrypoints:resolved", (wxt2, entrypoints) => {
11
11
  entrypoints.push(entrypoint);
12
12
  });
13
13
  }
14
- function addPublicAssets(wxt, dir) {
14
+ export function addPublicAssets(wxt, dir) {
15
15
  wxt.hooks.hook("build:publicAssets", async (wxt2, files) => {
16
16
  const moreFiles = await glob("**/*", { cwd: dir });
17
17
  if (moreFiles.length === 0) {
@@ -23,7 +23,7 @@ function addPublicAssets(wxt, dir) {
23
23
  });
24
24
  });
25
25
  }
26
- function addViteConfig(wxt, viteConfig) {
26
+ export function addViteConfig(wxt, viteConfig) {
27
27
  wxt.hooks.hook("ready", (wxt2) => {
28
28
  const userVite = wxt2.config.vite;
29
29
  wxt2.config.vite = async (env) => {
@@ -33,12 +33,12 @@ function addViteConfig(wxt, viteConfig) {
33
33
  };
34
34
  });
35
35
  }
36
- function addWxtPlugin(wxt, plugin) {
36
+ export function addWxtPlugin(wxt, plugin) {
37
37
  wxt.hooks.hook("ready", (wxt2) => {
38
38
  wxt2.config.plugins.push(plugin);
39
39
  });
40
40
  }
41
- function addImportPreset(wxt, preset) {
41
+ export function addImportPreset(wxt, preset) {
42
42
  wxt.hooks.hook("ready", (wxt2) => {
43
43
  if (!wxt2.config.imports) return;
44
44
  wxt2.config.imports.presets ??= [];
@@ -46,12 +46,3 @@ function addImportPreset(wxt, preset) {
46
46
  wxt2.config.imports.presets.push(preset);
47
47
  });
48
48
  }
49
-
50
- export {
51
- defineWxtModule,
52
- addEntrypoint,
53
- addPublicAssets,
54
- addViteConfig,
55
- addWxtPlugin,
56
- addImportPreset
57
- };
@@ -0,0 +1,19 @@
1
+ export interface WxtAppConfig {
2
+ }
3
+ /**
4
+ * Runtime app config defined in `<srcDir>/app.config.ts`.
5
+ *
6
+ * You can add fields to this interface via ["Module Augmentation"](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation):
7
+ *
8
+ * ```ts
9
+ * // app.config.ts
10
+ * import 'wxt/sandbox';
11
+ *
12
+ * declare module "wxt/sandbox" {
13
+ * export interface WxtAppConfig {
14
+ * analytics: AnalyticsConfig
15
+ * }
16
+ * }
17
+ * ```
18
+ */
19
+ export declare function defineAppConfig(config: WxtAppConfig): WxtAppConfig;
@@ -0,0 +1,3 @@
1
+ export function defineAppConfig(config) {
2
+ return config;
3
+ }
@@ -0,0 +1,3 @@
1
+ import type { BackgroundDefinition } from '../types';
2
+ export declare function defineBackground(main: () => void): BackgroundDefinition;
3
+ export declare function defineBackground(definition: BackgroundDefinition): BackgroundDefinition;
@@ -0,0 +1,4 @@
1
+ export function defineBackground(arg) {
2
+ if (typeof arg === "function") return { main: arg };
3
+ return arg;
4
+ }
@@ -0,0 +1,2 @@
1
+ import type { ContentScriptDefinition } from '../types';
2
+ export declare function defineContentScript(definition: ContentScriptDefinition): ContentScriptDefinition;
@@ -0,0 +1,3 @@
1
+ export function defineContentScript(definition) {
2
+ return definition;
3
+ }
@@ -0,0 +1,3 @@
1
+ import type { UnlistedScriptDefinition } from '../types';
2
+ export declare function defineUnlistedScript(main: () => void): UnlistedScriptDefinition;
3
+ export declare function defineUnlistedScript(definition: UnlistedScriptDefinition): UnlistedScriptDefinition;
@@ -0,0 +1,4 @@
1
+ export function defineUnlistedScript(arg) {
2
+ if (typeof arg === "function") return { main: arg };
3
+ return arg;
4
+ }
@@ -0,0 +1,2 @@
1
+ import type { WxtPlugin } from '../types';
2
+ export declare function defineWxtPlugin(plugin: WxtPlugin): WxtPlugin;
@@ -0,0 +1,3 @@
1
+ export function defineWxtPlugin(plugin) {
2
+ return plugin;
3
+ }
@@ -0,0 +1,21 @@
1
+ export interface WxtWebSocket extends WebSocket {
2
+ addWxtEventListener(type: 'wxt:reload-extension', callback: (event: CustomEvent<undefined>) => void, options?: AddEventListenerOptions | boolean): void;
3
+ addWxtEventListener(type: 'wxt:reload-content-script', callback?: (event: CustomEvent<ReloadContentScriptPayload>) => void, options?: AddEventListenerOptions | boolean): void;
4
+ addWxtEventListener(type: 'wxt:reload-page', callback?: (event: CustomEvent<string>) => void, options?: AddEventListenerOptions | boolean): void;
5
+ sendCustom(event: string, payload?: any): void;
6
+ }
7
+ /**
8
+ * Connect to the websocket and listen for messages.
9
+ *
10
+ * @param onMessage Optional callback that is called when a message is recieved and we've verified
11
+ * it's structure is what we expect.
12
+ */
13
+ export declare function getDevServerWebSocket(): WxtWebSocket;
14
+ export interface ReloadContentScriptPayload {
15
+ registration?: 'manifest' | 'runtime';
16
+ contentScript: {
17
+ matches: string[];
18
+ js?: string[];
19
+ css?: string[];
20
+ };
21
+ }
@@ -0,0 +1,37 @@
1
+ import { logger } from "./utils/logger.mjs";
2
+ let ws;
3
+ export function getDevServerWebSocket() {
4
+ if (import.meta.env.COMMAND !== "serve")
5
+ throw Error(
6
+ "Must be running WXT dev command to connect to call getDevServerWebSocket()"
7
+ );
8
+ if (ws == null) {
9
+ const serverUrl = `${__DEV_SERVER_PROTOCOL__}//${__DEV_SERVER_HOSTNAME__}:${__DEV_SERVER_PORT__}`;
10
+ logger.debug("Connecting to dev server @", serverUrl);
11
+ ws = new WebSocket(serverUrl, "vite-hmr");
12
+ ws.addWxtEventListener = ws.addEventListener.bind(ws);
13
+ ws.sendCustom = (event, payload) => ws?.send(JSON.stringify({ type: "custom", event, payload }));
14
+ ws.addEventListener("open", () => {
15
+ logger.debug("Connected to dev server");
16
+ });
17
+ ws.addEventListener("close", () => {
18
+ logger.debug("Disconnected from dev server");
19
+ });
20
+ ws.addEventListener("error", (event) => {
21
+ logger.error("Failed to connect to dev server", event);
22
+ });
23
+ ws.addEventListener("message", (e) => {
24
+ try {
25
+ const message = JSON.parse(e.data);
26
+ if (message.type === "custom") {
27
+ ws?.dispatchEvent(
28
+ new CustomEvent(message.event, { detail: message.data })
29
+ );
30
+ }
31
+ } catch (err) {
32
+ logger.error("Failed to handle message", err);
33
+ }
34
+ });
35
+ }
36
+ return ws;
37
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Any runtime APIs that don't use the web extension APIs.
3
+ *
4
+ * @module wxt/sandbox
5
+ */
6
+ export * from './define-unlisted-script';
7
+ export * from './define-background';
8
+ export * from './define-content-script';
9
+ export * from './define-wxt-plugin';
10
+ export * from './define-app-config';
11
+ export * from '@webext-core/match-patterns';
@@ -0,0 +1,6 @@
1
+ export * from "./define-unlisted-script.mjs";
2
+ export * from "./define-background.mjs";
3
+ export * from "./define-content-script.mjs";
4
+ export * from "./define-wxt-plugin.mjs";
5
+ export * from "./define-app-config.mjs";
6
+ export * from "@webext-core/match-patterns";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Wrapper around `console` with a "[wxt]" prefix
3
+ */
4
+ export declare const logger: {
5
+ debug: (...args: any[]) => void;
6
+ log: (...args: any[]) => void;
7
+ warn: (...args: any[]) => void;
8
+ error: (...args: any[]) => void;
9
+ };
@@ -0,0 +1,15 @@
1
+ function print(method, ...args) {
2
+ if (import.meta.env.MODE === "production") return;
3
+ if (typeof args[0] === "string") {
4
+ const message = args.shift();
5
+ method(`[wxt] ${message}`, ...args);
6
+ } else {
7
+ method("[wxt]", ...args);
8
+ }
9
+ }
10
+ export const logger = {
11
+ debug: (...args) => print(console.debug, ...args),
12
+ log: (...args) => print(console.log, ...args),
13
+ warn: (...args) => print(console.warn, ...args),
14
+ error: (...args) => print(console.error, ...args)
15
+ };
package/dist/storage.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- declare const storage: WxtStorage;
2
- interface WxtStorage {
1
+ export declare const storage: WxtStorage;
2
+ export interface WxtStorage {
3
3
  /**
4
4
  * Get an item from storage, or return `null` if it doesn't exist.
5
5
  *
@@ -108,7 +108,7 @@ interface WxtStorage {
108
108
  defineItem<TValue, TMetadata extends Record<string, unknown> = {}>(key: StorageItemKey): WxtStorageItem<TValue | null, TMetadata>;
109
109
  defineItem<TValue, TMetadata extends Record<string, unknown> = {}>(key: StorageItemKey, options: WxtStorageItemOptions<TValue>): WxtStorageItem<TValue, TMetadata>;
110
110
  }
111
- interface WxtStorageItem<TValue, TMetadata extends Record<string, unknown>> {
111
+ export interface WxtStorageItem<TValue, TMetadata extends Record<string, unknown>> {
112
112
  defaultValue: TValue;
113
113
  /**
114
114
  * Get the latest value from storage.
@@ -146,15 +146,15 @@ interface WxtStorageItem<TValue, TMetadata extends Record<string, unknown>> {
146
146
  */
147
147
  migrate(): Promise<void>;
148
148
  }
149
- type StorageArea = 'local' | 'session' | 'sync' | 'managed';
150
- type StorageItemKey = `${StorageArea}:${string}`;
151
- interface GetItemOptions<T> {
149
+ export type StorageArea = 'local' | 'session' | 'sync' | 'managed';
150
+ export type StorageItemKey = `${StorageArea}:${string}`;
151
+ export interface GetItemOptions<T> {
152
152
  /**
153
153
  * Value returned from `getValue` when it would otherwise return null.
154
154
  */
155
155
  defaultValue?: T;
156
156
  }
157
- interface RemoveItemOptions {
157
+ export interface RemoveItemOptions {
158
158
  /**
159
159
  * Optionally remove metadata when deleting a key.
160
160
  *
@@ -162,14 +162,14 @@ interface RemoveItemOptions {
162
162
  */
163
163
  removeMeta?: boolean;
164
164
  }
165
- interface SnapshotOptions {
165
+ export interface SnapshotOptions {
166
166
  /**
167
167
  * Exclude a list of keys. The storage area prefix should be removed since the snapshot is for a
168
168
  * specific storage area already.
169
169
  */
170
170
  excludeKeys?: string[];
171
171
  }
172
- interface WxtStorageItemOptions<T> {
172
+ export interface WxtStorageItemOptions<T> {
173
173
  defaultValue: T;
174
174
  /**
175
175
  * Provide a version number for the storage item to enable migrations. When changing the version
@@ -185,16 +185,14 @@ interface WxtStorageItemOptions<T> {
185
185
  * Same as `Partial`, but includes `| null`. It makes all the properties of an object optional and
186
186
  * nullable.
187
187
  */
188
- type NullablePartial<T> = {
188
+ export type NullablePartial<T> = {
189
189
  [key in keyof T]+?: T[key] | undefined | null;
190
190
  };
191
191
  /**
192
192
  * Callback called when a value in storage is changed.
193
193
  */
194
- type WatchCallback<T> = (newValue: T, oldValue: T) => void;
194
+ export type WatchCallback<T> = (newValue: T, oldValue: T) => void;
195
195
  /**
196
196
  * Call to remove a watch listener
197
197
  */
198
- type Unwatch = () => void;
199
-
200
- export { type GetItemOptions, type NullablePartial, type RemoveItemOptions, type SnapshotOptions, type StorageArea, type StorageItemKey, type Unwatch, type WatchCallback, type WxtStorage, type WxtStorageItem, type WxtStorageItemOptions, storage };
198
+ export type Unwatch = () => void;
@@ -1,34 +1,8 @@
1
- import {
2
- toArray
3
- } from "./chunk-BERPNPEZ.js";
4
- import "./chunk-QGM4M3NI.js";
5
-
6
- // src/browser.ts
7
- import originalBrowser from "webextension-polyfill";
8
- var browser = originalBrowser;
9
-
10
- // src/storage.ts
1
+ import { browser } from "wxt/browser";
11
2
  import { dequal } from "dequal/lite";
12
-
13
- // src/sandbox/utils/logger.ts
14
- function print(method, ...args) {
15
- if (import.meta.env.MODE === "production") return;
16
- if (typeof args[0] === "string") {
17
- const message = args.shift();
18
- method(`[wxt] ${message}`, ...args);
19
- } else {
20
- method("[wxt]", ...args);
21
- }
22
- }
23
- var logger = {
24
- debug: (...args) => print(console.debug, ...args),
25
- log: (...args) => print(console.log, ...args),
26
- warn: (...args) => print(console.warn, ...args),
27
- error: (...args) => print(console.error, ...args)
28
- };
29
-
30
- // src/storage.ts
31
- var storage = createStorage();
3
+ import { logger } from "./sandbox/utils/logger.mjs";
4
+ import { toArray } from "./core/utils/arrays.mjs";
5
+ export const storage = createStorage();
32
6
  function createStorage() {
33
7
  const drivers = {
34
8
  local: createDriver("local"),
@@ -396,6 +370,3 @@ function createDriver(storageArea) {
396
370
  }
397
371
  };
398
372
  }
399
- export {
400
- storage
401
- };
@@ -0,0 +1 @@
1
+ export { fakeBrowser, type FakeBrowser } from '@webext-core/fake-browser';
@@ -0,0 +1 @@
1
+ export { fakeBrowser } from "@webext-core/fake-browser";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @module wxt/testing
3
+ */
4
+ export * from './fake-browser';
5
+ export * from './wxt-vitest-plugin';