wxt 0.13.2 → 0.13.3
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-DCONVSW5.js → chunk-EWVNLDDM.js} +24 -9
- package/dist/cli.js +24 -9
- package/dist/index.cjs +24 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/testing.js +1 -1
- package/dist/virtual/background-entrypoint.js +5 -0
- package/package.json +2 -2
- package/dist/cli.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.13.
|
|
2
|
+
var version = "0.13.3";
|
|
3
3
|
|
|
4
4
|
// src/core/utils/arrays.ts
|
|
5
5
|
function every(array, predicate) {
|
|
@@ -1751,27 +1751,42 @@ async function writeManifest(manifest, output, config) {
|
|
|
1751
1751
|
fileName: "manifest.json"
|
|
1752
1752
|
});
|
|
1753
1753
|
}
|
|
1754
|
-
async function
|
|
1754
|
+
async function generateManifest(entrypoints, buildOutput, config) {
|
|
1755
1755
|
const pkg = await getPackageJson(config);
|
|
1756
|
-
|
|
1757
|
-
|
|
1756
|
+
let versionName = config.manifest.version_name ?? config.manifest.version ?? pkg?.version;
|
|
1757
|
+
if (versionName == null) {
|
|
1758
|
+
versionName = "0.0.0";
|
|
1759
|
+
config.logger.warn(
|
|
1760
|
+
'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'
|
|
1761
|
+
);
|
|
1762
|
+
}
|
|
1763
|
+
let version2 = config.manifest.version ?? simplifyVersion(versionName);
|
|
1758
1764
|
const baseManifest = {
|
|
1759
1765
|
manifest_version: config.manifestVersion,
|
|
1760
1766
|
name: pkg?.name,
|
|
1761
1767
|
description: pkg?.description,
|
|
1762
1768
|
version: version2,
|
|
1763
|
-
version_name: (
|
|
1764
|
-
// Firefox doesn't support version_name
|
|
1765
|
-
config.browser === "firefox" || versionName === version2 ? void 0 : versionName
|
|
1766
|
-
),
|
|
1767
1769
|
short_name: pkg?.shortName,
|
|
1768
1770
|
icons: discoverIcons(buildOutput)
|
|
1769
1771
|
};
|
|
1772
|
+
if (config.command === "serve") {
|
|
1773
|
+
baseManifest.commands = {
|
|
1774
|
+
"wxt:reload-extension": {
|
|
1775
|
+
description: "Reload the extension during development",
|
|
1776
|
+
suggested_key: {
|
|
1777
|
+
default: "Ctrl+E"
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
}
|
|
1770
1782
|
const userManifest = config.manifest;
|
|
1771
1783
|
const manifest = defu3(
|
|
1772
1784
|
userManifest,
|
|
1773
1785
|
baseManifest
|
|
1774
1786
|
);
|
|
1787
|
+
manifest.version = version2;
|
|
1788
|
+
manifest.version_name = // Firefox doesn't support version_name
|
|
1789
|
+
config.browser === "firefox" || versionName === version2 ? void 0 : versionName;
|
|
1775
1790
|
addEntrypoints(manifest, entrypoints, buildOutput, config);
|
|
1776
1791
|
if (config.command === "serve")
|
|
1777
1792
|
addDevModeCsp(manifest, config);
|
|
@@ -2139,7 +2154,7 @@ async function rebuild(config, entrypointGroups, existingOutput = {
|
|
|
2139
2154
|
steps: [...existingOutput.steps, ...newOutput.steps],
|
|
2140
2155
|
publicAssets: [...existingOutput.publicAssets, ...newOutput.publicAssets]
|
|
2141
2156
|
};
|
|
2142
|
-
const newManifest = await
|
|
2157
|
+
const newManifest = await generateManifest(
|
|
2143
2158
|
allEntrypoints,
|
|
2144
2159
|
mergedOutput,
|
|
2145
2160
|
config
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import "./chunk-VBXJIVYU.js";
|
|
|
4
4
|
import cac from "cac";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "0.13.
|
|
7
|
+
var version = "0.13.3";
|
|
8
8
|
|
|
9
9
|
// src/core/utils/fs.ts
|
|
10
10
|
import fs from "fs-extra";
|
|
@@ -2048,27 +2048,42 @@ async function writeManifest(manifest, output, config) {
|
|
|
2048
2048
|
fileName: "manifest.json"
|
|
2049
2049
|
});
|
|
2050
2050
|
}
|
|
2051
|
-
async function
|
|
2051
|
+
async function generateManifest(entrypoints, buildOutput, config) {
|
|
2052
2052
|
const pkg = await getPackageJson(config);
|
|
2053
|
-
|
|
2054
|
-
|
|
2053
|
+
let versionName = config.manifest.version_name ?? config.manifest.version ?? pkg?.version;
|
|
2054
|
+
if (versionName == null) {
|
|
2055
|
+
versionName = "0.0.0";
|
|
2056
|
+
config.logger.warn(
|
|
2057
|
+
'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'
|
|
2058
|
+
);
|
|
2059
|
+
}
|
|
2060
|
+
let version2 = config.manifest.version ?? simplifyVersion(versionName);
|
|
2055
2061
|
const baseManifest = {
|
|
2056
2062
|
manifest_version: config.manifestVersion,
|
|
2057
2063
|
name: pkg?.name,
|
|
2058
2064
|
description: pkg?.description,
|
|
2059
2065
|
version: version2,
|
|
2060
|
-
version_name: (
|
|
2061
|
-
// Firefox doesn't support version_name
|
|
2062
|
-
config.browser === "firefox" || versionName === version2 ? void 0 : versionName
|
|
2063
|
-
),
|
|
2064
2066
|
short_name: pkg?.shortName,
|
|
2065
2067
|
icons: discoverIcons(buildOutput)
|
|
2066
2068
|
};
|
|
2069
|
+
if (config.command === "serve") {
|
|
2070
|
+
baseManifest.commands = {
|
|
2071
|
+
"wxt:reload-extension": {
|
|
2072
|
+
description: "Reload the extension during development",
|
|
2073
|
+
suggested_key: {
|
|
2074
|
+
default: "Ctrl+E"
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
};
|
|
2078
|
+
}
|
|
2067
2079
|
const userManifest = config.manifest;
|
|
2068
2080
|
const manifest = defu3(
|
|
2069
2081
|
userManifest,
|
|
2070
2082
|
baseManifest
|
|
2071
2083
|
);
|
|
2084
|
+
manifest.version = version2;
|
|
2085
|
+
manifest.version_name = // Firefox doesn't support version_name
|
|
2086
|
+
config.browser === "firefox" || versionName === version2 ? void 0 : versionName;
|
|
2072
2087
|
addEntrypoints(manifest, entrypoints, buildOutput, config);
|
|
2073
2088
|
if (config.command === "serve")
|
|
2074
2089
|
addDevModeCsp(manifest, config);
|
|
@@ -2436,7 +2451,7 @@ async function rebuild(config, entrypointGroups, existingOutput = {
|
|
|
2436
2451
|
steps: [...existingOutput.steps, ...newOutput.steps],
|
|
2437
2452
|
publicAssets: [...existingOutput.publicAssets, ...newOutput.publicAssets]
|
|
2438
2453
|
};
|
|
2439
|
-
const newManifest = await
|
|
2454
|
+
const newManifest = await generateManifest(
|
|
2440
2455
|
allEntrypoints,
|
|
2441
2456
|
mergedOutput,
|
|
2442
2457
|
config
|
package/dist/index.cjs
CHANGED
|
@@ -4334,7 +4334,7 @@ function getChunkSortWeight(filename) {
|
|
|
4334
4334
|
var import_picocolors3 = __toESM(require("picocolors"), 1);
|
|
4335
4335
|
|
|
4336
4336
|
// package.json
|
|
4337
|
-
var version = "0.13.
|
|
4337
|
+
var version = "0.13.3";
|
|
4338
4338
|
|
|
4339
4339
|
// src/core/utils/log/printHeader.ts
|
|
4340
4340
|
var import_consola2 = require("consola");
|
|
@@ -4474,27 +4474,42 @@ async function writeManifest(manifest, output, config) {
|
|
|
4474
4474
|
fileName: "manifest.json"
|
|
4475
4475
|
});
|
|
4476
4476
|
}
|
|
4477
|
-
async function
|
|
4477
|
+
async function generateManifest(entrypoints, buildOutput, config) {
|
|
4478
4478
|
const pkg = await getPackageJson(config);
|
|
4479
|
-
|
|
4480
|
-
|
|
4479
|
+
let versionName = config.manifest.version_name ?? config.manifest.version ?? pkg?.version;
|
|
4480
|
+
if (versionName == null) {
|
|
4481
|
+
versionName = "0.0.0";
|
|
4482
|
+
config.logger.warn(
|
|
4483
|
+
'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'
|
|
4484
|
+
);
|
|
4485
|
+
}
|
|
4486
|
+
let version2 = config.manifest.version ?? simplifyVersion(versionName);
|
|
4481
4487
|
const baseManifest = {
|
|
4482
4488
|
manifest_version: config.manifestVersion,
|
|
4483
4489
|
name: pkg?.name,
|
|
4484
4490
|
description: pkg?.description,
|
|
4485
4491
|
version: version2,
|
|
4486
|
-
version_name: (
|
|
4487
|
-
// Firefox doesn't support version_name
|
|
4488
|
-
config.browser === "firefox" || versionName === version2 ? void 0 : versionName
|
|
4489
|
-
),
|
|
4490
4492
|
short_name: pkg?.shortName,
|
|
4491
4493
|
icons: discoverIcons(buildOutput)
|
|
4492
4494
|
};
|
|
4495
|
+
if (config.command === "serve") {
|
|
4496
|
+
baseManifest.commands = {
|
|
4497
|
+
"wxt:reload-extension": {
|
|
4498
|
+
description: "Reload the extension during development",
|
|
4499
|
+
suggested_key: {
|
|
4500
|
+
default: "Ctrl+E"
|
|
4501
|
+
}
|
|
4502
|
+
}
|
|
4503
|
+
};
|
|
4504
|
+
}
|
|
4493
4505
|
const userManifest = config.manifest;
|
|
4494
4506
|
const manifest = (0, import_defu3.default)(
|
|
4495
4507
|
userManifest,
|
|
4496
4508
|
baseManifest
|
|
4497
4509
|
);
|
|
4510
|
+
manifest.version = version2;
|
|
4511
|
+
manifest.version_name = // Firefox doesn't support version_name
|
|
4512
|
+
config.browser === "firefox" || versionName === version2 ? void 0 : versionName;
|
|
4498
4513
|
addEntrypoints(manifest, entrypoints, buildOutput, config);
|
|
4499
4514
|
if (config.command === "serve")
|
|
4500
4515
|
addDevModeCsp(manifest, config);
|
|
@@ -4862,7 +4877,7 @@ async function rebuild(config, entrypointGroups, existingOutput = {
|
|
|
4862
4877
|
steps: [...existingOutput.steps, ...newOutput.steps],
|
|
4863
4878
|
publicAssets: [...existingOutput.publicAssets, ...newOutput.publicAssets]
|
|
4864
4879
|
};
|
|
4865
|
-
const newManifest = await
|
|
4880
|
+
const newManifest = await generateManifest(
|
|
4866
4881
|
allEntrypoints,
|
|
4867
4882
|
mergedOutput,
|
|
4868
4883
|
config
|
package/dist/index.d.cts
CHANGED
|
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
62
62
|
*/
|
|
63
63
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
64
64
|
|
|
65
|
-
var version = "0.13.
|
|
65
|
+
var version = "0.13.3";
|
|
66
66
|
|
|
67
67
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.d.ts
CHANGED
|
@@ -62,6 +62,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
|
|
|
62
62
|
*/
|
|
63
63
|
declare function zip(config?: InlineConfig): Promise<string[]>;
|
|
64
64
|
|
|
65
|
-
var version = "0.13.
|
|
65
|
+
var version = "0.13.3";
|
|
66
66
|
|
|
67
67
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.js
CHANGED
package/dist/testing.js
CHANGED
|
@@ -116,6 +116,11 @@ if (__COMMAND__ === "serve") {
|
|
|
116
116
|
} catch (err) {
|
|
117
117
|
logger.error("Failed to setup web socket connection with dev server", err);
|
|
118
118
|
}
|
|
119
|
+
browser3.commands.onCommand.addListener((command) => {
|
|
120
|
+
if (command === "wxt:reload-extension") {
|
|
121
|
+
browser3.runtime.reload();
|
|
122
|
+
}
|
|
123
|
+
});
|
|
119
124
|
}
|
|
120
125
|
try {
|
|
121
126
|
const res = definition.main();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.3",
|
|
5
5
|
"description": "Next gen framework for developing web extensions",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=18",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"typedoc-plugin-markdown": "4.0.0-next.23",
|
|
140
140
|
"typedoc-vitepress-theme": "1.0.0-next.3",
|
|
141
141
|
"typescript": "^5.3.2",
|
|
142
|
-
"vitepress": "1.0.0-rc.
|
|
142
|
+
"vitepress": "1.0.0-rc.34",
|
|
143
143
|
"vitest": "^1.1.0",
|
|
144
144
|
"vitest-mock-extended": "^1.3.1",
|
|
145
145
|
"vue": "^3.3.10"
|
package/dist/cli.d.ts
DELETED