@dxos/echo 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65
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/lib/neutral/Annotation.mjs +3 -3
- package/dist/lib/neutral/Database.mjs +4 -4
- package/dist/lib/neutral/Entity.mjs +10 -7
- package/dist/lib/neutral/Err.mjs +1 -1
- package/dist/lib/neutral/Feed.mjs +13 -10
- package/dist/lib/neutral/Filter.mjs +11 -8
- package/dist/lib/neutral/Format.mjs +3 -3
- package/dist/lib/neutral/JsonSchema.mjs +8 -7
- package/dist/lib/neutral/Obj.mjs +11 -8
- package/dist/lib/neutral/Order.mjs +1 -1
- package/dist/lib/neutral/Query.mjs +16 -13
- package/dist/lib/neutral/Ref.mjs +7 -7
- package/dist/lib/neutral/Relation.mjs +12 -9
- package/dist/lib/neutral/SchemaRegistry.mjs +1 -1
- package/dist/lib/neutral/Tag.mjs +13 -10
- package/dist/lib/neutral/Type.mjs +10 -7
- package/dist/lib/neutral/chunk-43Y5DOS6.mjs +396 -0
- package/dist/lib/neutral/chunk-43Y5DOS6.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-GAWKQ5DZ.mjs → chunk-724GQYEN.mjs} +5 -5
- package/dist/lib/neutral/chunk-724GQYEN.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-M2KVTHZM.mjs → chunk-B5OXLWZL.mjs} +10 -10
- package/dist/lib/neutral/chunk-B5OXLWZL.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-T6JEFNP6.mjs → chunk-BNCCGLJN.mjs} +1 -1
- package/dist/lib/neutral/{chunk-T6JEFNP6.mjs.map → chunk-BNCCGLJN.mjs.map} +1 -1
- package/dist/lib/neutral/chunk-BOZZPUXE.mjs +787 -0
- package/dist/lib/neutral/chunk-BOZZPUXE.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ZWKJ4LZJ.mjs → chunk-CIRHIEMW.mjs} +16 -16
- package/dist/lib/neutral/chunk-CIRHIEMW.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-GFNCSK7F.mjs → chunk-DYDJBZEG.mjs} +10 -9
- package/dist/lib/neutral/chunk-DYDJBZEG.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-QXF3LGN2.mjs → chunk-FXEG7EOK.mjs} +5 -3
- package/dist/lib/neutral/chunk-FXEG7EOK.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-DZQSL6RW.mjs → chunk-FZO7LQO7.mjs} +2 -2
- package/dist/lib/neutral/{chunk-DZQSL6RW.mjs.map → chunk-FZO7LQO7.mjs.map} +1 -1
- package/dist/lib/neutral/{chunk-AQP4QKYP.mjs → chunk-KTAWP7GI.mjs} +8 -8
- package/dist/lib/neutral/chunk-KTAWP7GI.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-5ELDDYWE.mjs → chunk-NEGC54NE.mjs} +4 -4
- package/dist/lib/neutral/chunk-NEGC54NE.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-KGV3QIRX.mjs → chunk-NQRLRYJM.mjs} +11 -11
- package/dist/lib/neutral/chunk-NQRLRYJM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ALOGSVBP.mjs → chunk-NXMFBIT5.mjs} +3 -3
- package/dist/lib/neutral/chunk-NXMFBIT5.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-OVUBTQLT.mjs → chunk-OENWMTE6.mjs} +2 -2
- package/dist/lib/neutral/chunk-OENWMTE6.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-T4MPQJ7X.mjs → chunk-RMLF7JOZ.mjs} +6 -6
- package/dist/lib/neutral/chunk-RMLF7JOZ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-F7KMHDPJ.mjs → chunk-SEMVAGBM.mjs} +41 -13
- package/dist/lib/neutral/chunk-SEMVAGBM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-PP4DNUZU.mjs → chunk-TQQZLKB7.mjs} +1541 -2748
- package/dist/lib/neutral/chunk-TQQZLKB7.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-MXQJZCPY.mjs → chunk-UBEZSGXY.mjs} +1 -1
- package/dist/lib/neutral/chunk-UBEZSGXY.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-W7OP5HGZ.mjs → chunk-UFDK26FO.mjs} +6 -6
- package/dist/lib/neutral/chunk-UFDK26FO.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ZTUBYOGB.mjs → chunk-UI6MWK5W.mjs} +1 -1
- package/dist/lib/neutral/chunk-UI6MWK5W.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-O3TZFQCT.mjs → chunk-UTBRYVQC.mjs} +2 -2
- package/dist/lib/neutral/chunk-UTBRYVQC.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-BRJSLACP.mjs → chunk-VA2F47ZC.mjs} +12 -12
- package/dist/lib/neutral/chunk-VA2F47ZC.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-4KG6IGL4.mjs → chunk-WYOKA6AE.mjs} +4 -4
- package/dist/lib/neutral/{chunk-4KG6IGL4.mjs.map → chunk-WYOKA6AE.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-YWXWXIE5.mjs +34 -0
- package/dist/lib/neutral/chunk-YWXWXIE5.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +24 -21
- package/dist/lib/neutral/internal/index.mjs +44 -38
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/testing/index.mjs +35 -31
- package/dist/lib/neutral/testing/index.mjs.map +2 -2
- package/dist/types/src/Annotation.d.ts +3 -3
- package/dist/types/src/Annotation.d.ts.map +1 -1
- package/dist/types/src/Collection.d.ts.map +1 -1
- package/dist/types/src/Database.d.ts +3 -3
- package/dist/types/src/Database.d.ts.map +1 -1
- package/dist/types/src/Dataset.d.ts.map +1 -1
- package/dist/types/src/Entity.d.ts.map +1 -1
- package/dist/types/src/Err.d.ts.map +1 -1
- package/dist/types/src/Feed.d.ts +4 -4
- package/dist/types/src/Feed.d.ts.map +1 -1
- package/dist/types/src/Filter.d.ts.map +1 -1
- package/dist/types/src/Format.d.ts +1 -1
- package/dist/types/src/Format.d.ts.map +1 -1
- package/dist/types/src/Hypergraph.d.ts +6 -1
- package/dist/types/src/Hypergraph.d.ts.map +1 -1
- package/dist/types/src/JsonSchema.d.ts +5 -5
- package/dist/types/src/JsonSchema.d.ts.map +1 -1
- package/dist/types/src/Obj.d.ts +4 -2
- package/dist/types/src/Obj.d.ts.map +1 -1
- package/dist/types/src/Order.d.ts.map +1 -1
- package/dist/types/src/Query.d.ts.map +1 -1
- package/dist/types/src/Ref.d.ts +11 -11
- package/dist/types/src/Ref.d.ts.map +1 -1
- package/dist/types/src/Relation.d.ts +2 -1
- package/dist/types/src/Relation.d.ts.map +1 -1
- package/dist/types/src/SchemaRegistry.d.ts +1 -1
- package/dist/types/src/Tag.d.ts.map +1 -1
- package/dist/types/src/Type.d.ts +12 -11
- package/dist/types/src/Type.d.ts.map +1 -1
- package/dist/types/src/View.d.ts.map +1 -1
- package/dist/types/src/internal/{annotations → Annotation}/annotations.d.ts +23 -2
- package/dist/types/src/internal/Annotation/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/annotations.test.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/index.d.ts +4 -0
- package/dist/types/src/internal/Annotation/index.d.ts.map +1 -0
- package/dist/types/src/internal/{api → Annotation}/sorting.d.ts +1 -1
- package/dist/types/src/internal/Annotation/sorting.d.ts.map +1 -0
- package/dist/types/src/internal/{annotations → Annotation}/util.d.ts +1 -1
- package/dist/types/src/internal/Annotation/util.d.ts.map +1 -0
- package/dist/types/src/internal/{api/entity.d.ts → Entity/api.d.ts} +2 -2
- package/dist/types/src/internal/Entity/api.d.ts.map +1 -0
- package/dist/types/src/internal/{entities → Entity}/entity.d.ts +2 -2
- package/dist/types/src/internal/Entity/entity.d.ts.map +1 -0
- package/dist/types/src/internal/{entities → Entity}/index.d.ts +2 -0
- package/dist/types/src/internal/Entity/index.d.ts.map +1 -0
- package/dist/types/src/internal/{entities → Entity}/model.d.ts +2 -26
- package/dist/types/src/internal/Entity/model.d.ts.map +1 -0
- package/dist/types/src/internal/{entities → Entity}/object.d.ts +2 -2
- package/dist/types/src/internal/Entity/object.d.ts.map +1 -0
- package/dist/types/src/internal/{entities → Entity}/relation.d.ts +3 -30
- package/dist/types/src/internal/Entity/relation.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/util.d.ts.map +1 -0
- package/dist/types/src/internal/{api → Entity}/version.d.ts +1 -1
- package/dist/types/src/internal/Entity/version.d.ts.map +1 -0
- package/dist/types/src/internal/Format/date.d.ts.map +1 -0
- package/dist/types/src/internal/Format/date.test.d.ts.map +1 -0
- package/dist/types/src/internal/Format/format.d.ts.map +1 -0
- package/dist/types/src/internal/Format/format.test.d.ts.map +1 -0
- package/dist/types/src/internal/Format/index.d.ts.map +1 -0
- package/dist/types/src/internal/Format/number.d.ts.map +1 -0
- package/dist/types/src/internal/Format/object.d.ts.map +1 -0
- package/dist/types/src/internal/Format/select.d.ts.map +1 -0
- package/dist/types/src/internal/Format/string.d.ts.map +1 -0
- package/dist/types/src/internal/{formats → Format}/types.d.ts +1 -1
- package/dist/types/src/internal/Format/types.d.ts.map +1 -0
- package/dist/types/src/internal/{json-schema → JsonSchema}/annotations.d.ts +1 -1
- package/dist/types/src/internal/JsonSchema/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/effect-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/index.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/json-schema-normalize.d.ts.map +1 -0
- package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema-type.d.ts +23 -23
- package/dist/types/src/internal/JsonSchema/json-schema-type.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/json-schema.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/json-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/clone.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/common.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/create-object.d.ts +2 -2
- package/dist/types/src/internal/Obj/create-object.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/create-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/deleted.d.ts +1 -1
- package/dist/types/src/internal/Obj/deleted.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/ids.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/index.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/inspect.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/json-serializer.d.ts +12 -5
- package/dist/types/src/internal/Obj/json-serializer.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/json-serializer.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/schema-validator.d.ts +2 -0
- package/dist/types/src/internal/Obj/schema-validator.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/schema-validator.test.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/set-value.d.ts +1 -1
- package/dist/types/src/internal/Obj/set-value.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/set-value.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/snapshot.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/typed-object.d.ts +2 -2
- package/dist/types/src/internal/Obj/typed-object.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/typed-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/Ref/index.d.ts.map +1 -0
- package/dist/types/src/internal/{ref → Ref}/ref-array.d.ts +1 -1
- package/dist/types/src/internal/Ref/ref-array.d.ts.map +1 -0
- package/dist/types/src/internal/{ref → Ref}/ref.d.ts +2 -2
- package/dist/types/src/internal/{ref → Ref}/ref.d.ts.map +1 -1
- package/dist/types/src/internal/Ref/ref.test.d.ts.map +1 -0
- package/dist/types/src/internal/{schema → Type}/compose.d.ts +1 -1
- package/dist/types/src/internal/Type/compose.d.ts.map +1 -0
- package/dist/types/src/internal/Type/compose.test.d.ts.map +1 -0
- package/dist/types/src/internal/{schema → Type}/echo-schema.d.ts +5 -5
- package/dist/types/src/internal/Type/echo-schema.d.ts.map +1 -0
- package/dist/types/src/internal/Type/index.d.ts.map +1 -0
- package/dist/types/src/internal/Type/manipulation.d.ts.map +1 -0
- package/dist/types/src/internal/{schema → Type}/persistent-schema.d.ts +2 -2
- package/dist/types/src/internal/Type/persistent-schema.d.ts.map +1 -0
- package/dist/types/src/internal/{api → common/api}/index.d.ts +0 -4
- package/dist/types/src/internal/common/api/index.d.ts.map +1 -0
- package/dist/types/src/internal/common/api/meta.d.ts.map +1 -0
- package/dist/types/src/internal/common/index.d.ts +4 -0
- package/dist/types/src/internal/common/index.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/change-context.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/change.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/define-hidden-property.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/errors.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/event-batch.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/handler.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/index.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/json-serializer.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/make-object.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/ownership.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/proxy-types.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/proxy-utils.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/reactive-array.d.ts.map +1 -0
- package/dist/types/src/internal/{proxy → common/proxy}/reactive.d.ts +1 -1
- package/dist/types/src/internal/common/proxy/reactive.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/schema-validator.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/symbols.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/typed-handler.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/typed-handler.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/typed-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/base.d.ts.map +1 -0
- package/dist/types/src/internal/{types → common/types}/entity.d.ts +1 -1
- package/dist/types/src/internal/common/types/entity.d.ts.map +1 -0
- package/dist/types/src/internal/{types → common/types}/index.d.ts +1 -0
- package/dist/types/src/internal/common/types/index.d.ts.map +1 -0
- package/dist/types/src/internal/{types → common/types}/meta.d.ts +3 -3
- package/dist/types/src/internal/common/types/meta.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/model-symbols.d.ts +54 -0
- package/dist/types/src/internal/common/types/model-symbols.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/typename.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/version.d.ts.map +1 -0
- package/dist/types/src/internal/index.d.ts +8 -10
- package/dist/types/src/internal/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-schema.d.ts +7 -7
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/src/Annotation.ts +5 -3
- package/src/Collection.ts +3 -1
- package/src/Database.ts +6 -4
- package/src/Dataset.ts +2 -0
- package/src/Entity.ts +3 -0
- package/src/Err.ts +2 -0
- package/src/Feed.ts +8 -5
- package/src/Filter.ts +2 -0
- package/src/Format.ts +1 -1
- package/src/Hypergraph.ts +7 -2
- package/src/JsonSchema.ts +7 -5
- package/src/Obj.test.ts +2 -2
- package/src/Obj.ts +15 -9
- package/src/Order.ts +2 -0
- package/src/Query.test.ts +23 -23
- package/src/Query.ts +4 -2
- package/src/Ref.ts +14 -12
- package/src/Relation.test.ts +2 -2
- package/src/Relation.ts +6 -3
- package/src/SchemaRegistry.ts +1 -1
- package/src/Tag.ts +3 -1
- package/src/Type.ts +14 -11
- package/src/View.ts +4 -2
- package/src/internal/{annotations → Annotation}/annotations.test.ts +6 -6
- package/src/internal/{annotations → Annotation}/annotations.ts +56 -11
- package/src/internal/{annotations → Annotation}/index.ts +1 -0
- package/src/internal/{api → Annotation}/sorting.ts +2 -3
- package/src/internal/{annotations → Annotation}/util.ts +1 -1
- package/src/internal/{api/entity.ts → Entity/api.ts} +4 -2
- package/src/internal/{entities → Entity}/entity.ts +2 -2
- package/src/internal/{entities → Entity}/index.ts +2 -0
- package/src/internal/{entities → Entity}/model.ts +13 -42
- package/src/internal/{entities → Entity}/object.ts +2 -2
- package/src/internal/{entities → Entity}/relation.ts +19 -36
- package/src/internal/{api → Entity}/version.ts +3 -2
- package/src/internal/{formats → Format}/date.test.ts +1 -1
- package/src/internal/{formats → Format}/format.test.ts +1 -1
- package/src/internal/{formats → Format}/types.ts +2 -2
- package/src/internal/{json-schema → JsonSchema}/annotations.ts +3 -3
- package/src/internal/{json-schema → JsonSchema}/json-schema-type.ts +4 -4
- package/src/internal/{json-schema → JsonSchema}/json-schema.test.ts +48 -48
- package/src/internal/{json-schema → JsonSchema}/json-schema.ts +3 -3
- package/src/internal/{object → Obj}/clone.ts +3 -3
- package/src/internal/{object → Obj}/common.ts +2 -2
- package/src/internal/{object → Obj}/create-object.test.ts +4 -4
- package/src/internal/{object → Obj}/create-object.ts +5 -5
- package/src/internal/{object → Obj}/deleted.ts +2 -2
- package/src/internal/{object → Obj}/inspect.ts +2 -2
- package/src/internal/{object → Obj}/json-serializer.test.ts +6 -6
- package/src/internal/{object → Obj}/json-serializer.ts +17 -6
- package/src/internal/{object → Obj}/schema-validator.ts +1 -1
- package/src/internal/{object → Obj}/set-value.ts +2 -2
- package/src/internal/{object → Obj}/snapshot.ts +14 -5
- package/src/internal/{object → Obj}/typed-object.test.ts +3 -3
- package/src/internal/{object → Obj}/typed-object.ts +2 -2
- package/src/internal/{ref → Ref}/ref-array.ts +1 -1
- package/src/internal/{ref → Ref}/ref.test.ts +4 -4
- package/src/internal/{ref → Ref}/ref.ts +3 -3
- package/src/internal/{schema → Type}/compose.test.ts +5 -5
- package/src/internal/{schema → Type}/compose.ts +1 -1
- package/src/internal/{schema → Type}/echo-schema.ts +6 -6
- package/src/internal/{schema → Type}/manipulation.ts +1 -1
- package/src/internal/{schema → Type}/persistent-schema.ts +5 -5
- package/src/internal/{api → common/api}/index.ts +0 -4
- package/src/internal/common/index.ts +7 -0
- package/src/internal/{proxy → common/proxy}/change.test.ts +3 -3
- package/src/internal/{proxy → common/proxy}/handler.test.ts +2 -2
- package/src/internal/{proxy → common/proxy}/json-serializer.ts +6 -3
- package/src/internal/{proxy → common/proxy}/make-object.ts +1 -1
- package/src/internal/{proxy → common/proxy}/reactive.ts +1 -1
- package/src/internal/{proxy → common/proxy}/schema.test.ts +10 -10
- package/src/internal/{proxy → common/proxy}/typed-handler.test.ts +6 -6
- package/src/internal/{proxy → common/proxy}/typed-handler.ts +2 -3
- package/src/internal/{proxy → common/proxy}/typed-object.test.ts +4 -4
- package/src/internal/{types → common/types}/entity.ts +1 -1
- package/src/internal/{types → common/types}/index.ts +1 -0
- package/src/internal/{types → common/types}/meta.ts +1 -1
- package/src/internal/common/types/model-symbols.ts +69 -0
- package/src/internal/index.ts +8 -31
- package/src/testing/api.test.ts +2 -2
- package/src/testing/test-schema.ts +9 -9
- package/dist/lib/neutral/chunk-5ELDDYWE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ALOGSVBP.mjs.map +0 -7
- package/dist/lib/neutral/chunk-AQP4QKYP.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BRJSLACP.mjs.map +0 -7
- package/dist/lib/neutral/chunk-F7KMHDPJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-GAWKQ5DZ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-GFNCSK7F.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KGV3QIRX.mjs.map +0 -7
- package/dist/lib/neutral/chunk-M2KVTHZM.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MXQJZCPY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-O3TZFQCT.mjs.map +0 -7
- package/dist/lib/neutral/chunk-OVUBTQLT.mjs.map +0 -7
- package/dist/lib/neutral/chunk-PP4DNUZU.mjs.map +0 -7
- package/dist/lib/neutral/chunk-QXF3LGN2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-T4MPQJ7X.mjs.map +0 -7
- package/dist/lib/neutral/chunk-W7OP5HGZ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ZTUBYOGB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ZWKJ4LZJ.mjs.map +0 -7
- package/dist/types/src/internal/annotations/annotations.d.ts.map +0 -1
- package/dist/types/src/internal/annotations/annotations.test.d.ts.map +0 -1
- package/dist/types/src/internal/annotations/index.d.ts +0 -3
- package/dist/types/src/internal/annotations/index.d.ts.map +0 -1
- package/dist/types/src/internal/annotations/util.d.ts.map +0 -1
- package/dist/types/src/internal/api/annotations.d.ts +0 -23
- package/dist/types/src/internal/api/annotations.d.ts.map +0 -1
- package/dist/types/src/internal/api/entity.d.ts.map +0 -1
- package/dist/types/src/internal/api/index.d.ts.map +0 -1
- package/dist/types/src/internal/api/meta.d.ts.map +0 -1
- package/dist/types/src/internal/api/sorting.d.ts.map +0 -1
- package/dist/types/src/internal/api/version.d.ts.map +0 -1
- package/dist/types/src/internal/entities/entity.d.ts.map +0 -1
- package/dist/types/src/internal/entities/index.d.ts.map +0 -1
- package/dist/types/src/internal/entities/model.d.ts.map +0 -1
- package/dist/types/src/internal/entities/object.d.ts.map +0 -1
- package/dist/types/src/internal/entities/relation.d.ts.map +0 -1
- package/dist/types/src/internal/entities/util.d.ts.map +0 -1
- package/dist/types/src/internal/formats/date.d.ts.map +0 -1
- package/dist/types/src/internal/formats/date.test.d.ts.map +0 -1
- package/dist/types/src/internal/formats/format.d.ts.map +0 -1
- package/dist/types/src/internal/formats/format.test.d.ts.map +0 -1
- package/dist/types/src/internal/formats/index.d.ts.map +0 -1
- package/dist/types/src/internal/formats/number.d.ts.map +0 -1
- package/dist/types/src/internal/formats/object.d.ts.map +0 -1
- package/dist/types/src/internal/formats/select.d.ts.map +0 -1
- package/dist/types/src/internal/formats/string.d.ts.map +0 -1
- package/dist/types/src/internal/formats/types.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/annotations.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/effect-schema.test.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/index.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/json-schema-normalize.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/json-schema-type.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/json-schema.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/json-schema.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/clone.d.ts.map +0 -1
- package/dist/types/src/internal/object/common.d.ts.map +0 -1
- package/dist/types/src/internal/object/create-object.d.ts.map +0 -1
- package/dist/types/src/internal/object/create-object.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/deleted.d.ts.map +0 -1
- package/dist/types/src/internal/object/ids.d.ts.map +0 -1
- package/dist/types/src/internal/object/index.d.ts.map +0 -1
- package/dist/types/src/internal/object/inspect.d.ts.map +0 -1
- package/dist/types/src/internal/object/json-serializer.d.ts.map +0 -1
- package/dist/types/src/internal/object/json-serializer.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/schema-validator.d.ts +0 -2
- package/dist/types/src/internal/object/schema-validator.d.ts.map +0 -1
- package/dist/types/src/internal/object/schema-validator.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/set-value.d.ts.map +0 -1
- package/dist/types/src/internal/object/set-value.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/snapshot.d.ts.map +0 -1
- package/dist/types/src/internal/object/typed-object.d.ts.map +0 -1
- package/dist/types/src/internal/object/typed-object.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/change-context.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/change.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/define-hidden-property.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/errors.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/event-batch.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/handler.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/index.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/json-serializer.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/make-object.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/ownership.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/proxy-types.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/proxy-utils.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/reactive-array.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/reactive.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/schema-validator.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/schema.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/symbols.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/typed-handler.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/typed-handler.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/typed-object.test.d.ts.map +0 -1
- package/dist/types/src/internal/ref/index.d.ts.map +0 -1
- package/dist/types/src/internal/ref/ref-array.d.ts.map +0 -1
- package/dist/types/src/internal/ref/ref.test.d.ts.map +0 -1
- package/dist/types/src/internal/schema/compose.d.ts.map +0 -1
- package/dist/types/src/internal/schema/compose.test.d.ts.map +0 -1
- package/dist/types/src/internal/schema/echo-schema.d.ts.map +0 -1
- package/dist/types/src/internal/schema/index.d.ts.map +0 -1
- package/dist/types/src/internal/schema/manipulation.d.ts.map +0 -1
- package/dist/types/src/internal/schema/persistent-schema.d.ts.map +0 -1
- package/dist/types/src/internal/types/base.d.ts.map +0 -1
- package/dist/types/src/internal/types/entity.d.ts.map +0 -1
- package/dist/types/src/internal/types/index.d.ts.map +0 -1
- package/dist/types/src/internal/types/meta.d.ts.map +0 -1
- package/dist/types/src/internal/types/typename.d.ts.map +0 -1
- package/dist/types/src/internal/types/version.d.ts.map +0 -1
- package/src/internal/api/annotations.ts +0 -60
- /package/dist/types/src/internal/{annotations → Annotation}/annotations.test.d.ts +0 -0
- /package/dist/types/src/internal/{entities → Entity}/util.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/date.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/date.test.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/format.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/format.test.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/index.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/number.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/object.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/select.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/string.d.ts +0 -0
- /package/dist/types/src/internal/{json-schema → JsonSchema}/effect-schema.test.d.ts +0 -0
- /package/dist/types/src/internal/{json-schema → JsonSchema}/index.d.ts +0 -0
- /package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema-normalize.d.ts +0 -0
- /package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema.d.ts +0 -0
- /package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/clone.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/common.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/create-object.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/ids.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/index.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/inspect.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/json-serializer.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/schema-validator.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/set-value.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/snapshot.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/typed-object.test.d.ts +0 -0
- /package/dist/types/src/internal/{ref → Ref}/index.d.ts +0 -0
- /package/dist/types/src/internal/{ref → Ref}/ref.test.d.ts +0 -0
- /package/dist/types/src/internal/{schema → Type}/compose.test.d.ts +0 -0
- /package/dist/types/src/internal/{schema → Type}/index.d.ts +0 -0
- /package/dist/types/src/internal/{schema → Type}/manipulation.d.ts +0 -0
- /package/dist/types/src/internal/{api → common/api}/meta.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/change-context.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/change.test.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/define-hidden-property.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/errors.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/event-batch.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/handler.test.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/index.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/json-serializer.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/make-object.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/ownership.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/proxy-types.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/proxy-utils.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/reactive-array.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/schema-validator.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/schema.test.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/symbols.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/typed-handler.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/typed-handler.test.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/typed-object.test.d.ts +0 -0
- /package/dist/types/src/internal/{types → common/types}/base.d.ts +0 -0
- /package/dist/types/src/internal/{types → common/types}/typename.d.ts +0 -0
- /package/dist/types/src/internal/{types → common/types}/version.d.ts +0 -0
- /package/src/internal/{entities → Entity}/util.ts +0 -0
- /package/src/internal/{formats → Format}/date.ts +0 -0
- /package/src/internal/{formats → Format}/format.ts +0 -0
- /package/src/internal/{formats → Format}/index.ts +0 -0
- /package/src/internal/{formats → Format}/number.ts +0 -0
- /package/src/internal/{formats → Format}/object.ts +0 -0
- /package/src/internal/{formats → Format}/select.ts +0 -0
- /package/src/internal/{formats → Format}/string.ts +0 -0
- /package/src/internal/{json-schema → JsonSchema}/effect-schema.test.ts +0 -0
- /package/src/internal/{json-schema → JsonSchema}/index.ts +0 -0
- /package/src/internal/{json-schema → JsonSchema}/json-schema-normalize.ts +0 -0
- /package/src/internal/{object → Obj}/ids.ts +0 -0
- /package/src/internal/{object → Obj}/index.ts +0 -0
- /package/src/internal/{object → Obj}/schema-validator.test.ts +0 -0
- /package/src/internal/{object → Obj}/set-value.test.ts +0 -0
- /package/src/internal/{ref → Ref}/index.ts +0 -0
- /package/src/internal/{schema → Type}/index.ts +0 -0
- /package/src/internal/{README.md → common/README.md} +0 -0
- /package/src/internal/{api → common/api}/meta.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/change-context.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/define-hidden-property.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/errors.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/event-batch.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/index.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/ownership.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/proxy-types.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/proxy-utils.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/reactive-array.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/schema-validator.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/symbols.ts +0 -0
- /package/src/internal/{types → common/types}/base.ts +0 -0
- /package/src/internal/{types → common/types}/typename.ts +0 -0
- /package/src/internal/{types → common/types}/version.ts +0 -0
|
@@ -6,13 +6,13 @@ import * as Schema from 'effect/Schema';
|
|
|
6
6
|
import * as SchemaAST from 'effect/SchemaAST';
|
|
7
7
|
import { describe, expect, test } from 'vitest';
|
|
8
8
|
|
|
9
|
-
import { EchoObjectSchema } from '../
|
|
9
|
+
import { EchoObjectSchema } from '../Entity';
|
|
10
10
|
|
|
11
11
|
const Organization = Schema.Struct({
|
|
12
12
|
name: Schema.String,
|
|
13
13
|
}).pipe(
|
|
14
14
|
EchoObjectSchema({
|
|
15
|
-
typename: 'example.
|
|
15
|
+
typename: 'com.example.type.organization',
|
|
16
16
|
version: '0.1.0',
|
|
17
17
|
}),
|
|
18
18
|
);
|
|
@@ -25,7 +25,7 @@ describe('EchoObjectSchema DSL', () => {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
test('static typename accessor', async () => {
|
|
28
|
-
expect(Organization.typename).to.eq('example.
|
|
28
|
+
expect(Organization.typename).to.eq('com.example.type.organization');
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
test('expect schema', async () => {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import type * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { type TypeMeta } from '../
|
|
8
|
-
import { type AnyEntity } from '../types';
|
|
7
|
+
import { type TypeMeta } from '../Annotation';
|
|
8
|
+
import { type AnyEntity } from '../common/types';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Definition for an object type that can be stored in an ECHO database.
|
|
@@ -7,8 +7,8 @@ import { describe, expect, test } from 'vitest';
|
|
|
7
7
|
|
|
8
8
|
import { DXN, ObjectId } from '@dxos/keys';
|
|
9
9
|
|
|
10
|
-
import { EchoObjectSchema, getObjectDXN } from '../
|
|
11
|
-
import { createObject } from '../
|
|
10
|
+
import { EchoObjectSchema, getObjectDXN } from '../Entity';
|
|
11
|
+
import { createObject } from '../Obj';
|
|
12
12
|
|
|
13
13
|
import { Ref, getReferenceAst } from './ref';
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ const Task = Schema.Struct({
|
|
|
16
16
|
title: Schema.optional(Schema.String),
|
|
17
17
|
}).pipe(
|
|
18
18
|
EchoObjectSchema({
|
|
19
|
-
typename: 'example.
|
|
19
|
+
typename: 'com.example.type.task',
|
|
20
20
|
version: '0.1.0',
|
|
21
21
|
}),
|
|
22
22
|
);
|
|
@@ -29,7 +29,7 @@ const Contact = Schema.Struct({
|
|
|
29
29
|
tasks: Schema.Array(Ref(Task)),
|
|
30
30
|
}).pipe(
|
|
31
31
|
EchoObjectSchema({
|
|
32
|
-
typename: 'example.
|
|
32
|
+
typename: 'com.example.type.person',
|
|
33
33
|
version: '0.1.0',
|
|
34
34
|
}),
|
|
35
35
|
);
|
|
@@ -19,9 +19,9 @@ import { assertArgument, invariant } from '@dxos/invariant';
|
|
|
19
19
|
import { DXN, ObjectId } from '@dxos/keys';
|
|
20
20
|
|
|
21
21
|
import * as Database from '../../Database';
|
|
22
|
-
import { ReferenceAnnotationId, getSchemaDXN, getTypeAnnotation, getTypeIdentifierAnnotation } from '../
|
|
23
|
-
import { type JsonSchemaType } from '../
|
|
24
|
-
import type { AnyEntity, AnyProperties } from '../types';
|
|
22
|
+
import { ReferenceAnnotationId, getSchemaDXN, getTypeAnnotation, getTypeIdentifierAnnotation } from '../Annotation';
|
|
23
|
+
import { type JsonSchemaType } from '../JsonSchema';
|
|
24
|
+
import type { AnyEntity, AnyProperties } from '../common/types';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* The `$id` and `$ref` fields for an ECHO reference schema.
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
import { describe, test } from 'vitest';
|
|
7
7
|
|
|
8
|
-
import { FieldPath } from '../
|
|
9
|
-
import { EchoObjectSchema } from '../
|
|
10
|
-
import { FormatAnnotation, TypeFormat } from '../
|
|
11
|
-
import { ECHO_ANNOTATIONS_NS_KEY, toJsonSchema } from '../
|
|
8
|
+
import { FieldPath } from '../Annotation';
|
|
9
|
+
import { EchoObjectSchema } from '../Entity';
|
|
10
|
+
import { FormatAnnotation, TypeFormat } from '../Format';
|
|
11
|
+
import { ECHO_ANNOTATIONS_NS_KEY, toJsonSchema } from '../JsonSchema';
|
|
12
12
|
|
|
13
13
|
import { composeSchema } from './compose';
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@ describe('schema composition', () => {
|
|
|
17
17
|
const BaseType = Schema.Struct({
|
|
18
18
|
name: Schema.String,
|
|
19
19
|
email: Schema.String,
|
|
20
|
-
}).pipe(EchoObjectSchema({ typename: 'example.
|
|
20
|
+
}).pipe(EchoObjectSchema({ typename: 'com.example.person', version: '0.1.0' }));
|
|
21
21
|
|
|
22
22
|
const OverlaySchema = Schema.Struct({
|
|
23
23
|
email: Schema.String.pipe(FieldPath('$.email'), FormatAnnotation.set(TypeFormat.Email)),
|
|
@@ -6,7 +6,7 @@ import type * as Types from 'effect/Types';
|
|
|
6
6
|
|
|
7
7
|
import { invariant } from '@dxos/invariant';
|
|
8
8
|
|
|
9
|
-
import { type JsonSchemaType } from '../
|
|
9
|
+
import { type JsonSchemaType } from '../JsonSchema';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Creates a composite schema from the source and projection schemas.
|
|
@@ -9,11 +9,11 @@ import { invariant } from '@dxos/invariant';
|
|
|
9
9
|
import { type ObjectId } from '@dxos/keys';
|
|
10
10
|
|
|
11
11
|
import type * as Type from '../../Type';
|
|
12
|
-
import { type SchemaMeta, SchemaMetaSymbol, type TypeAnnotation, getTypeAnnotation } from '../
|
|
13
|
-
import { type JsonSchemaType, toEffectSchema, toJsonSchema } from '../
|
|
14
|
-
import { type TypedObject, type TypedObjectPrototype, getSnapshot } from '../
|
|
15
|
-
import { ChangeId } from '../proxy';
|
|
16
|
-
import { EntityKind, SchemaKindId } from '../types';
|
|
12
|
+
import { type SchemaMeta, SchemaMetaSymbol, type TypeAnnotation, getTypeAnnotation } from '../Annotation';
|
|
13
|
+
import { type JsonSchemaType, toEffectSchema, toJsonSchema } from '../JsonSchema';
|
|
14
|
+
import { type TypedObject, type TypedObjectPrototype, getSnapshot } from '../Obj';
|
|
15
|
+
import { ChangeId } from '../common/proxy';
|
|
16
|
+
import { EntityKind, SchemaKindId } from '../common/types';
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
19
|
addFieldsToSchema,
|
|
@@ -178,7 +178,7 @@ const schemaVariance = {
|
|
|
178
178
|
*
|
|
179
179
|
* @example
|
|
180
180
|
* ```ts
|
|
181
|
-
* export class TableType extends Schema.Struct({...}).pipe(Type.object({ typename: 'example.
|
|
181
|
+
* export class TableType extends Schema.Struct({...}).pipe(Type.object({ typename: 'com.example.type.table', version: '0.1.0' })){
|
|
182
182
|
* title: Schema.String,
|
|
183
183
|
* schema: Schema.optional(ref(EchoSchema)),
|
|
184
184
|
* props: Schema.mutable(S.Array(TablePropSchema)),
|
|
@@ -8,7 +8,7 @@ import * as SchemaAST from 'effect/SchemaAST';
|
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { DXN } from '@dxos/keys';
|
|
10
10
|
|
|
11
|
-
import { type TypeAnnotation, TypeAnnotationId, TypeIdentifierAnnotationId } from '../
|
|
11
|
+
import { type TypeAnnotation, TypeAnnotationId, TypeIdentifierAnnotationId } from '../Annotation';
|
|
12
12
|
|
|
13
13
|
// TODO(ZaymonFC): Do this one at a time. This might be dangerous.
|
|
14
14
|
export const addFieldsToSchema = (
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { IconAnnotation } from '../
|
|
8
|
-
import { LabelAnnotation, TypenameSchema, VersionSchema } from '../
|
|
9
|
-
import { EchoObjectSchema } from '../
|
|
10
|
-
import { JsonSchemaType } from '../
|
|
7
|
+
import { IconAnnotation } from '../Annotation';
|
|
8
|
+
import { LabelAnnotation, TypenameSchema, VersionSchema } from '../Annotation';
|
|
9
|
+
import { EchoObjectSchema } from '../Entity';
|
|
10
|
+
import { JsonSchemaType } from '../JsonSchema';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Persistent representation of a schema.
|
|
@@ -20,7 +20,7 @@ export const PersistentSchema = Schema.Struct({
|
|
|
20
20
|
jsonSchema: JsonSchemaType,
|
|
21
21
|
}).pipe(
|
|
22
22
|
EchoObjectSchema({
|
|
23
|
-
typename: 'dxos.
|
|
23
|
+
typename: 'org.dxos.type.schema',
|
|
24
24
|
version: '0.1.0',
|
|
25
25
|
}),
|
|
26
26
|
LabelAnnotation.set(['name']),
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import { describe, test } from 'vitest';
|
|
6
6
|
|
|
7
|
-
import * as Obj from '
|
|
8
|
-
import * as Relation from '
|
|
9
|
-
import { TestSchema } from '
|
|
7
|
+
import * as Obj from '../../../Obj';
|
|
8
|
+
import * as Relation from '../../../Relation';
|
|
9
|
+
import { TestSchema } from '../../../testing';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Tests for Obj.change context enforcement and mutator type safety.
|
|
@@ -8,8 +8,8 @@ import { describe, expect, test } from 'vitest';
|
|
|
8
8
|
|
|
9
9
|
import { isNode } from '@dxos/util';
|
|
10
10
|
|
|
11
|
-
import { TestSchema, updateCounter } from '
|
|
12
|
-
import { createObject } from '
|
|
11
|
+
import { TestSchema, updateCounter } from '../../../testing';
|
|
12
|
+
import { createObject } from '../../Obj';
|
|
13
13
|
import { ATTR_META } from '../types';
|
|
14
14
|
|
|
15
15
|
import { makeObject } from './make-object';
|
|
@@ -7,16 +7,19 @@ import { invariant } from '@dxos/invariant';
|
|
|
7
7
|
import { DXN } from '@dxos/keys';
|
|
8
8
|
import { deepMapValues } from '@dxos/util';
|
|
9
9
|
|
|
10
|
+
import { Ref } from '../../Ref';
|
|
10
11
|
import {
|
|
12
|
+
ATTR_META,
|
|
11
13
|
ATTR_RELATION_SOURCE,
|
|
12
14
|
ATTR_RELATION_TARGET,
|
|
13
15
|
ATTR_SELF_DXN,
|
|
16
|
+
ATTR_TYPE,
|
|
17
|
+
MetaId,
|
|
14
18
|
RelationSourceDXNId,
|
|
15
19
|
RelationTargetDXNId,
|
|
16
20
|
SelfDXNId,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import { ATTR_META, ATTR_TYPE, MetaId, TypeId } from '../types';
|
|
21
|
+
TypeId,
|
|
22
|
+
} from '../types';
|
|
20
23
|
|
|
21
24
|
/**
|
|
22
25
|
* Attaches a toJSON method to the object for typed serialization.
|
|
@@ -6,7 +6,7 @@ import type * as Schema from 'effect/Schema';
|
|
|
6
6
|
|
|
7
7
|
import { ObjectId } from '@dxos/keys';
|
|
8
8
|
|
|
9
|
-
import { getTypeAnnotation } from '
|
|
9
|
+
import { getTypeAnnotation } from '../../Annotation';
|
|
10
10
|
import { type AnyProperties, KindId, MetaId, type ObjectMeta, ObjectMetaSchema, ParentId } from '../types';
|
|
11
11
|
|
|
12
12
|
import { defineHiddenProperty } from './define-hidden-property';
|
|
@@ -6,14 +6,14 @@ import * as Schema from 'effect/Schema';
|
|
|
6
6
|
import * as SchemaAST from 'effect/SchemaAST';
|
|
7
7
|
import { describe, expect, test } from 'vitest';
|
|
8
8
|
|
|
9
|
-
import { createEchoSchema } from '
|
|
10
|
-
import { PropertyMeta, getPropertyMetaAnnotation, getTypeAnnotation } from '
|
|
11
|
-
import { EchoObjectSchema } from '
|
|
9
|
+
import { createEchoSchema } from '../../../testing';
|
|
10
|
+
import { PropertyMeta, getPropertyMetaAnnotation, getTypeAnnotation } from '../../Annotation';
|
|
11
|
+
import { EchoObjectSchema } from '../../Entity';
|
|
12
12
|
|
|
13
13
|
// TODO(dmaretskyi): Comment.
|
|
14
14
|
const EmptySchemaType = Schema.Struct({}).pipe(
|
|
15
15
|
EchoObjectSchema({
|
|
16
|
-
typename: 'example.
|
|
16
|
+
typename: 'com.example.type.empty',
|
|
17
17
|
version: '0.1.0',
|
|
18
18
|
}),
|
|
19
19
|
);
|
|
@@ -27,7 +27,7 @@ describe('dynamic schema', () => {
|
|
|
27
27
|
field2: Schema.Boolean,
|
|
28
28
|
}).pipe(
|
|
29
29
|
EchoObjectSchema({
|
|
30
|
-
typename: 'example.
|
|
30
|
+
typename: 'com.example.type.test',
|
|
31
31
|
version: '0.1.0',
|
|
32
32
|
}),
|
|
33
33
|
);
|
|
@@ -44,7 +44,7 @@ describe('dynamic schema', () => {
|
|
|
44
44
|
field1: Schema.String,
|
|
45
45
|
}).pipe(
|
|
46
46
|
EchoObjectSchema({
|
|
47
|
-
typename: 'example.
|
|
47
|
+
typename: 'com.example.type.test',
|
|
48
48
|
version: '0.1.0',
|
|
49
49
|
}),
|
|
50
50
|
);
|
|
@@ -95,7 +95,7 @@ describe('dynamic schema', () => {
|
|
|
95
95
|
registered.updateFields({ field3: Schema.Boolean });
|
|
96
96
|
registered.removeFields(['field2']);
|
|
97
97
|
expect(getTypeAnnotation(registered)).to.deep.contain({
|
|
98
|
-
typename: 'example.
|
|
98
|
+
typename: 'com.example.type.empty',
|
|
99
99
|
version: '0.1.0',
|
|
100
100
|
});
|
|
101
101
|
expect(getPropertyMetaAnnotation(registered.getProperties()[0], metaNamespace)).to.deep.eq(metaInfo);
|
|
@@ -111,7 +111,7 @@ describe('dynamic schema', () => {
|
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
// First update.
|
|
114
|
-
const newTypename1 = 'example.
|
|
114
|
+
const newTypename1 = 'com.example.type.individual';
|
|
115
115
|
registered.updateTypename(newTypename1);
|
|
116
116
|
|
|
117
117
|
// Basic typename update checks.
|
|
@@ -132,13 +132,13 @@ describe('dynamic schema', () => {
|
|
|
132
132
|
expect(nameMeta).toEqual({ maxLength: 10 });
|
|
133
133
|
|
|
134
134
|
// Second update to ensure multiple updates work.
|
|
135
|
-
const newTypename2 = 'example.
|
|
135
|
+
const newTypename2 = 'com.example.type.person';
|
|
136
136
|
registered.updateTypename(newTypename2);
|
|
137
137
|
expect(registered.typename).toBe(newTypename2);
|
|
138
138
|
expect(registered.jsonSchema.$id).toBe(`dxn:type:${newTypename2}`);
|
|
139
139
|
expect(registered.jsonSchema.typename).toBe(newTypename2);
|
|
140
140
|
expect(getTypeAnnotation(registered)).to.deep.contain({
|
|
141
|
-
typename: 'example.
|
|
141
|
+
typename: 'com.example.type.person',
|
|
142
142
|
version: '0.1.0',
|
|
143
143
|
});
|
|
144
144
|
});
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
import { describe, expect, test } from 'vitest';
|
|
7
7
|
|
|
8
|
-
import { TestSchema } from '
|
|
9
|
-
import { EchoObjectSchema } from '
|
|
10
|
-
import { setValue } from '
|
|
11
|
-
import { Ref } from '
|
|
8
|
+
import { TestSchema } from '../../../testing';
|
|
9
|
+
import { EchoObjectSchema } from '../../Entity';
|
|
10
|
+
import { setValue } from '../../Obj';
|
|
11
|
+
import { Ref } from '../../Ref';
|
|
12
12
|
import { foreignKey, getMeta } from '../types';
|
|
13
13
|
|
|
14
14
|
import { makeObject } from './make-object';
|
|
@@ -40,10 +40,10 @@ describe('complex schema validations', () => {
|
|
|
40
40
|
|
|
41
41
|
test('references', () => {
|
|
42
42
|
const Foo = Schema.Struct({ field: Schema.String }).pipe(
|
|
43
|
-
EchoObjectSchema({ typename: 'example.
|
|
43
|
+
EchoObjectSchema({ typename: 'com.example.type.foo', version: '0.1.0' }),
|
|
44
44
|
);
|
|
45
45
|
const Bar = Schema.Struct({ fooRef: Ref(Foo) }).pipe(
|
|
46
|
-
EchoObjectSchema({ typename: 'example.
|
|
46
|
+
EchoObjectSchema({ typename: 'com.example.type.bar', version: '0.1.0' }),
|
|
47
47
|
);
|
|
48
48
|
const field = 'hello';
|
|
49
49
|
expect(() => makeObject(Bar, { fooRef: { id: '1', field } as any })).to.throw();
|
|
@@ -11,9 +11,8 @@ import { Event } from '@dxos/async';
|
|
|
11
11
|
import { inspectCustom } from '@dxos/debug';
|
|
12
12
|
import { invariant } from '@dxos/invariant';
|
|
13
13
|
|
|
14
|
-
import { getSchemaDXN } from '
|
|
15
|
-
import { ObjectDeletedId } from '../
|
|
16
|
-
import { ParentId, SchemaId, TypeId } from '../types';
|
|
14
|
+
import { getSchemaDXN } from '../../Annotation';
|
|
15
|
+
import { ObjectDeletedId, ParentId, SchemaId, TypeId } from '../types';
|
|
17
16
|
|
|
18
17
|
import { executeChange, isInChangeContext, queueNotification } from './change-context';
|
|
19
18
|
import { defineHiddenProperty } from './define-hidden-property';
|
|
@@ -6,7 +6,7 @@ import * as Schema from 'effect/Schema';
|
|
|
6
6
|
import type * as Types from 'effect/Types';
|
|
7
7
|
import { describe, expect, test } from 'vitest';
|
|
8
8
|
|
|
9
|
-
import { EchoObjectSchema } from '
|
|
9
|
+
import { EchoObjectSchema } from '../../Entity';
|
|
10
10
|
import { getSchema } from '../types';
|
|
11
11
|
|
|
12
12
|
import { makeObject } from './make-object';
|
|
@@ -16,7 +16,7 @@ const Organization = Schema.Struct({
|
|
|
16
16
|
name: Schema.String,
|
|
17
17
|
}).pipe(
|
|
18
18
|
EchoObjectSchema({
|
|
19
|
-
typename: 'example.
|
|
19
|
+
typename: 'com.example.type.organization',
|
|
20
20
|
version: '0.1.0',
|
|
21
21
|
}),
|
|
22
22
|
);
|
|
@@ -34,7 +34,7 @@ const Contact = Schema.Struct(
|
|
|
34
34
|
).pipe(
|
|
35
35
|
Schema.partial,
|
|
36
36
|
EchoObjectSchema({
|
|
37
|
-
typename: 'example.
|
|
37
|
+
typename: 'com.example.type.person',
|
|
38
38
|
version: '0.1.0',
|
|
39
39
|
}),
|
|
40
40
|
);
|
|
@@ -101,7 +101,7 @@ describe('EchoObjectSchema class DSL', () => {
|
|
|
101
101
|
meta: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
102
102
|
}).pipe(
|
|
103
103
|
EchoObjectSchema({
|
|
104
|
-
typename: 'dxos.
|
|
104
|
+
typename: 'org.dxos.type.function-trigger',
|
|
105
105
|
version: '0.1.0',
|
|
106
106
|
}),
|
|
107
107
|
);
|
|
@@ -46,7 +46,7 @@ export const EntityKindSchema = Schema.Enums(EntityKind);
|
|
|
46
46
|
* Typename for generic object references (Type.Obj / Ref.Ref(Obj.Unknown)).
|
|
47
47
|
* Used when referencing any object without a specific schema.
|
|
48
48
|
*/
|
|
49
|
-
export const ANY_OBJECT_TYPENAME = 'dxos.
|
|
49
|
+
export const ANY_OBJECT_TYPENAME = 'org.dxos.schema.any-object';
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Version for generic object references.
|
|
@@ -8,7 +8,7 @@ import { ForeignKey } from '@dxos/echo-protocol';
|
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { type Comparator, intersection } from '@dxos/util';
|
|
10
10
|
|
|
11
|
-
import type * as Entity from '
|
|
11
|
+
import type * as Entity from '../../../Entity';
|
|
12
12
|
|
|
13
13
|
import { type AnyProperties } from './base';
|
|
14
14
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Internal symbol/string constants for the echo object model.
|
|
7
|
+
* Defined in common/ so proxy/ can use them without importing from Entity/.
|
|
8
|
+
* Entity/ re-exports these for external consumers.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Property name for self DXN when object is serialized to JSON.
|
|
13
|
+
*/
|
|
14
|
+
export const ATTR_SELF_DXN = '@dxn';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* DXN to the object itself.
|
|
18
|
+
*/
|
|
19
|
+
export const SelfDXNId = Symbol.for('@dxos/echo/DXN');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Property name for deleted when object is serialized to JSON.
|
|
23
|
+
*/
|
|
24
|
+
export const ATTR_DELETED = '@deleted';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Deletion marker.
|
|
28
|
+
*/
|
|
29
|
+
export const ObjectDeletedId = Symbol.for('@dxos/echo/Deleted');
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Object version accessor symbol.
|
|
33
|
+
*/
|
|
34
|
+
export const ObjectVersionId: unique symbol = Symbol.for('@dxos/echo/Version');
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Object database accessor symbol.
|
|
38
|
+
*/
|
|
39
|
+
export const ObjectDatabaseId = Symbol.for('@dxos/echo/Database');
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Property name for relation source when object is serialized to JSON.
|
|
43
|
+
*/
|
|
44
|
+
export const ATTR_RELATION_SOURCE = '@relationSource';
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Used to access relation source ref on live ECHO objects.
|
|
48
|
+
*/
|
|
49
|
+
export const RelationSourceId: unique symbol = Symbol.for('@dxos/echo/RelationSource');
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Used to access relation source DXN on live ECHO objects.
|
|
53
|
+
*/
|
|
54
|
+
export const RelationSourceDXNId: unique symbol = Symbol.for('@dxos/echo/RelationSourceDXN');
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Property name for relation target when object is serialized to JSON.
|
|
58
|
+
*/
|
|
59
|
+
export const ATTR_RELATION_TARGET = '@relationTarget';
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Used to access relation target ref on live ECHO objects.
|
|
63
|
+
*/
|
|
64
|
+
export const RelationTargetId: unique symbol = Symbol.for('@dxos/echo/RelationTarget');
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Used to access relation target DXN on live ECHO objects.
|
|
68
|
+
*/
|
|
69
|
+
export const RelationTargetDXNId: unique symbol = Symbol.for('@dxos/echo/RelationTargetDXN');
|
package/src/internal/index.ts
CHANGED
|
@@ -5,35 +5,12 @@
|
|
|
5
5
|
// TODO(burdon): Import directly (not part of ECHO API).
|
|
6
6
|
export { JsonPath, JsonProp, getValue, splitJsonPath } from '@dxos/effect';
|
|
7
7
|
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './ref';
|
|
14
|
-
export * from './types';
|
|
15
|
-
|
|
8
|
+
export * from './Annotation';
|
|
9
|
+
export * from './common';
|
|
10
|
+
export * from './Entity';
|
|
11
|
+
export * from './Format';
|
|
12
|
+
export * from './JsonSchema';
|
|
16
13
|
// TODO(wittjosiah): Required to ensure types are portable (need to export all types required for downstream inference).
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
20
|
-
|
|
21
|
-
// export {
|
|
22
|
-
// createObject,
|
|
23
|
-
// createQueueDXN,
|
|
24
|
-
// isDeleted,
|
|
25
|
-
// objectFromJSON,
|
|
26
|
-
// objectToJSON,
|
|
27
|
-
// setRefResolverOnData,
|
|
28
|
-
// SchemaValidator,
|
|
29
|
-
// TypedObject,
|
|
30
|
-
// } from './object';
|
|
31
|
-
// export { makeObject } from './proxy';
|
|
32
|
-
// export {
|
|
33
|
-
// type BaseSchema,
|
|
34
|
-
// EchoSchema,
|
|
35
|
-
// ImmutableSchema,
|
|
36
|
-
// RuntimeSchemaRegistry,
|
|
37
|
-
// PersistentSchema,
|
|
38
|
-
// isMutable,
|
|
39
|
-
// } from './schema';
|
|
14
|
+
export * from './Obj';
|
|
15
|
+
export * from './Ref';
|
|
16
|
+
export * from './Type';
|
package/src/testing/api.test.ts
CHANGED
|
@@ -17,11 +17,11 @@ describe('Experimental API review', () => {
|
|
|
17
17
|
const schema = Obj.getSchema(contact) ?? raise(new Error('No schema found'));
|
|
18
18
|
|
|
19
19
|
expect(Type.getDXN(schema)?.typename).to.eq(TestSchema.Person.typename);
|
|
20
|
-
expect(Type.getTypename(schema)).to.eq('example.
|
|
20
|
+
expect(Type.getTypename(schema)).to.eq('com.example.type.person');
|
|
21
21
|
expect(Type.getVersion(schema)).to.eq('0.1.0');
|
|
22
22
|
expect(Type.getMeta(schema)).to.deep.eq({
|
|
23
23
|
kind: Entity.Kind.Object,
|
|
24
|
-
typename: 'example.
|
|
24
|
+
typename: 'com.example.type.person',
|
|
25
25
|
version: '0.1.0',
|
|
26
26
|
});
|
|
27
27
|
});
|