@almadar/core 10.47.0 → 10.49.0
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/builders.d.ts +3 -3
- package/dist/builders.js +1 -1
- package/dist/builders.js.map +1 -1
- package/dist/{effect-BZDXo4bV.d.ts → effect-DjMRX8sI.d.ts} +56 -24
- package/dist/entityAccess-dYpx6Ipw.d.ts +54 -0
- package/dist/factory/index.d.ts +4 -4
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +1 -1
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +613 -4
- package/dist/index.js.map +1 -1
- package/dist/mock/index.d.ts +4 -4
- package/dist/mock/index.js +19 -1
- package/dist/mock/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +6 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +1306 -5
- package/dist/patterns/index.js +594 -3
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +586 -1
- package/dist/patterns/registry.json +586 -1
- package/dist/{schema-CGoLC-m6.d.ts → schema-1bzTH92n.d.ts} +38 -38
- package/dist/{trait-1OkxYkAr.d.ts → trait-DkMVtmED.d.ts} +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +1 -1
- package/dist/{types-By96RdSM.d.ts → types-CUdqUyzi.d.ts} +2 -2
- package/package.json +2 -2
- package/dist/entityAccess-BGnJSqXD.d.ts +0 -33
package/dist/mock/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as OrbitalSchema } from '../schema-
|
|
2
|
-
export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessTable } from '../entityAccess-
|
|
3
|
-
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-
|
|
4
|
-
import '../trait-
|
|
1
|
+
import { O as OrbitalSchema } from '../schema-1bzTH92n.js';
|
|
2
|
+
export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessTable } from '../entityAccess-dYpx6Ipw.js';
|
|
3
|
+
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-DjMRX8sI.js';
|
|
4
|
+
import '../trait-DkMVtmED.js';
|
|
5
5
|
import '../expression-Yf7qvvOs.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
package/dist/mock/index.js
CHANGED
|
@@ -205,8 +205,12 @@ function inlineEntities2(schema) {
|
|
|
205
205
|
}
|
|
206
206
|
return out;
|
|
207
207
|
}
|
|
208
|
+
function isDeclared(p) {
|
|
209
|
+
return p.read !== void 0 || p.create !== void 0 || p.update !== void 0 || p.delete !== void 0;
|
|
210
|
+
}
|
|
208
211
|
function entityAccessTable(schema) {
|
|
209
212
|
const table = /* @__PURE__ */ new Map();
|
|
213
|
+
const collectionOf = /* @__PURE__ */ new Map();
|
|
210
214
|
for (const def of inlineEntities2(schema)) {
|
|
211
215
|
table.set(def.name, {
|
|
212
216
|
read: def.read_policy,
|
|
@@ -214,6 +218,20 @@ function entityAccessTable(schema) {
|
|
|
214
218
|
update: def.update_policy,
|
|
215
219
|
delete: def.delete_policy
|
|
216
220
|
});
|
|
221
|
+
if (def.collection) collectionOf.set(def.name, def.collection);
|
|
222
|
+
}
|
|
223
|
+
const byCollection = /* @__PURE__ */ new Map();
|
|
224
|
+
for (const [name, policies] of table) {
|
|
225
|
+
const collection = collectionOf.get(name);
|
|
226
|
+
if (collection && isDeclared(policies) && !byCollection.has(collection)) {
|
|
227
|
+
byCollection.set(collection, policies);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
for (const [name, policies] of table) {
|
|
231
|
+
if (isDeclared(policies)) continue;
|
|
232
|
+
const collection = collectionOf.get(name);
|
|
233
|
+
const inherited = collection ? byCollection.get(collection) : void 0;
|
|
234
|
+
if (inherited) table.set(name, { ...inherited });
|
|
217
235
|
}
|
|
218
236
|
return table;
|
|
219
237
|
}
|
|
@@ -526,7 +544,7 @@ var ScenePosSchema = z.object({
|
|
|
526
544
|
y: z.number(),
|
|
527
545
|
z: z.number().optional()
|
|
528
546
|
});
|
|
529
|
-
var CAMERA_MODES = ["isometric", "perspective", "top-down", "follow", "chase"];
|
|
547
|
+
var CAMERA_MODES = ["isometric", "perspective", "top-down", "front", "follow", "chase"];
|
|
530
548
|
var CameraModeSchema = z.enum(CAMERA_MODES);
|
|
531
549
|
z.object({
|
|
532
550
|
pos: ScenePosSchema.optional(),
|