wxt 0.17.0 → 0.17.1
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/{chunk-FD7GO6WM.js → chunk-JPO52NRM.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/storage.cjs +1 -1
- package/dist/storage.d.cts +2 -2
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +1 -1
- package/dist/testing.js +1 -1
- package/dist/virtual/background-entrypoint.js +16 -1
- package/package.json +1 -1
- package/dist/cli.d.ts +0 -2
package/dist/cli.js
CHANGED
|
@@ -2181,7 +2181,7 @@ function getChunkSortWeight(filename) {
|
|
|
2181
2181
|
import pc4 from "picocolors";
|
|
2182
2182
|
|
|
2183
2183
|
// package.json
|
|
2184
|
-
var version = "0.17.
|
|
2184
|
+
var version = "0.17.1";
|
|
2185
2185
|
|
|
2186
2186
|
// src/core/utils/log/printHeader.ts
|
|
2187
2187
|
import { consola as consola2 } from "consola";
|
package/dist/index.cjs
CHANGED
|
@@ -4608,7 +4608,7 @@ function getChunkSortWeight(filename) {
|
|
|
4608
4608
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
4609
4609
|
|
|
4610
4610
|
// package.json
|
|
4611
|
-
var version = "0.17.
|
|
4611
|
+
var version = "0.17.1";
|
|
4612
4612
|
|
|
4613
4613
|
// src/core/utils/log/printHeader.ts
|
|
4614
4614
|
var import_consola2 = require("consola");
|
package/dist/index.d.cts
CHANGED
|
@@ -64,6 +64,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
64
64
|
*/
|
|
65
65
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
66
66
|
|
|
67
|
-
var version = "0.17.
|
|
67
|
+
var version = "0.17.1";
|
|
68
68
|
|
|
69
69
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
64
64
|
*/
|
|
65
65
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
66
66
|
|
|
67
|
-
var version = "0.17.
|
|
67
|
+
var version = "0.17.1";
|
|
68
68
|
|
|
69
69
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.js
CHANGED
package/dist/storage.cjs
CHANGED
|
@@ -83,7 +83,7 @@ function createStorage() {
|
|
|
83
83
|
const driverKey = key.substring(deliminatorIndex + 1);
|
|
84
84
|
if (driverKey == null)
|
|
85
85
|
throw Error(
|
|
86
|
-
`Storage key should be in the form of "area:key", but
|
|
86
|
+
`Storage key should be in the form of "area:key", but received "${key}"`
|
|
87
87
|
);
|
|
88
88
|
return {
|
|
89
89
|
driverArea,
|
package/dist/storage.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ interface WxtStorage {
|
|
|
8
8
|
*/
|
|
9
9
|
getItem<T>(key: string, opts?: GetItemOptions<T>): Promise<T | null>;
|
|
10
10
|
/**
|
|
11
|
-
* Get multiple items from storage. There is no
|
|
11
|
+
* Get multiple items from storage. There is no guarantee of order in the returned array.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* await storage.getItems(["local:installDate", "session:someCounter"]);
|
|
@@ -88,7 +88,7 @@ interface WxtStorage {
|
|
|
88
88
|
snapshot(base: string, opts?: SnapshotOptions): Promise<Record<string, unknown>>;
|
|
89
89
|
/**
|
|
90
90
|
* Restores the results of `snapshot`. If new properties have been saved since the snapshot, they are
|
|
91
|
-
* not overridden. Only values existing in the snapshot are
|
|
91
|
+
* not overridden. Only values existing in the snapshot are overridden.
|
|
92
92
|
*/
|
|
93
93
|
restoreSnapshot(base: string, data: any): Promise<void>;
|
|
94
94
|
/**
|
package/dist/storage.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface WxtStorage {
|
|
|
8
8
|
*/
|
|
9
9
|
getItem<T>(key: string, opts?: GetItemOptions<T>): Promise<T | null>;
|
|
10
10
|
/**
|
|
11
|
-
* Get multiple items from storage. There is no
|
|
11
|
+
* Get multiple items from storage. There is no guarantee of order in the returned array.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* await storage.getItems(["local:installDate", "session:someCounter"]);
|
|
@@ -88,7 +88,7 @@ interface WxtStorage {
|
|
|
88
88
|
snapshot(base: string, opts?: SnapshotOptions): Promise<Record<string, unknown>>;
|
|
89
89
|
/**
|
|
90
90
|
* Restores the results of `snapshot`. If new properties have been saved since the snapshot, they are
|
|
91
|
-
* not overridden. Only values existing in the snapshot are
|
|
91
|
+
* not overridden. Only values existing in the snapshot are overridden.
|
|
92
92
|
*/
|
|
93
93
|
restoreSnapshot(base: string, data: any): Promise<void>;
|
|
94
94
|
/**
|
package/dist/storage.js
CHANGED
|
@@ -48,7 +48,7 @@ function createStorage() {
|
|
|
48
48
|
const driverKey = key.substring(deliminatorIndex + 1);
|
|
49
49
|
if (driverKey == null)
|
|
50
50
|
throw Error(
|
|
51
|
-
`Storage key should be in the form of "area:key", but
|
|
51
|
+
`Storage key should be in the form of "area:key", but received "${key}"`
|
|
52
52
|
);
|
|
53
53
|
return {
|
|
54
54
|
driverArea,
|
package/dist/testing.js
CHANGED
|
@@ -75,8 +75,23 @@ async function reloadContentScriptMv3({
|
|
|
75
75
|
if (registration === "runtime") {
|
|
76
76
|
await reloadRuntimeContentScriptMv3(contentScript);
|
|
77
77
|
} else {
|
|
78
|
-
await
|
|
78
|
+
await reloadManifestContentScriptMv3(contentScript);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async function reloadManifestContentScriptMv3(contentScript) {
|
|
82
|
+
const id = `wxt:${contentScript.js[0]}`;
|
|
83
|
+
logger.log("Reloading content script:", contentScript);
|
|
84
|
+
const registered = await browser2.scripting.getRegisteredContentScripts();
|
|
85
|
+
logger.debug("Existing scripts:", registered);
|
|
86
|
+
const existing = registered.find((cs) => cs.id === id);
|
|
87
|
+
if (existing) {
|
|
88
|
+
logger.debug("Updating content script", existing);
|
|
89
|
+
await browser2.scripting.updateContentScripts([{ ...contentScript, id }]);
|
|
90
|
+
} else {
|
|
91
|
+
logger.debug("Registering new content script...");
|
|
92
|
+
await browser2.scripting.registerContentScripts([{ ...contentScript, id }]);
|
|
79
93
|
}
|
|
94
|
+
await reloadTabsForContentScript(contentScript);
|
|
80
95
|
}
|
|
81
96
|
async function reloadRuntimeContentScriptMv3(contentScript) {
|
|
82
97
|
logger.log("Reloading content script:", contentScript);
|
package/package.json
CHANGED
package/dist/cli.d.ts
DELETED