@unocss/inspector 0.12.18 → 0.13.0
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/index.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -55,7 +55,8 @@ var import_gzip_size = __toModule(require("gzip-size"));
|
|
|
55
55
|
var _dirname = typeof __dirname !== "undefined" ? __dirname : (0, import_path.dirname)((0, import_url.fileURLToPath)(importMetaUrlShim));
|
|
56
56
|
function UnocssInspector(ctx) {
|
|
57
57
|
let config;
|
|
58
|
-
function configureServer(server) {
|
|
58
|
+
async function configureServer(server) {
|
|
59
|
+
await ctx.ready;
|
|
59
60
|
server.middlewares.use("/__unocss", (0, import_sirv.default)((0, import_path.resolve)(_dirname, "../dist/client"), {
|
|
60
61
|
single: true,
|
|
61
62
|
dev: true
|
|
@@ -68,8 +69,8 @@ function UnocssInspector(ctx) {
|
|
|
68
69
|
version: ctx.uno.version,
|
|
69
70
|
root: config.root,
|
|
70
71
|
modules: Array.from(ctx.modules.keys()),
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
config: ctx.uno.config,
|
|
73
|
+
configSources: (await ctx.ready).sources
|
|
73
74
|
};
|
|
74
75
|
res.setHeader("Content-Type", "application/json");
|
|
75
76
|
res.write(JSON.stringify(info, null, 2));
|
package/dist/index.mjs
CHANGED
|
@@ -26,7 +26,8 @@ import gzipSize from "gzip-size";
|
|
|
26
26
|
var _dirname = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
|
|
27
27
|
function UnocssInspector(ctx) {
|
|
28
28
|
let config;
|
|
29
|
-
function configureServer(server) {
|
|
29
|
+
async function configureServer(server) {
|
|
30
|
+
await ctx.ready;
|
|
30
31
|
server.middlewares.use("/__unocss", sirv(resolve(_dirname, "../dist/client"), {
|
|
31
32
|
single: true,
|
|
32
33
|
dev: true
|
|
@@ -39,8 +40,8 @@ function UnocssInspector(ctx) {
|
|
|
39
40
|
version: ctx.uno.version,
|
|
40
41
|
root: config.root,
|
|
41
42
|
modules: Array.from(ctx.modules.keys()),
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
config: ctx.uno.config,
|
|
44
|
+
configSources: (await ctx.ready).sources
|
|
44
45
|
};
|
|
45
46
|
res.setHeader("Content-Type", "application/json");
|
|
46
47
|
res.write(JSON.stringify(info, null, 2));
|