full site update

This commit is contained in:
2025-07-24 18:46:24 +02:00
parent bfe2b90d8d
commit 37a6e0ab31
6912 changed files with 540482 additions and 361712 deletions

View File

@@ -1,5 +1,5 @@
import * as devalue from "devalue";
class DataStore {
class ImmutableDataStore {
_collections = /* @__PURE__ */ new Map();
constructor() {
this._collections = /* @__PURE__ */ new Map();
@@ -40,16 +40,16 @@ class DataStore {
try {
const data = await import("astro:data-layer-content");
if (data.default instanceof Map) {
return DataStore.fromMap(data.default);
return ImmutableDataStore.fromMap(data.default);
}
const map = devalue.unflatten(data.default);
return DataStore.fromMap(map);
return ImmutableDataStore.fromMap(map);
} catch {
}
return new DataStore();
return new ImmutableDataStore();
}
static async fromMap(data) {
const store = new DataStore();
const store = new ImmutableDataStore();
store._collections = data;
return store;
}
@@ -59,7 +59,7 @@ function dataStoreSingleton() {
return {
get: async () => {
if (!instance) {
instance = DataStore.fromModule();
instance = ImmutableDataStore.fromModule();
}
return instance;
},
@@ -70,6 +70,6 @@ function dataStoreSingleton() {
}
const globalDataStore = dataStoreSingleton();
export {
DataStore,
ImmutableDataStore,
globalDataStore
};