usage-board 2.1.2 → 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.
Files changed (32) hide show
  1. package/dist/index.mjs +10 -4
  2. package/dist/public/_nuxt/{chy2QJx0.js → 7Dy4NLP8.js} +32 -32
  3. package/dist/public/_nuxt/B-VlGWDb.js +21 -0
  4. package/dist/public/_nuxt/{BeEwECnn.js → Be3rizqy.js} +1 -1
  5. package/dist/public/_nuxt/{15CW3D68.js → C0azgqnZ.js} +1 -1
  6. package/dist/public/_nuxt/{B6G-s9D-.js → CMNdiQCa.js} +1 -1
  7. package/dist/public/_nuxt/CPuXQJE_.js +1 -0
  8. package/dist/public/_nuxt/DenksPSi.js +119 -0
  9. package/dist/public/_nuxt/Dkya5WaL.js +9 -0
  10. package/dist/public/_nuxt/HN9OZyaQ.js +25 -0
  11. package/dist/public/_nuxt/{Bu4SpN_a.js → JtK-nXxy.js} +1 -1
  12. package/dist/public/_nuxt/builds/latest.json +1 -1
  13. package/dist/public/_nuxt/builds/meta/37e8bb21-a086-45bf-93dc-47eeeada7299.json +1 -0
  14. package/dist/public/_nuxt/{BeygfM9p.js → y3weNNd-.js} +2 -2
  15. package/dist/server/chunks/_/error-500.mjs +8 -4
  16. package/dist/server/chunks/_/shared.cjs.prod.mjs +1 -1
  17. package/dist/server/chunks/build/client.precomputed.mjs +1 -1
  18. package/dist/server/chunks/nitro/nitro.mjs +8218 -2844
  19. package/dist/server/chunks/routes/api/payload.json.mjs +11 -626
  20. package/dist/server/chunks/routes/api/projects/_project/modules.get.mjs +36 -0
  21. package/dist/server/chunks/routes/api/projects/catalog.get.mjs +26 -0
  22. package/dist/server/chunks/routes/renderer.mjs +9 -5
  23. package/dist/server/chunks/routes/ws.mjs +29 -971
  24. package/dist/server/index.mjs +9 -5
  25. package/package.json +7 -6
  26. package/dist/public/_nuxt/C6ydMk2z.js +0 -25
  27. package/dist/public/_nuxt/Dn8cXZx3.js +0 -9
  28. package/dist/public/_nuxt/DysUC14A.js +0 -119
  29. package/dist/public/_nuxt/KLhV325n.js +0 -1
  30. package/dist/public/_nuxt/builds/meta/ac4b25d6-d6eb-44bb-8c5b-b1d6f651c196.json +0 -1
  31. package/dist/public/_nuxt/pmnAmEjb.js +0 -21
  32. 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 = "2.1.2";
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 mod = await import(resolve(outputDir, "server/index.mjs"));
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: mod.listener ?? mod.middleware ?? mod.handler ?? mod.default,
772
+ listener,
767
773
  websocket: mod.websocket
768
774
  };
769
775
  }