nucleus-core-ts 0.10.2 → 0.10.3

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/server.d.ts CHANGED
@@ -1,15 +1,21 @@
1
1
  /**
2
2
  * The Elysia-free entry point: `nucleus-core-ts/server`.
3
3
  *
4
- * The package root exports BOTH forms, so its bundle contains the Elysia
5
- * adapter and therefore `import … from "elysia"` — measured, four of them in
6
- * `dist/index.js`. That makes `elysia` an optional peer dependency only on
7
- * paper: an install without it would fail at import time even when the consumer
8
- * never touches the plugin.
4
+ * WHAT THIS IS NOW. It used to say the root bundle contained the Elysia adapter
5
+ * and would fail at import time without `elysia` installed. Neither is true any
6
+ * more — Elysia is gone from the package entirely, `dist/index.js` has zero
7
+ * `from "elysia"` imports, and the root entry imports fine with `elysia` absent
8
+ * from `node_modules`. The sentence outlived the thing it described, and it was
9
+ * the sentence telling consumers the root entry was unsafe.
9
10
  *
10
- * This entry has no adapter in its graph, so an install that uses
11
- * `createNucleusServer` needs neither `elysia` nor `@elysiajs/*`.
12
- * `elysiaFreeGraph.test.ts` bundles it and fails if one appears.
11
+ * What remains true, and is the actual reason to prefer this door: the two
12
+ * bundles are STANDALONE, not shared chunks. A host importing from both carries
13
+ * two independent copies of the module graph — `srv.buildNucleus ===
14
+ * root.buildNucleus` is false — which is the hazard `routeCollector.ts` warns
15
+ * about, where a route silently does not mount. So anything a host needs is
16
+ * exported here, and `decodeHeaderList` is here for exactly that reason: it is
17
+ * documented for host routes, host routes live on this entry, and having it
18
+ * only on the root forced hosts onto both bundles to get it.
13
19
  *
14
20
  * The root keeps exporting everything it always did; nothing here is a
15
21
  * replacement, only a narrower door.
@@ -25,3 +31,4 @@ export { buildOpenApiDocument } from './src/Server/openapi';
25
31
  export { collectRoutes, type RouteCollector } from './src/Server/routeCollector';
26
32
  export type { AnyRoute, Guard, RouteGroup } from './src/Server/router';
27
33
  export { defineWebSocketRoute, type WebSocketRoute } from './src/Server/websocket';
34
+ export { decodeHeaderList } from './src/Utils/headerList';