@adobe/data 0.4.3 → 0.4.5
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/ecs/database/database-schema/create-database-from-schema.d.ts +12 -0
- package/dist/ecs/database/database-schema/create-database-from-schema.js +8 -0
- package/dist/ecs/database/database-schema/create-database-from-schema.js.map +1 -0
- package/dist/ecs/database/database-schema/create-database-schema.d.ts +4 -4
- package/dist/ecs/database/database-schema/create-database-schema.js.map +1 -1
- package/dist/ecs/database/database-schema/database-schema.d.ts +1 -1
- package/dist/ecs/database/database.d.ts +1 -1
- package/dist/ecs/index.d.ts +1 -0
- package/dist/ecs/index.js +1 -0
- package/dist/ecs/index.js.map +1 -1
- package/dist/ecs/persistence-service/create-storage-persistence-service.d.ts +9 -0
- package/dist/{core/data.js → ecs/persistence-service/create-storage-persistence-service.js} +26 -29
- package/dist/ecs/persistence-service/create-storage-persistence-service.js.map +1 -0
- package/dist/ecs/persistence-service/index.d.ts +2 -0
- package/dist/ecs/{action-ecs → persistence-service}/index.js +2 -1
- package/dist/ecs/persistence-service/index.js.map +1 -0
- package/dist/ecs/persistence-service/persistence-service.d.ts +2 -6
- package/dist/ecs/persistence-service/persistence-service.js +0 -21
- package/dist/ecs/persistence-service/persistence-service.js.map +1 -1
- package/dist/ecs/undo-redo/create-undo-redo-actions.js +0 -21
- package/dist/ecs/undo-redo/create-undo-redo-actions.js.map +1 -1
- package/dist/ecs/undo-redo/create-undo-redo-actions.test.js.map +1 -1
- package/dist/functions/serialization/deserialize.d.ts +4 -1
- package/dist/functions/serialization/deserialize.js +14 -1
- package/dist/functions/serialization/deserialize.js.map +1 -1
- package/dist/functions/serialization/serialization.d.ts +23 -0
- package/dist/functions/serialization/serialization.js +58 -0
- package/dist/functions/serialization/serialization.js.map +1 -0
- package/dist/functions/serialization.d.ts +23 -0
- package/dist/functions/serialization.js +58 -0
- package/dist/functions/serialization.js.map +1 -0
- package/dist/{core/schema/validation/is-valid.test.js → functions/serialization.test.js} +20 -16
- package/dist/functions/serialization.test.js.map +1 -0
- package/dist/functions/serialize.d.ts +17 -0
- package/dist/functions/serialize.js +66 -0
- package/dist/functions/serialize.js.map +1 -0
- package/dist/observe/to-async-generator.js +14 -11
- package/dist/observe/to-async-generator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -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 +0 -29
- package/dist/cache/functions/omit.js.map +0 -1
- package/dist/cache/functions/types.d.ts +0 -1
- package/dist/cache/functions/types.js +0 -23
- package/dist/cache/functions/types.js.map +0 -1
- package/dist/core/data.d.ts +0 -22
- package/dist/core/data.js.map +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 +0 -25
- 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.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.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/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/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/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/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/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/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/{core/data.test.d.ts → functions/serialization.test.d.ts} +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Uses datacache to store results so we can avoid expensive recomputations of the same input.
|
|
3
|
-
* This function also uses preventParallelExecution to prevent multiple executions of the same function at the same time with the same arguments.
|
|
4
|
-
* @param fn The function to memoize by storing results in the DataCache.
|
|
5
|
-
* @param version The version of this function. If the function changes this must also change
|
|
6
|
-
* to avoid returning stale results from an older version of the function.
|
|
7
|
-
* @param name The name of this function which should be application unique to avoid hash collisions.
|
|
8
|
-
* @returns A function with the same signature but memoized results.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Recursively merges 2 pieces of `Data`, returns new `Data`.
|
|
12
|
-
* Inputs are not mutated.
|
|
13
|
-
*
|
|
14
|
-
* @param {Data} a First piece of `Data`.
|
|
15
|
-
* @param {Data} b The second piece of `Data`.
|
|
16
|
-
* @returns {Object} Returns new `Data`.
|
|
17
|
-
* @example
|
|
18
|
-
*
|
|
19
|
-
* const one = {
|
|
20
|
-
* 'a': [{ 'b': 2 }, { 'd': 4 }]
|
|
21
|
-
* };
|
|
22
|
-
*
|
|
23
|
-
* const other = {
|
|
24
|
-
* 'a': [{ 'c': 3 }, { 'e': 5 }]
|
|
25
|
-
* };
|
|
26
|
-
*
|
|
27
|
-
* deepMerge(one, other);
|
|
28
|
-
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
|
|
29
|
-
*/
|
|
30
|
-
export const deepMerge = (a, b, options = {}) => {
|
|
31
|
-
const { mergeArrays = true } = options;
|
|
32
|
-
// Handle null/undefined cases
|
|
33
|
-
if (a == null || typeof a !== 'object' || typeof b !== 'object')
|
|
34
|
-
return b;
|
|
35
|
-
// Handle arrays
|
|
36
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
37
|
-
if (mergeArrays) {
|
|
38
|
-
return [...a, ...b];
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return b;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// Handle objects
|
|
45
|
-
const result = { ...a };
|
|
46
|
-
for (const key in b) {
|
|
47
|
-
if (Object.prototype.hasOwnProperty.call(b, key)) {
|
|
48
|
-
const value = b[key];
|
|
49
|
-
result[key] = deepMerge(a[key], value, options);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return result;
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=deep-merge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deep-merge.js","sourceRoot":"","sources":["../../../src/core/functions/deep-merge.ts"],"names":[],"mappings":"AAuBA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAO,CAAI,EAAE,CAAI,EAAE,UAAqC,EAAE,EAAS,EAAE;IAC5F,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IACvC,8BAA8B;IAC9B,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAU,CAAC;IAEnF,gBAAgB;IAChB,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,IAAI,WAAW,EAAE,CAAC;YAChB,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAqB,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,OAAO,CAAU,CAAC;QACpB,CAAC;IACH,CAAC;IAED,iBAAiB;IACjB,MAAM,MAAM,GAAG,EAAE,GAAG,CAAC,EAA0B,CAAC;IAChD,KAAK,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;QACpB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;YACjD,MAAM,KAAK,GAAI,CAA0B,CAAC,GAAG,CAAC,CAAC;YAC/C,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAE,CAA0B,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,OAAO,MAAe,CAAC;AACzB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,94 +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 { deepMerge } from './deep-merge.js';
|
|
23
|
-
import { assert } from 'riteway/vitest';
|
|
24
|
-
import { describe, test } from 'vitest';
|
|
25
|
-
describe('deepMerge', () => {
|
|
26
|
-
test('should merge two objects', () => {
|
|
27
|
-
const a = { a: 1, b: 2 };
|
|
28
|
-
const b = { c: 3, d: 4 };
|
|
29
|
-
assert({
|
|
30
|
-
given: 'two objects without overlapping keys',
|
|
31
|
-
should: 'merge them',
|
|
32
|
-
actual: deepMerge(a, b),
|
|
33
|
-
expected: { a: 1, b: 2, c: 3, d: 4 },
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
test('should merge two objects with overlapping keys', () => {
|
|
37
|
-
const a = { a: 1, b: 2 };
|
|
38
|
-
const b = { b: 3, c: 4 };
|
|
39
|
-
assert({
|
|
40
|
-
given: 'two objects with overlapping keys',
|
|
41
|
-
should: 'merge them',
|
|
42
|
-
actual: deepMerge(a, b),
|
|
43
|
-
expected: { a: 1, b: 3, c: 4 },
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
test('should merge two objects with overlapping keys and arrays', () => {
|
|
47
|
-
const a = { a: 1, b: [1, 2] };
|
|
48
|
-
const b = { b: [3, 4], c: 4 };
|
|
49
|
-
assert({
|
|
50
|
-
given: 'two objects with overlapping keys and arrays',
|
|
51
|
-
should: 'merge them',
|
|
52
|
-
actual: deepMerge(a, b),
|
|
53
|
-
expected: { a: 1, b: [1, 2, 3, 4], c: 4 },
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
test('should merge two nested objects with overlapping keys', () => {
|
|
57
|
-
const a = { a: 1, b: { c: 2, d: 3 } };
|
|
58
|
-
const b = { b: { d: 4, e: 5 }, c: 6 };
|
|
59
|
-
assert({
|
|
60
|
-
given: 'two nested objects with overlapping keys',
|
|
61
|
-
should: 'merge them',
|
|
62
|
-
actual: deepMerge(a, b),
|
|
63
|
-
expected: { a: 1, b: { c: 2, d: 4, e: 5 }, c: 6 },
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
test('should merge two objects with null values', () => {
|
|
67
|
-
const a = { a: null, b: 2 };
|
|
68
|
-
const b = { b: null, c: 4 };
|
|
69
|
-
assert({
|
|
70
|
-
given: 'two objects with null values',
|
|
71
|
-
should: 'merge them',
|
|
72
|
-
actual: deepMerge(a, b),
|
|
73
|
-
expected: { a: null, b: null, c: 4 },
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
test('should merge two objects with undefined values', () => {
|
|
77
|
-
const a = { a: undefined, b: 2 };
|
|
78
|
-
const b = { b: undefined, c: 4 };
|
|
79
|
-
assert({
|
|
80
|
-
given: 'two objects with undefined values',
|
|
81
|
-
should: 'merge them',
|
|
82
|
-
actual: deepMerge(a, b),
|
|
83
|
-
expected: { a: undefined, b: undefined, c: 4 },
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
test('should not mutate the original objects', () => {
|
|
87
|
-
const a = { a: 1, b: 2 };
|
|
88
|
-
const b = { b: 3, c: 4 };
|
|
89
|
-
deepMerge(a, b);
|
|
90
|
-
assert({ given: 'the original objects', should: 'not be mutated', actual: a, expected: { a: 1, b: 2 } });
|
|
91
|
-
assert({ given: 'the original objects', should: 'not be mutated', actual: b, expected: { b: 3, c: 4 } });
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
//# sourceMappingURL=deep-merge.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deep-merge.test.js","sourceRoot":"","sources":["../../../src/core/functions/deep-merge.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAExC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE;QACpC,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACzB,MAAM,CAAC;YACL,KAAK,EAAE,sCAAsC;YAC7C,MAAM,EAAE,YAAY;YACpB,MAAM,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;YACvB,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;SACrC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,gDAAgD,EAAE,GAAG,EAAE;QAC1D,MAAM,CAAC,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CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAClD,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACzB,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChB,MAAM,CAAC,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACzG,MAAM,CAAC,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3G,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,25 +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
|
-
export * from './array-equals.js';
|
|
23
|
-
export * from './is-async-generator.js';
|
|
24
|
-
export * from './deep-merge.js';
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/functions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isAsyncGenerator<T>(value: any): value is AsyncGenerator<T>;
|
|
@@ -1,25 +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
|
-
export function isAsyncGenerator(value) {
|
|
23
|
-
return value && typeof value[Symbol.asyncIterator] === 'function';
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=is-async-generator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-async-generator.js","sourceRoot":"","sources":["../../../src/core/functions/is-async-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,MAAM,UAAU,gBAAgB,CAAI,KAAU;IAC1C,OAAO,KAAK,IAAI,OAAO,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,UAAU,CAAC;AACtE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isPromise<T = unknown>(obj: unknown): obj is Promise<T>;
|
|
@@ -1,26 +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
|
-
export function isPromise(obj) {
|
|
23
|
-
const maybePromise = obj;
|
|
24
|
-
return (!!maybePromise && (typeof maybePromise === 'object' || typeof maybePromise === 'function') && typeof maybePromise?.then === 'function');
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=is-promise.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-promise.js","sourceRoot":"","sources":["../../../src/core/functions/is-promise.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,MAAM,UAAU,SAAS,CAAc,GAAY;IAC/C,MAAM,YAAY,GAAG,GAAsC,CAAC;IAC5D,OAAO,CACH,CAAC,CAAC,YAAY,IAAI,CAAC,OAAO,YAAY,KAAK,QAAQ,IAAI,OAAO,YAAY,KAAK,UAAU,CAAC,IAAI,OAAO,YAAY,EAAE,IAAI,KAAK,UAAU,CACzI,CAAC;AACN,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Schema, FromSchema } from '../../index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Creates a function which can wrap another function and validate the input against a JSON Schema.
|
|
4
|
-
*/
|
|
5
|
-
export declare function withValidation<T extends Schema>(schema: T): <F extends (arg: FromSchema<T>) => any>(fn: F) => F;
|
|
@@ -1,38 +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 { Validator } from '@cfworker/json-schema';
|
|
23
|
-
/**
|
|
24
|
-
* Creates a function which can wrap another function and validate the input against a JSON Schema.
|
|
25
|
-
*/
|
|
26
|
-
export function withValidation(schema) {
|
|
27
|
-
const validator = new Validator(schema);
|
|
28
|
-
return function (fn) {
|
|
29
|
-
return function (arg) {
|
|
30
|
-
const validation = validator.validate(arg);
|
|
31
|
-
if (!validation.valid) {
|
|
32
|
-
throw new Error(`Validation failed: ${JSON.stringify(validation.errors)}`);
|
|
33
|
-
}
|
|
34
|
-
return fn.call(this, arg);
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=with-validation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"with-validation.js","sourceRoot":"","sources":["../../../src/core/functions/with-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,SAAS,EAAwB,MAAM,uBAAuB,CAAC;AAGxE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAmB,MAAS;IACtD,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,MAAoB,CAAC,CAAC;IAEtD,OAAO,UAAiD,EAAK;QACzD,OAAO,UAAqB,GAAkB;YAC1C,MAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAE3C,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CACX,sBAAsB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAC5D,CAAC;YACN,CAAC;YAED,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAM,CAAC;IACX,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,96 +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, it, expect } from 'vitest';
|
|
23
|
-
import { withValidation } from './with-validation.js';
|
|
24
|
-
// Define a test schema
|
|
25
|
-
const userSchema = {
|
|
26
|
-
type: 'object',
|
|
27
|
-
properties: {
|
|
28
|
-
name: { type: 'string' },
|
|
29
|
-
age: { type: 'number' },
|
|
30
|
-
foo: { type: 'string' },
|
|
31
|
-
email: { type: 'string', format: 'email' }
|
|
32
|
-
},
|
|
33
|
-
required: ['name', 'age', 'email']
|
|
34
|
-
};
|
|
35
|
-
describe('withValidation', () => {
|
|
36
|
-
it('should pass validation for valid input', () => {
|
|
37
|
-
const createUser = withValidation(userSchema)((user) => user);
|
|
38
|
-
const validUser = {
|
|
39
|
-
name: 'John Doe',
|
|
40
|
-
age: 30,
|
|
41
|
-
email: 'john@example.com'
|
|
42
|
-
};
|
|
43
|
-
expect(() => createUser(validUser)).not.toThrow();
|
|
44
|
-
expect(createUser(validUser)).toEqual(validUser);
|
|
45
|
-
});
|
|
46
|
-
it('should throw error for invalid input', () => {
|
|
47
|
-
const createUser = withValidation(userSchema)((user) => user);
|
|
48
|
-
const invalidUser = {
|
|
49
|
-
name: 'John Doe',
|
|
50
|
-
age: '30', // Should be a number
|
|
51
|
-
email: 'not-an-email'
|
|
52
|
-
};
|
|
53
|
-
expect(() => createUser(invalidUser)).toThrow(/Validation failed/);
|
|
54
|
-
});
|
|
55
|
-
it('should throw error for missing required fields', () => {
|
|
56
|
-
const createUser = withValidation(userSchema)((user) => user);
|
|
57
|
-
const incompleteUser = {
|
|
58
|
-
name: 'John Doe',
|
|
59
|
-
// Missing age and email
|
|
60
|
-
};
|
|
61
|
-
expect(() => createUser(incompleteUser)).toThrow(/Validation failed/);
|
|
62
|
-
});
|
|
63
|
-
it('should preserve function return type', () => {
|
|
64
|
-
const processUser = withValidation(userSchema)((user) => ({
|
|
65
|
-
...user,
|
|
66
|
-
processed: true
|
|
67
|
-
}));
|
|
68
|
-
const result = processUser({
|
|
69
|
-
name: 'John Doe',
|
|
70
|
-
age: 30,
|
|
71
|
-
email: 'john@example.com'
|
|
72
|
-
});
|
|
73
|
-
expect(result).toEqual({
|
|
74
|
-
name: 'John Doe',
|
|
75
|
-
age: 30,
|
|
76
|
-
email: 'john@example.com',
|
|
77
|
-
processed: true
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
it("should pass 'this' context to the wrapped function", () => {
|
|
81
|
-
const context = { value: 42 };
|
|
82
|
-
const fn = function (user) {
|
|
83
|
-
return this.value;
|
|
84
|
-
};
|
|
85
|
-
const wrapped = withValidation(userSchema)(fn);
|
|
86
|
-
const validUser = {
|
|
87
|
-
name: 'Jane Doe',
|
|
88
|
-
age: 25,
|
|
89
|
-
email: 'jane@example.com'
|
|
90
|
-
};
|
|
91
|
-
// Bind context and call
|
|
92
|
-
const result = wrapped.call(context, validUser);
|
|
93
|
-
expect(result).toBe(42);
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
//# sourceMappingURL=with-validation.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"with-validation.test.js","sourceRoot":"","sources":["../../../src/core/functions/with-validation.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,uBAAuB;AACvB,MAAM,UAAU,GAAG;IACf,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACxB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACvB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACvB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE;KAC7C;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEX,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAC9C,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,IAAmC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QAE7F,MAAM,SAAS,GAAG;YACd,IAAI,EAAE,UAAU;YAChB,GAAG,EAAE,EAAE;YACP,KAAK,EAAE,kBAAkB;SAC5B,CAAC;QAEF,MAAM,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CA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CAAC,OAAO,CAAC;YACnB,IAAI,EAAE,UAAU;YAChB,GAAG,EAAE,EAAE;YACP,KAAK,EAAE,kBAAkB;YACzB,SAAS,EAAE,IAAI;SAClB,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC1D,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QAC9B,MAAM,EAAE,GAAG,UAAgC,IAAmC;YAC1E,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC,CAAC;QACF,MAAM,OAAO,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;QAC/C,MAAM,SAAS,GAAG;YACd,IAAI,EAAE,UAAU;YAChB,GAAG,EAAE,EAAE;YACP,KAAK,EAAE,kBAAkB;SAC5B,CAAC;QACF,wBAAwB;QACxB,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAChD,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
package/dist/core/index.d.ts
DELETED
package/dist/core/index.js
DELETED
|
@@ -1,25 +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
|
-
export * from "./data.js";
|
|
23
|
-
export * from "./schema/index.js";
|
|
24
|
-
export * from "./functions/index.js";
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAA"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Data } from "../../../index.js";
|
|
2
|
-
import { Schema } from "../schema.js";
|
|
3
|
-
type JSONPath = string;
|
|
4
|
-
type JSONMergePatch = Data;
|
|
5
|
-
/**
|
|
6
|
-
* Conditional patch applied to the path when the enclosing schema branch is active
|
|
7
|
-
* and `match` is not present or validates against the root.
|
|
8
|
-
*/
|
|
9
|
-
export interface Conditional {
|
|
10
|
-
readonly match?: Schema;
|
|
11
|
-
readonly path: JSONPath;
|
|
12
|
-
readonly value: JSONMergePatch;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* A Dynamic Schema extends a base schema with conditional behaviour
|
|
16
|
-
* based upon the current state of the data the schema describes.
|
|
17
|
-
*/
|
|
18
|
-
export type DynamicSchema<B extends Schema> = B & {
|
|
19
|
-
readonly conditionals?: readonly Conditional[];
|
|
20
|
-
readonly items?: DynamicSchema<B>;
|
|
21
|
-
readonly properties?: {
|
|
22
|
-
readonly [key: string]: DynamicSchema<B>;
|
|
23
|
-
};
|
|
24
|
-
readonly additionalProperties?: boolean | DynamicSchema<B>;
|
|
25
|
-
readonly oneOf?: readonly DynamicSchema<B>[];
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-schema.js","sourceRoot":"","sources":["../../../../src/core/schema/dynamic/dynamic-schema.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Schema } from "../schema.js";
|
|
2
|
-
import { PathComponent } from "jsonpath";
|
|
3
|
-
export type EnumeratePatch = {
|
|
4
|
-
/** The path to the target node. */
|
|
5
|
-
path: PathComponent[];
|
|
6
|
-
/** The fragment that will be patched into the target. */
|
|
7
|
-
fragment: unknown;
|
|
8
|
-
};
|
|
9
|
-
export declare function enumeratePatches(currentSchema: Schema, currentValue: unknown, rootValue?: unknown, rootSchema?: Schema, currentPath?: PathComponent[], localPath?: PathComponent[]): Generator<EnumeratePatch>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import jp from "jsonpath";
|
|
2
|
-
import { isValid } from "../validation/is-valid.js";
|
|
3
|
-
export function* enumeratePatches(currentSchema, currentValue, rootValue = currentValue, rootSchema = currentSchema, currentPath = ["$"], localPath = ["$"]) {
|
|
4
|
-
if (currentValue === undefined || currentValue === null) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
// local conditionals
|
|
8
|
-
for (const c of currentSchema.conditionals ?? []) {
|
|
9
|
-
// get the value of the current path
|
|
10
|
-
const localValue = jp.value(rootValue, jp.stringify(localPath));
|
|
11
|
-
// if (currentSchema.conditionals) {
|
|
12
|
-
// console.log("enumeratePatches", JSON.stringify(c, null, 2));
|
|
13
|
-
// // console.log("currentPath", currentPath);
|
|
14
|
-
// // console.log("localPath", localPath);
|
|
15
|
-
// console.log("localValue", localValue);
|
|
16
|
-
// }
|
|
17
|
-
if (!c.match || isValid(c.match, localValue)) {
|
|
18
|
-
// jsonpath.query returns *values*, not references to
|
|
19
|
-
// the parent object. We use jp.paths to get the JSONPaths
|
|
20
|
-
// of selected nodes, then query again to fetch each node.
|
|
21
|
-
for (const p of jp.paths(rootSchema, c.path)) {
|
|
22
|
-
yield { path: p, fragment: c.value };
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
// recurse
|
|
27
|
-
// items
|
|
28
|
-
if (currentSchema.items && Array.isArray(currentValue)) {
|
|
29
|
-
for (const [i, childSchema] of Object.entries(currentSchema.items)) {
|
|
30
|
-
for (const val of currentValue) {
|
|
31
|
-
yield* enumeratePatches(childSchema, val, rootValue, rootSchema, [...currentPath, "items", i], [...localPath, i]);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
// properties
|
|
36
|
-
if (currentSchema.properties && typeof currentValue === "object") {
|
|
37
|
-
for (const [k, childSchema] of Object.entries(currentSchema.properties)) {
|
|
38
|
-
yield* enumeratePatches(childSchema, currentValue[k], rootValue, rootSchema, [...currentPath, "properties", k], [...localPath, k]);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
// oneOf
|
|
42
|
-
if (currentSchema.oneOf?.length) {
|
|
43
|
-
for (const branch of currentSchema.oneOf) {
|
|
44
|
-
if (isValid(branch, currentValue)) {
|
|
45
|
-
yield* enumeratePatches(branch, currentValue, rootValue, rootSchema, [...currentPath, "oneOf"], [...localPath]);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=enumerate-patches.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file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