@routier/core 0.0.1-alpha.1 → 0.0.1-alpha.2
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/assertions/index.d.ts +5 -0
- package/dist/assertions/index.js +131 -0
- package/dist/assertions/index.js.map +1 -0
- package/dist/codegen/SlotPath.d.ts +7 -0
- package/dist/codegen/blocks.d.ts +130 -0
- package/dist/codegen/handlers/CloneHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/CompareHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/DeserializeHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/EnableChangeTrackingHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/EnrichmentHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/FreezeHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/HashHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/HashTypeHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/IdSelectorHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/MergeHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/PrepareHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/SerializeHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/StripHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/clone/CloneObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/clone/CloneValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/compare/CompareObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/compare/CompareValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/deserialize/DeserializeComputedValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/deserialize/DeserializeDateHandler.d.ts +9 -0
- package/dist/codegen/handlers/deserialize/DeserializeFunctionHandler.d.ts +6 -0
- package/dist/codegen/handlers/deserialize/DeserializeObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/deserialize/DeserializeValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/enableChangeTracking/EnableChangeTrackingObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/enableChangeTracking/EnableChangeTrackingPrimitiveValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/enrichment/EnrichmentComputedValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/enrichment/EnrichmentDefaultFunctionHandler.d.ts +6 -0
- package/dist/codegen/handlers/enrichment/EnrichmentDefaultValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/enrichment/EnrichmentFunctionHandler.d.ts +6 -0
- package/dist/codegen/handlers/enrichment/EnrichmentNullableObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/enrichment/EnrichmentObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/enrichment/EnrichmentObjectIdentityHandler.d.ts +6 -0
- package/dist/codegen/handlers/enrichment/EnrichmentPrimitiveHandler.d.ts +6 -0
- package/dist/codegen/handlers/enrichment/EnrichmentPrimitiveIdentityHandler.d.ts +6 -0
- package/dist/codegen/handlers/freeze/FreezeObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/freeze/FreezePrimitiveValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/hash/HashComputedValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/hash/HashDateHandler.d.ts +6 -0
- package/dist/codegen/handlers/hash/HashFunctionHandler.d.ts +6 -0
- package/dist/codegen/handlers/hash/HashIdentityHandler.d.ts +6 -0
- package/dist/codegen/handlers/hash/HashKeyHandler.d.ts +6 -0
- package/dist/codegen/handlers/hash/HashValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/hashType/HashTypeValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/idSelector/IdSelectorValueHandler.d.ts +6 -0
- package/{src/codegen/handlers/index.ts → dist/codegen/handlers/index.d.ts} +1 -1
- package/dist/codegen/handlers/merge/MergeComputedValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/merge/MergeDefaultFunctionHandler.d.ts +6 -0
- package/dist/codegen/handlers/merge/MergeDefaultValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/merge/MergeFunctionHandler.d.ts +6 -0
- package/dist/codegen/handlers/merge/MergePrimitiveHandler.d.ts +6 -0
- package/dist/codegen/handlers/prepare/PrepareComputedValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/prepare/PrepareFunctionHandler.d.ts +6 -0
- package/dist/codegen/handlers/prepare/PrepareIdentityHandler.d.ts +6 -0
- package/dist/codegen/handlers/prepare/PrepareKeyHandler.d.ts +6 -0
- package/dist/codegen/handlers/prepare/PrepareObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/prepare/PrepareValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/serialize/SerializeDateHandler.d.ts +9 -0
- package/dist/codegen/handlers/serialize/SerializeObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/serialize/SerializeValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/strip/StripIdentityHandler.d.ts +6 -0
- package/dist/codegen/handlers/strip/StripKeyHandler.d.ts +6 -0
- package/dist/codegen/handlers/strip/StripObjectHandler.d.ts +6 -0
- package/dist/codegen/handlers/strip/StripValueHandler.d.ts +6 -0
- package/dist/codegen/handlers/types.d.ts +18 -0
- package/{src/codegen/index.ts → dist/codegen/index.d.ts} +1 -1
- package/dist/codegen/types.d.ts +9 -0
- package/dist/codegen/utils.d.ts +22 -0
- package/dist/collections/Changes.d.ts +51 -0
- package/dist/collections/Changes.test.d.ts +1 -0
- package/dist/collections/IdSet.d.ts +7 -0
- package/dist/collections/MemoryDataCollection.d.ts +22 -0
- package/dist/collections/MemoryDataCollection.test.d.ts +1 -0
- package/dist/collections/SchemaCollection.d.ts +8 -0
- package/dist/collections/TagCollection.d.ts +15 -0
- package/dist/collections/TagCollection.test.d.ts +1 -0
- package/{src/collections/index.ts → dist/collections/index.d.ts} +1 -1
- package/dist/collections/index.js +659 -0
- package/dist/collections/index.js.map +1 -0
- package/dist/errors/SchemaError.d.ts +3 -0
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.js +90 -0
- package/dist/errors/index.js.map +1 -0
- package/{src/expressions/index.ts → dist/expressions/index.d.ts} +1 -1
- package/{src/expressions/parser.ts → dist/expressions/index.js} +387 -205
- package/dist/expressions/index.js.map +1 -0
- package/dist/expressions/parser.d.ts +4 -0
- package/dist/expressions/parser.test.d.ts +1 -0
- package/{src/expressions/types.ts → dist/expressions/types.d.ts} +42 -99
- package/dist/expressions/utils.d.ts +10 -0
- package/dist/expressions/utils.test.d.ts +1 -0
- package/{src/index.ts → dist/index.d.ts} +1 -1
- package/dist/index.js +8434 -0
- package/dist/index.js.map +1 -0
- package/dist/performance/index.d.ts +5 -0
- package/dist/performance/index.js +65 -0
- package/dist/performance/index.js.map +1 -0
- package/dist/pipeline/SyncronousQueue.d.ts +7 -0
- package/dist/pipeline/SyncronousQueue.test.d.ts +1 -0
- package/dist/pipeline/TrampolinePipeline.d.ts +36 -0
- package/dist/pipeline/TrampolinePipeline.test.d.ts +1 -0
- package/dist/pipeline/index.d.ts +2 -0
- package/{src/pipeline/TrampolinePipeline.ts → dist/pipeline/index.js} +297 -140
- package/dist/pipeline/index.js.map +1 -0
- package/dist/plugins/EphemeralDataPlugin.d.ts +13 -0
- package/dist/plugins/capabilities/DbPluginCapability.d.ts +23 -0
- package/{src/plugins/capabilities/index.ts → dist/plugins/capabilities/index.d.ts} +1 -1
- package/dist/plugins/capabilities/logging/DbPluginLoggingCapability.d.ts +28 -0
- package/dist/plugins/capabilities/logging/index.d.ts +1 -0
- package/{src/plugins/index.ts → dist/plugins/index.d.ts} +1 -1
- package/dist/plugins/index.js +2328 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/query/Query.d.ts +13 -0
- package/dist/plugins/query/QueryOptionsCollection.d.ts +27 -0
- package/dist/plugins/query/QueryOptionsCollection.test.d.ts +1 -0
- package/{src/plugins/query/index.ts → dist/plugins/query/index.d.ts} +1 -1
- package/{src/plugins/query/types.ts → dist/plugins/query/types.d.ts} +29 -20
- package/dist/plugins/replication/OptimisticReplicationDbPlugin.d.ts +21 -0
- package/dist/plugins/replication/ReplicationDbPlugin.d.ts +21 -0
- package/{src/plugins/replication/index.ts → dist/plugins/replication/index.d.ts} +1 -1
- package/{src/plugins/replication/types.ts → dist/plugins/replication/types.d.ts} +1 -2
- package/dist/plugins/translators/DataTranslator.d.ts +18 -0
- package/dist/plugins/translators/JsonTranslator.d.ts +17 -0
- package/dist/plugins/translators/JsonTranslator.test.d.ts +1 -0
- package/dist/plugins/translators/SqlTranslator.d.ts +14 -0
- package/{src/plugins/translators/index.ts → dist/plugins/translators/index.d.ts} +1 -1
- package/{src/plugins/types.ts → dist/plugins/types.d.ts} +11 -26
- package/dist/results/Result.d.ts +29 -0
- package/{src/results/index.ts → dist/results/index.d.ts} +1 -1
- package/dist/results/index.js +192 -0
- package/dist/results/index.js.map +1 -0
- package/{src/results/types.ts → dist/results/types.d.ts} +18 -7
- package/dist/results/utils.d.ts +2 -0
- package/dist/schema/PropertyInfo.d.ts +132 -0
- package/dist/schema/PropertyInfo.test.d.ts +1 -0
- package/dist/schema/SchemaDefinition.d.ts +17 -0
- package/dist/schema/builder.d.ts +17 -0
- package/{src/schema/index.ts → dist/schema/index.d.ts} +1 -1
- package/dist/schema/index.js +4822 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/property/base/SchemaBase.d.ts +23 -0
- package/dist/schema/property/base/index.d.ts +1 -0
- package/dist/schema/property/modifiers/SchemaDefault.d.ts +13 -0
- package/dist/schema/property/modifiers/SchemaDeserialize.d.ts +11 -0
- package/dist/schema/property/modifiers/SchemaDistinct.d.ts +7 -0
- package/dist/schema/property/modifiers/SchemaFrom.d.ts +23 -0
- package/dist/schema/property/modifiers/SchemaIdentity.d.ts +7 -0
- package/dist/schema/property/modifiers/SchemaIndex.d.ts +23 -0
- package/dist/schema/property/modifiers/SchemaKey.d.ts +13 -0
- package/dist/schema/property/modifiers/SchemaNullable.d.ts +9 -0
- package/dist/schema/property/modifiers/SchemaOptional.d.ts +9 -0
- package/dist/schema/property/modifiers/SchemaReadonly.d.ts +15 -0
- package/dist/schema/property/modifiers/SchemaSerialize.d.ts +9 -0
- package/dist/schema/property/modifiers/SchemaTracked.d.ts +7 -0
- package/{src/schema/property/modifiers/index.ts → dist/schema/property/modifiers/index.d.ts} +1 -1
- package/dist/schema/property/types/SchemaArray.d.ts +23 -0
- package/dist/schema/property/types/SchemaBoolean.d.ts +27 -0
- package/dist/schema/property/types/SchemaDate.d.ts +27 -0
- package/dist/schema/property/types/SchemaNumber.d.ts +31 -0
- package/dist/schema/property/types/SchemaObject.d.ts +20 -0
- package/dist/schema/property/types/SchemaString.d.ts +31 -0
- package/{src/schema/property/types/index.ts → dist/schema/property/types/index.d.ts} +1 -1
- package/dist/schema/table/SchemaComputed.d.ts +10 -0
- package/dist/schema/table/SchemaFunction.d.ts +8 -0
- package/{src/schema/table/index.ts → dist/schema/table/index.d.ts} +1 -1
- package/{src/schema/types.ts → dist/schema/types.d.ts} +59 -99
- package/{src/types/index.ts → dist/types/index.d.ts} +1 -2
- package/dist/types/index.js +25 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utilities/arrays.d.ts +1 -0
- package/dist/utilities/arrays.test.d.ts +1 -0
- package/dist/utilities/dates.d.ts +1 -0
- package/dist/utilities/dates.test.d.ts +1 -0
- package/dist/utilities/dbPluginEventUtils.d.ts +14 -0
- package/{src/utilities/index.ts → dist/utilities/index.d.ts} +1 -1
- package/dist/utilities/index.js +554 -0
- package/dist/utilities/index.js.map +1 -0
- package/dist/utilities/objects.d.ts +2 -0
- package/dist/utilities/queryOptionsCollection.d.ts +2 -0
- package/dist/utilities/replication.d.ts +3 -0
- package/dist/utilities/runtime.d.ts +1 -0
- package/dist/utilities/strings.d.ts +1 -0
- package/dist/utilities/types.d.ts +1 -0
- package/dist/utilities/uuid.d.ts +2 -0
- package/package.json +6 -1
- package/readme.md +95 -0
- package/CHANGELOG.md +0 -8
- package/rspack.config.mjs +0 -65
- package/src/assertions/index.ts +0 -37
- package/src/codegen/SlotPath.ts +0 -20
- package/src/codegen/blocks.ts +0 -578
- package/src/codegen/handlers/CloneHandlerBuilder.ts +0 -13
- package/src/codegen/handlers/CompareHandlerBuilder.ts +0 -13
- package/src/codegen/handlers/DeserializeHandlerBuilder.ts +0 -20
- package/src/codegen/handlers/EnableChangeTrackingHandlerBuilder.ts +0 -13
- package/src/codegen/handlers/EnrichmentHandlerBuilder.ts +0 -28
- package/src/codegen/handlers/FreezeHandlerBuilder.ts +0 -13
- package/src/codegen/handlers/HashHandlerBuilder.ts +0 -25
- package/src/codegen/handlers/HashTypeHandlerBuilder.ts +0 -11
- package/src/codegen/handlers/IdSelectorHandlerBuilder.ts +0 -10
- package/src/codegen/handlers/MergeHandlerBuilder.ts +0 -19
- package/src/codegen/handlers/PrepareHandlerBuilder.ts +0 -23
- package/src/codegen/handlers/SerializeHandlerBuilder.ts +0 -15
- package/src/codegen/handlers/StripHandlerBuilder.ts +0 -18
- package/src/codegen/handlers/clone/CloneObjectHandler.ts +0 -29
- package/src/codegen/handlers/clone/CloneValueHandler.ts +0 -33
- package/src/codegen/handlers/compare/CompareObjectHandler.ts +0 -15
- package/src/codegen/handlers/compare/CompareValueHandler.ts +0 -27
- package/src/codegen/handlers/deserialize/DeserializeComputedValueHandler.ts +0 -16
- package/src/codegen/handlers/deserialize/DeserializeDateHandler.ts +0 -45
- package/src/codegen/handlers/deserialize/DeserializeFunctionHandler.ts +0 -16
- package/src/codegen/handlers/deserialize/DeserializeObjectHandler.ts +0 -29
- package/src/codegen/handlers/deserialize/DeserializeValueHandler.ts +0 -33
- package/src/codegen/handlers/enableChangeTracking/EnableChangeTrackingObjectHandler.ts +0 -20
- package/src/codegen/handlers/enableChangeTracking/EnableChangeTrackingPrimitiveValueHandler.ts +0 -15
- package/src/codegen/handlers/enrichment/EnrichmentComputedValueHandler.ts +0 -37
- package/src/codegen/handlers/enrichment/EnrichmentDefaultFunctionHandler.ts +0 -50
- package/src/codegen/handlers/enrichment/EnrichmentDefaultValueHandler.ts +0 -18
- package/src/codegen/handlers/enrichment/EnrichmentFunctionHandler.ts +0 -38
- package/src/codegen/handlers/enrichment/EnrichmentNullableObjectHandler.ts +0 -44
- package/src/codegen/handlers/enrichment/EnrichmentObjectHandler.ts +0 -29
- package/src/codegen/handlers/enrichment/EnrichmentObjectIdentityHandler.ts +0 -16
- package/src/codegen/handlers/enrichment/EnrichmentPrimitiveHandler.ts +0 -13
- package/src/codegen/handlers/enrichment/EnrichmentPrimitiveIdentityHandler.ts +0 -21
- package/src/codegen/handlers/freeze/FreezeObjectHandler.ts +0 -20
- package/src/codegen/handlers/freeze/FreezePrimitiveValueHandler.ts +0 -15
- package/src/codegen/handlers/hash/HashComputedValueHandler.ts +0 -15
- package/src/codegen/handlers/hash/HashDateHandler.ts +0 -26
- package/src/codegen/handlers/hash/HashFunctionHandler.ts +0 -16
- package/src/codegen/handlers/hash/HashIdentityHandler.ts +0 -15
- package/src/codegen/handlers/hash/HashKeyHandler.ts +0 -26
- package/src/codegen/handlers/hash/HashValueHandler.ts +0 -26
- package/src/codegen/handlers/hashType/HashTypeValueHandler.ts +0 -20
- package/src/codegen/handlers/idSelector/IdSelectorValueHandler.ts +0 -28
- package/src/codegen/handlers/merge/MergeComputedValueHandler.ts +0 -37
- package/src/codegen/handlers/merge/MergeDefaultFunctionHandler.ts +0 -40
- package/src/codegen/handlers/merge/MergeDefaultValueHandler.ts +0 -32
- package/src/codegen/handlers/merge/MergeFunctionHandler.ts +0 -16
- package/src/codegen/handlers/merge/MergePrimitiveHandler.ts +0 -21
- package/src/codegen/handlers/prepare/PrepareComputedValueHandler.ts +0 -16
- package/src/codegen/handlers/prepare/PrepareFunctionHandler.ts +0 -16
- package/src/codegen/handlers/prepare/PrepareIdentityHandler.ts +0 -21
- package/src/codegen/handlers/prepare/PrepareKeyHandler.ts +0 -21
- package/src/codegen/handlers/prepare/PrepareObjectHandler.ts +0 -38
- package/src/codegen/handlers/prepare/PrepareValueHandler.ts +0 -36
- package/src/codegen/handlers/serialize/SerializeDateHandler.ts +0 -45
- package/src/codegen/handlers/serialize/SerializeObjectHandler.ts +0 -28
- package/src/codegen/handlers/serialize/SerializeValueHandler.ts +0 -33
- package/src/codegen/handlers/strip/StripIdentityHandler.ts +0 -15
- package/src/codegen/handlers/strip/StripKeyHandler.ts +0 -15
- package/src/codegen/handlers/strip/StripObjectHandler.ts +0 -35
- package/src/codegen/handlers/strip/StripValueHandler.ts +0 -36
- package/src/codegen/handlers/types.ts +0 -119
- package/src/codegen/types.ts +0 -2
- package/src/codegen/utils.ts +0 -74
- package/src/collections/Changes.test.ts +0 -337
- package/src/collections/Changes.ts +0 -177
- package/src/collections/IdSet.ts +0 -28
- package/src/collections/MemoryDataCollection.test.ts +0 -424
- package/src/collections/MemoryDataCollection.ts +0 -134
- package/src/collections/SchemaCollection.ts +0 -22
- package/src/collections/TagCollection.test.ts +0 -443
- package/src/collections/TagCollection.ts +0 -62
- package/src/errors/SchemaError.ts +0 -6
- package/src/errors/index.ts +0 -1
- package/src/expressions/parser.test.ts +0 -913
- package/src/expressions/utils.test.ts +0 -346
- package/src/expressions/utils.ts +0 -59
- package/src/performance/index.ts +0 -26
- package/src/pipeline/SyncronousQueue.test.ts +0 -269
- package/src/pipeline/SyncronousQueue.ts +0 -30
- package/src/pipeline/TrampolinePipeline.test.ts +0 -374
- package/src/pipeline/index.ts +0 -2
- package/src/plugins/EphemeralDataPlugin.ts +0 -132
- package/src/plugins/capabilities/DbPluginCapability.ts +0 -111
- package/src/plugins/capabilities/logging/DbPluginLoggingCapability.ts +0 -261
- package/src/plugins/capabilities/logging/index.ts +0 -1
- package/src/plugins/query/Query.ts +0 -67
- package/src/plugins/query/QueryOptionsCollection.test.ts +0 -86
- package/src/plugins/query/QueryOptionsCollection.ts +0 -154
- package/src/plugins/replication/OptimisticReplicationDbPlugin.ts +0 -202
- package/src/plugins/replication/ReplicationDbPlugin.ts +0 -137
- package/src/plugins/translators/DataTranslator.ts +0 -46
- package/src/plugins/translators/JsonTranslator.test.ts +0 -618
- package/src/plugins/translators/JsonTranslator.ts +0 -211
- package/src/plugins/translators/SqlTranslator.ts +0 -45
- package/src/results/Result.ts +0 -91
- package/src/results/utils.ts +0 -15
- package/src/schema/PropertyInfo.test.ts +0 -479
- package/src/schema/PropertyInfo.ts +0 -374
- package/src/schema/SchemaDefinition.ts +0 -626
- package/src/schema/builder.ts +0 -18
- package/src/schema/property/base/SchemaBase.ts +0 -49
- package/src/schema/property/base/index.ts +0 -1
- package/src/schema/property/modifiers/SchemaDefault.ts +0 -29
- package/src/schema/property/modifiers/SchemaDeserialize.ts +0 -23
- package/src/schema/property/modifiers/SchemaDistinct.ts +0 -14
- package/src/schema/property/modifiers/SchemaFrom.ts +0 -54
- package/src/schema/property/modifiers/SchemaIdentity.ts +0 -13
- package/src/schema/property/modifiers/SchemaIndex.ts +0 -60
- package/src/schema/property/modifiers/SchemaKey.ts +0 -28
- package/src/schema/property/modifiers/SchemaNullable.ts +0 -18
- package/src/schema/property/modifiers/SchemaOptional.ts +0 -19
- package/src/schema/property/modifiers/SchemaReadonly.ts +0 -34
- package/src/schema/property/modifiers/SchemaSerialize.ts +0 -18
- package/src/schema/property/modifiers/SchemaTracked.ts +0 -14
- package/src/schema/property/types/SchemaArray.ts +0 -50
- package/src/schema/property/types/SchemaBoolean.ts +0 -59
- package/src/schema/property/types/SchemaDate.ts +0 -58
- package/src/schema/property/types/SchemaNumber.ts +0 -69
- package/src/schema/property/types/SchemaObject.ts +0 -44
- package/src/schema/property/types/SchemaString.ts +0 -69
- package/src/schema/table/SchemaComputed.ts +0 -20
- package/src/schema/table/SchemaFunction.ts +0 -15
- package/src/utilities/arrays.test.ts +0 -312
- package/src/utilities/arrays.ts +0 -12
- package/src/utilities/dates.test.ts +0 -388
- package/src/utilities/dates.ts +0 -11
- package/src/utilities/dbPluginEventUtils.ts +0 -44
- package/src/utilities/objects.ts +0 -7
- package/src/utilities/queryOptionsCollection.ts +0 -16
- package/src/utilities/replication.ts +0 -23
- package/src/utilities/runtime.ts +0 -3
- package/src/utilities/strings.ts +0 -18
- package/src/utilities/types.ts +0 -1
- package/src/utilities/uuid.ts +0 -56
- package/tsconfig.json +0 -28
- package/vitest.config.ts +0 -11
|
@@ -5,12 +5,10 @@ import { SchemaObject } from "./property/types/SchemaObject";
|
|
|
5
5
|
import { PropertyInfo } from "./PropertyInfo";
|
|
6
6
|
import { DeepPartial } from "../types";
|
|
7
7
|
import { SchemaFunction } from "./table";
|
|
8
|
-
|
|
9
8
|
export type DefaultValue<T, I = never> = T | ((injected: I) => T);
|
|
10
9
|
export type FunctionBody<TEntity, TResult> = (entity: TEntity, collectionName: string) => TResult;
|
|
11
10
|
export type IdType = string | number;
|
|
12
|
-
|
|
13
|
-
export enum SchemaTypes {
|
|
11
|
+
export declare enum SchemaTypes {
|
|
14
12
|
Array = "Array",
|
|
15
13
|
Boolean = "Boolean",
|
|
16
14
|
Date = "Date",
|
|
@@ -21,16 +19,13 @@ export enum SchemaTypes {
|
|
|
21
19
|
Function = "Function",
|
|
22
20
|
Computed = "Computed"
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
export type ArrayShape = string | number | Date | {};
|
|
26
|
-
|
|
27
23
|
export type ExpandedProperty = ExpandedChildProperty & {
|
|
28
24
|
assignmentPath: string;
|
|
29
25
|
selectorPath: string;
|
|
30
26
|
properties: Map<string, ExpandedChildProperty>;
|
|
31
27
|
childDegree: number;
|
|
32
28
|
};
|
|
33
|
-
|
|
34
29
|
export type ExpandedChildProperty = {
|
|
35
30
|
propertyName: string;
|
|
36
31
|
type: SchemaTypes;
|
|
@@ -38,32 +33,26 @@ export type ExpandedChildProperty = {
|
|
|
38
33
|
isReadonly: boolean;
|
|
39
34
|
isIdentity: boolean;
|
|
40
35
|
isUnmapped: boolean;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export enum HashType {
|
|
36
|
+
};
|
|
37
|
+
export declare enum HashType {
|
|
44
38
|
Ids = "Ids",
|
|
45
39
|
Object = "Object"
|
|
46
40
|
}
|
|
47
|
-
|
|
48
41
|
export type HashFunction<TEntity extends {}> = {
|
|
49
42
|
(entity: InferCreateType<TEntity>, type: HashType.Object): string;
|
|
50
43
|
(entity: InferType<TEntity>, type: HashType.Ids): string;
|
|
51
|
-
}
|
|
52
|
-
|
|
44
|
+
};
|
|
53
45
|
export type GetHashTypeFunction<TEntity extends {}> = {
|
|
54
46
|
(entity: InferCreateType<TEntity>): HashType.Object;
|
|
55
47
|
(entity: InferType<TEntity>): HashType.Ids;
|
|
56
|
-
}
|
|
57
|
-
|
|
48
|
+
};
|
|
58
49
|
export type ChangeTrackingType = "proxy" | "diff" | "immutable";
|
|
59
|
-
|
|
60
|
-
export type IndexType = "single" | "compound" | "unique" | "primary-key"
|
|
50
|
+
export type IndexType = "single" | "compound" | "unique" | "primary-key";
|
|
61
51
|
export type Index = {
|
|
62
|
-
properties: PropertyInfo<any>[]
|
|
52
|
+
properties: PropertyInfo<any>[];
|
|
63
53
|
type: IndexType;
|
|
64
54
|
name: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
55
|
+
};
|
|
67
56
|
/**
|
|
68
57
|
* Represents changes to subscriptions, categorizing them by modifications to
|
|
69
58
|
* entities (additions, updates, removals) or query-driven removals.
|
|
@@ -83,29 +72,24 @@ export type SubscriptionChanges<T extends {}> = {
|
|
|
83
72
|
*/
|
|
84
73
|
removals: InferType<T>[];
|
|
85
74
|
/**
|
|
86
|
-
* Entities that have been added/updated/removed from the subscription and it is unknown
|
|
75
|
+
* Entities that have been added/updated/removed from the subscription and it is unknown
|
|
87
76
|
* if the entities have been added/updated/removed.
|
|
88
77
|
*/
|
|
89
78
|
unknown: InferType<T>[];
|
|
90
|
-
}
|
|
91
|
-
|
|
79
|
+
};
|
|
92
80
|
export interface ICollectionSubscription<T extends {}> extends Disposable {
|
|
93
81
|
send(changes: SubscriptionChanges<T>): void;
|
|
94
82
|
onMessage(callback: (changes: SubscriptionChanges<T>) => void): void;
|
|
95
83
|
}
|
|
96
|
-
|
|
97
84
|
type Enrich<TEntity extends {}> = {
|
|
98
85
|
(entity: InferType<TEntity>, changeTrackingType: ChangeTrackingType): InferType<TEntity>;
|
|
99
86
|
(entity: InferCreateType<TEntity>, changeTrackingType: ChangeTrackingType): InferCreateType<TEntity>;
|
|
100
|
-
}
|
|
101
|
-
|
|
87
|
+
};
|
|
102
88
|
/**
|
|
103
89
|
* Represents a fully compiled schema with all utilities and metadata for an entity type.
|
|
104
90
|
*/
|
|
105
91
|
export type CompiledSchema<TEntity extends {}> = {
|
|
106
|
-
|
|
107
92
|
deserializePartial: (item: Record<string, unknown>, properties: PropertyInfo<TEntity>[]) => DeepPartial<InferType<TEntity>>;
|
|
108
|
-
|
|
109
93
|
createSubscription: (abortSignal?: AbortSignal) => ICollectionSubscription<TEntity>;
|
|
110
94
|
/** Returns the property info for a given id (full path) */
|
|
111
95
|
getProperty: (id: string) => PropertyInfo<TEntity>;
|
|
@@ -124,7 +108,7 @@ export type CompiledSchema<TEntity extends {}> = {
|
|
|
124
108
|
/** List of properties that are identity keys. */
|
|
125
109
|
idProperties: PropertyInfo<TEntity>[];
|
|
126
110
|
/** All property metadata for the schema. */
|
|
127
|
-
properties: PropertyInfo<TEntity>[]
|
|
111
|
+
properties: PropertyInfo<TEntity>[];
|
|
128
112
|
/** The hash type used for this schema. */
|
|
129
113
|
hashType: HashType;
|
|
130
114
|
/** Computes a hash for the given entity. */
|
|
@@ -138,7 +122,7 @@ export type CompiledSchema<TEntity extends {}> = {
|
|
|
138
122
|
/** Serializes an entity to storage format. */
|
|
139
123
|
serialize: (entity: InferType<TEntity>) => InferType<TEntity>;
|
|
140
124
|
/** Unique id for the schema. */
|
|
141
|
-
id: SchemaId
|
|
125
|
+
id: SchemaId;
|
|
142
126
|
/** The name of the collection for this schema. */
|
|
143
127
|
collectionName: string;
|
|
144
128
|
/** Returns all IDs for the given entity (usually a single-element tuple). */
|
|
@@ -155,84 +139,60 @@ export type CompiledSchema<TEntity extends {}> = {
|
|
|
155
139
|
definition: SchemaDefinition<TEntity>;
|
|
156
140
|
/** Returns all indexes defined for this schema. */
|
|
157
141
|
getIndexes: () => Index[];
|
|
158
|
-
}
|
|
159
|
-
|
|
142
|
+
};
|
|
160
143
|
export type PropertySerializer<T extends any> = (value: T) => string | number;
|
|
161
144
|
export type PropertyDeserializer<T extends any> = (value: string | number) => T;
|
|
162
|
-
|
|
163
|
-
export type
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"nullable" | "optional" |
|
|
168
|
-
"readonly" | "serialize" |
|
|
169
|
-
"unmapped" | "computed" |
|
|
170
|
-
"distinct";
|
|
171
|
-
//SchemaFunction
|
|
172
|
-
type InferPrimitive<T> =
|
|
173
|
-
T extends SchemaArray<infer Y, infer __> ? InferPrimitive<Y>[]
|
|
174
|
-
: T extends SchemaObject<infer Obj, infer _> ?
|
|
175
|
-
{ [K in keyof Obj]: InferPrimitive<Obj[K]> } : // Process nested objects
|
|
176
|
-
T extends SchemaFunction<infer F, infer __> ? F : T extends SchemaBase<infer X, infer _> ?
|
|
177
|
-
X : // Extract the primitive type
|
|
178
|
-
never;
|
|
179
|
-
|
|
145
|
+
export type SchemaId = number;
|
|
146
|
+
export type SchemaModifiers = "default" | "deserialize" | "identity" | "key" | "nullable" | "optional" | "readonly" | "serialize" | "unmapped" | "computed" | "distinct";
|
|
147
|
+
type InferPrimitive<T> = T extends SchemaArray<infer Y, infer __> ? InferPrimitive<Y>[] : T extends SchemaObject<infer Obj, infer _> ? {
|
|
148
|
+
[K in keyof Obj]: InferPrimitive<Obj[K]>;
|
|
149
|
+
} : T extends SchemaFunction<infer F, infer __> ? F : T extends SchemaBase<infer X, infer _> ? X : never;
|
|
180
150
|
export type InferType<T> = T extends CompiledSchema<infer R> ? InferCompiledSchema<R> : T extends {} ? InferCompiledSchema<T> : T;
|
|
181
151
|
export type InferCreateType<T> = T extends CompiledSchema<infer R> ? InferCompiledCreateSchema<R> : T extends {} ? InferCompiledCreateSchema<T> : unknown;
|
|
182
152
|
export type InferMappedType<T> = T extends SchemaBase<infer K, infer __> ? InferType<K> : InferCompiledSchema<T>;
|
|
183
|
-
|
|
184
|
-
type
|
|
185
|
-
T
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
] extends [
|
|
209
|
-
false,
|
|
210
|
-
false,
|
|
211
|
-
false,
|
|
212
|
-
false,
|
|
213
|
-
false,
|
|
214
|
-
false
|
|
215
|
-
] ? true : false;
|
|
216
|
-
|
|
153
|
+
type HasModifier<T, K extends keyof T, M extends SchemaModifiers> = T[K] extends SchemaBase<any, infer Mods> ? M extends Mods ? true : false : false;
|
|
154
|
+
type IsPlainProperty<T, K extends keyof T> = [
|
|
155
|
+
HasModifier<T, K, "readonly">,
|
|
156
|
+
HasModifier<T, K, "optional">,
|
|
157
|
+
HasModifier<T, K, "nullable">
|
|
158
|
+
] extends [
|
|
159
|
+
false,
|
|
160
|
+
false,
|
|
161
|
+
false
|
|
162
|
+
] ? true : false;
|
|
163
|
+
type IsPlainCreateProperty<T, K extends keyof T> = [
|
|
164
|
+
HasModifier<T, K, "identity">,
|
|
165
|
+
HasModifier<T, K, "default">,
|
|
166
|
+
HasModifier<T, K, "computed">,
|
|
167
|
+
HasModifier<T, K, "unmapped">,
|
|
168
|
+
HasModifier<T, K, "optional">,
|
|
169
|
+
HasModifier<T, K, "nullable">
|
|
170
|
+
] extends [
|
|
171
|
+
false,
|
|
172
|
+
false,
|
|
173
|
+
false,
|
|
174
|
+
false,
|
|
175
|
+
false,
|
|
176
|
+
false
|
|
177
|
+
] ? true : false;
|
|
217
178
|
type InferCompiledSchema<T> = CoalesceEmpty<{
|
|
218
|
-
[K in keyof T as IsPlainProperty<T, K> extends true ? K : never]: InferPrimitive<T[K]
|
|
179
|
+
[K in keyof T as IsPlainProperty<T, K> extends true ? K : never]: InferPrimitive<T[K]>;
|
|
219
180
|
}, {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
181
|
+
readonly [K in keyof T as HasModifier<T, K, "readonly"> extends true ? K : never]: InferPrimitive<T[K]>;
|
|
182
|
+
}, {
|
|
183
|
+
[K in keyof T as HasModifier<T, K, "optional"> extends true ? K : never]?: InferPrimitive<T[K]>;
|
|
184
|
+
}, {
|
|
185
|
+
[K in keyof T as HasModifier<T, K, "nullable"> extends true ? K : never]: null | InferPrimitive<T[K]>;
|
|
186
|
+
}>;
|
|
227
187
|
type InferCompiledCreateSchema<T> = CoalesceEmpty<{
|
|
228
|
-
[K in keyof T as IsPlainCreateProperty<T, K> extends true ? K : never]: InferPrimitive<T[K]
|
|
188
|
+
[K in keyof T as IsPlainCreateProperty<T, K> extends true ? K : never]: InferPrimitive<T[K]>;
|
|
189
|
+
}, {
|
|
190
|
+
[K in keyof T as HasModifier<T, K, "optional"> extends true ? K : never]?: InferPrimitive<T[K]>;
|
|
191
|
+
}, {
|
|
192
|
+
[K in keyof T as HasModifier<T, K, "default"> extends true ? K : never]?: InferPrimitive<T[K]>;
|
|
229
193
|
}, {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
[K in keyof T as HasModifier<T, K, "default"> extends true ? K : never]?: InferPrimitive<T[K]>
|
|
233
|
-
}, {
|
|
234
|
-
[K in keyof T as HasModifier<T, K, "nullable"> extends true ? K : never]: null | InferPrimitive<T[K]>
|
|
235
|
-
}>;
|
|
236
|
-
|
|
194
|
+
[K in keyof T as HasModifier<T, K, "nullable"> extends true ? K : never]: null | InferPrimitive<T[K]>;
|
|
195
|
+
}>;
|
|
237
196
|
type IsEmptyObject<T> = keyof T extends never ? true : false;
|
|
238
197
|
type CoalesceEmpty<T1 extends {}, T2 extends {}, T3 extends {}, T4 extends {}> = (IsEmptyObject<T1> extends true ? {} : T1) & (IsEmptyObject<T2> extends true ? {} : T2) & (IsEmptyObject<T3> extends true ? {} : T3) & (IsEmptyObject<T4> extends true ? {} : T4);
|
|
198
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// The require scope
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
|
|
4
|
+
/************************************************************************/
|
|
5
|
+
// webpack/runtime/make_namespace_object
|
|
6
|
+
(() => {
|
|
7
|
+
// define __esModule on exports
|
|
8
|
+
__webpack_require__.r = (exports) => {
|
|
9
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
10
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
/************************************************************************/
|
|
16
|
+
var __webpack_exports__ = {};
|
|
17
|
+
|
|
18
|
+
/*!****************************!*\
|
|
19
|
+
!*** ./src/types/index.ts ***!
|
|
20
|
+
\****************************/
|
|
21
|
+
__webpack_require__.r(__webpack_exports__);
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types/index.js","sources":["webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/types/index.ts"],"sourcesContent":["// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export type DeepPartial<T> = T extends object ? {\n [P in keyof T]?: DeepPartial<T[P]>;\n} : T;\n\nexport type GenericFunction<T, R> = (value: T) => R;"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA,uDAAuD,iBAAiB;AACxE;AACA,gDAAgD,aAAa;AAC7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toMap: <T extends {}>(data: T[], keySelector: (item: T) => T[keyof T] | string) => Map<string | T[keyof T], T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isDate: (data: unknown) => data is Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InferCreateType, InferType, SchemaId } from "src/schema";
|
|
2
|
+
import { DbPluginBulkPersistEvent, EntityUpdateInfo } from "../plugins";
|
|
3
|
+
type DbEvent = {
|
|
4
|
+
type: "add";
|
|
5
|
+
data: InferCreateType<unknown>;
|
|
6
|
+
} | {
|
|
7
|
+
type: "update";
|
|
8
|
+
data: EntityUpdateInfo<unknown>;
|
|
9
|
+
} | {
|
|
10
|
+
type: "remove";
|
|
11
|
+
data: InferType<unknown>;
|
|
12
|
+
};
|
|
13
|
+
export declare const toEventArray: (event: DbPluginBulkPersistEvent) => [SchemaId, DbEvent][];
|
|
14
|
+
export {};
|