wxt 0.18.13 → 0.18.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/README.md +1 -1
- package/dist/{chunk-TENM236J.js → chunk-FP7RYLVL.js} +19 -11
- package/dist/cli.js +19 -11
- package/dist/{index-CM35KuSH.d.cts → index-nWRfwAJi.d.cts} +1 -1
- package/dist/{index-CM35KuSH.d.ts → index-nWRfwAJi.d.ts} +1 -1
- package/dist/index.cjs +19 -11
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/modules.d.cts +1 -1
- package/dist/modules.d.ts +1 -1
- package/dist/storage.cjs +1 -1
- package/dist/storage.d.cts +1 -1
- package/dist/storage.d.ts +1 -1
- package/dist/storage.js +1 -1
- package/dist/testing.cjs +9 -0
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-QGM4M3NI.js";
|
|
17
17
|
|
|
18
18
|
// package.json
|
|
19
|
-
var version = "0.18.
|
|
19
|
+
var version = "0.18.14";
|
|
20
20
|
|
|
21
21
|
// src/core/utils/paths.ts
|
|
22
22
|
import systemPath from "node:path";
|
|
@@ -251,6 +251,15 @@ function resolveAppConfig(config) {
|
|
|
251
251
|
const appConfigFile = resolve2(config.srcDir, "app.config.ts");
|
|
252
252
|
return {
|
|
253
253
|
name: "wxt:resolve-app-config",
|
|
254
|
+
config() {
|
|
255
|
+
return {
|
|
256
|
+
optimizeDeps: {
|
|
257
|
+
// Prevent ESBuild from attempting to resolve the virtual module
|
|
258
|
+
// while optimizing WXT.
|
|
259
|
+
exclude: [virtualModuleId]
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
},
|
|
254
263
|
async resolveId(id) {
|
|
255
264
|
if (id !== virtualModuleId) return;
|
|
256
265
|
return await exists(appConfigFile) ? appConfigFile : resolvedVirtualModuleId;
|
|
@@ -1425,8 +1434,7 @@ async function generateTypesDir(entrypoints) {
|
|
|
1425
1434
|
{ module: "wxt/vite-builder-env" }
|
|
1426
1435
|
];
|
|
1427
1436
|
wxt.config.userModules.forEach((module) => {
|
|
1428
|
-
if (module.type === "node_module"
|
|
1429
|
-
entries.push({ module: module.id });
|
|
1437
|
+
if (module.type === "node_module") entries.push({ module: module.id });
|
|
1430
1438
|
});
|
|
1431
1439
|
entries.push(await getPathsDeclarationEntry(entrypoints));
|
|
1432
1440
|
entries.push(await getI18nDeclarationEntry());
|
|
@@ -1493,14 +1501,14 @@ declare module "wxt/browser" {
|
|
|
1493
1501
|
}
|
|
1494
1502
|
}
|
|
1495
1503
|
`;
|
|
1504
|
+
const defaultLocalePath = path4.resolve(
|
|
1505
|
+
wxt.config.publicDir,
|
|
1506
|
+
"_locales",
|
|
1507
|
+
defaultLocale ?? "",
|
|
1508
|
+
"messages.json"
|
|
1509
|
+
);
|
|
1496
1510
|
let messages;
|
|
1497
|
-
if (
|
|
1498
|
-
const defaultLocalePath = path4.resolve(
|
|
1499
|
-
wxt.config.publicDir,
|
|
1500
|
-
"_locales",
|
|
1501
|
-
defaultLocale,
|
|
1502
|
-
"messages.json"
|
|
1503
|
-
);
|
|
1511
|
+
if (await fs6.exists(defaultLocalePath)) {
|
|
1504
1512
|
const content = JSON.parse(await fs6.readFile(defaultLocalePath, "utf-8"));
|
|
1505
1513
|
messages = parseI18nMessages(content);
|
|
1506
1514
|
} else {
|
|
@@ -2370,7 +2378,7 @@ async function generateManifest(entrypoints, buildOutput) {
|
|
|
2370
2378
|
if (versionName == null) {
|
|
2371
2379
|
versionName = "0.0.0";
|
|
2372
2380
|
wxt.logger.warn(
|
|
2373
|
-
'Extension version not found, defaulting to "0.0.0". Add a version to your `package.json` or `wxt.config.ts` file. For more details, see: https://wxt.dev/guide/manifest.html#version-and-version-name'
|
|
2381
|
+
'Extension version not found, defaulting to "0.0.0". Add a version to your `package.json` or `wxt.config.ts` file. For more details, see: https://wxt.dev/guide/key-concepts/manifest.html#version-and-version-name'
|
|
2374
2382
|
);
|
|
2375
2383
|
}
|
|
2376
2384
|
const version2 = wxt.config.manifest.version ?? simplifyVersion(versionName);
|
package/dist/cli.js
CHANGED
|
@@ -912,6 +912,15 @@ function resolveAppConfig(config) {
|
|
|
912
912
|
const appConfigFile = resolve6(config.srcDir, "app.config.ts");
|
|
913
913
|
return {
|
|
914
914
|
name: "wxt:resolve-app-config",
|
|
915
|
+
config() {
|
|
916
|
+
return {
|
|
917
|
+
optimizeDeps: {
|
|
918
|
+
// Prevent ESBuild from attempting to resolve the virtual module
|
|
919
|
+
// while optimizing WXT.
|
|
920
|
+
exclude: [virtualModuleId]
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
},
|
|
915
924
|
async resolveId(id) {
|
|
916
925
|
if (id !== virtualModuleId) return;
|
|
917
926
|
return await exists(appConfigFile) ? appConfigFile : resolvedVirtualModuleId;
|
|
@@ -1988,8 +1997,7 @@ async function generateTypesDir(entrypoints) {
|
|
|
1988
1997
|
{ module: "wxt/vite-builder-env" }
|
|
1989
1998
|
];
|
|
1990
1999
|
wxt.config.userModules.forEach((module) => {
|
|
1991
|
-
if (module.type === "node_module"
|
|
1992
|
-
entries.push({ module: module.id });
|
|
2000
|
+
if (module.type === "node_module") entries.push({ module: module.id });
|
|
1993
2001
|
});
|
|
1994
2002
|
entries.push(await getPathsDeclarationEntry(entrypoints));
|
|
1995
2003
|
entries.push(await getI18nDeclarationEntry());
|
|
@@ -2056,14 +2064,14 @@ declare module "wxt/browser" {
|
|
|
2056
2064
|
}
|
|
2057
2065
|
}
|
|
2058
2066
|
`;
|
|
2067
|
+
const defaultLocalePath = path5.resolve(
|
|
2068
|
+
wxt.config.publicDir,
|
|
2069
|
+
"_locales",
|
|
2070
|
+
defaultLocale ?? "",
|
|
2071
|
+
"messages.json"
|
|
2072
|
+
);
|
|
2059
2073
|
let messages;
|
|
2060
|
-
if (
|
|
2061
|
-
const defaultLocalePath = path5.resolve(
|
|
2062
|
-
wxt.config.publicDir,
|
|
2063
|
-
"_locales",
|
|
2064
|
-
defaultLocale,
|
|
2065
|
-
"messages.json"
|
|
2066
|
-
);
|
|
2074
|
+
if (await fs6.exists(defaultLocalePath)) {
|
|
2067
2075
|
const content = JSON.parse(await fs6.readFile(defaultLocalePath, "utf-8"));
|
|
2068
2076
|
messages = parseI18nMessages(content);
|
|
2069
2077
|
} else {
|
|
@@ -2789,7 +2797,7 @@ function getChunkSortWeight(filename) {
|
|
|
2789
2797
|
import pc4 from "picocolors";
|
|
2790
2798
|
|
|
2791
2799
|
// package.json
|
|
2792
|
-
var version = "0.18.
|
|
2800
|
+
var version = "0.18.14";
|
|
2793
2801
|
|
|
2794
2802
|
// src/core/utils/log/printHeader.ts
|
|
2795
2803
|
function printHeader() {
|
|
@@ -2939,7 +2947,7 @@ async function generateManifest(entrypoints, buildOutput) {
|
|
|
2939
2947
|
if (versionName == null) {
|
|
2940
2948
|
versionName = "0.0.0";
|
|
2941
2949
|
wxt.logger.warn(
|
|
2942
|
-
'Extension version not found, defaulting to "0.0.0". Add a version to your `package.json` or `wxt.config.ts` file. For more details, see: https://wxt.dev/guide/manifest.html#version-and-version-name'
|
|
2950
|
+
'Extension version not found, defaulting to "0.0.0". Add a version to your `package.json` or `wxt.config.ts` file. For more details, see: https://wxt.dev/guide/key-concepts/manifest.html#version-and-version-name'
|
|
2943
2951
|
);
|
|
2944
2952
|
}
|
|
2945
2953
|
const version2 = wxt.config.manifest.version ?? simplifyVersion(versionName);
|
|
@@ -863,7 +863,7 @@ interface ConfigEnv {
|
|
|
863
863
|
browser: TargetBrowser;
|
|
864
864
|
/**
|
|
865
865
|
* Manifest version passed in from the CLI via the `--mv2` or `--mv3` flags. When not passed, it depends on the target browser. See
|
|
866
|
-
* [the guide](https://wxt.dev/guide/multiple-browsers.html#target-manifest-version) for more
|
|
866
|
+
* [the guide](https://wxt.dev/guide/key-concepts/multiple-browsers.html#target-manifest-version) for more
|
|
867
867
|
* details.
|
|
868
868
|
*/
|
|
869
869
|
manifestVersion: 2 | 3;
|
|
@@ -863,7 +863,7 @@ interface ConfigEnv {
|
|
|
863
863
|
browser: TargetBrowser;
|
|
864
864
|
/**
|
|
865
865
|
* Manifest version passed in from the CLI via the `--mv2` or `--mv3` flags. When not passed, it depends on the target browser. See
|
|
866
|
-
* [the guide](https://wxt.dev/guide/multiple-browsers.html#target-manifest-version) for more
|
|
866
|
+
* [the guide](https://wxt.dev/guide/key-concepts/multiple-browsers.html#target-manifest-version) for more
|
|
867
867
|
* details.
|
|
868
868
|
*/
|
|
869
869
|
manifestVersion: 2 | 3;
|
package/dist/index.cjs
CHANGED
|
@@ -11083,6 +11083,15 @@ function resolveAppConfig(config) {
|
|
|
11083
11083
|
const appConfigFile = (0, import_node_path13.resolve)(config.srcDir, "app.config.ts");
|
|
11084
11084
|
return {
|
|
11085
11085
|
name: "wxt:resolve-app-config",
|
|
11086
|
+
config() {
|
|
11087
|
+
return {
|
|
11088
|
+
optimizeDeps: {
|
|
11089
|
+
// Prevent ESBuild from attempting to resolve the virtual module
|
|
11090
|
+
// while optimizing WXT.
|
|
11091
|
+
exclude: [virtualModuleId]
|
|
11092
|
+
}
|
|
11093
|
+
};
|
|
11094
|
+
},
|
|
11086
11095
|
async resolveId(id) {
|
|
11087
11096
|
if (id !== virtualModuleId) return;
|
|
11088
11097
|
return await (0, import_fs_extra4.exists)(appConfigFile) ? appConfigFile : resolvedVirtualModuleId;
|
|
@@ -12157,8 +12166,7 @@ async function generateTypesDir(entrypoints) {
|
|
|
12157
12166
|
{ module: "wxt/vite-builder-env" }
|
|
12158
12167
|
];
|
|
12159
12168
|
wxt.config.userModules.forEach((module2) => {
|
|
12160
|
-
if (module2.type === "node_module"
|
|
12161
|
-
entries.push({ module: module2.id });
|
|
12169
|
+
if (module2.type === "node_module") entries.push({ module: module2.id });
|
|
12162
12170
|
});
|
|
12163
12171
|
entries.push(await getPathsDeclarationEntry(entrypoints));
|
|
12164
12172
|
entries.push(await getI18nDeclarationEntry());
|
|
@@ -12225,14 +12233,14 @@ declare module "wxt/browser" {
|
|
|
12225
12233
|
}
|
|
12226
12234
|
}
|
|
12227
12235
|
`;
|
|
12236
|
+
const defaultLocalePath = import_node_path17.default.resolve(
|
|
12237
|
+
wxt.config.publicDir,
|
|
12238
|
+
"_locales",
|
|
12239
|
+
defaultLocale ?? "",
|
|
12240
|
+
"messages.json"
|
|
12241
|
+
);
|
|
12228
12242
|
let messages;
|
|
12229
|
-
if (
|
|
12230
|
-
const defaultLocalePath = import_node_path17.default.resolve(
|
|
12231
|
-
wxt.config.publicDir,
|
|
12232
|
-
"_locales",
|
|
12233
|
-
defaultLocale,
|
|
12234
|
-
"messages.json"
|
|
12235
|
-
);
|
|
12243
|
+
if (await import_fs_extra8.default.exists(defaultLocalePath)) {
|
|
12236
12244
|
const content = JSON.parse(await import_fs_extra8.default.readFile(defaultLocalePath, "utf-8"));
|
|
12237
12245
|
messages = parseI18nMessages(content);
|
|
12238
12246
|
} else {
|
|
@@ -12971,7 +12979,7 @@ function getChunkSortWeight(filename) {
|
|
|
12971
12979
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
12972
12980
|
|
|
12973
12981
|
// package.json
|
|
12974
|
-
var version = "0.18.
|
|
12982
|
+
var version = "0.18.14";
|
|
12975
12983
|
|
|
12976
12984
|
// src/core/utils/building/internal-build.ts
|
|
12977
12985
|
var import_fast_glob5 = __toESM(require("fast-glob"), 1);
|
|
@@ -13115,7 +13123,7 @@ async function generateManifest(entrypoints, buildOutput) {
|
|
|
13115
13123
|
if (versionName == null) {
|
|
13116
13124
|
versionName = "0.0.0";
|
|
13117
13125
|
wxt.logger.warn(
|
|
13118
|
-
'Extension version not found, defaulting to "0.0.0". Add a version to your `package.json` or `wxt.config.ts` file. For more details, see: https://wxt.dev/guide/manifest.html#version-and-version-name'
|
|
13126
|
+
'Extension version not found, defaulting to "0.0.0". Add a version to your `package.json` or `wxt.config.ts` file. For more details, see: https://wxt.dev/guide/key-concepts/manifest.html#version-and-version-name'
|
|
13119
13127
|
);
|
|
13120
13128
|
}
|
|
13121
13129
|
const version2 = wxt.config.manifest.version ?? simplifyVersion(versionName);
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-
|
|
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-
|
|
1
|
+
import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-nWRfwAJi.cjs';
|
|
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.cjs';
|
|
3
3
|
import 'vite';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
@@ -76,6 +76,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
76
76
|
*/
|
|
77
77
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
78
78
|
|
|
79
|
-
var version = "0.18.
|
|
79
|
+
var version = "0.18.14";
|
|
80
80
|
|
|
81
81
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as InlineConfig, B as BuildOutput, U as UserConfig, E as ExtensionRunnerConfig, W as WxtDevServer } from './index-
|
|
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-
|
|
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
3
|
import 'vite';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
@@ -76,6 +76,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
76
76
|
*/
|
|
77
77
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
78
78
|
|
|
79
|
-
var version = "0.18.
|
|
79
|
+
var version = "0.18.14";
|
|
80
80
|
|
|
81
81
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.js
CHANGED
package/dist/modules.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as WxtModuleOptions, a8 as WxtModule, a7 as WxtModuleSetup, Y as Wxt, r as Entrypoint } from './index-
|
|
1
|
+
import { a6 as WxtModuleOptions, a8 as WxtModule, a7 as WxtModuleSetup, Y as Wxt, r as Entrypoint } from './index-nWRfwAJi.cjs';
|
|
2
2
|
import * as vite from 'vite';
|
|
3
3
|
import { UnimportOptions } from 'unimport';
|
|
4
4
|
import 'webextension-polyfill';
|
package/dist/modules.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as WxtModuleOptions, a8 as WxtModule, a7 as WxtModuleSetup, Y as Wxt, r as Entrypoint } from './index-
|
|
1
|
+
import { a6 as WxtModuleOptions, a8 as WxtModule, a7 as WxtModuleSetup, Y as Wxt, r as Entrypoint } from './index-nWRfwAJi.js';
|
|
2
2
|
import * as vite from 'vite';
|
|
3
3
|
import { UnimportOptions } from 'unimport';
|
|
4
4
|
import 'webextension-polyfill';
|
package/dist/storage.cjs
CHANGED
|
@@ -358,7 +358,7 @@ function createDriver(storageArea) {
|
|
|
358
358
|
[
|
|
359
359
|
"'wxt/storage' must be loaded in a web extension environment",
|
|
360
360
|
"\n - If thrown during a build, see https://github.com/wxt-dev/wxt/issues/371",
|
|
361
|
-
" - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/testing.html\n"
|
|
361
|
+
" - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/go-further/testing.html\n"
|
|
362
362
|
].join("\n")
|
|
363
363
|
);
|
|
364
364
|
}
|
package/dist/storage.d.cts
CHANGED
|
@@ -103,7 +103,7 @@ interface WxtStorage {
|
|
|
103
103
|
/**
|
|
104
104
|
* Define a storage item with a default value, type, or versioning.
|
|
105
105
|
*
|
|
106
|
-
* Read full docs: https://wxt.dev/guide/storage.html#defining-storage-items
|
|
106
|
+
* Read full docs: https://wxt.dev/guide/extension-apis/storage.html#defining-storage-items
|
|
107
107
|
*/
|
|
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>;
|
package/dist/storage.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ interface WxtStorage {
|
|
|
103
103
|
/**
|
|
104
104
|
* Define a storage item with a default value, type, or versioning.
|
|
105
105
|
*
|
|
106
|
-
* Read full docs: https://wxt.dev/guide/storage.html#defining-storage-items
|
|
106
|
+
* Read full docs: https://wxt.dev/guide/extension-apis/storage.html#defining-storage-items
|
|
107
107
|
*/
|
|
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>;
|
package/dist/storage.js
CHANGED
|
@@ -321,7 +321,7 @@ function createDriver(storageArea) {
|
|
|
321
321
|
[
|
|
322
322
|
"'wxt/storage' must be loaded in a web extension environment",
|
|
323
323
|
"\n - If thrown during a build, see https://github.com/wxt-dev/wxt/issues/371",
|
|
324
|
-
" - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/testing.html\n"
|
|
324
|
+
" - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/go-further/testing.html\n"
|
|
325
325
|
].join("\n")
|
|
326
326
|
);
|
|
327
327
|
}
|
package/dist/testing.cjs
CHANGED
|
@@ -2117,6 +2117,15 @@ function resolveAppConfig(config) {
|
|
|
2117
2117
|
const appConfigFile = (0, import_node_path8.resolve)(config.srcDir, "app.config.ts");
|
|
2118
2118
|
return {
|
|
2119
2119
|
name: "wxt:resolve-app-config",
|
|
2120
|
+
config() {
|
|
2121
|
+
return {
|
|
2122
|
+
optimizeDeps: {
|
|
2123
|
+
// Prevent ESBuild from attempting to resolve the virtual module
|
|
2124
|
+
// while optimizing WXT.
|
|
2125
|
+
exclude: [virtualModuleId]
|
|
2126
|
+
}
|
|
2127
|
+
};
|
|
2128
|
+
},
|
|
2120
2129
|
async resolveId(id) {
|
|
2121
2130
|
if (id !== virtualModuleId) return;
|
|
2122
2131
|
return await (0, import_fs_extra3.exists)(appConfigFile) ? appConfigFile : resolvedVirtualModuleId;
|
package/dist/testing.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { FakeBrowser, fakeBrowser } from '@webext-core/fake-browser';
|
|
2
2
|
import * as vite from 'vite';
|
|
3
|
-
import { I as InlineConfig } from './index-
|
|
3
|
+
import { I as InlineConfig } from './index-nWRfwAJi.cjs';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
6
6
|
import 'consola';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { FakeBrowser, fakeBrowser } from '@webext-core/fake-browser';
|
|
2
2
|
import * as vite from 'vite';
|
|
3
|
-
import { I as InlineConfig } from './index-
|
|
3
|
+
import { I as InlineConfig } from './index-nWRfwAJi.js';
|
|
4
4
|
import 'webextension-polyfill';
|
|
5
5
|
import 'unimport';
|
|
6
6
|
import 'consola';
|
package/dist/testing.js
CHANGED