wxt 0.20.24 → 0.20.25
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/core/resolve-config.mjs +6 -6
- package/dist/core/utils/building/find-entrypoints.mjs +1 -1
- package/dist/core/utils/building/internal-build.mjs +1 -1
- package/dist/core/utils/network.mjs +1 -1
- package/dist/core/wxt.mjs +4 -3
- package/dist/types.d.mts +4 -4
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { builtinModules } from "../builtin-modules/index.mjs";
|
|
2
2
|
import { normalizePath } from "./utils/paths.mjs";
|
|
3
3
|
import "./utils/index.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { createFsCache } from "./utils/cache.mjs";
|
|
5
5
|
import { getEslintVersion } from "./utils/eslint.mjs";
|
|
6
6
|
import { safeStringToNumber } from "./utils/number.mjs";
|
|
7
7
|
import { loadEnv } from "./utils/env.mjs";
|
|
8
8
|
import { pathExists } from "./utils/fs.mjs";
|
|
9
9
|
import { glob } from "tinyglobby";
|
|
10
|
-
import { loadConfig } from "c12";
|
|
11
|
-
import { resolve } from "import-meta-resolve";
|
|
12
10
|
import path from "node:path";
|
|
13
11
|
import consola, { LogLevels } from "consola";
|
|
12
|
+
import { loadConfig } from "c12";
|
|
13
|
+
import { resolve as resolve$1 } from "import-meta-resolve";
|
|
14
14
|
import defu from "defu";
|
|
15
15
|
import { getPort } from "get-port-please";
|
|
16
16
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -362,7 +362,7 @@ async function getUnimportEslintOptions(wxtDir, options) {
|
|
|
362
362
|
}
|
|
363
363
|
/** Returns the path to `node_modules/wxt`. */
|
|
364
364
|
function resolveWxtModuleDir() {
|
|
365
|
-
const url = resolve("wxt", import.meta.url);
|
|
365
|
+
const url = resolve$1("wxt", import.meta.url);
|
|
366
366
|
return path.resolve(fileURLToPath(url), "../..");
|
|
367
367
|
}
|
|
368
368
|
async function isDirMissing(dir) {
|
|
@@ -389,7 +389,7 @@ async function mergeBuilderConfig(logger, inlineConfig, userConfig) {
|
|
|
389
389
|
async function resolveWxtUserModules(root, modulesDir, modules = []) {
|
|
390
390
|
const importer = pathToFileURL(path.join(root, "index.js")).href;
|
|
391
391
|
const npmModules = await Promise.all(modules.map(async (moduleId) => {
|
|
392
|
-
const mod = await import(resolve(moduleId, importer));
|
|
392
|
+
const mod = await import(resolve$1(moduleId, importer));
|
|
393
393
|
if (mod.default == null) throw Error("Module missing default export: " + moduleId);
|
|
394
394
|
return {
|
|
395
395
|
...mod.default,
|
|
@@ -5,9 +5,9 @@ import { wxt } from "../../wxt.mjs";
|
|
|
5
5
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
6
6
|
import { glob } from "tinyglobby";
|
|
7
7
|
import { relative, resolve } from "path";
|
|
8
|
-
import { styleText } from "node:util";
|
|
9
8
|
import { parseHTML } from "linkedom";
|
|
10
9
|
import { camelCase } from "scule";
|
|
10
|
+
import { styleText } from "node:util";
|
|
11
11
|
import picomatch from "picomatch";
|
|
12
12
|
import JSON5 from "json5";
|
|
13
13
|
//#region src/core/utils/building/find-entrypoints.ts
|
|
@@ -10,8 +10,8 @@ import { ValidationError, validateEntrypoints } from "../validation.mjs";
|
|
|
10
10
|
import { mkdir, rm } from "node:fs/promises";
|
|
11
11
|
import { glob } from "tinyglobby";
|
|
12
12
|
import { relative } from "node:path";
|
|
13
|
-
import { styleText } from "node:util";
|
|
14
13
|
import { mergeJsonOutputs } from "@aklinker1/rollup-plugin-visualizer";
|
|
14
|
+
import { styleText } from "node:util";
|
|
15
15
|
import { isCI } from "ci-info";
|
|
16
16
|
//#region src/core/utils/building/internal-build.ts
|
|
17
17
|
/**
|
package/dist/core/wxt.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { builtinModules } from "../builtin-modules/index.mjs";
|
|
2
|
-
import { resolveConfig } from "./resolve-config.mjs";
|
|
3
|
-
import { createWxtPackageManager } from "./package-managers/index.mjs";
|
|
4
2
|
import { createViteBuilder } from "./builders/vite/index.mjs";
|
|
5
|
-
import {
|
|
3
|
+
import { createWxtPackageManager } from "./package-managers/index.mjs";
|
|
4
|
+
import { resolveConfig } from "./resolve-config.mjs";
|
|
6
5
|
import { createHooks } from "hookable";
|
|
6
|
+
import { relative } from "path";
|
|
7
7
|
//#region src/core/wxt.ts
|
|
8
8
|
/**
|
|
9
9
|
* Global variable set once `createWxt` is called once. Since this variable is
|
|
@@ -32,6 +32,7 @@ async function registerWxt(command, inlineConfig = {}) {
|
|
|
32
32
|
inlineConfig.dev ??= {};
|
|
33
33
|
inlineConfig.dev.server ??= {};
|
|
34
34
|
inlineConfig.dev.server.port = wxt.config.dev.server.port;
|
|
35
|
+
inlineConfig.dev.server.strictPort = true;
|
|
35
36
|
}
|
|
36
37
|
wxt.config = await resolveConfig(inlineConfig, command);
|
|
37
38
|
await wxt.hooks.callHook("config:resolved", wxt);
|
package/dist/types.d.mts
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
* });
|
|
21
21
|
*/import { ContentScriptContext } from "./utils/content-script-context.mjs";
|
|
22
22
|
import { ManifestContentScript } from "./core/utils/types.mjs";
|
|
23
|
-
import { ResolvedConfig } from "c12";
|
|
24
|
-
import { LogLevel } from "consola";
|
|
25
|
-
import { Import, UnimportOptions } from "unimport";
|
|
26
23
|
import { Hookable, NestedHooks } from "hookable";
|
|
27
|
-
import
|
|
24
|
+
import { Import, UnimportOptions } from "unimport";
|
|
25
|
+
import { LogLevel } from "consola";
|
|
28
26
|
import { PluginVisualizerOptions } from "@aklinker1/rollup-plugin-visualizer";
|
|
27
|
+
import * as Nypm from "nypm";
|
|
28
|
+
import { ResolvedConfig } from "c12";
|
|
29
29
|
import { Browser } from "@wxt-dev/browser";
|
|
30
30
|
import * as vite from "vite";
|
|
31
31
|
|
package/dist/version.mjs
CHANGED