@adobe/data 0.5.2 → 0.5.3
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/blob/blob-handle.d.ts +29 -0
- package/dist/blob/blob-handle.js +11 -0
- package/dist/blob/blob-handle.js.map +1 -0
- package/dist/blob/blob-meta.d.ts +23 -0
- package/dist/blob/blob-meta.js +12 -0
- package/dist/blob/blob-meta.js.map +1 -0
- package/dist/blob/download-handle.d.ts +4 -0
- package/dist/blob/download-handle.js +2 -0
- package/dist/blob/download-handle.js.map +1 -0
- package/dist/blob/index.d.ts +4 -0
- package/dist/blob/index.js +5 -0
- package/dist/blob/index.js.map +1 -0
- package/dist/blob/upload-handle.d.ts +4 -0
- package/dist/blob/upload-handle.js +2 -0
- package/dist/blob/upload-handle.js.map +1 -0
- package/dist/schema/schema.d.ts +8 -12
- package/dist/schema/schema.js.map +1 -1
- package/dist/service/is-service.js +1 -2
- package/dist/service/is-service.js.map +1 -1
- package/dist/service/progressive-result.d.ts +5 -6
- package/dist/service/progressive-result.js.map +1 -1
- package/dist/services/add-observable-actions.d.ts +29 -0
- package/dist/services/add-observable-actions.js +108 -0
- package/dist/services/add-observable-actions.js.map +1 -0
- package/dist/services/index.d.ts +4 -0
- package/dist/{core → services}/index.js +3 -3
- package/dist/services/index.js.map +1 -0
- package/dist/services/is-service.d.ts +2 -0
- package/dist/{cache/functions/omit.js → services/is-service.js} +3 -7
- package/dist/services/is-service.js.map +1 -0
- package/dist/services/progressive-result.d.ts +96 -0
- package/dist/services/progressive-result.js +99 -0
- package/dist/services/progressive-result.js.map +1 -0
- package/dist/services/service.d.ts +4 -0
- package/dist/{cache/functions/types.js → services/service.js} +1 -1
- package/dist/services/service.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/replace.d.ts +7 -0
- package/dist/types/replace.js +5 -0
- package/dist/types/replace.js.map +1 -0
- package/package.json +8 -1
- package/dist/README.md +0 -310
- package/dist/cache/functions/bind-functions.d.ts +0 -6
- package/dist/cache/functions/bind-functions.js +0 -33
- package/dist/cache/functions/bind-functions.js.map +0 -1
- package/dist/cache/functions/hashing/arrayBufferToHex.d.ts +0 -1
- package/dist/cache/functions/hashing/arrayBufferToHex.js +0 -27
- package/dist/cache/functions/hashing/arrayBufferToHex.js.map +0 -1
- package/dist/cache/functions/omit.d.ts +0 -1
- package/dist/cache/functions/omit.js.map +0 -1
- package/dist/cache/functions/types.d.ts +0 -1
- package/dist/cache/functions/types.js.map +0 -1
- package/dist/core/data.d.ts +0 -22
- package/dist/core/data.js +0 -52
- package/dist/core/data.js.map +0 -1
- package/dist/core/data.test.d.ts +0 -1
- package/dist/core/data.test.js +0 -48
- package/dist/core/data.test.js.map +0 -1
- package/dist/core/functions/array-equals.d.ts +0 -1
- package/dist/core/functions/array-equals.js +0 -34
- package/dist/core/functions/array-equals.js.map +0 -1
- package/dist/core/functions/deep-merge.d.ts +0 -32
- package/dist/core/functions/deep-merge.js +0 -54
- package/dist/core/functions/deep-merge.js.map +0 -1
- package/dist/core/functions/deep-merge.test.d.ts +0 -1
- package/dist/core/functions/deep-merge.test.js +0 -94
- package/dist/core/functions/deep-merge.test.js.map +0 -1
- package/dist/core/functions/index.d.ts +0 -3
- package/dist/core/functions/index.js +0 -25
- package/dist/core/functions/index.js.map +0 -1
- package/dist/core/functions/is-async-generator.d.ts +0 -1
- package/dist/core/functions/is-async-generator.js +0 -25
- package/dist/core/functions/is-async-generator.js.map +0 -1
- package/dist/core/functions/is-promise.d.ts +0 -1
- package/dist/core/functions/is-promise.js +0 -26
- package/dist/core/functions/is-promise.js.map +0 -1
- package/dist/core/functions/with-validation.d.ts +0 -5
- package/dist/core/functions/with-validation.js +0 -38
- package/dist/core/functions/with-validation.js.map +0 -1
- package/dist/core/functions/with-validation.test.d.ts +0 -1
- package/dist/core/functions/with-validation.test.js +0 -96
- package/dist/core/functions/with-validation.test.js.map +0 -1
- package/dist/core/index.d.ts +0 -3
- package/dist/core/index.js.map +0 -1
- package/dist/core/schema/dynamic/dynamic-schema.d.ts +0 -27
- package/dist/core/schema/dynamic/dynamic-schema.js +0 -2
- package/dist/core/schema/dynamic/dynamic-schema.js.map +0 -1
- package/dist/core/schema/dynamic/enumerate-patches.d.ts +0 -9
- package/dist/core/schema/dynamic/enumerate-patches.js +0 -50
- package/dist/core/schema/dynamic/enumerate-patches.js.map +0 -1
- package/dist/core/schema/dynamic/enumerate-patches.test.d.ts +0 -134
- package/dist/core/schema/dynamic/enumerate-patches.test.js +0 -209
- package/dist/core/schema/dynamic/enumerate-patches.test.js.map +0 -1
- package/dist/core/schema/dynamic/get-dynamic-schema.d.ts +0 -5
- package/dist/core/schema/dynamic/get-dynamic-schema.js +0 -26
- package/dist/core/schema/dynamic/get-dynamic-schema.js.map +0 -1
- package/dist/core/schema/dynamic/get-dynamic-schema.test.d.ts +0 -1
- package/dist/core/schema/dynamic/get-dynamic-schema.test.js +0 -94
- package/dist/core/schema/dynamic/get-dynamic-schema.test.js.map +0 -1
- package/dist/core/schema/dynamic/index.d.ts +0 -1
- package/dist/core/schema/dynamic/index.js +0 -2
- package/dist/core/schema/dynamic/index.js.map +0 -1
- package/dist/core/schema/dynamic/schema-path-value-path.d.ts +0 -5
- package/dist/core/schema/dynamic/schema-path-value-path.js +0 -12
- package/dist/core/schema/dynamic/schema-path-value-path.js.map +0 -1
- package/dist/core/schema/dynamic-schema.d.ts +0 -27
- package/dist/core/schema/dynamic-schema.js +0 -2
- package/dist/core/schema/dynamic-schema.js.map +0 -1
- package/dist/core/schema/index.d.ts +0 -4
- package/dist/core/schema/index.js +0 -26
- package/dist/core/schema/index.js.map +0 -1
- package/dist/core/schema/schema.d.ts +0 -122
- package/dist/core/schema/schema.js +0 -34
- package/dist/core/schema/schema.js.map +0 -1
- package/dist/core/schema/schemas.d.ts +0 -45
- package/dist/core/schema/schemas.js +0 -39
- package/dist/core/schema/schemas.js.map +0 -1
- package/dist/core/schema/ui-schema.d.ts +0 -25
- package/dist/core/schema/ui-schema.js +0 -2
- package/dist/core/schema/ui-schema.js.map +0 -1
- package/dist/core/schema/validation/is-valid.d.ts +0 -2
- package/dist/core/schema/validation/is-valid.js +0 -14
- package/dist/core/schema/validation/is-valid.js.map +0 -1
- package/dist/core/schema/validation/is-valid.test.d.ts +0 -1
- package/dist/core/schema/validation/is-valid.test.js +0 -40
- package/dist/core/schema/validation/is-valid.test.js.map +0 -1
- package/dist/core/schema/validation/validate.d.ts +0 -2
- package/dist/core/schema/validation/validate.js +0 -38
- package/dist/core/schema/validation/validate.js.map +0 -1
- package/dist/core/schema/validation/validate.test.d.ts +0 -1
- package/dist/core/schema/validation/validate.test.js +0 -106
- package/dist/core/schema/validation/validate.test.js.map +0 -1
- package/dist/core/schema/validation/with-validation.d.ts +0 -5
- package/dist/core/schema/validation/with-validation.js +0 -16
- package/dist/core/schema/validation/with-validation.js.map +0 -1
- package/dist/core/schema/validation/with-validation.test.d.ts +0 -1
- package/dist/core/schema/validation/with-validation.test.js +0 -96
- package/dist/core/schema/validation/with-validation.test.js.map +0 -1
- package/dist/core/schema.d.ts +0 -86
- package/dist/core/schema.js +0 -33
- package/dist/core/schema.js.map +0 -1
- package/dist/core/schema.test.d.ts +0 -1
- package/dist/core/schema.test.js +0 -16
- package/dist/core/schema.test.js.map +0 -1
- package/dist/core/schemas.d.ts +0 -45
- package/dist/core/schemas.js +0 -39
- package/dist/core/schemas.js.map +0 -1
- package/dist/ecs/action-ecs/action-ecs.d.ts +0 -19
- package/dist/ecs/action-ecs/action-ecs.js +0 -203
- package/dist/ecs/action-ecs/action-ecs.js.map +0 -1
- package/dist/ecs/action-ecs/action-ecs.test.d.ts +0 -1
- package/dist/ecs/action-ecs/action-ecs.test.js +0 -362
- package/dist/ecs/action-ecs/action-ecs.test.js.map +0 -1
- package/dist/ecs/action-ecs/action-types.d.ts +0 -106
- package/dist/ecs/action-ecs/action-types.js +0 -19
- package/dist/ecs/action-ecs/action-types.js.map +0 -1
- package/dist/ecs/action-ecs/index.d.ts +0 -2
- package/dist/ecs/action-ecs/index.js +0 -23
- package/dist/ecs/action-ecs/index.js.map +0 -1
- package/dist/ecs/core-ecs/core-ecs-serialization.test.d.ts +0 -1
- package/dist/ecs/core-ecs/core-ecs-serialization.test.js +0 -230
- package/dist/ecs/core-ecs/core-ecs-serialization.test.js.map +0 -1
- package/dist/ecs/core-ecs/core-ecs-types.d.ts +0 -141
- package/dist/ecs/core-ecs/core-ecs-types.js +0 -23
- package/dist/ecs/core-ecs/core-ecs-types.js.map +0 -1
- package/dist/ecs/core-ecs/core-ecs.d.ts +0 -7
- package/dist/ecs/core-ecs/core-ecs.js +0 -492
- package/dist/ecs/core-ecs/core-ecs.js.map +0 -1
- package/dist/ecs/core-ecs/core-ecs.test.d.ts +0 -1
- package/dist/ecs/core-ecs/core-ecs.test.js +0 -425
- package/dist/ecs/core-ecs/core-ecs.test.js.map +0 -1
- package/dist/ecs/core-ecs/index.d.ts +0 -1
- package/dist/ecs/core-ecs/index.js +0 -2
- package/dist/ecs/core-ecs/index.js.map +0 -1
- package/dist/ecs/database/database-schema/create-database-schema-test.d.ts +0 -1
- package/dist/ecs/database/database-schema/create-database-schema-test.js +0 -42
- package/dist/ecs/database/database-schema/create-database-schema-test.js.map +0 -1
- package/dist/ecs/database/database-schema/create-database-schema.d.ts +0 -12
- package/dist/ecs/database/database-schema/create-database-schema.js +0 -26
- package/dist/ecs/database/database-schema/create-database-schema.js.map +0 -1
- package/dist/ecs/database/database-schema/database-schema.d.ts +0 -15
- package/dist/ecs/database/database-schema/database-schema.js +0 -23
- package/dist/ecs/database/database-schema/database-schema.js.map +0 -1
- package/dist/ecs/database/database-schema/index.d.ts +0 -2
- package/dist/ecs/database/database-schema/index.js +0 -24
- package/dist/ecs/database/database-schema/index.js.map +0 -1
- package/dist/ecs/database/register-database-codec.d.ts +0 -1
- package/dist/ecs/database/register-database-codec.js +0 -35
- package/dist/ecs/database/register-database-codec.js.map +0 -1
- package/dist/ecs/database/register-database-codecs.d.ts +0 -1
- package/dist/ecs/database/register-database-codecs.js +0 -35
- package/dist/ecs/database/register-database-codecs.js.map +0 -1
- package/dist/ecs/database/register-store-codec.d.ts +0 -1
- package/dist/ecs/database/register-store-codec.js +0 -35
- package/dist/ecs/database/register-store-codec.js.map +0 -1
- package/dist/ecs/database/register-typed-buffer-codecs.d.ts +0 -1
- package/dist/ecs/database/register-typed-buffer-codecs.js +0 -80
- package/dist/ecs/database/register-typed-buffer-codecs.js.map +0 -1
- package/dist/ecs/database/transactional-store/apply-write-operations.d.ts +0 -7
- package/dist/ecs/database/transactional-store/apply-write-operations.js +0 -20
- package/dist/ecs/database/transactional-store/apply-write-operations.js.map +0 -1
- package/dist/ecs/database/transactional-store/applyWriteOperations.d.ts +0 -7
- package/dist/ecs/database/transactional-store/applyWriteOperations.js +0 -20
- package/dist/ecs/database/transactional-store/applyWriteOperations.js.map +0 -1
- package/dist/ecs/database/transactional-store/create-test-transaction.d.ts +0 -7
- package/dist/ecs/database/transactional-store/create-test-transaction.js +0 -7
- package/dist/ecs/database/transactional-store/create-test-transaction.js.map +0 -1
- package/dist/ecs/database/transactional-store/patch.d.ts +0 -3
- package/dist/ecs/database/transactional-store/patch.js +0 -7
- package/dist/ecs/database/transactional-store/patch.js.map +0 -1
- package/dist/ecs/database/transactional-store/undoable.d.ts +0 -13
- package/dist/ecs/database/transactional-store/undoable.js +0 -23
- package/dist/ecs/database/transactional-store/undoable.js.map +0 -1
- package/dist/ecs/database/transactional-store/with-undoable.d.ts +0 -10
- package/dist/ecs/database/transactional-store/with-undoable.js +0 -13
- package/dist/ecs/database/transactional-store/with-undoable.js.map +0 -1
- package/dist/ecs/database/with-undoable.d.ts +0 -10
- package/dist/ecs/database/with-undoable.js +0 -13
- package/dist/ecs/database/with-undoable.js.map +0 -1
- package/dist/ecs/ecs/ecs-types.d.ts +0 -132
- package/dist/ecs/ecs/ecs-types.js +0 -23
- package/dist/ecs/ecs/ecs-types.js.map +0 -1
- package/dist/ecs/ecs/ecs-where-functions.d.ts +0 -6
- package/dist/ecs/ecs/ecs-where-functions.js +0 -91
- package/dist/ecs/ecs/ecs-where-functions.js.map +0 -1
- package/dist/ecs/ecs/ecs.d.ts +0 -13
- package/dist/ecs/ecs/ecs.js +0 -177
- package/dist/ecs/ecs/ecs.js.map +0 -1
- package/dist/ecs/ecs/ecs.test.d.ts +0 -1
- package/dist/ecs/ecs/ecs.test.js +0 -399
- package/dist/ecs/ecs/ecs.test.js.map +0 -1
- package/dist/ecs/ecs/index.d.ts +0 -3
- package/dist/ecs/ecs/index.js +0 -3
- package/dist/ecs/ecs/index.js.map +0 -1
- package/dist/ecs/entity-location-table/register-database-codec.d.ts +0 -1
- package/dist/ecs/entity-location-table/register-database-codec.js +0 -35
- package/dist/ecs/entity-location-table/register-database-codec.js.map +0 -1
- package/dist/ecs/entity-location-table/register-entity-location-table-codec.d.ts +0 -1
- package/dist/ecs/entity-location-table/register-entity-location-table-codec.js +0 -42
- package/dist/ecs/entity-location-table/register-entity-location-table-codec.js.map +0 -1
- package/dist/ecs/entity-location-table/register-entity-location-table-codec.test.d.ts +0 -1
- package/dist/ecs/entity-location-table/register-entity-location-table-codec.test.js +0 -70
- package/dist/ecs/entity-location-table/register-entity-location-table-codec.test.js.map +0 -1
- package/dist/ecs/persistence-service/create-persistence-service.d.ts +0 -6
- package/dist/ecs/persistence-service/create-persistence-service.js +0 -24
- package/dist/ecs/persistence-service/create-persistence-service.js.map +0 -1
- package/dist/ecs/persistence-service/create-session-persistence-service.d.ts +0 -8
- package/dist/ecs/persistence-service/create-session-persistence-service.js +0 -49
- package/dist/ecs/persistence-service/create-session-persistence-service.js.map +0 -1
- package/dist/ecs/persistence-service/persistence-service copy.d.ts +0 -5
- package/dist/ecs/persistence-service/persistence-service copy.js +0 -2
- package/dist/ecs/persistence-service/persistence-service copy.js.map +0 -1
- package/dist/ecs/persistence-service/to-blob-refs.d.ts +0 -2
- package/dist/ecs/persistence-service/to-blob-refs.js +0 -3
- package/dist/ecs/persistence-service/to-blob-refs.js.map +0 -1
- package/dist/ecs/persistence-service/undo-redo-service.d.ts +0 -11
- package/dist/ecs/persistence-service/undo-redo-service.js +0 -23
- package/dist/ecs/persistence-service/undo-redo-service.js.map +0 -1
- package/dist/ecs/store/core/register-core-codec.d.ts +0 -1
- package/dist/ecs/store/core/register-core-codec.js +0 -45
- package/dist/ecs/store/core/register-core-codec.js.map +0 -1
- package/dist/ecs/store/core/register-core-codec.test.d.ts +0 -1
- package/dist/ecs/store/core/register-core-codec.test.js +0 -136
- package/dist/ecs/store/core/register-core-codec.test.js.map +0 -1
- package/dist/ecs/store/query.d.ts +0 -47
- package/dist/ecs/store/query.js +0 -2
- package/dist/ecs/store/query.js.map +0 -1
- package/dist/ecs/store/register-core-codec.d.ts +0 -1
- package/dist/ecs/store/register-core-codec.js +0 -38
- package/dist/ecs/store/register-core-codec.js.map +0 -1
- package/dist/ecs/store/register-store-codec.d.ts +0 -1
- package/dist/ecs/store/register-store-codec.js +0 -38
- package/dist/ecs/store/register-store-codec.js.map +0 -1
- package/dist/ecs/store/restore-store.d.ts +0 -12
- package/dist/ecs/store/restore-store.js +0 -91
- package/dist/ecs/store/restore-store.js.map +0 -1
- package/dist/ecs/store/select-options.d.ts +0 -1
- package/dist/ecs/store/select-options.js +0 -16
- package/dist/ecs/store/select-options.js.map +0 -1
- package/dist/ecs/store/select.d.ts +0 -44
- package/dist/ecs/store/select.js +0 -2
- package/dist/ecs/store/select.js.map +0 -1
- package/dist/ecs/transaction-ecs/index.d.ts +0 -2
- package/dist/ecs/transaction-ecs/index.js +0 -24
- package/dist/ecs/transaction-ecs/index.js.map +0 -1
- package/dist/ecs/transaction-ecs/transaction-ecs.d.ts +0 -11
- package/dist/ecs/transaction-ecs/transaction-ecs.js +0 -184
- package/dist/ecs/transaction-ecs/transaction-ecs.js.map +0 -1
- package/dist/ecs/transaction-ecs/transaction-ecs.test.d.ts +0 -1
- package/dist/ecs/transaction-ecs/transaction-ecs.test.js +0 -599
- package/dist/ecs/transaction-ecs/transaction-ecs.test.js.map +0 -1
- package/dist/ecs/transaction-ecs/transaction-types.d.ts +0 -135
- package/dist/ecs/transaction-ecs/transaction-types.js +0 -2
- package/dist/ecs/transaction-ecs/transaction-types.js.map +0 -1
- package/dist/ecs/transaction-ecs/transactions.d.ts +0 -5
- package/dist/ecs/transaction-ecs/transactions.js +0 -158
- package/dist/ecs/transaction-ecs/transactions.js.map +0 -1
- package/dist/ecs/undo-redo/create-undo-redo-actions.d.ts +0 -10
- package/dist/ecs/undo-redo/create-undo-redo-actions.js +0 -69
- package/dist/ecs/undo-redo/create-undo-redo-actions.js.map +0 -1
- package/dist/ecs/undo-redo/create-undo-redo-actions.test.d.ts +0 -1
- package/dist/ecs/undo-redo/create-undo-redo-actions.test.js +0 -295
- package/dist/ecs/undo-redo/create-undo-redo-actions.test.js.map +0 -1
- package/dist/ecs/undo-redo/do.d.ts +0 -3
- package/dist/ecs/undo-redo/do.js +0 -3
- package/dist/ecs/undo-redo/do.js.map +0 -1
- package/dist/ecs/undo-redo/index.d.ts +0 -1
- package/dist/ecs/undo-redo/index.js +0 -23
- package/dist/ecs/undo-redo/index.js.map +0 -1
- package/dist/functions/serialization/deserialize.d.ts +0 -1
- package/dist/functions/serialization/deserialize.js +0 -2
- package/dist/functions/serialization/deserialize.js.map +0 -1
- package/dist/functions/serialization/register-typed-array-codecs copy.d.ts +0 -1
- package/dist/functions/serialization/register-typed-array-codecs copy.js +0 -13
- package/dist/functions/serialization/register-typed-array-codecs copy.js.map +0 -1
- package/dist/functions/serialization/serialize-to-blobs copy.d.ts +0 -8
- package/dist/functions/serialization/serialize-to-blobs copy.js +0 -21
- package/dist/functions/serialization/serialize-to-blobs copy.js.map +0 -1
- package/dist/internal/typed-array/typed-array-constructer.d.ts +0 -7
- package/dist/internal/typed-array/typed-array-constructer.js +0 -2
- package/dist/internal/typed-array/typed-array-constructer.js.map +0 -1
- package/dist/internal/typed-array/typed-array.d.ts +0 -1
- package/dist/internal/typed-array/typed-array.js +0 -23
- package/dist/internal/typed-array/typed-array.js.map +0 -1
- package/dist/observe/with-map copy.d.ts +0 -5
- package/dist/observe/with-map copy.js +0 -14
- package/dist/observe/with-map copy.js.map +0 -1
- package/dist/package.json +0 -129
- package/dist/schema/f32 copy.d.ts +0 -6
- package/dist/schema/f32 copy.js +0 -6
- package/dist/schema/f32 copy.js.map +0 -1
- package/dist/schemas/index.d.ts +0 -1
- package/dist/schemas/index.js +0 -23
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/schemas.d.ts +0 -45
- package/dist/schemas/schemas.js +0 -39
- package/dist/schemas/schemas.js.map +0 -1
- package/dist/service/sequential-action.d.ts +0 -18
- package/dist/service/sequential-action.js +0 -45
- package/dist/service/sequential-action.js.map +0 -1
- package/dist/table/ensure-capacity copy.d.ts +0 -2
- package/dist/table/ensure-capacity copy.js +0 -15
- package/dist/table/ensure-capacity copy.js.map +0 -1
- package/dist/table/filter-rows.d.ts +0 -2
- package/dist/table/filter-rows.js +0 -15
- package/dist/table/filter-rows.js.map +0 -1
package/dist/ecs/ecs/ecs.test.js
DELETED
|
@@ -1,399 +0,0 @@
|
|
|
1
|
-
/*MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.*/
|
|
22
|
-
import { describe, expect, test } from "vitest";
|
|
23
|
-
import { createECS } from "./ecs.js";
|
|
24
|
-
import { TrueSchema } from "../../core/schema/schemas.js";
|
|
25
|
-
const createEcsWithMassAndSize = () => {
|
|
26
|
-
return createECS()
|
|
27
|
-
.withComponents({
|
|
28
|
-
mass: { type: "number", minimum: 0 },
|
|
29
|
-
size: { enum: ["small", "medium", "large"] },
|
|
30
|
-
})
|
|
31
|
-
.withArchetypes({
|
|
32
|
-
physical: ["id", "mass", "size"],
|
|
33
|
-
sized: ["id", "size"],
|
|
34
|
-
})
|
|
35
|
-
.withResources({
|
|
36
|
-
gravity: 9.8,
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
describe("ECS", () => {
|
|
40
|
-
test("archetypes", () => {
|
|
41
|
-
const ecs = createEcsWithMassAndSize();
|
|
42
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
43
|
-
mass: 10,
|
|
44
|
-
size: "medium",
|
|
45
|
-
});
|
|
46
|
-
const b = ecs.createEntity(ecs.archetypes.physical, {
|
|
47
|
-
mass: 20,
|
|
48
|
-
size: "large",
|
|
49
|
-
});
|
|
50
|
-
expect(ecs.selectEntities(ecs.archetypes.physical)).toEqual([a, b]);
|
|
51
|
-
});
|
|
52
|
-
test("getEntityValues", () => {
|
|
53
|
-
const ecs = createEcsWithMassAndSize();
|
|
54
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
55
|
-
mass: 10,
|
|
56
|
-
size: "medium",
|
|
57
|
-
});
|
|
58
|
-
const b = ecs.createEntity(ecs.archetypes.sized, { size: "large" });
|
|
59
|
-
expect(ecs.getEntityValues(a, ecs.archetypes.physical)).toEqual({
|
|
60
|
-
id: a,
|
|
61
|
-
mass: 10,
|
|
62
|
-
size: "medium",
|
|
63
|
-
});
|
|
64
|
-
expect(ecs.getEntityValues(b, ecs.archetypes.physical)).toEqual(null);
|
|
65
|
-
expect(ecs.getEntityValues(b)).toEqual({ id: b, size: "large" });
|
|
66
|
-
expect(ecs.getEntityValues(-1, ecs.archetypes.physical)).toEqual(undefined);
|
|
67
|
-
});
|
|
68
|
-
test("selectEntityValues: basic", () => {
|
|
69
|
-
const ecs = createEcsWithMassAndSize();
|
|
70
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
71
|
-
mass: 10,
|
|
72
|
-
size: "medium",
|
|
73
|
-
});
|
|
74
|
-
const b = ecs.createEntity(ecs.archetypes.sized, { size: "large" });
|
|
75
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical)).toEqual([
|
|
76
|
-
{ id: a, mass: 10, size: "medium" },
|
|
77
|
-
]);
|
|
78
|
-
expect(ecs.selectEntityValues(ecs.archetypes.sized).sort()).toEqual([
|
|
79
|
-
{ id: a, mass: 10, size: "medium" },
|
|
80
|
-
{ id: b, size: "large" },
|
|
81
|
-
]);
|
|
82
|
-
});
|
|
83
|
-
test("selectEntityValues: with components", () => {
|
|
84
|
-
const ecs = createEcsWithMassAndSize();
|
|
85
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
86
|
-
mass: 10,
|
|
87
|
-
size: "medium",
|
|
88
|
-
});
|
|
89
|
-
const b = ecs.createEntity(ecs.archetypes.physical, {
|
|
90
|
-
mass: 20,
|
|
91
|
-
size: "large",
|
|
92
|
-
});
|
|
93
|
-
const c = ecs.createEntity(ecs.archetypes.physical, {
|
|
94
|
-
mass: 30,
|
|
95
|
-
size: "large",
|
|
96
|
-
});
|
|
97
|
-
const d = ecs.createEntity(ecs.archetypes.physical, {
|
|
98
|
-
mass: 40,
|
|
99
|
-
size: "small",
|
|
100
|
-
});
|
|
101
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, { components: ["size"] })).toEqual([
|
|
102
|
-
{ size: "medium" },
|
|
103
|
-
{ size: "large" },
|
|
104
|
-
{ size: "large" },
|
|
105
|
-
{ size: "small" },
|
|
106
|
-
]);
|
|
107
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, { components: ["id", "size"] })).toEqual([
|
|
108
|
-
{ id: a, size: "medium" },
|
|
109
|
-
{ id: b, size: "large" },
|
|
110
|
-
{ id: c, size: "large" },
|
|
111
|
-
{ id: d, size: "small" },
|
|
112
|
-
]);
|
|
113
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, { components: ["id", "size"], order: { id: true } })).toEqual([
|
|
114
|
-
{ id: a, size: "medium" },
|
|
115
|
-
{ id: b, size: "large" },
|
|
116
|
-
{ id: c, size: "large" },
|
|
117
|
-
{ id: d, size: "small" },
|
|
118
|
-
]);
|
|
119
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, { components: ["id", "size"], order: { id: false } })).toEqual([
|
|
120
|
-
{ id: d, size: "small" },
|
|
121
|
-
{ id: c, size: "large" },
|
|
122
|
-
{ id: b, size: "large" },
|
|
123
|
-
{ id: a, size: "medium" },
|
|
124
|
-
]);
|
|
125
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, { components: ["id", "size"], order: { size: true } })).toEqual([
|
|
126
|
-
{ id: b, size: "large" },
|
|
127
|
-
{ id: c, size: "large" },
|
|
128
|
-
{ id: a, size: "medium" },
|
|
129
|
-
{ id: d, size: "small" },
|
|
130
|
-
]);
|
|
131
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, { components: ["id", "size"], order: { size: true, id: false } })).toEqual([
|
|
132
|
-
{ id: c, size: "large" },
|
|
133
|
-
{ id: b, size: "large" },
|
|
134
|
-
{ id: a, size: "medium" },
|
|
135
|
-
{ id: d, size: "small" },
|
|
136
|
-
]);
|
|
137
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, { components: ["id"], order: { size: true, id: false } })).toEqual([
|
|
138
|
-
{ id: c },
|
|
139
|
-
{ id: b },
|
|
140
|
-
{ id: a },
|
|
141
|
-
{ id: d },
|
|
142
|
-
]);
|
|
143
|
-
expect(ecs.selectEntities(ecs.archetypes.physical, { order: { size: true, id: false } })).toEqual([
|
|
144
|
-
c, b, a, d
|
|
145
|
-
]);
|
|
146
|
-
});
|
|
147
|
-
test("selectEntityValues: without components", () => {
|
|
148
|
-
const ecs = createEcsWithMassAndSize()
|
|
149
|
-
.withComponents({
|
|
150
|
-
deleted: TrueSchema,
|
|
151
|
-
})
|
|
152
|
-
.withArchetypes({
|
|
153
|
-
physical_deleted: ["id", "mass", "size", "deleted"],
|
|
154
|
-
});
|
|
155
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
156
|
-
mass: 10,
|
|
157
|
-
size: "medium",
|
|
158
|
-
});
|
|
159
|
-
const b = ecs.createEntity(ecs.archetypes.physical_deleted, {
|
|
160
|
-
mass: 20,
|
|
161
|
-
size: "large",
|
|
162
|
-
deleted: true
|
|
163
|
-
});
|
|
164
|
-
const c = ecs.createEntity(ecs.archetypes.physical, {
|
|
165
|
-
mass: 30,
|
|
166
|
-
size: "large",
|
|
167
|
-
});
|
|
168
|
-
const d = ecs.createEntity(ecs.archetypes.physical_deleted, {
|
|
169
|
-
mass: 40,
|
|
170
|
-
size: "small",
|
|
171
|
-
deleted: true
|
|
172
|
-
});
|
|
173
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, { components: ["size"] })).toEqual([
|
|
174
|
-
{ size: "medium" },
|
|
175
|
-
{ size: "large" },
|
|
176
|
-
{ size: "large" },
|
|
177
|
-
{ size: "small" },
|
|
178
|
-
]);
|
|
179
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, { components: ["size"], without: ["deleted"] })).toEqual([
|
|
180
|
-
{ size: "medium" },
|
|
181
|
-
{ size: "large" },
|
|
182
|
-
]);
|
|
183
|
-
expect(ecs.selectEntities(ecs.archetypes.physical, { order: { size: true, id: false } })).toEqual([
|
|
184
|
-
c, b, a, d
|
|
185
|
-
]);
|
|
186
|
-
expect(ecs.selectEntities(ecs.archetypes.physical, { order: { size: true, id: false }, without: ["deleted"] })).toEqual([
|
|
187
|
-
c, a
|
|
188
|
-
]);
|
|
189
|
-
});
|
|
190
|
-
test("selectEntityValues: where", () => {
|
|
191
|
-
const ecs = createEcsWithMassAndSize();
|
|
192
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
193
|
-
mass: 10,
|
|
194
|
-
size: "medium",
|
|
195
|
-
});
|
|
196
|
-
const b = ecs.createEntity(ecs.archetypes.physical, {
|
|
197
|
-
mass: 20,
|
|
198
|
-
size: "large",
|
|
199
|
-
});
|
|
200
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, {
|
|
201
|
-
where: { size: "medium" },
|
|
202
|
-
})).toEqual([{ id: a, mass: 10, size: "medium" }]);
|
|
203
|
-
});
|
|
204
|
-
test("selectEntityValues: where with components", () => {
|
|
205
|
-
const ecs = createEcsWithMassAndSize();
|
|
206
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
207
|
-
mass: 10,
|
|
208
|
-
size: "medium",
|
|
209
|
-
});
|
|
210
|
-
const b = ecs.createEntity(ecs.archetypes.physical, {
|
|
211
|
-
mass: 20,
|
|
212
|
-
size: "large",
|
|
213
|
-
});
|
|
214
|
-
const c = ecs.createEntity(ecs.archetypes.physical, {
|
|
215
|
-
mass: 30,
|
|
216
|
-
size: "large",
|
|
217
|
-
});
|
|
218
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, {
|
|
219
|
-
components: ["id", "mass"],
|
|
220
|
-
where: { size: "large" }
|
|
221
|
-
})).toEqual([
|
|
222
|
-
{ id: b, mass: 20 },
|
|
223
|
-
{ id: c, mass: 30 }
|
|
224
|
-
]);
|
|
225
|
-
});
|
|
226
|
-
test("selectEntityValues: where with order", () => {
|
|
227
|
-
const ecs = createEcsWithMassAndSize();
|
|
228
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
229
|
-
mass: 10,
|
|
230
|
-
size: "medium",
|
|
231
|
-
});
|
|
232
|
-
const b = ecs.createEntity(ecs.archetypes.physical, {
|
|
233
|
-
mass: 20,
|
|
234
|
-
size: "large",
|
|
235
|
-
});
|
|
236
|
-
const c = ecs.createEntity(ecs.archetypes.physical, {
|
|
237
|
-
mass: 30,
|
|
238
|
-
size: "large",
|
|
239
|
-
});
|
|
240
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, {
|
|
241
|
-
where: { size: "large" },
|
|
242
|
-
order: { mass: false }
|
|
243
|
-
})).toEqual([
|
|
244
|
-
{ id: c, mass: 30, size: "large" },
|
|
245
|
-
{ id: b, mass: 20, size: "large" }
|
|
246
|
-
]);
|
|
247
|
-
});
|
|
248
|
-
test("selectEntityValues: where with components and order", () => {
|
|
249
|
-
const ecs = createEcsWithMassAndSize();
|
|
250
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
251
|
-
mass: 10,
|
|
252
|
-
size: "medium",
|
|
253
|
-
});
|
|
254
|
-
const b = ecs.createEntity(ecs.archetypes.physical, {
|
|
255
|
-
mass: 20,
|
|
256
|
-
size: "large",
|
|
257
|
-
});
|
|
258
|
-
const c = ecs.createEntity(ecs.archetypes.physical, {
|
|
259
|
-
mass: 30,
|
|
260
|
-
size: "large",
|
|
261
|
-
});
|
|
262
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, {
|
|
263
|
-
components: ["id", "mass"],
|
|
264
|
-
where: { size: "large" },
|
|
265
|
-
order: { mass: false }
|
|
266
|
-
})).toEqual([
|
|
267
|
-
{ id: c, mass: 30 },
|
|
268
|
-
{ id: b, mass: 20 }
|
|
269
|
-
]);
|
|
270
|
-
});
|
|
271
|
-
test("selectEntityValues: where with without option", () => {
|
|
272
|
-
const ecs = createEcsWithMassAndSize()
|
|
273
|
-
.withComponents({
|
|
274
|
-
deleted: TrueSchema,
|
|
275
|
-
})
|
|
276
|
-
.withArchetypes({
|
|
277
|
-
physical_deleted: ["id", "mass", "size", "deleted"],
|
|
278
|
-
});
|
|
279
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
280
|
-
mass: 10,
|
|
281
|
-
size: "medium",
|
|
282
|
-
});
|
|
283
|
-
const b = ecs.createEntity(ecs.archetypes.physical_deleted, {
|
|
284
|
-
mass: 20,
|
|
285
|
-
size: "large",
|
|
286
|
-
deleted: true
|
|
287
|
-
});
|
|
288
|
-
const c = ecs.createEntity(ecs.archetypes.physical, {
|
|
289
|
-
mass: 30,
|
|
290
|
-
size: "large",
|
|
291
|
-
});
|
|
292
|
-
const d = ecs.createEntity(ecs.archetypes.physical_deleted, {
|
|
293
|
-
mass: 40,
|
|
294
|
-
size: "small",
|
|
295
|
-
deleted: true
|
|
296
|
-
});
|
|
297
|
-
// where + without
|
|
298
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, {
|
|
299
|
-
where: { size: "large" },
|
|
300
|
-
without: ["deleted"]
|
|
301
|
-
})).toEqual([
|
|
302
|
-
{ id: c, mass: 30, size: "large" }
|
|
303
|
-
]);
|
|
304
|
-
// where + without + components
|
|
305
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, {
|
|
306
|
-
components: ["id", "size"],
|
|
307
|
-
where: {
|
|
308
|
-
mass: {
|
|
309
|
-
">": 15
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
without: ["deleted"]
|
|
313
|
-
})).toEqual([
|
|
314
|
-
{ id: c, size: "large" }
|
|
315
|
-
]);
|
|
316
|
-
// where + without + order
|
|
317
|
-
expect(ecs.selectEntities(ecs.archetypes.physical, {
|
|
318
|
-
where: {
|
|
319
|
-
mass: {
|
|
320
|
-
">": 15
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
without: ["deleted"],
|
|
324
|
-
order: { size: true }
|
|
325
|
-
})).toEqual([c]);
|
|
326
|
-
});
|
|
327
|
-
test("selectEntityValues: edge cases for where function", () => {
|
|
328
|
-
const ecs = createEcsWithMassAndSize();
|
|
329
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
330
|
-
mass: 10,
|
|
331
|
-
size: "medium",
|
|
332
|
-
});
|
|
333
|
-
const b = ecs.createEntity(ecs.archetypes.physical, {
|
|
334
|
-
mass: 20,
|
|
335
|
-
size: "large",
|
|
336
|
-
});
|
|
337
|
-
// Empty result with where
|
|
338
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, {
|
|
339
|
-
where: { size: "small" }
|
|
340
|
-
})).toEqual([]);
|
|
341
|
-
// Where with complex condition
|
|
342
|
-
expect(ecs.selectEntityValues(ecs.archetypes.physical, {
|
|
343
|
-
where: {
|
|
344
|
-
mass: {
|
|
345
|
-
">": 5,
|
|
346
|
-
"<": 15
|
|
347
|
-
},
|
|
348
|
-
size: {
|
|
349
|
-
"!=": "small"
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
})).toEqual([
|
|
353
|
-
{ id: a, mass: 10, size: "medium" }
|
|
354
|
-
]);
|
|
355
|
-
});
|
|
356
|
-
test("selectEntities: where", () => {
|
|
357
|
-
const ecs = createEcsWithMassAndSize();
|
|
358
|
-
const a = ecs.createEntity(ecs.archetypes.physical, {
|
|
359
|
-
mass: 10,
|
|
360
|
-
size: "medium",
|
|
361
|
-
});
|
|
362
|
-
const b = ecs.createEntity(ecs.archetypes.physical, {
|
|
363
|
-
mass: 20,
|
|
364
|
-
size: "large",
|
|
365
|
-
});
|
|
366
|
-
const c = ecs.createEntity(ecs.archetypes.physical, {
|
|
367
|
-
mass: 30,
|
|
368
|
-
size: "large",
|
|
369
|
-
});
|
|
370
|
-
expect(ecs.selectEntities(ecs.archetypes.physical, {
|
|
371
|
-
where: { size: "large" },
|
|
372
|
-
})).toEqual([b, c]);
|
|
373
|
-
expect(ecs.selectEntities(ecs.archetypes.physical, {
|
|
374
|
-
where: { size: "medium" },
|
|
375
|
-
})).toEqual([a]);
|
|
376
|
-
});
|
|
377
|
-
});
|
|
378
|
-
{
|
|
379
|
-
// some type checks.
|
|
380
|
-
const ecs = createECS()
|
|
381
|
-
.withComponents({
|
|
382
|
-
position: { type: "string" },
|
|
383
|
-
})
|
|
384
|
-
.withComponents({
|
|
385
|
-
size: { type: "number" },
|
|
386
|
-
})
|
|
387
|
-
.withResources({
|
|
388
|
-
gravity: 9.8,
|
|
389
|
-
})
|
|
390
|
-
.withResources({
|
|
391
|
-
time: 0,
|
|
392
|
-
})
|
|
393
|
-
.withArchetypes({
|
|
394
|
-
position_size: ["id", "position", "size"],
|
|
395
|
-
position: ["id", "position"],
|
|
396
|
-
});
|
|
397
|
-
const entityValues = ecs.selectEntityValues(ecs.archetypes.position);
|
|
398
|
-
}
|
|
399
|
-
//# sourceMappingURL=ecs.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ecs.test.js","sourceRoot":"","sources":["../../../src/ecs/ecs/ecs.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI1D,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,OAAO,SAAS,EAAE;SACf,cAAc,CAAC;QACd,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;QACpC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ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AE,IAAI,EAAE,QAAQ,EAAE;SAC1B,CAAC,CACH,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAGH,CAAC;IACC,qBAAqB;IACrB,MAAM,GAAG,GAAG,SAAS,EAAE;SACpB,cAAc,CAAC;QACd,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KACpB,CAAC;SACV,cAAc,CAAC;QACd,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAChB,CAAC;SACV,aAAa,CAAC;QACb,OAAO,EAAE,GAAG;KACb,CAAC;SACD,aAAa,CAAC;QACb,IAAI,EAAE,CAAC;KACR,CAAC;SACD,cAAc,CAAC;QACd,aAAa,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC;QACzC,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC;KAC7B,CAAC,CAAA;IAEJ,MAAM,YAAY,GAAG,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAiBvE,CAAC"}
|
package/dist/ecs/ecs/index.d.ts
DELETED
package/dist/ecs/ecs/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecs/ecs/index.ts"],"names":[],"mappings":"AAsBA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function registerTypedBufferCodec(): void;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.*/
|
|
22
|
-
import { registerCodec } from "../../functions/serialization/codec.js";
|
|
23
|
-
export function registerTypedBufferCodec() {
|
|
24
|
-
registerCodec({
|
|
25
|
-
name: "typed-buffer",
|
|
26
|
-
predicate: (value) => false,
|
|
27
|
-
serialize: (data) => {
|
|
28
|
-
throw new Error("not yet implemented");
|
|
29
|
-
},
|
|
30
|
-
deserialize: ({ json, binary }) => {
|
|
31
|
-
throw new Error("not implemented yet");
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=register-database-codec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"register-database-codec.js","sourceRoot":"","sources":["../../../src/ecs/entity-location-table/register-database-codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE,MAAM,UAAU,wBAAwB;IACpC,aAAa,CAAW;QACpB,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,CAAC,KAAc,EAAqB,EAAE,CAAC,KAAK;QACvD,SAAS,EAAE,CAAC,IAAc,EAAE,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3C,CAAC;QACD,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAwC,EAAE,EAAE;YACpE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3C,CAAC;KACJ,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function registerEntityLocationTableCodec(): void;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.*/
|
|
22
|
-
import { registerCodec } from "../../functions/serialization/codec.js";
|
|
23
|
-
import { restoreEntityLocationTable } from "./create-entity-location-table.js";
|
|
24
|
-
function isEntityLocationTable(value) {
|
|
25
|
-
return value !== null && typeof value === "object" && "create" in value && "update" in value && "delete" in value && "locate" in value && "serialize" in value;
|
|
26
|
-
}
|
|
27
|
-
export function registerEntityLocationTableCodec() {
|
|
28
|
-
registerCodec({
|
|
29
|
-
name: "entity-location-table",
|
|
30
|
-
predicate: isEntityLocationTable,
|
|
31
|
-
serialize: (data) => {
|
|
32
|
-
return data.serialize();
|
|
33
|
-
},
|
|
34
|
-
deserialize: ({ json, binary }) => {
|
|
35
|
-
return restoreEntityLocationTable({
|
|
36
|
-
json: json ?? {},
|
|
37
|
-
binary: binary ?? []
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=register-entity-location-table-codec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"register-entity-location-table-codec.js","sourceRoot":"","sources":["../../../src/ecs/entity-location-table/register-entity-location-table-codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAkB,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAG/E,SAAS,qBAAqB,CAAC,KAAc;IACzC,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAI,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,WAAW,IAAI,KAAK,CAAC;AACnK,CAAC;AAED,MAAM,UAAU,gCAAgC;IAC5C,aAAa,CAAsB;QAC/B,IAAI,EAAE,uBAAuB;QAC7B,SAAS,EAAE,qBAAqB;QAChC,SAAS,EAAE,CAAC,IAAyB,EAAE,EAAE;YACrC,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,CAAC;QACD,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAkB,EAAE,EAAE;YAC9C,OAAO,0BAA0B,CAAC;gBAC9B,IAAI,EAAE,IAAI,IAAI,EAAE;gBAChB,MAAM,EAAE,MAAM,IAAI,EAAE;aACvB,CAAC,CAAC;QACP,CAAC;KACJ,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { createEntityLocationTable } from "./create-entity-location-table.js";
|
|
3
|
-
import { getCodec } from "../../functions/serialization/codec.js";
|
|
4
|
-
describe("EntityLocationTable Codec", () => {
|
|
5
|
-
it("should serialize and deserialize EntityLocationTable correctly", () => {
|
|
6
|
-
// Create a table and add some entities
|
|
7
|
-
const table = createEntityLocationTable(4);
|
|
8
|
-
const entity1 = table.create({ archetype: 1, row: 10 });
|
|
9
|
-
const entity2 = table.create({ archetype: 2, row: 20 });
|
|
10
|
-
const entity3 = table.create({ archetype: 3, row: 30 });
|
|
11
|
-
// Update an entity
|
|
12
|
-
table.update(entity2, { archetype: 5, row: 25 });
|
|
13
|
-
// Delete an entity
|
|
14
|
-
table.delete(entity1);
|
|
15
|
-
// Get the codec
|
|
16
|
-
const codec = getCodec("entity-location-table");
|
|
17
|
-
expect(codec).not.toBeNull();
|
|
18
|
-
// Verify predicate works
|
|
19
|
-
expect(codec.predicate(table)).toBe(true);
|
|
20
|
-
expect(codec.predicate({})).toBe(false);
|
|
21
|
-
expect(codec.predicate(null)).toBe(false);
|
|
22
|
-
// Serialize
|
|
23
|
-
const serialized = codec.serialize(table);
|
|
24
|
-
expect(serialized.json).toBeDefined();
|
|
25
|
-
expect(serialized.binary).toBeDefined();
|
|
26
|
-
expect(serialized.binary.length).toBeGreaterThan(0);
|
|
27
|
-
// Deserialize
|
|
28
|
-
const restored = codec.deserialize(serialized);
|
|
29
|
-
expect(restored).toBeDefined();
|
|
30
|
-
// Verify the restored table has the same behavior
|
|
31
|
-
expect(restored.locate(entity1)).toBeNull(); // Deleted entity
|
|
32
|
-
expect(restored.locate(entity2)).toEqual({ archetype: 5, row: 25 }); // Updated entity
|
|
33
|
-
expect(restored.locate(entity3)).toEqual({ archetype: 3, row: 30 }); // Unchanged entity
|
|
34
|
-
// Verify we can still create new entities
|
|
35
|
-
const newEntity = restored.create({ archetype: 4, row: 40 });
|
|
36
|
-
expect(restored.locate(newEntity)).toEqual({ archetype: 4, row: 40 });
|
|
37
|
-
});
|
|
38
|
-
it("should handle empty table", () => {
|
|
39
|
-
const table = createEntityLocationTable();
|
|
40
|
-
const codec = getCodec("entity-location-table");
|
|
41
|
-
const serialized = codec.serialize(table);
|
|
42
|
-
const restored = codec.deserialize(serialized);
|
|
43
|
-
// Verify we can create entities in the restored table
|
|
44
|
-
const entity = restored.create({ archetype: 1, row: 10 });
|
|
45
|
-
expect(restored.locate(entity)).toEqual({ archetype: 1, row: 10 });
|
|
46
|
-
});
|
|
47
|
-
it("should preserve free list after delete operations", () => {
|
|
48
|
-
const table = createEntityLocationTable(4);
|
|
49
|
-
// Create and delete entities to build up free list
|
|
50
|
-
const entity1 = table.create({ archetype: 1, row: 10 });
|
|
51
|
-
const entity2 = table.create({ archetype: 2, row: 20 });
|
|
52
|
-
const entity3 = table.create({ archetype: 3, row: 30 });
|
|
53
|
-
table.delete(entity2);
|
|
54
|
-
table.delete(entity1);
|
|
55
|
-
const codec = getCodec("entity-location-table");
|
|
56
|
-
const serialized = codec.serialize(table);
|
|
57
|
-
const restored = codec.deserialize(serialized);
|
|
58
|
-
// Verify free list is preserved by checking that deleted entities are still null
|
|
59
|
-
expect(restored.locate(entity1)).toBeNull();
|
|
60
|
-
expect(restored.locate(entity2)).toBeNull();
|
|
61
|
-
expect(restored.locate(entity3)).toEqual({ archetype: 3, row: 30 });
|
|
62
|
-
// Verify we can reuse freed slots
|
|
63
|
-
const newEntity1 = restored.create({ archetype: 4, row: 40 });
|
|
64
|
-
const newEntity2 = restored.create({ archetype: 5, row: 50 });
|
|
65
|
-
// The new entities should reuse the freed slots
|
|
66
|
-
expect(newEntity1).toBe(entity1);
|
|
67
|
-
expect(newEntity2).toBe(entity2);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=register-entity-location-table-codec.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"register-entity-location-table-codec.test.js","sourceRoot":"","sources":["../../../src/ecs/entity-location-table/register-entity-location-table-codec.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAElE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACtE,uCAAuC;QACvC,MAAM,KAAK,GAAG,yBAAyB,CAAC,CAAC,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QAExD,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AAE,EAAE,EAAE,CAAC,CAAC;QAE9D,gDAAgD;QAChD,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Database } from "../database/database.js";
|
|
2
|
-
import { PersistenceFileId, PersistenceService } from "./persistence-service.js";
|
|
3
|
-
export declare const createPersistenceService: (options: {
|
|
4
|
-
database: Database;
|
|
5
|
-
autoSave?: PersistenceFileId;
|
|
6
|
-
}) => PersistenceService;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createObservableState } from "../../observe/create-observable-state.js";
|
|
2
|
-
export const createPersistenceService = (options) => {
|
|
3
|
-
const { database, autoSave } = options;
|
|
4
|
-
const [status, setStatus] = createObservableState(null);
|
|
5
|
-
const service = {
|
|
6
|
-
serviceName: "persistence-service",
|
|
7
|
-
status,
|
|
8
|
-
save: async (id) => {
|
|
9
|
-
setStatus("saving");
|
|
10
|
-
},
|
|
11
|
-
load: async (id) => {
|
|
12
|
-
setStatus("loading");
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
if (autoSave) {
|
|
16
|
-
database.observe.transactions(t => {
|
|
17
|
-
if (!t.transient) {
|
|
18
|
-
service.save(autoSave);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return service;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=create-persistence-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-persistence-service.js","sourceRoot":"","sources":["../../../src/ecs/persistence-service/create-persistence-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAIjF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACpC,OAGC,EACiB,EAAE;IACpB,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAEvC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,qBAAqB,CAAoB,IAAI,CAAC,CAAC;IAE3E,MAAM,OAAO,GAAG;QACZ,WAAW,EAAE,qBAAqB;QAClC,MAAM;QACN,IAAI,EAAE,KAAK,EAAE,EAAqB,EAAE,EAAE;YAClC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,EAAE,KAAK,EAAE,EAAqB,EAAE,EAAE;YAClC,SAAS,CAAC,SAAS,CAAC,CAAC;QACzB,CAAC;KACJ,CAAA;IAED,IAAI,QAAQ,EAAE,CAAC;QACX,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE;YAC9B,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;gBACf,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC3B,CAAC;QACL,CAAC,CAAC,CAAA;IACN,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC"}
|