wxt 0.18.14 → 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-ZONHOHIX.js → chunk-FP7RYLVL.js} +18 -9
- package/dist/cli.js +18 -9
- 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 +18 -9
- 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;
|
|
@@ -1492,14 +1501,14 @@ declare module "wxt/browser" {
|
|
|
1492
1501
|
}
|
|
1493
1502
|
}
|
|
1494
1503
|
`;
|
|
1504
|
+
const defaultLocalePath = path4.resolve(
|
|
1505
|
+
wxt.config.publicDir,
|
|
1506
|
+
"_locales",
|
|
1507
|
+
defaultLocale ?? "",
|
|
1508
|
+
"messages.json"
|
|
1509
|
+
);
|
|
1495
1510
|
let messages;
|
|
1496
|
-
if (
|
|
1497
|
-
const defaultLocalePath = path4.resolve(
|
|
1498
|
-
wxt.config.publicDir,
|
|
1499
|
-
"_locales",
|
|
1500
|
-
defaultLocale,
|
|
1501
|
-
"messages.json"
|
|
1502
|
-
);
|
|
1511
|
+
if (await fs6.exists(defaultLocalePath)) {
|
|
1503
1512
|
const content = JSON.parse(await fs6.readFile(defaultLocalePath, "utf-8"));
|
|
1504
1513
|
messages = parseI18nMessages(content);
|
|
1505
1514
|
} else {
|
|
@@ -2369,7 +2378,7 @@ async function generateManifest(entrypoints, buildOutput) {
|
|
|
2369
2378
|
if (versionName == null) {
|
|
2370
2379
|
versionName = "0.0.0";
|
|
2371
2380
|
wxt.logger.warn(
|
|
2372
|
-
'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'
|
|
2373
2382
|
);
|
|
2374
2383
|
}
|
|
2375
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;
|
|
@@ -2055,14 +2064,14 @@ declare module "wxt/browser" {
|
|
|
2055
2064
|
}
|
|
2056
2065
|
}
|
|
2057
2066
|
`;
|
|
2067
|
+
const defaultLocalePath = path5.resolve(
|
|
2068
|
+
wxt.config.publicDir,
|
|
2069
|
+
"_locales",
|
|
2070
|
+
defaultLocale ?? "",
|
|
2071
|
+
"messages.json"
|
|
2072
|
+
);
|
|
2058
2073
|
let messages;
|
|
2059
|
-
if (
|
|
2060
|
-
const defaultLocalePath = path5.resolve(
|
|
2061
|
-
wxt.config.publicDir,
|
|
2062
|
-
"_locales",
|
|
2063
|
-
defaultLocale,
|
|
2064
|
-
"messages.json"
|
|
2065
|
-
);
|
|
2074
|
+
if (await fs6.exists(defaultLocalePath)) {
|
|
2066
2075
|
const content = JSON.parse(await fs6.readFile(defaultLocalePath, "utf-8"));
|
|
2067
2076
|
messages = parseI18nMessages(content);
|
|
2068
2077
|
} else {
|
|
@@ -2788,7 +2797,7 @@ function getChunkSortWeight(filename) {
|
|
|
2788
2797
|
import pc4 from "picocolors";
|
|
2789
2798
|
|
|
2790
2799
|
// package.json
|
|
2791
|
-
var version = "0.18.
|
|
2800
|
+
var version = "0.18.14";
|
|
2792
2801
|
|
|
2793
2802
|
// src/core/utils/log/printHeader.ts
|
|
2794
2803
|
function printHeader() {
|
|
@@ -2938,7 +2947,7 @@ async function generateManifest(entrypoints, buildOutput) {
|
|
|
2938
2947
|
if (versionName == null) {
|
|
2939
2948
|
versionName = "0.0.0";
|
|
2940
2949
|
wxt.logger.warn(
|
|
2941
|
-
'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'
|
|
2942
2951
|
);
|
|
2943
2952
|
}
|
|
2944
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;
|
|
@@ -12224,14 +12233,14 @@ declare module "wxt/browser" {
|
|
|
12224
12233
|
}
|
|
12225
12234
|
}
|
|
12226
12235
|
`;
|
|
12236
|
+
const defaultLocalePath = import_node_path17.default.resolve(
|
|
12237
|
+
wxt.config.publicDir,
|
|
12238
|
+
"_locales",
|
|
12239
|
+
defaultLocale ?? "",
|
|
12240
|
+
"messages.json"
|
|
12241
|
+
);
|
|
12227
12242
|
let messages;
|
|
12228
|
-
if (
|
|
12229
|
-
const defaultLocalePath = import_node_path17.default.resolve(
|
|
12230
|
-
wxt.config.publicDir,
|
|
12231
|
-
"_locales",
|
|
12232
|
-
defaultLocale,
|
|
12233
|
-
"messages.json"
|
|
12234
|
-
);
|
|
12243
|
+
if (await import_fs_extra8.default.exists(defaultLocalePath)) {
|
|
12235
12244
|
const content = JSON.parse(await import_fs_extra8.default.readFile(defaultLocalePath, "utf-8"));
|
|
12236
12245
|
messages = parseI18nMessages(content);
|
|
12237
12246
|
} else {
|
|
@@ -12970,7 +12979,7 @@ function getChunkSortWeight(filename) {
|
|
|
12970
12979
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
12971
12980
|
|
|
12972
12981
|
// package.json
|
|
12973
|
-
var version = "0.18.
|
|
12982
|
+
var version = "0.18.14";
|
|
12974
12983
|
|
|
12975
12984
|
// src/core/utils/building/internal-build.ts
|
|
12976
12985
|
var import_fast_glob5 = __toESM(require("fast-glob"), 1);
|
|
@@ -13114,7 +13123,7 @@ async function generateManifest(entrypoints, buildOutput) {
|
|
|
13114
13123
|
if (versionName == null) {
|
|
13115
13124
|
versionName = "0.0.0";
|
|
13116
13125
|
wxt.logger.warn(
|
|
13117
|
-
'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'
|
|
13118
13127
|
);
|
|
13119
13128
|
}
|
|
13120
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