wxt 0.20.13 → 0.20.15
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/browser.d.mts +20 -0
- package/dist/browser.mjs +18 -3
- package/dist/builtin-modules/index.mjs +7 -2
- package/dist/builtin-modules/unimport.mjs +69 -75
- package/dist/cli/cli-utils.mjs +54 -50
- package/dist/cli/commands.mjs +78 -103
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.mjs +9 -4
- package/dist/core/{build.d.ts → build.d.mts} +6 -2
- package/dist/core/build.mjs +23 -4
- package/dist/core/builders/vite/index.mjs +293 -343
- package/dist/core/builders/vite/plugins/bundleAnalysis.mjs +11 -12
- package/dist/core/builders/vite/plugins/cssEntrypoints.mjs +27 -20
- package/dist/core/builders/vite/plugins/defineImportMeta.mjs +17 -12
- package/dist/core/builders/vite/plugins/devHtmlPrerender.mjs +105 -136
- package/dist/core/builders/vite/plugins/devServerGlobals.mjs +15 -14
- package/dist/core/builders/vite/plugins/download.mjs +23 -12
- package/dist/core/builders/vite/plugins/entrypointGroupGlobals.mjs +18 -14
- package/dist/core/builders/vite/plugins/extensionApiMock.mjs +31 -33
- package/dist/core/builders/vite/plugins/globals.mjs +14 -13
- package/dist/core/builders/vite/plugins/iifeFooter.mjs +17 -11
- package/dist/core/builders/vite/plugins/index.mjs +18 -16
- package/dist/core/builders/vite/plugins/noopBackground.mjs +21 -15
- package/dist/core/builders/vite/plugins/removeEntrypointMainFunction.mjs +26 -23
- package/dist/core/builders/vite/plugins/resolveAppConfig.mjs +26 -24
- package/dist/core/builders/vite/plugins/resolveVirtualModules.mjs +28 -26
- package/dist/core/builders/vite/plugins/tsconfigPaths.mjs +11 -11
- package/dist/core/builders/vite/plugins/wxtPluginLoader.mjs +42 -47
- package/dist/core/{clean.d.ts → clean.d.mts} +7 -3
- package/dist/core/clean.mjs +38 -35
- package/dist/core/{create-server.d.ts → create-server.d.mts} +6 -2
- package/dist/core/create-server.mjs +236 -247
- package/dist/core/define-config.d.mts +6 -0
- package/dist/core/define-config.mjs +6 -2
- package/dist/core/define-web-ext-config.d.mts +13 -0
- package/dist/core/define-web-ext-config.mjs +16 -7
- package/dist/core/generate-wxt-dir.mjs +110 -148
- package/dist/core/index.d.mts +9 -0
- package/dist/core/index.mjs +12 -8
- package/dist/core/initialize.d.mts +8 -0
- package/dist/core/initialize.mjs +110 -124
- package/dist/core/keyboard-shortcuts.mjs +30 -28
- package/dist/core/package-managers/bun.mjs +18 -16
- package/dist/core/package-managers/deno.mjs +12 -8
- package/dist/core/package-managers/index.mjs +52 -60
- package/dist/core/package-managers/npm.mjs +51 -52
- package/dist/core/package-managers/pnpm.mjs +21 -18
- package/dist/core/package-managers/yarn.mjs +31 -28
- package/dist/core/prepare.d.mts +6 -0
- package/dist/core/prepare.mjs +12 -7
- package/dist/core/resolve-config.mjs +393 -462
- package/dist/core/runners/index.mjs +15 -10
- package/dist/core/runners/manual.mjs +13 -14
- package/dist/core/runners/safari.mjs +13 -14
- package/dist/core/runners/web-ext.mjs +62 -83
- package/dist/core/runners/wsl.mjs +13 -14
- package/dist/core/utils/arrays.mjs +23 -12
- package/dist/core/utils/building/build-entrypoints.mjs +44 -40
- package/dist/core/utils/building/detect-dev-changes.mjs +84 -105
- package/dist/core/utils/building/find-entrypoints.mjs +278 -359
- package/dist/core/utils/building/group-entrypoints.mjs +42 -35
- package/dist/core/utils/building/index.mjs +8 -6
- package/dist/core/utils/building/internal-build.mjs +86 -102
- package/dist/core/utils/building/rebuild.mjs +50 -30
- package/dist/core/utils/cache.mjs +29 -18
- package/dist/core/utils/constants.mjs +9 -1
- package/dist/core/utils/content-scripts.mjs +56 -54
- package/dist/core/utils/content-security-policy.mjs +36 -39
- package/dist/core/utils/entrypoints.mjs +51 -28
- package/dist/core/utils/env.mjs +22 -17
- package/dist/core/utils/environments/browser-environment.mjs +13 -12
- package/dist/core/utils/environments/environment.mjs +36 -33
- package/dist/core/utils/environments/extension-environment.mjs +15 -10
- package/dist/core/utils/environments/index.mjs +4 -2
- package/dist/core/utils/eslint.mjs +11 -10
- package/dist/core/utils/fs.mjs +23 -11
- package/dist/core/utils/globals.mjs +53 -51
- package/dist/core/utils/i18n.mjs +41 -32
- package/dist/core/utils/index.mjs +3 -0
- package/dist/core/utils/log/index.mjs +6 -4
- package/dist/core/utils/log/printBuildSummary.mjs +20 -25
- package/dist/core/utils/log/printFileList.mjs +30 -33
- package/dist/core/utils/log/printHeader.mjs +9 -5
- package/dist/core/utils/log/printTable.mjs +19 -21
- package/dist/core/utils/manifest.mjs +366 -479
- package/dist/core/utils/minimatch-multiple.mjs +26 -15
- package/dist/core/utils/network.mjs +27 -33
- package/dist/core/utils/number.mjs +7 -3
- package/dist/core/utils/package.mjs +20 -13
- package/dist/core/utils/paths.d.mts +8 -0
- package/dist/core/utils/paths.mjs +26 -7
- package/dist/core/utils/strings.mjs +19 -14
- package/dist/core/utils/syntax-errors.mjs +14 -16
- package/dist/core/utils/time.mjs +19 -15
- package/dist/core/utils/transform.mjs +129 -160
- package/dist/core/utils/types.d.mts +6 -0
- package/dist/core/utils/validation.mjs +43 -50
- package/dist/core/utils/virtual-modules.mjs +20 -12
- package/dist/core/utils/wsl.mjs +11 -3
- package/dist/core/wxt.mjs +65 -60
- package/dist/core/{zip.d.ts → zip.d.mts} +6 -2
- package/dist/core/zip.mjs +118 -140
- package/dist/index.d.mts +13 -0
- package/dist/index.mjs +13 -3
- package/dist/{modules.d.ts → modules.d.mts} +14 -16
- package/dist/modules.mjs +179 -51
- package/dist/testing/fake-browser.d.mts +2 -0
- package/dist/testing/fake-browser.mjs +3 -1
- package/dist/testing/index.d.mts +3 -0
- package/dist/testing/index.mjs +4 -2
- package/dist/testing/{wxt-vitest-plugin.d.ts → wxt-vitest-plugin.d.mts} +7 -9
- package/dist/testing/wxt-vitest-plugin.mjs +38 -19
- package/dist/types.d.mts +1475 -0
- package/dist/utils/app-config.d.mts +6 -0
- package/dist/utils/app-config.mjs +8 -2
- package/dist/utils/content-script-context.d.mts +134 -0
- package/dist/utils/content-script-context.mjs +187 -175
- package/dist/utils/content-script-ui/iframe.d.mts +42 -0
- package/dist/utils/content-script-ui/iframe.mjs +42 -27
- package/dist/utils/content-script-ui/integrated.d.mts +37 -0
- package/dist/utils/content-script-ui/integrated.mjs +36 -29
- package/dist/utils/content-script-ui/shadow-root.d.mts +80 -0
- package/dist/utils/content-script-ui/shadow-root.mjs +75 -82
- package/dist/utils/content-script-ui/shared.mjs +115 -150
- package/dist/utils/content-script-ui/types.d.mts +107 -0
- package/dist/utils/content-script-ui/types.mjs +1 -0
- package/dist/utils/{define-app-config.d.ts → define-app-config.d.mts} +5 -3
- package/dist/utils/define-app-config.mjs +22 -2
- package/dist/utils/define-background.d.mts +7 -0
- package/dist/utils/define-background.mjs +7 -3
- package/dist/utils/define-content-script.d.mts +6 -0
- package/dist/utils/define-content-script.mjs +6 -2
- package/dist/utils/define-unlisted-script.d.mts +7 -0
- package/dist/utils/define-unlisted-script.mjs +7 -3
- package/dist/utils/define-wxt-plugin.d.mts +6 -0
- package/dist/utils/define-wxt-plugin.mjs +6 -2
- package/dist/utils/inject-script.d.mts +41 -0
- package/dist/utils/inject-script.mjs +44 -34
- package/dist/utils/internal/custom-events.d.mts +9 -0
- package/dist/utils/internal/custom-events.mjs +18 -10
- package/dist/utils/internal/location-watcher.mjs +23 -20
- package/dist/utils/internal/logger.mjs +15 -12
- package/dist/utils/match-patterns.d.mts +1 -0
- package/dist/utils/match-patterns.mjs +3 -1
- package/dist/utils/{split-shadow-root-css.d.ts → split-shadow-root-css.d.mts} +6 -3
- package/dist/utils/split-shadow-root-css.mjs +16 -7
- package/dist/utils/storage.d.mts +1 -0
- package/dist/utils/storage.mjs +3 -1
- package/dist/version.d.mts +4 -0
- package/dist/version.mjs +5 -1
- package/dist/virtual/background-entrypoint.d.mts +4 -0
- package/dist/virtual/background-entrypoint.mjs +143 -161
- package/dist/virtual/content-script-isolated-world-entrypoint.d.mts +4 -0
- package/dist/virtual/content-script-isolated-world-entrypoint.mjs +26 -27
- package/dist/virtual/content-script-main-world-entrypoint.d.mts +4 -0
- package/dist/virtual/content-script-main-world-entrypoint.mjs +24 -24
- package/dist/virtual/mock-browser.d.mts +6 -0
- package/dist/virtual/mock-browser.mjs +5 -3
- package/dist/virtual/reload-html.d.mts +1 -0
- package/dist/virtual/reload-html.mjs +57 -53
- package/dist/virtual/unlisted-script-entrypoint.d.mts +4 -0
- package/dist/virtual/unlisted-script-entrypoint.mjs +35 -43
- package/package.json +56 -50
- package/dist/browser.d.ts +0 -30
- package/dist/builtin-modules/index.d.ts +0 -2
- package/dist/builtin-modules/unimport.d.ts +0 -5
- package/dist/cli/cli-utils.d.ts +0 -25
- package/dist/cli/commands.d.ts +0 -2
- package/dist/cli/index.d.ts +0 -1
- package/dist/core/builders/vite/index.d.ts +0 -7
- package/dist/core/builders/vite/plugins/bundleAnalysis.d.ts +0 -7
- package/dist/core/builders/vite/plugins/cssEntrypoints.d.ts +0 -13
- package/dist/core/builders/vite/plugins/defineImportMeta.d.ts +0 -14
- package/dist/core/builders/vite/plugins/devHtmlPrerender.d.ts +0 -7
- package/dist/core/builders/vite/plugins/devServerGlobals.d.ts +0 -6
- package/dist/core/builders/vite/plugins/download.d.ts +0 -10
- package/dist/core/builders/vite/plugins/entrypointGroupGlobals.d.ts +0 -6
- package/dist/core/builders/vite/plugins/extensionApiMock.d.ts +0 -6
- package/dist/core/builders/vite/plugins/globals.d.ts +0 -3
- package/dist/core/builders/vite/plugins/iifeFooter.d.ts +0 -8
- package/dist/core/builders/vite/plugins/index.d.ts +0 -16
- package/dist/core/builders/vite/plugins/noopBackground.d.ts +0 -6
- package/dist/core/builders/vite/plugins/removeEntrypointMainFunction.d.ts +0 -6
- package/dist/core/builders/vite/plugins/resolveAppConfig.d.ts +0 -6
- package/dist/core/builders/vite/plugins/resolveVirtualModules.d.ts +0 -6
- package/dist/core/builders/vite/plugins/tsconfigPaths.d.ts +0 -3
- package/dist/core/builders/vite/plugins/wxtPluginLoader.d.ts +0 -6
- package/dist/core/define-config.d.ts +0 -2
- package/dist/core/define-web-ext-config.d.ts +0 -9
- package/dist/core/generate-wxt-dir.d.ts +0 -5
- package/dist/core/index.d.ts +0 -8
- package/dist/core/initialize.d.ts +0 -5
- package/dist/core/keyboard-shortcuts.d.ts +0 -12
- package/dist/core/package-managers/bun.d.ts +0 -2
- package/dist/core/package-managers/deno.d.ts +0 -2
- package/dist/core/package-managers/index.d.ts +0 -2
- package/dist/core/package-managers/npm.d.ts +0 -17
- package/dist/core/package-managers/pnpm.d.ts +0 -2
- package/dist/core/package-managers/types.d.ts +0 -2
- package/dist/core/package-managers/types.mjs +0 -0
- package/dist/core/package-managers/yarn.d.ts +0 -2
- package/dist/core/prepare.d.ts +0 -2
- package/dist/core/resolve-config.d.ts +0 -11
- package/dist/core/runners/index.d.ts +0 -2
- package/dist/core/runners/manual.d.ts +0 -5
- package/dist/core/runners/safari.d.ts +0 -5
- package/dist/core/runners/web-ext.d.ts +0 -5
- package/dist/core/runners/wsl.d.ts +0 -5
- package/dist/core/utils/arrays.d.ts +0 -13
- package/dist/core/utils/building/build-entrypoints.d.ts +0 -3
- package/dist/core/utils/building/detect-dev-changes.d.ts +0 -61
- package/dist/core/utils/building/find-entrypoints.d.ts +0 -5
- package/dist/core/utils/building/group-entrypoints.d.ts +0 -8
- package/dist/core/utils/building/index.d.ts +0 -6
- package/dist/core/utils/building/internal-build.d.ts +0 -12
- package/dist/core/utils/building/rebuild.d.ts +0 -23
- package/dist/core/utils/cache.d.ts +0 -8
- package/dist/core/utils/cli.d.ts +0 -3
- package/dist/core/utils/cli.mjs +0 -26
- package/dist/core/utils/constants.d.ts +0 -5
- package/dist/core/utils/content-scripts.d.ts +0 -12
- package/dist/core/utils/content-security-policy.d.ts +0 -14
- package/dist/core/utils/entrypoints.d.ts +0 -31
- package/dist/core/utils/env.d.ts +0 -5
- package/dist/core/utils/environments/browser-environment.d.ts +0 -3
- package/dist/core/utils/environments/environment.d.ts +0 -8
- package/dist/core/utils/environments/extension-environment.d.ts +0 -6
- package/dist/core/utils/environments/index.d.ts +0 -2
- package/dist/core/utils/eslint.d.ts +0 -1
- package/dist/core/utils/fs.d.ts +0 -13
- package/dist/core/utils/globals.d.ts +0 -11
- package/dist/core/utils/i18n.d.ts +0 -11
- package/dist/core/utils/log/index.d.ts +0 -4
- package/dist/core/utils/log/printBuildSummary.d.ts +0 -2
- package/dist/core/utils/log/printFileList.d.ts +0 -1
- package/dist/core/utils/log/printHeader.d.ts +0 -1
- package/dist/core/utils/log/printTable.d.ts +0 -1
- package/dist/core/utils/manifest.d.ts +0 -40
- package/dist/core/utils/minimatch-multiple.d.ts +0 -15
- package/dist/core/utils/network.d.ts +0 -7
- package/dist/core/utils/number.d.ts +0 -1
- package/dist/core/utils/package.d.ts +0 -6
- package/dist/core/utils/paths.d.ts +0 -11
- package/dist/core/utils/strings.d.ts +0 -14
- package/dist/core/utils/syntax-errors.d.ts +0 -11
- package/dist/core/utils/testing/fake-objects.d.ts +0 -11665
- package/dist/core/utils/testing/fake-objects.mjs +0 -326
- package/dist/core/utils/time.d.ts +0 -9
- package/dist/core/utils/transform.d.ts +0 -11
- package/dist/core/utils/types.d.ts +0 -13
- package/dist/core/utils/types.mjs +0 -0
- package/dist/core/utils/validation.d.ts +0 -15
- package/dist/core/utils/virtual-modules.d.ts +0 -22
- package/dist/core/utils/wsl.d.ts +0 -4
- package/dist/core/wxt.d.ts +0 -24
- package/dist/index.d.ts +0 -11
- package/dist/testing/fake-browser.d.ts +0 -10
- package/dist/testing/index.d.ts +0 -10
- package/dist/types.d.ts +0 -1459
- package/dist/types.mjs +0 -0
- package/dist/utils/app-config.d.ts +0 -2
- package/dist/utils/content-script-context.d.ts +0 -134
- package/dist/utils/content-script-ui/iframe.d.ts +0 -32
- package/dist/utils/content-script-ui/integrated.d.ts +0 -34
- package/dist/utils/content-script-ui/shadow-root.d.ts +0 -76
- package/dist/utils/content-script-ui/shared.d.ts +0 -5
- package/dist/utils/content-script-ui/types.d.ts +0 -104
- package/dist/utils/define-background.d.ts +0 -4
- package/dist/utils/define-content-script.d.ts +0 -3
- package/dist/utils/define-unlisted-script.d.ts +0 -4
- package/dist/utils/define-wxt-plugin.d.ts +0 -3
- package/dist/utils/inject-script.d.ts +0 -36
- package/dist/utils/internal/custom-events.d.ts +0 -10
- package/dist/utils/internal/dev-server-websocket.d.ts +0 -21
- package/dist/utils/internal/dev-server-websocket.mjs +0 -37
- package/dist/utils/internal/location-watcher.d.ts +0 -12
- package/dist/utils/internal/logger.d.ts +0 -9
- package/dist/utils/match-patterns.d.ts +0 -5
- package/dist/utils/storage.d.ts +0 -5
- package/dist/version.d.ts +0 -1
|
@@ -1,52 +1,44 @@
|
|
|
1
|
-
import definition from
|
|
2
|
-
import { initPlugins } from
|
|
1
|
+
import definition from "virtual:user-unlisted-script-entrypoint";
|
|
2
|
+
import { initPlugins } from "virtual:wxt-plugins";
|
|
3
3
|
|
|
4
|
+
//#region src/utils/internal/logger.ts
|
|
4
5
|
function print(method, ...args) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
method(`[wxt] ${message}`, ...args);
|
|
9
|
-
} else {
|
|
10
|
-
method("[wxt]", ...args);
|
|
11
|
-
}
|
|
6
|
+
if (import.meta.env.MODE === "production") return;
|
|
7
|
+
if (typeof args[0] === "string") method(`[wxt] ${args.shift()}`, ...args);
|
|
8
|
+
else method("[wxt]", ...args);
|
|
12
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Wrapper around `console` with a "[wxt]" prefix
|
|
12
|
+
*/
|
|
13
13
|
const logger = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
debug: (...args) => print(console.debug, ...args),
|
|
15
|
+
log: (...args) => print(console.log, ...args),
|
|
16
|
+
warn: (...args) => print(console.warn, ...args),
|
|
17
|
+
error: (...args) => print(console.error, ...args)
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/virtual/unlisted-script-entrypoint.ts
|
|
20
22
|
const result = (() => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
throw err;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
} catch (err) {
|
|
43
|
-
logger.error(
|
|
44
|
-
`The unlisted script "${import.meta.env.ENTRYPOINT}" crashed on startup!`,
|
|
45
|
-
err
|
|
46
|
-
);
|
|
47
|
-
throw err;
|
|
48
|
-
}
|
|
49
|
-
return result2;
|
|
23
|
+
try {
|
|
24
|
+
initPlugins();
|
|
25
|
+
} catch (err) {
|
|
26
|
+
logger.error(`Failed to initialize plugins for "${import.meta.env.ENTRYPOINT}"`, err);
|
|
27
|
+
throw err;
|
|
28
|
+
}
|
|
29
|
+
let result;
|
|
30
|
+
try {
|
|
31
|
+
result = definition.main();
|
|
32
|
+
if (result instanceof Promise) result = result.catch((err) => {
|
|
33
|
+
logger.error(`The unlisted script "${import.meta.env.ENTRYPOINT}" crashed on startup!`, err);
|
|
34
|
+
throw err;
|
|
35
|
+
});
|
|
36
|
+
} catch (err) {
|
|
37
|
+
logger.error(`The unlisted script "${import.meta.env.ENTRYPOINT}" crashed on startup!`, err);
|
|
38
|
+
throw err;
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
50
41
|
})();
|
|
51
42
|
|
|
52
|
-
|
|
43
|
+
//#endregion
|
|
44
|
+
export { result as default };
|
package/package.json
CHANGED
|
@@ -1,75 +1,81 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.20.
|
|
4
|
+
"version": "0.20.15",
|
|
5
5
|
"description": "⚡ Next-gen Web Extension Framework",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@1natsu/wait-element": "^4.1.2",
|
|
9
9
|
"@aklinker1/rollup-plugin-visualizer": "5.12.0",
|
|
10
|
-
"@webext-core/fake-browser": "^1.3.
|
|
11
|
-
"@webext-core/isolated-element": "^1.1.
|
|
10
|
+
"@webext-core/fake-browser": "^1.3.4",
|
|
11
|
+
"@webext-core/isolated-element": "^1.1.3",
|
|
12
12
|
"@webext-core/match-patterns": "^1.0.3",
|
|
13
13
|
"@wxt-dev/storage": "^1.0.0",
|
|
14
14
|
"async-mutex": "^0.5.0",
|
|
15
|
-
"c12": "^3.3.
|
|
15
|
+
"c12": "^3.3.3",
|
|
16
16
|
"cac": "^6.7.14",
|
|
17
|
-
"chokidar": "^
|
|
18
|
-
"ci-info": "^4.
|
|
17
|
+
"chokidar": "^5.0.0",
|
|
18
|
+
"ci-info": "^4.4.0",
|
|
19
19
|
"consola": "^3.4.2",
|
|
20
20
|
"defu": "^6.1.4",
|
|
21
|
-
"dotenv": "^17.2.
|
|
21
|
+
"dotenv": "^17.2.4",
|
|
22
22
|
"dotenv-expand": "^12.0.3",
|
|
23
23
|
"esbuild": "^0.27.1",
|
|
24
24
|
"fast-glob": "^3.3.3",
|
|
25
25
|
"filesize": "^11.0.13",
|
|
26
|
-
"fs-extra": "^11.3.
|
|
26
|
+
"fs-extra": "^11.3.3",
|
|
27
27
|
"get-port-please": "^3.2.0",
|
|
28
|
-
"giget": "^1.2.3 || ^2.0.0",
|
|
29
|
-
"hookable": "^
|
|
28
|
+
"giget": "^1.2.3 || ^2.0.0 || ^3.0.0",
|
|
29
|
+
"hookable": "^6.0.1",
|
|
30
30
|
"import-meta-resolve": "^4.2.0",
|
|
31
31
|
"is-wsl": "^3.1.0",
|
|
32
32
|
"json5": "^2.2.3",
|
|
33
33
|
"jszip": "^3.10.1",
|
|
34
34
|
"linkedom": "^0.18.12",
|
|
35
|
-
"magicast": "^0.
|
|
36
|
-
"minimatch": "^10.1.
|
|
37
|
-
"nano-spawn": "^
|
|
35
|
+
"magicast": "^0.5.2",
|
|
36
|
+
"minimatch": "^10.1.2",
|
|
37
|
+
"nano-spawn": "^2.0.0",
|
|
38
38
|
"normalize-path": "^3.0.0",
|
|
39
|
-
"nypm": "^0.6.
|
|
39
|
+
"nypm": "^0.6.5",
|
|
40
40
|
"ohash": "^2.0.11",
|
|
41
|
-
"open": "^
|
|
42
|
-
"ora": "^
|
|
43
|
-
"perfect-debounce": "^2.
|
|
41
|
+
"open": "^11.0.0",
|
|
42
|
+
"ora": "^9.3.0",
|
|
43
|
+
"perfect-debounce": "^2.1.0",
|
|
44
44
|
"picocolors": "^1.1.1",
|
|
45
45
|
"prompts": "^2.4.2",
|
|
46
|
-
"publish-browser-extension": "^2.3.0 || ^3.0.2",
|
|
46
|
+
"publish-browser-extension": "^2.3.0 || ^3.0.2 || ^4.0.0",
|
|
47
47
|
"scule": "^1.3.0",
|
|
48
48
|
"unimport": "^3.13.1 || ^4.0.0 || ^5.0.0",
|
|
49
49
|
"vite": "^5.4.19 || ^6.3.4 || ^7.0.0",
|
|
50
50
|
"vite-node": "^3.2.4 || ^5.0.0",
|
|
51
51
|
"web-ext-run": "^0.2.4",
|
|
52
|
-
"@wxt-dev/browser": "^0.1.
|
|
52
|
+
"@wxt-dev/browser": "^0.1.36"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"eslint": "^8.57.0 || ^9.0.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependenciesMeta": {
|
|
58
|
+
"eslint": {
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
53
61
|
},
|
|
54
62
|
"devDependencies": {
|
|
55
|
-
"@
|
|
56
|
-
"@faker-js/faker": "^10.1.0",
|
|
63
|
+
"@faker-js/faker": "^10.2.0",
|
|
57
64
|
"@types/fs-extra": "^11.0.4",
|
|
58
65
|
"@types/lodash.merge": "^4.6.9",
|
|
59
66
|
"@types/node": "^20.17.6",
|
|
60
67
|
"@types/normalize-path": "^3.0.2",
|
|
61
68
|
"@types/prompts": "^2.4.9",
|
|
69
|
+
"eslint": "^9.38.0",
|
|
62
70
|
"extract-zip": "^2.0.1",
|
|
63
|
-
"happy-dom": "^20.
|
|
71
|
+
"happy-dom": "^20.5.0",
|
|
64
72
|
"lodash.merge": "^4.6.2",
|
|
65
|
-
"oxlint": "^1.
|
|
66
|
-
"publint": "^0.3.
|
|
73
|
+
"oxlint": "^1.43.0",
|
|
74
|
+
"publint": "^0.3.17",
|
|
67
75
|
"typescript": "^5.9.3",
|
|
68
|
-
"
|
|
69
|
-
"vitest": "^4.0.16",
|
|
76
|
+
"vitest": "^4.0.18",
|
|
70
77
|
"vitest-plugin-random-seed": "^1.1.2"
|
|
71
78
|
},
|
|
72
|
-
"peerDependenciesMeta": {},
|
|
73
79
|
"repository": {
|
|
74
80
|
"type": "git",
|
|
75
81
|
"url": "git+https://github.com/wxt-dev/wxt.git"
|
|
@@ -98,99 +104,99 @@
|
|
|
98
104
|
"wxt-publish-extension": "./bin/wxt-publish-extension.cjs"
|
|
99
105
|
},
|
|
100
106
|
"module": "./dist/index.mjs",
|
|
101
|
-
"types": "./dist/index.d.
|
|
107
|
+
"types": "./dist/index.d.mts",
|
|
102
108
|
"exports": {
|
|
103
109
|
".": {
|
|
104
|
-
"types": "./dist/index.d.
|
|
110
|
+
"types": "./dist/index.d.mts",
|
|
105
111
|
"default": "./dist/index.mjs"
|
|
106
112
|
},
|
|
107
113
|
"./utils/app-config": {
|
|
108
|
-
"types": "./dist/utils/app-config.d.
|
|
114
|
+
"types": "./dist/utils/app-config.d.mts",
|
|
109
115
|
"default": "./dist/utils/app-config.mjs"
|
|
110
116
|
},
|
|
111
117
|
"./utils/inject-script": {
|
|
112
|
-
"types": "./dist/utils/inject-script.d.
|
|
118
|
+
"types": "./dist/utils/inject-script.d.mts",
|
|
113
119
|
"default": "./dist/utils/inject-script.mjs"
|
|
114
120
|
},
|
|
115
121
|
"./utils/content-script-context": {
|
|
116
|
-
"types": "./dist/utils/content-script-context.d.
|
|
122
|
+
"types": "./dist/utils/content-script-context.d.mts",
|
|
117
123
|
"default": "./dist/utils/content-script-context.mjs"
|
|
118
124
|
},
|
|
119
125
|
"./utils/content-script-ui/types": {
|
|
120
|
-
"types": "./dist/utils/content-script-ui/types.d.
|
|
126
|
+
"types": "./dist/utils/content-script-ui/types.d.mts",
|
|
121
127
|
"default": "./dist/utils/content-script-ui/types.mjs"
|
|
122
128
|
},
|
|
123
129
|
"./utils/content-script-ui/integrated": {
|
|
124
|
-
"types": "./dist/utils/content-script-ui/integrated.d.
|
|
130
|
+
"types": "./dist/utils/content-script-ui/integrated.d.mts",
|
|
125
131
|
"default": "./dist/utils/content-script-ui/integrated.mjs"
|
|
126
132
|
},
|
|
127
133
|
"./utils/content-script-ui/shadow-root": {
|
|
128
|
-
"types": "./dist/utils/content-script-ui/shadow-root.d.
|
|
134
|
+
"types": "./dist/utils/content-script-ui/shadow-root.d.mts",
|
|
129
135
|
"default": "./dist/utils/content-script-ui/shadow-root.mjs"
|
|
130
136
|
},
|
|
131
137
|
"./utils/content-script-ui/iframe": {
|
|
132
|
-
"types": "./dist/utils/content-script-ui/iframe.d.
|
|
138
|
+
"types": "./dist/utils/content-script-ui/iframe.d.mts",
|
|
133
139
|
"default": "./dist/utils/content-script-ui/iframe.mjs"
|
|
134
140
|
},
|
|
135
141
|
"./utils/define-app-config": {
|
|
136
|
-
"types": "./dist/utils/define-app-config.d.
|
|
142
|
+
"types": "./dist/utils/define-app-config.d.mts",
|
|
137
143
|
"default": "./dist/utils/define-app-config.mjs"
|
|
138
144
|
},
|
|
139
145
|
"./utils/define-background": {
|
|
140
|
-
"types": "./dist/utils/define-background.d.
|
|
146
|
+
"types": "./dist/utils/define-background.d.mts",
|
|
141
147
|
"default": "./dist/utils/define-background.mjs"
|
|
142
148
|
},
|
|
143
149
|
"./utils/define-content-script": {
|
|
144
|
-
"types": "./dist/utils/define-content-script.d.
|
|
150
|
+
"types": "./dist/utils/define-content-script.d.mts",
|
|
145
151
|
"default": "./dist/utils/define-content-script.mjs"
|
|
146
152
|
},
|
|
147
153
|
"./utils/define-unlisted-script": {
|
|
148
|
-
"types": "./dist/utils/define-unlisted-script.d.
|
|
154
|
+
"types": "./dist/utils/define-unlisted-script.d.mts",
|
|
149
155
|
"default": "./dist/utils/define-unlisted-script.mjs"
|
|
150
156
|
},
|
|
151
157
|
"./utils/define-wxt-plugin": {
|
|
152
|
-
"types": "./dist/utils/define-wxt-plugin.d.
|
|
158
|
+
"types": "./dist/utils/define-wxt-plugin.d.mts",
|
|
153
159
|
"default": "./dist/utils/define-wxt-plugin.mjs"
|
|
154
160
|
},
|
|
155
161
|
"./utils/match-patterns": {
|
|
156
|
-
"types": "./dist/utils/match-patterns.d.
|
|
162
|
+
"types": "./dist/utils/match-patterns.d.mts",
|
|
157
163
|
"default": "./dist/utils/match-patterns.mjs"
|
|
158
164
|
},
|
|
159
165
|
"./utils/split-shadow-root-css": {
|
|
160
|
-
"types": "./dist/utils/split-shadow-root-css.d.
|
|
166
|
+
"types": "./dist/utils/split-shadow-root-css.d.mts",
|
|
161
167
|
"default": "./dist/utils/split-shadow-root-css.mjs"
|
|
162
168
|
},
|
|
163
169
|
"./utils/storage": {
|
|
164
|
-
"types": "./dist/utils/storage.d.
|
|
170
|
+
"types": "./dist/utils/storage.d.mts",
|
|
165
171
|
"default": "./dist/utils/storage.mjs"
|
|
166
172
|
},
|
|
167
173
|
"./browser": {
|
|
168
|
-
"types": "./dist/browser.d.
|
|
174
|
+
"types": "./dist/browser.d.mts",
|
|
169
175
|
"default": "./dist/browser.mjs"
|
|
170
176
|
},
|
|
171
177
|
"./testing/fake-browser": {
|
|
172
|
-
"types": "./dist/testing/fake-browser.d.
|
|
178
|
+
"types": "./dist/testing/fake-browser.d.mts",
|
|
173
179
|
"default": "./dist/testing/fake-browser.mjs"
|
|
174
180
|
},
|
|
175
181
|
"./testing/vitest-plugin": {
|
|
176
|
-
"types": "./dist/testing/wxt-vitest-plugin.d.
|
|
182
|
+
"types": "./dist/testing/wxt-vitest-plugin.d.mts",
|
|
177
183
|
"default": "./dist/testing/wxt-vitest-plugin.mjs"
|
|
178
184
|
},
|
|
179
185
|
"./testing": {
|
|
180
|
-
"types": "./dist/testing/index.d.
|
|
186
|
+
"types": "./dist/testing/index.d.mts",
|
|
181
187
|
"default": "./dist/testing/index.mjs"
|
|
182
188
|
},
|
|
183
189
|
"./vite-builder-env": {
|
|
184
190
|
"types": "./dist/vite-builder-env.d.ts"
|
|
185
191
|
},
|
|
186
192
|
"./modules": {
|
|
187
|
-
"types": "./dist/modules.d.
|
|
193
|
+
"types": "./dist/modules.d.mts",
|
|
188
194
|
"default": "./dist/modules.mjs"
|
|
189
195
|
}
|
|
190
196
|
},
|
|
191
197
|
"scripts": {
|
|
192
198
|
"wxt": "tsx src/cli/index.ts",
|
|
193
|
-
"build": "buildc --
|
|
199
|
+
"build": "buildc -- tsdown --config-loader unrun",
|
|
194
200
|
"check": "pnpm build && pnpm run --reporter-hide-prefix /^check:.*/",
|
|
195
201
|
"check:default": "check",
|
|
196
202
|
"check:tsc-virtual": "tsc --noEmit -p src/virtual",
|
package/dist/browser.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contains the `browser` export which you should use to access the extension APIs in your project:
|
|
3
|
-
* ```ts
|
|
4
|
-
* import { browser } from 'wxt/browser';
|
|
5
|
-
*
|
|
6
|
-
* browser.runtime.onInstalled.addListener(() => {
|
|
7
|
-
* // ...
|
|
8
|
-
* })
|
|
9
|
-
* ```
|
|
10
|
-
* @module wxt/browser
|
|
11
|
-
*/
|
|
12
|
-
import { browser as _browser, type Browser } from '@wxt-dev/browser';
|
|
13
|
-
/**
|
|
14
|
-
* This interface is empty because it is generated per-project when running `wxt prepare`. See:
|
|
15
|
-
* - `.wxt/types/paths.d.ts`
|
|
16
|
-
*/
|
|
17
|
-
export interface WxtRuntime {
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* This interface is empty because it is generated per-project when running `wxt prepare`. See:
|
|
21
|
-
* - `.wxt/types/i18n.d.ts`
|
|
22
|
-
*/
|
|
23
|
-
export interface WxtI18n {
|
|
24
|
-
}
|
|
25
|
-
export type WxtBrowser = Omit<typeof _browser, 'runtime' | 'i18n'> & {
|
|
26
|
-
runtime: WxtRuntime & Omit<(typeof _browser)['runtime'], 'getURL'>;
|
|
27
|
-
i18n: WxtI18n & Omit<(typeof _browser)['i18n'], 'getMessage'>;
|
|
28
|
-
};
|
|
29
|
-
export declare const browser: WxtBrowser;
|
|
30
|
-
export { Browser };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { EslintGlobalsPropValue, WxtDirFileEntry, WxtModule, WxtResolvedUnimportOptions } from '../types';
|
|
2
|
-
declare const _default: WxtModule<import("../types").WxtModuleOptions>;
|
|
3
|
-
export default _default;
|
|
4
|
-
export declare function getEslint8ConfigEntry(options: WxtResolvedUnimportOptions, globals: Record<string, EslintGlobalsPropValue>): WxtDirFileEntry;
|
|
5
|
-
export declare function getEslint9ConfigEntry(options: WxtResolvedUnimportOptions, globals: Record<string, EslintGlobalsPropValue>): WxtDirFileEntry;
|
package/dist/cli/cli-utils.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CAC, Command } from 'cac';
|
|
2
|
-
/**
|
|
3
|
-
* Wrap an action handler to add a timer, error handling, and maybe enable debug mode.
|
|
4
|
-
*/
|
|
5
|
-
export declare function wrapAction(cb: (...args: any[]) => void | {
|
|
6
|
-
isOngoing?: boolean;
|
|
7
|
-
} | Promise<void | {
|
|
8
|
-
isOngoing?: boolean;
|
|
9
|
-
}>, options?: {
|
|
10
|
-
disableFinishedLog?: boolean;
|
|
11
|
-
}): (...args: any[]) => Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Array flags, when not passed, are either `undefined` or `[undefined]`. This function filters out
|
|
14
|
-
* the
|
|
15
|
-
*/
|
|
16
|
-
export declare function getArrayFromFlags<T>(flags: any, name: string): T[] | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* @param base Command to add this one to
|
|
19
|
-
* @param name The command name to add
|
|
20
|
-
* @param alias The CLI tool being aliased
|
|
21
|
-
* @param bin The CLI tool binary name. Usually the same as the alias
|
|
22
|
-
* @param docsUrl URL to the docs for the aliased CLI tool
|
|
23
|
-
*/
|
|
24
|
-
export declare function createAliasedCommand(base: CAC, name: string, alias: string, bin: string, docsUrl: string): void;
|
|
25
|
-
export declare function isAliasedCommand(command: Command | undefined): boolean;
|
package/dist/cli/commands.d.ts
DELETED
package/dist/cli/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ResolvedConfig, WxtBuilder, WxtDevServer, WxtHooks } from '../../../types';
|
|
2
|
-
import { Hookable } from 'hookable';
|
|
3
|
-
export declare function createViteBuilder(wxtConfig: ResolvedConfig, hooks: Hookable<WxtHooks>, getWxtDevServer?: () => WxtDevServer | undefined): Promise<WxtBuilder>;
|
|
4
|
-
/**
|
|
5
|
-
* Recursively remove all directories that are empty/
|
|
6
|
-
*/
|
|
7
|
-
export declare function removeEmptyDirs(dir: string): Promise<void>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type * as vite from 'vite';
|
|
2
|
-
import { ResolvedConfig } from '../../../../types';
|
|
3
|
-
export declare function bundleAnalysis(config: ResolvedConfig): vite.Plugin;
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated FOR TESTING ONLY.
|
|
6
|
-
*/
|
|
7
|
-
export declare function resetBundleIncrement(): void;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type * as vite from 'vite';
|
|
2
|
-
import { Entrypoint, ResolvedConfig } from '../../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Rename CSS entrypoint outputs to ensure a JS file is not generated, and that the CSS file is
|
|
5
|
-
* placed in the correct place.
|
|
6
|
-
*
|
|
7
|
-
* It:
|
|
8
|
-
* 1. Renames CSS files to their final paths
|
|
9
|
-
* 2. Removes the JS file that get's output by lib mode
|
|
10
|
-
*
|
|
11
|
-
* THIS PLUGIN SHOULD ONLY BE APPLIED TO CSS LIB MODE BUILDS. It should not be added to every build.
|
|
12
|
-
*/
|
|
13
|
-
export declare function cssEntrypoints(entrypoint: Entrypoint, config: ResolvedConfig): vite.Plugin;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Overrides definitions for `import.meta.*`
|
|
3
|
-
*
|
|
4
|
-
* - `import.meta.url`: Without this, background service workers crash trying to access
|
|
5
|
-
* `document.location`, see https://github.com/wxt-dev/wxt/issues/392
|
|
6
|
-
*/
|
|
7
|
-
export declare function defineImportMeta(): {
|
|
8
|
-
name: string;
|
|
9
|
-
config(): {
|
|
10
|
-
define: {
|
|
11
|
-
'import.meta.url': string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type * as vite from 'vite';
|
|
2
|
-
import { ResolvedConfig, WxtDevServer } from '../../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Pre-renders the HTML entrypoints when building the extension to connect to the dev server.
|
|
5
|
-
*/
|
|
6
|
-
export declare function devHtmlPrerender(config: ResolvedConfig, server: WxtDevServer | undefined): vite.PluginOption;
|
|
7
|
-
export declare function pointToDevServer(config: ResolvedConfig, server: WxtDevServer, id: string, document: Document, querySelector: string, attr: string): void;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'vite';
|
|
2
|
-
import { ResolvedConfig, WxtDevServer } from '../../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Defines global constants about the dev server. Helps scripts connect to the server's web socket.
|
|
5
|
-
*/
|
|
6
|
-
export declare function devServerGlobals(config: ResolvedConfig, server: WxtDevServer | undefined): Plugin;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'vite';
|
|
2
|
-
import { ResolvedConfig } from '../../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Downloads any URL imports, like Google Analytics, into virtual modules so they are bundled with
|
|
5
|
-
* the extension instead of depending on remote code at runtime.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* import "url:https://google-tagmanager.com/gtag?id=XYZ";
|
|
9
|
-
*/
|
|
10
|
-
export declare function download(config: ResolvedConfig): Plugin;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type * as vite from 'vite';
|
|
2
|
-
import { ResolvedConfig } from '../../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Mock `wxt/browser` and stub the global `browser`/`chrome` types with a fake version of the extension APIs
|
|
5
|
-
*/
|
|
6
|
-
export declare function extensionApiMock(config: ResolvedConfig): vite.PluginOption;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'vite';
|
|
2
|
-
/**
|
|
3
|
-
* Add a footer with the returned value so it can return values to `scripting.executeScript`
|
|
4
|
-
* Footer is added a part of esbuild to make sure it's not minified. It
|
|
5
|
-
* get's removed if added to `build.rollupOptions.output.footer`
|
|
6
|
-
* See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/executeScript#return_value
|
|
7
|
-
*/
|
|
8
|
-
export declare function iifeFooter(iifeReturnValueName: string): Plugin;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export * from './devHtmlPrerender';
|
|
2
|
-
export * from './devServerGlobals';
|
|
3
|
-
export * from './download';
|
|
4
|
-
export * from './resolveVirtualModules';
|
|
5
|
-
export * from './tsconfigPaths';
|
|
6
|
-
export * from './noopBackground';
|
|
7
|
-
export * from './cssEntrypoints';
|
|
8
|
-
export * from './bundleAnalysis';
|
|
9
|
-
export * from './globals';
|
|
10
|
-
export * from './extensionApiMock';
|
|
11
|
-
export * from './entrypointGroupGlobals';
|
|
12
|
-
export * from './defineImportMeta';
|
|
13
|
-
export * from './removeEntrypointMainFunction';
|
|
14
|
-
export * from './wxtPluginLoader';
|
|
15
|
-
export * from './resolveAppConfig';
|
|
16
|
-
export * from './iifeFooter';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'vite';
|
|
2
|
-
/**
|
|
3
|
-
* In dev mode, if there's not a background script listed, we need to add one so that the web socket
|
|
4
|
-
* connection is setup and the extension reloads HTML pages and content scripts correctly.
|
|
5
|
-
*/
|
|
6
|
-
export declare function noopBackground(): Plugin;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ResolvedConfig } from '../../../../types';
|
|
2
|
-
import * as vite from 'vite';
|
|
3
|
-
/**
|
|
4
|
-
* Transforms entrypoints, removing the main function from the entrypoint if it exists.
|
|
5
|
-
*/
|
|
6
|
-
export declare function removeEntrypointMainFunction(config: ResolvedConfig, path: string): vite.Plugin;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type * as vite from 'vite';
|
|
2
|
-
import { ResolvedConfig } from '../../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* When importing `virtual:app-config`, resolve it to the `app.config.ts` file in the project.
|
|
5
|
-
*/
|
|
6
|
-
export declare function resolveAppConfig(config: ResolvedConfig): vite.Plugin;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type * as vite from 'vite';
|
|
2
|
-
import { ResolvedConfig } from '../../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Resolve and load plugins for each entrypoint. This handles both JS entrypoints via the `virtual:wxt-plugins` import, and HTML files by adding `virtual:wxt-html-plugins` to the document's `<head>`
|
|
5
|
-
*/
|
|
6
|
-
export declare function wxtPluginLoader(config: ResolvedConfig): vite.Plugin;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { WebExtConfig } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Use `defineWebExtConfig` instead. Same function, different name.
|
|
4
|
-
*/
|
|
5
|
-
export declare function defineRunnerConfig(config: WebExtConfig): WebExtConfig;
|
|
6
|
-
/**
|
|
7
|
-
* Configure how [`web-ext`](https://github.com/mozilla/web-ext) starts the browser during development.
|
|
8
|
-
*/
|
|
9
|
-
export declare function defineWebExtConfig(config: WebExtConfig): WebExtConfig;
|
package/dist/core/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { WxtDevServer } from '../types';
|
|
2
|
-
export interface KeyboardShortcutWatcher {
|
|
3
|
-
start(): void;
|
|
4
|
-
stop(): void;
|
|
5
|
-
printHelp(flags: {
|
|
6
|
-
canReopenBrowser: boolean;
|
|
7
|
-
}): void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Function that creates a keyboard shortcut handler for the extension.
|
|
11
|
-
*/
|
|
12
|
-
export declare function createKeyboardShortcuts(server: WxtDevServer): KeyboardShortcutWatcher;
|