@absolutejs/absolute 0.20.0-beta.172 → 0.20.0-beta.173
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/CHANGELOG.md +32 -0
- package/README.md +3 -2
- package/changelog.json +57 -0
- package/dist/angular/browser.js +12 -12
- package/dist/angular/browser.js.map +6 -7
- package/dist/angular/components/core/streamingSlotRegistrar.js +2 -6
- package/dist/angular/components/core/streamingSlotRegistry.js +3 -7
- package/dist/angular/components/defer-slot.component.js +12 -7
- package/dist/angular/components/stream-slot.component.js +3 -1
- package/dist/angular/index.js +40 -13
- package/dist/angular/index.js.map +7 -7
- package/dist/angular/server.js +39 -12
- package/dist/angular/server.js.map +6 -6
- package/dist/build/buildWorker.js +135 -57
- package/dist/build.js +1183 -1011
- package/dist/build.js.map +16 -15
- package/dist/cli/config/server.js +43 -12
- package/dist/cli/{doctor-repprx92.js → doctor-m36tmx4d.js} +70 -15
- package/dist/cli/index.js +1 -1
- package/dist/core/streamingSlotRegistrar.js +2 -5
- package/dist/core/streamingSlotRegistrar.js.map +4 -5
- package/dist/core/streamingSlotRegistry.js +2 -5
- package/dist/core/streamingSlotRegistry.js.map +4 -5
- package/dist/dev/serverBootstrap.js +2 -1
- package/dist/index.js +1116 -940
- package/dist/index.js.map +18 -17
- package/dist/islands/index.js +2 -2
- package/dist/islands/index.js.map +3 -3
- package/dist/mobile/browser.js +2 -2
- package/dist/mobile/browser.js.map +3 -3
- package/dist/mobile/index.js +2 -2
- package/dist/mobile/index.js.map +3 -3
- package/dist/react/components/index.js +2 -5
- package/dist/react/components/index.js.map +5 -6
- package/dist/react/index.js +45 -16
- package/dist/react/index.js.map +8 -8
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +45 -16
- package/dist/react/server.js.map +8 -8
- package/dist/src/angular/components/defer-slot.component.d.ts +1 -0
- package/dist/src/build/missingReactRouter.d.ts +8 -0
- package/dist/src/build/vueModuleOutputPath.d.ts +10 -6
- package/dist/src/cli/scripts/doctor.d.ts +10 -0
- package/dist/src/core/streamingSlotWarningScope.d.ts +3 -0
- package/dist/src/dev/hot/reload.d.ts +5 -0
- package/dist/src/dev/hot/runtime.d.ts +2 -0
- package/dist/src/dev/srcPath.d.ts +2 -1
- package/dist/src/react/pageHandler.d.ts +5 -0
- package/dist/src/react/router/Link.d.ts +6 -1
- package/dist/src/react/serverComponents/pageHandler.d.ts +2 -0
- package/dist/src/utils/portInUse.d.ts +16 -0
- package/dist/svelte/index.js +39 -12
- package/dist/svelte/index.js.map +6 -6
- package/dist/svelte/server.js +39 -12
- package/dist/svelte/server.js.map +6 -6
- package/dist/vue/components/index.js +2 -5
- package/dist/vue/components/index.js.map +4 -5
- package/dist/vue/index.js +39 -12
- package/dist/vue/index.js.map +6 -6
- package/dist/vue/server.js +39 -12
- package/dist/vue/server.js.map +6 -6
- package/package.json +1 -1
|
@@ -46249,8 +46249,9 @@ var readCspNonce = () => {
|
|
|
46249
46249
|
|
|
46250
46250
|
// src/utils/runtimeMode.ts
|
|
46251
46251
|
var ENV_VAR = "NODE_ENV";
|
|
46252
|
-
var
|
|
46253
|
-
var
|
|
46252
|
+
var readEnv = () => typeof process === "undefined" ? undefined : process.env?.[ENV_VAR];
|
|
46253
|
+
var isDevelopmentRuntime = () => readEnv() === "development";
|
|
46254
|
+
var isProductionRuntime = () => readEnv() === "production";
|
|
46254
46255
|
|
|
46255
46256
|
// src/utils/escapeScriptContent.ts
|
|
46256
46257
|
var ESCAPE_LOOKUP = {
|
|
@@ -46388,15 +46389,30 @@ var warnIfBootstrapMissing = (manifest) => {
|
|
|
46388
46389
|
warnedMissingBootstrap = true;
|
|
46389
46390
|
logWarn("A page contains islands, but the build manifest has no islands bootstrap, so they will render without hydrating. Set `islands.registry` in absolute.config.ts (a default bootstrap is generated from it) or point `islands.bootstrap` at a file that calls startIslands().");
|
|
46390
46391
|
};
|
|
46391
|
-
var
|
|
46392
|
+
var MANIFEST_BUILD_DIR_KEY = Symbol.for("absolutejs.islandManifestBuildDir");
|
|
46393
|
+
var getManifestBuildDir = () => {
|
|
46394
|
+
const value = Reflect.get(globalThis, MANIFEST_BUILD_DIR_KEY);
|
|
46395
|
+
return typeof value === "string" ? value : undefined;
|
|
46396
|
+
};
|
|
46392
46397
|
var WINDOWS_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]|^\\\\/;
|
|
46398
|
+
var withTrailingSlash = (path) => path.endsWith("/") ? path : `${path}/`;
|
|
46399
|
+
var currentWorkingRoot = () => {
|
|
46400
|
+
try {
|
|
46401
|
+
return withTrailingSlash(process.cwd().replaceAll("\\", "/"));
|
|
46402
|
+
} catch {
|
|
46403
|
+
return;
|
|
46404
|
+
}
|
|
46405
|
+
};
|
|
46393
46406
|
var isServerFilePath = (value) => {
|
|
46394
46407
|
if (WINDOWS_ABSOLUTE_PATH.test(value))
|
|
46395
46408
|
return true;
|
|
46396
|
-
|
|
46397
|
-
|
|
46398
|
-
|
|
46399
|
-
|
|
46409
|
+
const buildDir = getManifestBuildDir();
|
|
46410
|
+
if (buildDir && value.startsWith(withTrailingSlash(buildDir)))
|
|
46411
|
+
return true;
|
|
46412
|
+
const root = currentWorkingRoot();
|
|
46413
|
+
if (root && root !== "/" && value.startsWith(root))
|
|
46414
|
+
return true;
|
|
46415
|
+
return false;
|
|
46400
46416
|
};
|
|
46401
46417
|
var toBrowserManifest = (manifest) => {
|
|
46402
46418
|
const browserManifest = {};
|
|
@@ -48051,7 +48067,11 @@ var extractCallsiteFromStack = (stack) => {
|
|
|
48051
48067
|
`).slice(1).map((line) => line.trim()).filter((frame) => !shouldIgnoreWarningFrame(frame)).map((frame) => getWarningLocation(frame)).find((frameLocation) => frameLocation !== undefined);
|
|
48052
48068
|
return location ? normalizeCallsitePath(location) : undefined;
|
|
48053
48069
|
};
|
|
48054
|
-
var buildMissingCollectorWarning = (primitiveName,
|
|
48070
|
+
var buildMissingCollectorWarning = (primitiveName, { explicitlyDisabled, handlerCallsite }) => {
|
|
48071
|
+
const fix = explicitlyDisabled ? "This page handler sets { collectStreamingSlots: false }, so the slot stays on its fallback and never streams. Remove the option (or set it to true) to stream this route." : "The slot stays on its fallback and never streams. Add { collectStreamingSlots: true } to this page handler to enable out-of-order streaming for this route.";
|
|
48072
|
+
return `${primitiveName} rendered during SSR without streaming slot collection enabled. ${fix}${handlerCallsite ? ` Update ${formatWarningCallsite(handlerCallsite)}.` : ""}`;
|
|
48073
|
+
};
|
|
48074
|
+
var productionWarnings = new Set;
|
|
48055
48075
|
setStreamingSlotWarningController({
|
|
48056
48076
|
maybeWarn: (primitiveName) => {
|
|
48057
48077
|
const store = getWarningStorage()?.getStore();
|
|
@@ -48059,7 +48079,13 @@ setStreamingSlotWarningController({
|
|
|
48059
48079
|
return;
|
|
48060
48080
|
}
|
|
48061
48081
|
store.hasWarned = true;
|
|
48062
|
-
|
|
48082
|
+
const message = buildMissingCollectorWarning(primitiveName, store);
|
|
48083
|
+
if (isProductionRuntime()) {
|
|
48084
|
+
if (productionWarnings.has(message))
|
|
48085
|
+
return;
|
|
48086
|
+
productionWarnings.add(message);
|
|
48087
|
+
}
|
|
48088
|
+
logWarn(message);
|
|
48063
48089
|
}
|
|
48064
48090
|
});
|
|
48065
48091
|
var captureStreamingSlotWarningCallsite = () => {
|
|
@@ -48072,7 +48098,11 @@ var captureStreamingSlotWarningCallsite = () => {
|
|
|
48072
48098
|
}
|
|
48073
48099
|
return extractCallsiteFromStack(stack);
|
|
48074
48100
|
};
|
|
48075
|
-
var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage().run({
|
|
48101
|
+
var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage().run({
|
|
48102
|
+
explicitlyDisabled: metadata?.explicitlyDisabled === true,
|
|
48103
|
+
handlerCallsite: metadata?.handlerCallsite,
|
|
48104
|
+
hasWarned: false
|
|
48105
|
+
}, task);
|
|
48076
48106
|
|
|
48077
48107
|
// src/utils/stringModifiers.ts
|
|
48078
48108
|
var normalizeSlug = (str) => str.trim().replace(/\s+/g, "-").replace(/[^A-Za-z0-9\-_]+/g, "").replace(/[-_]{2,}/g, "-");
|
|
@@ -48538,7 +48568,8 @@ var handleReactPageRequest = async (input) => {
|
|
|
48538
48568
|
const spaNotFound = await renderSpaNotFound("react", pageName, request);
|
|
48539
48569
|
if (spaNotFound)
|
|
48540
48570
|
return withPageCacheHeaders(spaNotFound, request);
|
|
48541
|
-
const
|
|
48571
|
+
const collectStreamingSlots = options?.collectStreamingSlots !== false;
|
|
48572
|
+
const handlerCallsite = collectStreamingSlots ? undefined : getCurrentRouteRegistrationCallsite() ?? captureStreamingSlotWarningCallsite();
|
|
48542
48573
|
const renderPageResponse = async () => {
|
|
48543
48574
|
const { createElement } = await Promise.resolve().then(() => __toESM(require_react()));
|
|
48544
48575
|
const { renderToReadableStream } = await Promise.resolve().then(() => __toESM((init_server_bun(), exports_server_bun)));
|
|
@@ -48564,7 +48595,7 @@ var handleReactPageRequest = async (input) => {
|
|
|
48564
48595
|
headers: streamingPageHeaders()
|
|
48565
48596
|
});
|
|
48566
48597
|
};
|
|
48567
|
-
const pageResponse = await runWithStreamingSlotWarningScope(() =>
|
|
48598
|
+
const pageResponse = await runWithStreamingSlotWarningScope(() => collectStreamingSlots ? withRegisteredStreamingSlots(renderPageResponse, options) : renderPageResponse(), { explicitlyDisabled: !collectStreamingSlots, handlerCallsite });
|
|
48568
48599
|
return withPageCacheHeaders(pageResponse, request, {
|
|
48569
48600
|
bufferStreamForEtag: input.bufferStreamForEtag
|
|
48570
48601
|
});
|
|
@@ -14,15 +14,70 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
isRecord
|
|
16
16
|
} from "./index-tx0kx9zx.js";
|
|
17
|
-
import {
|
|
18
|
-
scanListeners
|
|
19
|
-
} from "./index-x8x0f3ha.js";
|
|
20
17
|
|
|
21
18
|
// src/cli/scripts/doctor.ts
|
|
22
19
|
import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
23
20
|
import { createRequire as createRequire2 } from "module";
|
|
24
21
|
import { join as join2 } from "path";
|
|
25
22
|
|
|
23
|
+
// src/utils/portInUse.ts
|
|
24
|
+
import { spawnSync } from "child_process";
|
|
25
|
+
import { createConnection, createServer } from "net";
|
|
26
|
+
var CONNECT_TIMEOUT_MS = 300;
|
|
27
|
+
var IPV4_LOOPBACK = "127.0.0.1";
|
|
28
|
+
var IPV6_LOOPBACK = "::1";
|
|
29
|
+
var IPV4_ANY = "0.0.0.0";
|
|
30
|
+
var IPV6_ANY = "::";
|
|
31
|
+
var acceptsConnection = (port, host) => new Promise((resolve) => {
|
|
32
|
+
const socket = createConnection({ host, port });
|
|
33
|
+
const finish = (accepted) => {
|
|
34
|
+
clearTimeout(timer);
|
|
35
|
+
socket.removeAllListeners();
|
|
36
|
+
socket.on("error", () => {
|
|
37
|
+
return;
|
|
38
|
+
});
|
|
39
|
+
socket.destroy();
|
|
40
|
+
resolve(accepted);
|
|
41
|
+
};
|
|
42
|
+
const timer = setTimeout(() => finish(false), CONNECT_TIMEOUT_MS);
|
|
43
|
+
socket.once("connect", () => finish(true));
|
|
44
|
+
socket.once("error", () => finish(false));
|
|
45
|
+
});
|
|
46
|
+
var bindConflicts = (port, host, ipv6Only) => new Promise((resolve) => {
|
|
47
|
+
const server = createServer();
|
|
48
|
+
server.unref();
|
|
49
|
+
server.once("error", (error) => {
|
|
50
|
+
server.close(() => {
|
|
51
|
+
return;
|
|
52
|
+
});
|
|
53
|
+
resolve(error.code === "EADDRINUSE");
|
|
54
|
+
});
|
|
55
|
+
server.listen({ exclusive: true, host, ipv6Only, port }, () => {
|
|
56
|
+
server.close(() => resolve(false));
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
var isPortInUse = async (port) => {
|
|
60
|
+
if (await acceptsConnection(port, IPV4_LOOPBACK))
|
|
61
|
+
return true;
|
|
62
|
+
if (await acceptsConnection(port, IPV6_LOOPBACK))
|
|
63
|
+
return true;
|
|
64
|
+
if (await bindConflicts(port, IPV4_ANY, false))
|
|
65
|
+
return true;
|
|
66
|
+
return bindConflicts(port, IPV6_ANY, true);
|
|
67
|
+
};
|
|
68
|
+
var portListenerPids = (port) => {
|
|
69
|
+
try {
|
|
70
|
+
const result = spawnSync("lsof", ["-nP", "-t", `-iTCP:${port}`, "-sTCP:LISTEN"], { encoding: "utf-8", timeout: 2000 });
|
|
71
|
+
const output = typeof result.stdout === "string" ? result.stdout : "";
|
|
72
|
+
return [
|
|
73
|
+
...new Set(output.split(`
|
|
74
|
+
`).map(Number).filter((pid) => Number.isInteger(pid) && pid > 0 && pid !== process.pid))
|
|
75
|
+
];
|
|
76
|
+
} catch {
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
26
81
|
// src/cli/typeGraphCoherence.ts
|
|
27
82
|
import {
|
|
28
83
|
existsSync,
|
|
@@ -312,15 +367,18 @@ var envCheck = async () => {
|
|
|
312
367
|
}
|
|
313
368
|
return check("fail", "Env vars", `missing ${missing.map((entry) => entry.key).join(", ")}`);
|
|
314
369
|
};
|
|
315
|
-
var devPort = (config) => {
|
|
316
|
-
const dev = Reflect.get(config, "dev");
|
|
317
|
-
const
|
|
318
|
-
return typeof
|
|
370
|
+
var devPort = (config, env = process.env) => {
|
|
371
|
+
const dev = config ? Reflect.get(config, "dev") : undefined;
|
|
372
|
+
const configured = dev && typeof dev === "object" ? Reflect.get(dev, "port") : undefined;
|
|
373
|
+
return Number(env.ABSOLUTE_PORT) || Number(env.PORT) || (typeof configured === "number" && configured > 0 ? configured : DEFAULT_PORT);
|
|
319
374
|
};
|
|
320
|
-
var portCheck = async (config) => {
|
|
321
|
-
const port = devPort(config);
|
|
322
|
-
|
|
323
|
-
|
|
375
|
+
var portCheck = async (config, env = process.env) => {
|
|
376
|
+
const port = devPort(config, env);
|
|
377
|
+
if (!await isPortInUse(port)) {
|
|
378
|
+
return check("ok", "Dev port", `${port} free`);
|
|
379
|
+
}
|
|
380
|
+
const pids = portListenerPids(port);
|
|
381
|
+
return check("warn", "Dev port", pids.length > 0 ? `${port} in use by pid ${pids.join(", ")}` : `${port} in use`);
|
|
324
382
|
};
|
|
325
383
|
var typeGraphCheck = () => {
|
|
326
384
|
const report = typeGraphCoherence.inspectTypeGraph(process.cwd());
|
|
@@ -364,10 +422,7 @@ ${colors.dim}${checks.length} checks \xB7 ${colors.reset}${summary}${colors.dim}
|
|
|
364
422
|
var gatherChecks = async () => {
|
|
365
423
|
const config = await loadConfigOrNull();
|
|
366
424
|
const configCheck = config === null ? check("fail", "Config", "absolute.config.ts not found or invalid") : check("ok", "Config", "absolute.config.ts loaded");
|
|
367
|
-
const [env, port] = await Promise.all([
|
|
368
|
-
envCheck(),
|
|
369
|
-
config === null ? check("warn", "Dev port", "skipped (no config)") : portCheck(config)
|
|
370
|
-
]);
|
|
425
|
+
const [env, port] = await Promise.all([envCheck(), portCheck(config)]);
|
|
371
426
|
return [
|
|
372
427
|
checkBun(),
|
|
373
428
|
checkAbsolute(),
|
package/dist/cli/index.js
CHANGED
|
@@ -176,7 +176,7 @@ if (command === "dev") {
|
|
|
176
176
|
await runLogs(args);
|
|
177
177
|
} else if (command === "doctor") {
|
|
178
178
|
sendTelemetryEvent("cli:command", { command: "doctor" });
|
|
179
|
-
const { runDoctor } = await import("./doctor-
|
|
179
|
+
const { runDoctor } = await import("./doctor-m36tmx4d.js");
|
|
180
180
|
await runDoctor(args);
|
|
181
181
|
} else if (command === "routes") {
|
|
182
182
|
sendTelemetryEvent("cli:command", { command: "routes" });
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// src/utils/runtimeMode.ts
|
|
3
|
-
var ENV_VAR = "NODE_ENV", getNodeEnv = () => process.env[ENV_VAR], isDevelopmentRuntime = () => process.env[ENV_VAR] === "development", isProductionRuntime = () => process.env[ENV_VAR] === "production";
|
|
4
|
-
|
|
5
2
|
// src/core/streamingSlotRegistrar.ts
|
|
6
3
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
7
4
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
@@ -43,7 +40,7 @@ var setStreamingSlotWarningController = (controller) => {
|
|
|
43
40
|
Reflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);
|
|
44
41
|
};
|
|
45
42
|
var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
46
|
-
if (
|
|
43
|
+
if (isStreamingSlotCollectionActive()) {
|
|
47
44
|
return;
|
|
48
45
|
}
|
|
49
46
|
getWarningController()?.maybeWarn(primitiveName);
|
|
@@ -58,5 +55,5 @@ export {
|
|
|
58
55
|
warnMissingStreamingSlotCollector
|
|
59
56
|
};
|
|
60
57
|
|
|
61
|
-
//# debugId=
|
|
58
|
+
//# debugId=B814AB4D54EB8FE164756E2164756E21
|
|
62
59
|
//# sourceMappingURL=streamingSlotRegistrar.js.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/
|
|
3
|
+
"sources": ["../src/core/streamingSlotRegistrar.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"
|
|
6
|
-
"import { isProductionRuntime } from '../utils/runtimeMode';\nimport type { StreamingSlot } from '../utils/streamingSlots';\n\ntype StreamingSlotRegistrar = (slot: StreamingSlot) => void;\ntype StreamingSlotWarningController = {\n\tmaybeWarn(primitiveName: string): void;\n};\ntype StreamingSlotCollectionController = {\n\tisCollecting(): boolean;\n};\n\nconst STREAMING_SLOT_REGISTRAR_KEY = Symbol.for(\n\t'absolutejs.streamingSlotRegistrar'\n);\nconst STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotWarningController'\n);\nconst STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotCollectionController'\n);\n\nconst getRegisteredStreamingSlotRegistrar = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_REGISTRAR_KEY);\n\tif (typeof value === 'function' || value === null) {\n\t\treturn value;\n\t}\n\n\treturn undefined;\n};\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isStreamingSlotWarningController = (\n\tvalue: unknown\n): value is StreamingSlotWarningController =>\n\tisObjectRecord(value) &&\n\t'maybeWarn' in value &&\n\ttypeof value.maybeWarn === 'function';\n\nconst isStreamingSlotCollectionController = (\n\tvalue: unknown\n): value is StreamingSlotCollectionController =>\n\tisObjectRecord(value) &&\n\t'isCollecting' in value &&\n\ttypeof value.isCollecting === 'function';\n\nconst getWarningController = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotWarningController(value) ? value : undefined;\n};\n\nconst getCollectionController = () => {\n\tconst value = Reflect.get(\n\t\tglobalThis,\n\t\tSTREAMING_SLOT_COLLECTION_STORAGE_KEY\n\t);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotCollectionController(value) ? value : undefined;\n};\n\nexport const hasRegisteredStreamingSlotRegistrar = () =>\n\ttypeof getRegisteredStreamingSlotRegistrar() === 'function';\nexport const isStreamingSlotCollectionActive = () =>\n\tgetCollectionController()?.isCollecting() === true;\nexport const registerStreamingSlot = (slot: StreamingSlot) => {\n\tgetRegisteredStreamingSlotRegistrar()?.(slot);\n};\nexport const setStreamingSlotCollectionController = (\n\tcontroller: StreamingSlotCollectionController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_COLLECTION_STORAGE_KEY, controller);\n};\nexport const setStreamingSlotRegistrar = (\n\tnextRegistrar: StreamingSlotRegistrar | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_REGISTRAR_KEY, nextRegistrar);\n};\nexport const setStreamingSlotWarningController = (\n\tcontroller: StreamingSlotWarningController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);\n};\nexport const warnMissingStreamingSlotCollector = (primitiveName: string) => {\n\tif (isProductionRuntime() || isStreamingSlotCollectionActive()) {\n\t\treturn;\n\t}\n\n\tgetWarningController()?.maybeWarn(primitiveName);\n};\n"
|
|
5
|
+
"import type { StreamingSlot } from '../utils/streamingSlots';\n\ntype StreamingSlotRegistrar = (slot: StreamingSlot) => void;\ntype StreamingSlotWarningController = {\n\tmaybeWarn(primitiveName: string): void;\n};\ntype StreamingSlotCollectionController = {\n\tisCollecting(): boolean;\n};\n\nconst STREAMING_SLOT_REGISTRAR_KEY = Symbol.for(\n\t'absolutejs.streamingSlotRegistrar'\n);\nconst STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotWarningController'\n);\nconst STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotCollectionController'\n);\n\nconst getRegisteredStreamingSlotRegistrar = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_REGISTRAR_KEY);\n\tif (typeof value === 'function' || value === null) {\n\t\treturn value;\n\t}\n\n\treturn undefined;\n};\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isStreamingSlotWarningController = (\n\tvalue: unknown\n): value is StreamingSlotWarningController =>\n\tisObjectRecord(value) &&\n\t'maybeWarn' in value &&\n\ttypeof value.maybeWarn === 'function';\n\nconst isStreamingSlotCollectionController = (\n\tvalue: unknown\n): value is StreamingSlotCollectionController =>\n\tisObjectRecord(value) &&\n\t'isCollecting' in value &&\n\ttypeof value.isCollecting === 'function';\n\nconst getWarningController = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotWarningController(value) ? value : undefined;\n};\n\nconst getCollectionController = () => {\n\tconst value = Reflect.get(\n\t\tglobalThis,\n\t\tSTREAMING_SLOT_COLLECTION_STORAGE_KEY\n\t);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotCollectionController(value) ? value : undefined;\n};\n\nexport const hasRegisteredStreamingSlotRegistrar = () =>\n\ttypeof getRegisteredStreamingSlotRegistrar() === 'function';\nexport const isStreamingSlotCollectionActive = () =>\n\tgetCollectionController()?.isCollecting() === true;\nexport const registerStreamingSlot = (slot: StreamingSlot) => {\n\tgetRegisteredStreamingSlotRegistrar()?.(slot);\n};\nexport const setStreamingSlotCollectionController = (\n\tcontroller: StreamingSlotCollectionController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_COLLECTION_STORAGE_KEY, controller);\n};\nexport const setStreamingSlotRegistrar = (\n\tnextRegistrar: StreamingSlotRegistrar | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_REGISTRAR_KEY, nextRegistrar);\n};\nexport const setStreamingSlotWarningController = (\n\tcontroller: StreamingSlotWarningController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);\n};\n/* Warns in production too: a slot that silently stays on its fallback is\n * worse there. The controller logs each distinct warning once per process\n * in production. */\nexport const warnMissingStreamingSlotCollector = (primitiveName: string) => {\n\tif (isStreamingSlotCollectionActive()) {\n\t\treturn;\n\t}\n\n\tgetWarningController()?.maybeWarn(primitiveName);\n};\n"
|
|
7
6
|
],
|
|
8
|
-
"mappings": ";;
|
|
9
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;AAUA,IAAM,+BAA+B,OAAO,IAC3C,mCACD;AACA,IAAM,qCAAqC,OAAO,IACjD,2CACD;AACA,IAAM,wCAAwC,OAAO,IACpD,8CACD;AAEA,IAAM,sCAAsC,MAAM;AAAA,EACjD,MAAM,QAAQ,QAAQ,IAAI,YAAY,4BAA4B;AAAA,EA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qB,GAAG,UAAU,aAAa;AAAA;",
|
|
8
|
+
"debugId": "B814AB4D54EB8FE164756E2164756E21",
|
|
10
9
|
"names": []
|
|
11
10
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// src/utils/runtimeMode.ts
|
|
3
|
-
var ENV_VAR = "NODE_ENV", getNodeEnv = () => process.env[ENV_VAR], isDevelopmentRuntime = () => process.env[ENV_VAR] === "development", isProductionRuntime = () => process.env[ENV_VAR] === "production";
|
|
4
|
-
|
|
5
2
|
// src/core/streamingSlotRegistrar.ts
|
|
6
3
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
7
4
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
@@ -43,7 +40,7 @@ var setStreamingSlotWarningController = (controller) => {
|
|
|
43
40
|
Reflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);
|
|
44
41
|
};
|
|
45
42
|
var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
46
|
-
if (
|
|
43
|
+
if (isStreamingSlotCollectionActive()) {
|
|
47
44
|
return;
|
|
48
45
|
}
|
|
49
46
|
getWarningController()?.maybeWarn(primitiveName);
|
|
@@ -114,5 +111,5 @@ export {
|
|
|
114
111
|
runWithStreamingSlotRegistry
|
|
115
112
|
};
|
|
116
113
|
|
|
117
|
-
//# debugId=
|
|
114
|
+
//# debugId=0132C30F715579BD64756E2164756E21
|
|
118
115
|
//# sourceMappingURL=streamingSlotRegistry.js.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/
|
|
3
|
+
"sources": ["../src/core/streamingSlotRegistrar.ts", "../src/core/streamingSlotRegistry.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"
|
|
6
|
-
"import { isProductionRuntime } from '../utils/runtimeMode';\nimport type { StreamingSlot } from '../utils/streamingSlots';\n\ntype StreamingSlotRegistrar = (slot: StreamingSlot) => void;\ntype StreamingSlotWarningController = {\n\tmaybeWarn(primitiveName: string): void;\n};\ntype StreamingSlotCollectionController = {\n\tisCollecting(): boolean;\n};\n\nconst STREAMING_SLOT_REGISTRAR_KEY = Symbol.for(\n\t'absolutejs.streamingSlotRegistrar'\n);\nconst STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotWarningController'\n);\nconst STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotCollectionController'\n);\n\nconst getRegisteredStreamingSlotRegistrar = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_REGISTRAR_KEY);\n\tif (typeof value === 'function' || value === null) {\n\t\treturn value;\n\t}\n\n\treturn undefined;\n};\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isStreamingSlotWarningController = (\n\tvalue: unknown\n): value is StreamingSlotWarningController =>\n\tisObjectRecord(value) &&\n\t'maybeWarn' in value &&\n\ttypeof value.maybeWarn === 'function';\n\nconst isStreamingSlotCollectionController = (\n\tvalue: unknown\n): value is StreamingSlotCollectionController =>\n\tisObjectRecord(value) &&\n\t'isCollecting' in value &&\n\ttypeof value.isCollecting === 'function';\n\nconst getWarningController = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotWarningController(value) ? value : undefined;\n};\n\nconst getCollectionController = () => {\n\tconst value = Reflect.get(\n\t\tglobalThis,\n\t\tSTREAMING_SLOT_COLLECTION_STORAGE_KEY\n\t);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotCollectionController(value) ? value : undefined;\n};\n\nexport const hasRegisteredStreamingSlotRegistrar = () =>\n\ttypeof getRegisteredStreamingSlotRegistrar() === 'function';\nexport const isStreamingSlotCollectionActive = () =>\n\tgetCollectionController()?.isCollecting() === true;\nexport const registerStreamingSlot = (slot: StreamingSlot) => {\n\tgetRegisteredStreamingSlotRegistrar()?.(slot);\n};\nexport const setStreamingSlotCollectionController = (\n\tcontroller: StreamingSlotCollectionController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_COLLECTION_STORAGE_KEY, controller);\n};\nexport const setStreamingSlotRegistrar = (\n\tnextRegistrar: StreamingSlotRegistrar | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_REGISTRAR_KEY, nextRegistrar);\n};\nexport const setStreamingSlotWarningController = (\n\tcontroller: StreamingSlotWarningController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);\n};\nexport const warnMissingStreamingSlotCollector = (primitiveName: string) => {\n\tif (isProductionRuntime() || isStreamingSlotCollectionActive()) {\n\t\treturn;\n\t}\n\n\tgetWarningController()?.maybeWarn(primitiveName);\n};\n",
|
|
5
|
+
"import type { StreamingSlot } from '../utils/streamingSlots';\n\ntype StreamingSlotRegistrar = (slot: StreamingSlot) => void;\ntype StreamingSlotWarningController = {\n\tmaybeWarn(primitiveName: string): void;\n};\ntype StreamingSlotCollectionController = {\n\tisCollecting(): boolean;\n};\n\nconst STREAMING_SLOT_REGISTRAR_KEY = Symbol.for(\n\t'absolutejs.streamingSlotRegistrar'\n);\nconst STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotWarningController'\n);\nconst STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotCollectionController'\n);\n\nconst getRegisteredStreamingSlotRegistrar = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_REGISTRAR_KEY);\n\tif (typeof value === 'function' || value === null) {\n\t\treturn value;\n\t}\n\n\treturn undefined;\n};\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isStreamingSlotWarningController = (\n\tvalue: unknown\n): value is StreamingSlotWarningController =>\n\tisObjectRecord(value) &&\n\t'maybeWarn' in value &&\n\ttypeof value.maybeWarn === 'function';\n\nconst isStreamingSlotCollectionController = (\n\tvalue: unknown\n): value is StreamingSlotCollectionController =>\n\tisObjectRecord(value) &&\n\t'isCollecting' in value &&\n\ttypeof value.isCollecting === 'function';\n\nconst getWarningController = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotWarningController(value) ? value : undefined;\n};\n\nconst getCollectionController = () => {\n\tconst value = Reflect.get(\n\t\tglobalThis,\n\t\tSTREAMING_SLOT_COLLECTION_STORAGE_KEY\n\t);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotCollectionController(value) ? value : undefined;\n};\n\nexport const hasRegisteredStreamingSlotRegistrar = () =>\n\ttypeof getRegisteredStreamingSlotRegistrar() === 'function';\nexport const isStreamingSlotCollectionActive = () =>\n\tgetCollectionController()?.isCollecting() === true;\nexport const registerStreamingSlot = (slot: StreamingSlot) => {\n\tgetRegisteredStreamingSlotRegistrar()?.(slot);\n};\nexport const setStreamingSlotCollectionController = (\n\tcontroller: StreamingSlotCollectionController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_COLLECTION_STORAGE_KEY, controller);\n};\nexport const setStreamingSlotRegistrar = (\n\tnextRegistrar: StreamingSlotRegistrar | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_REGISTRAR_KEY, nextRegistrar);\n};\nexport const setStreamingSlotWarningController = (\n\tcontroller: StreamingSlotWarningController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);\n};\n/* Warns in production too: a slot that silently stays on its fallback is\n * worse there. The controller logs each distinct warning once per process\n * in production. */\nexport const warnMissingStreamingSlotCollector = (primitiveName: string) => {\n\tif (isStreamingSlotCollectionActive()) {\n\t\treturn;\n\t}\n\n\tgetWarningController()?.maybeWarn(primitiveName);\n};\n",
|
|
7
6
|
"import type { StreamingSlot } from '../utils/streamingSlots';\nimport {\n\tsetStreamingSlotCollectionController,\n\tsetStreamingSlotRegistrar\n} from './streamingSlotRegistrar';\n\ntype SlotStore = Map<string, StreamingSlot>;\ntype AsyncLocalStorageType =\n\timport('node:async_hooks').AsyncLocalStorage<SlotStore>;\n\nconst STREAMING_SLOT_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotAsyncLocalStorage'\n);\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isAsyncLocalStorage = (value: unknown): value is AsyncLocalStorageType =>\n\tisObjectRecord(value) &&\n\t'getStore' in value &&\n\ttypeof value.getStore === 'function' &&\n\t'run' in value &&\n\ttypeof value.run === 'function';\n\nconst getStorageGlobal = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') {\n\t\treturn value;\n\t}\n\n\treturn isAsyncLocalStorage(value) ? value : undefined;\n};\n\nconst isServerRuntime = () =>\n\ttypeof process !== 'undefined' &&\n\ttypeof process.versions?.node === 'string';\n\nconst ensureAsyncLocalStorage = async () => {\n\tconst storage = getStorageGlobal();\n\tif (typeof storage !== 'undefined') {\n\t\treturn storage;\n\t}\n\tif (!isServerRuntime()) {\n\t\tReflect.set(globalThis, STREAMING_SLOT_STORAGE_KEY, null);\n\n\t\treturn getStorageGlobal();\n\t}\n\n\tconst mod = await import('node:async_hooks');\n\tReflect.set(\n\t\tglobalThis,\n\t\tSTREAMING_SLOT_STORAGE_KEY,\n\t\tnew mod.AsyncLocalStorage<SlotStore>()\n\t);\n\n\treturn getStorageGlobal();\n};\n\nconst getActiveSlotStore = () => {\n\tconst storage = getStorageGlobal();\n\tif (!storage) return undefined;\n\n\treturn storage.getStore();\n};\n\nconst registerStreamingSlot = (slot: StreamingSlot) => {\n\tconst store = getActiveSlotStore();\n\tif (!store) return;\n\tstore.set(slot.id, slot);\n};\n\nsetStreamingSlotRegistrar(registerStreamingSlot);\nsetStreamingSlotCollectionController({\n\tisCollecting: () => getActiveSlotStore() !== undefined\n});\n\nexport const hasActiveStreamingSlotRegistry = () =>\n\tgetActiveSlotStore() !== undefined;\n\nexport const runWithStreamingSlotRegistry = async <T>(\n\ttask: () => Promise<T> | T\n) => {\n\tconst storage = await ensureAsyncLocalStorage();\n\tif (!storage) {\n\t\tconst slots: StreamingSlot[] = [];\n\n\t\treturn {\n\t\t\tresult: await task(),\n\t\t\tslots\n\t\t};\n\t}\n\n\treturn storage.run(new Map<string, StreamingSlot>(), async () => {\n\t\tconst result = await task();\n\t\tconst store = storage.getStore();\n\n\t\treturn {\n\t\t\tresult,\n\t\t\tslots: store ? [...store.values()] : []\n\t\t};\n\t});\n};\n"
|
|
8
7
|
],
|
|
9
|
-
"mappings": ";;
|
|
10
|
-
"debugId": "
|
|
8
|
+
"mappings": ";;AAUA,IAAM,+BAA+B,OAAO,IAC3C,mCACD;AACA,IAAM,qCAAqC,OAAO,IACjD,2CACD;AACA,IAAM,wCAAwC,OAAO,IACpD,8CACD;AAEA,IAAM,sCAAsC,MAAM;AAAA,EACjD,MAAM,QAAQ,QAAQ,IAAI,YAAY,4BAA4B;AAAA,EAClE,IAAI,OAAO,UAAU,cAAc,UAAU,MAAM;AAAA,IAClD,OAAO;AAAA,EACR;AAAA,EAEA;AAAA;AAGD,IAAM,iBAAiB,CAAC,UACvB,QAAQ,KAAK,KAAK,OAAO,UAAU;AAEpC,IAAM,mCAAmC,CACxC,UAEA,eAAe,KAAK,MACpB,eAAe,UACf,OAAO,MAAM,cAAc;AAE5B,IAAM,sCAAsC,CAC3C,UAEA,eAAe,KAAK,MACpB,kBAAkB,UAClB,OAAO,MAAM,iBAAiB;AAE/B,IAAM,uBAAuB,MAAM;AAAA,EAClC,MAAM,QAAQ,QAAQ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AM,KAAK;AAAA,IAC1B,MAAM,QAAQ,QAAQ,SAAS;AAAA,IAE/B,OAAO;AAAA,MACN;AAAA,MACA,OAAO,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;AAAA,IACvC;AAAA,GACA;AAAA;",
|
|
9
|
+
"debugId": "0132C30F715579BD64756E2164756E21",
|
|
11
10
|
"names": []
|
|
12
11
|
}
|
|
@@ -172896,7 +172896,8 @@ var init_install = __esm(() => {
|
|
|
172896
172896
|
|
|
172897
172897
|
// src/utils/runtimeMode.ts
|
|
172898
172898
|
var ENV_VAR = "NODE_ENV";
|
|
172899
|
-
var
|
|
172899
|
+
var readEnv = () => typeof process === "undefined" ? undefined : process.env?.[ENV_VAR];
|
|
172900
|
+
var isDevelopmentRuntime = () => readEnv() === "development";
|
|
172900
172901
|
|
|
172901
172902
|
// src/dev/serverBootstrap.ts
|
|
172902
172903
|
init_constants();
|