usage-board 2.1.1 → 3.0.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.mjs +10 -4
- package/dist/public/_nuxt/{4bxbFgue.js → 7Dy4NLP8.js} +32 -32
- package/dist/public/_nuxt/B-VlGWDb.js +21 -0
- package/dist/public/_nuxt/{BFuazmgM.js → Be3rizqy.js} +1 -1
- package/dist/public/_nuxt/{DhnbCV8M.js → C0azgqnZ.js} +1 -1
- package/dist/public/_nuxt/{BT5lZ84X.js → CMNdiQCa.js} +1 -1
- package/dist/public/_nuxt/CPuXQJE_.js +1 -0
- package/dist/public/_nuxt/DenksPSi.js +119 -0
- package/dist/public/_nuxt/Dkya5WaL.js +9 -0
- package/dist/public/_nuxt/HN9OZyaQ.js +25 -0
- package/dist/public/_nuxt/{DJtZPkAh.js → JtK-nXxy.js} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/37e8bb21-a086-45bf-93dc-47eeeada7299.json +1 -0
- package/dist/public/_nuxt/{Rw8uLrAX.js → y3weNNd-.js} +2 -2
- package/dist/server/chunks/_/error-500.mjs +8 -4
- package/dist/server/chunks/_/shared.cjs.prod.mjs +1 -1
- package/dist/server/chunks/build/client.precomputed.mjs +1 -1
- package/dist/server/chunks/nitro/nitro.mjs +8218 -2844
- package/dist/server/chunks/routes/api/payload.json.mjs +11 -626
- package/dist/server/chunks/routes/api/projects/_project/modules.get.mjs +36 -0
- package/dist/server/chunks/routes/api/projects/catalog.get.mjs +26 -0
- package/dist/server/chunks/routes/renderer.mjs +9 -5
- package/dist/server/chunks/routes/ws.mjs +29 -971
- package/dist/server/index.mjs +9 -5
- package/package.json +7 -6
- package/dist/public/_nuxt/BWrHX8SV.js +0 -21
- package/dist/public/_nuxt/Bhg6RTpr.js +0 -25
- package/dist/public/_nuxt/CBNzCW3N.js +0 -9
- package/dist/public/_nuxt/CJwUiTrM.js +0 -1
- package/dist/public/_nuxt/builds/meta/8e0230d2-a165-4dfa-b759-5387bcb88e4e.json +0 -1
- package/dist/public/_nuxt/uC637M1z.js +0 -119
- package/dist/server/chunks/_/index.min.mjs +0 -348
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServer } from "node:http";
|
|
2
2
|
import path, { dirname, resolve } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
4
|
import cac from "cac";
|
|
5
5
|
import { createServer as createServer$1 } from "node:net";
|
|
6
6
|
import os, { networkInterfaces } from "node:os";
|
|
@@ -756,14 +756,20 @@ defineLazyProperty(apps, "safari", () => detectPlatformBinary({ darwin: "Safari"
|
|
|
756
756
|
//#endregion
|
|
757
757
|
//#region package.json
|
|
758
758
|
var name = "usage-board";
|
|
759
|
-
var version = "
|
|
759
|
+
var version = "3.0.0";
|
|
760
760
|
//#endregion
|
|
761
761
|
//#region src/index.ts
|
|
762
762
|
const cli = cac(name);
|
|
763
|
+
function isNodeListener(value) {
|
|
764
|
+
return typeof value === "function";
|
|
765
|
+
}
|
|
763
766
|
async function loadNitroEntrypoint(outputDir) {
|
|
764
|
-
const
|
|
767
|
+
const entryPath = resolve(outputDir, "server/index.mjs");
|
|
768
|
+
const mod = await import(pathToFileURL(entryPath).href);
|
|
769
|
+
const listener = mod.listener ?? mod.middleware ?? mod.handler ?? mod.default;
|
|
770
|
+
if (!isNodeListener(listener)) throw new TypeError(`Invalid Nitro listener exported from ${entryPath}`);
|
|
765
771
|
return {
|
|
766
|
-
listener
|
|
772
|
+
listener,
|
|
767
773
|
websocket: mod.websocket
|
|
768
774
|
};
|
|
769
775
|
}
|