@absolutejs/absolute 0.19.0-beta.1025 → 0.19.0-beta.1027
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-cWWoLG/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-cWWoLG/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-cWWoLG/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
package/dist/cli/index.js
CHANGED
|
@@ -171851,6 +171851,10 @@ import { homedir, tmpdir } from "node:os";
|
|
|
171851
171851
|
import { createHash } from "node:crypto";
|
|
171852
171852
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
171853
171853
|
import { pathToFileURL } from "node:url";
|
|
171854
|
+
// Elysia's WebSocket dispatcher (stateless: routes every event through
|
|
171855
|
+
// ws.data.*). Wiring it into Bun.serve below is what lets compiled servers
|
|
171856
|
+
// serve .ws() routes \u2014 without it every upgrade falls through to a 404.
|
|
171857
|
+
import { websocket as elysiaWebsocket } from "elysia/ws";
|
|
171854
171858
|
|
|
171855
171859
|
const SERVER_MODULE = (runtimeDir: string) => import(pathToFileURL(join(runtimeDir, ${JSON.stringify(serverBundleName)})).href);
|
|
171856
171860
|
const RUNTIME_BUILD_ID = ${JSON.stringify(runtimeBuildId)};
|
|
@@ -172004,6 +172008,14 @@ const resolveRuntimeFetch = async () => {
|
|
|
172004
172008
|
const fetchHandler = runtimeServer?.fetch;
|
|
172005
172009
|
if (typeof fetchHandler !== "function") return null;
|
|
172006
172010
|
|
|
172011
|
+
// Elysia .ws() handlers upgrade via \`context.server ?? app.server\`. The
|
|
172012
|
+
// compiled runtime never calls app.listen() (the networking plugin returns
|
|
172013
|
+
// early when ABSOLUTE_COMPILED_RUNTIME=1), so app.server stays null. Point it
|
|
172014
|
+
// at the live Bun server below so WebSocket upgrades resolve instead of 404ing.
|
|
172015
|
+
if (runtimeServer && typeof runtimeServer === "object") {
|
|
172016
|
+
runtimeServer.server = server;
|
|
172017
|
+
}
|
|
172018
|
+
|
|
172007
172019
|
return fetchHandler.bind(runtimeServer);
|
|
172008
172020
|
};
|
|
172009
172021
|
|
|
@@ -172019,6 +172031,10 @@ const getRuntimeFetch = () => {
|
|
|
172019
172031
|
|
|
172020
172032
|
const server = Bun.serve({
|
|
172021
172033
|
port,
|
|
172034
|
+
// Registering Elysia's WebSocket dispatcher here (plus assigning app.server in
|
|
172035
|
+
// resolveRuntimeFetch) is what makes .ws() routes work in a compiled server \u2014
|
|
172036
|
+
// without it, every upgrade request falls through to the 404 below.
|
|
172037
|
+
websocket: elysiaWebsocket,
|
|
172022
172038
|
async fetch(request) {
|
|
172023
172039
|
const url = new URL(request.url);
|
|
172024
172040
|
|
package/package.json
CHANGED