@absolutejs/absolute 0.19.0-beta.1082 → 0.19.0-beta.1084
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-43dkQ5/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-43dkQ5/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-43dkQ5/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
|
@@ -177429,6 +177429,15 @@ const MIME: Record<string, string> = {
|
|
|
177429
177429
|
const getMime = (p: string) =>
|
|
177430
177430
|
MIME[p.substring(p.lastIndexOf("."))] ?? "application/octet-stream";
|
|
177431
177431
|
|
|
177432
|
+
// Content-hashed filenames (hash segment mixes letters AND digits) are safe to
|
|
177433
|
+
// cache forever; stable-named-but-content-variable files (tailwind.generated.css,
|
|
177434
|
+
// vendor bundles) must revalidate so a deploy's changes reach returning visitors.
|
|
177435
|
+
const isFingerprintedAsset = (p: string) => {
|
|
177436
|
+
const base = p.slice(p.lastIndexOf("/") + 1);
|
|
177437
|
+
const hash = base.match(/[.-]([0-9a-z]{6,12})\\.[0-9a-z]+$/i)?.[1];
|
|
177438
|
+
return hash ? /[0-9]/.test(hash) && /[a-z]/i.test(hash) : false;
|
|
177439
|
+
};
|
|
177440
|
+
|
|
177432
177441
|
// \u2500\u2500 Server \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
177433
177442
|
const port = Number(process.env.PORT) || ${DEFAULT_PORT};
|
|
177434
177443
|
|
|
@@ -177607,7 +177616,9 @@ const server = Bun.serve({
|
|
|
177607
177616
|
if (embedded) {
|
|
177608
177617
|
return new Response(Bun.file(embedded), {
|
|
177609
177618
|
headers: {
|
|
177610
|
-
"cache-control":
|
|
177619
|
+
"cache-control": isFingerprintedAsset(url.pathname)
|
|
177620
|
+
? "public, max-age=31536000, immutable"
|
|
177621
|
+
: "public, max-age=0, must-revalidate",
|
|
177611
177622
|
"content-type": getMime(url.pathname),
|
|
177612
177623
|
},
|
|
177613
177624
|
});
|