wxt 0.16.8-alpha1 → 0.16.8-alpha2
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-7WFBUGKG.js → chunk-V5L54EDX.js} +4 -5
- package/dist/cli.js +23 -15
- package/dist/index.cjs +23 -15
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +24 -15
- package/dist/testing.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.16.8-
|
|
3
|
-
|
|
4
|
-
// src/core/utils/fs.ts
|
|
5
|
-
import fs from "fs-extra";
|
|
6
|
-
import glob from "fast-glob";
|
|
2
|
+
var version = "0.16.8-alpha2";
|
|
7
3
|
|
|
8
4
|
// src/core/utils/paths.ts
|
|
9
5
|
import systemPath from "node:path";
|
|
@@ -18,6 +14,8 @@ var CSS_EXTENSIONS = ["css", "scss", "sass", "less", "styl", "stylus"];
|
|
|
18
14
|
var CSS_EXTENSIONS_PATTERN = `+(${CSS_EXTENSIONS.join("|")})`;
|
|
19
15
|
|
|
20
16
|
// src/core/utils/fs.ts
|
|
17
|
+
import fs from "fs-extra";
|
|
18
|
+
import glob from "fast-glob";
|
|
21
19
|
async function writeFileIfDifferent(file, newContents) {
|
|
22
20
|
const existingContents = await fs.readFile(file, "utf-8").catch(() => void 0);
|
|
23
21
|
if (existingContents !== newContents) {
|
|
@@ -2940,6 +2938,7 @@ async function registerWxt(command, inlineConfig = {}, server) {
|
|
|
2940
2938
|
}
|
|
2941
2939
|
|
|
2942
2940
|
export {
|
|
2941
|
+
unnormalizePath,
|
|
2943
2942
|
wxt,
|
|
2944
2943
|
registerWxt,
|
|
2945
2944
|
detectDevChanges,
|
package/dist/cli.js
CHANGED
|
@@ -2152,7 +2152,7 @@ function getChunkSortWeight(filename) {
|
|
|
2152
2152
|
import pc4 from "picocolors";
|
|
2153
2153
|
|
|
2154
2154
|
// package.json
|
|
2155
|
-
var version = "0.16.8-
|
|
2155
|
+
var version = "0.16.8-alpha2";
|
|
2156
2156
|
|
|
2157
2157
|
// src/core/utils/log/printHeader.ts
|
|
2158
2158
|
import { consola as consola2 } from "consola";
|
|
@@ -3127,20 +3127,13 @@ async function createServer(inlineConfig) {
|
|
|
3127
3127
|
};
|
|
3128
3128
|
const buildAndOpenBrowser = async () => {
|
|
3129
3129
|
server.currentOutput = await internalBuild();
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
return chunk.moduleIds;
|
|
3138
|
-
});
|
|
3139
|
-
}).filter(
|
|
3140
|
-
(file) => !file.includes("node_modules") && !file.startsWith("\0")
|
|
3141
|
-
);
|
|
3142
|
-
console.log("Adding files:", additionalFiles);
|
|
3143
|
-
server.watcher.add(additionalFiles);
|
|
3130
|
+
try {
|
|
3131
|
+
const files = getExternalOutputDependencies(server);
|
|
3132
|
+
console.log("Additional files:", files);
|
|
3133
|
+
server.watcher.add(files);
|
|
3134
|
+
} catch (err) {
|
|
3135
|
+
wxt.config.logger.warn("Failed to register additional file paths:", err);
|
|
3136
|
+
}
|
|
3144
3137
|
await runner.openBrowser();
|
|
3145
3138
|
};
|
|
3146
3139
|
const closeAndRecreateRunner = async () => {
|
|
@@ -3314,6 +3307,21 @@ function getFilenameList(names) {
|
|
|
3314
3307
|
return pc7.cyan(name);
|
|
3315
3308
|
}).join(pc7.dim(", "));
|
|
3316
3309
|
}
|
|
3310
|
+
function getExternalOutputDependencies(server) {
|
|
3311
|
+
const additionalFiles = server.currentOutput?.steps.flatMap((step, i) => {
|
|
3312
|
+
if (Array.isArray(step.entrypoints) && i === 0) {
|
|
3313
|
+
return [];
|
|
3314
|
+
}
|
|
3315
|
+
return step.chunks.flatMap((chunk) => {
|
|
3316
|
+
if (chunk.type === "asset")
|
|
3317
|
+
return [];
|
|
3318
|
+
return chunk.moduleIds;
|
|
3319
|
+
});
|
|
3320
|
+
}).filter(
|
|
3321
|
+
(file) => !file.includes("node_modules") && !file.startsWith("\0")
|
|
3322
|
+
).map(unnormalizePath).filter((file) => !file.startsWith(wxt.config.root));
|
|
3323
|
+
return additionalFiles ?? [];
|
|
3324
|
+
}
|
|
3317
3325
|
|
|
3318
3326
|
// src/core/initialize.ts
|
|
3319
3327
|
import prompts from "prompts";
|
package/dist/index.cjs
CHANGED
|
@@ -4579,7 +4579,7 @@ function getChunkSortWeight(filename) {
|
|
|
4579
4579
|
var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
4580
4580
|
|
|
4581
4581
|
// package.json
|
|
4582
|
-
var version = "0.16.8-
|
|
4582
|
+
var version = "0.16.8-alpha2";
|
|
4583
4583
|
|
|
4584
4584
|
// src/core/utils/log/printHeader.ts
|
|
4585
4585
|
var import_consola2 = require("consola");
|
|
@@ -5560,20 +5560,13 @@ async function createServer(inlineConfig) {
|
|
|
5560
5560
|
};
|
|
5561
5561
|
const buildAndOpenBrowser = async () => {
|
|
5562
5562
|
server.currentOutput = await internalBuild();
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
return chunk.moduleIds;
|
|
5571
|
-
});
|
|
5572
|
-
}).filter(
|
|
5573
|
-
(file) => !file.includes("node_modules") && !file.startsWith("\0")
|
|
5574
|
-
);
|
|
5575
|
-
console.log("Adding files:", additionalFiles);
|
|
5576
|
-
server.watcher.add(additionalFiles);
|
|
5563
|
+
try {
|
|
5564
|
+
const files = getExternalOutputDependencies(server);
|
|
5565
|
+
console.log("Additional files:", files);
|
|
5566
|
+
server.watcher.add(files);
|
|
5567
|
+
} catch (err) {
|
|
5568
|
+
wxt.config.logger.warn("Failed to register additional file paths:", err);
|
|
5569
|
+
}
|
|
5577
5570
|
await runner.openBrowser();
|
|
5578
5571
|
};
|
|
5579
5572
|
const closeAndRecreateRunner = async () => {
|
|
@@ -5747,6 +5740,21 @@ function getFilenameList(names) {
|
|
|
5747
5740
|
return import_picocolors7.default.cyan(name);
|
|
5748
5741
|
}).join(import_picocolors7.default.dim(", "));
|
|
5749
5742
|
}
|
|
5743
|
+
function getExternalOutputDependencies(server) {
|
|
5744
|
+
const additionalFiles = server.currentOutput?.steps.flatMap((step, i) => {
|
|
5745
|
+
if (Array.isArray(step.entrypoints) && i === 0) {
|
|
5746
|
+
return [];
|
|
5747
|
+
}
|
|
5748
|
+
return step.chunks.flatMap((chunk) => {
|
|
5749
|
+
if (chunk.type === "asset")
|
|
5750
|
+
return [];
|
|
5751
|
+
return chunk.moduleIds;
|
|
5752
|
+
});
|
|
5753
|
+
}).filter(
|
|
5754
|
+
(file) => !file.includes("node_modules") && !file.startsWith("\0")
|
|
5755
|
+
).map(unnormalizePath).filter((file) => !file.startsWith(wxt.config.root));
|
|
5756
|
+
return additionalFiles ?? [];
|
|
5757
|
+
}
|
|
5750
5758
|
|
|
5751
5759
|
// src/core/initialize.ts
|
|
5752
5760
|
var import_prompts = __toESM(require("prompts"), 1);
|
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.16.8-
|
|
67
|
+
var version = "0.16.8-alpha2";
|
|
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.16.8-
|
|
67
|
+
var version = "0.16.8-alpha2";
|
|
68
68
|
|
|
69
69
|
export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
|
package/dist/index.js
CHANGED
|
@@ -13,9 +13,10 @@ import {
|
|
|
13
13
|
rebuild,
|
|
14
14
|
registerWxt,
|
|
15
15
|
resolvePerBrowserOption,
|
|
16
|
+
unnormalizePath,
|
|
16
17
|
version,
|
|
17
18
|
wxt
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-V5L54EDX.js";
|
|
19
20
|
import "./chunk-VBXJIVYU.js";
|
|
20
21
|
|
|
21
22
|
// src/core/build.ts
|
|
@@ -229,20 +230,13 @@ async function createServer(inlineConfig) {
|
|
|
229
230
|
};
|
|
230
231
|
const buildAndOpenBrowser = async () => {
|
|
231
232
|
server.currentOutput = await internalBuild();
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return chunk.moduleIds;
|
|
240
|
-
});
|
|
241
|
-
}).filter(
|
|
242
|
-
(file) => !file.includes("node_modules") && !file.startsWith("\0")
|
|
243
|
-
);
|
|
244
|
-
console.log("Adding files:", additionalFiles);
|
|
245
|
-
server.watcher.add(additionalFiles);
|
|
233
|
+
try {
|
|
234
|
+
const files = getExternalOutputDependencies(server);
|
|
235
|
+
console.log("Additional files:", files);
|
|
236
|
+
server.watcher.add(files);
|
|
237
|
+
} catch (err) {
|
|
238
|
+
wxt.config.logger.warn("Failed to register additional file paths:", err);
|
|
239
|
+
}
|
|
246
240
|
await runner.openBrowser();
|
|
247
241
|
};
|
|
248
242
|
const closeAndRecreateRunner = async () => {
|
|
@@ -416,6 +410,21 @@ function getFilenameList(names) {
|
|
|
416
410
|
return pc2.cyan(name);
|
|
417
411
|
}).join(pc2.dim(", "));
|
|
418
412
|
}
|
|
413
|
+
function getExternalOutputDependencies(server) {
|
|
414
|
+
const additionalFiles = server.currentOutput?.steps.flatMap((step, i) => {
|
|
415
|
+
if (Array.isArray(step.entrypoints) && i === 0) {
|
|
416
|
+
return [];
|
|
417
|
+
}
|
|
418
|
+
return step.chunks.flatMap((chunk) => {
|
|
419
|
+
if (chunk.type === "asset")
|
|
420
|
+
return [];
|
|
421
|
+
return chunk.moduleIds;
|
|
422
|
+
});
|
|
423
|
+
}).filter(
|
|
424
|
+
(file) => !file.includes("node_modules") && !file.startsWith("\0")
|
|
425
|
+
).map(unnormalizePath).filter((file) => !file.startsWith(wxt.config.root));
|
|
426
|
+
return additionalFiles ?? [];
|
|
427
|
+
}
|
|
419
428
|
|
|
420
429
|
// src/core/initialize.ts
|
|
421
430
|
import prompts from "prompts";
|
package/dist/testing.js
CHANGED