@absolutejs/absolute 0.19.0-beta.860 → 0.19.0-beta.862
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/index.js
CHANGED
|
@@ -19276,7 +19276,7 @@ var globalCache, getCachedHmrProgram = () => globalCache.__ABSOLUTE_ANGULAR_HMR_
|
|
|
19276
19276
|
return program.compiler.emitHmrUpdateModule(node);
|
|
19277
19277
|
}, encodeHmrComponentId = (absoluteFilePath, className) => {
|
|
19278
19278
|
const projectRel = relative14(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
|
|
19279
|
-
return
|
|
19279
|
+
return `${projectRel}@${className}`;
|
|
19280
19280
|
};
|
|
19281
19281
|
var init_hmrCompiler = __esm(() => {
|
|
19282
19282
|
init_logger();
|
|
@@ -21766,6 +21766,16 @@ var STORE_KEY = "__elysiaStore", getGlobalValue = (key) => Reflect.get(globalThi
|
|
|
21766
21766
|
}
|
|
21767
21767
|
});
|
|
21768
21768
|
}
|
|
21769
|
+
const diskBytes = await tryReadFromBuildDir(hmrState2, pathname);
|
|
21770
|
+
if (diskBytes) {
|
|
21771
|
+
hmrState2.assetStore.set(pathname, diskBytes);
|
|
21772
|
+
return new Response(new Uint8Array(diskBytes).buffer, {
|
|
21773
|
+
headers: {
|
|
21774
|
+
"Cache-Control": "no-store",
|
|
21775
|
+
"Content-Type": getMimeType(pathname)
|
|
21776
|
+
}
|
|
21777
|
+
});
|
|
21778
|
+
}
|
|
21769
21779
|
const aliasedTarget = resolveHashlessAlias(hmrState2, pathname);
|
|
21770
21780
|
if (aliasedTarget) {
|
|
21771
21781
|
return new Response(null, {
|
|
@@ -21777,6 +21787,22 @@ var STORE_KEY = "__elysiaStore", getGlobalValue = (key) => Reflect.get(globalThi
|
|
|
21777
21787
|
});
|
|
21778
21788
|
}
|
|
21779
21789
|
return;
|
|
21790
|
+
}, tryReadFromBuildDir = async (hmrState2, pathname) => {
|
|
21791
|
+
const buildDir = hmrState2.resolvedPaths?.buildDir;
|
|
21792
|
+
if (!buildDir)
|
|
21793
|
+
return null;
|
|
21794
|
+
if (!pathname.startsWith("/"))
|
|
21795
|
+
return null;
|
|
21796
|
+
const { resolve: resolve39, normalize } = await import("path");
|
|
21797
|
+
const candidate = resolve39(buildDir, pathname.slice(1));
|
|
21798
|
+
const normalizedBuild = normalize(buildDir);
|
|
21799
|
+
if (!candidate.startsWith(normalizedBuild))
|
|
21800
|
+
return null;
|
|
21801
|
+
try {
|
|
21802
|
+
return await Bun.file(candidate).bytes();
|
|
21803
|
+
} catch {
|
|
21804
|
+
return null;
|
|
21805
|
+
}
|
|
21780
21806
|
}, HASHLESS_INDEX_PATH_PATTERN, resolveHashlessAlias = (hmrState2, pathname) => {
|
|
21781
21807
|
const match = pathname.match(HASHLESS_INDEX_PATH_PATTERN);
|
|
21782
21808
|
if (!match)
|
|
@@ -30250,5 +30276,5 @@ export {
|
|
|
30250
30276
|
ANGULAR_INIT_TIMEOUT_MS
|
|
30251
30277
|
};
|
|
30252
30278
|
|
|
30253
|
-
//# debugId=
|
|
30279
|
+
//# debugId=380FB8C9BA691CB164756E2164756E21
|
|
30254
30280
|
//# sourceMappingURL=index.js.map
|