@routier/core 0.0.6 → 0.0.7

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.
Files changed (54) hide show
  1. package/dist/capabilities/Capability.d.ts +6 -16
  2. package/dist/capabilities/PerformanceCapability.d.ts +4 -6
  3. package/dist/capabilities/TracingCapability.d.ts +3 -6
  4. package/dist/capabilities/index.js +399 -343
  5. package/dist/capabilities/index.js.map +1 -1
  6. package/dist/capabilities/types.d.ts +10 -19
  7. package/dist/codegen/blocks.d.ts +8 -0
  8. package/dist/codegen/handlers/CompareIdsHandlerBuilder.d.ts +4 -0
  9. package/dist/codegen/handlers/compare/CompareArrayHandler.d.ts +6 -0
  10. package/dist/codegen/handlers/compare/CompareDateHandler.d.ts +6 -0
  11. package/dist/codegen/handlers/compareIds/CompareIdsKeyHandler.d.ts +6 -0
  12. package/dist/codegen/handlers/index.d.ts +1 -0
  13. package/dist/codegen/handlers/serialize/SerializeDateHandler.d.ts +2 -1
  14. package/dist/codegen/handlers/serialize/SerializeFunctionHandler.d.ts +6 -0
  15. package/dist/codegen/index.js +39 -0
  16. package/dist/codegen/index.js.map +1 -1
  17. package/dist/collections/index.js.map +1 -1
  18. package/dist/expressions/index.js +108 -19
  19. package/dist/expressions/index.js.map +1 -1
  20. package/dist/index.js +1105 -496
  21. package/dist/index.js.map +1 -1
  22. package/dist/pipeline/TrampolinePipeline.d.ts +1 -0
  23. package/dist/pipeline/index.js +71 -47
  24. package/dist/pipeline/index.js.map +1 -1
  25. package/dist/plugins/EphemeralDataPlugin.d.ts +2 -2
  26. package/dist/plugins/index.js +251 -61
  27. package/dist/plugins/index.js.map +1 -1
  28. package/dist/plugins/query/types.d.ts +5 -0
  29. package/dist/plugins/replication/OptimisticReplicationDbPlugin.d.ts +2 -1
  30. package/dist/plugins/replication/ReplicationDbPlugin.d.ts +2 -1
  31. package/dist/plugins/translators/DataTranslator.d.ts +3 -1
  32. package/dist/plugins/translators/JsonTranslator.d.ts +1 -0
  33. package/dist/plugins/translators/SqlTranslator.d.ts +1 -0
  34. package/dist/plugins/translators/TranslatedArrayValue.d.ts +6 -0
  35. package/dist/plugins/translators/TranslatedGroupValue.d.ts +6 -0
  36. package/dist/plugins/translators/TranslatedSingleValue.d.ts +6 -0
  37. package/dist/plugins/translators/index.d.ts +4 -0
  38. package/dist/plugins/translators/types.d.ts +10 -0
  39. package/dist/plugins/types.d.ts +2 -1
  40. package/dist/schema/PropertyInfo.d.ts +6 -1
  41. package/dist/schema/SchemaDefinition.d.ts +1 -1
  42. package/dist/schema/communication/broadcast.d.ts +3 -3
  43. package/dist/schema/index.js +504 -73
  44. package/dist/schema/index.js.map +1 -1
  45. package/dist/schema/property/modifiers/SchemaTracked.d.ts +3 -1
  46. package/dist/schema/table/SchemaComputed.d.ts +1 -1
  47. package/dist/schema/testSchemas.test.d.ts +60 -36
  48. package/dist/schema/types.d.ts +16 -1
  49. package/dist/utilities/index.js +145 -2
  50. package/dist/utilities/index.js.map +1 -1
  51. package/dist/utilities/strings.d.ts +34 -0
  52. package/dist/utilities/strings.test.d.ts +1 -0
  53. package/package.json +1 -1
  54. package/readme.md +1 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["webpack://@routier/core/./src/assertions/index.ts","webpack://@routier/core/./src/capabilities/Capability.ts","webpack://@routier/core/./src/capabilities/PerformanceCapability.ts","webpack://@routier/core/./src/capabilities/TracingCapability.ts","webpack://@routier/core/./src/capabilities/index.ts","webpack://@routier/core/./src/capabilities/performance/PerformanceTracker.ts","webpack://@routier/core/./src/capabilities/tracing/CallTraceManager.ts","webpack://@routier/core/./src/codegen/SlotPath.ts","webpack://@routier/core/./src/codegen/blocks.ts","webpack://@routier/core/./src/codegen/handlers/CloneHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/CompareHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/DeserializeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/EnableChangeTrackingHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/EnrichmentHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/FreezeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/HashHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/HashTypeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/IdSelectorHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/MergeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/PrepareHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/SerializeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/StripHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/clone/CloneArrayHandler.ts","webpack://@routier/core/./src/codegen/handlers/clone/CloneObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/clone/CloneValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/compare/CompareObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/compare/CompareValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeDateHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeDeserializerHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/enableChangeTracking/EnableChangeTrackingObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/enableChangeTracking/EnableChangeTrackingPrimitiveValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentDefaultFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentDefaultValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentNullableObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentObjectIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentPrimitiveHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentPrimitiveIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/freeze/FreezeObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/freeze/FreezePrimitiveValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashDateHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashKeyHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/hashType/HashTypeValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/idSelector/IdSelectorValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergeComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergeDefaultFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergeDefaultValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergeFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergePrimitiveHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareKeyHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/serialize/SerializeDateHandler.ts","webpack://@routier/core/./src/codegen/handlers/serialize/SerializeObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/serialize/SerializeSerializerHandler.ts","webpack://@routier/core/./src/codegen/handlers/serialize/SerializeValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/strip/StripIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/strip/StripKeyHandler.ts","webpack://@routier/core/./src/codegen/handlers/strip/StripObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/strip/StripValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/types.ts","webpack://@routier/core/./src/codegen/index.ts","webpack://@routier/core/./src/codegen/utils.ts","webpack://@routier/core/./src/collections/Changes.ts","webpack://@routier/core/./src/collections/IdSet.ts","webpack://@routier/core/./src/collections/MemoryDataCollection.ts","webpack://@routier/core/./src/collections/ReadonlySchemaCollection.ts","webpack://@routier/core/./src/collections/SchemaCollection.ts","webpack://@routier/core/./src/collections/TagCollection.ts","webpack://@routier/core/./src/collections/index.ts","webpack://@routier/core/./src/errors/SchemaError.ts","webpack://@routier/core/./src/errors/index.ts","webpack://@routier/core/./src/expressions/index.ts","webpack://@routier/core/./src/expressions/parser.ts","webpack://@routier/core/./src/expressions/types.ts","webpack://@routier/core/./src/expressions/utils.ts","webpack://@routier/core/./src/performance/index.ts","webpack://@routier/core/./src/pipeline/SyncronousQueue.ts","webpack://@routier/core/./src/pipeline/TrampolinePipeline.ts","webpack://@routier/core/./src/pipeline/index.ts","webpack://@routier/core/./src/plugins/EphemeralDataPlugin.ts","webpack://@routier/core/./src/plugins/index.ts","webpack://@routier/core/./src/plugins/query/Query.ts","webpack://@routier/core/./src/plugins/query/QueryOptionsCollection.ts","webpack://@routier/core/./src/plugins/query/index.ts","webpack://@routier/core/./src/plugins/query/types.ts","webpack://@routier/core/./src/plugins/replication/OptimisticReplicationDbPlugin.ts","webpack://@routier/core/./src/plugins/replication/ReplicationDbPlugin.ts","webpack://@routier/core/./src/plugins/replication/index.ts","webpack://@routier/core/./src/plugins/translators/DataTranslator.ts","webpack://@routier/core/./src/plugins/translators/JsonTranslator.ts","webpack://@routier/core/./src/plugins/translators/SqlTranslator.ts","webpack://@routier/core/./src/plugins/translators/index.ts","webpack://@routier/core/./src/results/Result.ts","webpack://@routier/core/./src/results/index.ts","webpack://@routier/core/./src/results/utils.ts","webpack://@routier/core/./src/schema/PropertyInfo.ts","webpack://@routier/core/./src/schema/SchemaDefinition.ts","webpack://@routier/core/./src/schema/builder.ts","webpack://@routier/core/./src/schema/communication/broadcast.ts","webpack://@routier/core/./src/schema/index.ts","webpack://@routier/core/./src/schema/property/base/SchemaBase.ts","webpack://@routier/core/./src/schema/property/base/index.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaDefault.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaDeserialize.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaDistinct.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaFrom.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaIdentity.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaIndex.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaKey.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaNullable.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaOptional.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaReadonly.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaSerialize.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaTracked.ts","webpack://@routier/core/./src/schema/property/modifiers/index.ts","webpack://@routier/core/./src/schema/property/types/SchemaArray.ts","webpack://@routier/core/./src/schema/property/types/SchemaBoolean.ts","webpack://@routier/core/./src/schema/property/types/SchemaDate.ts","webpack://@routier/core/./src/schema/property/types/SchemaNumber.ts","webpack://@routier/core/./src/schema/property/types/SchemaObject.ts","webpack://@routier/core/./src/schema/property/types/SchemaString.ts","webpack://@routier/core/./src/schema/property/types/index.ts","webpack://@routier/core/./src/schema/table/SchemaComputed.ts","webpack://@routier/core/./src/schema/table/SchemaFunction.ts","webpack://@routier/core/./src/schema/table/index.ts","webpack://@routier/core/./src/schema/types.ts","webpack://@routier/core/./src/utilities/arrays.ts","webpack://@routier/core/./src/utilities/dates.ts","webpack://@routier/core/./src/utilities/dbPluginEventUtils.ts","webpack://@routier/core/./src/utilities/functions.ts","webpack://@routier/core/./src/utilities/index.ts","webpack://@routier/core/./src/utilities/objects.ts","webpack://@routier/core/./src/utilities/queryOptionsCollection.ts","webpack://@routier/core/./src/utilities/replication.ts","webpack://@routier/core/./src/utilities/runtime.ts","webpack://@routier/core/./src/utilities/strings.ts","webpack://@routier/core/./src/utilities/uuid.ts","webpack://@routier/core/webpack/runtime/define_property_getters","webpack://@routier/core/webpack/runtime/has_own_property","webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/index.ts"],"sourcesContent":["import { isDate } from \"../utilities\";\n\nexport function assertDate(data: unknown): asserts data is Date {\n if (isDate(data) === false) {\n throw new TypeError('Value is not a Date');\n }\n}\n\nexport function assertIsNotNull<T>(data: T | null | undefined, message?: string | (() => string)): asserts data is NonNullable<T> {\n if (data == null) {\n if (message == null) {\n throw new TypeError('Assertion failed, data is null');\n }\n\n if (typeof message === \"string\") {\n throw new TypeError(message);\n }\n\n throw new TypeError(message());\n }\n}\n\nexport function assertIsArray<T>(data: unknown, message?: string): asserts data is T[] {\n if (!Array.isArray(data)) {\n throw new TypeError(message ?? 'Assertion failed, data is not of type Array');\n }\n}\n\nexport function assertString(data: unknown, message?: string): asserts data is string {\n if (typeof data !== \"string\") {\n throw new TypeError(message ?? 'Assertion failed, data is not of type String');\n }\n}\n\nexport function assertInstanceOf<T extends new (...args: any[]) => any>(value: unknown, Instance: T): asserts value is T {\n if (value instanceof Instance) {\n return;\n }\n\n if (value != null && typeof value === \"object\" && \"constructor\" in value) {\n throw new TypeError(`Value is not instance of type. Type: ${value.constructor.name}`);\n }\n\n throw new TypeError(`Value is not instance of type`);\n}","import { ExplorationOptions, MethodInfo } from \"./types\";\n\nexport abstract class Capability {\n\n protected isValidObject(obj: unknown): obj is object {\n return typeof obj === \"object\" && obj !== null;\n }\n\n protected getObjectName(obj: unknown): string {\n return (obj as any)?.constructor?.name || 'root';\n }\n\n protected exploreObjectMethods(\n obj: unknown,\n callback: (methodInfo: MethodInfo) => void,\n options: ExplorationOptions = {}\n ): void {\n if (!this.isValidObject(obj)) {\n return;\n }\n\n const {\n maxDepth = 10,\n includeNonEnumerable = false,\n filter = () => true\n } = options;\n\n const rootName = this.getObjectName(obj);\n const visited = new Set<object>();\n\n // Explore root methods\n this.exploreRootMethods(obj, callback, filter);\n\n // Explore nested methods\n this.exploreNestedMethods(obj, callback, filter, [rootName], visited, maxDepth, includeNonEnumerable);\n }\n\n protected exploreRootMethods(\n obj: object,\n callback: (methodInfo: MethodInfo) => void,\n filter: (methodInfo: MethodInfo) => boolean\n ): void {\n const methodNames = this.extractMethodNames(obj);\n\n for (const methodName of methodNames) {\n const methodInfo: MethodInfo = {\n methodName,\n instance: obj,\n methodPath: [String(methodName)],\n parent: null\n };\n\n if (filter(methodInfo)) {\n callback(methodInfo);\n }\n }\n }\n\n protected extractMethodNames(obj: unknown): (string | symbol)[] {\n const methodNames = new Set<string | symbol>();\n let prototype = obj;\n\n while (prototype && prototype !== Object.prototype) {\n const allKeys = [\n ...Object.getOwnPropertyNames(prototype),\n ...Object.getOwnPropertySymbols(prototype),\n ];\n\n for (const key of allKeys) {\n const descriptor = Object.getOwnPropertyDescriptor(prototype, key);\n if (this.isCallableMethod(descriptor, key)) {\n methodNames.add(key);\n }\n }\n prototype = Object.getPrototypeOf(prototype);\n }\n return Array.from(methodNames);\n }\n\n protected isCallableMethod(descriptor: PropertyDescriptor | undefined, key: string | symbol): boolean {\n return (\n descriptor?.value &&\n typeof descriptor.value === 'function' &&\n key !== 'constructor' &&\n key !== 'undefined'\n );\n }\n\n protected isCustomClassInstance(value: unknown): boolean {\n if (value === null || (typeof value !== \"object\" && typeof value !== \"function\")) {\n return false;\n }\n\n const objectTag = Object.prototype.toString.call(value);\n // Most built-ins have distinct tags; user classes default to \"[object Object]\"\n // Caveat: Symbol.toStringTag can spoof this.\n return objectTag === \"[object Object]\";\n }\n\n protected shouldProcessProperty(property: unknown): boolean {\n return (\n this.isCustomClassInstance(property) &&\n property?.constructor.name !== \"Object\"\n );\n }\n\n protected exploreNestedMethods(\n obj: unknown,\n callback: (methodInfo: MethodInfo) => void,\n filter: (methodInfo: MethodInfo) => boolean,\n initialPath: string[],\n visited: Set<object>,\n maxDepth: number,\n includeNonEnumerable: boolean\n ): void {\n if (visited.has(obj as object) || initialPath.length > maxDepth) {\n return;\n }\n\n visited.add(obj as object);\n\n if (!this.isValidObject(obj)) {\n return;\n }\n\n const properties = includeNonEnumerable\n ? Object.getOwnPropertyNames(obj)\n : Object.keys(obj);\n\n for (const propertyName of properties) {\n const property = (obj as any)[propertyName];\n\n if (!this.shouldProcessProperty(property)) {\n continue;\n }\n\n const newPath = [...initialPath, propertyName];\n\n // Explore methods on this property\n this.explorePropertyMethods(property, callback, filter, newPath, obj);\n\n // Recursively explore nested objects\n this.exploreNestedMethods(\n property,\n callback,\n filter,\n newPath,\n visited,\n maxDepth,\n includeNonEnumerable\n );\n }\n }\n\n private explorePropertyMethods(\n property: any,\n callback: (methodInfo: MethodInfo) => void,\n filter: (methodInfo: MethodInfo) => boolean,\n methodPath: string[],\n parent: any\n ): void {\n const methodNames = this.extractMethodNames(property);\n\n for (const methodName of methodNames) {\n const fullMethodPath = [...methodPath, String(methodName)];\n const methodInfo: MethodInfo = {\n methodName,\n instance: property,\n methodPath: fullMethodPath,\n parent\n };\n\n if (filter(methodInfo)) {\n callback(methodInfo);\n }\n }\n }\n\n protected stringifyValue(value: unknown, maxDepth: number = 3, currentDepth: number = 0): string {\n if (value === null) return 'null';\n if (value === undefined) return 'undefined';\n\n const type = typeof value;\n\n switch (type) {\n case 'string':\n return `\"${value}\"`;\n case 'number':\n case 'boolean':\n return String(value);\n case 'function':\n return `[Function: ${this.getFunctionName(value as Function)}]`;\n case 'object':\n if (currentDepth >= maxDepth) {\n return '[Max Depth Reached]';\n }\n return this.stringifyObject(value, maxDepth, currentDepth);\n default:\n return `[${type}]`;\n }\n }\n\n protected getFunctionName(fn: Function): string {\n const name = fn.name;\n return name || 'anonymous';\n }\n\n protected stringifyObject(obj: any, maxDepth: number, currentDepth: number): string {\n if (obj === null) return 'null';\n\n // Handle special object types\n if (obj instanceof Date) {\n return `Date(${obj.toISOString()})`;\n }\n\n if (obj instanceof Error) {\n return `Error(${obj.message})`;\n }\n\n if (obj instanceof RegExp) {\n return obj.toString();\n }\n\n if (Array.isArray(obj)) {\n return this.stringifyArray(obj, maxDepth, currentDepth);\n }\n\n if (obj.constructor && obj.constructor.name !== 'Object') {\n return this.stringifyClassInstance(obj, maxDepth, currentDepth);\n }\n\n return this.stringifyPlainObject(obj, maxDepth, currentDepth);\n }\n\n protected stringifyArray(arr: any[], maxDepth: number, currentDepth: number): string {\n if (arr.length === 0) return '[]';\n\n const items = arr.slice(0, 5).map(item =>\n this.stringifyValue(item, maxDepth, currentDepth + 1)\n );\n\n const suffix = arr.length > 5 ? `... (+${arr.length - 5} more)` : '';\n return `[${items.join(', ')}${suffix}]`;\n }\n\n protected stringifyClassInstance(obj: any, maxDepth: number, currentDepth: number): string {\n const className = obj.constructor.name;\n const properties = this.getObjectProperties(obj);\n\n if (Object.keys(properties).length === 0) {\n return `${className} {}`;\n }\n\n const props = Object.entries(properties)\n .slice(0, 5)\n .map(([key, value]) => {\n // For primitive values, don't increase depth\n const isPrimitive = value === null || value === undefined ||\n (typeof value !== 'object' && typeof value !== 'function');\n const depth = isPrimitive ? currentDepth : currentDepth + 1;\n return `${key}: ${this.stringifyValue(value, maxDepth, depth)}`;\n });\n\n const suffix = Object.keys(properties).length > 5 ?\n `... (+${Object.keys(properties).length - 5} more)` : '';\n\n return `${className} { ${props.join(', ')}${suffix} }`;\n }\n\n protected stringifyPlainObject(obj: any, maxDepth: number, currentDepth: number): string {\n const properties = this.getObjectProperties(obj);\n\n if (Object.keys(properties).length === 0) {\n return '{}';\n }\n\n const props = Object.entries(properties)\n .slice(0, 5)\n .map(([key, value]) => {\n // For primitive values, don't increase depth\n const isPrimitive = value === null || value === undefined ||\n (typeof value !== 'object' && typeof value !== 'function');\n const depth = isPrimitive ? currentDepth : currentDepth + 1;\n return `${key}: ${this.stringifyValue(value, maxDepth, depth)}`;\n });\n\n const suffix = Object.keys(properties).length > 5 ?\n `... (+${Object.keys(properties).length - 5} more)` : '';\n\n return `{ ${props.join(', ')}${suffix} }`;\n }\n\n protected getObjectProperties(obj: any): Record<string, any> {\n const properties: Record<string, any> = {};\n\n // Get enumerable properties\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n properties[key] = obj[key];\n }\n }\n\n return properties;\n }\n\n abstract apply(instance: unknown): void;\n}","import { Capability } from \"./Capability\";\nimport { PerformanceTracker } from \"./performance/PerformanceTracker\";\nimport { CallTraceManager } from \"./tracing/CallTraceManager\";\nimport { MethodInfo, MethodMetadata, MethodWrapper, PerformanceMetrics } from \"./types\";\n\nexport type PerformanceCapabilityOptions = {\n log?: (\n type: 'ORIGIN' | 'CHILD',\n operationId: string,\n methodName: string,\n methodPath: string,\n performanceMetrics: PerformanceMetrics\n ) => void;\n shouldLog: (methodName: string | symbol, metadata: MethodMetadata) => boolean\n}\n\nexport class PerformanceCapability extends Capability {\n\n private callTraceManager: CallTraceManager;\n private performanceTracker: PerformanceTracker;\n private log: (\n type: 'ORIGIN' | 'CHILD',\n operationId: string,\n methodName: string,\n methodPath: string,\n performanceMetrics: PerformanceMetrics,\n isCompleted: boolean\n ) => void;\n private shouldLog?: (methodName: string | symbol, metadata: MethodMetadata) => boolean;\n\n constructor(options?: PerformanceCapabilityOptions) {\n super();\n this.log = options?.log ?? ((\n type: 'ORIGIN' | 'CHILD',\n operationId: string,\n methodName: string,\n methodPath: string,\n performanceMetrics: PerformanceMetrics,\n isCompleted: boolean\n ) => {\n\n if (isCompleted) {\n if (!performanceMetrics.duration) return;\n\n const deltaFromStart = this.performanceTracker.getDeltaFromOperationStart(operationId, performanceMetrics.endTime || performanceMetrics.startTime);\n\n console.log(`[${type} ${operationId}] ${methodName} COMPLETED`, {\n methodPath,\n performance: {\n deltaFromStart: this.performanceTracker.formatDuration(deltaFromStart),\n executionTime: this.performanceTracker.formatDuration(performanceMetrics.duration),\n timeToNextCall: performanceMetrics.timeToNextCall ?\n this.performanceTracker.formatDuration(performanceMetrics.timeToNextCall) : 'N/A'\n }\n });\n return;\n }\n\n const deltaFromStart = this.performanceTracker.getDeltaFromOperationStart(operationId, performanceMetrics.startTime);\n\n console.log(`[${type} ${operationId}] ${methodName}`, {\n methodPath,\n performance: {\n deltaFromStart: this.performanceTracker.formatDuration(deltaFromStart)\n }\n });\n });\n this.shouldLog = options?.shouldLog ?? (() => true);\n this.callTraceManager = new CallTraceManager();\n this.performanceTracker = new PerformanceTracker();\n }\n\n private createPerformanceInterceptor(\n originalMethod: Function,\n methodName: string,\n methodPath: string,\n instance: any\n ): Function {\n return (...args: any[]) => {\n const isNewOperation = this.callTraceManager.isNewOperation();\n let operationId: string;\n\n if (isNewOperation) {\n operationId = this.callTraceManager.startNewOperation();\n const startTime = this.performanceTracker.startMethodTiming(operationId, methodPath);\n this.log('ORIGIN', operationId, methodName, methodPath, { startTime }, false);\n } else {\n operationId = this.callTraceManager.getActiveOperationId();\n\n // Record that the previous method is about to call this one\n const callTrace = this.callTraceManager.getCurrentTrace();\n const previousMethodPath = callTrace[callTrace.length - 2];\n if (previousMethodPath) {\n this.performanceTracker.recordNextMethodStart(operationId, previousMethodPath);\n }\n\n const startTime = this.performanceTracker.startMethodTiming(operationId, methodPath);\n this.log('CHILD', operationId, methodName, methodPath, { startTime }, false);\n }\n\n try {\n const result = originalMethod.apply(instance, args);\n return result;\n } finally {\n // End performance tracking\n const performanceMetrics = this.performanceTracker.endMethodTiming(operationId, methodPath);\n\n // Log completion with performance metrics\n this.log(isNewOperation ? 'ORIGIN' : 'CHILD', operationId, methodName, methodPath, performanceMetrics, true);\n\n if (isNewOperation) {\n this.callTraceManager.endOperation();\n this.performanceTracker.cleanupOperation(operationId);\n }\n }\n };\n }\n\n override apply(instance: unknown): void {\n if (!this.isValidObject(instance)) {\n return;\n }\n\n // Create a performance wrapper\n const wrapper: MethodWrapper = {\n wrapMethod: (originalMethod: Function, methodInfo: MethodInfo) => {\n return this.createPerformanceInterceptor(\n originalMethod,\n String(methodInfo.methodName),\n methodInfo.methodPath.join(' → '),\n methodInfo.instance\n );\n }\n };\n\n // Use the generic interception utility\n this.exploreObjectMethods(instance, (methodInfo) => {\n const originalMethod = methodInfo.instance[methodInfo.methodName].bind(methodInfo.instance);\n const wrappedMethod = wrapper.wrapMethod(originalMethod, methodInfo);\n methodInfo.instance[methodInfo.methodName] = wrappedMethod;\n }, {});\n }\n}","import { Capability } from \"./Capability\";\nimport { CallTraceManager } from \"./tracing/CallTraceManager\";\nimport { MethodInfo, MethodMetadata, MethodWrapper } from \"./types\";\n\nexport type TracingCapabilityOptions = {\n log?: (\n type: 'ORIGIN' | 'CHILD',\n operationId: string,\n methodName: string,\n methodPath: string,\n callTrace: string[],\n formattedCallTrace: string[],\n args: any[]\n ) => void;\n shouldLog: (methodName: string | symbol, metadata: MethodMetadata) => boolean\n}\n\nexport class TracingCapability extends Capability {\n\n private callTraceManager: CallTraceManager;\n private log: (\n type: 'ORIGIN' | 'CHILD',\n operationId: string,\n methodName: string,\n methodPath: string,\n callTrace: string[],\n formattedCallTrace: string[],\n args: any[]\n ) => void;\n private shouldLogMethod?: (methodName: string | symbol, metadata: MethodMetadata) => boolean;\n\n constructor(options?: TracingCapabilityOptions) {\n super();\n this.log = options?.log ?? ((\n type: 'ORIGIN' | 'CHILD',\n operationId: string,\n methodName: string,\n methodPath: string,\n _callTrace: string[],\n formattedCallTrace: string[],\n args: any[]\n ) => {\n const stringifiedArgs = args.map(arg => this.stringifyValue(arg, 4));\n\n const logData: any = {\n methodPath,\n callStack: formattedCallTrace,\n args: stringifiedArgs\n };\n\n console.log(`[${type} ${operationId}] ${methodName}`, logData);\n });\n this.shouldLogMethod = options?.shouldLog ?? (() => true);\n this.callTraceManager = new CallTraceManager();\n }\n\n private createTracingInterceptor(\n originalMethod: Function,\n methodName: string,\n methodPath: string,\n instance: any\n ): Function {\n return (...args: any[]) => {\n const isNewOperation = this.callTraceManager.isNewOperation();\n let operationId: string;\n let callTrace: string[];\n\n if (isNewOperation) {\n operationId = this.callTraceManager.startNewOperation();\n callTrace = this.callTraceManager.addMethodToTrace(methodPath);\n const formattedCallTrace = this.callTraceManager.formatMethodPaths(callTrace);\n this.log('ORIGIN', operationId, methodName, methodPath, callTrace, formattedCallTrace, args);\n } else {\n operationId = this.callTraceManager.getActiveOperationId();\n callTrace = this.callTraceManager.addMethodToTrace(methodPath);\n const formattedCallTrace = this.callTraceManager.formatMethodPaths(callTrace);\n this.log('CHILD', operationId, methodName, methodPath, callTrace, formattedCallTrace, args);\n }\n\n try {\n const result = originalMethod.apply(instance, args);\n return result;\n } finally {\n if (isNewOperation) {\n this.callTraceManager.endOperation();\n } else {\n this.callTraceManager.removeMethodFromTrace();\n }\n }\n };\n }\n\n\n override apply(instance: unknown): void {\n if (!this.isValidObject(instance)) {\n return;\n }\n\n const logMethodCall = (\n type: 'ORIGIN' | 'CHILD',\n operationId: string,\n methodName: string,\n methodPath: string,\n callTrace: string[],\n formattedCallTrace: string[],\n args: any[]\n ) => {\n\n if (this.log) {\n this.log(type, operationId, methodName, methodPath, callTrace, formattedCallTrace, args);\n return;\n }\n\n const stringifiedArgs = args.map(arg => this.stringifyValue(arg, 4));\n\n const logData: any = {\n methodPath,\n callStack: formattedCallTrace,\n args: stringifiedArgs\n };\n\n console.log(`[${type} ${operationId}] ${methodName}`, logData);\n }\n\n // Create a tracing wrapper\n const wrapper: MethodWrapper = {\n wrapMethod: (originalMethod: Function, methodInfo: MethodInfo) => {\n const metadata: MethodMetadata = {\n parent: methodInfo.parent,\n instance: methodInfo.instance,\n methodPath: methodInfo.methodPath\n };\n\n const shouldLog = this.shouldLogMethod(methodInfo.methodName, metadata);\n if (!shouldLog) {\n return originalMethod; // Return unwrapped method if not logging\n }\n\n return this.createTracingInterceptor(\n originalMethod,\n String(methodInfo.methodName),\n methodInfo.methodPath.join(' → '),\n methodInfo.instance\n );\n }\n }\n\n // Use the generic interception utility\n this.exploreObjectMethods(instance, (methodInfo) => {\n const originalMethod = methodInfo.instance[methodInfo.methodName].bind(methodInfo.instance);\n const wrappedMethod = wrapper.wrapMethod(originalMethod, methodInfo);\n methodInfo.instance[methodInfo.methodName] = wrappedMethod;\n }, {});\n }\n}","export { Capability } from './Capability';\nexport { PerformanceCapability } from './PerformanceCapability';\nexport { TracingCapability } from './TracingCapability';\nexport * from './types';","import { PerformanceMetrics } from \"../types\";\n\nexport class PerformanceTracker {\n private methodTimings = new Map<string, { startTime: number; nextMethodStartTime?: number }>();\n private operationStartTimes = new Map<string, number>();\n\n startMethodTiming(operationId: string, methodPath: string): number {\n const startTime = performance.now();\n const key = `${operationId}:${methodPath}`;\n\n // Track operation start time for delta calculations\n if (!this.operationStartTimes.has(operationId)) {\n this.operationStartTimes.set(operationId, startTime);\n }\n\n this.methodTimings.set(key, { startTime });\n return startTime;\n }\n\n recordNextMethodStart(operationId: string, methodPath: string): void {\n const key = `${operationId}:${methodPath}`;\n const timing = this.methodTimings.get(key);\n if (timing) {\n timing.nextMethodStartTime = performance.now();\n }\n }\n\n endMethodTiming(operationId: string, methodPath: string): PerformanceMetrics {\n const endTime = performance.now();\n const key = `${operationId}:${methodPath}`;\n const timing = this.methodTimings.get(key);\n\n if (!timing) {\n return { startTime: endTime };\n }\n\n const duration = endTime - timing.startTime;\n const timeToNextCall = timing.nextMethodStartTime ?\n timing.nextMethodStartTime - timing.startTime : undefined;\n\n // Clean up\n this.methodTimings.delete(key);\n\n return {\n startTime: timing.startTime,\n endTime,\n duration,\n nextMethodStartTime: timing.nextMethodStartTime,\n timeToNextCall\n };\n }\n\n formatDuration(milliseconds: number): string {\n if (milliseconds < 1) {\n return `${(milliseconds * 1000).toFixed(1)}μs`;\n } else if (milliseconds < 1000) {\n return `${milliseconds.toFixed(2)}ms`;\n } else {\n return `${(milliseconds / 1000).toFixed(2)}s`;\n }\n }\n\n getDeltaFromOperationStart(operationId: string, currentTime: number): number {\n const operationStartTime = this.operationStartTimes.get(operationId);\n return operationStartTime ? currentTime - operationStartTime : 0;\n }\n\n cleanupOperation(operationId: string): void {\n this.operationStartTimes.delete(operationId);\n }\n}","import { uuid } from \"../../utilities\";\n\nexport class CallTraceManager {\n private activeOperationId: string | null = null;\n private activeCallStack: string[] = [];\n\n startNewOperation(): string {\n const operationId = uuid();\n this.activeOperationId = operationId;\n this.activeCallStack = [];\n return operationId;\n }\n\n isNewOperation(): boolean {\n return this.activeOperationId === null;\n }\n\n getActiveOperationId(): string {\n if (!this.activeOperationId) {\n throw new Error('No active operation context');\n }\n return this.activeOperationId;\n }\n\n addMethodToTrace(methodPath: string): string[] {\n if (this.isNewOperation()) {\n this.activeCallStack = [methodPath];\n } else {\n this.activeCallStack.push(methodPath);\n }\n return [...this.activeCallStack];\n }\n\n removeMethodFromTrace(): void {\n if (!this.isNewOperation()) {\n this.activeCallStack.pop();\n }\n }\n\n endOperation(): void {\n this.activeOperationId = null;\n this.activeCallStack = [];\n }\n\n formatMethodPaths(methodPaths: string[]): string[] {\n return methodPaths.map(path => path.replace(/ → /g, '.'));\n }\n\n getCurrentTrace(): string[] {\n return [...this.activeCallStack];\n }\n}","export class SlotPath {\n\n private _path: string[];\n\n get path() {\n return [...this._path]\n }\n\n constructor(...pathLike: string[]) {\n this._path = pathLike;\n }\n\n push(...pathLike: string[]) {\n this._path.push(...pathLike);\n }\n\n get(up: number = 0) {\n return this._path.slice(0, this._path.length - up).join(\".\")\n }\n}","import { uuid } from \"../utilities\";\nimport { CreateBlockOptions } from \"./types\";\n\ntype Line = string | Block;\n\ntype Param = { name: string, value: any };\ntype GenericParam = { name: string, callName: string };\n\n\nexport abstract class Block {\n readonly name: string;\n protected _lines: Line[] = [];\n protected _indent: string = \"\";\n protected _parent?: Block;\n\n constructor(name?: string, parentIndent: string = \"\", parent?: Block) {\n this.name = name != null ? name : uuid();\n this._indent = parentIndent;\n this._parent = parent;\n }\n\n indexOf(name: string) {\n return this._lines.findIndex(w => typeof w !== \"string\" && w.name === name);\n }\n\n getOrDefault<T extends Block>(name: string): T | undefined {\n\n if (name.includes('.') === false) {\n return this._lines.find(w => typeof w !== \"string\" && w.name === name) as T | undefined;\n }\n\n const split = name.match(/(\\[[^\\]]+\\]|[^.]+)/g);\n let result: Block = this;\n\n for (const item of split) {\n const found = result._lines.find(w => typeof w !== \"string\" && w.name === item) as Block;\n\n if (found == null) {\n\n if (\"getValue\" in result && result.getValue instanceof Block && result.getValue.name === item) {\n result = result.getValue;\n continue;\n }\n\n return undefined;\n }\n\n result = found;\n }\n\n return result as T;\n }\n\n get<T extends Block>(name: string): T {\n const found = this.getOrDefault(name);\n\n if (found == null) {\n throw new Error(`Error finding code block for given path. Path: ${name}`)\n }\n\n return found as T;\n }\n\n has(name: string) {\n return this._lines.some(w => typeof w !== \"string\" && w.name === name);\n }\n\n protected push(line: Line) {\n this._lines.push(line);\n }\n\n protected unshift(line: Line) {\n this._lines.unshift(line);\n }\n\n protected indent(text: string): string {\n return this._indent + text;\n }\n\n\n abstract toString(): string;\n}\n\nexport abstract class ContainerBlock extends Block {\n if(condition: string, options?: CreateBlockOptions): IfBuilder {\n const builder = new IfBuilder(condition, options?.name, this._indent + \" \", this);\n if (options?.unshift === true) {\n this.unshift(builder);\n } else {\n this.push(builder);\n }\n\n return builder;\n }\n\n raw(raw: string, options?: CreateBlockOptions): RawBuilder {\n const builder = new RawBuilder(raw, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n function(name?: string, options?: CreateBlockOptions): FunctionBuilder {\n const builder = new FunctionBuilder(name, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n factory(name?: string, options?: CreateBlockOptions): FunctionFactoryBuilder {\n const builder = new FunctionFactoryBuilder(name, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n variable(declaration: string, options?: CreateBlockOptions): VariableBuilder {\n const builder = new VariableBuilder(declaration, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n assign(variableName: string, options?: CreateBlockOptions): AssignmentBuilder {\n const builder = new AssignmentBuilder(variableName, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n object(options?: CreateBlockOptions): ObjectBuilder {\n const builder = new ObjectBuilder(options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n slot(name: string) {\n const builder = new SlotBlock(name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n array(accessor: string, options?: CreateBlockOptions) {\n const builder = new ArrayBuilder(accessor, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n}\n\nexport type StringType = \"template\" | \"default\";\n\nexport class StringBuilder extends Block {\n\n private _type: StringType;\n\n constructor(type: StringType, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._type = type;\n }\n\n append(value: string) {\n this._lines.push(value);\n return this;\n }\n\n toString() {\n if (this._type === \"template\") {\n return \"`\" + this._lines.join(\"\") + \"`\";\n }\n\n return `\"${this._lines.join(\"\")}\"`;\n }\n}\n\nexport class SlotBlock extends ContainerBlock {\n\n constructor(name: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n }\n\n insert(line: string | Block) {\n this.push(line);\n }\n\n toString(): string {\n return this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(line)\n : line.toString()\n ).join('\\n\\n');\n }\n}\n\nexport class AssignmentBuilder extends ContainerBlock {\n protected _variableName: string;\n protected _value?: string | Block;\n protected _functionName?: string;\n\n get getValue() {\n return this._value;\n }\n\n constructor(variableName: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._variableName = variableName;\n }\n\n value(value: string): this {\n this._value = value;\n return this;\n }\n\n and(and: string, options?: CreateBlockOptions): this {\n this._value = new AndBuilder(and, options?.name, this._indent, this);\n return this;\n }\n\n object(options?: CreateBlockOptions): ObjectBuilder {\n const objectBuilder = new ObjectBuilder(options?.name, this._indent, this);\n\n this._value = objectBuilder;\n\n return objectBuilder;\n }\n\n call(functionName: string, options?: CreateBlockOptions): ObjectBuilder {\n this._functionName = functionName;\n const objectBuilder = new ObjectBuilder(options?.name, this._indent, this);\n\n this._value = objectBuilder;\n\n return objectBuilder;\n }\n\n string(type: StringType, options?: CreateBlockOptions) {\n const stringBuilder = new StringBuilder(type, options?.name, this._indent, this);\n\n this._value = stringBuilder;\n\n return stringBuilder;\n }\n\n toString(): string {\n\n if (this._value == null) {\n throw new Error(\"Value cannot be null for AssignmentBuilder Builder\")\n }\n\n if (this._functionName != null) {\n return this.indent(`${this._variableName} = ${this._functionName}(${this._value.toString()});`);\n }\n\n return this.indent(`${this._variableName} = ${this._value.toString()};`);\n }\n}\n\nexport class AndBuilder extends ContainerBlock {\n\n constructor(and: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._lines.push(and);\n }\n\n and(and: string) {\n this._lines.push(and);\n }\n\n toString() {\n return this._lines.join(\" && \")\n }\n}\n\nexport class VariableBuilder extends Block {\n protected _declaration: string;\n protected _value?: string | Block;\n\n get getValue() {\n return this._value;\n }\n\n constructor(declaration: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._declaration = declaration;\n }\n\n value(value: string): this {\n this._value = value;\n return this;\n }\n\n object(options?: CreateBlockOptions): ObjectBuilder {\n const objectBuilder = new ObjectBuilder(options?.name, this._indent, this);\n\n this._value = objectBuilder;\n\n return objectBuilder;\n }\n\n array(accessor: string, options?: CreateBlockOptions): ArrayBuilder {\n const arrayBuilder = new ArrayBuilder(accessor, options?.name, this._indent, this);\n\n this._value = arrayBuilder;\n\n return arrayBuilder;\n }\n\n toString(): string {\n\n if (this._value == null) {\n throw new Error(\"Value cannot be null for Variable Builder\")\n }\n\n return this.indent(`const ${this._declaration} = ${this._value.toString()};`);\n }\n}\n\nexport class RawBuilder extends ContainerBlock {\n private _raw: string;\n\n constructor(raw: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._raw = raw;\n }\n\n toString(): string {\n return `${this._raw}\\n`;\n }\n}\n\nexport class ObjectBuilder extends Block {\n\n property(line: string) {\n // Add comma to previous line if it exists and isn't a brace\n if (this._lines.length > 0) {\n const lastLine = this._lines[this._lines.length - 1];\n if (typeof lastLine === 'string' && !lastLine.endsWith(\"{\")) {\n this._lines[this._lines.length - 1] = lastLine + \",\";\n }\n }\n this.push(line);\n return this;\n }\n\n nested(propertyName: string, name?: string) {\n const builder = new ObjectBuilder(name, this._indent + \" \", this);\n // Add comma to previous line if it exists and isn't a brace\n if (this._lines.length > 0) {\n const lastLine = this._lines[this._lines.length - 1];\n if (typeof lastLine === 'string' && !lastLine.endsWith(\"{\")) {\n this._lines[this._lines.length - 1] = lastLine + \",\";\n }\n }\n // Add the property name and opening brace\n this.push(`${propertyName}: {`);\n // Add the nested builder\n this.push(builder);\n // Add the closing brace\n this.push(\"}\");\n return builder;\n }\n\n toString(): string {\n // Check if this is a nested object's content\n const isNestedContent = this._parent instanceof ObjectBuilder;\n\n if (isNestedContent) {\n // For nested object contents, just return the lines\n return this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(\" \" + line)\n : line.toString()\n ).join('\\n');\n }\n\n // For root objects, include the braces\n const lines = [\n \"{\",\n ...this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(\" \" + line)\n : line.toString()\n ),\n this.indent(\"}\")\n ];\n\n return lines.join('\\n');\n }\n}\n\nexport class FunctionFactoryBuilder extends ContainerBlock {\n private _functionName?: string;\n private _params: Param[] = [];\n private _return: boolean = false;\n\n constructor(functionName?: string, sectionName?: string, parentIndent: string = \"\", parent?: Block) {\n super(sectionName, parentIndent, parent);\n this._functionName = functionName;\n }\n\n getParameters() {\n return [...this._params];\n }\n\n createParameter(value: any): Param {\n const name = `injection${this._params.length}`;\n return {\n name,\n value\n }\n }\n\n parameters(...params: Param[]): this {\n this._params.push(...params);\n return this;\n }\n\n return() {\n this._return = true;\n return this;\n }\n\n appendBody(line: string): this {\n this.push(line);\n return this;\n }\n\n invoke() {\n const body = this.toString();\n const parameterNames = this._getParameterNames();\n const parameterValues = this._getParameterValues();\n\n return Function(...parameterNames, body)(...parameterValues)\n }\n\n private _getParameterNames() {\n return this._params.map(w => w.name).join(\", \")\n }\n\n private _getParameterValues() {\n return this._params.map(w => w.value);\n }\n\n toString(): string {\n const r = this._return === true ? \"return \" : \"\";\n const signature = this._functionName\n ? `${r}function ${this._functionName}(${this._getParameterNames()})`\n : `${r}function(${this._getParameterNames()})`;\n\n const lines = [\n this.indent(signature + \" {\"),\n ...this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(\" \" + line)\n : line.toString()\n ),\n this.indent(\"}\")\n ];\n\n return lines.join('\\n');\n }\n}\n\nexport class FunctionBuilder extends ContainerBlock {\n private _functionName?: string;\n private _params: (string | GenericParam)[] = [];\n private _return: boolean = false;\n\n constructor(functionName?: string, sectionName?: string, parentIndent: string = \"\", parent?: Block) {\n super(sectionName, parentIndent, parent);\n this._functionName = functionName;\n }\n\n parameters(...params: (string | GenericParam)[]): this {\n this._params.push(...params);\n return this;\n }\n\n return() {\n this._return = true;\n return this;\n }\n\n appendBody(line: string): this {\n this.push(line);\n return this;\n }\n\n private _getParameterKeys() {\n return this._params.map(w => typeof w === \"object\" ? w.name : w).join(\", \")\n }\n\n toCallable() {\n return `${this._functionName}(${this._params.map(w => typeof w === \"object\" ? w.callName : w).join(\", \")})`\n }\n\n toString(): string {\n const r = this._return === true ? \"return \" : \"\";\n const signature = this._functionName\n ? `${r}function ${this._functionName}(${this._getParameterKeys()})`\n : `${r}function(${this._getParameterKeys()})`;\n\n const lines = [\n this.indent(signature + \" {\"),\n ...this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(\" \" + line)\n : line.toString()\n ),\n this.indent(\"}\")\n ];\n\n return lines.join('\\n');\n }\n}\n\nexport class ArrayBuilder extends Block {\n constructor(accessor: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._lines.push(accessor);\n }\n\n append(accessor: string) {\n this._lines.push(accessor);\n return this;\n }\n\n toString() {\n return `[${this._lines.join(\",\")}]`\n }\n}\n\nexport class IfBuilder extends ContainerBlock {\n private _condition: string;\n\n constructor(condition: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._condition = condition;\n }\n\n appendBody(line: string): this {\n this.push(line);\n return this;\n }\n\n unshiftBody(line: string): this {\n this.unshift(line);\n return this;\n }\n\n private stringifyLine(line: Line) {\n if (typeof line === 'string') {\n return this.indent(\" \" + line);\n }\n\n if (Array.isArray(line)) {\n return line.join(\"\\r\\n\")\n }\n\n return line.toString();\n }\n\n toString(): string {\n // need to join with \\r\\n because we are not an object\n const lines = [\n this.indent(`if (${this._condition}) {`),\n this._lines.map(x => this.stringifyLine(x)).join(\"\\r\\n\"),\n this.indent(\"}\")\n ]\n\n return lines.join(\"\\n\\n\");\n }\n}\n\nexport class CodeBuilder extends ContainerBlock {\n\n toString(): string {\n return this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(line)\n : line.toString()\n ).join('\\n\\n');\n }\n}","import { CloneArrayHandler } from \"./clone/CloneArrayHandler\";\nimport { CloneObjectHandler } from \"./clone/CloneObjectHandler\";\nimport { CloneValueHandler } from \"./clone/CloneValueHandler\";\n\n/// Purpose: \nexport class CloneHandlerBuilder {\n\n build() {\n const handler = new CloneObjectHandler();\n handler\n .setNext(new CloneValueHandler())\n .setNext(new CloneArrayHandler());\n\n return handler;\n }\n}","import { CompareObjectHandler } from \"./compare/CompareObjectHandler\";\nimport { CompareValueHandler } from \"./compare/CompareValueHandler\";\n\n/// Purpose: \nexport class CompareHandlerBuilder {\n\n build() {\n const handler = new CompareObjectHandler();\n handler.setNext(new CompareValueHandler());\n\n return handler;\n }\n}","import { DeserializeObjectHandler } from \"./deserialize/DeserializeObjectHandler\";\nimport { DeserializeValueHandler } from \"./deserialize/DeserializeValueHandler\";\nimport { DeserializeDateHandler } from \"./deserialize/DeserializeDateHandler\";\nimport { DeserializeComputedValueHandler } from \"./deserialize/DeserializeComputedValueHandler\";\nimport { DeserializeFunctionHandler } from \"./deserialize/DeserializeFunctionHandler\";\nimport { DeserializeDeserializerHandler } from \"./deserialize/DeserializeDeserializerHandler\";\n\n/// Purpose: \nexport class DeserializeHandlerBuilder {\n\n build() {\n const handler = new DeserializeObjectHandler();\n handler\n .setNext(new DeserializeDeserializerHandler())\n .setNext(new DeserializeComputedValueHandler())\n .setNext(new DeserializeFunctionHandler())\n .setNext(new DeserializeValueHandler())\n .setNext(new DeserializeDateHandler());\n\n return handler;\n }\n}","import { EnableChangeTrackingObjectHandler } from \"./enableChangeTracking/EnableChangeTrackingObjectHandler\";\nimport { EnableChangeTrackingPrimitiveValueHandler } from \"./enableChangeTracking/EnableChangeTrackingPrimitiveValueHandler\";\n\n/// Purpose: \nexport class EnableChangeTrackingHandlerBuilder {\n\n build() {\n const handler = new EnableChangeTrackingObjectHandler();\n handler.setNext(new EnableChangeTrackingPrimitiveValueHandler());\n\n return handler;\n }\n}","import { EnrichmentNullableObjectHandler } from \"./enrichment/EnrichmentNullableObjectHandler\";\nimport { EnrichmentObjectHandler } from \"./enrichment/EnrichmentObjectHandler\";\nimport { EnrichmentObjectIdentityHandler } from \"./enrichment/EnrichmentObjectIdentityHandler\";\nimport { EnrichmentPrimitiveIdentityHandler } from \"./enrichment/EnrichmentPrimitiveIdentityHandler\";\nimport { EnrichmentPrimitiveHandler } from './enrichment/EnrichmentPrimitiveHandler';\nimport { EnrichmentFunctionHandler } from './enrichment/EnrichmentFunctionHandler';\nimport { EnrichmentDefaultValueHandler } from './enrichment/EnrichmentDefaultValueHandler';\nimport { EnrichmentDefaultFunctionHandler } from './enrichment/EnrichmentDefaultFunctionHandler';\nimport { EnrichmentComputedValueHandler } from './enrichment/EnrichmentComputedValueHandler';\n\n/// Purpose: \nexport class EnrichmentHandlerBuilder {\n\n build() {\n const handler = new EnrichmentPrimitiveIdentityHandler();\n\n handler.setNext(new EnrichmentObjectIdentityHandler())\n .setNext(new EnrichmentObjectHandler())\n .setNext(new EnrichmentNullableObjectHandler())\n .setNext(new EnrichmentFunctionHandler())\n .setNext(new EnrichmentDefaultValueHandler())\n .setNext(new EnrichmentDefaultFunctionHandler())\n .setNext(new EnrichmentComputedValueHandler())\n .setNext(new EnrichmentPrimitiveHandler());\n\n return handler;\n }\n}","import { FreezePrimitiveValueHandler } from \"./freeze/FreezePrimitiveValueHandler\";\nimport { FreezeObjectHandler } from \"./freeze/FreezeObjectHandler\";\n\n/// Purpose: \nexport class FreezeHandlerBuilder {\n\n build() {\n const handler = new FreezeObjectHandler();\n handler.setNext(new FreezePrimitiveValueHandler());\n\n return handler;\n }\n}","import { HashKeyHandler } from \"./hash/HashKeyHandler\";\nimport { HashValueHandler } from \"./hash/HashValueHandler\";\nimport { HashDateHandler } from \"./hash/HashDateHandler\";\nimport { HashIdentityHandler } from \"./hash/HashIdentityHandler\";\nimport { HashFunctionHandler } from \"./hash/HashFunctionHandler\";\nimport { HashComputedValueHandler } from \"./hash/HashComputedValueHandler\";\n\n/// Purpose: \n// Should ignore Id's and Identities for type Object because we want \n// to comare a new addition with what was saved in the database\nexport class HashHandlerBuilder {\n\n build() {\n const handler = new HashKeyHandler();\n\n handler\n .setNext(new HashComputedValueHandler())\n .setNext(new HashFunctionHandler())\n .setNext(new HashIdentityHandler())\n .setNext(new HashDateHandler())\n .setNext(new HashValueHandler());\n\n return handler;\n }\n}","import { HashTypeValueHandler } from \"./hashType/HashTypeValueHandler\";\n\n/// Purpose: \nexport class HashTypeHandlerBuilder {\n\n build() {\n const handler = new HashTypeValueHandler();\n\n return handler;\n }\n}","import { IdSelectorValueHandler } from \"./idSelector/IdSelectorValueHandler\";\n/// Purpose: \nexport class IdSelectorHandlerBuilder {\n\n build() {\n const handler = new IdSelectorValueHandler();\n\n return handler;\n }\n}","import { MergeDefaultFunctionHandler } from \"./merge/MergeDefaultFunctionHandler\";\nimport { MergePrimitiveHandler } from \"./merge/MergePrimitiveHandler\";\nimport { MergeComputedValueHandler } from \"./merge/MergeComputedValueHandler\";\nimport { MergeDefaultValueHandler } from \"./merge/MergeDefaultValueHandler\";\nimport { MergeFunctionHandler } from \"./merge/MergeFunctionHandler\";\n\n/// Purpose: Should recompute computed properties\nexport class MergeHandlerBuilder {\n\n build() {\n const handler = new MergeDefaultFunctionHandler();\n handler.setNext(new MergeDefaultValueHandler())\n .setNext(new MergeFunctionHandler())\n .setNext(new MergeComputedValueHandler())\n .setNext(new MergePrimitiveHandler());\n\n return handler;\n }\n}","import { PrepareIdentityHandler } from \"./prepare/PrepareIdentityHandler\";\nimport { PrepareKeyHandler } from \"./prepare/PrepareKeyHandler\";\nimport { PrepareValueHandler } from \"./prepare/PrepareValueHandler\";\nimport { PrepareObjectHandler } from \"./prepare/PrepareObjectHandler\";\nimport { PrepareComputedValueHandler } from \"./prepare/PrepareComputedValueHandler\";\nimport { PrepareFunctionHandler } from \"./prepare/PrepareFunctionHandler\";\n\n/// Purpose: Called before we save entities to the database. Responsible for cleaning up\n/// an entity before it is sent to the plugin\nexport class PrepareHandlerBuilder {\n\n build() {\n const handler = new PrepareIdentityHandler();\n handler\n .setNext(new PrepareFunctionHandler())\n .setNext(new PrepareComputedValueHandler())\n .setNext(new PrepareKeyHandler())\n .setNext(new PrepareObjectHandler())\n .setNext(new PrepareValueHandler());\n\n return handler;\n }\n}","import { SerializeDateHandler } from \"./serialize/SerializeDateHandler\";\nimport { SerializeObjectHandler } from \"./serialize/SerializeObjectHandler\";\nimport { SerializeValueHandler } from \"./serialize/SerializeValueHandler\";\nimport { SerializeSerializerHandler } from \"./serialize/SerializeSerializerHandler\";\n\n/// Purpose: \nexport class SerializeHandlerBuilder {\n\n build() {\n const handler = new SerializeSerializerHandler();\n handler\n .setNext(new SerializeDateHandler())\n .setNext(new SerializeValueHandler())\n .setNext(new SerializeObjectHandler());\n\n return handler;\n }\n}","import { StripObjectHandler } from \"./strip/StripObjectHandler\";\nimport { StripValueHandler } from \"./strip/StripValueHandler\";\nimport { StripKeyHandler } from \"./strip/StripKeyHandler\";\nimport { StripIdentityHandler } from \"./strip/StripIdentityHandler\";\n\n/// Purpose: \nexport class StripHandlerBuilder {\n\n build() {\n const handler = new StripIdentityHandler();\n\n handler.setNext(new StripKeyHandler())\n .setNext(new StripObjectHandler())\n .setNext(new StripValueHandler());\n\n return handler;\n }\n}","import { CodeBuilder, IfBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CloneArrayHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Array) {\n\n if (property.isNullable || property.isOptional) {\n // Child properties will take care of this\n return builder;\n }\n\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n if (property.parent == null) {\n\n const resultAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n const slot = builder.get<SlotBlock>(\"if\");\n\n slot.if(`${entitySelectorPath} != null`).appendBody(`${resultAssignmentPath} = [...${entitySelectorPath}]`);\n return builder;\n }\n // slotPath.push(...property.getParentPathArray());\n // const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n // nestedObjectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CloneObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n\n // Child properties will take care of this\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, IfBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CloneValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object && property.type != SchemaTypes.Array) {\n const slot = builder.get<SlotBlock>(\"if\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n const resultAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n\n if (property.parent == null) {\n // we are a first level property\n slot.if(`${entitySelectorPath} != null`).appendBody(`${resultAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n // Second level or more property\n // Need to ensure parent is assigned\n const propertyParentPath = [\"result\", ...property.getParentPathArray()]\n const ifBuilder = new IfBuilder(`${propertyParentPath.join(\"?.\")} == null`).appendBody(`${propertyParentPath.join(\".\")} = {};`);\n\n slot.if(`${entitySelectorPath} != null`).appendBody(ifBuilder.toString()).appendBody(`${resultAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CompareObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { AndBuilder, CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CompareValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object) {\n let compare = builder.getOrDefault<AndBuilder>(\"result.variable.compare\");\n const leftCompare = property.getSelectrorPath({ parent: \"a\" });\n const rightCompare = property.getSelectrorPath({ parent: \"b\" });\n\n if (compare == null) {\n compare = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .and(`${leftCompare} === ${rightCompare}`, { name: \"compare\" });\n return builder;\n }\n\n compare.and(`${leftCompare} === ${rightCompare}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class DeserializeComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n // Do nothing with the value\n if (property.functionBody != null && property.type === SchemaTypes.Computed && property.isUnmapped === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ContainerBlock, ObjectBuilder } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\n/**\n * Handles converting a string value from a database to a Date value\n */\nexport class DeserializeDateHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Date) {\n const slotPath = new SlotPath(\"result.variable.object\");\n let objectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n const entityAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n const assignment = `${property.name}: typeof ${entitySelectorPath} === \"string\" ? new Date(${entitySelectorPath}) : ${entitySelectorPath}`;\n\n // if it is nullable or optional, assign in an if block, otherwise we \n // could unintentionally assign null/undefined to a property that does not exist\n if (property.isOptional || property.isNullable) {\n const ifAssignment = `${entityAssignmentPath} = typeof ${entitySelectorPath} === \"string\" ? new Date(${entitySelectorPath}) : ${entitySelectorPath}`;\n const rootPath = new SlotPath(\"if\");\n builder.get<ContainerBlock>(rootPath.get()).if(`${entitySelectorPath} != null`).appendBody(ifAssignment);\n return;\n }\n\n // A date cannot be a nested object, just do the assignment\n if (property.parent == null) {\n objectBuilder.property(assignment);\n\n return builder;\n }\n\n slotPath.push(...property.getParentPathArray());\n const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n nestedObjectBuilder.property(assignment)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class DeserializeDeserializerHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.valueDeserializer != null) {\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(\"result.variable.object\");\n const assignmentBuilder = builder.getOrDefault<SlotBlock>(\"functions\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n const defaultFunctionWithParameters = this.toNamedFunction(property.valueDeserializer.toString(), assignmentBuilder);\n defaultFunctionWithParameters.builder.parameters(...defaultFunctionWithParameters.parameters.map((_, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: entitySelectorPath })));\n\n if (property.parent == null) {\n objectBuilder.property(`${property.name}: ${defaultFunctionWithParameters.builder.toCallable()}`);\n return builder;\n }\n\n const slotPath = new SlotPath(...property.getParentPathArray());\n objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n objectBuilder.property(`${property.name}: ${defaultFunctionWithParameters.builder.toCallable()}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class DeserializeFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n // Functions are always unmapped\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class DeserializeObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const slotPath = new SlotPath(\"result.variable.object\");\n let objectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n\n if (property.parent == null) {\n objectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n slotPath.push(...property.getParentPathArray());\n const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n nestedObjectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class DeserializeValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object && property.type != SchemaTypes.Date) {\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(\"result.variable.object\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n if (property.parent == null) {\n objectBuilder.property(`${property.name}: ${entitySelectorPath}`);\n return builder;\n }\n\n const slotPath = new SlotPath(...property.getParentPathArray());\n objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n objectBuilder.property(`${property.name}: ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnableChangeTrackingObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const assignmentSlot = builder.get<SlotBlock>(\"assignment\");\n const childSelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n const childAssignmentPath = property.getAssignmentPath({ parent: \"entity\" });\n\n assignmentSlot.if(`${childSelectorPath} != null`).appendBody(`${childAssignmentPath} = enableChangeTracking(${childAssignmentPath});`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnableChangeTrackingPrimitiveValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type !== SchemaTypes.Object) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Computed) {\n\n const parameterNames: string[] = [\"enriched\", \"collectionName\"];\n\n if (property.injected != null) {\n\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n parameterNames.push(parameter.name);\n }\n\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.declarations\");\n const defaultFunctionWithParameters = this.toNamedFunction(property.functionBody.toString(), declarationsSlot);\n\n defaultFunctionWithParameters.builder.parameters(...parameterNames.map((w, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: w })));\n\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${defaultFunctionWithParameters.builder.toCallable()}`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class EnrichmentDefaultFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.defaultValue != null && typeof property.defaultValue === \"function\") {\n\n this.setEnrichedProperty(property, builder);\n\n // we need to add the call for this function too, want to create an if\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.declarations\");\n\n if (property.injected != null) {\n\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n\n if (factory == null) {\n throw new Error(\"Error building enricher, could not find slot for factory\")\n }\n\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n const defaultFunctionWithParameters = this.toNamedFunction(property.defaultValue.toString(), declarationsSlot);\n // This is ok, defaults can only inject one parameter anyways\n defaultFunctionWithParameters.builder.parameters(...defaultFunctionWithParameters.parameters.map(w => ({ name: w, callName: parameter.name })));\n\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${defaultFunctionWithParameters.builder.toCallable()}`);\n\n return builder;\n }\n\n const defaultFunction = this.toNamedFunction(property.defaultValue.toString(), declarationsSlot);\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${defaultFunction.builder.toCallable()}`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class EnrichmentDefaultValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.defaultValue != null && typeof property.defaultValue !== \"function\") {\n\n this.setEnrichedProperty(property, builder);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n\n const parameterNames: string[] = [\"enriched\", \"collectionName\"];\n\n if (property.injected != null) {\n\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n parameterNames.push(parameter.name);\n }\n\n\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.declarations\");\n // Unwrap the functions to removing currying\n const defaultFunctionWithParameters = this.toNamedFunction(property.functionBody.toString(), declarationsSlot);\n\n defaultFunctionWithParameters.builder.parameters(...parameterNames.map((w, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: w })));\n\n const slot = builder.get<SlotBlock>(\"factory.function.assignment\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n\n slot.assign(enrichedAssignmentPath).value(defaultFunctionWithParameters.builder.toCallable());\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentNullableObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object && (property.isNullable || property.isOptional)) {\n\n const slotPath = new SlotPath(\"factory\", \"function\", \"enriched\", \"object\", \"enriched\");\n const nestedSlotPath = this.buildSlotPath(property, slotPath);\n\n // Generate null check for current level using parent relationships\n const entityPath = property.getSelectrorPath({ parent: \"entity\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const enrichedPath = property.getAssignmentPath({ parent: \"enriched\" });\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n\n if (ifsSlot == null) {\n throw new Error(\"Error building enricher, could not find slot for factory.function.ifs\")\n }\n\n\n ifsSlot.if(`${entityPath} != null`).appendBody(`${enrichedPath} = enableChangeTracking(${enrichedPath} || {}, \"${property.name}\");`);\n\n let enriched = builder.getOrDefault<ObjectBuilder>(nestedSlotPath.get());\n\n if (enriched == null) {\n const enrichedSlot = builder.get<ObjectBuilder>(slotPath.get());\n\n if (enrichedSlot == null) {\n throw new Error(`Error building enricher, could not find slot for ${slotPath.get()}`)\n }\n\n enriched = enrichedSlot.nested(property.name, `[${enrichedPath}]`);\n }\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object && (property.isNullable || property.isOptional) === false) {\n\n const slotPath = new SlotPath(\"factory\", \"function\", \"enriched\", \"object\", \"enriched\");\n const nestedSlotPath = this.buildSlotPath(property, slotPath);\n\n // Generate null check for current level using parent relationships\n const enrichedPath = property.getAssignmentPath({ parent: \"enriched\" });\n\n const slot = builder.get<SlotBlock>(\"factory.function.assignment\");\n\n slot.assign(enrichedPath).value(`enableChangeTracking(${enrichedPath} || {}, \"${property.name}\")`)\n\n let enriched = builder.getOrDefault<ObjectBuilder>(nestedSlotPath.get());\n\n if (enriched == null) {\n const enrichedSlot = builder.get<ObjectBuilder>(slotPath.get());\n\n if (enrichedSlot == null) {\n throw new Error(`Error building enricher, could not find slot for ${slotPath.get()}`)\n }\n\n enriched = enrichedSlot.nested(property.name, `[${enrichedPath}]`);\n }\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentObjectIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true && property.type == SchemaTypes.Object) {\n // do nothing right now\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class EnrichmentPrimitiveHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n this.setEnrichedProperty(property, builder);\n\n return builder;\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentPrimitiveIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true && property.type != SchemaTypes.Object) {\n const selectorPath = property.getSelectrorPath({ parent: \"entity\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const slot = builder.get<SlotBlock>(\"factory.function.ifs\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n\n slot.if(`${selectorPath} != null`).appendBody(`${enrichedAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class FreezeObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const assignmentSlot = builder.get<SlotBlock>(\"assignment\");\n const childSelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n const childAssignmentPath = property.getAssignmentPath({ parent: \"entity\" });\n\n assignmentSlot.if(`${childSelectorPath} != null`).unshiftBody(`${childAssignmentPath} = Object.freeze(${childAssignmentPath});`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class FreezePrimitiveValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type !== SchemaTypes.Object) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class HashComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Computed && property.isUnmapped === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock, StringBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class HashDateHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Date) {\n let stringBuilder = builder.getOrDefault<StringBuilder>(\"hash-object-return.variable.string\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n if (stringBuilder == null) {\n stringBuilder = builder.get<SlotBlock>(\"hash-object-return\")\n .assign(\"const result\", { name: \"variable\" })\n .string(\"template\", { name: \"string\" });\n }\n\n stringBuilder.append(\"${stringifyDate(\" + entitySelectorPath + \")}\")\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class HashFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n // Functions are always unmapped\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class HashIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock, StringBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class HashKeyHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey === true) {\n let stringBuilder = builder.getOrDefault<StringBuilder>(\"hash-id-if.if-body.variable.string\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n if (stringBuilder == null) {\n stringBuilder = builder.get<SlotBlock>(\"hash-id-if.if-body\")\n .assign(\"const result\", { name: \"variable\" })\n .string(\"template\", { name: \"string\" });\n }\n\n stringBuilder.append(\"${\" + entitySelectorPath + \"}\")\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock, StringBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class HashValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type !== SchemaTypes.Object) {\n let stringBuilder = builder.getOrDefault<StringBuilder>(\"hash-object-return.variable.string\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n if (stringBuilder == null) {\n stringBuilder = builder.get<SlotBlock>(\"hash-object-return\")\n .assign(\"const result\", { name: \"variable\" })\n .string(\"template\", { name: \"string\" });\n }\n\n stringBuilder.append(\"${\" + entitySelectorPath + \"}\")\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class HashTypeValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey && property.isIdentity) {\n const slot = builder.get<SlotBlock>(\"ifs\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n slot.if(`${entitySelectorPath} == null`).appendBody(`return \"Object\"`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { ArrayBuilder, CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class IdSelectorValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey) {\n let arrayBuilder = builder.getOrDefault<ArrayBuilder>(\"result.variable.array\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n\n if (arrayBuilder == null) {\n arrayBuilder = builder.get<SlotBlock>(\"result\")\n .variable(\"result\", { name: \"variable\" })\n .array(`${entitySelectorPath}`, { name: \"array\" });\n\n return builder;\n }\n\n\n arrayBuilder.append(`${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class MergeComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Computed) {\n const parameterNames: string[] = [\"source\", \"collectionName\"];\n\n if (property.injected != null) {\n\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n parameterNames.push(parameter.name);\n }\n\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.header\");\n const defaultFunctionWithParameters = this.toNamedFunction(property.functionBody.toString(), declarationsSlot);\n\n defaultFunctionWithParameters.builder.parameters(...parameterNames.map((w, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: w })));\n\n const slot = builder.get<SlotBlock>(\"factory.function.assignments\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"destination\" });\n\n // We want to recompute the value always in case there are changes\n slot.assign(enrichedAssignmentPath).value(defaultFunctionWithParameters.builder.toCallable());\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class MergeDefaultFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n // we only want this to run if the value for the property is null\n // we are changing merge to be more like enrich so we can handle injections\n // we may need to change more. Need to move towards factories\n if (property.defaultValue != null && typeof property.defaultValue === \"function\") {\n const defaultFunctionParameters: string[] = [];\n\n if (property.injected != null) {\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n defaultFunctionParameters.push(parameter.name);\n }\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n // we only want to run if the destination is null\n const selectorPath = property.getSelectrorPath({ parent: \"destination\" });\n const assignmentPath = property.getAssignmentPath({ parent: \"destination\" });\n\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.header\");\n const defaultFunctionWithParameters = this.toNamedFunction(property.defaultValue.toString(), declarationsSlot);\n\n defaultFunctionWithParameters.builder.parameters(...defaultFunctionParameters.map((w, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: w })));\n\n\n ifsSlot.if(`${selectorPath} == null`).appendBody(`${assignmentPath} = ${defaultFunctionWithParameters.builder.toCallable()}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class MergeDefaultValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.defaultValue != null && typeof property.defaultValue !== \"function\") {\n const defaultFunctionParameters: string[] = [];\n\n if (property.injected != null) {\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n defaultFunctionParameters.push(parameter.name);\n }\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n // we only want to run if the destination is null\n const selectorPath = property.getSelectrorPath({ parent: \"destination\" });\n const assignmentPath = property.getAssignmentPath({ parent: \"destination\" });\n\n ifsSlot.if(`${selectorPath} == null`).appendBody(`${assignmentPath} = ${typeof property.defaultValue === \"string\" ? `\"${property.defaultValue}\"` : property.defaultValue}`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class MergeFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class MergePrimitiveHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object) {\n const selectorPath = property.getSelectrorPath({ parent: \"source\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const slot = builder.get<SlotBlock>(\"factory.function.assignments\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"source\" });\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"destination\" });\n\n slot.if(`${selectorPath} != null`).appendBody(`${enrichedAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\n// Do nothing with the value\nexport class PrepareComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Computed && property.isUnmapped === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class PrepareFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n // Functions are always unmapped\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class PrepareIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true) {\n const selectorPath = property.getSelectrorPath({ parent: \"entity\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const slot = builder.get<SlotBlock>(\"assignments\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n\n slot.if(`${selectorPath} != null`).appendBody(`${enrichedAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class PrepareKeyHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey === true) {\n const selectorPath = property.getSelectrorPath({ parent: \"entity\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const slot = builder.get<SlotBlock>(\"assignments\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n\n slot.if(`${selectorPath} != null`).appendBody(`${enrichedAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class PrepareObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const slotPath = new SlotPath(\"result\", \"variable\", \"object\");\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(slotPath.get());\n\n // There is a chance this is the first property we handle,\n // if that is the case, the main result variable will not be\n // constructed yet\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n if (property.parent == null) {\n objectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n slotPath.push(...property.getParentPathArray());\n const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n nestedObjectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class PrepareValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object) {\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(\"result.variable.object\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n // Remap the property to the name in the database if from is set\n const name = property.from != null ? property.from : property.name;\n\n if (property.parent == null) {\n objectBuilder.property(`${name}: ${entitySelectorPath}`);\n return builder;\n }\n\n const slotPath = new SlotPath(...property.getParentPathArray());\n objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n objectBuilder.property(`${name}: ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ContainerBlock, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\n/**\n * Handles converting a Date value from JavaScript to a string value\n */\nexport class SerializeDateHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Date) {\n let objectBuilder = builder.get<SlotBlock>(\"if\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n const entityAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n const assignment = `${property.name}: ${entitySelectorPath} instanceof Date ? ${entitySelectorPath}.toISOString() : ${entitySelectorPath}`;\n\n // if it is nullable or optional, assign in an if block, otherwise we \n // could unintentionally assign null/undefined to a property that does not exist\n if (property.isOptional || property.isNullable) {\n const ifAssignment = `${entityAssignmentPath} = ${entitySelectorPath} instanceof Date ? ${entitySelectorPath}.toISOString() : ${entitySelectorPath}`;\n const rootPath = new SlotPath(\"if\");\n builder.get<ContainerBlock>(rootPath.get()).if(`${entitySelectorPath} != null`).appendBody(ifAssignment);\n return;\n }\n\n // A date cannot be a nested object, just do the assignment\n if (property.parent == null) {\n objectBuilder.if(`Object.hasOwn(entity, \"${property.name}\")`).appendBody(`${entityAssignmentPath} = ${entitySelectorPath}`)\n\n return builder;\n }\n\n // TODO: SOLVE THIS, IT IS CLOSE\n //const slotPath = new SlotPath(...property.getParentPathArray());\n // slotPath.push(...property.getParentPathArray());\n // const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n // nestedObjectBuilder.property(assignment)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\nexport class SerializeObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const slotPath = new SlotPath(\"assignments\");\n const childPath = property.getAssignmentPath({ parent: \"result\" });\n\n if (property.isNullable || property.isOptional) {\n // Do nothing if it's nullable or optional as property assignments will check\n // and create if it does not exist. This way we can handle null/optional\n return builder;\n }\n\n const slot = builder.get<SlotBlock>(slotPath.get());\n slot.assign(`${childPath}`, { name: `[${childPath}]` }).value(\"{}\");\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class SerializeSerializerHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.valueSerializer != null) {\n const objectBuilder = builder.getOrDefault<SlotBlock>(\"if\");\n const assignmentBuilder = builder.getOrDefault<SlotBlock>(\"functions\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n const resultSelectorPath = property.getAssignmentPath({ parent: \"result\" });\n\n const defaultFunctionWithParameters = this.toNamedFunction(property.valueSerializer.toString(), assignmentBuilder);\n defaultFunctionWithParameters.builder.parameters(...defaultFunctionWithParameters.parameters.map((_, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: entitySelectorPath })));\n\n if (property.parent == null) {\n objectBuilder.if(`Object.hasOwn(entity, \"${property.name}\")`).appendBody(`${resultSelectorPath} = ${defaultFunctionWithParameters.builder.toCallable()}`)\n return builder;\n }\n\n // TODO: SOLVE THIS\n //const slotPath = new SlotPath(...property.getParentPathArray());\n\n // const slotPath = new SlotPath(...property.getParentPathArray());\n // objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n // objectBuilder.property(`${property.name}: ${defaultFunctionWithParameters.builder.toCallable()}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, IfBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class SerializeValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object && property.type != SchemaTypes.Date) {\n const slot = builder.getOrDefault<SlotBlock>(\"if\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n const resultSelectorPath = property.getAssignmentPath({ parent: \"result\" });\n\n if (property.parent == null) {\n // Only assign if the incoming entity has the property, this allows partial serialization\n // Basically only serialize what is there\n slot.if(`Object.hasOwn(entity, \"${property.name}\")`).appendBody(`${resultSelectorPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n const parentSelectPath = [\"entity\", ...property.getParentPathArray()].join(\".\");\n const parentAssignPath = [\"result\", ...property.getParentPathArray()].join(\".\");\n\n const ifSlot = slot.if(`Object.hasOwn(${parentSelectPath}, \"${property.name}\")`);\n\n if (property.parent.isNullable || property.parent.isOptional) {\n // Do this for nullable/optional parents. Parent will be null if its nullable/optional\n const conditionallyCreateParent = new IfBuilder(`${parentAssignPath} == null`).appendBody(`${parentAssignPath} = {}`);\n ifSlot.appendBody(conditionallyCreateParent.toString());\n }\n\n ifSlot.appendBody(`${resultSelectorPath} = ${entitySelectorPath}`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class StripIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class StripKeyHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class StripObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const slotPath = new SlotPath(\"result.variable.object\");\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(slotPath.get());\n\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n if (property.parent == null) {\n objectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n slotPath.push(...property.getParentPathArray());\n const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n nestedObjectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { PropertyInfo, SchemaTypes } from \"../../../schema\";\nimport { PropertyInfoHandler } from \"../types\";\nimport { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\n\nexport class StripValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object) {\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(\"result.variable.object\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n\n // There is a chance this is the first property we handle,\n // if that is the case, the main result variable will not be\n // constructed yet\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n if (property.parent == null) {\n objectBuilder.property(`${property.name}: ${entitySelectorPath}`);\n return builder;\n }\n\n const slotPath = new SlotPath(...property.getParentPathArray());\n objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n objectBuilder.property(`${property.name}: ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { AssignmentBuilder, CodeBuilder, ContainerBlock, ObjectBuilder, SlotBlock } from '..';\nimport { PropertyInfo } from '../../schema/PropertyInfo';\nimport { SlotPath } from '../SlotPath';\nimport { SchemaError } from '../../errors/SchemaError';\nimport { uuid } from '../../utilities/uuid';\nimport { countWordOccurance } from '../utils';\n\nexport interface IHandler {\n setNext(handler: IHandler): IHandler;\n\n handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null;\n}\n\nexport abstract class PropertyInfoHandler implements IHandler {\n\n private _next: IHandler | null;\n\n setNext(handler: IHandler): IHandler {\n this._next = handler;\n\n return handler;\n }\n\n handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n try {\n if (this._next) {\n return this._next.handle(property, builder);\n }\n\n return null;\n } catch (e: any) {\n throw new SchemaError(e, `Error handling property: ${property.name}`);\n }\n }\n\n protected buildSlotPath(property: PropertyInfo<any>, path: SlotPath) {\n\n const result = new SlotPath(...path.path);\n const items: string[] = []\n let p = property;\n\n while (p.parent != null) {\n items.unshift(p.name);\n p = p.parent;\n }\n\n items.unshift(p.name);\n\n result.push(...items);\n\n return result\n }\n\n protected setEnrichedProperty(property: PropertyInfo<any>, root: CodeBuilder) {\n const useFromPropertyName = property.from != null;\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\", useFromPropertyName });\n\n if (property.parent != null) {\n const slotPath = new SlotPath(\"factory\", \"function\", \"enriched\", \"object\", \"enriched\");\n const path = property.parent.getAssignmentPath({ parent: \"enriched\" });\n slotPath.push(`[${path}]`)\n const objectBuilder = root.get<ObjectBuilder>(slotPath.get());\n const childEntityPathSelector = property.getSelectrorPath({ parent: \"entity\", useFromPropertyName });\n objectBuilder.property(`${property.name}: ${childEntityPathSelector}`);\n return;\n }\n\n const slotPath = new SlotPath(\"factory\", \"function\", \"enriched\", \"object\", \"enriched\");\n let enriched = root.getOrDefault<ObjectBuilder>(slotPath.get());\n\n if (enriched == null) {\n const enrichedSlot = root.get<SlotBlock>(\"factory.function.enriched\");\n enriched = enrichedSlot.variable(\"enriched\", { name: \"object\" }).object({ name: \"enriched\" });\n }\n\n enriched.property(`${property.name}: ${entitySelectorPath}`);\n }\n\n protected toNamedFunction(stringifiedFunction: string, parent: ContainerBlock) {\n const name = `_${uuid()}`;\n\n const builder = parent.function(name);\n const occurences = countWordOccurance(stringifiedFunction, \"=>\")\n\n if (occurences > 0) {\n\n const split = stringifiedFunction.split(\"=>\").map(w => w.trim());\n const parameters = split[0].replace(/\\(|\\)/g, \"\").split(\",\");\n let body = split[1];\n\n if (occurences > 1) {\n // we have a function that returns a function\n const index = stringifiedFunction.indexOf(\"=>\");\n body = stringifiedFunction.slice(index + 2, stringifiedFunction.length)\n }\n\n if (body.startsWith(\"{\") === true && body.endsWith(\"}\")) {\n\n // Remove brackets, wrapping function will have them\n builder.appendBody(body.slice(1, body.length - 1));\n\n return {\n builder,\n parameters\n };\n }\n\n builder.appendBody(`return ${body};`);\n return {\n builder,\n parameters\n }\n }\n\n throw new Error(\"Only arrow functions are allowed in the schema definition: function () {} ---> () => {}\");\n }\n}","export * from './blocks';\nexport * from './types';","/**\n * Counts non-overlapping occurrences of a term in text.\n *\n * Behavior:\n * - Case-sensitive matching\n * - If the search term is composed entirely of word characters (A–Z, a–z, 0–9, _),\n * enforce whole-word boundaries so \"red\" does not match inside \"redder\".\n * - If the search term contains any non-word character (e.g. \"=>\", \"()\", \"::\"),\n * match anywhere without boundary checks (useful for symbols).\n * - Non-overlapping matches (after a hit, advances by term length)\n * - Optimized single-character fast path; otherwise uses indexOf loop\n *\n * Examples:\n * - countWordOccurance(\"red redder red\", \"red\") => 2\n * - countWordOccurance(\"()=>{}\", \"=>\") => 1\n * - countWordOccurance(\"aaaa\", \"aa\") => 2 (non-overlapping)\n *\n * @param text The source text to scan\n * @param word The term to match (must be non-empty)\n * @returns The number of occurrences found\n */\nexport const countWordOccurance = (text: string, word: string) => {\n const wl = word.length;\n const tl = text.length;\n\n if (wl === 0 || wl > tl) return 0;\n\n // Fast path for single-character words\n if (wl === 1) {\n let c = 0;\n const code = word.charCodeAt(0);\n for (let i = 0; i < tl; i++) if (text.charCodeAt(i) === code) c++;\n return c;\n }\n\n let count = 0;\n let i = 0;\n\n function isWordCharCode(c: number): boolean {\n return (c >= 48 && c <= 57) // 0-9\n || (c >= 65 && c <= 90) // A-Z\n || (c >= 97 && c <= 122) // a-z\n || c === 95; // _\n }\n\n // Decide whether to enforce word boundaries based on the search term\n let enforceWordBoundaries = true;\n for (let k = 0; k < wl; k++) {\n const cc = word.charCodeAt(k);\n if (!isWordCharCode(cc)) {\n enforceWordBoundaries = false;\n break;\n }\n }\n\n while (true) {\n i = text.indexOf(word, i);\n if (i === -1) break;\n\n if (enforceWordBoundaries) {\n const left = i - 1;\n const right = i + wl;\n const leftOk = left < 0 || !isWordCharCode(text.charCodeAt(left));\n const rightOk = right >= tl || !isWordCharCode(text.charCodeAt(right));\n if (leftOk && rightOk) count++;\n } else {\n // No boundary enforcement for symbol-containing terms\n count++;\n }\n i += wl; // non-overlapping word matches\n }\n\n return count;\n}","import { EntityUpdateInfo } from \"../plugins/types\";\nimport { InferCreateType, InferType, SchemaId } from \"../schema\";\nimport { TagCollection } from \"./TagCollection\";\nexport class BulkPersistResult extends Map<SchemaId, SchemaPersistResult> {\n\n resolve(schemaId: SchemaId): SchemaPersistResult {\n if (this.has(schemaId)) {\n return this.get(schemaId);\n }\n\n this.set(schemaId, new SchemaPersistResult());\n\n return this.get(schemaId);\n }\n\n override get<T extends {} = Record<string, unknown>>(schemaId: SchemaId) {\n return super.get(schemaId) as SchemaPersistResult<T>\n }\n\n get aggregate() {\n return {\n size: this.aggregateSize,\n adds: this.aggregateAddsSize,\n updates: this.aggregateUpdatesSize,\n removes: this.aggregateRemovesSize\n }\n }\n\n private get aggregateSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.total;\n }\n\n return count;\n }\n\n private get aggregateAddsSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.adds.length;\n }\n\n return count;\n }\n\n private get aggregateUpdatesSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.updates.length;\n }\n\n return count;\n }\n\n private get aggregateRemovesSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.removes.length;\n }\n\n return count;\n }\n}\n\nexport class BulkPersistChanges extends Map<SchemaId, SchemaPersistChanges> {\n\n resolve(schemaId: SchemaId): SchemaPersistChanges {\n if (this.has(schemaId)) {\n return this.get(schemaId);\n }\n\n this.set(schemaId, new SchemaPersistChanges());\n\n return this.get(schemaId);\n }\n\n override get<T extends {} = Record<string, unknown>>(schemaId: SchemaId) {\n return super.get(schemaId) as SchemaPersistChanges<T>\n }\n\n get aggregate() {\n return {\n size: this.aggregateSize,\n adds: this.aggregateAddsSize,\n updates: this.aggregateUpdatesSize,\n removes: this.aggregateRemovesSize\n }\n }\n\n private get aggregateSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.total;\n }\n\n return count;\n }\n\n private get aggregateAddsSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.adds.length;\n }\n\n return count;\n }\n\n private get aggregateUpdatesSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.updates.length;\n }\n\n return count;\n }\n\n private get aggregateRemovesSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.removes.length;\n }\n\n return count;\n }\n\n /**\n * Ensures the result has the same result sets as the change sets\n * @returns \n */\n toResult() {\n const result = new BulkPersistResult();\n\n for (const [schemaId] of this) {\n result.set(schemaId, new SchemaPersistResult());\n }\n\n return result;\n }\n}\n\nexport class SchemaPersistChanges<T extends {} = Record<string, unknown>> {\n adds: InferCreateType<T>[] = [];\n updates: EntityUpdateInfo<T>[] = [];\n removes: InferType<T>[] = [];\n tags: TagCollection = new TagCollection();\n\n get hasItems() {\n return this.total > 0;\n }\n\n get total() {\n return this.adds.length + this.updates.length + this.removes.length;\n }\n}\n\nexport class SchemaPersistResult<T extends {} = Record<string, unknown>> {\n adds: InferType<T>[] = [];\n updates: InferType<T>[] = [];\n removes: InferType<T>[] = [];\n\n get hasItems() {\n return this.total > 0;\n }\n\n get total() {\n return this.adds.length + this.updates.length + this.removes.length;\n }\n}","import { IdType } from \"../schema\";\n\nexport class IdSet {\n\n readonly ids: readonly IdType[];\n\n constructor(...ids: IdType[]) {\n this.ids = Object.freeze(ids);\n }\n\n equals(other: IdSet): boolean {\n\n if (this.ids.length === 1) {\n return this.ids[0] === other.ids[0];\n }\n\n return this.toString() === other.toString();\n }\n\n toString(): string {\n\n if (this.ids.length === 1) {\n return String(this.ids[0]);\n }\n\n return this.ids.toString();\n }\n}","import { CompiledSchema, IdType, InferType, PropertyInfo, SchemaTypes } from \"../schema\";\nimport { CallbackResult, Result } from \"../results\";\nimport { uuidv4 } from \"../utilities\";\nimport { IdSet } from \"./IdSet\";\n\nexport class MemoryDataCollection {\n\n protected readonly nextNumericalIds: Map<string, number>;\n protected readonly data: Map<string, Record<string, unknown>>;\n protected readonly schema: CompiledSchema<any>;\n protected readonly idProperties: PropertyInfo<any>[];\n\n get size() {\n return this.data.size;\n }\n\n get records() {\n return [...this.data.values()];\n }\n\n constructor(schema: CompiledSchema<any>) {\n this.data = new Map<string, Record<string, unknown>>();\n this.nextNumericalIds = new Map<string, number>();\n this.schema = schema;\n this.idProperties = schema.idProperties;\n }\n\n private _getNextId(property: PropertyInfo<any>) {\n\n let nextId = 1;\n\n if (this.nextNumericalIds.has(property.id) === true) {\n nextId = this.nextNumericalIds.get(property.id) + 1;\n }\n\n this.nextNumericalIds.set(property.id, nextId);\n\n return nextId;\n }\n\n private getAndSetId(item: Record<string, unknown>, property: PropertyInfo<any>): IdType {\n if (item[property.name] != null) {\n return item[property.name] as IdType;\n }\n\n if (property.type === SchemaTypes.String) {\n const uuid = uuidv4()\n item[property.name] = uuid;\n return uuid;\n }\n\n if (property.type === SchemaTypes.Number) {\n const id = this._getNextId(property);\n item[property.name] = id;\n return id;\n }\n\n throw new Error(`Id Property '${property.name}' must be string or number, found '${property.type}'`)\n }\n\n seed(items: Record<string, unknown>[]) {\n for (let i = 0, length = items.length; i < length; i++) {\n const id = this.resolveIdSet(items[i] as InferType<unknown>);\n this.data.set(id.toString(), items[i]);\n }\n }\n\n private resolveCurrentIdSet(item: Record<string, unknown>): IdSet {\n const idProperties = this.schema.idProperties;\n const ids: IdType[] = [];\n // ensure keys\n for (let j = 0, l = idProperties.length; j < l; j++) {\n const property = idProperties[j];\n const value = property.getValue(item);\n\n if (value == null) {\n throw new Error(`Key cannot be null. Key: ${property.name}`);\n }\n\n ids.push(value);\n }\n\n return new IdSet(...ids);\n }\n\n private resolveIdSet(item: Record<string, unknown>): IdSet {\n\n if (this.schema.hasIdentityKeys) {\n const ids: IdType[] = [];\n const idProperties = this.schema.idProperties;\n\n if (idProperties.length === 1) {\n ids.push(this.getAndSetId(item, idProperties[0]));\n } else {\n for (let j = 0, l = idProperties.length; j < l; j++) {\n ids.push(this.getAndSetId(item, idProperties[j]));\n }\n }\n\n return new IdSet(...ids);\n }\n\n return this.resolveCurrentIdSet(item);\n }\n\n add(item: Record<string, unknown>) {\n const id = this.resolveIdSet(item);\n this.data.set(id.toString(), item);\n }\n\n remove(item: Record<string, unknown>) {\n const id = this.resolveCurrentIdSet(item);\n this.data.delete(id.toString());\n }\n\n update(item: Record<string, unknown>) {\n const id = this.resolveCurrentIdSet(item);\n this.data.set(id.toString(), item);\n }\n\n destroy(done: CallbackResult<never>) {\n this.nextNumericalIds.clear();\n this.data.clear();\n done(Result.success());\n }\n\n load(done: CallbackResult<never>) {\n done(Result.success())\n }\n\n save(done: CallbackResult<never>) {\n done(Result.success())\n }\n}","import { CompiledSchema, SchemaId } from \"../schema\";\n\n/**\n * Collection of schemas with generic typing for type-safe schema retrieval\n */\nexport class ReadonlySchemaCollection {\n\n protected data: Map<SchemaId, CompiledSchema<Record<string, unknown>>>;\n\n constructor(data?: [SchemaId, CompiledSchema<Record<string, unknown>>][]) {\n this.data = new Map<SchemaId, CompiledSchema<Record<string, unknown>>>(data);\n }\n\n get<T>(schemaId: SchemaId): CompiledSchema<T> | undefined {\n return this.data.get(schemaId) as CompiledSchema<T> | undefined;\n }\n\n has(schemaId: SchemaId): boolean {\n return this.data.has(schemaId);\n }\n\n get size(): number {\n return this.data.size;\n }\n\n keys(): IterableIterator<SchemaId> {\n return this.data.keys();\n }\n\n values(): IterableIterator<CompiledSchema<Record<string, unknown>>> {\n return this.data.values();\n }\n\n entries(): IterableIterator<[SchemaId, CompiledSchema<Record<string, unknown>>]> {\n return this.data.entries();\n }\n\n forEach(callbackfn: (value: CompiledSchema<Record<string, unknown>>, key: SchemaId, map: Map<SchemaId, CompiledSchema<Record<string, unknown>>>) => void, thisArg?: any): void {\n this.data.forEach(callbackfn, thisArg);\n }\n\n [Symbol.iterator](): IterableIterator<[SchemaId, CompiledSchema<Record<string, unknown>>]> {\n return this.data[Symbol.iterator]();\n }\n\n getByName<T>(collectionName: string): CompiledSchema<T> | undefined {\n const found = [...this.data].find(x => x[1].collectionName === collectionName);\n\n if (found != null) {\n return found[1] as CompiledSchema<T>;\n }\n\n return undefined;\n }\n}","import { CompiledSchema, SchemaId } from \"../schema\";\nimport { ReadonlySchemaCollection } from \"./ReadonlySchemaCollection\";\n\n/**\n * Collection of schemas with generic typing for type-safe schema retrieval\n */\nexport class SchemaCollection extends ReadonlySchemaCollection {\n\n set<T>(schemaId: SchemaId, schema: CompiledSchema<T>): this {\n this.data.set(schemaId, schema as CompiledSchema<Record<string, unknown>>);\n return this;\n }\n\n delete(schemaId: SchemaId): boolean {\n return this.data.delete(schemaId);\n }\n\n clear(): void {\n this.data.clear();\n }\n}","export class TagCollection implements Disposable {\n\n private data: Map<Object, unknown> = new Map<Object, unknown>();\n private _size: number = 0;\n\n get size() {\n return this._size;\n }\n\n get(key: Object) {\n return this.data.get(key);\n }\n\n has(key: Object) {\n return this.data.has(key);\n }\n\n set(key: Object, tag: unknown) {\n this._size++;\n return this.data.set(key, tag);\n }\n\n delete(key: Object) {\n const result = this.data.delete(key);\n\n if (result) {\n this._size--;\n }\n\n return result;\n }\n\n setMany(keys: Object[], tag: unknown) {\n this._size += keys.length;\n for (let i = 0, length = keys.length; i < length; i++) {\n const key = keys[i];\n this.set(key, tag);\n }\n }\n\n combine(tags: TagCollection) {\n for (const [key, value] of tags) {\n this.data.set(key, value);\n }\n }\n\n values() {\n return this.data.values();\n }\n\n keys() {\n return this.data.keys();\n }\n\n [Symbol.dispose]() {\n this.data = null as any;\n }\n\n [Symbol.iterator]() {\n return this.data[Symbol.iterator]();\n }\n}","export * from './Changes';\nexport * from './TagCollection';\nexport * from './IdSet';\nexport * from './MemoryDataCollection';\nexport * from './SchemaCollection';\nexport * from './ReadonlySchemaCollection';","export class SchemaError extends Error {\n\n constructor(error: any, innerErrorMessage: string) {\n super(`Error: ${error.message}; Inner Error: ${innerErrorMessage}`);\n }\n}","export { SchemaError } from './SchemaError';","export * from './parser';\nexport * from './types';\nexport * from './utils';","import { CompiledSchema, SchemaTypes } from \"../schema\";\nimport { Expression, OperatorExpression, ComparatorExpression, ValueExpression, PropertyExpression, Filter, ParamsFilter, Operator } from \"./types\";\n\n// Pre-compiled regex patterns for better performance\nconst METHOD_REGEX = /([a-zA-Z0-9_.]+)\\.(startsWith|endsWith|includes)\\(([^)]+)\\)(\\s*(===|==|!==|!=)\\s*(true|false))?/;\nconst TRANSFORM_METHOD_REGEX = /([a-zA-Z0-9_.]+)\\.(toLowerCase|toUpperCase|toLocaleLowerCase|toLocaleUpperCase)\\(\\)\\.(startsWith|endsWith|includes)\\(((?:[^()]|\\([^)]*\\))*)\\)(\\s*(===|==|!==|!=)\\s*(true|false))?/;\nconst EQUALITY_REGEX = /([^=!<>]+?)\\s*(===|==|!==|!=)\\s*(.+)/;\nconst COMPARISON_REGEX = /([^=!<>]+?)\\s*(>=|<=|>|<)\\s*(.+)/;\nconst PARAM_PATH_REGEX = /^([a-zA-Z0-9_.]+)/;\n\n// Pre-compiled regex patterns for comment removal\nconst SINGLE_LINE_COMMENT_REGEX = /\\/\\/.*$/gm;\nconst MULTI_LINE_COMMENT_REGEX = /\\/\\*[\\s\\S]*?\\*\\//g;\nconst WHITESPACE_REGEX = /\\s+/g;\n\n// need to have negated + strict\nconst comparators: Record<string, ComparatorExpression> = {\n startsWith: new ComparatorExpression({\n comparator: \"starts-with\",\n negated: false,\n strict: false\n }),\n endsWith: new ComparatorExpression({\n comparator: \"ends-with\",\n negated: false,\n strict: false\n }),\n includes: new ComparatorExpression({\n comparator: \"includes\",\n negated: false,\n strict: false\n }),\n \"==\": new ComparatorExpression({\n comparator: \"equals\",\n negated: false,\n strict: false\n }),\n \"===\": new ComparatorExpression({\n comparator: \"equals\",\n negated: false,\n strict: true\n }),\n \"!=\": new ComparatorExpression({\n comparator: \"equals\",\n negated: true,\n strict: false\n }),\n \"!==\": new ComparatorExpression({\n comparator: \"equals\",\n negated: true,\n strict: true\n }),\n \">=\": new ComparatorExpression({\n comparator: \"greater-than-equals\",\n negated: false,\n strict: false\n }),\n \">==\": new ComparatorExpression({\n comparator: \"greater-than-equals\",\n negated: false,\n strict: true\n }),\n \"<=\": new ComparatorExpression({\n comparator: \"less-than-equals\",\n negated: false,\n strict: false\n }),\n \"<==\": new ComparatorExpression({\n comparator: \"less-than-equals\",\n negated: false,\n strict: true\n }),\n \">\": new ComparatorExpression({\n comparator: \"greater-than\",\n negated: false,\n strict: false\n }),\n \"<\": new ComparatorExpression({\n comparator: \"less-than\",\n negated: false,\n strict: false\n })\n} as const;\n\n// Optimized comparator lookup using Map\nconst COMPARATOR_MAP = new Map(Object.entries(comparators));\n\n// Error message constants\nconst ERROR_MESSAGES = {\n COMPARATOR_NOT_FOUND: (value: string) => `Cannot find comparator: ${value}`,\n PROPERTY_NOT_FOUND: (path: string) => `Error parsing query, could not find PropertyInfo for path: ${path}`,\n PARAM_PATH_NOT_FOUND: (value: string, params: any) => `Cannot find path in params for .where(). Make sure parameters are not used inline.\\r\\nPath: ${value}, Params: ${JSON.stringify(params)}`\n};\n\nconst STRINGIFIED_COMPARE_OPERATORS = [\"true\", \"false\"];\n\nexport const combineExpressions = (...expressions: Expression[]): Expression => {\n\n if (expressions.length === 0) {\n throw new Error(\"combineExpressions requires at least 1 expression\");\n }\n\n\n if (expressions.length === 1) {\n return expressions[0];\n }\n\n // Start with the first expression\n let result = expressions[0];\n\n // Loop through remaining expressions and combine them\n for (let i = 1; i < expressions.length; i++) {\n result = new OperatorExpression({\n operator: \"&&\",\n left: result,\n right: expressions[i]\n });\n }\n\n return result;\n};\n\nexport const toExpression = <T extends any, P extends any>(schema: CompiledSchema<any>, fn: Filter<T> | ParamsFilter<T, P>, params?: P) => {\n try {\n const stringifiedFunction = fn.toString();\n\n // Optimized string parsing\n const arrowIndex = stringifiedFunction.indexOf('=>');\n if (arrowIndex === -1) {\n throw new Error(\"Invalid Function\");\n }\n\n const parameterNames = stringifiedFunction.substring(0, arrowIndex).trim();\n let expression = stringifiedFunction.substring(arrowIndex + 2).trim();\n\n // Remove JavaScript comments from the expression\n expression = expression\n .replace(SINGLE_LINE_COMMENT_REGEX, '') // Remove single-line comments\n .replace(MULTI_LINE_COMMENT_REGEX, '') // Remove multi-line comments\n .replace(WHITESPACE_REGEX, ' ') // Normalize whitespace\n .trim();\n\n let parameterData: { name: string, data: P } | undefined = undefined;\n\n if (params != null) {\n let name: string;\n if (parameterNames.includes(\"[\") && parameterNames.includes(\"]\")) {\n // Optimized parameter name extraction\n const commaIndex = parameterNames.indexOf(\",\");\n if (commaIndex !== -1) {\n const bracketIndex = parameterNames.indexOf(\"]\", commaIndex);\n if (bracketIndex !== -1) {\n name = parameterNames.substring(commaIndex + 1, bracketIndex).trim();\n }\n }\n }\n\n parameterData = {\n name,\n data: params\n };\n }\n\n return parseExpressionToTree(schema, expression, parameterData);\n } catch (e) {\n console.warn(\"Error parsing expression\", e);\n return Expression.NOT_PARSABLE;\n }\n}\n\nconst parseExpressionToTree = <P extends any>(schema: CompiledSchema<any>, expression: string, params?: { name: string, data: P }) => {\n\n const parse = (exp: string): Expression => {\n // Remove any wrapping parentheses\n exp = exp.trim();\n if (exp.startsWith('(') && exp.endsWith(')')) {\n let depth = 0;\n let isWrapper = true;\n for (let i = 0; i < exp.length; i++) {\n const char = exp[i];\n if (char === '(') {\n depth++;\n } else if (char === ')') {\n depth--;\n if (depth < 0) break; // Early exit for invalid parentheses\n }\n // Early exit if we find a closing parenthesis that's not the last character\n if (depth === 0 && i !== exp.length - 1) {\n isWrapper = false;\n break; // Early exit\n }\n // Early exit if we go negative (invalid parentheses)\n if (depth < 0) {\n isWrapper = false;\n break;\n }\n }\n if (isWrapper) {\n exp = exp.slice(1, -1).trim();\n }\n }\n\n // Parse based on the operator precedence\n let operator: Operator | null = null, splitIndex = -1, depth = 0;\n\n for (let i = 0; i < exp.length - 1; i++) {\n const char = exp[i];\n if (char === '(') depth++;\n else if (char === ')') depth--;\n else if (depth === 0) {\n // Optimized operator detection using character comparison\n if (char === '&' && exp[i + 1] === '&') {\n operator = '&&';\n splitIndex = i;\n break; // AND takes precedence over OR\n } else if (operator === null && char === '|' && exp[i + 1] === '|') {\n operator = '||';\n splitIndex = i;\n }\n }\n }\n\n if (operator) {\n const left = exp.slice(0, splitIndex).trim();\n const right = exp.slice(splitIndex + 2).trim();\n\n return new OperatorExpression({\n operator,\n left: parse(left),\n right: parse(right)\n });\n }\n\n // If no operator, try to parse as a condition\n return parseCondition(schema, exp, params);\n }\n\n return parse(expression);\n}\n\nconst convertAndAssignValue = (valueExpression: unknown, propertyPathExpression: unknown) => {\n\n assertIsPropertyPathExpression(propertyPathExpression);\n\n assertIsValueExpression(valueExpression)\n\n const propertyType = propertyPathExpression.property.type;\n\n valueExpression.value = converters[propertyType](valueExpression.value);\n}\n\nconst converters: Record<SchemaTypes, (value: unknown) => unknown> = {\n Array: v => v,\n Boolean: v => v == null ? v : Boolean(v),\n Computed: v => v,\n Date: v => v,\n Definition: v => v,\n Function: v => v,\n Number: v => v == null ? v : Number(v),\n Object: v => v,\n String: v => v == null ? v : String(v)\n};\n\nconst isExpression = (value: unknown): value is Expression => {\n return typeof value === \"object\" && value !== null && \"type\" in value;\n}\n\nfunction assertIsExpression(value: unknown): asserts value is Expression {\n if (isExpression(value) === false) {\n throw new Error(\"Assertion Failed: Value is not a Expression\")\n }\n}\n\nfunction assertIsPropertyPathExpression(value: unknown): asserts value is PropertyExpression {\n\n assertIsExpression(value);\n\n if (!(\"property\" in value)) {\n throw new Error(\"Assertion Failed: Value is not a PropertyPathExpression\")\n }\n}\n\nfunction assertIsValueExpression(value: unknown): asserts value is ValueExpression {\n\n assertIsExpression(value);\n\n if (!(\"value\" in value)) {\n throw new Error(\"Assertion Failed: Value is not a ValueExpression\")\n }\n}\n\n// Helper function to detect if a string is a property path\nconst isPropertyPath = (value: string): boolean => {\n return value.includes('.') && value.match(/^[a-zA-Z0-9_.]+$/) !== null;\n};\n\n// Helper function to determine if we need to swap the operator for reversed comparisons\nconst getSwappedOperator = (operator: string): string => {\n const swapMap: Record<string, string> = {\n '>': '<',\n '<': '>',\n '>=': '<=',\n '<=': '>='\n };\n return swapMap[operator] || operator;\n};\n\nconst parseCondition = <P extends any>(schema: CompiledSchema<any>, expression: string, params?: { name: string, data: P }): Expression => {\n\n // Optimized string operations - single trim operation\n const trimmed = expression.trim();\n const isNegation = trimmed.startsWith('!');\n const finalExpression = isNegation ? trimmed.slice(1).trim() : trimmed;\n\n // Enhanced pattern matching for complex expressions\n const methodMatch = finalExpression.match(METHOD_REGEX);\n const transformMethodMatch = finalExpression.match(TRANSFORM_METHOD_REGEX);\n const equalityMatch = finalExpression.match(EQUALITY_REGEX);\n const comparisonMatch = finalExpression.match(COMPARISON_REGEX);\n\n if (methodMatch) {\n // Handle .startsWith or .endsWith\n const comparator = getComparator(methodMatch[2]);\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n // Check if the left side is a parameter path\n const leftSide = methodMatch[1];\n const rightSide = methodMatch[3];\n\n if (params && leftSide.startsWith(params.name)) {\n // This is a parameter path on the left side (e.g., params.distinctPlayers.includes(entity.playerId))\n // For includes method, we need to swap left and right sides\n if (methodMatch[2] === 'includes') {\n\n const property = getProperty(schema, rightSide);\n const value = getValue(leftSide, params); // retrieve the original value\n const serializer = property.property.valueSerializer;\n\n comparator.left = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n comparator.right = property;\n } else {\n // For other methods, return NOT_PARSABLE for now\n return Expression.NOT_PARSABLE;\n }\n } else {\n // Normal case: property on left, value on right\n const property = getProperty(schema, leftSide);\n const serializer = property.property.valueSerializer;\n const value = getValue(rightSide, params); // retrieve the original value\n\n comparator.left = property;\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n }\n\n // If the comparison is explicitly to false, mark it as negated\n if (methodMatch[6] === \"false\") {\n comparator.negated = true;\n }\n\n return comparator;\n }\n\n // Check for transformations on the value side (right side of comparison) - check this FIRST\n const valueTransformMatch = finalExpression.match(/([^=!<>]+?)\\s*(===|==|!==|!=)\\s*([^)]+)\\.(toLowerCase|toUpperCase|toLocaleLowerCase|toLocaleUpperCase)\\(\\)/);\n if (valueTransformMatch) {\n const comparator = getComparator(valueTransformMatch[2]);\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n const property = getProperty(schema, valueTransformMatch[1].trim());\n const serializer = property.property.valueSerializer;\n const value = getValue(valueTransformMatch[3], params); // retrieve the original value\n\n // Create the property expression for the left side (no transformer)\n const propertyExpression = property;\n\n // Create a ValueExpression for the right side with transformer\n const valueExpression = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n // Set transformer and locale based on the method\n const method = valueTransformMatch[4];\n if (method === 'toLowerCase' || method === 'toLocaleLowerCase') {\n valueExpression.transformer = 'to-lower-case';\n if (method === 'toLocaleLowerCase') {\n valueExpression.locale = 'en-US';\n }\n } else {\n valueExpression.transformer = 'to-upper-case';\n if (method === 'toLocaleUpperCase') {\n valueExpression.locale = 'en-US';\n }\n }\n\n comparator.left = propertyExpression;\n comparator.right = valueExpression;\n\n return comparator;\n }\n\n if (transformMethodMatch) {\n // Handle .toLowerCase or .toUpperCase on the property side\n const comparator = getComparator(transformMethodMatch[3]); // e.g., startsWith, endsWith, includes\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n // Create the property expression for the left side with transformer\n const property = getProperty(schema, transformMethodMatch[1]);\n\n // Set transformer and locale based on the method\n const method = transformMethodMatch[2];\n if (method === 'toLowerCase' || method === 'toLocaleLowerCase') {\n property.transformer = 'to-lower-case';\n if (method === 'toLocaleLowerCase') {\n property.locale = 'en-US'; // Default locale, could be extracted from method call\n }\n } else {\n property.transformer = 'to-upper-case';\n if (method === 'toLocaleUpperCase') {\n property.locale = 'en-US'; // Default locale, could be extracted from method call\n }\n }\n\n // Create a ValueExpression for the right side\n let value = getValue(transformMethodMatch[4], params);\n\n // Check if the value also has a transformation (but only if it's not already handled by value-side check)\n const valueTransformMatch = transformMethodMatch[4].match(/^([^)]+)\\.(toLowerCase|toUpperCase|toLocaleLowerCase|toLocaleUpperCase)\\(\\)$/);\n\n if (valueTransformMatch) {\n // Create a new ValueExpression with the base value and transformer\n value = new ValueExpression({\n value: valueTransformMatch[1].replace(/^[\"']|[\"']$/g, '') // Remove quotes\n });\n\n // Set transformer and locale based on the method\n const valueMethod = valueTransformMatch[2];\n if (valueMethod === 'toLowerCase' || valueMethod === 'toLocaleLowerCase') {\n value.transformer = 'to-lower-case';\n if (valueMethod === 'toLocaleLowerCase') {\n value.locale = 'en-US'; // Default locale\n }\n } else {\n value.transformer = 'to-upper-case';\n if (valueMethod === 'toLocaleUpperCase') {\n value.locale = 'en-US'; // Default locale\n }\n }\n }\n\n const serializer = property.property.valueSerializer;\n\n comparator.left = property;\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n // If the comparison is explicitly to false, mark it as negated\n if (transformMethodMatch[7] === \"false\") {\n comparator.negated = true;\n }\n\n return comparator;\n }\n\n if (equalityMatch) {\n const left = equalityMatch[1].trim();\n const operator = equalityMatch[2];\n const right = equalityMatch[3].trim();\n\n const leftIsProperty = isPropertyPath(left);\n const rightIsProperty = isPropertyPath(right);\n\n // Determine which side is the property and which is the value\n let propertySide: string, valueSide: string, finalOperator: string;\n\n if (leftIsProperty && !rightIsProperty) {\n // Normal case: property === value\n propertySide = left;\n valueSide = right;\n finalOperator = operator;\n } else if (!leftIsProperty && rightIsProperty) {\n // Reversed case: value === property\n propertySide = right;\n valueSide = left;\n finalOperator = operator;\n } else {\n // Both sides look like properties or neither does - assume left is property\n propertySide = left;\n valueSide = right;\n finalOperator = operator;\n }\n\n const comparator = getComparator(finalOperator);\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n const property = getProperty(schema, propertySide);\n const value = getValue(valueSide, params);\n const serializer = property.property.valueSerializer;\n\n comparator.left = property;\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n convertAndAssignValue(comparator.right, comparator.left);\n\n return comparator;\n }\n\n if (comparisonMatch) {\n const left = comparisonMatch[1].trim();\n const operator = comparisonMatch[2];\n const right = comparisonMatch[3].trim();\n\n const leftIsProperty = isPropertyPath(left);\n const rightIsProperty = isPropertyPath(right);\n\n // Determine which side is the property and which is the value\n let propertySide: string, valueSide: string, finalOperator: string;\n\n if (leftIsProperty && !rightIsProperty) {\n // Normal case: property > value\n propertySide = left;\n valueSide = right;\n finalOperator = operator;\n } else if (!leftIsProperty && rightIsProperty) {\n // Reversed case: value > property -> property < value\n propertySide = right;\n valueSide = left;\n finalOperator = getSwappedOperator(operator);\n } else {\n // Both sides look like properties or neither does - assume left is property\n propertySide = left;\n valueSide = right;\n finalOperator = operator;\n }\n\n const comparator = getComparator(finalOperator);\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n const property = getProperty(schema, propertySide);\n const value = getValue(valueSide, params);\n const serializer = property.property.valueSerializer;\n\n comparator.left = property;\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n convertAndAssignValue(comparator.right, comparator.left);\n\n return comparator;\n }\n\n // Check for standalone property reference (truthy comparison)\n // Pattern: property name only (e.g., \"w.inStock\" -> w.inStock === true)\n const standalonePropertyMatch = finalExpression.match(/^[a-zA-Z_$][a-zA-Z0-9_$]*(\\.[a-zA-Z_$][a-zA-Z0-9_$]*)*$/);\n if (standalonePropertyMatch && isPropertyPath(finalExpression)) {\n const comparator = getComparator('===');\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n const property = getProperty(schema, finalExpression);\n const value = getValue('true', params);\n const serializer = property.property.valueSerializer;\n\n comparator.left = property;\n // need to parse the value so it matches what the serializer expects\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n return comparator;\n }\n\n // If we get here, the expression is too complex for the current parser\n // This is expected for complex real-world expressions\n throw new Error(`Unsupported expression format: ${finalExpression}`);\n}\n\nconst getComparator = (value: string): ComparatorExpression => {\n\n const comparator = COMPARATOR_MAP.get(value);\n\n if (comparator == null) {\n throw new Error(ERROR_MESSAGES.COMPARATOR_NOT_FOUND(value))\n }\n\n // Return a new instance to avoid modifying the cached one\n return new ComparatorExpression({\n comparator: comparator.comparator,\n negated: comparator.negated,\n strict: comparator.strict\n });\n}\n\nconst getValue = <P extends any>(value: string, params?: { name: string, data: P }): ValueExpression => {\n\n // Early return for string literals\n if (value.startsWith(\"\\'\") || value.startsWith(\"\\\"\")) {\n return new ValueExpression({\n value: value.replace(/\\\"|\\'/g, \"\")\n });\n }\n\n // Early return for null/undefined\n if (value === \"null\") {\n return new ValueExpression({ value: null });\n }\n\n if (value === \"undefined\" || value === \"void 0\") {\n return new ValueExpression({ value: undefined });\n }\n\n // Optimized number parsing with early return\n const numValue = +value;\n if (!isNaN(numValue) && isFinite(numValue)) {\n return new ValueExpression({ value: numValue });\n }\n\n // Handle parameter paths if params are provided\n if (params != null) {\n // Check if this is a parameter path (starts with params.name)\n if (value.startsWith(params.name)) {\n return new ValueExpression({\n value: getValueFromParams(value, params)\n });\n }\n\n // Check if this is a parameter path without the params prefix\n if (value.includes('.')) {\n // Try to extract the parameter path\n const paramMatch = value.match(PARAM_PATH_REGEX);\n if (paramMatch) {\n const potentialParamPath = paramMatch[1];\n try {\n const paramValue = getValueFromParams(`${params.name}.${potentialParamPath}`, params);\n return new ValueExpression({ value: paramValue });\n } catch (e) {\n // Not a parameter path, continue with normal parsing\n }\n }\n }\n }\n\n if (STRINGIFIED_COMPARE_OPERATORS.includes(value)) {\n return new ValueExpression({ value });\n }\n\n if (isNaN(numValue)) {\n // value is a variable passed in by the dev, we cannot evaluate it's value\n // need to fallback to select all by throwing an error\n throw new Error(`Cannot derive value from variable, please pass parameters into the expression.\n\nExample: .where(([x, params]) => x.id === params.id, { id: someVar.id })\nIssue At: ${value}`);\n }\n\n // Default case: return as-is\n return new ValueExpression({ value });\n}\n\nconst getValueFromParams = <P extends any>(value: string, params: { name: string, data: P }) => {\n\n const split = value.split('.');\n\n // Early exit for invalid paths\n if (split.length === 1) {\n throw new Error(ERROR_MESSAGES.PARAM_PATH_NOT_FOUND(value, params.data))\n }\n\n let result = params.data as any;\n\n // For nested params - start from index 1 to skip the params prefix\n for (let i = 1; i < split.length; i++) {\n const name = split[i];\n\n if (name in result) {\n result = result[name];\n continue;\n }\n\n throw new Error(ERROR_MESSAGES.PARAM_PATH_NOT_FOUND(value, params.data))\n }\n\n return result;\n}\n\nconst getProperty = (schema: CompiledSchema<any>, value: string): PropertyExpression => {\n // Optimized string splitting - only split if we have the expected pattern\n if (!value.includes('.')) {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n\n const pathSplit = value.split(/[?!.]/g).slice(1);\n const pathString = pathSplit.join(\".\");\n\n // Early exit if no path found\n if (!pathString) {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n\n const found = schema.properties.find(w => w.getAssignmentPath() == pathString);\n\n if (found == null) {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n\n return new PropertyExpression({ property: found });\n}\n\n\n","import { QueryOptionExecutionTarget } from \"../plugins\";\nimport { PropertyInfo } from \"../schema\";\n\nexport type ParsedExpression = {\n expression: Expression;\n // Will be memory when trying to query on an untracked computed property or on a function\n executionTarget: QueryOptionExecutionTarget;\n}\n\n/**\n * The base class for all expression types.\n */\nexport abstract class Expression {\n /** The type of the expression. */\n abstract readonly type: ExpressionType;\n /** The left-hand side of the expression (if applicable). */\n left?: Expression;\n /** The right-hand side of the expression (if applicable). */\n right?: Expression;\n\n constructor(left?: Expression, right?: Expression) {\n this.left = left;\n this.right = right;\n }\n\n static get EMPTY() {\n return new EmptyExpression();\n }\n\n static get NOT_PARSABLE() {\n return new NotParsableExpression();\n }\n\n static isEmpty(expression: Expression) {\n return expression.type === \"empty\" || expression instanceof EmptyExpression;\n }\n\n static isNotParsable(expression: Expression) {\n return expression.type === \"not-parsable\" || expression instanceof NotParsableExpression;\n }\n}\n\nexport class EmptyExpression extends Expression {\n readonly type = \"empty\" as const;\n}\n\nexport class NotParsableExpression extends Expression {\n readonly type = \"not-parsable\" as const;\n}\n\n/**\n * A class representing a comparison operation (e.g., equals, greater-than).\n */\nexport class ComparatorExpression extends Expression {\n /** The type of the expression (always 'comparator'). */\n readonly type = \"comparator\" as const;\n /** The comparator operation (e.g., equals, greater-than). */\n comparator: Comparator;\n /** Whether the comparison is negated (e.g., not equals). */\n negated: boolean;\n /** Whether the comparison is strict (type-sensitive). */\n strict: boolean;\n\n constructor(\n options: {\n comparator: Comparator,\n negated: boolean,\n strict: boolean,\n left?: Expression,\n right?: Expression\n }\n ) {\n super(options.left, options.right);\n this.comparator = options.comparator;\n this.negated = options.negated;\n this.strict = options.strict;\n }\n}\n\n/**\n * A class representing a logical operator (e.g., &&, ||).\n */\nexport class OperatorExpression extends Expression {\n /** The type of the expression (always 'operator'). */\n readonly type = \"operator\" as const;\n /** The logical operator. */\n operator: Operator;\n\n constructor(options: { operator: Operator, left?: Expression, right?: Expression }) {\n super(options.left, options.right);\n this.operator = options.operator;\n }\n}\n\n/**\n * A class representing a property path.\n */\nexport class PropertyExpression extends Expression {\n /** The type of the expression (always 'property'). */\n readonly type = \"property\" as const;\n /** The property info for the path. */\n property: PropertyInfo<any>;\n transformer: Transformer | null = null;\n locale: string | null = null;\n\n constructor(options: { property: PropertyInfo<any> }) {\n super();\n this.property = options.property;\n }\n}\n\n/**\n * A class representing a literal value.\n */\nexport class ValueExpression extends Expression {\n /** The type of the expression (always 'value'). */\n readonly type = \"value\" as const;\n /** The literal value. */\n value: unknown;\n\n transformer: Transformer | null = null;\n locale: string | null = null;\n\n constructor(options: {\n value: unknown\n }) {\n super();\n this.value = options.value;\n }\n}\n\n\n/**\n * The set of possible expression types.\n */\nexport type ExpressionType = \"operator\" | \"comparator\" | \"property\" | \"value\" | \"empty\" | \"not-parsable\";\n\n/**\n * Supported value transformations that can be applied to values.\n */\nexport type Transformer = \"to-lower-case\" | \"to-upper-case\";\n\n/**\n * Supported comparator operations for expressions.\n */\nexport type Comparator =\n | \"equals\"\n | \"starts-with\"\n | \"includes\"\n | \"ends-with\"\n | \"greater-than\"\n | \"greater-than-equals\"\n | \"less-than\"\n | \"less-than-equals\";\n\n/**\n * Supported logical operators for expressions.\n */\nexport type Operator = \"&&\" | \"||\";\n\n/**\n * A function that filters a value of type T and returns a boolean.\n */\nexport type Filter<T extends any> = (value: T) => boolean;\n\n/**\n * A function that filters a value of type T with additional parameters P.\n */\nexport type ParamsFilter<T extends any, P> = (payload: [T, P]) => boolean;\n\n/**\n * A filter that can be either a simple filter or a parameterized filter.\n */\nexport type CompositeFilter<T extends any, P = never> = Filter<T> | ParamsFilter<T, P>;\n\n/**\n * An object that can be filtered using a composite filter and optional parameters.\n */\nexport type Filterable<T extends any, P = any> = {\n /** The filter function. */\n filter: CompositeFilter<T, P>;\n /** Optional parameters for the filter. */\n params?: P;\n}","import { PropertyInfo } from \"../schema\";\nimport { Expression, PropertyExpression } from \"./types\";\n\n/**\n * Extracts all properties referenced in an expression\n * @param expression The expression to analyze\n * @returns Array of PropertyInfo objects referenced in the expression\n */\nexport function getProperties(expression: Expression): PropertyInfo<any>[] {\n const properties: PropertyInfo<any>[] = [];\n\n function traverse(expr: Expression) {\n // If this is a property expression, add it to our collection\n if (expr.type === \"property\") {\n properties.push((expr as PropertyExpression).property);\n }\n\n // Traverse left and right expressions if they exist\n if (expr.left) {\n traverse(expr.left);\n }\n if (expr.right) {\n traverse(expr.right);\n }\n }\n\n traverse(expression);\n return properties;\n}\n\nexport function isPropertyExpression(expression: Expression): expression is PropertyExpression {\n return expression.type === \"property\";\n}\n\nexport function forEach(expression: Expression, callback: (expression: Expression) => boolean) {\n function traverse(expr: Expression): boolean {\n // Call the callback for this expression\n // If callback returns false, stop traversing\n if (!callback(expr)) {\n return false;\n }\n\n // Traverse left and right expressions if they exist\n if (expr.left) {\n if (!traverse(expr.left)) {\n return false;\n }\n }\n if (expr.right) {\n if (!traverse(expr.right)) {\n return false;\n }\n }\n\n return true;\n }\n\n traverse(expression);\n}","const measurements: Record<string, number> = {}\n\nexport const now = (): number => {\n if (typeof performance !== 'undefined' && performance.now) {\n // Browser or modern Node.js\n return performance.now();\n }\n\n // Fallback for older environments\n return Date.now();\n}\n\nexport const measure = {\n start: (name: string): void => {\n measurements[name] = now();\n },\n end: (name: string): void => {\n const start = measurements[name];\n\n delete measurements[name];\n\n const delta = now() - start;\n\n console.log(`[ROUTIER] - Performance: ${name} took ${delta}`);\n }\n}","export type SyncronousUnitOfWork = (done: () => void) => void\n\nexport class SyncronousQueue {\n\n private readonly _queue: SyncronousUnitOfWork[] = [];\n private _current: SyncronousUnitOfWork | null = null;\n\n enqueue(unitOfWork: SyncronousUnitOfWork) {\n this._queue.push(unitOfWork);\n this._next();\n }\n\n private _next() {\n if (this._current != null || this._queue.length === 0) {\n return;\n }\n\n // Take first item\n this._current = this._queue.shift() ?? null;\n\n if (this._current == null) {\n return;\n }\n\n this._current(() => {\n this._current = null;\n this._next();\n })\n }\n}","import { CallbackResult, Result, ResultType } from \"../results\";\n\n/**\n * Type definition for an asynchronous function that takes data and a callback.\n * TIn: The input data type.\n * TOut: The output data type (passed to the callback).\n */\nexport type Processor<TIn, TOut> = (data: TIn, callback: (result: TOut, error?: any) => void) => void;\n\n// Return type for a step execution: Either the next step function or null if waiting/done.\ntype StepResult<TData> = TrampolineStep<TData> | null;\ntype TrampolineStep<TData> = () => StepResult<TData>;\n\nexport class TrampolinePipeline<TInitial, TCurrent = TInitial> {\n private _list: Processor<any, any>[] = [];\n private _hasErrored: boolean = false; // Flag to prevent calling done on error\n\n filter<TFinal>(initialData: TInitial, done: (data: TFinal, error?: any) => void) {\n\n this._hasErrored = false; // Reset error flag on new execution\n\n if (this._list.length === 0) {\n queueMicrotask(() => done(initialData as any as TFinal));\n return;\n }\n\n let index = 0;\n let currentData: any = initialData;\n let isRunning = false; // Guard against overlapping trampoline calls\n\n try {\n // --- Revised Completion Logic --- (Moved up for clarity)\n const finalStepSentinel = (): StepResult<any> => { // A special step function for the very end\n // Only call done if no error has occurred\n if (!this._hasErrored) {\n queueMicrotask(() => done(currentData as TFinal));\n }\n return null; // Stop the trampoline\n };\n\n const createStepRevised = (idx: number): TrampolineStep<any> => {\n return () => {\n if (this._hasErrored) return null; // Stop if an error occurred elsewhere\n\n if (idx >= this._list.length) {\n return finalStepSentinel(); // Execute the dedicated final step\n }\n\n const processor = this._list[idx];\n // Initialize syncCallbackResult to null to satisfy StepResult type\n let syncCallbackResult: StepResult<any> = null;\n let calledSync = false;\n\n try {\n processor(currentData, (result, error) => {\n // --- Error Handling ---\n if (error) {\n console.error(`Error reported by processor at index ${idx}:`, error);\n this._hasErrored = true; // Set flag\n // Throw the error to be caught by outer try...catch blocks\n throw error;\n }\n // --- /Error Handling ---\n\n // If no error, proceed as before\n currentData = result;\n index = idx + 1; // Update index for the next step\n const nextStep = createStepRevised(index); // Use updated index\n\n if (isRunning) {\n // Callback was synchronous\n syncCallbackResult = nextStep; // Store next step function\n calledSync = true;\n } else {\n // Callback was asynchronous, restart trampoline\n trampoline(nextStep);\n }\n });\n } catch (error) {\n if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback\n console.error(`Error thrown by processor at index ${idx} or its callback:`, error);\n this._hasErrored = true;\n }\n // Rethrow to be caught by the trampoline's catch block\n throw error;\n }\n\n if (calledSync) {\n // Return the next step function for the sync loop\n return syncCallbackResult;\n } else {\n // Pause trampoline for async, loop will stop as step returns null\n return null;\n }\n };\n };\n\n // The trampoline loop\n const trampoline = (step: TrampolineStep<any> | null) => {\n\n if (isRunning) {\n return;\n }\n\n isRunning = true;\n let currentStep = step;\n\n while (typeof currentStep === 'function') {\n try {\n // Stop immediately if an error was flagged elsewhere\n if (this._hasErrored) {\n currentStep = null;\n break;\n }\n currentStep = currentStep(); // Execute step, get next step or null\n } catch (trampolineError) {\n // Catch errors propagated from step execution (processor or callback errors)\n if (!this._hasErrored) { // Avoid double logging\n console.error(\"Error during trampoline step execution:\", trampolineError);\n this._hasErrored = true;\n }\n currentStep = null; // Stop the loop\n // Call done with the error to properly notify the caller\n queueMicrotask(() => done(currentData as TFinal, trampolineError));\n break; // Explicitly break loop on error\n }\n }\n // Loop ends when currentStep is null or loop is broken by error\n isRunning = false;\n\n // Completion check is now handled by finalStepSentinel ensuring `done` isn't called on error.\n };\n\n // --- Start the process ---\n index = 0; // Reset index\n currentData = initialData; // Reset data\n trampoline(createStepRevised(0)); // Start with the revised step creator\n } catch (error: any) {\n done(currentData, error);\n }\n }\n\n pipe<TNext>(processor: Processor<TCurrent, TNext>) {\n this._list.push(processor);\n return this as unknown as TrampolinePipeline<TInitial, TNext>;\n }\n\n pipeEach(items: TCurrent[], fn: (payload: ResultType<TCurrent>, done: CallbackResult<TCurrent>) => void, map: (previous: ResultType<TCurrent>, current: ResultType<TCurrent>) => ResultType<TCurrent>) {\n for (let i = 0, length = items.length; i < length; i++) {\n\n this.pipe<ResultType<TCurrent>>((previous, done) => {\n\n fn(map(previous as ResultType<TCurrent>, Result.success(items[i])), done);\n });\n }\n }\n}\n\nexport type AsyncUnitOfWork<TData, TResult> = (payload: TData, done: CallbackResult<TResult>) => void;\nexport class AsyncPipeline<TData, TResult> {\n private _list: [TData, AsyncUnitOfWork<TData, TResult>][] = [];\n private _hasErrored: boolean = false; // Flag to prevent calling done on error\n\n filter(done: CallbackResult<TResult[]>) {\n\n this._hasErrored = false; // Reset error flag on new execution\n let currentData: TResult[] = [];\n\n if (this._list.length === 0) {\n queueMicrotask(() => done(Result.success()));\n return;\n }\n\n let index = 0;\n let isRunning = false; // Guard against overlapping trampoline calls\n\n try {\n // --- Revised Completion Logic --- (Moved up for clarity)\n const finalStepSentinel = (): StepResult<any> => { // A special step function for the very end\n // Only call done if no error has occurred\n if (!this._hasErrored) {\n queueMicrotask(() => done(Result.success(currentData)));\n }\n return null; // Stop the trampoline\n };\n\n const createStepRevised = (idx: number): TrampolineStep<any> => {\n return () => {\n if (this._hasErrored) return null; // Stop if an error occurred elsewhere\n\n if (idx >= this._list.length) {\n return finalStepSentinel(); // Execute the dedicated final step\n }\n\n const [payload, processor] = this._list[idx];\n // Initialize syncCallbackResult to null to satisfy StepResult type\n let syncCallbackResult: StepResult<any> = null;\n let calledSync = false;\n\n try {\n processor(payload, (result) => {\n // --- Error Handling ---\n if (result.ok === Result.ERROR) {\n console.error(`Error reported by AsyncPipeline at index ${idx}:`, result.error);\n this._hasErrored = true; // Set flag\n // Throw the error to be caught by outer try...catch blocks\n throw result.error;\n }\n // --- /Error Handling ---\n\n // If no error, proceed as before\n currentData.push(result.data);\n index = idx + 1; // Update index for the next step\n const nextStep = createStepRevised(index); // Use updated index\n\n if (isRunning) {\n // Callback was synchronous\n syncCallbackResult = nextStep; // Store next step function\n calledSync = true;\n } else {\n // Callback was asynchronous, restart trampoline\n trampoline(nextStep);\n }\n });\n } catch (error) {\n if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback\n console.error(`Error thrown by processor at index ${idx} or its callback:`, error);\n this._hasErrored = true;\n }\n // Rethrow to be caught by the trampoline's catch block\n throw error;\n }\n\n if (calledSync) {\n // Return the next step function for the sync loop\n return syncCallbackResult;\n } else {\n // Pause trampoline for async, loop will stop as step returns null\n return null;\n }\n };\n };\n\n // The trampoline loop\n const trampoline = (step: TrampolineStep<any> | null) => {\n\n if (isRunning) {\n return;\n }\n\n isRunning = true;\n let currentStep = step;\n\n while (typeof currentStep === 'function') {\n try {\n // Stop immediately if an error was flagged elsewhere\n if (this._hasErrored) {\n currentStep = null;\n break;\n }\n currentStep = currentStep(); // Execute step, get next step or null\n } catch (trampolineError) {\n // Catch errors propagated from step execution (processor or callback errors)\n if (!this._hasErrored) { // Avoid double logging\n console.error(\"Error during trampoline step execution:\", trampolineError);\n this._hasErrored = true;\n }\n currentStep = null; // Stop the loop\n // Call done with the error to properly notify the caller\n queueMicrotask(() => done(Result.error(trampolineError)));\n break; // Explicitly break loop on error\n }\n }\n // Loop ends when currentStep is null or loop is broken by error\n isRunning = false;\n\n // Completion check is now handled by finalStepSentinel ensuring `done` isn't called on error.\n };\n\n // --- Start the process ---\n index = 0; // Reset index\n trampoline(createStepRevised(0)); // Start with the revised step creator\n } catch (error: any) {\n done(Result.error(error));\n }\n }\n\n pipe(data: TData, processor: AsyncUnitOfWork<TData, TResult>) {\n this._list.push([data, processor]);\n }\n\n pipeEach(items: TData[], processor: AsyncUnitOfWork<TData, TResult>) {\n for (let i = 0, length = items.length; i < length; i++) {\n this.pipe(items[i], processor);\n }\n }\n}\n\nexport type UnitOfWork = (done: CallbackResult<never>) => void;\n\n/**\n * Processes functions with callbacks asynchronously.\n * \n * This pipeline handles work items that contain callback functions,\n * executing them in an asynchronous manner while maintaining proper\n * flow control and error handling.\n */\nexport class WorkPipeline {\n private unitsOfWork: UnitOfWork[] = [];\n\n filter(done: CallbackResult<never>) {\n const units = this.unitsOfWork;\n const unitsLength = units.length;\n\n // Fast path for empty pipeline\n if (unitsLength === 0) {\n queueMicrotask(() => done(Result.success()));\n return;\n }\n\n // Fast path for single work unit\n if (unitsLength === 1) {\n try {\n units[0]((result) => {\n queueMicrotask(() => done(result));\n });\n } catch (error: any) {\n done(Result.error(error));\n }\n return;\n }\n\n let isRunning = false;\n let hasErrored = false;\n\n try {\n const createStep = (idx: number): TrampolineStep<any> => {\n return () => {\n if (hasErrored) return null;\n if (idx >= unitsLength) {\n if (!hasErrored) {\n queueMicrotask(() => done(Result.success()));\n }\n return null;\n }\n\n const processor = units[idx];\n let syncResult: StepResult<any> = null;\n let calledSync = false;\n\n try {\n processor((result) => {\n if (result.ok === Result.ERROR) {\n hasErrored = true;\n throw result.error;\n }\n\n const nextStep = createStep(idx + 1);\n\n if (isRunning) {\n syncResult = nextStep;\n calledSync = true;\n } else {\n trampoline(nextStep);\n }\n });\n } catch (error) {\n hasErrored = true;\n throw error;\n }\n\n return calledSync ? syncResult : null;\n };\n };\n\n const trampoline = (step: TrampolineStep<any> | null) => {\n if (isRunning) return;\n isRunning = true;\n\n let currentStep = step;\n while (currentStep) {\n try {\n if (hasErrored) {\n currentStep = null;\n break;\n }\n currentStep = currentStep();\n } catch (error) {\n hasErrored = true;\n currentStep = null;\n queueMicrotask(() => done(Result.error(error)));\n break;\n }\n }\n\n isRunning = false;\n };\n\n trampoline(createStep(0));\n } catch (error: any) {\n done(Result.error(error));\n }\n }\n\n pipe(work: UnitOfWork) {\n this.unitsOfWork.push(work);\n }\n}\n","export * from './SyncronousQueue';\nexport * from './TrampolinePipeline';","import { assertIsNotNull } from '../assertions';\nimport { BulkPersistResult } from '../collections';\nimport { WorkPipeline } from '../pipeline';\nimport { DbPluginBulkPersistEvent, DbPluginEvent, DbPluginQueryEvent, IDbPlugin, JsonTranslator } from '.';\nimport { PluginEventCallbackPartialResult, PluginEventCallbackResult, PluginEventResult, Result } from '../results';\nimport { CompiledSchema, InferCreateType, InferType } from '../schema';\nimport { DeepPartial } from '../types';\nimport { MemoryDataCollection } from '../collections/MemoryDataCollection';\nimport { UnknownRecord } from '../utilities';\n\nexport abstract class EphemeralDataPlugin implements IDbPlugin {\n\n protected databaseName: string;\n\n constructor(databaseName: string) {\n this.databaseName = databaseName;\n }\n\n protected abstract resolveCollection<TEntity extends {}>(schema: CompiledSchema<TEntity>): MemoryDataCollection;\n\n bulkPersist(event: DbPluginBulkPersistEvent, done: PluginEventCallbackPartialResult<BulkPersistResult>) {\n try {\n const bulkPersistResult = event.operation.toResult();\n const schemas = event.schemas;\n const pipeline = new WorkPipeline();\n let hasWork = false;\n\n for (const [schemaId, changes] of event.operation) {\n const { adds, hasItems, removes, updates } = changes;\n\n if (!hasItems) {\n continue;\n }\n\n hasWork = true;\n const result = bulkPersistResult.get(schemaId);\n const schema = schemas.get(schemaId);\n assertIsNotNull(schema);\n\n pipeline.pipe((d) => {\n try {\n const collection = this.resolveCollection(schema);\n collection.load(readResult => {\n if (readResult.ok === Result.ERROR) {\n d(readResult);\n return;\n }\n\n const addsLength = adds.length;\n const updatesLength = updates.length;\n const removesLength = removes.length;\n result.adds = new Array(addsLength);\n result.updates = new Array(updatesLength);\n result.removes = new Array(removesLength);\n\n for (let j = 0; j < addsLength; j++) {\n const item = adds[j];\n collection.add(item);\n result.adds[j] = item as DeepPartial<InferCreateType<UnknownRecord>>;\n }\n\n for (let j = 0; j < updatesLength; j++) {\n const item = updates[j].entity;\n collection.update(item);\n result.updates[j] = item;\n }\n\n for (let j = 0; j < removesLength; j++) {\n collection.remove(removes[j]);\n result.removes[j] = removes[j];\n }\n\n collection.save(saveResult => {\n if (saveResult.ok === Result.ERROR) {\n d(saveResult);\n return;\n }\n d(Result.success());\n });\n });\n } catch (e) {\n d(Result.error(e));\n }\n });\n }\n\n if (!hasWork) {\n done(PluginEventResult.success(event.id, bulkPersistResult));\n return;\n }\n\n pipeline.filter((result) => {\n if (result.ok === Result.ERROR) {\n done(PluginEventResult.error(event.id, result.error));\n return;\n }\n done(PluginEventResult.success(event.id, bulkPersistResult));\n });\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n query<TEntity extends {}, TShape extends any = TEntity>(event: DbPluginQueryEvent<TEntity, TShape>, done: PluginEventCallbackResult<TShape>): void {\n try {\n const operation = event.operation;\n const schema = operation.schema;\n const translator = new JsonTranslator<TEntity, TShape>(operation);\n const collection = this.resolveCollection(schema);\n\n collection.load(r => {\n if (r.ok === Result.ERROR) {\n done(PluginEventResult.error(event.id, r.error));\n return;\n }\n\n const records = collection.records;\n const length = records.length;\n const cloned: Record<string, unknown>[] = new Array(length);\n\n for (let i = 0; i < length; i++) {\n cloned[i] = schema.clone(records[i] as InferType<TEntity>);\n }\n\n done(PluginEventResult.success(event.id, translator.translate(cloned)));\n });\n } catch (e) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n abstract destroy(event: DbPluginEvent, done: PluginEventCallbackResult<never>): void;\n}","export * from './types';\nexport * from './translators';\nexport * from './replication';\nexport * from './query';\nexport * from './EphemeralDataPlugin';","\nimport { CompiledSchema } from '../../schema';\nimport { IQuery } from '../types';\nimport { QueryOptionsCollection } from './QueryOptionsCollection';\n\nexport class Query<TRoot extends {}, TShape> implements IQuery<TRoot, TShape> {\n\n readonly options: QueryOptionsCollection<TShape>;\n readonly schema: CompiledSchema<TRoot>;\n private enableChangeTrackingOverride?: boolean\n\n constructor(\n options: QueryOptionsCollection<TShape>,\n schema: CompiledSchema<TRoot>,\n enableChangeTrackingOverride?: boolean,\n ) {\n this.schema = schema;\n this.options = options;\n this.enableChangeTrackingOverride = enableChangeTrackingOverride;\n }\n\n // boolean value whether or not change tracking can be enabled on the query result\n get changeTracking(): boolean {\n\n if (this.enableChangeTrackingOverride != null) {\n return this.enableChangeTrackingOverride;\n }\n\n const map = this.options.getValues(\"map\");\n const count = this.options.has(\"count\");\n const max = this.options.has(\"max\");\n const min = this.options.has(\"min\");\n const sum = this.options.has(\"sum\");\n\n if (map.some(x => x.fields.length > 0)) {\n return false\n }\n\n if (count === true ||\n max === true ||\n min === true ||\n sum === true) {\n return false\n }\n\n return true;\n }\n\n static EMPTY<T extends {}, S>(schema: CompiledSchema<T>) {\n return new Query<T, S>(QueryOptionsCollection.EMPTY<S>(), schema);\n }\n\n static isEmpty<T extends {}, S>(query: IQuery<T, S>) {\n return QueryOptionsCollection.isEmpty(query.options);\n }\n\n static toString<TRoot extends {}, TShape>(query: IQuery<TRoot, TShape>) {\n return JSON.stringify({\n options: query.options.items,\n schema: {\n id: query.schema.id,\n collectionName: query.schema.collectionName\n },\n changeTracking: query.changeTracking\n })\n }\n}","import { forEach, isPropertyExpression } from \"../../expressions/utils\";\nimport { QueryOption, QueryOptionName, QueryOptionExecutionTarget, QueryOptionValueMap } from \"./types\";\n\nexport type QueryCollectionItem<T, K extends QueryOptionName> = { index: number, option: QueryOption<T, K> };\n\nexport class QueryOptionsCollection<T> {\n\n private options: Map<QueryOptionName, QueryCollectionItem<any, any>[]> = new Map<QueryOptionName, QueryCollectionItem<any, any>[]>();\n private nextExecutionTarget: QueryOptionExecutionTarget = \"database\";\n private nextIndex: number = 0;\n private enumeratedItems: QueryCollectionItem<any, any>[] = [];\n\n get items() {\n return this.options;\n }\n\n get isEmpty() {\n return this.items.size === 0;\n }\n\n static EMPTY<R>() {\n return new QueryOptionsCollection<R>();\n }\n\n static isEmpty<T>(options: QueryOptionsCollection<T>) {\n return options.isEmpty;\n }\n\n add<K extends QueryOptionName>(name: K, value: QueryOption<T, K>[\"value\"]) {\n\n if (name === \"map\") {\n const mapValue = value as QueryOptionValueMap<T>[\"map\"];\n\n // Evaluate the map value to see if we are renaming properties, \n // if we are we need to perform everything after in memory\n if (mapValue.fields.some(x => x.isRename === true) || mapValue.fields.some(x => x.property?.isUnmapped === true)) {\n // Cut over to memory execution since we are renaming a property with .map\n // We do not want to figure out how the new name flows through the entire query\n this.nextExecutionTarget = \"memory\";\n }\n }\n\n if (name === \"filter\") {\n // Need to check for unmapped properties\n const filterValue = value as QueryOptionValueMap<T>[\"filter\"];\n\n if (filterValue.expression.type === \"not-parsable\") {\n this.nextExecutionTarget = \"memory\";\n } else {\n forEach(filterValue.expression, (expression) => {\n\n if (isPropertyExpression(expression) && expression.property.isUnmapped) {\n // Cut over to memory execution, unmapped properties are not in the database and\n // cannot be queried\n this.nextExecutionTarget = \"memory\";\n return false;\n }\n\n return true;\n });\n }\n }\n\n const item: QueryCollectionItem<T, K> = {\n index: this.nextIndex,\n option: {\n name,\n target: this.nextExecutionTarget,\n value\n }\n }\n\n this.nextIndex++;\n\n const found = this.options.get(name);\n\n this.options.set(name, [...found ?? [], item]);\n }\n\n split(): { memory: QueryOptionsCollection<T>, database: QueryOptionsCollection<T> } {\n this.resolveEnumeration();\n\n const sortedItems = this.enumeratedItems.toSorted((a, b) => a.index - b.index);\n const memoryQueryOptionsCollection = new QueryOptionsCollection<T>();\n const databaseQueryOptionsCollection = new QueryOptionsCollection<T>();\n\n for (let i = 0, length = sortedItems.length; i < length; i++) {\n const sortedItem = sortedItems[i];\n\n if (sortedItem.option.target === \"database\") {\n databaseQueryOptionsCollection.add(sortedItem.option.name, sortedItem.option.value);\n continue;\n }\n\n memoryQueryOptionsCollection.add(sortedItem.option.name, sortedItem.option.value);\n }\n\n return {\n memory: memoryQueryOptionsCollection,\n database: databaseQueryOptionsCollection\n }\n }\n\n has<K extends QueryOptionName>(name: K): boolean {\n return this.options.has(name);\n }\n\n get<K extends QueryOptionName>(name: K): QueryCollectionItem<T, K>[] {\n return this.options.get(name) ?? [] as QueryCollectionItem<T, K>[];\n }\n\n getLast<K extends QueryOptionName>(name: K): QueryOption<T, K> | null {\n this.resolveEnumeration();\n\n for (let i = this.enumeratedItems.length - 1; i >= 0; i--) {\n const item = this.enumeratedItems[i];\n\n if (item.option.name === name) {\n return item.option;\n }\n }\n\n return null\n }\n\n getValues<K extends QueryOptionName>(name: K): QueryCollectionItem<T, K>[\"option\"][\"value\"][] | undefined {\n\n const found = this.options.get(name);\n\n if (found == null) {\n return [];\n }\n\n return found.map(w => w.option.value) as QueryCollectionItem<T, K>[\"option\"][\"value\"][];\n }\n\n private getEnumeration() {\n return [...this.options.values()].flat().toSorted((a, b) => a.index - b.index);\n }\n\n private resolveEnumeration() {\n if (this.enumeratedItems.length != this.nextIndex) {\n this.enumeratedItems = this.getEnumeration();\n }\n }\n\n forEach(iterator: (item: QueryCollectionItem<T, any>[\"option\"]) => void) {\n this.resolveEnumeration();\n\n for (let i = 0, length = this.enumeratedItems.length; i < length; i++) {\n iterator(this.enumeratedItems[i].option);\n }\n }\n}","export * from './Query';\nexport * from './QueryOptionsCollection';\nexport * from './types';","import { Expression, Filter, ParamsFilter } from \"../../expressions\";\nimport { PropertyInfo } from \"../../schema\";\nimport { GenericFunction } from \"../../types\";\n\nexport enum QueryOrdering {\n Descending = \"desc\",\n Ascending = \"asc\"\n}\n\n/**\n * Field mapping for a query result, including source and destination names and a getter function.\n */\nexport type QueryField = {\n sourceName: string,\n destinationName: string,\n isRename: boolean;\n property?: PropertyInfo<unknown>;\n getter: <T>(data: Record<string, unknown>) => T;\n};\n\nexport type QueryOptionExecutionTarget = \"database\" | \"memory\";\nexport type QueryOptionName = keyof QueryOptionValueMap<unknown>;\n\nexport type QueryOption<T, K extends QueryOptionName> = {\n name: QueryOptionName;\n value: QueryOptionValueMap<T>[K],\n target: QueryOptionExecutionTarget;\n}\n\nexport type QueryOptionValueMap<T extends {}> = {\n skip: number;\n take: number;\n sort: { selector: GenericFunction<T, T[keyof T]>, direction: QueryOrdering, propertyName: string };\n map: { selector: GenericFunction<T, any>, fields: QueryField[] };\n filter: { params?: {}, filter: ParamsFilter<T, {}> | Filter<T>, expression: Expression };\n min: true; // True or not set\n max: true; // True or not set\n count: true; // True or not set\n sum: true; // True or not set\n distinct: true; // True or not set\n};\n\n/**\n * Sort specification for a query.\n */\nexport type QuerySort = { key: string, selector: (item: unknown) => unknown, direction: \"asc\" | \"desc\" };","import { PluginEventCallbackPartialResult, PluginEventCallbackResult, PluginEventResult, Result } from '../../results';\nimport { DbPluginBulkPersistEvent, DbPluginEvent, DbPluginQueryEvent, IDbPlugin, OptimisticReplicationPluginOptions } from '../types';\nimport { WorkPipeline } from '../../pipeline'; 7\nimport { CompiledSchema } from '../../schema';\nimport { Query } from '../query';\nimport { resolveBulkPersistChanges, uuid } from '../../utilities';\nimport { BulkPersistChanges, BulkPersistResult } from '../../collections';\n\nconst getMemoryPluginCollectionSize = <T extends {}>(plugin: IDbPlugin, schema: CompiledSchema<T>): number => {\n\n if (\"getCollectionSize\" in plugin && typeof plugin.getCollectionSize === \"function\") {\n return plugin.getCollectionSize(schema.collectionName) as number;\n }\n\n throw new Error(\"Cannot get size of collection for MemoryPlugin, not an instance of MemoryPlugin\");\n}\n\ntype HydrationStatus =\n | \"hydration-not-started\"\n | \"hydration-pending\"\n | \"hydration-error\"\n | \"hydration-success\";\n\nconst HYDRATION_STATUS_PENDING: HydrationStatus = \"hydration-pending\";\nconst HYDRATION_STATUS_ERROR: HydrationStatus = \"hydration-error\";\nconst HYDRATION_STATUS_SUCCESS: HydrationStatus = \"hydration-success\";\n\nlet hydrationStatus: HydrationStatus = \"hydration-not-started\";\n\nexport class OptimisticReplicationDbPlugin implements IDbPlugin {\n\n protected plugins: OptimisticReplicationPluginOptions;\n\n protected constructor(plugins: OptimisticReplicationPluginOptions) {\n this.plugins = plugins;\n }\n\n /**\n * Creates a new OptimisticDbPluginReplicator that coordinates operations between a source database and its replicas.\n * \n * @param source The primary database plugin that will receive all operations first\n * @param replicas Additional database plugins that will replicate operations from the source\n * @returns A new DbPluginReplicator instance that manages the source-replica relationship\n */\n static create(plugins: OptimisticReplicationPluginOptions) {\n return new OptimisticReplicationDbPlugin(plugins);\n }\n\n /**\n * Will query the read plugin if there is one, otherwise the source plugin will be queried\n */\n query<TEntity extends {}, TShape extends any = TEntity>(event: DbPluginQueryEvent<TEntity, TShape>, done: PluginEventCallbackResult<TShape>): void {\n try {\n\n const readPlugin = this.plugins.read;\n const sourcePlugin = this.plugins.source;\n const collectionSize = getMemoryPluginCollectionSize(this.plugins.read, event.operation.schema);\n\n if (collectionSize === 0 && hydrationStatus === \"hydration-not-started\") {\n\n // Notify the cache that the db was hydrated right away\n hydrationStatus = \"hydration-pending\";\n\n console.log('[ROUTIER] - Optimistic Query', hydrationStatus);\n\n // nothing is hydrated, let's try and hydrate before querying\n // Memory plugin might not be hydrated, lets hydrate it for the targeted schema only,\n // Other queries will do the same and hydrate if needed\n // We want to select all data here\n sourcePlugin.query<TEntity, TShape>({\n id: uuid(8),\n schemas: event.schemas,\n source: \"collection\",\n // Select All Data\n operation: Query.EMPTY<TEntity, TShape>(event.operation.schema)\n }, (sourceResult) => {\n\n if (sourceResult.ok === Result.ERROR) {\n\n // Notify that hydration failed\n hydrationStatus = \"hydration-error\";\n console.log(\"[ROUTIER] - Hydration Error - Source Query\", sourceResult);\n done(sourceResult);\n return;\n }\n\n if (sourceResult == null || (Array.isArray(sourceResult.data) && sourceResult.data.length === 0)) {\n // Notify that hydration had no data\n hydrationStatus = \"hydration-error\";\n console.log(\"[ROUTIER] - Hydration Error - No Data\", sourceResult);\n done(sourceResult);\n return;\n }\n\n if (Array.isArray(sourceResult.data) === false) {\n // Notify that hydration failed\n hydrationStatus = \"hydration-error\";\n console.log(\"[ROUTIER] - Hydration Error - Bad Result\", sourceResult);\n done(PluginEventResult.error(event.id, \"Query result is not an array\"));\n return;\n }\n\n const changesCollection = new BulkPersistChanges();\n const schemaChanges = changesCollection.resolve(event.operation.schema.id);\n\n // Add the existing items into the persist payload as adds\n schemaChanges.adds = sourceResult.data;\n\n readPlugin.bulkPersist({\n id: uuid(8),\n schemas: event.schemas,\n operation: changesCollection,\n source: \"collection\",\n }, (readPersistResult) => {\n\n if (readPersistResult.ok === Result.ERROR) {\n // Notify that hydration failed\n hydrationStatus = \"hydration-error\";\n console.log(\"[ROUTIER] - Hydration Error - Could Not Save\", readPersistResult);\n done(readPersistResult);\n return;\n }\n\n hydrationStatus = \"hydration-success\";\n\n // requery the read plugin\n readPlugin.query(event, done);\n });\n });\n\n return;\n }\n\n // Collection is hydrated for the targeted collection and should be in sync\n readPlugin.query(event, (readResult) => {\n\n if (readResult.ok === Result.ERROR) {\n done(readResult);\n return;\n }\n\n done(readResult);\n return;\n\n });\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n destroy(event: DbPluginEvent, done: PluginEventCallbackResult<never>): void {\n try {\n\n const workPipeline = new WorkPipeline();\n const plugins = [this.plugins.source, ...this.plugins.replicas];\n\n for (let i = 0, length = plugins.length; i < length; i++) {\n workPipeline.pipe((done) => plugins[i].destroy(event, done));\n }\n\n workPipeline.filter((result) => {\n\n if (result.ok === Result.ERROR) {\n done(PluginEventResult.error(event.id, result.error));\n return;\n }\n\n done(PluginEventResult.success(event.id));\n });\n\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n bulkPersist(event: DbPluginBulkPersistEvent, done: PluginEventCallbackPartialResult<BulkPersistResult>): void {\n try {\n\n const workPipeline = new WorkPipeline();\n const deferredPlugins = [this.plugins.source, ... this.plugins.replicas];\n\n // Since we are doing optimistic, we insert into the read plugin first and assume later plugins will succeed\n // This means the read plugin will generate ids for the source plugin\n this.plugins.read.bulkPersist({\n id: uuid(8),\n operation: event.operation,\n schemas: event.schemas,\n source: \"data-store\",\n }, (r) => {\n\n if (r.ok !== Result.SUCCESS) {\n done(r);\n return;\n }\n\n // optimistically call done and still continue saving the rest of the data. We read from the memory\n // db anyways\n done(r);\n\n const optimisticBulkPersistChanges = new BulkPersistChanges();\n\n // make sure we swap the adds here, that way we can make sure other persist events\n // don't take their additions and try to change subsequent calls\n resolveBulkPersistChanges(event, r.data, optimisticBulkPersistChanges);\n\n for (let i = 0, length = deferredPlugins.length; i < length; i++) {\n workPipeline.pipe((d) => {\n\n const plugin = deferredPlugins[i];\n\n plugin.bulkPersist({\n id: uuid(8),\n operation: optimisticBulkPersistChanges,\n schemas: event.schemas,\n source: \"data-store\",\n }, (r) => {\n\n if (r.ok === Result.ERROR) {\n d(r);\n return;\n }\n\n d(Result.success());\n });\n });\n }\n\n setTimeout(() => {\n workPipeline.filter((_) => {\n // no-op for now, maybe implement retries?\n });\n }, 5);\n });\n\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n}","import { PluginEventCallbackPartialResult, PluginEventCallbackResult, PluginEventResult, Result } from '../../results';\nimport { DbPluginBulkPersistEvent, DbPluginEvent, DbPluginQueryEvent, IDbPlugin, ReplicationPluginOptions } from '../types';\nimport { AsyncPipeline, WorkPipeline } from '../../pipeline';\nimport { BulkPersistResult } from '../../collections';\nimport { resolveBulkPersistChanges } from '../../utilities';\n\nexport class ReplicationDbPlugin implements IDbPlugin {\n\n plugins: ReplicationPluginOptions;\n\n protected constructor(plugins: ReplicationPluginOptions) {\n this.plugins = plugins;\n }\n\n /**\n * Creates a new DbPluginReplicator that coordinates operations between a source database and its replicas.\n * \n * @param source The primary database plugin that will receive all operations first\n * @param replicas Additional database plugins that will replicate operations from the source\n * @returns A new DbPluginReplicator instance that manages the source-replica relationship\n */\n static create(plugins: ReplicationPluginOptions) {\n return new ReplicationDbPlugin(plugins);\n }\n\n /**\n * Will query the read plugin if there is one, otherwise the source plugin will be queried\n */\n query<TEntity extends {}, TShape extends any = TEntity>(event: DbPluginQueryEvent<TEntity, TShape>, done: PluginEventCallbackResult<TShape>): void {\n try {\n\n const plugin = this.plugins.read != null ? this.plugins.read : this.plugins.source;\n\n plugin.query(event, done);\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n destroy(event: DbPluginEvent, done: PluginEventCallbackResult<never>): void {\n try {\n\n const pipeline = new AsyncPipeline<IDbPlugin, never>();\n const plugins = [this.plugins.source, ...this.plugins.replicas];\n\n for (let i = 0, length = plugins.length; i < length; i++) {\n pipeline.pipe(plugins[i], (plugin, done) => plugin.destroy(event, done));\n }\n\n pipeline.filter((result) => {\n\n if (result.ok === Result.ERROR) {\n done(PluginEventResult.error(event.id, result.error));\n return;\n }\n\n done(PluginEventResult.success(event.id));\n });\n\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n\n bulkPersist(event: DbPluginBulkPersistEvent, done: PluginEventCallbackPartialResult<BulkPersistResult>): void {\n try {\n // insert into the source first to generate any ids, then take the result and persist that into the replicas\n const pipeline = new WorkPipeline();\n const plugins = [this.plugins.source, ...this.plugins.replicas];\n\n if (this.plugins.read != null) {\n plugins.push(this.plugins.read);\n }\n\n const result = new BulkPersistResult();\n\n for (let i = 0, length = plugins.length; i < length; i++) {\n pipeline.pipe((d) => {\n\n const plugin = plugins[i];\n\n // source is first\n if (i === 0) {\n plugin.bulkPersist(event, (r) => {\n\n if (r.ok === Result.ERROR) {\n d(r)\n return;\n }\n\n // make sure we swap the adds here, that way we can make sure other persist events\n // don't take their additions and try to change subsequent calls\n resolveBulkPersistChanges(event, r.data, event.operation);\n\n d(Result.success());\n });\n return;\n }\n\n plugin.bulkPersist(event, (r) => {\n\n if (r.ok === Result.ERROR) {\n d(r)\n return;\n }\n\n d(Result.success());\n });\n })\n }\n\n let successCount = 0;\n\n pipeline.filter((r) => {\n\n if (r.ok === Result.ERROR) {\n\n if (successCount > 0) {\n done(PluginEventResult.partial(event.id, result, r.error));\n return;\n }\n\n done(PluginEventResult.error(event.id, r.error));\n return;\n }\n\n successCount++;\n\n done(PluginEventResult.success(event.id, result));\n });\n\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n}","export * from './ReplicationDbPlugin';\nexport * from './OptimisticReplicationDbPlugin';\nexport * from './types';","import { QueryOption, QueryOptionName } from \"../query/types\";\nimport { IQuery } from \"../types\";\n\nexport abstract class DataTranslator<TRoot extends {}, TShape> {\n\n protected query: IQuery<TRoot, TShape>;\n private functionMap: Record<QueryOptionName, (data: unknown, option: QueryOption<any, any>) => TShape> = {\n count: (data: unknown, option: QueryOption<TShape, \"count\">) => this.count<any>(data, option),\n distinct: (data: unknown, option: QueryOption<TShape, \"distinct\">) => this.distinct(data, option),\n filter: (data: unknown, option: QueryOption<TShape, \"filter\">) => this.filter(data, option),\n map: (data: unknown, option: QueryOption<TShape, \"map\">) => this.map(data, option),\n max: (data: unknown, option: QueryOption<TShape, \"max\">) => this.max<any>(data, option),\n min: (data: unknown, option: QueryOption<TShape, \"min\">) => this.min<any>(data, option),\n skip: (data: unknown, option: QueryOption<TShape, \"skip\">) => this.skip(data, option),\n sort: (data: unknown, option: QueryOption<TShape, \"sort\">) => this.sort(data, option),\n sum: (data: unknown, option: QueryOption<TShape, \"sum\">) => this.sum<any>(data, option),\n take: (data: unknown, option: QueryOption<TShape, \"take\">) => this.take(data, option)\n };\n\n constructor(query: IQuery<TRoot, TShape>) {\n this.query = query;\n }\n\n // Terminators\n abstract count<TResult extends number>(data: unknown, option: QueryOption<TShape, \"count\">): TResult;\n abstract min<TResult extends string | number | Date>(data: unknown, option: QueryOption<TShape, \"min\">): TResult;\n abstract max<TResult extends string | number | Date>(data: unknown, option: QueryOption<TShape, \"max\">): TResult;\n abstract sum<TResult extends number>(data: unknown, option: QueryOption<TShape, \"sum\">): TResult;\n abstract distinct<TResult>(data: unknown, option: QueryOption<TShape, \"distinct\">): TResult;\n\n // Shapers\n abstract filter<TResult>(data: unknown, option: QueryOption<TShape, \"filter\">): TResult;\n abstract skip(data: unknown, option: QueryOption<TShape, \"skip\">): TShape;\n abstract take(data: unknown, option: QueryOption<TShape, \"take\">): TShape;\n abstract sort(data: unknown, option: QueryOption<TShape, \"sort\">): TShape;\n abstract map(data: unknown, option: QueryOption<TShape, \"map\">): TShape;\n\n translate(data: unknown): TShape {\n\n this.query.options.forEach(item => {\n data = this.functionMap[item.name](data, item);\n });\n\n return data as TShape;\n }\n}","import { DataTranslator } from \"./DataTranslator\";\nimport { QueryOption } from \"../query/types\";\nimport { assertIsArray } from \"../../assertions\";\nimport { ParamsFilter } from \"../../expressions\";\nimport { isDate } from \"../../utilities\";\n\nexport class JsonTranslator<TRoot extends {}, TShape> extends DataTranslator<TRoot, TShape> {\n\n override filter<TResult>(data: unknown, option: QueryOption<TShape, \"filter\">): TResult {\n\n assertIsArray(data);\n\n if (option.value.filter) {\n\n if (option.value.params == null) {\n // standard filtering\n return data.filter(option.value.filter) as TResult;\n }\n\n // params filtering\n const selector = option.value.filter as ParamsFilter<unknown, {}>\n return data.filter(w => selector([w, option.value.params])) as TResult;\n }\n\n return data as TResult;\n }\n\n override map<T>(data: unknown, option: QueryOption<T, \"map\">): T {\n\n if (Array.isArray(data) == false) {\n throw new Error(\"Can only map an array of data\");\n }\n\n const response = [];\n\n // We want deserialization to flow through mappings\n // TODO: Speed this up!\n // Generate a function on the fly?\n for (let i = 0, length = data.length; i < length; i++) {\n\n for (let j = 0, l = option.value.fields.length; j < l; j++) {\n const field = option.value.fields[j];\n\n if (field.property != null) {\n const value = field.property.getValue(data[i]);\n\n if (value != null) {\n field.property.setValue(data[i], field.property.deserialize(value));\n }\n }\n }\n\n response.push(option.value.selector(data[i]));\n }\n\n return response as T;\n }\n\n override count<TResult extends number>(data: unknown, _: QueryOption<TShape, \"count\">): TResult {\n\n if (Array.isArray(data)) {\n return data.length as TResult;\n }\n\n throw new Error(\"Cannot count resulting data, it must be an array. Please return array of data for function: count()\");\n }\n\n override min<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, \"min\">): TResult {\n return this._minMax(data, \"min\", (a: any, b: any) => a - b);\n }\n\n override max<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, \"max\">): TResult {\n return this._minMax(data, \"max\", (a: any, b: any) => b - a);\n }\n\n override sort<TResult>(data: unknown, option: QueryOption<TShape, \"sort\">): TResult {\n\n if (Array.isArray(data)) {\n\n data.sort((a, b) => {\n if (option.value.direction === \"asc\") {\n return (option.value.selector(a) as any) - (option.value.selector(b) as any);\n }\n\n return (option.value.selector(b) as any) - (option.value.selector(a) as any);\n });\n }\n\n return data as TResult;\n }\n\n override sum<TResult extends number>(data: unknown, _: QueryOption<TShape, \"sum\">): TResult {\n\n assertIsArray(data, this._formatDataNotArrayError(\"sum\"));\n\n if (data.length === 0) {\n throw new Error(\"Cannot perform operation on empty array, result query contains no data\")\n }\n\n const map = this.query.options.getLast(\"map\");\n\n let sum = 0;\n const field = this._getSelectionField(\"sum\", map);\n\n for (let i = 0, length = data.length; i < length; i++) {\n const value = data[i];\n\n if (typeof value !== \"number\") {\n throw new Error(`Cannot sum, property is not a number. Property: ${field.sourceName}`);\n }\n\n sum += value;\n }\n\n return sum as TResult;\n }\n\n override distinct<TResult>(data: unknown, _: QueryOption<TShape, \"distinct\">): TResult {\n\n assertIsArray(data, this._formatDataNotArrayError(\"distinct\"));\n\n const result = new Set<string | number | Date>();\n\n // would be nice to have property info here for type detection\n let needsDateConversion = false;\n\n for (let i = 0, length = data.length; i < length; i++) {\n const value = data[i];\n\n if (typeof value === \"number\" || typeof value === \"string\") {\n result.add(value);\n continue;\n }\n\n if (isDate(value)) {\n needsDateConversion = true;\n result.add(value.toISOString());\n continue;\n }\n\n }\n\n if (needsDateConversion) {\n return [...result].map(w => new Date(w)) as TResult;\n }\n\n return [...result] as TResult\n }\n\n override skip<TResult>(data: unknown, option: QueryOption<TShape, \"skip\">): TResult {\n\n if (Array.isArray(data)) {\n\n if (option.value > 0) {\n\n if (data.length < option.value) {\n // We don't have enough data to skip, return an empty array\n return [] as TResult;\n }\n\n return data.slice(option.value) as TResult;\n }\n\n return data as TResult;\n }\n\n return data as TResult;\n }\n\n override take<TResult>(data: unknown, option: QueryOption<TShape, \"take\">): TResult {\n if (Array.isArray(data)) {\n\n if (option.value > 0) {\n\n if (data.length < option.value) {\n return data as TResult;\n }\n\n return data.slice(0, option.value) as TResult;\n }\n\n return data as TResult;\n }\n\n return data as TResult;\n }\n\n private _getSelectionField(name: string, mapOption: QueryOption<TShape, \"map\"> | null) {\n\n if (mapOption == null ||\n mapOption.value.fields.length === 0 ||\n mapOption.value.fields.length > 1) {\n throw new Error(`${name}() operation can only be performed when one field is mapped for a result. Ex. myset.map(x => x.someNumberOrDateOrString).${name}()`)\n }\n\n return mapOption.value.fields[0];\n }\n\n private _minMax<T extends string | number | Date>(data: unknown, name: string, sort: (a: any, b: any) => any): T {\n\n assertIsArray(data, this._formatDataNotArrayError(name));\n\n data.sort(sort);\n\n if (data.length === 0) {\n throw new Error(\"Cannot perform operation on empty array, result query contains no data\")\n }\n\n return data[0] as T;\n }\n\n private _formatDataNotArrayError(functionName: string) {\n return `Cannot sum resulting data, it must be an array. Please return array of data for function: ${functionName}()`\n }\n}","import { QueryOption } from \"../query/types\";\nimport { DataTranslator } from \"./DataTranslator\";\n\nexport class SqlTranslator<TRoot extends {}, TShape> extends DataTranslator<TRoot, TShape> {\n\n count<TResult extends number>(data: unknown, _: QueryOption<TShape, \"count\">): TResult {\n if (Array.isArray(data) && data.length > 0) {\n // Count should be returned as the property alias on the query\n return data[0].count;\n }\n\n return data as TResult;\n }\n\n min<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, \"min\">): TResult {\n return this.shapeResult(data);\n }\n\n max<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, \"max\">): TResult {\n return this.shapeResult(data);\n }\n\n sum<TResult extends number>(data: unknown, _: QueryOption<TShape, \"sum\">): TResult {\n return this.shapeResult(data);\n }\n\n private shapeResult<TResult>(data: unknown) {\n if (Array.isArray(data) && data.length > 0) {\n // Shape the result\n return data[0];\n }\n\n return data as TResult;\n }\n\n distinct<TResult>(data: unknown, _: QueryOption<TShape, \"distinct\">): TResult {\n return data as TResult;\n }\n\n filter<TResult>(data: unknown, _: QueryOption<TShape, \"filter\">): TResult {\n return data as TResult;\n }\n\n skip(data: unknown, _: QueryOption<TShape, \"skip\">): TShape {\n return data as TShape;\n }\n\n take(data: unknown, _: QueryOption<TShape, \"take\">): TShape {\n return data as TShape;\n }\n\n sort(data: unknown, _: QueryOption<TShape, \"sort\">): TShape {\n return data as TShape;\n }\n\n map(data: unknown, option: QueryOption<TShape, \"map\">): TShape {\n if (Array.isArray(data) == false) {\n throw new Error(\"Can only map an array of data\");\n }\n\n if (this.query.options.has(\"count\") && data.length === 1) {\n // data here is the shape of { count: number }[] and will map to nothing. \n // Return the original data and let count take care of this\n return data as TShape;\n }\n\n const response = [];\n\n for (let i = 0, length = data.length; i < length; i++) {\n\n for (let j = 0, l = option.value.fields.length; j < l; j++) {\n const field = option.value.fields[j];\n\n if (field.property != null) {\n const value = field.property.getValue(data[i]);\n\n if (value != null) {\n field.property.setValue(data[i], field.property.deserialize(value));\n }\n }\n }\n\n response.push(option.value.selector(data[i]));\n }\n\n return response as TShape;\n }\n}","export * from './DataTranslator';\nexport * from './JsonTranslator';\nexport * from './SqlTranslator';","import { PartialResultType, PluginEventPartialResultType, PluginEventResultType, ResultType } from \"./types\";\n\nabstract class BaseResult {\n static ERROR = \"error\" as const;\n static SUCCESS = \"success\" as const;\n static PARTIAL = \"partial\" as const;\n\n static resolve<T>(result: ResultType<T> | PartialResultType<T>, resolve: (data: T) => void, reject: (error?: any) => void) {\n if (result.ok === BaseResult.SUCCESS) {\n resolve(result.data);\n return;\n }\n\n if (result.ok === BaseResult.PARTIAL) {\n reject({\n partial: result.data,\n error: result.error\n });\n return;\n }\n\n reject(result.error);\n }\n\n static assertSuccess<T>(result: any): asserts result is { ok: \"success\"; data: T } {\n if (result.ok !== BaseResult.SUCCESS) {\n throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);\n }\n }\n}\n\nexport class Result extends BaseResult {\n static success<T>(data: T): ResultType<T>;\n static success<T>(): ResultType<never>;\n static success<T>(data?: T): ResultType<T> {\n return {\n ok: Result.SUCCESS,\n data\n }\n }\n\n static error<T>(error: any): ResultType<T> {\n return {\n ok: Result.ERROR,\n error\n }\n }\n\n static partial<T>(data: T, error: any): PartialResultType<T> {\n return {\n ok: Result.PARTIAL,\n data,\n error\n }\n }\n}\n\nexport class PluginEventResult extends BaseResult {\n static success<T>(id: string, data: T): PluginEventResultType<T>;\n static success<T>(id: string): PluginEventResultType<never>;\n static success<T>(id: string, data?: T): PluginEventResultType<T> {\n return {\n id,\n ok: Result.SUCCESS,\n data\n }\n }\n\n static error<T>(id: string, error: any): PluginEventResultType<T> {\n return {\n id,\n ok: Result.ERROR,\n error\n }\n }\n\n static partial<T>(id: string, data: T, error: any): PluginEventPartialResultType<T> {\n return {\n id,\n ok: Result.PARTIAL,\n data,\n error\n }\n }\n\n static assertSuccess<T>(result: PluginEventResultType<T>): asserts result is { ok: \"success\"; data: T; id: string } {\n if (result.ok !== Result.SUCCESS) {\n throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);\n }\n }\n}\n","export * from './Result';\nexport * from './types';\nexport * from './utils';","import { Result } from \"./Result\";\nimport { CallbackResult } from \"./types\";\n\nexport function toPromise<T>(fn: (callback: CallbackResult<T>) => void) {\n return new Promise<T>((resolve, reject) => {\n fn((r) => {\n if (r.ok === Result.ERROR) {\n reject(r.error);\n return;\n }\n\n resolve(r.data);\n });\n });\n}\n","import { SchemaBase } from './property/base/SchemaBase';\nimport { SchemaArray } from './property/types/SchemaArray';\nimport { DefaultValue, FunctionBody, PropertyDeserializer, PropertySerializer, SchemaTypes } from './types';\n\n/**\n * Represents metadata and utilities for a property in a schema, including its type, name, parent, children, and serialization details.\n */\nexport class PropertyInfo<T extends {}> {\n\n get id() {\n if (this._idCache) {\n return this._idCache;\n }\n this._idCache = this.getPathArray().join(\".\");\n return this._idCache;\n }\n\n /** The name of the property. */\n readonly name: string;\n /** The name of the property we need to map from. */\n readonly from: string | null = null;\n /** The schema type of the property. */\n readonly type: SchemaTypes;\n\n /** Whether the property can be null. */\n readonly isNullable: boolean;\n /** Whether the property is optional. */\n readonly isOptional: boolean;\n /** Whether the property is a key. */\n readonly isKey: boolean;\n /** Whether the property is an identity property. */\n readonly isIdentity: boolean;\n /** Whether the property is readonly. */\n readonly isReadonly: boolean;\n /** Whether the property is unmapped. */\n readonly isUnmapped: boolean;\n /** Whether the property is distinct. */\n readonly isDistinct: boolean;\n /** Indexes associated with the property. */\n readonly indexes: string[];\n\n /** Any injected value for the property. */\n readonly injected: any | null = null;\n /** The default value for the property, if any. */\n readonly defaultValue: DefaultValue<any> | null = null;\n /** Serializer for the property value, if any. */\n readonly valueSerializer: PropertySerializer<T> | null = null;\n /** Deserializer for the property value, if any. */\n readonly valueDeserializer: PropertyDeserializer<T> | null = null;\n /** Function body for computed properties, if any. */\n readonly functionBody: FunctionBody<any, T> | null;\n /** Child properties of this property. */\n readonly children: PropertyInfo<T>[] = [];\n /** The schema this property belongs to. */\n readonly schema: SchemaBase<T, any>;\n /** The inner schema if this property is an array. */\n readonly innerSchema?: SchemaBase<unknown, any>;\n /** Literal values allowed for this property. */\n readonly literals: T[];\n\n /** The parent property, if any. */\n readonly parent?: PropertyInfo<T>;\n\n // Cached computed values for performance\n private _propertyChainCache?: PropertyInfo<T>[];\n private _pathArrayCache?: string[];\n private _parentPathArrayCache?: string[];\n private _idCache?: string;\n private _levelCache?: number;\n private _hasNullableParentsCache?: boolean;\n\n constructor(schema: SchemaBase<T, any>, name: string, parent?: PropertyInfo<T> | null) {\n this.schema = schema;\n this.name = name;\n this.type = schema.type;\n this.literals = schema.literals;\n\n if (schema instanceof SchemaArray) {\n this.innerSchema = schema.innerSchema;\n }\n\n this.isNullable = schema.isNullable;\n this.isOptional = schema.isOptional;\n this.isKey = schema.isKey;\n this.isIdentity = schema.isIdentity;\n this.isReadonly = schema.isReadonly;\n this.isUnmapped = schema.isUnmapped;\n this.injected = schema.injected;\n this.isDistinct = schema.isDistict;\n this.indexes = schema.indexes;\n this.from = schema.fromPropertyName;\n\n this.defaultValue = schema.defaultValue;\n this.valueSerializer = schema.valueSerializer;\n this.valueDeserializer = schema.valueDeserializer;\n this.functionBody = schema.functionBody;\n\n this.parent = parent;\n }\n\n /**\n * Returns the depth (level) of this property in the property tree.\n *\n * The root property has a level of 0. Each child property increases the level by 1.\n * Traverses up the parent chain, incrementing the level for each parent until the root is reached.\n * \n * @returns {number} The number of parent properties above this property (0 for root).\n */\n get level() {\n if (this._levelCache !== undefined) {\n return this._levelCache;\n }\n\n let level = 0;\n let current: PropertyInfo<T> | undefined = this;\n\n while (current) {\n if (current.parent == null) {\n this._levelCache = level;\n return level;\n }\n\n current = current.parent;\n level++;\n }\n\n this._levelCache = level;\n return level;\n }\n\n private _getPropertyChain(): PropertyInfo<T>[] {\n if (this._propertyChainCache) {\n return this._propertyChainCache;\n }\n\n const chain: PropertyInfo<T>[] = [];\n let current: PropertyInfo<T> | undefined = this;\n\n while (current) {\n chain.unshift(current);\n current = current.parent;\n }\n\n this._propertyChainCache = chain;\n return chain;\n }\n\n private _needsOptionalChaining(prop: PropertyInfo<T>, assignmentType?: AssignmentType): boolean {\n if (assignmentType === \"ASSIGNMENT\") {\n return false;\n }\n\n return assignmentType === \"FORCE_NULLABLE_OR_OPTIONAL\" || prop.isNullable || prop.isOptional;\n }\n\n private _resolvePathArray(options?: {\n root?: string,\n assignmentType?: AssignmentType\n useFromPropertyName?: boolean\n }) {\n const propertyChain = this._getPropertyChain();\n const hasRoot = options?.root != null;\n const path: string[] = hasRoot ? [options!.root!] : [];\n\n for (const prop of propertyChain) {\n const accessor = this._needsOptionalChaining(prop, options?.assignmentType) ? '?.' : '.';\n path.push(accessor, options?.useFromPropertyName ? prop.from : prop.name);\n }\n\n return path;\n }\n\n /**\n * Returns an array of property names representing the path from the root to this property.\n *\n * @returns {string[]} The property path as an array of names.\n */\n getPathArray() {\n if (this._pathArrayCache) {\n return this._pathArrayCache;\n }\n\n const path: string[] = [];\n const propertyChain = this._getPropertyChain();\n\n for (const prop of propertyChain) {\n path.push(prop.name);\n }\n\n this._pathArrayCache = path;\n return path;\n }\n\n /**\n * Returns an array of property names representing the path from the root to the parent of this property.\n *\n * @returns {string[]} The property path as an array of names, excluding this property.\n */\n getParentPathArray() {\n if (this._parentPathArrayCache) {\n return this._parentPathArrayCache;\n }\n\n const path: string[] = [];\n const propertyChain = this._getPropertyChain();\n\n for (let i = 0; i < propertyChain.length - 1; i++) {\n const prop = propertyChain[i];\n path.push(prop.name);\n }\n\n this._parentPathArrayCache = path;\n return path;\n }\n\n /**\n * Returns true if any parent property is nullable or optional.\n *\n * @returns {boolean} True if any parent is nullable or optional, false otherwise.\n */\n get hasNullableParents() {\n if (this._hasNullableParentsCache !== undefined) {\n return this._hasNullableParentsCache;\n }\n\n let parent = this.parent;\n while (parent != null) {\n if (parent.isNullable || parent.isOptional) {\n this._hasNullableParentsCache = true;\n return true;\n }\n parent = parent.parent;\n }\n\n this._hasNullableParentsCache = false;\n return false;\n }\n\n /**\n * Returns true if any child property (recursively) is an identity property.\n *\n * @returns {boolean} True if any child is an identity property, false otherwise.\n */\n get hasIdentityChildren() {\n const children = [...this.children];\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (child.isIdentity === true) {\n return true;\n }\n if (child.children.length > 0) {\n children.push(...child.children)\n }\n }\n return false;\n }\n\n /**\n * Gets the value of this property from the given instance, following the property path.\n *\n * @param instance The object instance to retrieve the value from.\n * @returns The value of the property, or null if not found.\n */\n getValue(instance: unknown) {\n if (instance == null) {\n return null;\n }\n const pathArray = this.getPathArray();\n let current: any = instance;\n for (const prop of pathArray) {\n if (current == null) {\n return null;\n }\n current = current[prop];\n }\n return current;\n }\n\n /**\n * Sets the value of this property on the given instance, creating intermediate objects as needed.\n *\n * @param instance The object instance to set the value on.\n * @param value The value to set.\n */\n setValue(instance: unknown, value: unknown) {\n if (instance == null) {\n throw new Error('Cannot set value on null or undefined instance');\n }\n const pathArray = this.getPathArray();\n const length = pathArray.length;\n // Fast path for single level properties\n if (length === 1) {\n (instance as any)[pathArray[0]] = value;\n return;\n }\n let current: any = instance;\n let i = 0;\n // Navigate to the parent of the target property\n while (i < length - 1) {\n const prop = pathArray[i];\n const next = current[prop];\n // Only create new object if next level doesn't exist\n if (next == null) {\n current[prop] = {};\n }\n current = current[prop];\n i++;\n }\n // Set the value on the final property\n current[pathArray[length - 1]] = value;\n }\n\n /**\n * Returns a selector path string for this property, starting from the given parent variable name.\n *\n * @param options.parent The root variable name.\n * @param options.assignmentType Optional assignment type for path resolution.\n * @returns {string} The selector path string (e.g., 'parent.prop1.prop2').\n */\n getSelectrorPath(options: { parent: string, assignmentType?: AssignmentType, useFromPropertyName?: boolean }) {\n const parts = this._resolvePathArray({\n root: options.parent,\n assignmentType: options.assignmentType,\n useFromPropertyName: options.useFromPropertyName\n });\n return parts.join(\"\");\n }\n\n /**\n * Returns an assignment path string for this property, optionally starting from a parent variable name.\n *\n * @param options.parent Optional root variable name.\n * @returns {string} The assignment path string (e.g., 'prop1.prop2').\n */\n getAssignmentPath(options?: { parent?: string, useFromPropertyName?: boolean }) {\n const parts = this._resolvePathArray({\n root: options?.parent,\n assignmentType: \"ASSIGNMENT\",\n useFromPropertyName: options?.useFromPropertyName\n });\n\n if (options?.parent == null) {\n return parts.slice(1).join(\"\");\n }\n\n return parts.join(\"\");\n }\n\n deserialize(value: string | number) {\n if (this.valueDeserializer != null) {\n return this.valueDeserializer(value);\n }\n\n if (this.type === SchemaTypes.Date) {\n return new Date(value);\n }\n\n if (this.type === SchemaTypes.String) {\n return String(value);\n }\n\n if (this.type === SchemaTypes.Number) {\n return Number(value);\n }\n\n if (this.type === SchemaTypes.Boolean) {\n return Boolean(value);\n }\n\n throw new Error(`Unsupported deserialization for type. Type: ${this.type}`);\n }\n}\n\ntype AssignmentType = \"FORCE_NULLABLE_OR_OPTIONAL\" | \"ASSIGNMENT\";","import { SchemaFunction } from './table/SchemaFunction';\nimport { SchemaComputed } from './table/SchemaComputed';\nimport { SchemaBase } from \"./property/base/SchemaBase\";\nimport { PropertyInfo } from './PropertyInfo';\nimport { CodeBuilder } from '../codegen';\nimport { EnrichmentHandlerBuilder } from '../codegen/handlers/EnrichmentHandlerBuilder';\nimport { MergeHandlerBuilder } from '../codegen/handlers/MergeHandlerBuilder';\nimport { PrepareHandlerBuilder } from '../codegen/handlers/PrepareHandlerBuilder';\nimport { StripHandlerBuilder } from '../codegen/handlers/StripHandlerBuilder';\nimport { CloneHandlerBuilder } from '../codegen/handlers/CloneHandlerBuilder';\nimport { CompareHandlerBuilder } from '../codegen/handlers/CompareHandlerBuilder';\nimport { DeserializeHandlerBuilder } from '../codegen/handlers/DeserializeHandlerBuilder';\nimport { HashTypeHandlerBuilder } from '../codegen/handlers/HashTypeHandlerBuilder';\nimport { IdSelectorHandlerBuilder } from '../codegen/handlers/IdSelectorHandlerBuilder';\nimport { HashHandlerBuilder } from '../codegen/handlers/HashHandlerBuilder';\nimport { EnableChangeTrackingHandlerBuilder } from '../codegen/handlers/EnableChangeTrackingHandlerBuilder';\nimport { FreezeHandlerBuilder } from '../codegen/handlers/FreezeHandlerBuilder';\nimport { SchemaError } from '../errors/SchemaError';\nimport { SerializeHandlerBuilder } from \"../codegen/handlers/SerializeHandlerBuilder\";\nimport { hash } from \"../utilities\";\nimport { CompiledSchema, GetHashTypeFunction, HashFunction, HashType, IdType, Index, InferCreateType, InferType, SchemaTypes } from './types';\nimport { DeepPartial } from '../types';\nimport { SchemaSubscription } from './communication/broadcast';\n\nexport class SchemaDefinition<T extends {}> extends SchemaBase<T, any> {\n\n instance: T;\n type = SchemaTypes.Definition;\n collectionName: string;\n\n constructor(collectionName: string, schema: T) {\n super();\n this.collectionName = collectionName;\n this.instance = schema;\n this.isNullable = false;\n this.isOptional = false;\n }\n\n modify<R>(builder: (d: {\n function: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: string, injected: I) => UU, injected?: I) => SchemaFunction<UU, I, \"unmapped\">;\n computed: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: string, injected: I) => UU, injected?: I) => SchemaComputed<UU, I, \"unmapped\">;\n }) => R) {\n\n const b = {\n function: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: string, injected?: I) => UU, injected?: I) => new SchemaFunction<UU, I, \"unmapped\">(fn as any, injected),\n computed: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: string, injected?: I) => UU, injected?: I) => new SchemaComputed<UU, I, \"unmapped\">(fn as any, injected)\n }\n\n const r = builder(b)\n\n return new SchemaDefinition<R & T>(this.collectionName, { ...this.instance, ...r });\n }\n\n private _iterate(\n instance: SchemaBase<any, any>,\n callback: (property: PropertyInfo<any>) => void\n ) {\n const explore: {\n path: string | null;\n instance:\n | SchemaBase<any, any>\n | { [key: string]: SchemaBase<any, any> };\n parents: {\n schema: { [key: string]: SchemaBase<any, any> };\n propertyInfo: PropertyInfo<any>;\n }[];\n propertyInfo: PropertyInfo<any> | null;\n }[] = [\n { path: null, instance, parents: [], propertyInfo: null }\n ];\n const properties: PropertyInfo<any>[] = [];\n\n for (let i = 0; i < explore.length; i++) {\n const item = explore[i];\n\n if (item.instance.type === SchemaTypes.Definition) {\n explore.push({\n path: null,\n instance: item.instance.instance,\n parents: [],\n propertyInfo: null\n });\n continue;\n }\n\n const instanceObj = item.instance as {\n [key: string]: SchemaBase<any, any>;\n };\n for (const key in instanceObj) {\n const propertyInstance = instanceObj[key] as SchemaBase<any, any>;\n const previousParent =\n item.parents.length === 0\n ? null\n : item.parents[item.parents.length - 1].propertyInfo;\n\n if (propertyInstance.type === SchemaTypes.Object) {\n const propertyInfo = new PropertyInfo<any>(\n propertyInstance,\n key,\n previousParent\n );\n explore.push({\n path: [item.path, key].filter((w) => w != null).join(\".\"),\n instance: propertyInstance.instance,\n parents: [\n ...item.parents,\n { schema: instanceObj, propertyInfo: propertyInfo }\n ],\n propertyInfo\n });\n\n if (previousParent === null) {\n properties.push(propertyInfo);\n continue;\n }\n\n previousParent.children.push(propertyInfo);\n continue;\n }\n\n const childPrimitivePropertyInfo = new PropertyInfo<any>(\n (item.instance as any)[key],\n key,\n previousParent\n );\n if (previousParent === null) {\n properties.push(childPrimitivePropertyInfo);\n continue;\n }\n\n previousParent.children.push(childPrimitivePropertyInfo);\n }\n }\n\n // Recursively trigger callbacks on properties and their children\n function recursiveCallback(prop: PropertyInfo<any>) {\n callback(prop);\n for (const child of prop.children) {\n recursiveCallback(child);\n }\n }\n\n for (const prop of properties) {\n recursiveCallback(prop);\n }\n }\n\n private createChangeTracker() {\n\n const DIRTY_ENTITY_MARKER: string = \"isDirty\";\n const CHANGES_ENTITY_KEY: string = \"changes\";\n const ORIGINAL_ENTITY_KEY: string = \"original\";\n const PAUSED_ENTITY_KEY: string = \"isPaused\";\n const TRACKING_KEY: string = \"__tracking__\";\n const PROXY_MARKER: string = \"__isProxy__\";\n\n return <TEntity extends {}>(entity: TEntity, path?: string, parent?: TEntity) => {\n\n const proxyHandler: ProxyHandler<TEntity> = {\n set: (entity, property, value) => {\n const indexableEntity: { [key: string]: any } = entity;\n const key = String(property);\n const originalValue = indexableEntity[key];\n\n // if values are the same, do nothing\n if (originalValue === value) {\n return true;\n }\n\n const resolvedParent: { [key: string]: any } = parent ?? entity;\n\n if (resolvedParent[TRACKING_KEY] == null) {\n resolvedParent[TRACKING_KEY] = {\n [CHANGES_ENTITY_KEY]: {},\n [DIRTY_ENTITY_MARKER]: false,\n [ORIGINAL_ENTITY_KEY]: {},\n [PAUSED_ENTITY_KEY]: false\n }\n }\n\n if (key == TRACKING_KEY) {\n return true;\n }\n\n if (resolvedParent[TRACKING_KEY] != null && resolvedParent[TRACKING_KEY][PAUSED_ENTITY_KEY] === true) {\n Reflect.set(indexableEntity, property, value);\n return true;\n }\n\n const resolvedPath = path == null ? key : `${path}.${key}`;\n const changes = resolvedParent[TRACKING_KEY];\n\n if (changes[CHANGES_ENTITY_KEY][resolvedPath] != null) {\n\n if (changes[ORIGINAL_ENTITY_KEY][resolvedPath] === value) {\n // we are changing the value back to the original value, remove the change\n delete changes[ORIGINAL_ENTITY_KEY][resolvedPath];\n delete changes[CHANGES_ENTITY_KEY][resolvedPath];\n } else {\n // track the change\n changes[CHANGES_ENTITY_KEY][resolvedPath] = value;\n }\n\n } else if (changes[CHANGES_ENTITY_KEY][resolvedPath] == null) {\n // don't keep updating, keep the original value\n changes[CHANGES_ENTITY_KEY][resolvedPath] = value;\n changes[ORIGINAL_ENTITY_KEY][resolvedPath] = originalValue;\n }\n\n const isDirty = Object.keys(changes[ORIGINAL_ENTITY_KEY]).length > 0;\n changes[DIRTY_ENTITY_MARKER] = isDirty;\n\n Reflect.set(indexableEntity, property, value);\n\n return true;\n },\n get: (target, property, receiver) => {\n\n if (property === PROXY_MARKER) {\n return true;\n }\n\n return Reflect.get(target, property, receiver);\n }\n }\n\n return new Proxy(entity, proxyHandler) as TEntity\n }\n }\n\n compile(): CompiledSchema<T> {\n\n try {\n const schema = this;\n const properties: PropertyInfo<T>[] = [];\n const propertyMap: Map<string, PropertyInfo<T>> = new Map<string, PropertyInfo<T>>();\n\n const enrichmentHandlerBuilder = new EnrichmentHandlerBuilder();\n const mergeHandlerFactory = new MergeHandlerBuilder();\n const prepareHandlerBuilder = new PrepareHandlerBuilder();\n const stripHandlerBuilder = new StripHandlerBuilder();\n const cloneHandlerBuilder = new CloneHandlerBuilder();\n const compareHandlerBuilder = new CompareHandlerBuilder();\n const deserializeHandlerBuilder = new DeserializeHandlerBuilder();\n const hashTypeHandlerBuilder = new HashTypeHandlerBuilder();\n const idSelectorHandlerBuilder = new IdSelectorHandlerBuilder();\n const hashHandlerBuilder = new HashHandlerBuilder();\n const enableChangeTrackingHandlerBuilder = new EnableChangeTrackingHandlerBuilder();\n const freezeHandlerBuilder = new FreezeHandlerBuilder();\n const serializeHandlerBuilder = new SerializeHandlerBuilder();\n\n const enricher = enrichmentHandlerBuilder.build();\n const merge = mergeHandlerFactory.build();\n const prepare = prepareHandlerBuilder.build();\n const strip = stripHandlerBuilder.build();\n const clone = cloneHandlerBuilder.build();\n const compare = compareHandlerBuilder.build();\n const deserialize = deserializeHandlerBuilder.build();\n const hashTypeHandler = hashTypeHandlerBuilder.build();\n const idSelectorHandler = idSelectorHandlerBuilder.build();\n const hashHandler = hashHandlerBuilder.build();\n const enableChangeTrackingHandler = enableChangeTrackingHandlerBuilder.build();\n const freezeHandler = freezeHandlerBuilder.build();\n const serializeHandler = serializeHandlerBuilder.build();\n\n const changeTrackingCodeBuilder = new CodeBuilder();\n changeTrackingCodeBuilder.raw(`function ${this.createChangeTracker.toString()}`);\n changeTrackingCodeBuilder.slot(\"declarations\").variable(\"enableChangeTracking\").value('createChangeTracker()');\n changeTrackingCodeBuilder.slot(\"assignment\");\n changeTrackingCodeBuilder.slot(\"return\").raw('\\treturn enableChangeTracking(entity);');\n\n const freezeCodeBuilder = new CodeBuilder();\n freezeCodeBuilder.slot(\"assignment\");\n freezeCodeBuilder.slot(\"return\").raw('\\treturn Object.freeze(entity);');\n\n const enricherCodeBuilder = new CodeBuilder();\n const enricherFunctionRoot = enricherCodeBuilder.factory(\"factory\", { name: \"factory\" }).parameters({ name: \"collectionName\", value: this.collectionName });\n const enricherFunctionBody = enricherFunctionRoot.function(undefined, { name: \"function\" }).parameters(\"entity\", \"changeTrackingType\").return();\n\n enricherFunctionBody.raw(`function ${this.createChangeTracker.toString()}`);\n enricherFunctionBody.variable(\"enableChangeTracking\").value('changeTrackingType === \"proxy\" ? createChangeTracker() : e => e');\n\n enricherFunctionBody.slot(\"enriched\");\n enricherFunctionBody.slot(\"declarations\");\n enricherFunctionBody.slot(\"assignment\");\n enricherFunctionBody.slot(\"ifs\");\n enricherFunctionBody.slot(\"tracking\").if('changeTrackingType === \"immutable\"', { name: \"freeze\" });\n enricherFunctionBody.raw('\\treturn enableChangeTracking(enriched);');\n\n const mergeCodeBuilder = new CodeBuilder();\n\n const mergeFunctionRoot = mergeCodeBuilder.factory(\"factory\", { name: \"factory\" }).parameters({ name: \"collectionName\", value: this.collectionName });\n const mergeFunctionBody = mergeFunctionRoot.function(undefined, { name: \"function\" }).parameters(\"destination\", \"source\").return();\n\n const pauseFunctionBody = mergeFunctionBody.function(\"pause\")\n .appendBody(\"// initiate change tracking if needed\");\n\n pauseFunctionBody.if(\"destination.__tracking__ == null\")\n .appendBody(\"destination.__tracking__ = {};\");\n\n pauseFunctionBody.appendBody(\"destination.__tracking__.isPaused = true;\");\n\n mergeFunctionBody.function(\"unpause\")\n .appendBody(\"// unpause change tracking if needed\")\n .if(\"destination.__tracking__ != null\")\n .appendBody(\"destination.__tracking__.isPaused = false;\");\n\n mergeFunctionBody.slot(\"header\").raw(`pause()`);\n mergeFunctionBody.slot(\"assignments\");\n mergeFunctionBody.slot(\"ifs\");\n mergeFunctionBody.slot(\"return\").raw(`\n unpause();\n\n return destination;`);\n\n const prepareCodeBuilder = new CodeBuilder();\n prepareCodeBuilder.slot(\"result\");\n prepareCodeBuilder.slot(\"assignments\");\n prepareCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const stripCodeBuilder = new CodeBuilder();\n stripCodeBuilder.slot(\"result\");\n stripCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const cloneCodeBuilder = new CodeBuilder();\n cloneCodeBuilder.slot(\"result\").raw(\"const result = {};\");;\n cloneCodeBuilder.slot(\"assignments\");\n cloneCodeBuilder.slot(\"if\");\n cloneCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const compareCodeBuilder = new CodeBuilder();\n compareCodeBuilder.slot(\"result\");\n compareCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const deserializeCodeBuilder = new CodeBuilder();\n deserializeCodeBuilder.slot(\"functions\");\n deserializeCodeBuilder.slot(\"result\");\n deserializeCodeBuilder.slot(\"if\");\n deserializeCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const serializeCodeBuilder = new CodeBuilder();\n serializeCodeBuilder.slot(\"result\").raw(\"const result = {};\");\n serializeCodeBuilder.slot(\"assignments\");\n serializeCodeBuilder.slot(\"functions\");\n serializeCodeBuilder.slot(\"if\");\n serializeCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const idSelectorCodeBuilder = new CodeBuilder();\n idSelectorCodeBuilder.slot(\"result\");\n idSelectorCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const hashTypeCodeBuilder = new CodeBuilder();\n hashTypeCodeBuilder.slot(\"ifs\");\n hashTypeCodeBuilder.slot(\"return\").raw(` return \"Ids\";`);\n\n const hashCodeBuilder = new CodeBuilder();\n hashCodeBuilder.slot(\"functions\").raw(`\n function stringifyDate(d) {\n\n if (d == null) {\n return \"\";\n }\n\n if (typeof d === \"string\") {\n return d;\n }\n\n if (d.toISOString != null) {\n return d.toISOString();\n }\n\n return d.toString();\n } \n`);\n const hashCodeBuilderIfBlock = hashCodeBuilder.if(`type === \"Ids\"`, { name: \"hash-id-if\" });\n hashCodeBuilderIfBlock.slot(\"if-body\");\n hashCodeBuilderIfBlock.appendBody(\"return result\");\n hashCodeBuilder.slot(\"hash-object-return\");\n hashCodeBuilder.raw(` return result;`)\n\n const idProperties: PropertyInfo<any>[] = [];\n const allPropertyNamesAndPaths: string[] = [];\n let hashType: HashType = HashType.Ids;\n let hasIdentities = false;\n let hasIdentityKeys = false;\n\n this._iterate(schema, (property) => {\n\n properties.push(property);\n propertyMap.set(property.id, property);\n allPropertyNamesAndPaths.push(property.getSelectrorPath({ parent: \"entity\" }));\n\n if (property.isIdentity === true) {\n hasIdentities = true;\n }\n\n if (property.isKey === true) {\n idProperties.push(property);\n }\n\n if (property.isKey === true && property.isIdentity === true) {\n hasIdentityKeys = true;\n }\n\n enricher.handle(property, enricherCodeBuilder);\n merge.handle(property, mergeCodeBuilder);\n prepare.handle(property, prepareCodeBuilder);\n strip.handle(property, stripCodeBuilder);\n clone.handle(property, cloneCodeBuilder);\n compare.handle(property, compareCodeBuilder);\n deserialize.handle(property, deserializeCodeBuilder);\n serializeHandler.handle(property, serializeCodeBuilder)\n hashTypeHandler.handle(property, hashTypeCodeBuilder);\n idSelectorHandler.handle(property, idSelectorCodeBuilder);\n hashHandler.handle(property, hashCodeBuilder);\n enableChangeTrackingHandler.handle(property, changeTrackingCodeBuilder);\n freezeHandler.handle(property, freezeCodeBuilder);\n });\n\n if (idProperties.length === 0) {\n throw new Error(`Schema must have a key. Use .key() to mark a property as a key. Collection Name: ${this.collectionName}`)\n }\n\n const enrichParams = enricherFunctionRoot.getParameters()\n const mergeParams = mergeFunctionRoot.getParameters()\n const enrichGenerator = Function(`return ${enricherCodeBuilder.toString()}`);\n const mergeGenerator = Function(`return ${mergeCodeBuilder.toString()}`);\n\n const getIdsFunction = Function(\"entity\", idSelectorCodeBuilder.toString()) as (entity: InferType<T>) => [IdType];\n const getHashTypeFunction = Function(\"entity\", hashTypeCodeBuilder.toString()) as GetHashTypeFunction<T>;\n const prepareFunction = Function(\"entity\", prepareCodeBuilder.toString()) as (entity: InferCreateType<T>) => InferCreateType<T>;\n const cloneFunction = Function(\"entity\", cloneCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const deserializeFunction = Function(\"entity\", deserializeCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const serializeFunction = Function(\"entity\", serializeCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const compareFunction = Function(\"a\", \"b\", compareCodeBuilder.toString()) as (a: InferType<T>, fromDb: InferType<T>) => boolean;;\n const stripFunction = Function(\"entity\", stripCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const hashFunction = Function(\"entity\", \"type\", hashCodeBuilder.toString()) as HashFunction<T>;\n const enableChangeTrackingFunction = Function(\"entity\", changeTrackingCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const freezeFunction = Function(\"entity\", freezeCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n\n const enricherFactoryFunction = enrichGenerator();\n const mergeFactoryFunction = mergeGenerator();\n const enricherFunction = enricherFactoryFunction(...enrichParams.map(w => w.value));\n const mergeFunction = mergeFactoryFunction(...mergeParams.map(w => w.value));\n\n const idPropertyNames = idProperties.map(w => w.name);\n const getId = (entity: InferType<T>) => {\n if (idPropertyNames.length > 1) {\n return hashFunction(entity, HashType.Ids) as IdType;\n }\n\n return getIdsFunction(entity as any)[0] as IdType;\n }\n\n const getProperty = (id: string) => propertyMap.get(id);\n const id = hash([...allPropertyNamesAndPaths, this.collectionName].join(\",\"));\n\n // memoize this by the validProperties\n // TODO: See if we can generate a function to do this and eliminate loops\n const deserializePartial = (item: Record<string, unknown>, properties: PropertyInfo<T>[]) => {\n\n for (let i = 0, length = properties.length; i < length; i++) {\n const property = properties[i];\n const value = property.getValue(item);\n\n if (value == null) {\n continue;\n }\n\n const deserialized = property.deserialize(value);\n property.setValue(item, deserialized);\n }\n\n return item as DeepPartial<InferType<T>>;\n }\n\n return {\n createSubscription: (signal?: AbortSignal) => new SchemaSubscription(id, signal),\n getId,\n getProperty,\n properties,\n idProperties,\n hasIdentities,\n hashType,\n getHashType: getHashTypeFunction,\n merge: mergeFunction,\n prepare: prepareFunction,\n clone: cloneFunction,\n deserializePartial,\n deserialize: deserializeFunction,\n serialize: serializeFunction,\n compare: compareFunction,\n strip: stripFunction,\n hash: hashFunction,\n id,\n getIds: getIdsFunction,\n enrich: enricherFunction,\n collectionName: this.collectionName,\n hasIdentityKeys,\n freeze: freezeFunction,\n enableChangeTracking: enableChangeTrackingFunction,\n definition: this,\n getIndexes: () => {\n\n const indexes: Index[] = [];\n\n for (let i = 0, length = properties.length; i < length; i++) {\n const property = properties[i];\n\n if (property.indexes.length === 0) {\n continue; // No Index\n }\n\n for (let j = 0, l = property.indexes.length; j < l; j++) {\n const indexName = property.indexes[j];\n\n // Test for compound indexes\n const connections = properties.filter(w =>\n w !== property && // Don't match with self\n w.indexes.some(index => index === indexName)\n );\n\n const indexedProperties = [property, ...connections];\n\n if (indexedProperties.length === 1) {\n // Not a compound property\n if (indexedProperties[0].isKey) {\n indexes.push({\n properties: indexedProperties,\n type: \"primary-key\",\n name: indexName\n });\n continue;\n }\n\n if (indexedProperties[0].isDistinct) {\n indexes.push({\n properties: indexedProperties,\n type: \"unique\",\n name: indexName\n });\n continue;\n }\n\n indexes.push({\n properties: indexedProperties,\n type: \"single\",\n name: indexName\n });\n continue;\n }\n\n if (indexes.some(w => w.name === indexName)) {\n continue; // Already in a compound index\n }\n\n indexes.push({\n properties: indexedProperties,\n type: \"compound\",\n name: indexName\n });\n }\n }\n\n return indexes;\n }\n }\n } catch (e) {\n throw new SchemaError(e, `Error compiling schema for collection: ${this.collectionName}`);\n }\n }\n}\n","import { SchemaArray } from \"./property/types/SchemaArray\";\nimport { SchemaBase } from \"./property/base/SchemaBase\";\nimport { SchemaBoolean } from \"./property/types/SchemaBoolean\";\nimport { SchemaDate } from \"./property/types/SchemaDate\";\nimport { SchemaDefinition } from \"./SchemaDefinition\";\nimport { SchemaNumber } from \"./property/types/SchemaNumber\";\nimport { SchemaObject } from \"./property/types/SchemaObject\";\nimport { SchemaString } from \"./property/types/SchemaString\";\n\nexport const s = {\n number: <T extends number[] = number[]>(...literals: T) => new SchemaNumber<T[number] extends never ? number : T[number], never>(null, literals),\n string: <T extends string[] = string[]>(...literals: T) => new SchemaString<T[number] extends never ? string : T[number], never>(null, literals),\n boolean: <T extends boolean = boolean>() => new SchemaBoolean<T, never>(),\n date: <T extends Date = Date>() => new SchemaDate<T, never>(),\n array: <T extends any>(schema: SchemaBase<T, never>) => new SchemaArray<SchemaBase<T, never>, never>(schema as any),\n object: <T extends {} = {}>(schema: T) => new SchemaObject<T, never>(schema),\n define: <T extends {}>(collectionName: string, schema: T) => new SchemaDefinition<T>(collectionName, schema)\n}","import { now } from \"../../performance\";\nimport { Tagged, uuid } from \"../../utilities\";\nimport { ISchemaSubscription, SchemaId, SubscriptionChanges } from \"../types\";\n\ntype BroadcastChannelReceiverId = Tagged<string, \"BroadcastChannelReceiverId\">;\ntype SubscriptionListenerCallback<T> = (changes: StampedChanges<T>) => void;\ninterface ISubscriptionAction<T> {\n action(changes: StampedChanges<T>): void\n}\ntype StampedChanges<T> = { data: SubscriptionChanges<T>, timestamp: number };\n\nconst registry: Record<SchemaId, SchemaChannel<unknown>> = {};\n\nconst getChannelRegistry = <T>(schemaId: SchemaId): SchemaChannel<T> => {\n\n if (registry[schemaId]) {\n return registry[schemaId] as SchemaChannel<T>;\n }\n\n const channel = new SchemaChannel<T>(schemaId);\n\n registry[schemaId] = channel;\n\n return channel;\n}\n\n// Must have a sender and receiver. Sender cannot listen for it's own message\nclass SchemaChannel<T> {\n\n readonly sender: SchemaChannelSender<T>;\n readonly receiver: SchemaChannelReceiver<T>;\n\n constructor(schemaId: SchemaId) {\n this.sender = new SchemaChannelSender<T>(schemaId);\n this.receiver = new SchemaChannelReceiver<T>(schemaId);\n }\n}\n\nclass SchemaChannelSender<T> {\n\n private readonly broadcastChannel: BroadcastChannel;\n\n constructor(schemaId: SchemaId) {\n this.broadcastChannel = new BroadcastChannel(`__routier-schema-subscription-channel:${schemaId}`);\n }\n\n send(changes: StampedChanges<T>) {\n this.broadcastChannel.postMessage(changes)\n }\n}\n\nclass SchemaChannelReceiver<T> {\n\n private readonly broadcastChannel: BroadcastChannel;\n private subscriptions: SubscriptionListener<T>[] = [];\n\n constructor(schemaId: SchemaId) {\n this.broadcastChannel = new BroadcastChannel(`__routier-schema-subscription-channel:${schemaId}`);\n\n this.broadcastChannel.onmessage = (e) => {\n\n // We can't send to the same instance it is not possbile\n const stampedChanges = e.data as StampedChanges<T>;\n\n for (let i = 0, length = this.subscriptions.length; i < length; i++) {\n const subscription = this.subscriptions[i];\n\n subscription.action(stampedChanges);\n }\n };\n }\n\n addListener(id: BroadcastChannelReceiverId, listener: SubscriptionListenerCallback<T>) {\n this.subscriptions.push(new SubscriptionListener<T>(id, listener));\n }\n\n removeListeners(id: BroadcastChannelReceiverId) {\n this.subscriptions = this.subscriptions.filter(w => w.id !== id);\n }\n}\n\nclass SubscriptionListener<T> implements ISubscriptionAction<T> {\n\n readonly id: BroadcastChannelReceiverId;\n private readonly listener: SubscriptionListenerCallback<T>;\n\n constructor(id: BroadcastChannelReceiverId, listener: SubscriptionListenerCallback<T>) {\n this.id = id;\n this.listener = listener;\n }\n\n action(changes: StampedChanges<T>) {\n this.listener(changes);\n }\n}\n\nexport class SchemaSubscription<T extends {}> implements ISchemaSubscription<T> {\n\n private readonly id: BroadcastChannelReceiverId;\n private readonly schemaId: SchemaId;\n private readonly createdAt: number;\n\n constructor(schemaId: SchemaId, signal?: AbortSignal) {\n this.createdAt = now();\n this.id = uuid(8) as BroadcastChannelReceiverId;\n this.schemaId = schemaId;\n\n signal?.addEventListener(\"abort\", () => {\n this.dispose();\n }, { once: true });\n }\n\n send(changes: SubscriptionChanges<T>) {\n const regisry = getChannelRegistry<T>(this.schemaId);\n\n // Send message to all listeners.\n // Since we create a new listener when we do onMessage,\n // we don't need to worry about sending to ourselves, it \n // can't happen\n regisry.sender.send({\n data: changes,\n timestamp: now()\n });\n }\n\n onMessage(callback: (changes: SubscriptionChanges<T>) => void) {\n\n const regisry = getChannelRegistry<T>(this.schemaId);\n\n // Link the callback to an instance\n regisry.receiver.addListener(this.id, ({ data, timestamp }) => {\n\n if (timestamp < this.createdAt) {\n // Sent before the receiver was even created\n return;\n }\n\n callback(data);\n });\n }\n\n dispose() {\n this[Symbol.dispose]();\n }\n\n [Symbol.dispose](): void {\n const regisry = getChannelRegistry<T>(this.schemaId);\n\n // Remove listeners for this instance only\n regisry.receiver.removeListeners(this.id);\n }\n}","export * from './builder';\nexport * from './table';\nexport * from './property/base';\nexport * from './property/modifiers';\nexport * from './property/types';\nexport * from './PropertyInfo';\nexport * from './types';","import { DefaultValue, FunctionBody, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\n\nexport abstract class SchemaBase<T extends any, TModifiers extends SchemaModifiers> {\n\n abstract instance: T;\n modifiers: TModifiers;\n\n isNullable: boolean = false;\n isUnmapped: boolean = false;\n isOptional: boolean = false;\n isKey: boolean = false;\n isIdentity: boolean = false;\n isReadonly: boolean = false;\n isDistict: boolean = false;\n indexes: string[] = [];\n fromPropertyName: string | null = null;\n\n injected: any = null;\n defaultValue: DefaultValue<T> | null = null;\n valueSerializer: PropertySerializer<T> | null = null;\n valueDeserializer: PropertyDeserializer<T> | null = null;\n type: SchemaTypes;\n functionBody: FunctionBody<any, T> | null;\n private _schemaBase = true;\n readonly literals: T[] = [];\n\n constructor(entity?: SchemaBase<T, TModifiers>, literals?: T[]) {\n\n if (entity != null) {\n this.valueSerializer = entity.valueSerializer;\n this.valueDeserializer = entity.valueDeserializer;\n this.functionBody = entity.functionBody;\n this.isNullable = entity.isNullable;\n this.isOptional = entity.isOptional;\n this.isKey = entity.isKey;\n this.isIdentity = entity.isIdentity;\n this.isReadonly = entity.isReadonly;\n this.defaultValue = entity.defaultValue;\n this.type = entity.type;\n this.injected = entity.injected;\n this.indexes = entity.indexes;\n this.fromPropertyName = entity.fromPropertyName;\n }\n\n if (literals) {\n this.literals = literals;\n }\n }\n}","export * from './SchemaBase';","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\nimport { SchemaFrom } from \"./SchemaFrom\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaDefault<T extends any, I, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaDefault = true;\n\n constructor(defaultValue: DefaultValue<T, I>, injected: I, current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.injected = injected;\n this.defaultValue = defaultValue;\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaFrom } from \"./SchemaFrom\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaDeserialize<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaDeserialize = true;\n\n constructor(deserializer: PropertyDeserializer<T>, current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.valueDeserializer = deserializer;\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\n\nexport class SchemaDistinct<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaDistinct = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isDistict = true;\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"./SchemaDefault\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\nimport { SchemaDistinct } from \"./SchemaDistinct\";\nimport { SchemaIdentity } from \"./SchemaIdentity\";\nimport { SchemaNullable } from \"./SchemaNullable\";\nimport { SchemaOptional } from \"./SchemaOptional\";\nimport { SchemaReadonly } from \"./SchemaReadonly\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaFrom<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaFrom = true;\n\n constructor(propertyName: string, current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.fromPropertyName = propertyName;\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\" | \"readonly\">(this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n}","import { SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\n\nexport class SchemaIdentity<T, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaIdentity = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isIdentity = true;\n }\n}","import { uuidv4 } from \"../../../utilities\";\nimport { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"./SchemaDefault\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\nimport { SchemaDistinct } from \"./SchemaDistinct\";\nimport { SchemaFrom } from \"./SchemaFrom\";\nimport { SchemaNullable } from \"./SchemaNullable\";\nimport { SchemaOptional } from \"./SchemaOptional\";\nimport { SchemaReadonly } from \"./SchemaReadonly\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaIndex<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaIndex = true;\n\n constructor(current: SchemaBase<T, TModifiers>, ...indexes: string[]) {\n super(current);\n this.instance = current.instance;\n\n if (indexes.length === 0) {\n indexes.push(uuidv4()); // Create our own unique index identifier\n }\n\n this.indexes = indexes;\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaIdentity } from \"./SchemaIdentity\";\nimport { SchemaDefault } from \"./SchemaDefault\";\nimport { DefaultValue, IdType, SchemaModifiers } from \"../../types\";\nimport { SchemaFrom } from \"./SchemaFrom\";\n\nexport class SchemaKey<T extends IdType, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaKey = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isKey = true;\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaOptional } from \"./SchemaOptional\";\n\nexport class SchemaNullable<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaNullable = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isNullable = true;\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n}","import { SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaNullable } from \"./SchemaNullable\";\n\nexport class SchemaOptional<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaOptional = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isOptional = true;\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"./SchemaDefault\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\nimport { SchemaFrom } from \"./SchemaFrom\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaReadonly<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaReadonly = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isReadonly = true;\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n deserializer(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serializer(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"deserialize\">(serializer, this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\n\nexport class SchemaSerialize<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaSerialize = true;\n\n constructor(serializer: PropertySerializer<T>, current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.valueSerializer = serializer;\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n}","import { SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\n\nexport class SchemaTracked<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaTracked = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isUnmapped = false;\n }\n}","export * from './SchemaDefault';\nexport * from './SchemaDeserialize';\nexport * from './SchemaDistinct';\nexport * from './SchemaIdentity';\nexport * from './SchemaIndex';\nexport * from './SchemaKey';\nexport * from './SchemaNullable';\nexport * from './SchemaOptional';\nexport * from './SchemaReadonly';\nexport * from './SchemaSerialize';\nexport * from './SchemaTracked';\nexport * from './SchemaFrom';","import { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaDeserialize } from '../modifiers/SchemaDeserialize';\nimport { SchemaSerialize } from '../modifiers/SchemaSerialize';\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\n\nexport class SchemaArray<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T[], TModifiers> {\n\n instance: T[];\n type = SchemaTypes.Array;\n private _schemaArray = true;\n readonly innerSchema?: SchemaBase<any, any>; // we need to know the type of the array, that is what this is for\n\n constructor(entity?: SchemaBase<T[], TModifiers>, literals?: T[][]) {\n super(entity, literals);\n this.innerSchema = entity;\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T[], TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T[], TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T[], TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T[], I>, injected?: I) {\n return new SchemaDefault<T[], I, TModifiers | \"default\">(value, injected, this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T[]>) {\n return new SchemaDeserialize<T[], TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T[]>) {\n return new SchemaSerialize<T[], TModifiers | \"serialize\">(serializer, this);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T[], TModifiers>(this as any, ...indexes);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaDeserialize } from \"../modifiers/SchemaDeserialize\";\nimport { SchemaDistinct } from \"../modifiers/SchemaDistinct\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaReadonly } from \"../modifiers/SchemaReadonly\";\nimport { SchemaSerialize } from \"../modifiers/SchemaSerialize\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaBoolean<T extends boolean, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.Boolean;\n private _schemaBoolean = true;\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T, TModifiers>(this as any, ...indexes);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaDeserialize } from \"../modifiers/SchemaDeserialize\";\nimport { SchemaDistinct } from \"../modifiers/SchemaDistinct\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaReadonly } from \"../modifiers/SchemaReadonly\";\nimport { SchemaSerialize } from \"../modifiers/SchemaSerialize\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaDate<T extends Date, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.Date;\n private _schemaDate = true;\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T, TModifiers>(this as any, ...indexes);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaDeserialize } from \"../modifiers/SchemaDeserialize\";\nimport { SchemaDistinct } from \"../modifiers/SchemaDistinct\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIdentity } from \"../modifiers/SchemaIdentity\";\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { SchemaKey } from \"../modifiers/SchemaKey\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaReadonly } from \"../modifiers/SchemaReadonly\";\nimport { SchemaSerialize } from \"../modifiers/SchemaSerialize\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaNumber<T extends number, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.Number;\n private _schemaNumber = true;\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n key() {\n return new SchemaKey<T, TModifiers | \"key\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\" | \"readonly\">(this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T, TModifiers>(this as any, ...indexes);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n}","import { DefaultValue, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIdentity } from \"../modifiers/SchemaIdentity\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaObject<T extends {}, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.Object;\n private _schemaObject = true;\n\n constructor(schema: T) {\n super();\n this.instance = schema;\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\" | \"readonly\">(this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaDeserialize } from \"../modifiers/SchemaDeserialize\";\nimport { SchemaDistinct } from \"../modifiers/SchemaDistinct\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIdentity } from \"../modifiers/SchemaIdentity\";\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { SchemaKey } from \"../modifiers/SchemaKey\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaReadonly } from \"../modifiers/SchemaReadonly\";\nimport { SchemaSerialize } from \"../modifiers/SchemaSerialize\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaString<T extends string, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.String;\n private _schemaString = true;\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n key() {\n return new SchemaKey<T, TModifiers | \"key\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\" | \"readonly\">(this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T, TModifiers>(this as any, ...indexes);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n}","export * from './SchemaArray';\nexport * from './SchemaBoolean';\nexport * from './SchemaDate';\nexport * from './SchemaNumber';\nexport * from './SchemaObject';\nexport * from './SchemaString';","import { SchemaBase } from \"../property/base/SchemaBase\";\nimport { SchemaTracked } from '../property/modifiers/SchemaTracked';\nimport { SchemaModifiers, SchemaTypes } from \"../types\";\n\nexport class SchemaComputed<T extends any, I, TModifiers extends SchemaModifiers = \"computed\"> extends SchemaBase<T, TModifiers> {\n instance: T;\n type = SchemaTypes.Computed;\n private _schemaComputed = true;\n\n constructor(fn: T, injected: I, current?: SchemaBase<T, TModifiers>) {\n super(current);\n this.injected = injected;\n this.isUnmapped = true;\n this.functionBody = fn as any;\n }\n\n tracked() {\n return new SchemaTracked<T, TModifiers>(this);\n }\n}","import { SchemaBase } from \"../property/base/SchemaBase\";\nimport { SchemaModifiers, SchemaTypes } from \"../types\";\n\nexport class SchemaFunction<T extends any, I, TModifiers extends SchemaModifiers = \"unmapped\"> extends SchemaBase<() => T, TModifiers> {\n instance: () => T;\n type = SchemaTypes.Function;\n private _schemaFunction = true;\n\n constructor(fn: (injected: I) => T, injected: I, current?: SchemaBase<() => T, TModifiers>) {\n super(current);\n this.injected = injected;\n this.isUnmapped = true;\n this.functionBody = fn as any;\n }\n}","export * from './SchemaComputed';\nexport * from './SchemaFunction';","import { SchemaDefinition } from \"./SchemaDefinition\";\nimport { SchemaBase } from \"./property/base/SchemaBase\";\nimport { SchemaArray } from \"./property/types/SchemaArray\";\nimport { SchemaObject } from \"./property/types/SchemaObject\";\nimport { PropertyInfo } from \"./PropertyInfo\";\nimport { DeepPartial } from \"../types\";\nimport { SchemaFunction } from \"./table\";\nimport { SchemaString } from \"./property/types\";\nimport { SchemaOptional } from \"./property/modifiers\";\n\nexport type DefaultValue<T, I = never> = T | ((injected: I) => T);\nexport type FunctionBody<TEntity, TResult> = (entity: TEntity, collectionName: string) => TResult;\nexport type IdType = string | number;\n\nexport enum SchemaTypes {\n Array = \"Array\",\n Boolean = \"Boolean\",\n Date = \"Date\",\n Number = \"Number\",\n Object = \"Object\",\n String = \"String\",\n Definition = \"Definition\",\n Function = \"Function\",\n Computed = \"Computed\"\n}\n\nexport type ArrayShape = string | number | Date | {};\n\nexport type ExpandedProperty = ExpandedChildProperty & {\n assignmentPath: string;\n selectorPath: string;\n properties: Map<string, ExpandedChildProperty>;\n childDegree: number;\n};\n\nexport type ExpandedChildProperty = {\n propertyName: string;\n type: SchemaTypes;\n isNullableOrOptional: boolean;\n isReadonly: boolean;\n isIdentity: boolean;\n isUnmapped: boolean;\n}\n\nexport enum HashType {\n Ids = \"Ids\",\n Object = \"Object\"\n}\n\nexport type HashFunction<TEntity extends {}> = {\n (entity: InferCreateType<TEntity>, type: HashType.Object): string;\n (entity: InferType<TEntity>, type: HashType.Ids): string;\n}\n\nexport type GetHashTypeFunction<TEntity extends {}> = {\n (entity: InferCreateType<TEntity>): HashType.Object;\n (entity: InferType<TEntity>): HashType.Ids;\n}\n\nexport type ChangeTrackingType = \"proxy\" | \"diff\" | \"immutable\";\n\nexport type IndexType = \"single\" | \"compound\" | \"unique\" | \"primary-key\"\nexport type Index = {\n properties: PropertyInfo<any>[],\n type: IndexType;\n name: string;\n}\n\n/**\n * Represents changes to subscriptions, categorizing them by modifications to\n * entities (additions, updates, removals) or query-driven removals.\n * @template T - The type of the entities in the subscription.\n */\nexport type SubscriptionChanges<T extends {}> = {\n /**\n * Entities that have been added to the subscription.\n */\n adds: InferType<T>[];\n /**\n * Entities that have been updated within the subscription.\n */\n updates: InferType<T>[];\n /**\n * Entities that have been removed from the subscription.\n */\n removals: InferType<T>[];\n /**\n * Entities that have been added/updated/removed from the subscription and it is unknown \n * if the entities have been added/updated/removed.\n */\n unknown: InferType<T>[];\n}\n\nexport interface ISchemaSubscription<T extends {}> extends Disposable {\n send(changes: SubscriptionChanges<T>): void;\n onMessage(callback: (changes: SubscriptionChanges<T>) => void): void;\n}\n\ntype Enrich<TEntity extends {}> = {\n (entity: InferType<TEntity>, changeTrackingType: ChangeTrackingType): InferType<TEntity>;\n (entity: InferCreateType<TEntity>, changeTrackingType: ChangeTrackingType): InferCreateType<TEntity>;\n}\n\n/**\n * Represents a fully compiled schema with all utilities and metadata for an entity type.\n */\nexport type CompiledSchema<TEntity extends {}> = {\n\n deserializePartial: (item: Record<string, unknown>, properties: PropertyInfo<TEntity>[]) => DeepPartial<InferType<TEntity>>;\n\n createSubscription: (abortSignal?: AbortSignal) => ISchemaSubscription<TEntity>;\n /** Returns the property info for a given id (full path) */\n getProperty: (id: string) => PropertyInfo<TEntity>;\n /** Returns the ID of the given entity. */\n getId: (entity: InferType<TEntity>) => IdType;\n /** Returns a deep clone of the given entity. */\n clone: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** Removes unmapped or extraneous properties from the entity. */\n strip: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** Prepares a new entity for creation, applying defaults and transformations. */\n prepare: (entity: InferCreateType<TEntity>) => InferCreateType<TEntity>;\n /** Merges the source entity into the destination entity. */\n merge: (destination: InferType<TEntity> | InferCreateType<TEntity>, source: InferType<TEntity>) => InferType<TEntity>;\n /** Indicates if the schema has identity properties. */\n hasIdentities: boolean;\n /** List of properties that are identity keys. */\n idProperties: PropertyInfo<TEntity>[];\n /** All property metadata for the schema. */\n properties: PropertyInfo<TEntity>[],\n /** The hash type used for this schema. */\n hashType: HashType;\n /** Computes a hash for the given entity. */\n hash: HashFunction<TEntity>;\n /** Returns the hash type for the given entity. */\n getHashType: GetHashTypeFunction<TEntity>;\n /** Compares two entities for equality. */\n compare: (a: InferType<TEntity>, fromDb: InferType<TEntity>) => boolean;\n /** Deserializes an entity from storage format. */\n deserialize: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** Serializes an entity to storage format. */\n serialize: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** Unique id for the schema. */\n id: SchemaId,\n /** The name of the collection for this schema. */\n collectionName: string;\n /** Returns all IDs for the given entity (usually a single-element tuple). */\n getIds: (entity: InferType<TEntity>) => [IdType];\n /** Enriches the entity with change tracking or other metadata. */\n enrich: Enrich<TEntity>;\n /** Indicates if the schema has identity keys. */\n hasIdentityKeys: boolean;\n /** Returns a deeply frozen (immutable) version of the entity. */\n freeze: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** Enables change tracking on the entity. */\n enableChangeTracking: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** The schema definition object. */\n definition: SchemaDefinition<TEntity>;\n /** Returns all indexes defined for this schema. */\n getIndexes: () => Index[];\n}\n\nexport type PropertySerializer<T extends any> = (value: T) => string | number;\nexport type PropertyDeserializer<T extends any> = (value: string | number) => T;\n\nexport type SchemaId = number\n\nexport type SchemaModifiers = \"default\" | \"deserialize\" |\n \"identity\" | \"key\" |\n \"nullable\" | \"optional\" |\n \"readonly\" | \"serialize\" |\n \"unmapped\" | \"computed\" |\n \"distinct\";\n\ntype InferPrimitive<T> =\n T extends SchemaOptional<infer C, infer __> ? C extends (string | number | Date) ? C : { [K in keyof C]: InferPrimitive<C[K]> } :\n T extends SchemaArray<infer Y, infer __> ? InferPrimitive<Y>[]\n : T extends SchemaObject<infer Obj, infer _> ?\n { [K in keyof Obj]: InferPrimitive<Obj[K]> } : // Process nested objects\n T extends SchemaFunction<infer F, infer __> ? F : T extends SchemaBase<infer X, infer _> ?\n X extends Array<infer A> ? InferPrimitive<A>[] : X : // Extract the primitive type\n never;\n\nexport type InferType<T> = T extends CompiledSchema<infer R> ? InferCompiledSchema<R> : T extends {} ? InferCompiledSchema<T> : T;\nexport type InferCreateType<T> = T extends CompiledSchema<infer R> ? InferCompiledCreateSchema<R> : T extends {} ? InferCompiledCreateSchema<T> : unknown;\nexport type InferMappedType<T> = T extends SchemaBase<infer K, infer __> ? InferType<K> : InferCompiledSchema<T>;\n\ntype HasModifier<T, K extends keyof T, M extends SchemaModifiers> =\n T[K] extends SchemaBase<any, infer Mods> ?\n M extends Mods ? true : false :\n false;\n\ntype IsPlainProperty<T, K extends keyof T> =\n [\n HasModifier<T, K, \"readonly\">,\n HasModifier<T, K, \"optional\">,\n HasModifier<T, K, \"nullable\">\n ] extends [\n false,\n false,\n false\n ] ? true : false;\n\ntype IsPlainCreateProperty<T, K extends keyof T> =\n [\n HasModifier<T, K, \"identity\">,\n HasModifier<T, K, \"default\">,\n HasModifier<T, K, \"computed\">,\n HasModifier<T, K, \"unmapped\">,\n HasModifier<T, K, \"optional\">,\n HasModifier<T, K, \"nullable\">\n ] extends [\n false,\n false,\n false,\n false,\n false,\n false\n ] ? true : false;\n\ntype InferCompiledSchema<T> = CoalesceEmpty<{\n [K in keyof T as IsPlainProperty<T, K> extends true ? K : never]: InferPrimitive<T[K]>\n}, {\n readonly [K in keyof T as HasModifier<T, K, \"readonly\"> extends true ? K : never]: InferPrimitive<T[K]>\n }, {\n [K in keyof T as HasModifier<T, K, \"optional\"> extends true ? K : never]?: InferPrimitive<T[K]>\n }, {\n [K in keyof T as HasModifier<T, K, \"nullable\"> extends true ? K : never]: null | InferPrimitive<T[K]>\n }>;\n\ntype InferCompiledCreateSchema<T> = CoalesceEmpty<{\n [K in keyof T as IsPlainCreateProperty<T, K> extends true ? K : never]: InferPrimitive<T[K]>\n}, {\n [K in keyof T as HasModifier<T, K, \"optional\"> extends true ? K : never]?: InferPrimitive<T[K]>\n }, {\n [K in keyof T as HasModifier<T, K, \"default\"> extends true ? K : never]?: InferPrimitive<T[K]>\n }, {\n [K in keyof T as HasModifier<T, K, \"nullable\"> extends true ? K : never]: null | InferPrimitive<T[K]>\n }>;\n\ntype IsEmptyObject<T> = keyof T extends never ? true : false;\ntype 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);\n","export const toMap = <T extends {}>(data: T[], keySelector: (item: T) => T[keyof T] | string) => {\n\n const result = new Map<T[keyof T] | string, T>();\n\n for (let i = 0; i < data.length; i++) {\n const item = data[i];\n const key = keySelector(item);\n result.set(key, item);\n }\n\n return result;\n}\n","export const isDate = (data: unknown): data is Date => {\n if (data == null) {\n return false;\n }\n\n if (typeof data !== \"object\") {\n return false;\n }\n\n return data instanceof Date;\n}","import { InferCreateType, InferType, SchemaId } from \"../schema\";\nimport { DbPluginBulkPersistEvent, EntityUpdateInfo } from \"../plugins\";\n\ntype DbEvent = {\n type: \"add\",\n data: InferCreateType<unknown>;\n} | {\n type: \"update\",\n data: EntityUpdateInfo<unknown>;\n} | {\n type: \"remove\",\n data: InferType<unknown>;\n}\n\nexport const toEventArray = (event: DbPluginBulkPersistEvent): [SchemaId, DbEvent][] => {\n\n const result: [SchemaId, DbEvent][] = [];\n for (const [schemaId, changes] of event.operation) {\n\n if (changes.hasItems === false) {\n continue;\n }\n\n if (changes.adds.length > 0) {\n result.push(...changes.adds.map(add => {\n return [schemaId as SchemaId, { data: { ...add }, type: \"add\" }] as [SchemaId, DbEvent];\n }));\n }\n\n if (changes.updates.length > 0) {\n result.push(...changes.updates.map(update => {\n return [schemaId as SchemaId, { data: { ...update }, type: \"update\" }] as [SchemaId, DbEvent];\n }));\n }\n\n if (changes.removes.length > 0) {\n result.push(...changes.removes.map(remove => {\n return [schemaId as SchemaId, { data: { ...remove }, type: \"remove\" }] as [SchemaId, DbEvent];\n }));\n }\n }\n\n return result\n}","export const noop = (...args: any[]) => { };","export * from './arrays';\nexport * from './strings';\nexport * from './dates';\nexport * from './objects';\nexport * from './runtime';\nexport * from './uuid';\nexport * from './replication';\nexport * from './types';\nexport * from './queryOptionsCollection';\nexport * from './dbPluginEventUtils';\nexport * from './functions';","export const cast = <TIn, TOut>(item: TIn) => {\n return item as unknown as TOut;\n}\n\nexport function clone<T extends {}>(data: T): T {\n return JSON.parse(JSON.stringify(data)) as T;\n}","import { QueryOptionsCollection } from \"../plugins/query\";\n\nexport const combineQueryOptionsCollections = <T>(...collections: QueryOptionsCollection<T>[]) => {\n const result = new QueryOptionsCollection<T>();\n\n for (let i = 0, length = collections.length; i < length; i++) {\n const collection = collections[i];\n\n // Add scoped items first\n collection.forEach(item => {\n result.add(item.name, item.value);\n });\n }\n\n return result;\n}","import { BulkPersistResult, BulkPersistChanges } from \"../collections\";\nimport { DbPluginBulkPersistEvent } from \"../plugins\";\n\nexport const resolveBulkPersistChanges = (event: DbPluginBulkPersistEvent, result: BulkPersistResult, bulkPersistChanges: BulkPersistChanges) => {\n // make sure we swap the adds here, that way we can make sure other persist events\n // don't take their additions and try to change subsequent calls\n for (const [schemaId, changes] of event.operation) {\n\n const schemmaBulkPersistResult = result.get(schemaId);\n const schemaBulkPersistChanges = bulkPersistChanges.resolve(schemaId);\n\n // Set the original removes\n schemaBulkPersistChanges.removes = changes.removes;\n\n // Set the original updates\n schemaBulkPersistChanges.updates = changes.updates;\n\n // Take the adds from the result and set them to be persisted\n // in the replicated plugins because the id's are set in the \n // memory data store\n schemaBulkPersistChanges.adds = schemmaBulkPersistResult.adds;\n }\n}","export const isNodeRuntime = () => typeof process !== 'undefined' &&\n process.versions != null &&\n process.versions.node != null;","export const hash = (value: string, seed: number = 0) => {\n // From Stack Overflow\n // https://stackoverflow.com/a/52171480/3329760\n let h1 = 0xdeadbeef ^ seed, h2 = 0x41c6ce57 ^ seed;\n\n for (let i = 0, ch: number; i < value.length; i++) {\n ch = value.charCodeAt(i);\n h1 = Math.imul(h1 ^ ch, 2654435761);\n h2 = Math.imul(h2 ^ ch, 1597334677);\n }\n\n h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507);\n h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909);\n h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507);\n h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909);\n\n return 4294967296 * (2097151 & h2) + (h1 >>> 0);\n}","export const uuid = (length: number = 16): string => {\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const charLength = chars.length;\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += chars[Math.random() * charLength | 0];\n }\n return result;\n}\n\nconst HEX_CHARS = '0123456789abcdef';\nconst UUID_TEMPLATE = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n\nconst hasCrypto =\n typeof crypto !== 'undefined' && typeof crypto.getRandomValues === 'function';\n\nexport const uuidv4 = (): string => {\n let randomBytes: Uint8Array | null = null;\n if (hasCrypto) {\n randomBytes = crypto.getRandomValues(new Uint8Array(16));\n }\n\n let byteIndex = 0;\n let uuid = '';\n\n for (let i = 0; i < UUID_TEMPLATE.length; i++) {\n const c = UUID_TEMPLATE[i];\n if (c === '-') {\n uuid += '-';\n continue;\n }\n\n let r: number;\n if (hasCrypto && randomBytes) {\n // Each byte gives two hex digits (nibbles)\n r =\n (i % 2 === 0\n ? randomBytes[byteIndex] >> 4\n : randomBytes[byteIndex++] & 0x0f);\n } else {\n r = Math.floor(Math.random() * 16);\n }\n\n if (c === 'x') {\n uuid += HEX_CHARS[r];\n } else if (c === 'y') {\n // Variant bits: 8, 9, A, or B\n uuid += HEX_CHARS[(r & 0x3) | 0x8];\n } else if (c === '4') {\n uuid += '4';\n }\n }\n\n return uuid;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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 * from './assertions';\nexport * from './codegen';\nexport * from './collections';\nexport * from './errors';\nexport * from './expressions';\nexport * from './performance';\nexport * from './pipeline';\nexport * from './plugins';\nexport * from './results';\nexport * from './schema';\nexport * from './types';\nexport * from './utilities';\nexport * from './capabilities';"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAsC;AAE/B,SAAS,UAAU,CAAC,IAAa;IACpC,IAAI,kDAAM,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;QACzB,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAC;IAC/C,CAAC;AACL,CAAC;AAEM,SAAS,eAAe,CAAI,IAA0B,EAAE,OAAiC;IAC5F,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACf,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,OAAO,E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QACvC,CAAC;aAAM,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;YACnB,IAAI,IAAI,GAAG,CAAC;QAChB,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvDF;AACA;AACA;AACA,kDAAkD,wCAAwC;AAC1F;AACA;AACA;;;;ACNA;;;;ACAA;AACA;AACA;AACA,uDAAuD,iBAAiB;AACxE;AACA,gDAAgD,aAAa;AAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN6B;AACH;AACI;AACL;AACK;AACA;AACH;AACD;AACA;AACD;AACD;AACI;AACG"}
1
+ {"version":3,"file":"index.js","sources":["webpack://@routier/core/./src/assertions/index.ts","webpack://@routier/core/./src/capabilities/Capability.ts","webpack://@routier/core/./src/capabilities/PerformanceCapability.ts","webpack://@routier/core/./src/capabilities/TracingCapability.ts","webpack://@routier/core/./src/capabilities/index.ts","webpack://@routier/core/./src/capabilities/performance/PerformanceTracker.ts","webpack://@routier/core/./src/capabilities/tracing/CallTraceManager.ts","webpack://@routier/core/./src/codegen/SlotPath.ts","webpack://@routier/core/./src/codegen/blocks.ts","webpack://@routier/core/./src/codegen/handlers/CloneHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/CompareHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/CompareIdsHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/DeserializeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/EnableChangeTrackingHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/EnrichmentHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/FreezeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/HashHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/HashTypeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/IdSelectorHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/MergeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/PrepareHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/SerializeHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/StripHandlerBuilder.ts","webpack://@routier/core/./src/codegen/handlers/clone/CloneArrayHandler.ts","webpack://@routier/core/./src/codegen/handlers/clone/CloneObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/clone/CloneValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/compare/CompareArrayHandler.ts","webpack://@routier/core/./src/codegen/handlers/compare/CompareDateHandler.ts","webpack://@routier/core/./src/codegen/handlers/compare/CompareObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/compare/CompareValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/compareIds/CompareIdsKeyHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeDateHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeDeserializerHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/deserialize/DeserializeValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/enableChangeTracking/EnableChangeTrackingObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/enableChangeTracking/EnableChangeTrackingPrimitiveValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentDefaultFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentDefaultValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentNullableObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentObjectIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentPrimitiveHandler.ts","webpack://@routier/core/./src/codegen/handlers/enrichment/EnrichmentPrimitiveIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/freeze/FreezeObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/freeze/FreezePrimitiveValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashDateHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashKeyHandler.ts","webpack://@routier/core/./src/codegen/handlers/hash/HashValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/hashType/HashTypeValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/idSelector/IdSelectorValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergeComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergeDefaultFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergeDefaultValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergeFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/merge/MergePrimitiveHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareComputedValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareKeyHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/prepare/PrepareValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/serialize/SerializeDateHandler.ts","webpack://@routier/core/./src/codegen/handlers/serialize/SerializeFunctionHandler.ts","webpack://@routier/core/./src/codegen/handlers/serialize/SerializeObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/serialize/SerializeSerializerHandler.ts","webpack://@routier/core/./src/codegen/handlers/serialize/SerializeValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/strip/StripIdentityHandler.ts","webpack://@routier/core/./src/codegen/handlers/strip/StripKeyHandler.ts","webpack://@routier/core/./src/codegen/handlers/strip/StripObjectHandler.ts","webpack://@routier/core/./src/codegen/handlers/strip/StripValueHandler.ts","webpack://@routier/core/./src/codegen/handlers/types.ts","webpack://@routier/core/./src/codegen/index.ts","webpack://@routier/core/./src/codegen/utils.ts","webpack://@routier/core/./src/collections/Changes.ts","webpack://@routier/core/./src/collections/IdSet.ts","webpack://@routier/core/./src/collections/MemoryDataCollection.ts","webpack://@routier/core/./src/collections/ReadonlySchemaCollection.ts","webpack://@routier/core/./src/collections/SchemaCollection.ts","webpack://@routier/core/./src/collections/TagCollection.ts","webpack://@routier/core/./src/collections/index.ts","webpack://@routier/core/./src/errors/SchemaError.ts","webpack://@routier/core/./src/errors/index.ts","webpack://@routier/core/./src/expressions/index.ts","webpack://@routier/core/./src/expressions/parser.ts","webpack://@routier/core/./src/expressions/types.ts","webpack://@routier/core/./src/expressions/utils.ts","webpack://@routier/core/./src/performance/index.ts","webpack://@routier/core/./src/pipeline/SyncronousQueue.ts","webpack://@routier/core/./src/pipeline/TrampolinePipeline.ts","webpack://@routier/core/./src/pipeline/index.ts","webpack://@routier/core/./src/plugins/EphemeralDataPlugin.ts","webpack://@routier/core/./src/plugins/index.ts","webpack://@routier/core/./src/plugins/query/Query.ts","webpack://@routier/core/./src/plugins/query/QueryOptionsCollection.ts","webpack://@routier/core/./src/plugins/query/index.ts","webpack://@routier/core/./src/plugins/query/types.ts","webpack://@routier/core/./src/plugins/replication/OptimisticReplicationDbPlugin.ts","webpack://@routier/core/./src/plugins/replication/ReplicationDbPlugin.ts","webpack://@routier/core/./src/plugins/replication/index.ts","webpack://@routier/core/./src/plugins/translators/DataTranslator.ts","webpack://@routier/core/./src/plugins/translators/JsonTranslator.ts","webpack://@routier/core/./src/plugins/translators/SqlTranslator.ts","webpack://@routier/core/./src/plugins/translators/TranslatedArrayValue.ts","webpack://@routier/core/./src/plugins/translators/TranslatedGroupValue.ts","webpack://@routier/core/./src/plugins/translators/TranslatedSingleValue.ts","webpack://@routier/core/./src/plugins/translators/index.ts","webpack://@routier/core/./src/results/Result.ts","webpack://@routier/core/./src/results/index.ts","webpack://@routier/core/./src/results/utils.ts","webpack://@routier/core/./src/schema/PropertyInfo.ts","webpack://@routier/core/./src/schema/SchemaDefinition.ts","webpack://@routier/core/./src/schema/builder.ts","webpack://@routier/core/./src/schema/communication/broadcast.ts","webpack://@routier/core/./src/schema/index.ts","webpack://@routier/core/./src/schema/property/base/SchemaBase.ts","webpack://@routier/core/./src/schema/property/base/index.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaDefault.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaDeserialize.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaDistinct.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaFrom.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaIdentity.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaIndex.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaKey.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaNullable.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaOptional.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaReadonly.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaSerialize.ts","webpack://@routier/core/./src/schema/property/modifiers/SchemaTracked.ts","webpack://@routier/core/./src/schema/property/modifiers/index.ts","webpack://@routier/core/./src/schema/property/types/SchemaArray.ts","webpack://@routier/core/./src/schema/property/types/SchemaBoolean.ts","webpack://@routier/core/./src/schema/property/types/SchemaDate.ts","webpack://@routier/core/./src/schema/property/types/SchemaNumber.ts","webpack://@routier/core/./src/schema/property/types/SchemaObject.ts","webpack://@routier/core/./src/schema/property/types/SchemaString.ts","webpack://@routier/core/./src/schema/property/types/index.ts","webpack://@routier/core/./src/schema/table/SchemaComputed.ts","webpack://@routier/core/./src/schema/table/SchemaFunction.ts","webpack://@routier/core/./src/schema/table/index.ts","webpack://@routier/core/./src/schema/types.ts","webpack://@routier/core/./src/utilities/arrays.ts","webpack://@routier/core/./src/utilities/dates.ts","webpack://@routier/core/./src/utilities/dbPluginEventUtils.ts","webpack://@routier/core/./src/utilities/functions.ts","webpack://@routier/core/./src/utilities/index.ts","webpack://@routier/core/./src/utilities/objects.ts","webpack://@routier/core/./src/utilities/queryOptionsCollection.ts","webpack://@routier/core/./src/utilities/replication.ts","webpack://@routier/core/./src/utilities/runtime.ts","webpack://@routier/core/./src/utilities/strings.ts","webpack://@routier/core/./src/utilities/uuid.ts","webpack://@routier/core/webpack/runtime/define_property_getters","webpack://@routier/core/webpack/runtime/has_own_property","webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/index.ts"],"sourcesContent":["import { isDate } from \"../utilities\";\n\nexport function assertDate(data: unknown): asserts data is Date {\n if (isDate(data) === false) {\n throw new TypeError('Value is not a Date');\n }\n}\n\nexport function assertIsNotNull<T>(data: T | null | undefined, message?: string | (() => string)): asserts data is NonNullable<T> {\n if (data == null) {\n if (message == null) {\n throw new TypeError('Assertion failed, data is null');\n }\n\n if (typeof message === \"string\") {\n throw new TypeError(message);\n }\n\n throw new TypeError(message());\n }\n}\n\nexport function assertIsArray<T>(data: unknown, message?: string): asserts data is T[] {\n if (!Array.isArray(data)) {\n throw new TypeError(message ?? 'Assertion failed, data is not of type Array');\n }\n}\n\nexport function assertString(data: unknown, message?: string): asserts data is string {\n if (typeof data !== \"string\") {\n throw new TypeError(message ?? 'Assertion failed, data is not of type String');\n }\n}\n\nexport function assertInstanceOf<T extends new (...args: any[]) => any>(value: unknown, Instance: T): asserts value is T {\n if (value instanceof Instance) {\n return;\n }\n\n if (value != null && typeof value === \"object\" && \"constructor\" in value) {\n throw new TypeError(`Value is not instance of type. Type: ${value.constructor.name}`);\n }\n\n throw new TypeError(`Value is not instance of type`);\n}","import { MethodInfo, MethodInfoMetadata } from \"./types\";\n\nexport abstract class Capability {\n\n protected excludedNames = new Set<string>([\n \"Array\",\n \"Set\",\n \"Map\",\n \"AbortController\",\n \"AbortSignal\",\n \"SchemaString\",\n \"SchemaNumber\",\n \"SchemaArray\",\n \"SchemaBoolean\",\n \"SchemaDate\",\n \"SchemaObject\",\n \"SchemaDefault\",\n \"SchemaDeserialize\",\n \"SchemaDistinct\",\n \"SchemaFrom\",\n \"SchemaIdentity\",\n \"SchemaIndex\",\n \"SchemaKey\",\n \"SchemaNullable\",\n \"SchemaOptional\",\n \"SchemaReadonly\",\n \"SchemaSerialize\",\n \"SchemaTracked\",\n \"SchemaComputed\",\n \"SchemaFunction\",\n \"SchemaBase\",\n \"SchemaDefinition\"\n ]);\n\n protected isValidObject(obj: unknown): obj is object {\n return typeof obj === \"object\" && obj !== null;\n }\n\n protected isCallableMethod(descriptor: PropertyDescriptor | undefined, key: string | symbol): boolean {\n return (\n descriptor?.value &&\n typeof descriptor.value === 'function' &&\n key !== 'constructor' &&\n key !== 'undefined'\n );\n }\n\n\n private canExplore(descriptor: PropertyDescriptor) {\n if (typeof descriptor.value !== \"object\") {\n return false;\n }\n\n if (descriptor.value == null) {\n return false\n }\n\n const name = this.getName(descriptor.value);\n\n if (name == null) {\n return true;\n }\n\n return this.excludedNames.has(name) === false\n }\n\n private getName(value: object) {\n if (value.constructor != null) {\n return value.constructor.name;\n }\n\n return null;\n }\n\n private getPath(info: MethodInfoMetadata, propertyName: string | symbol) {\n\n let parent = info.parent;\n const path = [info.propertyName, propertyName];\n\n while (parent != null) {\n\n path.unshift(parent.propertyName);\n parent = parent.parent;\n }\n\n return path.join(\".\");\n }\n\n protected explore(instance: unknown, onDiscover: (info: MethodInfoMetadata, methodInfo: MethodInfo) => void): void {\n if (!this.isValidObject(instance)) {\n return;\n }\n\n const explore: MethodInfoMetadata[] = [{ instance, propertyName: this.getName(instance) }];\n const visited = new Set<object>();\n\n for (let i = 0; i < explore.length; i++) {\n\n const info = explore[i];\n const item = info.instance;\n\n if (visited.has(item)) {\n continue;\n }\n\n const allKeys = [\n ...Object.getOwnPropertyNames(item),\n ...Object.getOwnPropertySymbols(item),\n ];\n\n for (const key of allKeys) {\n\n const descriptor = Object.getOwnPropertyDescriptor(item, key);\n\n const isCallable = this.isCallableMethod(descriptor, key);\n\n onDiscover(info, {\n name: key,\n isCallable\n });\n\n if (this.canExplore(descriptor) === false) {\n continue;\n }\n\n const path = this.getPath(info, key);\n explore.push({ instance: descriptor.value, parent: info, propertyName: key, path });\n }\n\n visited.add(item);\n }\n }\n\n abstract apply(instance: unknown): void;\n}","import { stringifyObject } from \"../utilities\";\nimport { Capability } from \"./Capability\";\nimport { PerformanceTracker } from \"./performance/PerformanceTracker\";\nimport { CallTraceManager } from \"./tracing/CallTraceManager\";\nimport { MethodInfoMetadata, MethodInfo } from \"./types\";\n\nexport type PerformanceCapabilityOptions = {\n filter: (methodName: string | symbol, methodInfo: MethodInfo, metadata: MethodInfoMetadata) => boolean\n}\n\nexport class PerformanceCapability extends Capability {\n\n private callTraceManager: CallTraceManager;\n private performanceTracker: PerformanceTracker;\n private filter: (methodName: string | symbol, methodInfo: MethodInfo, metadata: MethodInfoMetadata) => boolean;\n private childDurations: Map<string, number[]> = new Map();\n\n constructor(options?: PerformanceCapabilityOptions) {\n super();\n this.filter = options?.filter ?? (() => true)\n this.callTraceManager = new CallTraceManager();\n this.performanceTracker = new PerformanceTracker();\n }\n\n override apply(instance: unknown): void {\n\n this.explore(instance, (meta, info) => {\n\n if (info.isCallable) {\n const originalMethod = meta.instance[info.name].bind(meta.instance);\n\n meta.instance[info.name] = (...args: any[]) => {\n\n const path = `${meta.path!}.${String(info.name)}()`;\n\n if (this.filter(path, info, meta) === false) {\n return originalMethod(...args);\n }\n\n const isNewOperation = this.callTraceManager.isNewOperation();\n let operationId: string;\n let callTrace: string[];\n let depth: number;\n\n if (isNewOperation) {\n operationId = this.callTraceManager.startNewOperation();\n this.childDurations.set(operationId, []);\n callTrace = this.callTraceManager.addMethodToTrace(path);\n depth = callTrace.length - 1;\n const formattedCallTrace = this.callTraceManager.formatMethodPaths(callTrace);\n\n this.performanceTracker.startMethodTiming(operationId, path);\n\n console.log(`\\n${'═'.repeat(60)}`);\n console.log(`▶ ORIGIN [${operationId}] ${path}`);\n if (args.length > 0) {\n console.log(` Args:`, stringifyObject(args, 4, 0));\n }\n console.log(` Call Stack: ${formattedCallTrace.join(' → ')}`);\n } else {\n operationId = this.callTraceManager.getActiveOperationId();\n callTrace = this.callTraceManager.addMethodToTrace(path);\n depth = callTrace.length - 1;\n const indent = ' '.repeat(Math.min(depth, 4));\n\n // Track children for this child method too\n const childMethodKey = `${operationId}:${path}`;\n this.childDurations.set(childMethodKey, []);\n\n this.performanceTracker.startMethodTiming(operationId, path);\n\n console.log(`${indent}└─ CHILD [${operationId}] ${path}`);\n if (args.length > 0) {\n console.log(`${indent} Args:`, stringifyObject(args, 4, 0));\n }\n }\n\n try {\n return originalMethod(...args);\n } finally {\n const metrics = this.performanceTracker.endMethodTiming(operationId, path);\n const duration = metrics.duration ?? 0;\n const formattedDuration = this.performanceTracker.formatDuration(duration);\n\n if (isNewOperation) {\n const childDurations = this.childDurations.get(operationId) ?? [];\n const totalChildTime = childDurations.reduce((sum, d) => sum + d, 0);\n const formattedTotalChildTime = this.performanceTracker.formatDuration(totalChildTime);\n const overhead = duration - totalChildTime;\n const formattedOverhead = this.performanceTracker.formatDuration(Math.max(0, overhead));\n\n console.log(`\\n${'═'.repeat(60)}`);\n console.log(`◀ COMPLETE [${operationId}] ${path}`);\n console.log(` Total Duration: ${formattedDuration}`);\n if (childDurations.length > 0) {\n console.log(` Children Duration: ${formattedTotalChildTime} (${childDurations.length} calls)`);\n console.log(` Overhead: ${formattedOverhead}`);\n }\n console.log(`${'═'.repeat(60)}\\n`);\n\n this.childDurations.delete(operationId);\n this.performanceTracker.cleanupOperation(operationId);\n this.callTraceManager.endOperation();\n } else {\n const indent = ' '.repeat(Math.min(depth, 4));\n const childMethodKey = `${operationId}:${path}`;\n const childDurations = this.childDurations.get(childMethodKey) ?? [];\n const totalChildTime = childDurations.reduce((sum, d) => sum + d, 0);\n const formattedTotalChildTime = this.performanceTracker.formatDuration(totalChildTime);\n const overhead = duration - totalChildTime;\n const formattedOverhead = this.performanceTracker.formatDuration(Math.max(0, overhead));\n\n console.log(`${indent} ✓ ${formattedDuration}`);\n if (childDurations.length > 0) {\n console.log(`${indent} Children: ${formattedTotalChildTime} (${childDurations.length} calls), Overhead: ${formattedOverhead}`);\n }\n\n // Clean up child method tracking\n this.childDurations.delete(childMethodKey);\n\n // Find the parent method and add this duration to its children list\n // The parent is the method one level up in the call trace\n const currentTrace = this.callTraceManager.getCurrentTrace();\n if (currentTrace.length > 1) {\n // Parent is the second-to-last item in the trace (before we remove current)\n const parentPath = currentTrace[currentTrace.length - 2];\n\n // Check if parent is the root operation (trace length 2 means root + this child)\n if (currentTrace.length === 2) {\n // Direct child of root - add to root's children list\n const rootChildDurations = this.childDurations.get(operationId);\n if (rootChildDurations) {\n rootChildDurations.push(duration);\n }\n } else {\n // Nested child - add to parent method's children list\n const parentMethodKey = `${operationId}:${parentPath}`;\n const parentChildDurations = this.childDurations.get(parentMethodKey);\n if (parentChildDurations) {\n parentChildDurations.push(duration);\n }\n }\n }\n }\n\n this.callTraceManager.removeMethodFromTrace();\n }\n }\n }\n });\n }\n}","import { Capability } from \"./Capability\";\nimport { CallTraceManager } from \"./tracing/CallTraceManager\";\nimport { stringifyObject } from \"../utilities/strings\";\nimport { MethodInfo, MethodInfoMetadata } from \"./types\";\n\nexport type TracingCapabilityOptions = {\n filter: (methodName: string | symbol, methodInfo: MethodInfo, metadata: MethodInfoMetadata) => boolean\n}\n\nexport class TracingCapability extends Capability {\n\n private callTraceManager: CallTraceManager;\n private filter: (methodName: string | symbol, methodInfo: MethodInfo, metadata: MethodInfoMetadata) => boolean;\n\n constructor(options?: TracingCapabilityOptions) {\n super();\n this.filter = options?.filter ?? (() => true);\n this.callTraceManager = new CallTraceManager();\n }\n\n override apply(instance: unknown): void {\n\n this.explore(instance, (meta, info) => {\n\n if (info.isCallable) {\n\n const originalMethod = meta.instance[info.name].bind(meta.instance);\n\n meta.instance[info.name] = (...args: any[]) => {\n\n const path = `${meta.path!}.${String(info.name)}()`;\n\n if (this.filter(path, info, meta) === false) {\n return originalMethod(...args);\n }\n\n const isNewOperation = this.callTraceManager.isNewOperation();\n let operationId: string;\n\n if (isNewOperation) {\n operationId = this.callTraceManager.startNewOperation();\n const callTrace = this.callTraceManager.addMethodToTrace(path);\n const formattedCallTrace = this.callTraceManager.formatMethodPaths(callTrace);\n\n console.log(`\\n${'═'.repeat(60)}`);\n console.log(`▶ ORIGIN [${operationId}] ${path}`);\n if (args.length > 0) {\n console.log(` Args:`, stringifyObject(args, 4, 0));\n }\n console.log(` Call Stack: ${formattedCallTrace.join(' → ')}`);\n } else {\n operationId = this.callTraceManager.getActiveOperationId();\n const callTrace = this.callTraceManager.addMethodToTrace(path);\n\n const indent = ' '.repeat(Math.min(callTrace.length - 1, 4));\n console.log(`${indent}└─ CHILD [${operationId}] ${path}`);\n if (args.length > 0) {\n console.log(`${indent} Args:`, stringifyObject(args, 4, 0));\n }\n }\n\n try {\n return originalMethod(...args);\n } finally {\n this.callTraceManager.removeMethodFromTrace();\n\n if (isNewOperation) {\n this.callTraceManager.endOperation();\n }\n }\n }\n }\n\n });\n }\n}","export { Capability } from './Capability';\nexport { PerformanceCapability } from './PerformanceCapability';\nexport { TracingCapability } from './TracingCapability';\nexport * from './types';","import { PerformanceMetrics } from \"../types\";\n\nexport class PerformanceTracker {\n private methodTimings = new Map<string, { startTime: number; nextMethodStartTime?: number }>();\n private operationStartTimes = new Map<string, number>();\n\n startMethodTiming(operationId: string, methodPath: string): number {\n const startTime = performance.now();\n const key = `${operationId}:${methodPath}`;\n\n // Track operation start time for delta calculations\n if (!this.operationStartTimes.has(operationId)) {\n this.operationStartTimes.set(operationId, startTime);\n }\n\n this.methodTimings.set(key, { startTime });\n return startTime;\n }\n\n recordNextMethodStart(operationId: string, methodPath: string): void {\n const key = `${operationId}:${methodPath}`;\n const timing = this.methodTimings.get(key);\n if (timing) {\n timing.nextMethodStartTime = performance.now();\n }\n }\n\n endMethodTiming(operationId: string, methodPath: string): PerformanceMetrics {\n const endTime = performance.now();\n const key = `${operationId}:${methodPath}`;\n const timing = this.methodTimings.get(key);\n\n if (!timing) {\n return { startTime: endTime };\n }\n\n const duration = endTime - timing.startTime;\n const timeToNextCall = timing.nextMethodStartTime ?\n timing.nextMethodStartTime - timing.startTime : undefined;\n\n // Clean up\n this.methodTimings.delete(key);\n\n return {\n startTime: timing.startTime,\n endTime,\n duration,\n nextMethodStartTime: timing.nextMethodStartTime,\n timeToNextCall\n };\n }\n\n formatDuration(milliseconds: number): string {\n if (milliseconds < 1) {\n return `${(milliseconds * 1000).toFixed(1)}μs`;\n } else if (milliseconds < 1000) {\n return `${milliseconds.toFixed(2)}ms`;\n } else {\n return `${(milliseconds / 1000).toFixed(2)}s`;\n }\n }\n\n getDeltaFromOperationStart(operationId: string, currentTime: number): number {\n const operationStartTime = this.operationStartTimes.get(operationId);\n return operationStartTime ? currentTime - operationStartTime : 0;\n }\n\n cleanupOperation(operationId: string): void {\n this.operationStartTimes.delete(operationId);\n }\n}","import { uuid } from \"../../utilities\";\n\nexport class CallTraceManager {\n private activeOperationId: string | null = null;\n private activeCallStack: string[] = [];\n\n startNewOperation(): string {\n const operationId = uuid(8);\n this.activeOperationId = operationId;\n this.activeCallStack = [];\n return operationId;\n }\n\n isNewOperation(): boolean {\n return this.activeOperationId === null;\n }\n\n getActiveOperationId(): string {\n if (!this.activeOperationId) {\n throw new Error('No active operation context');\n }\n return this.activeOperationId;\n }\n\n addMethodToTrace(methodPath: string): string[] {\n if (this.isNewOperation()) {\n this.activeCallStack = [methodPath];\n } else {\n this.activeCallStack.push(methodPath);\n }\n return [...this.activeCallStack];\n }\n\n removeMethodFromTrace(): void {\n if (!this.isNewOperation()) {\n this.activeCallStack.pop();\n }\n }\n\n endOperation(): void {\n this.activeOperationId = null;\n this.activeCallStack = [];\n }\n\n formatMethodPaths(methodPaths: string[]): string[] {\n return methodPaths.map(path => path.replace(/ → /g, '.'));\n }\n\n getCurrentTrace(): string[] {\n return [...this.activeCallStack];\n }\n}","export class SlotPath {\n\n private _path: string[];\n\n get path() {\n return [...this._path]\n }\n\n constructor(...pathLike: string[]) {\n this._path = pathLike;\n }\n\n push(...pathLike: string[]) {\n this._path.push(...pathLike);\n }\n\n get(up: number = 0) {\n return this._path.slice(0, this._path.length - up).join(\".\")\n }\n}","import { uuid } from \"../utilities\";\nimport { CreateBlockOptions } from \"./types\";\n\ntype Line = string | Block;\n\ntype Param = { name: string, value: any };\ntype GenericParam = { name: string, callName: string };\n\n\nexport abstract class Block {\n readonly name: string;\n protected _lines: Line[] = [];\n protected _indent: string = \"\";\n protected _parent?: Block;\n\n constructor(name?: string, parentIndent: string = \"\", parent?: Block) {\n this.name = name != null ? name : uuid();\n this._indent = parentIndent;\n this._parent = parent;\n }\n\n indexOf(name: string) {\n return this._lines.findIndex(w => typeof w !== \"string\" && w.name === name);\n }\n\n getLines() {\n return this._lines;\n }\n\n getParent() {\n return this._parent;\n }\n\n getIndent() {\n return this._indent;\n }\n\n setLines(lines: Line[]) {\n this._lines = lines;\n }\n\n setParent(block: Block) {\n this._parent = block;\n }\n\n setIndent(indent: string) {\n this._indent = indent;\n }\n\n getOrDefault<T extends Block>(name: string): T | undefined {\n\n if (name.includes('.') === false) {\n return this._lines.find(w => typeof w !== \"string\" && w.name === name) as T | undefined;\n }\n\n const split = name.match(/(\\[[^\\]]+\\]|[^.]+)/g);\n let result: Block = this;\n\n for (const item of split) {\n const found = result._lines.find(w => typeof w !== \"string\" && w.name === item) as Block;\n\n if (found == null) {\n\n if (\"getValue\" in result && result.getValue instanceof Block && result.getValue.name === item) {\n result = result.getValue;\n continue;\n }\n\n return undefined;\n }\n\n result = found;\n }\n\n return result as T;\n }\n\n get<T extends Block>(name: string): T {\n const found = this.getOrDefault(name);\n\n if (found == null) {\n throw new Error(`Error finding code block for given path. Path: ${name}`)\n }\n\n return found as T;\n }\n\n has(name: string) {\n return this._lines.some(w => typeof w !== \"string\" && w.name === name);\n }\n\n remove(name: string) {\n this._lines = this._lines.filter(x => typeof x === \"object\" && typeof x.name === \"string\" && x.name !== name);\n }\n\n replace(name: string, line: Block) {\n\n const foundIndex = this._lines.findIndex(x => typeof x !== \"string\" && x.name === name);\n\n if (foundIndex === -1) {\n throw new Error(`Cannot find line by name. Name: ${name}`)\n }\n\n const found = this._lines[foundIndex];\n\n if (typeof found === \"string\") {\n // Replace the line\n this._lines.splice(foundIndex, 1, line);\n return;\n }\n\n line.setLines(found.getLines());\n line.setIndent(found.getIndent());\n line.setParent(found.getParent());\n\n // Replace the line\n this._lines.splice(foundIndex, 1, line);\n\n return;\n }\n\n protected push(line: Line) {\n this._lines.push(line);\n }\n\n protected unshift(line: Line) {\n this._lines.unshift(line);\n }\n\n protected indent(text: string): string {\n return this._indent + text;\n }\n\n\n abstract toString(): string;\n}\n\nexport abstract class ContainerBlock extends Block {\n if(condition: string, options?: CreateBlockOptions): IfBuilder {\n const builder = new IfBuilder(condition, options?.name, this._indent + \" \", this);\n if (options?.unshift === true) {\n this.unshift(builder);\n } else {\n this.push(builder);\n }\n\n return builder;\n }\n\n raw(raw: string, options?: CreateBlockOptions): RawBuilder {\n const builder = new RawBuilder(raw, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n function(name?: string, options?: CreateBlockOptions): FunctionBuilder {\n const builder = new FunctionBuilder(name, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n factory(name?: string, options?: CreateBlockOptions): FunctionFactoryBuilder {\n const builder = new FunctionFactoryBuilder(name, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n variable(declaration: string, options?: CreateBlockOptions): VariableBuilder {\n const builder = new VariableBuilder(declaration, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n assign(variableName: string, options?: CreateBlockOptions): AssignmentBuilder {\n const builder = new AssignmentBuilder(variableName, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n object(options?: CreateBlockOptions): ObjectBuilder {\n const builder = new ObjectBuilder(options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n slot(name: string) {\n const builder = new SlotBlock(name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n\n array(accessor: string, options?: CreateBlockOptions) {\n const builder = new ArrayBuilder(accessor, options?.name, this._indent + \" \", this);\n this.push(builder);\n return builder;\n }\n}\n\nexport type StringType = \"template\" | \"default\";\n\nexport class StringBuilder extends Block {\n\n private _type: StringType;\n\n constructor(type: StringType, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._type = type;\n }\n\n append(value: string) {\n this._lines.push(value);\n return this;\n }\n\n toString() {\n if (this._type === \"template\") {\n return \"`\" + this._lines.join(\"\") + \"`\";\n }\n\n return `\"${this._lines.join(\"\")}\"`;\n }\n}\n\nexport class SlotBlock extends ContainerBlock {\n\n constructor(name: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n }\n\n insert(line: string | Block) {\n this.push(line);\n }\n\n toString(): string {\n return this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(line)\n : line.toString()\n ).join('\\n\\n');\n }\n}\n\nexport class AssignmentBuilder extends ContainerBlock {\n protected _variableName: string;\n protected _value?: string | Block;\n protected _functionName?: string;\n\n get getValue() {\n return this._value;\n }\n\n constructor(variableName: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._variableName = variableName;\n }\n\n value(value: string): this {\n this._value = value;\n return this;\n }\n\n and(and: string, options?: CreateBlockOptions): this {\n this._value = new AndBuilder(and, options?.name, this._indent, this);\n return this;\n }\n\n object(options?: CreateBlockOptions): ObjectBuilder {\n const objectBuilder = new ObjectBuilder(options?.name, this._indent, this);\n\n this._value = objectBuilder;\n\n return objectBuilder;\n }\n\n call(functionName: string, options?: CreateBlockOptions): ObjectBuilder {\n this._functionName = functionName;\n const objectBuilder = new ObjectBuilder(options?.name, this._indent, this);\n\n this._value = objectBuilder;\n\n return objectBuilder;\n }\n\n string(type: StringType, options?: CreateBlockOptions) {\n const stringBuilder = new StringBuilder(type, options?.name, this._indent, this);\n\n this._value = stringBuilder;\n\n return stringBuilder;\n }\n\n toString(): string {\n\n if (this._value == null) {\n throw new Error(\"Value cannot be null for AssignmentBuilder Builder\")\n }\n\n if (this._functionName != null) {\n return this.indent(`${this._variableName} = ${this._functionName}(${this._value.toString()});`);\n }\n\n return this.indent(`${this._variableName} = ${this._value.toString()};`);\n }\n}\n\nexport class AndBuilder extends ContainerBlock {\n\n constructor(and: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._lines.push(and);\n }\n\n and(and: string) {\n this._lines.push(and);\n }\n\n toString() {\n return this._lines.join(\" && \")\n }\n}\n\nexport class VariableBuilder extends Block {\n protected _declaration: string;\n protected _value?: string | Block;\n\n get getValue() {\n return this._value;\n }\n\n constructor(declaration: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._declaration = declaration;\n }\n\n value(value: string): this {\n this._value = value;\n return this;\n }\n\n object(options?: CreateBlockOptions): ObjectBuilder {\n const objectBuilder = new ObjectBuilder(options?.name, this._indent, this);\n\n this._value = objectBuilder;\n\n return objectBuilder;\n }\n\n array(accessor: string, options?: CreateBlockOptions): ArrayBuilder {\n const arrayBuilder = new ArrayBuilder(accessor, options?.name, this._indent, this);\n\n this._value = arrayBuilder;\n\n return arrayBuilder;\n }\n\n toString(): string {\n\n if (this._value == null) {\n throw new Error(\"Value cannot be null for Variable Builder\")\n }\n\n return this.indent(`const ${this._declaration} = ${this._value.toString()};`);\n }\n}\n\nexport class RawBuilder extends ContainerBlock {\n private _raw: string;\n\n constructor(raw: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._raw = raw;\n }\n\n toString(): string {\n return `${this._raw}\\n`;\n }\n}\n\nexport class ObjectBuilder extends Block {\n\n property(line: string) {\n // Add comma to previous line if it exists and isn't a brace\n if (this._lines.length > 0) {\n const lastLine = this._lines[this._lines.length - 1];\n if (typeof lastLine === 'string' && !lastLine.endsWith(\"{\")) {\n this._lines[this._lines.length - 1] = lastLine + \",\";\n }\n }\n this.push(line);\n return this;\n }\n\n nested(propertyName: string, name?: string) {\n const builder = new ObjectBuilder(name, this._indent + \" \", this);\n // Add comma to previous line if it exists and isn't a brace\n if (this._lines.length > 0) {\n const lastLine = this._lines[this._lines.length - 1];\n if (typeof lastLine === 'string' && !lastLine.endsWith(\"{\")) {\n this._lines[this._lines.length - 1] = lastLine + \",\";\n }\n }\n // Add the property name and opening brace\n this.push(`${propertyName}: {`);\n // Add the nested builder\n this.push(builder);\n // Add the closing brace\n this.push(\"}\");\n return builder;\n }\n\n toString(): string {\n // Check if this is a nested object's content\n const isNestedContent = this._parent instanceof ObjectBuilder;\n\n if (isNestedContent) {\n // For nested object contents, just return the lines\n return this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(\" \" + line)\n : line.toString()\n ).join('\\n');\n }\n\n // For root objects, include the braces\n const lines = [\n \"{\",\n ...this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(\" \" + line)\n : line.toString()\n ),\n this.indent(\"}\")\n ];\n\n return lines.join('\\n');\n }\n}\n\nexport class FunctionFactoryBuilder extends ContainerBlock {\n private _functionName?: string;\n private _params: Param[] = [];\n private _return: boolean = false;\n\n constructor(functionName?: string, sectionName?: string, parentIndent: string = \"\", parent?: Block) {\n super(sectionName, parentIndent, parent);\n this._functionName = functionName;\n }\n\n getParameters() {\n return [...this._params];\n }\n\n createParameter(value: any): Param {\n const name = `injection${this._params.length}`;\n return {\n name,\n value\n }\n }\n\n parameters(...params: Param[]): this {\n this._params.push(...params);\n return this;\n }\n\n return() {\n this._return = true;\n return this;\n }\n\n appendBody(line: string): this {\n this.push(line);\n return this;\n }\n\n invoke() {\n const body = this.toString();\n const parameterNames = this._getParameterNames();\n const parameterValues = this._getParameterValues();\n\n return Function(...parameterNames, body)(...parameterValues)\n }\n\n private _getParameterNames() {\n return this._params.map(w => w.name).join(\", \")\n }\n\n private _getParameterValues() {\n return this._params.map(w => w.value);\n }\n\n toString(): string {\n const r = this._return === true ? \"return \" : \"\";\n const signature = this._functionName\n ? `${r}function ${this._functionName}(${this._getParameterNames()})`\n : `${r}function(${this._getParameterNames()})`;\n\n const lines = [\n this.indent(signature + \" {\"),\n ...this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(\" \" + line)\n : line.toString()\n ),\n this.indent(\"}\")\n ];\n\n return lines.join('\\n');\n }\n}\n\nexport class FunctionBuilder extends ContainerBlock {\n private _functionName?: string;\n private _params: (string | GenericParam)[] = [];\n private _return: boolean = false;\n\n constructor(functionName?: string, sectionName?: string, parentIndent: string = \"\", parent?: Block) {\n super(sectionName, parentIndent, parent);\n this._functionName = functionName;\n }\n\n parameters(...params: (string | GenericParam)[]): this {\n this._params.push(...params);\n return this;\n }\n\n return() {\n this._return = true;\n return this;\n }\n\n appendBody(line: string): this {\n this.push(line);\n return this;\n }\n\n private _getParameterKeys() {\n return this._params.map(w => typeof w === \"object\" ? w.name : w).join(\", \")\n }\n\n toCallable() {\n return `${this._functionName}(${this._params.map(w => typeof w === \"object\" ? w.callName : w).join(\", \")})`\n }\n\n toString(): string {\n const r = this._return === true ? \"return \" : \"\";\n const signature = this._functionName\n ? `${r}function ${this._functionName}(${this._getParameterKeys()})`\n : `${r}function(${this._getParameterKeys()})`;\n\n const lines = [\n this.indent(signature + \" {\"),\n ...this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(\" \" + line)\n : line.toString()\n ),\n this.indent(\"}\")\n ];\n\n return lines.join('\\n');\n }\n}\n\nexport class ArrayBuilder extends Block {\n constructor(accessor: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._lines.push(accessor);\n }\n\n append(accessor: string) {\n this._lines.push(accessor);\n return this;\n }\n\n toString() {\n return `[${this._lines.join(\",\")}]`\n }\n}\n\nexport class IfBuilder extends ContainerBlock {\n private _condition: string;\n\n constructor(condition: string, name?: string, parentIndent: string = \"\", parent?: Block) {\n super(name, parentIndent, parent);\n this._condition = condition;\n }\n\n appendBody(line: string): this {\n this.push(line);\n return this;\n }\n\n unshiftBody(line: string): this {\n this.unshift(line);\n return this;\n }\n\n private stringifyLine(line: Line) {\n if (typeof line === 'string') {\n return this.indent(\" \" + line);\n }\n\n if (Array.isArray(line)) {\n return line.join(\"\\r\\n\")\n }\n\n return line.toString();\n }\n\n toString(): string {\n // need to join with \\r\\n because we are not an object\n const lines = [\n this.indent(`if (${this._condition}) {`),\n this._lines.map(x => this.stringifyLine(x)).join(\"\\r\\n\"),\n this.indent(\"}\")\n ]\n\n return lines.join(\"\\n\\n\");\n }\n}\n\nexport class CodeBuilder extends ContainerBlock {\n\n toString(): string {\n return this._lines.map(line =>\n typeof line === 'string'\n ? this.indent(line)\n : line.toString()\n ).join('\\n\\n');\n }\n}","import { CloneArrayHandler } from \"./clone/CloneArrayHandler\";\nimport { CloneObjectHandler } from \"./clone/CloneObjectHandler\";\nimport { CloneValueHandler } from \"./clone/CloneValueHandler\";\n\n/// Purpose: \nexport class CloneHandlerBuilder {\n\n build() {\n const handler = new CloneObjectHandler();\n handler\n .setNext(new CloneValueHandler())\n .setNext(new CloneArrayHandler());\n\n return handler;\n }\n}","import { CompareArrayHandler } from \"./compare/CompareArrayHandler\";\nimport { CompareDateHandler } from \"./compare/CompareDateHandler\";\nimport { CompareObjectHandler } from \"./compare/CompareObjectHandler\";\nimport { CompareValueHandler } from \"./compare/CompareValueHandler\";\n\nexport class CompareHandlerBuilder {\n\n build() {\n const handler = new CompareObjectHandler();\n handler.setNext(new CompareArrayHandler())\n .setNext(new CompareDateHandler())\n .setNext(new CompareValueHandler());\n\n return handler;\n }\n}","import { CompareIdsKeyHandler } from \"./compareIds/CompareIdsKeyHandler\";\n\nexport class CompareIdsHandlerBuilder {\n\n build() {\n const handler = new CompareIdsKeyHandler();\n\n return handler;\n }\n}","import { DeserializeObjectHandler } from \"./deserialize/DeserializeObjectHandler\";\nimport { DeserializeValueHandler } from \"./deserialize/DeserializeValueHandler\";\nimport { DeserializeDateHandler } from \"./deserialize/DeserializeDateHandler\";\nimport { DeserializeComputedValueHandler } from \"./deserialize/DeserializeComputedValueHandler\";\nimport { DeserializeFunctionHandler } from \"./deserialize/DeserializeFunctionHandler\";\nimport { DeserializeDeserializerHandler } from \"./deserialize/DeserializeDeserializerHandler\";\n\n/// Purpose: \nexport class DeserializeHandlerBuilder {\n\n build() {\n const handler = new DeserializeObjectHandler();\n handler\n .setNext(new DeserializeDeserializerHandler())\n .setNext(new DeserializeComputedValueHandler())\n .setNext(new DeserializeFunctionHandler())\n .setNext(new DeserializeValueHandler())\n .setNext(new DeserializeDateHandler());\n\n return handler;\n }\n}","import { EnableChangeTrackingObjectHandler } from \"./enableChangeTracking/EnableChangeTrackingObjectHandler\";\nimport { EnableChangeTrackingPrimitiveValueHandler } from \"./enableChangeTracking/EnableChangeTrackingPrimitiveValueHandler\";\n\n/// Purpose: \nexport class EnableChangeTrackingHandlerBuilder {\n\n build() {\n const handler = new EnableChangeTrackingObjectHandler();\n handler.setNext(new EnableChangeTrackingPrimitiveValueHandler());\n\n return handler;\n }\n}","import { EnrichmentNullableObjectHandler } from \"./enrichment/EnrichmentNullableObjectHandler\";\nimport { EnrichmentObjectHandler } from \"./enrichment/EnrichmentObjectHandler\";\nimport { EnrichmentObjectIdentityHandler } from \"./enrichment/EnrichmentObjectIdentityHandler\";\nimport { EnrichmentPrimitiveIdentityHandler } from \"./enrichment/EnrichmentPrimitiveIdentityHandler\";\nimport { EnrichmentPrimitiveHandler } from './enrichment/EnrichmentPrimitiveHandler';\nimport { EnrichmentFunctionHandler } from './enrichment/EnrichmentFunctionHandler';\nimport { EnrichmentDefaultValueHandler } from './enrichment/EnrichmentDefaultValueHandler';\nimport { EnrichmentDefaultFunctionHandler } from './enrichment/EnrichmentDefaultFunctionHandler';\nimport { EnrichmentComputedValueHandler } from './enrichment/EnrichmentComputedValueHandler';\n\n/// Purpose: \nexport class EnrichmentHandlerBuilder {\n\n build() {\n const handler = new EnrichmentPrimitiveIdentityHandler();\n\n handler.setNext(new EnrichmentObjectIdentityHandler())\n .setNext(new EnrichmentObjectHandler())\n .setNext(new EnrichmentNullableObjectHandler())\n .setNext(new EnrichmentFunctionHandler())\n .setNext(new EnrichmentDefaultValueHandler())\n .setNext(new EnrichmentDefaultFunctionHandler())\n .setNext(new EnrichmentComputedValueHandler())\n .setNext(new EnrichmentPrimitiveHandler());\n\n return handler;\n }\n}","import { FreezePrimitiveValueHandler } from \"./freeze/FreezePrimitiveValueHandler\";\nimport { FreezeObjectHandler } from \"./freeze/FreezeObjectHandler\";\n\n/// Purpose: \nexport class FreezeHandlerBuilder {\n\n build() {\n const handler = new FreezeObjectHandler();\n handler.setNext(new FreezePrimitiveValueHandler());\n\n return handler;\n }\n}","import { HashKeyHandler } from \"./hash/HashKeyHandler\";\nimport { HashValueHandler } from \"./hash/HashValueHandler\";\nimport { HashDateHandler } from \"./hash/HashDateHandler\";\nimport { HashIdentityHandler } from \"./hash/HashIdentityHandler\";\nimport { HashFunctionHandler } from \"./hash/HashFunctionHandler\";\nimport { HashComputedValueHandler } from \"./hash/HashComputedValueHandler\";\n\n/// Purpose: \n// Should ignore Id's and Identities for type Object because we want \n// to comare a new addition with what was saved in the database\nexport class HashHandlerBuilder {\n\n build() {\n const handler = new HashKeyHandler();\n\n handler\n .setNext(new HashComputedValueHandler())\n .setNext(new HashFunctionHandler())\n .setNext(new HashIdentityHandler())\n .setNext(new HashDateHandler())\n .setNext(new HashValueHandler());\n\n return handler;\n }\n}","import { HashTypeValueHandler } from \"./hashType/HashTypeValueHandler\";\n\n/// Purpose: \nexport class HashTypeHandlerBuilder {\n\n build() {\n const handler = new HashTypeValueHandler();\n\n return handler;\n }\n}","import { IdSelectorValueHandler } from \"./idSelector/IdSelectorValueHandler\";\n/// Purpose: \nexport class IdSelectorHandlerBuilder {\n\n build() {\n const handler = new IdSelectorValueHandler();\n\n return handler;\n }\n}","import { MergeDefaultFunctionHandler } from \"./merge/MergeDefaultFunctionHandler\";\nimport { MergePrimitiveHandler } from \"./merge/MergePrimitiveHandler\";\nimport { MergeComputedValueHandler } from \"./merge/MergeComputedValueHandler\";\nimport { MergeDefaultValueHandler } from \"./merge/MergeDefaultValueHandler\";\nimport { MergeFunctionHandler } from \"./merge/MergeFunctionHandler\";\n\n/// Purpose: Should recompute computed properties\nexport class MergeHandlerBuilder {\n\n build() {\n const handler = new MergeDefaultFunctionHandler();\n handler.setNext(new MergeDefaultValueHandler())\n .setNext(new MergeFunctionHandler())\n .setNext(new MergeComputedValueHandler())\n .setNext(new MergePrimitiveHandler());\n\n return handler;\n }\n}","import { PrepareIdentityHandler } from \"./prepare/PrepareIdentityHandler\";\nimport { PrepareKeyHandler } from \"./prepare/PrepareKeyHandler\";\nimport { PrepareValueHandler } from \"./prepare/PrepareValueHandler\";\nimport { PrepareObjectHandler } from \"./prepare/PrepareObjectHandler\";\nimport { PrepareComputedValueHandler } from \"./prepare/PrepareComputedValueHandler\";\nimport { PrepareFunctionHandler } from \"./prepare/PrepareFunctionHandler\";\n\n/// Purpose: Called before we save entities to the database. Responsible for cleaning up\n/// an entity before it is sent to the plugin\nexport class PrepareHandlerBuilder {\n\n build() {\n const handler = new PrepareIdentityHandler();\n handler\n .setNext(new PrepareFunctionHandler())\n .setNext(new PrepareComputedValueHandler())\n .setNext(new PrepareKeyHandler())\n .setNext(new PrepareObjectHandler())\n .setNext(new PrepareValueHandler());\n\n return handler;\n }\n}","import { SerializeDateHandler } from \"./serialize/SerializeDateHandler\";\nimport { SerializeObjectHandler } from \"./serialize/SerializeObjectHandler\";\nimport { SerializeValueHandler } from \"./serialize/SerializeValueHandler\";\nimport { SerializeSerializerHandler } from \"./serialize/SerializeSerializerHandler\";\nimport { SerializeFunctionHandler } from \"./serialize/SerializeFunctionHandler\";\n\n/// Purpose: \nexport class SerializeHandlerBuilder {\n\n build() {\n const handler = new SerializeSerializerHandler();\n handler\n .setNext(new SerializeFunctionHandler())\n .setNext(new SerializeDateHandler())\n .setNext(new SerializeValueHandler())\n .setNext(new SerializeObjectHandler());\n\n return handler;\n }\n}","import { StripObjectHandler } from \"./strip/StripObjectHandler\";\nimport { StripValueHandler } from \"./strip/StripValueHandler\";\nimport { StripKeyHandler } from \"./strip/StripKeyHandler\";\nimport { StripIdentityHandler } from \"./strip/StripIdentityHandler\";\n\n/// Purpose: \nexport class StripHandlerBuilder {\n\n build() {\n const handler = new StripIdentityHandler();\n\n handler.setNext(new StripKeyHandler())\n .setNext(new StripObjectHandler())\n .setNext(new StripValueHandler());\n\n return handler;\n }\n}","import { CodeBuilder, IfBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CloneArrayHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Array) {\n\n if (property.isNullable || property.isOptional) {\n // Child properties will take care of this\n return builder;\n }\n\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n if (property.parent == null) {\n\n const resultAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n const slot = builder.get<SlotBlock>(\"if\");\n\n slot.if(`${entitySelectorPath} != null`).appendBody(`${resultAssignmentPath} = [...${entitySelectorPath}]`);\n return builder;\n }\n // slotPath.push(...property.getParentPathArray());\n // const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n // nestedObjectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CloneObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n\n // Child properties will take care of this\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, IfBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CloneValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object && property.type != SchemaTypes.Array) {\n const slot = builder.get<SlotBlock>(\"if\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n const resultAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n\n if (property.parent == null) {\n // we are a first level property\n slot.if(`${entitySelectorPath} != null`).appendBody(`${resultAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n // Second level or more property\n // Need to ensure parent is assigned\n const propertyParentPath = [\"result\", ...property.getParentPathArray()]\n const ifBuilder = new IfBuilder(`${propertyParentPath.join(\"?.\")} == null`).appendBody(`${propertyParentPath.join(\".\")} = {};`);\n\n slot.if(`${entitySelectorPath} != null`).appendBody(ifBuilder.toString()).appendBody(`${resultAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { AndBuilder, CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CompareArrayHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Array) {\n let compare = builder.getOrDefault<AndBuilder>(\"result.variable.compare\");\n const leftCompare = property.getSelectrorPath({ parent: \"a\" });\n const rightCompare = property.getSelectrorPath({ parent: \"b\" });\n\n if (compare == null) {\n compare = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .and(`JSON.stringify(${leftCompare}) === JSON.stringify(${rightCompare})`, { name: \"compareArray\" });\n return builder;\n }\n\n compare.and(`JSON.stringify(${leftCompare}) === JSON.stringify(${rightCompare})`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { AndBuilder, CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CompareDateHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Date) {\n let compare = builder.getOrDefault<AndBuilder>(\"result.variable.compare\");\n const leftCompare = property.getSelectrorPath({ parent: \"a\" });\n const rightCompare = property.getSelectrorPath({ parent: \"b\" });\n\n if (compare == null) {\n compare = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .and(`${leftCompare}?.toISOString() === ${rightCompare}?.toISOString()`, { name: \"compareDate\" });\n return builder;\n }\n\n compare.and(`${leftCompare}?.toISOString() === ${rightCompare}?.toISOString()`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CompareObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { AndBuilder, CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class CompareValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object) {\n let compare = builder.getOrDefault<AndBuilder>(\"result.variable.compare\");\n const leftCompare = property.getSelectrorPath({ parent: \"a\" });\n const rightCompare = property.getSelectrorPath({ parent: \"b\" });\n\n if (compare == null) {\n compare = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .and(`${leftCompare} === ${rightCompare}`, { name: \"compare\" });\n return builder;\n }\n\n compare.and(`${leftCompare} === ${rightCompare}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class CompareIdsKeyHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<unknown>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey) {\n const slot = builder.get<SlotBlock>(\"ifs\");\n const leftCompare = property.getSelectrorPath({ parent: \"a\" });\n const rightCompare = property.getSelectrorPath({ parent: \"b\" });\n\n slot.if(`${leftCompare} != ${rightCompare}`).appendBody(\"return false;\");\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class DeserializeComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n // Do nothing with the value\n if (property.functionBody != null && property.type === SchemaTypes.Computed && property.isUnmapped === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ContainerBlock, ObjectBuilder } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\n/**\n * Handles converting a string value from a database to a Date value\n */\nexport class DeserializeDateHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Date) {\n const slotPath = new SlotPath(\"result.variable.object\");\n let objectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n const entitySelectorPath = property.getSelectrorPath({ parent: \"unserialized\" });\n const entityAssignmentPath = property.getAssignmentPath({ parent: \"entity\", useFromPropertyName: property.isRenamed });\n const assignment = `${property.name}: typeof ${entitySelectorPath} === \"string\" ? new Date(${entitySelectorPath}) : ${entitySelectorPath}`;\n\n // if it is nullable or optional, assign in an if block, otherwise we \n // could unintentionally assign null/undefined to a property that does not exist\n if (property.isOptional || property.isNullable) {\n const ifAssignment = `${entityAssignmentPath} = typeof ${entitySelectorPath} === \"string\" ? new Date(${entitySelectorPath}) : ${entitySelectorPath}`;\n const rootPath = new SlotPath(\"if\");\n builder.get<ContainerBlock>(rootPath.get()).if(`${entitySelectorPath} != null`).appendBody(ifAssignment);\n return;\n }\n\n // A date cannot be a nested object, just do the assignment\n if (property.parent == null) {\n objectBuilder.property(assignment);\n\n return builder;\n }\n\n slotPath.push(...property.getParentPathArray());\n const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n nestedObjectBuilder.property(assignment)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class DeserializeDeserializerHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.valueDeserializer != null) {\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(\"result.variable.object\");\n const assignmentBuilder = builder.getOrDefault<SlotBlock>(\"functions\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"unserialized\" });\n\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const entity\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n const defaultFunctionWithParameters = this.toNamedFunction(property.valueDeserializer.toString(), assignmentBuilder);\n defaultFunctionWithParameters.builder.parameters(...defaultFunctionWithParameters.parameters.map((_, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: entitySelectorPath })));\n\n if (property.parent == null) {\n objectBuilder.property(`${property.name}: ${defaultFunctionWithParameters.builder.toCallable()}`);\n return builder;\n }\n\n const slotPath = new SlotPath(...property.getParentPathArray());\n objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n objectBuilder.property(`${property.name}: ${defaultFunctionWithParameters.builder.toCallable()}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class DeserializeFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n // Functions are always unmapped\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class DeserializeObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const slotPath = new SlotPath(\"result.variable.object\");\n let objectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n\n if (property.parent == null) {\n objectBuilder.nested(property.getResolvedName(), property.name)\n\n return builder;\n }\n\n slotPath.push(...property.getParentPathArray());\n const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n nestedObjectBuilder.nested(property.getResolvedName(), property.name)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class DeserializeValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object && property.type != SchemaTypes.Date) {\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(\"result.variable.object\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"unserialized\", useFromPropertyName: property.isRenamed });\n\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const entity\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n if (property.parent == null) {\n objectBuilder.property(`${property.name}: ${entitySelectorPath}`);\n return builder;\n }\n\n const slotPath = new SlotPath(...property.getParentPathArray());\n objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n objectBuilder.property(`${property.name}: ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnableChangeTrackingObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const assignmentSlot = builder.get<SlotBlock>(\"assignment\");\n const childSelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n const childAssignmentPath = property.getAssignmentPath({ parent: \"entity\" });\n\n assignmentSlot.if(`${childSelectorPath} != null`).appendBody(`${childAssignmentPath} = enableChangeTracking(${childAssignmentPath});`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnableChangeTrackingPrimitiveValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type !== SchemaTypes.Object) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Computed) {\n\n const parameterNames: string[] = [\"enriched\", \"collectionName\"];\n\n if (property.injected != null) {\n\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n parameterNames.push(parameter.name);\n }\n\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.declarations\");\n const defaultFunctionWithParameters = this.toNamedFunction(property.functionBody.toString(), declarationsSlot);\n\n defaultFunctionWithParameters.builder.parameters(...parameterNames.map((w, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: w })));\n\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${defaultFunctionWithParameters.builder.toCallable()}`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class EnrichmentDefaultFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.defaultValue != null && typeof property.defaultValue === \"function\") {\n\n this.setEnrichedProperty(property, builder);\n\n // we need to add the call for this function too, want to create an if\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.declarations\");\n\n if (property.injected != null) {\n\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n\n if (factory == null) {\n throw new Error(\"Error building enricher, could not find slot for factory\")\n }\n\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n const defaultFunctionWithParameters = this.toNamedFunction(property.defaultValue.toString(), declarationsSlot);\n // This is ok, defaults can only inject one parameter anyways\n defaultFunctionWithParameters.builder.parameters(...defaultFunctionWithParameters.parameters.map(w => ({ name: w, callName: parameter.name })));\n\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${defaultFunctionWithParameters.builder.toCallable()}`);\n\n return builder;\n }\n\n const defaultFunction = this.toNamedFunction(property.defaultValue.toString(), declarationsSlot);\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n ifsSlot.if(`${enrichedAssignmentPath} == null`).appendBody(`${enrichedAssignmentPath} = ${defaultFunction.builder.toCallable()}`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class EnrichmentDefaultValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.defaultValue != null && typeof property.defaultValue !== \"function\") {\n\n this.setEnrichedProperty(property, builder);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n\n const parameterNames: string[] = [\"enriched\", \"collectionName\"];\n\n if (property.injected != null) {\n\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n parameterNames.push(parameter.name);\n }\n\n\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.declarations\");\n // Unwrap the functions to removing currying\n const defaultFunctionWithParameters = this.toNamedFunction(property.functionBody.toString(), declarationsSlot);\n\n defaultFunctionWithParameters.builder.parameters(...parameterNames.map((w, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: w })));\n\n const slot = builder.get<SlotBlock>(\"factory.function.assignment\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n\n slot.assign(enrichedAssignmentPath).value(defaultFunctionWithParameters.builder.toCallable());\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentNullableObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object && (property.isNullable || property.isOptional)) {\n\n const slotPath = new SlotPath(\"factory\", \"function\", \"enriched\", \"object\", \"enriched\");\n const nestedSlotPath = this.buildSlotPath(property, slotPath);\n\n // Generate null check for current level using parent relationships\n const entityPath = property.getSelectrorPath({ parent: \"entity\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const enrichedPath = property.getAssignmentPath({ parent: \"enriched\" });\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n\n if (ifsSlot == null) {\n throw new Error(\"Error building enricher, could not find slot for factory.function.ifs\")\n }\n\n\n ifsSlot.if(`${entityPath} != null`).appendBody(`${enrichedPath} = enableChangeTracking(${enrichedPath} || {}, \"${property.name}\");`);\n\n let enriched = builder.getOrDefault<ObjectBuilder>(nestedSlotPath.get());\n\n if (enriched == null) {\n const enrichedSlot = builder.get<ObjectBuilder>(slotPath.get());\n\n if (enrichedSlot == null) {\n throw new Error(`Error building enricher, could not find slot for ${slotPath.get()}`)\n }\n\n enriched = enrichedSlot.nested(property.name, `[${enrichedPath}]`);\n }\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object && (property.isNullable || property.isOptional) === false) {\n\n const slotPath = new SlotPath(\"factory\", \"function\", \"enriched\", \"object\", \"enriched\");\n const nestedSlotPath = this.buildSlotPath(property, slotPath);\n\n // Generate null check for current level using parent relationships\n const enrichedPath = property.getAssignmentPath({ parent: \"enriched\" });\n\n const slot = builder.get<SlotBlock>(\"factory.function.assignment\");\n\n slot.assign(enrichedPath).value(`enableChangeTracking(${enrichedPath} || {}, \"${property.name}\")`)\n\n let enriched = builder.getOrDefault<ObjectBuilder>(nestedSlotPath.get());\n\n if (enriched == null) {\n const enrichedSlot = builder.get<ObjectBuilder>(slotPath.get());\n\n if (enrichedSlot == null) {\n throw new Error(`Error building enricher, could not find slot for ${slotPath.get()}`)\n }\n\n enriched = enrichedSlot.nested(property.name, `[${enrichedPath}]`);\n }\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentObjectIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true && property.type == SchemaTypes.Object) {\n // do nothing right now\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class EnrichmentPrimitiveHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n this.setEnrichedProperty(property, builder);\n\n return builder;\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class EnrichmentPrimitiveIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true && property.type != SchemaTypes.Object) {\n const selectorPath = property.getSelectrorPath({ parent: \"entity\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const slot = builder.get<SlotBlock>(\"factory.function.ifs\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"enriched\" });\n\n slot.if(`${selectorPath} != null`).appendBody(`${enrichedAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class FreezeObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const assignmentSlot = builder.get<SlotBlock>(\"assignment\");\n const childSelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n const childAssignmentPath = property.getAssignmentPath({ parent: \"entity\" });\n\n assignmentSlot.if(`${childSelectorPath} != null`).unshiftBody(`${childAssignmentPath} = Object.freeze(${childAssignmentPath});`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class FreezePrimitiveValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type !== SchemaTypes.Object) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class HashComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Computed && property.isUnmapped === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock, StringBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class HashDateHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Date) {\n let stringBuilder = builder.getOrDefault<StringBuilder>(\"hash-object-return.variable.string\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n if (stringBuilder == null) {\n stringBuilder = builder.get<SlotBlock>(\"hash-object-return\")\n .assign(\"const result\", { name: \"variable\" })\n .string(\"template\", { name: \"string\" });\n }\n\n stringBuilder.append(\"${stringifyDate(\" + entitySelectorPath + \")}\")\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class HashFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n // Functions are always unmapped\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class HashIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock, StringBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class HashKeyHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey === true) {\n let stringBuilder = builder.getOrDefault<StringBuilder>(\"hash-id-if.if-body.variable.string\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n if (stringBuilder == null) {\n stringBuilder = builder.get<SlotBlock>(\"hash-id-if.if-body\")\n .assign(\"const result\", { name: \"variable\" })\n .string(\"template\", { name: \"string\" });\n }\n\n stringBuilder.append(\"${\" + entitySelectorPath + \"}\")\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock, StringBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class HashValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type !== SchemaTypes.Object) {\n let stringBuilder = builder.getOrDefault<StringBuilder>(\"hash-object-return.variable.string\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n if (stringBuilder == null) {\n stringBuilder = builder.get<SlotBlock>(\"hash-object-return\")\n .assign(\"const result\", { name: \"variable\" })\n .string(\"template\", { name: \"string\" });\n }\n\n stringBuilder.append(\"${\" + entitySelectorPath + \"}\")\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class HashTypeValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey && property.isIdentity) {\n const slot = builder.get<SlotBlock>(\"ifs\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\" });\n\n slot.if(`${entitySelectorPath} == null`).appendBody(`return \"Object\"`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { ArrayBuilder, CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class IdSelectorValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey) {\n let arrayBuilder = builder.getOrDefault<ArrayBuilder>(\"result.variable.array\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n\n if (arrayBuilder == null) {\n arrayBuilder = builder.get<SlotBlock>(\"result\")\n .variable(\"result\", { name: \"variable\" })\n .array(`${entitySelectorPath}`, { name: \"array\" });\n\n return builder;\n }\n\n\n arrayBuilder.append(`${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class MergeComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Computed) {\n const parameterNames: string[] = [\"source\", \"collectionName\"];\n\n if (property.injected != null) {\n\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n parameterNames.push(parameter.name);\n }\n\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.header\");\n const defaultFunctionWithParameters = this.toNamedFunction(property.functionBody.toString(), declarationsSlot);\n\n defaultFunctionWithParameters.builder.parameters(...parameterNames.map((w, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: w })));\n\n const slot = builder.get<SlotBlock>(\"factory.function.assignments\");\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"destination\" });\n\n // We want to recompute the value always in case there are changes\n slot.assign(enrichedAssignmentPath).value(defaultFunctionWithParameters.builder.toCallable());\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class MergeDefaultFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n // we only want this to run if the value for the property is null\n // we are changing merge to be more like enrich so we can handle injections\n // we may need to change more. Need to move towards factories\n if (property.defaultValue != null && typeof property.defaultValue === \"function\") {\n const defaultFunctionParameters: string[] = [];\n\n if (property.injected != null) {\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n defaultFunctionParameters.push(parameter.name);\n }\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n // we only want to run if the destination is null\n const selectorPath = property.getSelectrorPath({ parent: \"destination\" });\n const assignmentPath = property.getAssignmentPath({ parent: \"destination\" });\n\n const declarationsSlot = builder.get<SlotBlock>(\"factory.function.header\");\n const defaultFunctionWithParameters = this.toNamedFunction(property.defaultValue.toString(), declarationsSlot);\n\n defaultFunctionWithParameters.builder.parameters(...defaultFunctionParameters.map((w, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: w })));\n\n\n ifsSlot.if(`${selectorPath} == null`).appendBody(`${assignmentPath} = ${defaultFunctionWithParameters.builder.toCallable()}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, FunctionFactoryBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class MergeDefaultValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.defaultValue != null && typeof property.defaultValue !== \"function\") {\n const defaultFunctionParameters: string[] = [];\n\n if (property.injected != null) {\n const factory = builder.get<FunctionFactoryBuilder>(\"factory\");\n const parameter = factory.createParameter(property.injected);\n factory.parameters(parameter);\n\n defaultFunctionParameters.push(parameter.name);\n }\n\n const ifsSlot = builder.get<SlotBlock>(\"factory.function.ifs\");\n // we only want to run if the destination is null\n const selectorPath = property.getSelectrorPath({ parent: \"destination\" });\n const assignmentPath = property.getAssignmentPath({ parent: \"destination\" });\n\n ifsSlot.if(`${selectorPath} == null`).appendBody(`${assignmentPath} = ${typeof property.defaultValue === \"string\" ? `\"${property.defaultValue}\"` : property.defaultValue}`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class MergeFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class MergePrimitiveHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object) {\n const selectorPath = property.getSelectrorPath({ parent: \"source\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const slot = builder.get<SlotBlock>(\"factory.function.assignments\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"source\" });\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"destination\" });\n\n slot.if(`${selectorPath} != null`).appendBody(`${enrichedAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\n// Do nothing with the value\nexport class PrepareComputedValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Computed && property.isUnmapped === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class PrepareFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n // Functions are always unmapped\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class PrepareIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true) {\n const selectorPath = property.getSelectrorPath({ parent: \"entity\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const slot = builder.get<SlotBlock>(\"assignments\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n\n slot.if(`${selectorPath} != null`).appendBody(`${enrichedAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class PrepareKeyHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey === true) {\n const selectorPath = property.getSelectrorPath({ parent: \"entity\", assignmentType: \"FORCE_NULLABLE_OR_OPTIONAL\" });\n const slot = builder.get<SlotBlock>(\"assignments\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n const enrichedAssignmentPath = property.getAssignmentPath({ parent: \"result\" });\n\n slot.if(`${selectorPath} != null`).appendBody(`${enrichedAssignmentPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class PrepareObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const slotPath = new SlotPath(\"result\", \"variable\", \"object\");\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(slotPath.get());\n\n // There is a chance this is the first property we handle,\n // if that is the case, the main result variable will not be\n // constructed yet\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n if (property.parent == null) {\n objectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n slotPath.push(...property.getParentPathArray());\n const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n nestedObjectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class PrepareValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object) {\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(\"result.variable.object\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n // Remap the property to the name in the database if from is set\n const name = property.from != null ? property.from : property.name;\n\n if (property.parent == null) {\n objectBuilder.property(`${name}: ${entitySelectorPath}`);\n return builder;\n }\n\n const slotPath = new SlotPath(...property.getParentPathArray());\n objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n objectBuilder.property(`${name}: ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ContainerBlock, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\n/**\n * Handles converting a Date value from JavaScript to a string value. Should handle remapping here because it is the lowest level in the code here.\n * Remapping higher up could break lower level code\n */\nexport class SerializeDateHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Date) {\n let objectBuilder = builder.get<SlotBlock>(\"if\");\n const entitySelectorPath = property.getSelectrorPath({ parent: \"entity\", useFromPropertyName: property.isRenamed });\n const entityAssignmentPath = property.getAssignmentPath({\n parent: \"result\"\n });\n const assignment = `${property.name}: ${entitySelectorPath} instanceof Date ? ${entitySelectorPath}.toISOString() : ${entitySelectorPath}`;\n\n // if it is nullable or optional, assign in an if block, otherwise we \n // could unintentionally assign null/undefined to a property that does not exist\n if (property.isOptional || property.isNullable) {\n const ifAssignment = `${entityAssignmentPath} = ${entitySelectorPath} instanceof Date ? ${entitySelectorPath}.toISOString() : ${entitySelectorPath}`;\n const rootPath = new SlotPath(\"if\");\n builder.get<ContainerBlock>(rootPath.get()).if(`${entitySelectorPath} != null`).appendBody(ifAssignment);\n return;\n }\n\n // A date cannot be a nested object, just do the assignment\n if (property.parent == null) {\n objectBuilder.if(`Object.hasOwn(entity, \"${property.name}\")`).appendBody(`${entityAssignmentPath} = ${entitySelectorPath}`)\n\n return builder;\n }\n\n // TODO: SOLVE THIS, IT IS CLOSE\n //const slotPath = new SlotPath(...property.getParentPathArray());\n // slotPath.push(...property.getParentPathArray());\n // const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n // nestedObjectBuilder.property(assignment)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class SerializeFunctionHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.functionBody != null && property.type === SchemaTypes.Function) {\n // Functions should not be serialized\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\nexport class SerializeObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const slotPath = new SlotPath(\"assignments\");\n const childPath = property.getAssignmentPath({\n parent: \"result\"\n });\n\n if (property.isNullable || property.isOptional) {\n // Do nothing if it's nullable or optional as property assignments will check\n // and create if it does not exist. This way we can handle null/optional\n return builder;\n }\n\n const slot = builder.get<SlotBlock>(slotPath.get());\n slot.assign(`${childPath}`, { name: `[${childPath}]` }).value(\"{}\");\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class SerializeSerializerHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.valueSerializer != null) {\n const objectBuilder = builder.getOrDefault<SlotBlock>(\"if\");\n const assignmentBuilder = builder.getOrDefault<SlotBlock>(\"functions\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\", useFromPropertyName: property.isRenamed });\n const resultSelectorPath = property.getAssignmentPath({ parent: \"result\" });\n\n const defaultFunctionWithParameters = this.toNamedFunction(property.valueSerializer.toString(), assignmentBuilder);\n defaultFunctionWithParameters.builder.parameters(...defaultFunctionWithParameters.parameters.map((_, i) => ({ name: defaultFunctionWithParameters.parameters[i], callName: entitySelectorPath })));\n\n if (property.parent == null) {\n objectBuilder.if(`Object.hasOwn(entity, \"${property.name}\")`).appendBody(`${resultSelectorPath} = ${defaultFunctionWithParameters.builder.toCallable()}`)\n return builder;\n }\n\n // TODO: SOLVE THIS\n //const slotPath = new SlotPath(...property.getParentPathArray());\n\n // const slotPath = new SlotPath(...property.getParentPathArray());\n // objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n // objectBuilder.property(`${property.name}: ${defaultFunctionWithParameters.builder.toCallable()}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, IfBuilder, SlotBlock } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class SerializeValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object && property.type != SchemaTypes.Date) {\n const slot = builder.getOrDefault<SlotBlock>(\"if\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\", useFromPropertyName: property.isRenamed });\n const resultSelectorPath = property.getAssignmentPath({ parent: \"result\" });\n\n if (property.parent == null) {\n // Only assign if the incoming entity has the property, this allows partial serialization\n // Basically only serialize what is there\n slot.if(`Object.hasOwn(entity, \"${property.name}\")`).appendBody(`${resultSelectorPath} = ${entitySelectorPath}`);\n return builder;\n }\n\n const parentSelectPath = [\"entity\", ...property.getParentPathArray()].join(\".\");\n const parentAssignPath = [\"result\", ...property.getParentPathArray()].join(\".\");\n\n const ifSlot = slot.if(`Object.hasOwn(${parentSelectPath}, \"${property.name}\")`);\n\n if (property.parent.isNullable || property.parent.isOptional) {\n // Do this for nullable/optional parents. Parent will be null if its nullable/optional\n const conditionallyCreateParent = new IfBuilder(`${parentAssignPath} == null`).appendBody(`${parentAssignPath} = {}`);\n ifSlot.appendBody(conditionallyCreateParent.toString());\n }\n\n ifSlot.appendBody(`${resultSelectorPath} = ${entitySelectorPath}`);\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class StripIdentityHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isIdentity === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder } from '../../blocks';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo } from \"../../../schema\";\n\nexport class StripKeyHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.isKey === true) {\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\nimport { PropertyInfoHandler } from \"../types\";\nimport { PropertyInfo, SchemaTypes } from \"../../../schema\";\n\nexport class StripObjectHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type === SchemaTypes.Object) {\n const slotPath = new SlotPath(\"result.variable.object\");\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(slotPath.get());\n\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n if (property.parent == null) {\n objectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n slotPath.push(...property.getParentPathArray());\n const nestedObjectBuilder = builder.get<ObjectBuilder>(slotPath.get());\n nestedObjectBuilder.nested(property.name, property.name)\n\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { PropertyInfo, SchemaTypes } from \"../../../schema\";\nimport { PropertyInfoHandler } from \"../types\";\nimport { CodeBuilder, ObjectBuilder, SlotBlock } from '../../blocks';\nimport { SlotPath } from '../../SlotPath';\n\nexport class StripValueHandler extends PropertyInfoHandler {\n\n override handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n\n if (property.type != SchemaTypes.Object) {\n let objectBuilder = builder.getOrDefault<ObjectBuilder>(\"result.variable.object\");\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n\n // There is a chance this is the first property we handle,\n // if that is the case, the main result variable will not be\n // constructed yet\n if (objectBuilder == null) {\n objectBuilder = builder.get<SlotBlock>(\"result\")\n .assign(\"const result\", { name: \"variable\" })\n .object({ name: \"object\" });\n }\n\n if (property.parent == null) {\n objectBuilder.property(`${property.name}: ${entitySelectorPath}`);\n return builder;\n }\n\n const slotPath = new SlotPath(...property.getParentPathArray());\n objectBuilder = objectBuilder.get<ObjectBuilder>(slotPath.get());\n objectBuilder.property(`${property.name}: ${entitySelectorPath}`);\n return builder;\n }\n\n return super.handle(property, builder);\n }\n}","import { AssignmentBuilder, CodeBuilder, ContainerBlock, ObjectBuilder, SlotBlock } from '..';\nimport { PropertyInfo } from '../../schema/PropertyInfo';\nimport { SlotPath } from '../SlotPath';\nimport { SchemaError } from '../../errors/SchemaError';\nimport { uuid } from '../../utilities/uuid';\nimport { countWordOccurance } from '../utils';\n\nexport interface IHandler {\n setNext(handler: IHandler): IHandler;\n\n handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null;\n}\n\nexport abstract class PropertyInfoHandler implements IHandler {\n\n private _next: IHandler | null;\n\n setNext(handler: IHandler): IHandler {\n this._next = handler;\n\n return handler;\n }\n\n handle(property: PropertyInfo<any>, builder: CodeBuilder): CodeBuilder | null {\n try {\n if (this._next) {\n return this._next.handle(property, builder);\n }\n\n return null;\n } catch (e: any) {\n throw new SchemaError(e, `Error handling property: ${property.name}`);\n }\n }\n\n protected buildSlotPath(property: PropertyInfo<any>, path: SlotPath) {\n\n const result = new SlotPath(...path.path);\n const items: string[] = []\n let p = property;\n\n while (p.parent != null) {\n items.unshift(p.name);\n p = p.parent;\n }\n\n items.unshift(p.name);\n\n result.push(...items);\n\n return result\n }\n\n protected setEnrichedProperty(property: PropertyInfo<any>, root: CodeBuilder) {\n const entitySelectorPath = property.getAssignmentPath({ parent: \"entity\" });\n\n if (property.parent != null) {\n const slotPath = new SlotPath(\"factory\", \"function\", \"enriched\", \"object\", \"enriched\");\n const path = property.parent.getAssignmentPath({ parent: \"enriched\" });\n slotPath.push(`[${path}]`)\n const objectBuilder = root.get<ObjectBuilder>(slotPath.get());\n const childEntityPathSelector = property.getSelectrorPath({ parent: \"entity\" });\n objectBuilder.property(`${property.name}: ${childEntityPathSelector}`);\n return;\n }\n\n const slotPath = new SlotPath(\"factory\", \"function\", \"enriched\", \"object\", \"enriched\");\n let enriched = root.getOrDefault<ObjectBuilder>(slotPath.get());\n\n if (enriched == null) {\n const enrichedSlot = root.get<SlotBlock>(\"factory.function.enriched\");\n enriched = enrichedSlot.variable(\"enriched\", { name: \"object\" }).object({ name: \"enriched\" });\n }\n\n enriched.property(`${property.name}: ${entitySelectorPath}`);\n }\n\n protected toNamedFunction(stringifiedFunction: string, parent: ContainerBlock) {\n const name = `_${uuid()}`;\n\n const builder = parent.function(name);\n const occurences = countWordOccurance(stringifiedFunction, \"=>\")\n\n if (occurences > 0) {\n\n const split = stringifiedFunction.split(\"=>\").map(w => w.trim());\n const parameters = split[0].replace(/\\(|\\)/g, \"\").split(\",\");\n let body = split[1];\n\n if (occurences > 1) {\n // we have a function that returns a function\n const index = stringifiedFunction.indexOf(\"=>\");\n body = stringifiedFunction.slice(index + 2, stringifiedFunction.length)\n }\n\n if (body.startsWith(\"{\") === true && body.endsWith(\"}\")) {\n\n // Remove brackets, wrapping function will have them\n builder.appendBody(body.slice(1, body.length - 1));\n\n return {\n builder,\n parameters\n };\n }\n\n builder.appendBody(`return ${body};`);\n return {\n builder,\n parameters\n }\n }\n\n throw new Error(\"Only arrow functions are allowed in the schema definition: function () {} ---> () => {}\");\n }\n}","export * from './blocks';\nexport * from './types';","/**\n * Counts non-overlapping occurrences of a term in text.\n *\n * Behavior:\n * - Case-sensitive matching\n * - If the search term is composed entirely of word characters (A–Z, a–z, 0–9, _),\n * enforce whole-word boundaries so \"red\" does not match inside \"redder\".\n * - If the search term contains any non-word character (e.g. \"=>\", \"()\", \"::\"),\n * match anywhere without boundary checks (useful for symbols).\n * - Non-overlapping matches (after a hit, advances by term length)\n * - Optimized single-character fast path; otherwise uses indexOf loop\n *\n * Examples:\n * - countWordOccurance(\"red redder red\", \"red\") => 2\n * - countWordOccurance(\"()=>{}\", \"=>\") => 1\n * - countWordOccurance(\"aaaa\", \"aa\") => 2 (non-overlapping)\n *\n * @param text The source text to scan\n * @param word The term to match (must be non-empty)\n * @returns The number of occurrences found\n */\nexport const countWordOccurance = (text: string, word: string) => {\n const wl = word.length;\n const tl = text.length;\n\n if (wl === 0 || wl > tl) return 0;\n\n // Fast path for single-character words\n if (wl === 1) {\n let c = 0;\n const code = word.charCodeAt(0);\n for (let i = 0; i < tl; i++) if (text.charCodeAt(i) === code) c++;\n return c;\n }\n\n let count = 0;\n let i = 0;\n\n function isWordCharCode(c: number): boolean {\n return (c >= 48 && c <= 57) // 0-9\n || (c >= 65 && c <= 90) // A-Z\n || (c >= 97 && c <= 122) // a-z\n || c === 95; // _\n }\n\n // Decide whether to enforce word boundaries based on the search term\n let enforceWordBoundaries = true;\n for (let k = 0; k < wl; k++) {\n const cc = word.charCodeAt(k);\n if (!isWordCharCode(cc)) {\n enforceWordBoundaries = false;\n break;\n }\n }\n\n while (true) {\n i = text.indexOf(word, i);\n if (i === -1) break;\n\n if (enforceWordBoundaries) {\n const left = i - 1;\n const right = i + wl;\n const leftOk = left < 0 || !isWordCharCode(text.charCodeAt(left));\n const rightOk = right >= tl || !isWordCharCode(text.charCodeAt(right));\n if (leftOk && rightOk) count++;\n } else {\n // No boundary enforcement for symbol-containing terms\n count++;\n }\n i += wl; // non-overlapping word matches\n }\n\n return count;\n}","import { EntityUpdateInfo } from \"../plugins/types\";\nimport { InferCreateType, InferType, SchemaId } from \"../schema\";\nimport { TagCollection } from \"./TagCollection\";\nexport class BulkPersistResult extends Map<SchemaId, SchemaPersistResult> {\n\n resolve(schemaId: SchemaId): SchemaPersistResult {\n if (this.has(schemaId)) {\n return this.get(schemaId);\n }\n\n this.set(schemaId, new SchemaPersistResult());\n\n return this.get(schemaId);\n }\n\n override get<T extends {} = Record<string, unknown>>(schemaId: SchemaId) {\n return super.get(schemaId) as SchemaPersistResult<T>\n }\n\n get aggregate() {\n return {\n size: this.aggregateSize,\n adds: this.aggregateAddsSize,\n updates: this.aggregateUpdatesSize,\n removes: this.aggregateRemovesSize\n }\n }\n\n private get aggregateSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.total;\n }\n\n return count;\n }\n\n private get aggregateAddsSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.adds.length;\n }\n\n return count;\n }\n\n private get aggregateUpdatesSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.updates.length;\n }\n\n return count;\n }\n\n private get aggregateRemovesSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.removes.length;\n }\n\n return count;\n }\n}\n\nexport class BulkPersistChanges extends Map<SchemaId, SchemaPersistChanges> {\n\n resolve(schemaId: SchemaId): SchemaPersistChanges {\n if (this.has(schemaId)) {\n return this.get(schemaId);\n }\n\n this.set(schemaId, new SchemaPersistChanges());\n\n return this.get(schemaId);\n }\n\n override get<T extends {} = Record<string, unknown>>(schemaId: SchemaId) {\n return super.get(schemaId) as SchemaPersistChanges<T>\n }\n\n get aggregate() {\n return {\n size: this.aggregateSize,\n adds: this.aggregateAddsSize,\n updates: this.aggregateUpdatesSize,\n removes: this.aggregateRemovesSize\n }\n }\n\n private get aggregateSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.total;\n }\n\n return count;\n }\n\n private get aggregateAddsSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.adds.length;\n }\n\n return count;\n }\n\n private get aggregateUpdatesSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.updates.length;\n }\n\n return count;\n }\n\n private get aggregateRemovesSize() {\n let count = 0;\n\n for (const [, result] of this) {\n count += result.removes.length;\n }\n\n return count;\n }\n\n /**\n * Ensures the result has the same result sets as the change sets\n * @returns \n */\n toResult() {\n const result = new BulkPersistResult();\n\n for (const [schemaId] of this) {\n result.set(schemaId, new SchemaPersistResult());\n }\n\n return result;\n }\n}\n\nexport class SchemaPersistChanges<T extends {} = Record<string, unknown>> {\n adds: InferCreateType<T>[] = [];\n updates: EntityUpdateInfo<T>[] = [];\n removes: InferType<T>[] = [];\n tags: TagCollection = new TagCollection();\n\n get hasItems() {\n return this.total > 0;\n }\n\n get total() {\n return this.adds.length + this.updates.length + this.removes.length;\n }\n}\n\nexport class SchemaPersistResult<T extends {} = Record<string, unknown>> {\n adds: InferType<T>[] = [];\n updates: InferType<T>[] = [];\n removes: InferType<T>[] = [];\n\n get hasItems() {\n return this.total > 0;\n }\n\n get total() {\n return this.adds.length + this.updates.length + this.removes.length;\n }\n}","import { IdType } from \"../schema\";\n\nexport class IdSet {\n\n readonly ids: readonly IdType[];\n\n constructor(...ids: IdType[]) {\n this.ids = Object.freeze(ids);\n }\n\n equals(other: IdSet): boolean {\n\n if (this.ids.length === 1) {\n return this.ids[0] === other.ids[0];\n }\n\n return this.toString() === other.toString();\n }\n\n toString(): string {\n\n if (this.ids.length === 1) {\n return String(this.ids[0]);\n }\n\n return this.ids.toString();\n }\n}","import { CompiledSchema, IdType, InferType, PropertyInfo, SchemaTypes } from \"../schema\";\nimport { CallbackResult, Result } from \"../results\";\nimport { uuidv4 } from \"../utilities\";\nimport { IdSet } from \"./IdSet\";\n\nexport class MemoryDataCollection {\n\n protected readonly nextNumericalIds: Map<string, number>;\n protected readonly data: Map<string, Record<string, unknown>>;\n protected readonly schema: CompiledSchema<any>;\n protected readonly idProperties: PropertyInfo<any>[];\n\n get size() {\n return this.data.size;\n }\n\n get records() {\n return [...this.data.values()];\n }\n\n constructor(schema: CompiledSchema<any>) {\n this.data = new Map<string, Record<string, unknown>>();\n this.nextNumericalIds = new Map<string, number>();\n this.schema = schema;\n this.idProperties = schema.idProperties;\n }\n\n private _getNextId(property: PropertyInfo<any>) {\n\n let nextId = 1;\n\n if (this.nextNumericalIds.has(property.id) === true) {\n nextId = this.nextNumericalIds.get(property.id) + 1;\n }\n\n this.nextNumericalIds.set(property.id, nextId);\n\n return nextId;\n }\n\n private getAndSetId(item: Record<string, unknown>, property: PropertyInfo<any>): IdType {\n if (item[property.name] != null) {\n return item[property.name] as IdType;\n }\n\n if (property.type === SchemaTypes.String) {\n const uuid = uuidv4()\n item[property.name] = uuid;\n return uuid;\n }\n\n if (property.type === SchemaTypes.Number) {\n const id = this._getNextId(property);\n item[property.name] = id;\n return id;\n }\n\n throw new Error(`Id Property '${property.name}' must be string or number, found '${property.type}'`)\n }\n\n seed(items: Record<string, unknown>[]) {\n for (let i = 0, length = items.length; i < length; i++) {\n const id = this.resolveIdSet(items[i] as InferType<unknown>);\n this.data.set(id.toString(), items[i]);\n }\n }\n\n private resolveCurrentIdSet(item: Record<string, unknown>): IdSet {\n const idProperties = this.schema.idProperties;\n const ids: IdType[] = [];\n // ensure keys\n for (let j = 0, l = idProperties.length; j < l; j++) {\n const property = idProperties[j];\n const value = property.getValue(item);\n\n if (value == null) {\n throw new Error(`Key cannot be null. Key: ${property.name}`);\n }\n\n ids.push(value);\n }\n\n return new IdSet(...ids);\n }\n\n private resolveIdSet(item: Record<string, unknown>): IdSet {\n\n if (this.schema.hasIdentityKeys) {\n const ids: IdType[] = [];\n const idProperties = this.schema.idProperties;\n\n if (idProperties.length === 1) {\n ids.push(this.getAndSetId(item, idProperties[0]));\n } else {\n for (let j = 0, l = idProperties.length; j < l; j++) {\n ids.push(this.getAndSetId(item, idProperties[j]));\n }\n }\n\n return new IdSet(...ids);\n }\n\n return this.resolveCurrentIdSet(item);\n }\n\n add(item: Record<string, unknown>) {\n const id = this.resolveIdSet(item);\n this.data.set(id.toString(), item);\n }\n\n remove(item: Record<string, unknown>) {\n const id = this.resolveCurrentIdSet(item);\n this.data.delete(id.toString());\n }\n\n update(item: Record<string, unknown>) {\n const id = this.resolveCurrentIdSet(item);\n this.data.set(id.toString(), item);\n }\n\n destroy(done: CallbackResult<never>) {\n this.nextNumericalIds.clear();\n this.data.clear();\n done(Result.success());\n }\n\n load(done: CallbackResult<never>) {\n done(Result.success())\n }\n\n save(done: CallbackResult<never>) {\n done(Result.success())\n }\n}","import { CompiledSchema, SchemaId } from \"../schema\";\n\n/**\n * Collection of schemas with generic typing for type-safe schema retrieval\n */\nexport class ReadonlySchemaCollection {\n\n protected data: Map<SchemaId, CompiledSchema<Record<string, unknown>>>;\n\n constructor(data?: [SchemaId, CompiledSchema<Record<string, unknown>>][]) {\n this.data = new Map<SchemaId, CompiledSchema<Record<string, unknown>>>(data);\n }\n\n get<T>(schemaId: SchemaId): CompiledSchema<T> | undefined {\n return this.data.get(schemaId) as CompiledSchema<T> | undefined;\n }\n\n has(schemaId: SchemaId): boolean {\n return this.data.has(schemaId);\n }\n\n get size(): number {\n return this.data.size;\n }\n\n keys(): IterableIterator<SchemaId> {\n return this.data.keys();\n }\n\n values(): IterableIterator<CompiledSchema<Record<string, unknown>>> {\n return this.data.values();\n }\n\n entries(): IterableIterator<[SchemaId, CompiledSchema<Record<string, unknown>>]> {\n return this.data.entries();\n }\n\n forEach(callbackfn: (value: CompiledSchema<Record<string, unknown>>, key: SchemaId, map: Map<SchemaId, CompiledSchema<Record<string, unknown>>>) => void, thisArg?: any): void {\n this.data.forEach(callbackfn, thisArg);\n }\n\n [Symbol.iterator](): IterableIterator<[SchemaId, CompiledSchema<Record<string, unknown>>]> {\n return this.data[Symbol.iterator]();\n }\n\n getByName<T>(collectionName: string): CompiledSchema<T> | undefined {\n const found = [...this.data].find(x => x[1].collectionName === collectionName);\n\n if (found != null) {\n return found[1] as CompiledSchema<T>;\n }\n\n return undefined;\n }\n}","import { CompiledSchema, SchemaId } from \"../schema\";\nimport { ReadonlySchemaCollection } from \"./ReadonlySchemaCollection\";\n\n/**\n * Collection of schemas with generic typing for type-safe schema retrieval\n */\nexport class SchemaCollection extends ReadonlySchemaCollection {\n\n set<T>(schemaId: SchemaId, schema: CompiledSchema<T>): this {\n this.data.set(schemaId, schema as CompiledSchema<Record<string, unknown>>);\n return this;\n }\n\n delete(schemaId: SchemaId): boolean {\n return this.data.delete(schemaId);\n }\n\n clear(): void {\n this.data.clear();\n }\n}","export class TagCollection implements Disposable {\n\n private data: Map<Object, unknown> = new Map<Object, unknown>();\n private _size: number = 0;\n\n get size() {\n return this._size;\n }\n\n get(key: Object) {\n return this.data.get(key);\n }\n\n has(key: Object) {\n return this.data.has(key);\n }\n\n set(key: Object, tag: unknown) {\n this._size++;\n return this.data.set(key, tag);\n }\n\n delete(key: Object) {\n const result = this.data.delete(key);\n\n if (result) {\n this._size--;\n }\n\n return result;\n }\n\n setMany(keys: Object[], tag: unknown) {\n this._size += keys.length;\n for (let i = 0, length = keys.length; i < length; i++) {\n const key = keys[i];\n this.set(key, tag);\n }\n }\n\n combine(tags: TagCollection) {\n for (const [key, value] of tags) {\n this.data.set(key, value);\n }\n }\n\n values() {\n return this.data.values();\n }\n\n keys() {\n return this.data.keys();\n }\n\n [Symbol.dispose]() {\n this.data = null as any;\n }\n\n [Symbol.iterator]() {\n return this.data[Symbol.iterator]();\n }\n}","export * from './Changes';\nexport * from './TagCollection';\nexport * from './IdSet';\nexport * from './MemoryDataCollection';\nexport * from './SchemaCollection';\nexport * from './ReadonlySchemaCollection';","export class SchemaError extends Error {\n\n constructor(error: any, innerErrorMessage: string) {\n super(`Error: ${error.message}; Inner Error: ${innerErrorMessage}`);\n }\n}","export { SchemaError } from './SchemaError';","export * from './parser';\nexport * from './types';\nexport * from './utils';","import { CompiledSchema, SchemaTypes } from \"../schema\";\nimport { Expression, OperatorExpression, ComparatorExpression, ValueExpression, PropertyExpression, Filter, ParamsFilter, Operator } from \"./types\";\n\n// Pre-compiled regex patterns for better performance\nconst METHOD_REGEX = /([a-zA-Z0-9_.]+)\\.(startsWith|endsWith|includes)\\(([^)]+)\\)(\\s*(===|==|!==|!=)\\s*(true|false))?/;\nconst TRANSFORM_METHOD_REGEX = /([a-zA-Z0-9_.]+)\\.(toLowerCase|toUpperCase|toLocaleLowerCase|toLocaleUpperCase)\\(\\)\\.(startsWith|endsWith|includes)\\(((?:[^()]|\\([^)]*\\))*)\\)(\\s*(===|==|!==|!=)\\s*(true|false))?/;\nconst EQUALITY_REGEX = /([^=!<>]+?)\\s*(===|==|!==|!=)\\s*(.+)/;\nconst COMPARISON_REGEX = /([^=!<>]+?)\\s*(>=|<=|>|<)\\s*(.+)/;\nconst PARAM_PATH_REGEX = /^([a-zA-Z0-9_.]+)/;\n\n// Pre-compiled regex patterns for comment removal\nconst SINGLE_LINE_COMMENT_REGEX = /\\/\\/.*$/gm;\nconst MULTI_LINE_COMMENT_REGEX = /\\/\\*[\\s\\S]*?\\*\\//g;\nconst WHITESPACE_REGEX = /\\s+/g;\n\n// need to have negated + strict\nconst comparators: Record<string, ComparatorExpression> = {\n startsWith: new ComparatorExpression({\n comparator: \"starts-with\",\n negated: false,\n strict: false\n }),\n endsWith: new ComparatorExpression({\n comparator: \"ends-with\",\n negated: false,\n strict: false\n }),\n includes: new ComparatorExpression({\n comparator: \"includes\",\n negated: false,\n strict: false\n }),\n \"==\": new ComparatorExpression({\n comparator: \"equals\",\n negated: false,\n strict: false\n }),\n \"===\": new ComparatorExpression({\n comparator: \"equals\",\n negated: false,\n strict: true\n }),\n \"!=\": new ComparatorExpression({\n comparator: \"equals\",\n negated: true,\n strict: false\n }),\n \"!==\": new ComparatorExpression({\n comparator: \"equals\",\n negated: true,\n strict: true\n }),\n \">=\": new ComparatorExpression({\n comparator: \"greater-than-equals\",\n negated: false,\n strict: false\n }),\n \">==\": new ComparatorExpression({\n comparator: \"greater-than-equals\",\n negated: false,\n strict: true\n }),\n \"<=\": new ComparatorExpression({\n comparator: \"less-than-equals\",\n negated: false,\n strict: false\n }),\n \"<==\": new ComparatorExpression({\n comparator: \"less-than-equals\",\n negated: false,\n strict: true\n }),\n \">\": new ComparatorExpression({\n comparator: \"greater-than\",\n negated: false,\n strict: false\n }),\n \"<\": new ComparatorExpression({\n comparator: \"less-than\",\n negated: false,\n strict: false\n })\n} as const;\n\n// Optimized comparator lookup using Map\nconst COMPARATOR_MAP = new Map(Object.entries(comparators));\n\n// Error message constants\nconst ERROR_MESSAGES = {\n COMPARATOR_NOT_FOUND: (value: string) => `Cannot find comparator: ${value}`,\n PROPERTY_NOT_FOUND: (path: string) => `Error parsing query, could not find PropertyInfo for path: ${path}`,\n PARAM_PATH_NOT_FOUND: (value: string, params: any) => `Cannot find path in params for .where(). Make sure parameters are not used inline.\\r\\nPath: ${value}, Params: ${JSON.stringify(params)}`\n};\n\nconst STRINGIFIED_COMPARE_OPERATORS = [\"true\", \"false\"];\n\nexport const combineExpressions = (...expressions: Expression[]): Expression => {\n\n if (expressions.length === 0) {\n throw new Error(\"combineExpressions requires at least 1 expression\");\n }\n\n\n if (expressions.length === 1) {\n return expressions[0];\n }\n\n // Start with the first expression\n let result = expressions[0];\n\n // Loop through remaining expressions and combine them\n for (let i = 1; i < expressions.length; i++) {\n result = new OperatorExpression({\n operator: \"&&\",\n left: result,\n right: expressions[i]\n });\n }\n\n return result;\n};\n\nexport const toExpression = <T extends any, P extends any>(schema: CompiledSchema<any>, fn: Filter<T> | ParamsFilter<T, P>, params?: P) => {\n try {\n const stringifiedFunction = fn.toString();\n\n // Optimized string parsing\n const arrowIndex = stringifiedFunction.indexOf('=>');\n if (arrowIndex === -1) {\n throw new Error(\"Invalid Function\");\n }\n\n const parameterNames = stringifiedFunction.substring(0, arrowIndex).trim();\n let expression = stringifiedFunction.substring(arrowIndex + 2).trim();\n\n // Remove JavaScript comments from the expression\n expression = expression\n .replace(SINGLE_LINE_COMMENT_REGEX, '') // Remove single-line comments\n .replace(MULTI_LINE_COMMENT_REGEX, '') // Remove multi-line comments\n .replace(WHITESPACE_REGEX, ' ') // Normalize whitespace\n .trim();\n\n let parameterData: { name: string, data: P } | undefined = undefined;\n\n if (params != null) {\n let name: string;\n if (parameterNames.includes(\"[\") && parameterNames.includes(\"]\")) {\n // Optimized parameter name extraction\n const commaIndex = parameterNames.indexOf(\",\");\n if (commaIndex !== -1) {\n const bracketIndex = parameterNames.indexOf(\"]\", commaIndex);\n if (bracketIndex !== -1) {\n name = parameterNames.substring(commaIndex + 1, bracketIndex).trim();\n }\n }\n }\n\n parameterData = {\n name,\n data: params\n };\n }\n\n return parseExpressionToTree(schema, expression, parameterData);\n } catch (e) {\n console.warn(\"Error parsing expression\", e);\n return Expression.NOT_PARSABLE;\n }\n}\n\nconst parseExpressionToTree = <P extends any>(schema: CompiledSchema<any>, expression: string, params?: { name: string, data: P }) => {\n\n const parse = (exp: string): Expression => {\n // Remove any wrapping parentheses\n exp = exp.trim();\n if (exp.startsWith('(') && exp.endsWith(')')) {\n let depth = 0;\n let isWrapper = true;\n for (let i = 0; i < exp.length; i++) {\n const char = exp[i];\n if (char === '(') {\n depth++;\n } else if (char === ')') {\n depth--;\n if (depth < 0) break; // Early exit for invalid parentheses\n }\n // Early exit if we find a closing parenthesis that's not the last character\n if (depth === 0 && i !== exp.length - 1) {\n isWrapper = false;\n break; // Early exit\n }\n // Early exit if we go negative (invalid parentheses)\n if (depth < 0) {\n isWrapper = false;\n break;\n }\n }\n if (isWrapper) {\n exp = exp.slice(1, -1).trim();\n }\n }\n\n // Parse based on the operator precedence\n let operator: Operator | null = null, splitIndex = -1, depth = 0;\n\n for (let i = 0; i < exp.length - 1; i++) {\n const char = exp[i];\n if (char === '(') depth++;\n else if (char === ')') depth--;\n else if (depth === 0) {\n // Optimized operator detection using character comparison\n if (char === '&' && exp[i + 1] === '&') {\n operator = '&&';\n splitIndex = i;\n break; // AND takes precedence over OR\n } else if (operator === null && char === '|' && exp[i + 1] === '|') {\n operator = '||';\n splitIndex = i;\n }\n }\n }\n\n if (operator) {\n const left = exp.slice(0, splitIndex).trim();\n const right = exp.slice(splitIndex + 2).trim();\n\n return new OperatorExpression({\n operator,\n left: parse(left),\n right: parse(right)\n });\n }\n\n // If no operator, try to parse as a condition\n return parseCondition(schema, exp, params);\n }\n\n return parse(expression);\n}\n\nconst convertAndAssignValue = (valueExpression: unknown, propertyPathExpression: unknown) => {\n\n assertIsPropertyPathExpression(propertyPathExpression);\n\n assertIsValueExpression(valueExpression)\n\n const propertyType = propertyPathExpression.property.type;\n\n valueExpression.value = converters[propertyType](valueExpression.value);\n}\n\nconst converters: Record<SchemaTypes, (value: unknown) => unknown> = {\n Array: v => v,\n Boolean: v => v == null ? v : Boolean(v),\n Computed: v => v,\n Date: v => v,\n Definition: v => v,\n Function: v => v,\n Number: v => v == null ? v : Number(v),\n Object: v => v,\n String: v => v == null ? v : String(v)\n};\n\nconst isExpression = (value: unknown): value is Expression => {\n return typeof value === \"object\" && value !== null && \"type\" in value;\n}\n\nfunction assertIsExpression(value: unknown): asserts value is Expression {\n if (isExpression(value) === false) {\n throw new Error(\"Assertion Failed: Value is not a Expression\")\n }\n}\n\nfunction assertIsPropertyPathExpression(value: unknown): asserts value is PropertyExpression {\n\n assertIsExpression(value);\n\n if (!(\"property\" in value)) {\n throw new Error(\"Assertion Failed: Value is not a PropertyPathExpression\")\n }\n}\n\nfunction assertIsValueExpression(value: unknown): asserts value is ValueExpression {\n\n assertIsExpression(value);\n\n if (!(\"value\" in value)) {\n throw new Error(\"Assertion Failed: Value is not a ValueExpression\")\n }\n}\n\n// Helper function to detect if a string is a property path\nconst isPropertyPath = (value: string, params?: { name: string, data: any }): boolean => {\n // Check for dot notation (e.g., entity.name)\n if (value.includes('.') && value.match(/^[a-zA-Z0-9_.]+$/) !== null) {\n return true;\n }\n // Check for bracket notation with literal strings (e.g., entity[\"name\"], entity['name'], or entity[\\\"name\\\"] with escaped quotes)\n const literalBracketPattern = /^[a-zA-Z_$][a-zA-Z0-9_$]*(\\[\\\\?[\"'][^\"']+\\\\?[\"']\\])+$/;\n if (literalBracketPattern.test(value)) {\n return true;\n }\n // Check for bracket notation with parameter paths (e.g., entity[p.name], entity[params.property])\n if (params && value.includes('[') && value.includes(']')) {\n const bracketMatch = value.match(/\\[([^\\]]+)\\]/);\n if (bracketMatch) {\n const bracketContent = bracketMatch[1].trim();\n // Check if it's a parameter path - should start with params.name followed by dot, or be just params.name\n const isParamPath = bracketContent.startsWith(params.name + '.') || bracketContent === params.name;\n if (isParamPath || (bracketContent.includes('.') && bracketContent.match(PARAM_PATH_REGEX))) {\n return true;\n }\n }\n }\n return false;\n};\n\n// Helper function to determine if we need to swap the operator for reversed comparisons\nconst getSwappedOperator = (operator: string): string => {\n const swapMap: Record<string, string> = {\n '>': '<',\n '<': '>',\n '>=': '<=',\n '<=': '>='\n };\n return swapMap[operator] || operator;\n};\n\nconst parseCondition = <P extends any>(schema: CompiledSchema<any>, expression: string, params?: { name: string, data: P }): Expression => {\n\n // Optimized string operations - single trim operation\n const trimmed = expression.trim();\n const isNegation = trimmed.startsWith('!');\n const finalExpression = isNegation ? trimmed.slice(1).trim() : trimmed;\n\n // Enhanced pattern matching for complex expressions\n const methodMatch = finalExpression.match(METHOD_REGEX);\n const transformMethodMatch = finalExpression.match(TRANSFORM_METHOD_REGEX);\n const equalityMatch = finalExpression.match(EQUALITY_REGEX);\n const comparisonMatch = finalExpression.match(COMPARISON_REGEX);\n\n if (methodMatch) {\n // Handle .startsWith or .endsWith\n const comparator = getComparator(methodMatch[2]);\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n // Check if the left side is a parameter path\n const leftSide = methodMatch[1];\n const rightSide = methodMatch[3];\n\n if (params && leftSide.startsWith(params.name)) {\n // This is a parameter path on the left side (e.g., params.distinctPlayers.includes(entity.playerId))\n // For includes method, we need to swap left and right sides\n if (methodMatch[2] === 'includes') {\n\n const property = getProperty(schema, rightSide, params);\n const value = getValue(leftSide, params); // retrieve the original value\n const serializer = property.property.valueSerializer;\n\n comparator.left = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n comparator.right = property;\n } else {\n // For other methods, return NOT_PARSABLE for now\n return Expression.NOT_PARSABLE;\n }\n } else {\n // Normal case: property on left, value on right\n const property = getProperty(schema, leftSide, params);\n const serializer = property.property.valueSerializer;\n const value = getValue(rightSide, params); // retrieve the original value\n\n comparator.left = property;\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n }\n\n // If the comparison is explicitly to false, mark it as negated\n if (methodMatch[6] === \"false\") {\n comparator.negated = true;\n }\n\n return comparator;\n }\n\n // Check for transformations on the value side (right side of comparison) - check this FIRST\n const valueTransformMatch = finalExpression.match(/([^=!<>]+?)\\s*(===|==|!==|!=)\\s*([^)]+)\\.(toLowerCase|toUpperCase|toLocaleLowerCase|toLocaleUpperCase)\\(\\)/);\n if (valueTransformMatch) {\n const comparator = getComparator(valueTransformMatch[2]);\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n const property = getProperty(schema, valueTransformMatch[1].trim(), params);\n const serializer = property.property.valueSerializer;\n const value = getValue(valueTransformMatch[3], params); // retrieve the original value\n\n // Create the property expression for the left side (no transformer)\n const propertyExpression = property;\n\n // Create a ValueExpression for the right side with transformer\n const valueExpression = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n // Set transformer and locale based on the method\n const method = valueTransformMatch[4];\n if (method === 'toLowerCase' || method === 'toLocaleLowerCase') {\n valueExpression.transformer = 'to-lower-case';\n if (method === 'toLocaleLowerCase') {\n valueExpression.locale = 'en-US';\n }\n } else {\n valueExpression.transformer = 'to-upper-case';\n if (method === 'toLocaleUpperCase') {\n valueExpression.locale = 'en-US';\n }\n }\n\n comparator.left = propertyExpression;\n comparator.right = valueExpression;\n\n return comparator;\n }\n\n if (transformMethodMatch) {\n // Handle .toLowerCase or .toUpperCase on the property side\n const comparator = getComparator(transformMethodMatch[3]); // e.g., startsWith, endsWith, includes\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n // Create the property expression for the left side with transformer\n const property = getProperty(schema, transformMethodMatch[1], params);\n\n // Set transformer and locale based on the method\n const method = transformMethodMatch[2];\n if (method === 'toLowerCase' || method === 'toLocaleLowerCase') {\n property.transformer = 'to-lower-case';\n if (method === 'toLocaleLowerCase') {\n property.locale = 'en-US'; // Default locale, could be extracted from method call\n }\n } else {\n property.transformer = 'to-upper-case';\n if (method === 'toLocaleUpperCase') {\n property.locale = 'en-US'; // Default locale, could be extracted from method call\n }\n }\n\n // Create a ValueExpression for the right side\n let value = getValue(transformMethodMatch[4], params);\n\n // Check if the value also has a transformation (but only if it's not already handled by value-side check)\n const valueTransformMatch = transformMethodMatch[4].match(/^([^)]+)\\.(toLowerCase|toUpperCase|toLocaleLowerCase|toLocaleUpperCase)\\(\\)$/);\n\n if (valueTransformMatch) {\n // Create a new ValueExpression with the base value and transformer\n value = new ValueExpression({\n value: valueTransformMatch[1].replace(/^[\"']|[\"']$/g, '') // Remove quotes\n });\n\n // Set transformer and locale based on the method\n const valueMethod = valueTransformMatch[2];\n if (valueMethod === 'toLowerCase' || valueMethod === 'toLocaleLowerCase') {\n value.transformer = 'to-lower-case';\n if (valueMethod === 'toLocaleLowerCase') {\n value.locale = 'en-US'; // Default locale\n }\n } else {\n value.transformer = 'to-upper-case';\n if (valueMethod === 'toLocaleUpperCase') {\n value.locale = 'en-US'; // Default locale\n }\n }\n }\n\n const serializer = property.property.valueSerializer;\n\n comparator.left = property;\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n // If the comparison is explicitly to false, mark it as negated\n if (transformMethodMatch[7] === \"false\") {\n comparator.negated = true;\n }\n\n return comparator;\n }\n\n if (equalityMatch) {\n const left = equalityMatch[1].trim();\n const operator = equalityMatch[2];\n const right = equalityMatch[3].trim();\n\n const leftIsProperty = isPropertyPath(left, params);\n const rightIsProperty = isPropertyPath(right, params);\n\n // Determine which side is the property and which is the value\n let propertySide: string, valueSide: string, finalOperator: string;\n\n if (leftIsProperty && !rightIsProperty) {\n // Normal case: property === value\n propertySide = left;\n valueSide = right;\n finalOperator = operator;\n } else if (!leftIsProperty && rightIsProperty) {\n // Reversed case: value === property\n propertySide = right;\n valueSide = left;\n finalOperator = operator;\n } else {\n // Both sides look like properties or neither does - assume left is property\n propertySide = left;\n valueSide = right;\n finalOperator = operator;\n }\n\n const comparator = getComparator(finalOperator);\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n const property = getProperty(schema, propertySide, params);\n const value = getValue(valueSide, params);\n const serializer = property.property.valueSerializer;\n\n comparator.left = property;\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n convertAndAssignValue(comparator.right, comparator.left);\n\n return comparator;\n }\n\n if (comparisonMatch) {\n const left = comparisonMatch[1].trim();\n const operator = comparisonMatch[2];\n const right = comparisonMatch[3].trim();\n\n const leftIsProperty = isPropertyPath(left, params);\n const rightIsProperty = isPropertyPath(right, params);\n\n // Determine which side is the property and which is the value\n let propertySide: string, valueSide: string, finalOperator: string;\n\n if (leftIsProperty && !rightIsProperty) {\n // Normal case: property > value\n propertySide = left;\n valueSide = right;\n finalOperator = operator;\n } else if (!leftIsProperty && rightIsProperty) {\n // Reversed case: value > property -> property < value\n propertySide = right;\n valueSide = left;\n finalOperator = getSwappedOperator(operator);\n } else {\n // Both sides look like properties or neither does - assume left is property\n propertySide = left;\n valueSide = right;\n finalOperator = operator;\n }\n\n const comparator = getComparator(finalOperator);\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n const property = getProperty(schema, propertySide, params);\n const value = getValue(valueSide, params);\n const serializer = property.property.valueSerializer;\n\n comparator.left = property;\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n convertAndAssignValue(comparator.right, comparator.left);\n\n return comparator;\n }\n\n // Check for standalone property reference (truthy comparison)\n // Pattern: property name only (e.g., \"w.inStock\" -> w.inStock === true)\n const standalonePropertyMatch = finalExpression.match(/^[a-zA-Z_$][a-zA-Z0-9_$]*(\\.[a-zA-Z_$][a-zA-Z0-9_$]*)*$/);\n if (standalonePropertyMatch && isPropertyPath(finalExpression, params)) {\n const comparator = getComparator('===');\n\n if (isNegation) {\n comparator.negated = isNegation;\n }\n\n const property = getProperty(schema, finalExpression, params);\n const value = getValue('true', params);\n const serializer = property.property.valueSerializer;\n\n comparator.left = property;\n // need to parse the value so it matches what the serializer expects\n comparator.right = serializer ? getValue(String(property.property.valueSerializer(JSON.parse(value.value as any)))) : value;\n\n return comparator;\n }\n\n // If we get here, the expression is too complex for the current parser\n // This is expected for complex real-world expressions\n throw new Error(`Unsupported expression format: ${finalExpression}`);\n}\n\nconst getComparator = (value: string): ComparatorExpression => {\n\n const comparator = COMPARATOR_MAP.get(value);\n\n if (comparator == null) {\n throw new Error(ERROR_MESSAGES.COMPARATOR_NOT_FOUND(value))\n }\n\n // Return a new instance to avoid modifying the cached one\n return new ComparatorExpression({\n comparator: comparator.comparator,\n negated: comparator.negated,\n strict: comparator.strict\n });\n}\n\nconst getValue = <P extends any>(value: string, params?: { name: string, data: P }): ValueExpression => {\n\n // Early return for string literals\n if (value.startsWith(\"\\'\") || value.startsWith(\"\\\"\")) {\n return new ValueExpression({\n value: value.replace(/\\\"|\\'/g, \"\")\n });\n }\n\n // Early return for null/undefined\n if (value === \"null\") {\n return new ValueExpression({ value: null });\n }\n\n if (value === \"undefined\" || value === \"void 0\") {\n return new ValueExpression({ value: undefined });\n }\n\n // Optimized number parsing with early return\n const numValue = +value;\n if (!isNaN(numValue) && isFinite(numValue)) {\n return new ValueExpression({ value: numValue });\n }\n\n // Handle parameter paths if params are provided\n if (params != null) {\n // Check if this is a parameter path (starts with params.name)\n if (value.startsWith(params.name)) {\n return new ValueExpression({\n value: getValueFromParams(value, params)\n });\n }\n\n // Check if this is a parameter path without the params prefix\n if (value.includes('.')) {\n // Try to extract the parameter path\n const paramMatch = value.match(PARAM_PATH_REGEX);\n if (paramMatch) {\n const potentialParamPath = paramMatch[1];\n try {\n const paramValue = getValueFromParams(`${params.name}.${potentialParamPath}`, params);\n return new ValueExpression({ value: paramValue });\n } catch (e) {\n // Not a parameter path, continue with normal parsing\n }\n }\n }\n }\n\n if (STRINGIFIED_COMPARE_OPERATORS.includes(value)) {\n return new ValueExpression({ value });\n }\n\n if (isNaN(numValue)) {\n // value is a variable passed in by the dev, we cannot evaluate it's value\n // need to fallback to select all by throwing an error\n throw new Error(`Cannot derive value from variable, please pass parameters into the expression.\n\nExample: .where(([x, params]) => x.id === params.id, { id: someVar.id })\nIssue At: ${value}`);\n }\n\n // Default case: return as-is\n return new ValueExpression({ value });\n}\n\nconst getValueFromParams = <P extends any>(value: string, params: { name: string, data: P }) => {\n\n const split = value.split('.');\n\n // Early exit for invalid paths\n if (split.length === 1) {\n throw new Error(ERROR_MESSAGES.PARAM_PATH_NOT_FOUND(value, params.data))\n }\n\n let result = params.data as any;\n\n // For nested params - start from index 1 to skip the params prefix\n for (let i = 1; i < split.length; i++) {\n const name = split[i];\n\n if (name in result) {\n result = result[name];\n continue;\n }\n\n throw new Error(ERROR_MESSAGES.PARAM_PATH_NOT_FOUND(value, params.data))\n }\n\n return result;\n}\n\nconst getProperty = <P extends any>(schema: CompiledSchema<any>, value: string, params?: { name: string, data: P }): PropertyExpression => {\n let pathString: string;\n\n // Handle bracket notation (e.g., entity[\"name\"], entity['name'], entity[p.name], or entity[\\\"name\\\"] with escaped quotes)\n if (value.includes('[') && value.includes(']')) {\n // First try to match literal string brackets: [\"name\"], ['name'], [\\\"name\\\"], [\\'name\\']\n const literalBracketMatches = value.matchAll(/\\[\\\\?[\"']([^\"']+)\\\\?[\"']\\]/g);\n const pathParts: string[] = [];\n let foundLiteral = false;\n\n for (const match of literalBracketMatches) {\n // match[1] is the property name inside the brackets\n const propName = match[1];\n if (propName) {\n pathParts.push(propName);\n foundLiteral = true;\n }\n }\n\n // If no literal matches found, try parameter path in brackets (e.g., [p.name])\n if (!foundLiteral && params) {\n // Match brackets containing parameter paths: [p.name], [params.property], etc.\n const bracketParamMatch = value.match(/\\[([^\\]]+)\\]/);\n if (bracketParamMatch) {\n const bracketContent = bracketParamMatch[1].trim();\n\n // Check if this is a parameter path\n // It should start with params.name (e.g., \"p\") followed by a dot, or be just params.name\n const isParamPath = bracketContent.startsWith(params.name + '.') || bracketContent === params.name;\n\n if (isParamPath || (bracketContent.includes('.') && bracketContent.match(PARAM_PATH_REGEX))) {\n try {\n // Try to resolve as a parameter path\n let paramPath: string;\n if (bracketContent.startsWith(params.name + '.') || bracketContent === params.name) {\n // Already has params.name prefix\n paramPath = bracketContent;\n } else {\n // Add params.name prefix\n const paramMatch = bracketContent.match(PARAM_PATH_REGEX);\n paramPath = paramMatch\n ? `${params.name}.${paramMatch[1]}`\n : `${params.name}.${bracketContent}`;\n }\n\n const resolvedValue = getValueFromParams(paramPath, params);\n // The resolved value should be the property name\n if (typeof resolvedValue === 'string') {\n pathParts.push(resolvedValue);\n } else {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n } catch (e) {\n // Not a valid parameter path, continue to error\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n } else {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n } else {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n }\n\n if (pathParts.length === 0) {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n\n pathString = pathParts.join(\".\");\n } else if (value.includes('.')) {\n // Handle dot notation (e.g., entity.name)\n const pathSplit = value.split(/[?!.]/g).slice(1);\n pathString = pathSplit.join(\".\");\n } else {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n\n // Early exit if no path found\n if (!pathString) {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n\n const found = schema.properties.find(w => w.getAssignmentPath() == pathString);\n\n if (found == null) {\n throw new Error(ERROR_MESSAGES.PROPERTY_NOT_FOUND(value));\n }\n\n return new PropertyExpression({ property: found });\n}\n\n\n","import { QueryOptionExecutionTarget } from \"../plugins\";\nimport { PropertyInfo } from \"../schema\";\n\nexport type ParsedExpression = {\n expression: Expression;\n // Will be memory when trying to query on an untracked computed property or on a function\n executionTarget: QueryOptionExecutionTarget;\n}\n\n/**\n * The base class for all expression types.\n */\nexport abstract class Expression {\n /** The type of the expression. */\n abstract readonly type: ExpressionType;\n /** The left-hand side of the expression (if applicable). */\n left?: Expression;\n /** The right-hand side of the expression (if applicable). */\n right?: Expression;\n\n constructor(left?: Expression, right?: Expression) {\n this.left = left;\n this.right = right;\n }\n\n static get EMPTY() {\n return new EmptyExpression();\n }\n\n static get NOT_PARSABLE() {\n return new NotParsableExpression();\n }\n\n static isEmpty(expression: Expression) {\n return expression.type === \"empty\" || expression instanceof EmptyExpression;\n }\n\n static isNotParsable(expression: Expression) {\n return expression.type === \"not-parsable\" || expression instanceof NotParsableExpression;\n }\n}\n\nexport class EmptyExpression extends Expression {\n readonly type = \"empty\" as const;\n}\n\nexport class NotParsableExpression extends Expression {\n readonly type = \"not-parsable\" as const;\n}\n\n/**\n * A class representing a comparison operation (e.g., equals, greater-than).\n */\nexport class ComparatorExpression extends Expression {\n /** The type of the expression (always 'comparator'). */\n readonly type = \"comparator\" as const;\n /** The comparator operation (e.g., equals, greater-than). */\n comparator: Comparator;\n /** Whether the comparison is negated (e.g., not equals). */\n negated: boolean;\n /** Whether the comparison is strict (type-sensitive). */\n strict: boolean;\n\n constructor(\n options: {\n comparator: Comparator,\n negated: boolean,\n strict: boolean,\n left?: Expression,\n right?: Expression\n }\n ) {\n super(options.left, options.right);\n this.comparator = options.comparator;\n this.negated = options.negated;\n this.strict = options.strict;\n }\n}\n\n/**\n * A class representing a logical operator (e.g., &&, ||).\n */\nexport class OperatorExpression extends Expression {\n /** The type of the expression (always 'operator'). */\n readonly type = \"operator\" as const;\n /** The logical operator. */\n operator: Operator;\n\n constructor(options: { operator: Operator, left?: Expression, right?: Expression }) {\n super(options.left, options.right);\n this.operator = options.operator;\n }\n}\n\n/**\n * A class representing a property path.\n */\nexport class PropertyExpression extends Expression {\n /** The type of the expression (always 'property'). */\n readonly type = \"property\" as const;\n /** The property info for the path. */\n property: PropertyInfo<any>;\n transformer: Transformer | null = null;\n locale: string | null = null;\n\n constructor(options: { property: PropertyInfo<any> }) {\n super();\n this.property = options.property;\n }\n}\n\n/**\n * A class representing a literal value.\n */\nexport class ValueExpression extends Expression {\n /** The type of the expression (always 'value'). */\n readonly type = \"value\" as const;\n /** The literal value. */\n value: unknown;\n\n transformer: Transformer | null = null;\n locale: string | null = null;\n\n constructor(options: {\n value: unknown\n }) {\n super();\n this.value = options.value;\n }\n}\n\n\n/**\n * The set of possible expression types.\n */\nexport type ExpressionType = \"operator\" | \"comparator\" | \"property\" | \"value\" | \"empty\" | \"not-parsable\";\n\n/**\n * Supported value transformations that can be applied to values.\n */\nexport type Transformer = \"to-lower-case\" | \"to-upper-case\";\n\n/**\n * Supported comparator operations for expressions.\n */\nexport type Comparator =\n | \"equals\"\n | \"starts-with\"\n | \"includes\"\n | \"ends-with\"\n | \"greater-than\"\n | \"greater-than-equals\"\n | \"less-than\"\n | \"less-than-equals\";\n\n/**\n * Supported logical operators for expressions.\n */\nexport type Operator = \"&&\" | \"||\";\n\n/**\n * A function that filters a value of type T and returns a boolean.\n */\nexport type Filter<T extends any> = (value: T) => boolean;\n\n/**\n * A function that filters a value of type T with additional parameters P.\n */\nexport type ParamsFilter<T extends any, P> = (payload: [T, P]) => boolean;\n\n/**\n * A filter that can be either a simple filter or a parameterized filter.\n */\nexport type CompositeFilter<T extends any, P = never> = Filter<T> | ParamsFilter<T, P>;\n\n/**\n * An object that can be filtered using a composite filter and optional parameters.\n */\nexport type Filterable<T extends any, P = any> = {\n /** The filter function. */\n filter: CompositeFilter<T, P>;\n /** Optional parameters for the filter. */\n params?: P;\n}","import { PropertyInfo } from \"../schema\";\nimport { Expression, PropertyExpression } from \"./types\";\n\n/**\n * Extracts all properties referenced in an expression\n * @param expression The expression to analyze\n * @returns Array of PropertyInfo objects referenced in the expression\n */\nexport function getProperties(expression: Expression): PropertyInfo<any>[] {\n const properties: PropertyInfo<any>[] = [];\n\n function traverse(expr: Expression) {\n // If this is a property expression, add it to our collection\n if (expr.type === \"property\") {\n properties.push((expr as PropertyExpression).property);\n }\n\n // Traverse left and right expressions if they exist\n if (expr.left) {\n traverse(expr.left);\n }\n if (expr.right) {\n traverse(expr.right);\n }\n }\n\n traverse(expression);\n return properties;\n}\n\nexport function isPropertyExpression(expression: Expression): expression is PropertyExpression {\n return expression.type === \"property\";\n}\n\nexport function forEach(expression: Expression, callback: (expression: Expression) => boolean) {\n function traverse(expr: Expression): boolean {\n // Call the callback for this expression\n // If callback returns false, stop traversing\n if (!callback(expr)) {\n return false;\n }\n\n // Traverse left and right expressions if they exist\n if (expr.left) {\n if (!traverse(expr.left)) {\n return false;\n }\n }\n if (expr.right) {\n if (!traverse(expr.right)) {\n return false;\n }\n }\n\n return true;\n }\n\n traverse(expression);\n}","const measurements: Record<string, number> = {}\n\nexport const now = (): number => {\n if (typeof performance !== 'undefined' && performance.now) {\n // Browser or modern Node.js\n return performance.now();\n }\n\n // Fallback for older environments\n return Date.now();\n}\n\nexport const measure = {\n start: (name: string): void => {\n measurements[name] = now();\n },\n end: (name: string): void => {\n const start = measurements[name];\n\n delete measurements[name];\n\n const delta = now() - start;\n\n console.log(`[ROUTIER] - Performance: ${name} took ${delta}`);\n }\n}","export type SyncronousUnitOfWork = (done: () => void) => void\n\nexport class SyncronousQueue {\n\n private readonly _queue: SyncronousUnitOfWork[] = [];\n private _current: SyncronousUnitOfWork | null = null;\n\n enqueue(unitOfWork: SyncronousUnitOfWork) {\n this._queue.push(unitOfWork);\n this._next();\n }\n\n private _next() {\n if (this._current != null || this._queue.length === 0) {\n return;\n }\n\n // Take first item\n this._current = this._queue.shift() ?? null;\n\n if (this._current == null) {\n return;\n }\n\n this._current(() => {\n this._current = null;\n this._next();\n })\n }\n}","import { CallbackResult, Result, ResultType } from \"../results\";\n\n/**\n * Type definition for an asynchronous function that takes data and a callback.\n * TIn: The input data type.\n * TOut: The output data type (passed to the callback).\n */\nexport type Processor<TIn, TOut> = (data: TIn, callback: (result: TOut, error?: any) => void) => void;\n\n// Return type for a step execution: Either the next step function or null if waiting/done.\ntype StepResult<TData> = TrampolineStep<TData> | null;\ntype TrampolineStep<TData> = () => StepResult<TData>;\n\nexport class TrampolinePipeline<TInitial, TCurrent = TInitial> {\n private _list: Processor<any, any>[] = [];\n private _hasErrored: boolean = false; // Flag to prevent calling done on error\n\n filter<TFinal>(initialData: TInitial, done: (data: TFinal, error?: any) => void) {\n\n this._hasErrored = false; // Reset error flag on new execution\n\n if (this._list.length === 0) {\n queueMicrotask(() => done(initialData as any as TFinal));\n return;\n }\n\n let index = 0;\n let currentData: any = initialData;\n let isRunning = false; // Guard against overlapping trampoline calls\n\n try {\n // --- Revised Completion Logic --- (Moved up for clarity)\n const finalStepSentinel = (): StepResult<any> => { // A special step function for the very end\n // Only call done if no error has occurred\n if (!this._hasErrored) {\n queueMicrotask(() => done(currentData as TFinal));\n }\n return null; // Stop the trampoline\n };\n\n const createStepRevised = (idx: number): TrampolineStep<any> => {\n return () => {\n if (this._hasErrored) return null; // Stop if an error occurred elsewhere\n\n if (idx >= this._list.length) {\n return finalStepSentinel(); // Execute the dedicated final step\n }\n\n const processor = this._list[idx];\n // Initialize syncCallbackResult to null to satisfy StepResult type\n let syncCallbackResult: StepResult<any> = null;\n let calledSync = false;\n\n try {\n processor(currentData, (result, error) => {\n // --- Error Handling ---\n if (error) {\n console.error(`Error reported by processor at index ${idx}:`, error);\n this._hasErrored = true; // Set flag\n // Throw the error to be caught by outer try...catch blocks\n throw error;\n }\n // --- /Error Handling ---\n\n // If no error, proceed as before\n currentData = result;\n index = idx + 1; // Update index for the next step\n const nextStep = createStepRevised(index); // Use updated index\n\n if (isRunning) {\n // Callback was synchronous\n syncCallbackResult = nextStep; // Store next step function\n calledSync = true;\n } else {\n // Callback was asynchronous, restart trampoline\n trampoline(nextStep);\n }\n });\n } catch (error) {\n if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback\n console.error(`Error thrown by processor at index ${idx} or its callback:`, error);\n this._hasErrored = true;\n }\n // Rethrow to be caught by the trampoline's catch block\n throw error;\n }\n\n if (calledSync) {\n // Return the next step function for the sync loop\n return syncCallbackResult;\n } else {\n // Pause trampoline for async, loop will stop as step returns null\n return null;\n }\n };\n };\n\n // The trampoline loop\n const trampoline = (step: TrampolineStep<any> | null) => {\n\n if (isRunning) {\n return;\n }\n\n isRunning = true;\n let currentStep = step;\n\n while (typeof currentStep === 'function') {\n try {\n // Stop immediately if an error was flagged elsewhere\n if (this._hasErrored) {\n currentStep = null;\n break;\n }\n currentStep = currentStep(); // Execute step, get next step or null\n } catch (trampolineError) {\n // Catch errors propagated from step execution (processor or callback errors)\n if (!this._hasErrored) { // Avoid double logging\n console.error(\"Error during trampoline step execution:\", trampolineError);\n this._hasErrored = true;\n }\n currentStep = null; // Stop the loop\n // We don't call `done` here because an error occurred.\n // The application should handle the uncaught exception if desired.\n break; // Explicitly break loop on error\n }\n }\n // Loop ends when currentStep is null or loop is broken by error\n isRunning = false;\n\n // Completion check is now handled by finalStepSentinel ensuring `done` isn't called on error.\n };\n\n // --- Start the process ---\n index = 0; // Reset index\n currentData = initialData; // Reset data\n trampoline(createStepRevised(0)); // Start with the revised step creator\n } catch (error: any) {\n done(currentData, error);\n }\n }\n\n pipe<TNext>(processor: Processor<TCurrent, TNext>) {\n this._list.push(processor);\n return this as unknown as TrampolinePipeline<TInitial, TNext>;\n }\n\n pipeEach(items: TCurrent[], fn: (payload: ResultType<TCurrent>, done: CallbackResult<TCurrent>) => void, map: (previous: ResultType<TCurrent>, current: ResultType<TCurrent>) => ResultType<TCurrent>) {\n for (let i = 0, length = items.length; i < length; i++) {\n\n this.pipe<ResultType<TCurrent>>((previous, done) => {\n\n fn(map(previous as ResultType<TCurrent>, Result.success(items[i])), done);\n });\n }\n }\n}\n\nexport type AsyncUnitOfWork<TData, TResult> = (payload: TData, done: CallbackResult<TResult>) => void;\nexport class AsyncPipeline<TData, TResult> {\n private _list: [TData, AsyncUnitOfWork<TData, TResult>][] = [];\n private _hasErrored: boolean = false; // Flag to prevent calling done on error\n\n filter(done: CallbackResult<TResult[]>) {\n\n this._hasErrored = false; // Reset error flag on new execution\n let currentData: TResult[] = [];\n\n if (this._list.length === 0) {\n queueMicrotask(() => done(Result.success()));\n return;\n }\n\n let index = 0;\n let isRunning = false; // Guard against overlapping trampoline calls\n\n try {\n // --- Revised Completion Logic --- (Moved up for clarity)\n const finalStepSentinel = (): StepResult<any> => { // A special step function for the very end\n // Only call done if no error has occurred\n if (!this._hasErrored) {\n queueMicrotask(() => done(Result.success(currentData)));\n }\n return null; // Stop the trampoline\n };\n\n const createStepRevised = (idx: number): TrampolineStep<any> => {\n return () => {\n if (this._hasErrored) return null; // Stop if an error occurred elsewhere\n\n if (idx >= this._list.length) {\n return finalStepSentinel(); // Execute the dedicated final step\n }\n\n const [payload, processor] = this._list[idx];\n // Initialize syncCallbackResult to null to satisfy StepResult type\n let syncCallbackResult: StepResult<any> = null;\n let calledSync = false;\n\n try {\n processor(payload, (result) => {\n // --- Error Handling ---\n if (result.ok === Result.ERROR) {\n console.error(`Error reported by AsyncPipeline at index ${idx}:`, result.error);\n this._hasErrored = true; // Set flag\n // Throw the error to be caught by outer try...catch blocks\n throw result.error;\n }\n // --- /Error Handling ---\n\n // If no error, proceed as before\n currentData.push(result.data);\n index = idx + 1; // Update index for the next step\n const nextStep = createStepRevised(index); // Use updated index\n\n if (isRunning) {\n // Callback was synchronous\n syncCallbackResult = nextStep; // Store next step function\n calledSync = true;\n } else {\n // Callback was asynchronous, restart trampoline\n trampoline(nextStep);\n }\n });\n } catch (error) {\n if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback\n console.error(`Error thrown by processor at index ${idx} or its callback:`, error);\n this._hasErrored = true;\n }\n // Rethrow to be caught by the trampoline's catch block\n throw error;\n }\n\n if (calledSync) {\n // Return the next step function for the sync loop\n return syncCallbackResult;\n } else {\n // Pause trampoline for async, loop will stop as step returns null\n return null;\n }\n };\n };\n\n // The trampoline loop\n const trampoline = (step: TrampolineStep<any> | null) => {\n\n if (isRunning) {\n return;\n }\n\n isRunning = true;\n let currentStep = step;\n\n while (typeof currentStep === 'function') {\n try {\n // Stop immediately if an error was flagged elsewhere\n if (this._hasErrored) {\n currentStep = null;\n break;\n }\n currentStep = currentStep(); // Execute step, get next step or null\n } catch (trampolineError) {\n // Catch errors propagated from step execution (processor or callback errors)\n if (!this._hasErrored) { // Avoid double logging\n console.error(\"Error during trampoline step execution:\", trampolineError);\n this._hasErrored = true;\n }\n currentStep = null; // Stop the loop\n // We don't call `done` here because an error occurred.\n // The application should handle the uncaught exception if desired.\n break; // Explicitly break loop on error\n }\n }\n // Loop ends when currentStep is null or loop is broken by error\n isRunning = false;\n\n // Completion check is now handled by finalStepSentinel ensuring `done` isn't called on error.\n };\n\n // --- Start the process ---\n index = 0; // Reset index\n trampoline(createStepRevised(0)); // Start with the revised step creator\n } catch (error: any) {\n done(Result.error(error));\n }\n }\n\n pipe(data: TData, processor: AsyncUnitOfWork<TData, TResult>) {\n this._list.push([data, processor]);\n }\n\n pipeEach(items: TData[], processor: AsyncUnitOfWork<TData, TResult>) {\n for (let i = 0, length = items.length; i < length; i++) {\n this.pipe(items[i], processor);\n }\n }\n}\n\nexport type UnitOfWork = (done: CallbackResult<never>) => void;\n\n/**\n * Processes functions with callbacks asynchronously.\n * \n * This pipeline handles work items that contain callback functions,\n * executing them in an asynchronous manner while maintaining proper\n * flow control and error handling.\n */\nexport class WorkPipeline {\n private unitsOfWork: UnitOfWork[] = [];\n private _hasErrored: boolean = false; // Flag to prevent calling done on error\n\n filter(done: CallbackResult<never>) {\n\n this._hasErrored = false; // Reset error flag on new execution\n\n if (this.unitsOfWork.length === 0) {\n queueMicrotask(() => done(Result.success()));\n return;\n }\n\n let index = 0;\n let isRunning = false; // Guard against overlapping trampoline calls\n\n try {\n // --- Revised Completion Logic --- (Moved up for clarity)\n const finalStepSentinel = (): StepResult<never> => { // A special step function for the very end\n // Only call done if no error has occurred\n if (!this._hasErrored) {\n queueMicrotask(() => done(Result.success()));\n }\n return null; // Stop the trampoline\n };\n\n const createStepRevised = (idx: number): TrampolineStep<any> => {\n return () => {\n if (this._hasErrored) return null; // Stop if an error occurred elsewhere\n\n if (idx >= this.unitsOfWork.length) {\n return finalStepSentinel(); // Execute the dedicated final step\n }\n\n const processor = this.unitsOfWork[idx];\n // Initialize syncCallbackResult to null to satisfy StepResult type\n let syncCallbackResult: StepResult<any> = null;\n let calledSync = false;\n\n try {\n processor((result) => {\n // --- Error Handling ---\n if (result.ok === Result.ERROR) {\n console.error(`Error reported by AsyncPipeline at index ${idx}:`, result.error);\n this._hasErrored = true; // Set flag\n // Throw the error to be caught by outer try...catch blocks\n throw result.error;\n }\n // --- /Error Handling ---\n\n // If no error, proceed as before\n index = idx + 1; // Update index for the next step\n const nextStep = createStepRevised(index); // Use updated index\n\n if (isRunning) {\n // Callback was synchronous\n syncCallbackResult = nextStep; // Store next step function\n calledSync = true;\n } else {\n // Callback was asynchronous, restart trampoline\n trampoline(nextStep);\n }\n });\n } catch (error) {\n if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback\n console.error(`Error thrown by processor at index ${idx} or its callback:`, error);\n this._hasErrored = true;\n }\n // Rethrow to be caught by the trampoline's catch block\n throw error;\n }\n\n if (calledSync) {\n // Return the next step function for the sync loop\n return syncCallbackResult;\n } else {\n // Pause trampoline for async, loop will stop as step returns null\n return null;\n }\n };\n };\n\n // The trampoline loop\n const trampoline = (step: TrampolineStep<any> | null) => {\n\n if (isRunning) {\n return;\n }\n\n isRunning = true;\n let currentStep = step;\n\n while (typeof currentStep === 'function') {\n try {\n // Stop immediately if an error was flagged elsewhere\n if (this._hasErrored) {\n currentStep = null;\n break;\n }\n currentStep = currentStep(); // Execute step, get next step or null\n } catch (trampolineError) {\n // Catch errors propagated from step execution (processor or callback errors)\n if (!this._hasErrored) { // Avoid double logging\n console.error(\"Error during trampoline step execution:\", trampolineError);\n this._hasErrored = true;\n }\n currentStep = null; // Stop the loop\n // We don't call `done` here because an error occurred.\n // The application should handle the uncaught exception if desired.\n break; // Explicitly break loop on error\n }\n }\n // Loop ends when currentStep is null or loop is broken by error\n isRunning = false;\n\n // Completion check is now handled by finalStepSentinel ensuring `done` isn't called on error.\n };\n\n // --- Start the process ---\n index = 0; // Reset index\n trampoline(createStepRevised(0)); // Start with the revised step creator\n } catch (error: any) {\n done(Result.error(error));\n }\n }\n\n pipe(work: UnitOfWork) {\n this.unitsOfWork.push(work);\n }\n}","export * from './SyncronousQueue';\nexport * from './TrampolinePipeline';","import { assertIsNotNull } from '../assertions';\nimport { BulkPersistResult } from '../collections';\nimport { WorkPipeline } from '../pipeline';\nimport { DbPluginBulkPersistEvent, DbPluginEvent, DbPluginQueryEvent, IDbPlugin, ITranslatedValue, JsonTranslator } from '.';\nimport { PluginEventCallbackPartialResult, PluginEventCallbackResult, PluginEventResult, Result } from '../results';\nimport { CompiledSchema, InferCreateType, InferType } from '../schema';\nimport { DeepPartial } from '../types';\nimport { MemoryDataCollection } from '../collections/MemoryDataCollection';\nimport { UnknownRecord } from '../utilities';\n\nexport abstract class EphemeralDataPlugin implements IDbPlugin {\n\n protected databaseName: string;\n\n constructor(databaseName: string) {\n this.databaseName = databaseName;\n }\n\n protected abstract resolveCollection<TEntity extends {}>(schema: CompiledSchema<TEntity>): MemoryDataCollection;\n\n bulkPersist(event: DbPluginBulkPersistEvent, done: PluginEventCallbackPartialResult<BulkPersistResult>) {\n try {\n const bulkPersistResult = event.operation.toResult();\n const schemas = event.schemas;\n const pipeline = new WorkPipeline();\n let hasWork = false;\n\n for (const [schemaId, changes] of event.operation) {\n const { adds, hasItems, removes, updates } = changes;\n\n if (!hasItems) {\n continue;\n }\n\n hasWork = true;\n const result = bulkPersistResult.get(schemaId);\n const schema = schemas.get(schemaId);\n assertIsNotNull(schema);\n\n pipeline.pipe((d) => {\n try {\n const collection = this.resolveCollection(schema);\n collection.load(readResult => {\n if (readResult.ok === Result.ERROR) {\n d(readResult);\n return;\n }\n\n const addsLength = adds.length;\n const updatesLength = updates.length;\n const removesLength = removes.length;\n result.adds = new Array(addsLength);\n result.updates = new Array(updatesLength);\n result.removes = new Array(removesLength);\n\n for (let j = 0; j < addsLength; j++) {\n const item = adds[j];\n collection.add(item);\n result.adds[j] = item as DeepPartial<InferCreateType<UnknownRecord>>;\n }\n\n for (let j = 0; j < updatesLength; j++) {\n const item = updates[j].entity;\n collection.update(item);\n result.updates[j] = item;\n }\n\n for (let j = 0; j < removesLength; j++) {\n collection.remove(removes[j]);\n result.removes[j] = removes[j];\n }\n\n collection.save(saveResult => {\n if (saveResult.ok === Result.ERROR) {\n d(saveResult);\n return;\n }\n d(Result.success());\n });\n });\n } catch (e) {\n d(Result.error(e));\n }\n });\n }\n\n // If there is no work, just return the result\n if (!hasWork) {\n done(PluginEventResult.success(event.id, bulkPersistResult));\n return;\n }\n\n pipeline.filter((result) => {\n if (result.ok === Result.ERROR) {\n done(PluginEventResult.error(event.id, result.error));\n return;\n }\n done(PluginEventResult.success(event.id, bulkPersistResult));\n });\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n query<TEntity extends {}, TShape extends any = TEntity>(event: DbPluginQueryEvent<TEntity, TShape>, done: PluginEventCallbackResult<ITranslatedValue<TShape>>): void {\n try {\n const operation = event.operation;\n const schema = operation.schema;\n const translator = new JsonTranslator<TEntity, TShape>(operation);\n const collection = this.resolveCollection(schema);\n\n collection.load(r => {\n if (r.ok === Result.ERROR) {\n done(PluginEventResult.error(event.id, r.error));\n return;\n }\n\n const records = collection.records;\n const length = records.length;\n const cloned: Record<string, unknown>[] = new Array(length);\n\n for (let i = 0; i < length; i++) {\n cloned[i] = schema.clone(records[i] as InferType<TEntity>);\n }\n\n done(PluginEventResult.success(event.id, translator.translate(cloned)));\n });\n } catch (e) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n abstract destroy(event: DbPluginEvent, done: PluginEventCallbackResult<never>): void;\n}","export * from './types';\nexport * from './translators';\nexport * from './replication';\nexport * from './query';\nexport * from './EphemeralDataPlugin';","\nimport { CompiledSchema } from '../../schema';\nimport { IQuery } from '../types';\nimport { QueryOptionsCollection } from './QueryOptionsCollection';\n\nexport class Query<TRoot extends {}, TShape> implements IQuery<TRoot, TShape> {\n\n readonly options: QueryOptionsCollection<TShape>;\n readonly schema: CompiledSchema<TRoot>;\n private enableChangeTrackingOverride?: boolean\n\n constructor(\n options: QueryOptionsCollection<TShape>,\n schema: CompiledSchema<TRoot>,\n enableChangeTrackingOverride?: boolean,\n ) {\n this.schema = schema;\n this.options = options;\n this.enableChangeTrackingOverride = enableChangeTrackingOverride;\n }\n\n // boolean value whether or not change tracking can be enabled on the query result\n get changeTracking(): boolean {\n\n if (this.enableChangeTrackingOverride != null) {\n return this.enableChangeTrackingOverride;\n }\n\n const map = this.options.getValues(\"map\");\n const count = this.options.has(\"count\");\n const max = this.options.has(\"max\");\n const min = this.options.has(\"min\");\n const sum = this.options.has(\"sum\");\n\n if (map.some(x => x.fields.length > 0)) {\n return false\n }\n\n if (count === true ||\n max === true ||\n min === true ||\n sum === true) {\n return false\n }\n\n return true;\n }\n\n static EMPTY<T extends {}, S>(schema: CompiledSchema<T>) {\n return new Query<T, S>(QueryOptionsCollection.EMPTY<S>(), schema);\n }\n\n static isEmpty<T extends {}, S>(query: IQuery<T, S>) {\n return QueryOptionsCollection.isEmpty(query.options);\n }\n\n static toString<TRoot extends {}, TShape>(query: IQuery<TRoot, TShape>) {\n return JSON.stringify({\n options: query.options.items,\n schema: {\n id: query.schema.id,\n collectionName: query.schema.collectionName\n },\n changeTracking: query.changeTracking\n })\n }\n}","import { forEach, isPropertyExpression } from \"../../expressions/utils\";\nimport { QueryOption, QueryOptionName, QueryOptionExecutionTarget, QueryOptionValueMap } from \"./types\";\n\nexport type QueryCollectionItem<T, K extends QueryOptionName> = { index: number, option: QueryOption<T, K> };\n\nexport class QueryOptionsCollection<T> {\n\n private options: Map<QueryOptionName, QueryCollectionItem<any, any>[]> = new Map<QueryOptionName, QueryCollectionItem<any, any>[]>();\n private nextExecutionTarget: QueryOptionExecutionTarget = \"database\";\n private nextIndex: number = 0;\n private enumeratedItems: QueryCollectionItem<any, any>[] = [];\n\n get items() {\n return this.options;\n }\n\n get isEmpty() {\n return this.items.size === 0;\n }\n\n static EMPTY<R>() {\n return new QueryOptionsCollection<R>();\n }\n\n static isEmpty<T>(options: QueryOptionsCollection<T>) {\n return options.isEmpty;\n }\n\n add<K extends QueryOptionName>(name: K, value: QueryOption<T, K>[\"value\"]) {\n\n if (name === \"map\") {\n const mapValue = value as QueryOptionValueMap<T>[\"map\"];\n\n // Evaluate the map value to see if we are renaming properties, \n // if we are we need to perform everything after in memory\n if (mapValue.fields.some(x => x.isRename === true) || mapValue.fields.some(x => x.property?.isUnmapped === true)) {\n // Cut over to memory execution since we are renaming a property with .map\n // We do not want to figure out how the new name flows through the entire query\n this.nextExecutionTarget = \"memory\";\n }\n }\n\n if (name === \"filter\") {\n // Need to check for unmapped properties\n const filterValue = value as QueryOptionValueMap<T>[\"filter\"];\n\n if (filterValue.expression.type === \"not-parsable\") {\n this.nextExecutionTarget = \"memory\";\n } else {\n forEach(filterValue.expression, (expression) => {\n\n if (isPropertyExpression(expression) && expression.property.isUnmapped) {\n // Cut over to memory execution, unmapped properties are not in the database and\n // cannot be queried\n this.nextExecutionTarget = \"memory\";\n return false;\n }\n\n return true;\n });\n }\n }\n\n const item: QueryCollectionItem<T, K> = {\n index: this.nextIndex,\n option: {\n name,\n target: this.nextExecutionTarget,\n value\n }\n }\n\n this.nextIndex++;\n\n const found = this.options.get(name);\n\n this.options.set(name, [...found ?? [], item]);\n }\n\n split(): { memory: QueryOptionsCollection<T>, database: QueryOptionsCollection<T> } {\n this.resolveEnumeration();\n\n const sortedItems = this.enumeratedItems.toSorted((a, b) => a.index - b.index);\n const memoryQueryOptionsCollection = new QueryOptionsCollection<T>();\n const databaseQueryOptionsCollection = new QueryOptionsCollection<T>();\n\n for (let i = 0, length = sortedItems.length; i < length; i++) {\n const sortedItem = sortedItems[i];\n\n if (sortedItem.option.target === \"database\") {\n databaseQueryOptionsCollection.add(sortedItem.option.name, sortedItem.option.value);\n continue;\n }\n\n memoryQueryOptionsCollection.add(sortedItem.option.name, sortedItem.option.value);\n }\n\n return {\n memory: memoryQueryOptionsCollection,\n database: databaseQueryOptionsCollection\n }\n }\n\n has<K extends QueryOptionName>(name: K): boolean {\n return this.options.has(name);\n }\n\n get<K extends QueryOptionName>(name: K): QueryCollectionItem<T, K>[] {\n return this.options.get(name) ?? [] as QueryCollectionItem<T, K>[];\n }\n\n getLast<K extends QueryOptionName>(name: K): QueryOption<T, K> | null {\n this.resolveEnumeration();\n\n for (let i = this.enumeratedItems.length - 1; i >= 0; i--) {\n const item = this.enumeratedItems[i];\n\n if (item.option.name === name) {\n return item.option;\n }\n }\n\n return null\n }\n\n getValues<K extends QueryOptionName>(name: K): QueryCollectionItem<T, K>[\"option\"][\"value\"][] | undefined {\n\n const found = this.options.get(name);\n\n if (found == null) {\n return [];\n }\n\n return found.map(w => w.option.value) as QueryCollectionItem<T, K>[\"option\"][\"value\"][];\n }\n\n private getEnumeration() {\n return [...this.options.values()].flat().toSorted((a, b) => a.index - b.index);\n }\n\n private resolveEnumeration() {\n if (this.enumeratedItems.length != this.nextIndex) {\n this.enumeratedItems = this.getEnumeration();\n }\n }\n\n forEach(iterator: (item: QueryCollectionItem<T, any>[\"option\"]) => void) {\n this.resolveEnumeration();\n\n for (let i = 0, length = this.enumeratedItems.length; i < length; i++) {\n iterator(this.enumeratedItems[i].option);\n }\n }\n}","export * from './Query';\nexport * from './QueryOptionsCollection';\nexport * from './types';","import { Expression, Filter, ParamsFilter } from \"../../expressions\";\nimport { PropertyInfo } from \"../../schema\";\nimport { GenericFunction } from \"../../types\";\n\nexport enum QueryOrdering {\n Descending = \"desc\",\n Ascending = \"asc\"\n}\n\n/**\n * Field mapping for a query result, including source and destination names and a getter function.\n */\nexport type QueryField = {\n sourceName: string,\n destinationName: string,\n isRename: boolean;\n property?: PropertyInfo<unknown>;\n getter: <T>(data: Record<string, unknown>) => T;\n};\n\nexport type QueryOptionExecutionTarget = \"database\" | \"memory\";\nexport type QueryOptionName = keyof QueryOptionValueMap<unknown>;\n\nexport type QueryOption<T, K extends QueryOptionName> = {\n name: QueryOptionName;\n value: QueryOptionValueMap<T>[K],\n target: QueryOptionExecutionTarget;\n}\n\nexport type QueryOptionValueMap<T extends {}> = {\n skip: number;\n take: number;\n sort: { selector: GenericFunction<T, T[keyof T]>, direction: QueryOrdering, propertyName: string };\n map: { selector: GenericFunction<T, any>, fields: QueryField[] };\n group: { selector: GenericFunction<T, any>, key: QueryField, fields: QueryField[] };\n filter: { params?: {}, filter: ParamsFilter<T, {}> | Filter<T>, expression: Expression };\n min: true; // True or not set\n max: true; // True or not set\n count: true; // True or not set\n sum: true; // True or not set\n distinct: true; // True or not set\n};\n\n/**\n * Sort specification for a query.\n */\nexport type QuerySort = { key: string, selector: (item: unknown) => unknown, direction: \"asc\" | \"desc\" };","import { PluginEventCallbackPartialResult, PluginEventCallbackResult, PluginEventResult, Result } from '../../results';\nimport { DbPluginBulkPersistEvent, DbPluginEvent, DbPluginQueryEvent, IDbPlugin, OptimisticReplicationPluginOptions } from '../types';\nimport { WorkPipeline } from '../../pipeline'; 7\nimport { CompiledSchema } from '../../schema';\nimport { Query } from '../query';\nimport { resolveBulkPersistChanges, uuid } from '../../utilities';\nimport { BulkPersistChanges, BulkPersistResult } from '../../collections';\nimport { ITranslatedValue } from '../translators';\n\nconst getMemoryPluginCollectionSize = <T extends {}>(plugin: IDbPlugin, schema: CompiledSchema<T>): number => {\n\n if (\"getCollectionSize\" in plugin && typeof plugin.getCollectionSize === \"function\") {\n return plugin.getCollectionSize(schema.collectionName) as number;\n }\n\n throw new Error(\"Cannot get size of collection for MemoryPlugin, not an instance of MemoryPlugin\");\n}\n\ntype HydrationStatus =\n | \"hydration-not-started\"\n | \"hydration-pending\"\n | \"hydration-error\"\n | \"hydration-success\";\n\nlet hydrationStatus: HydrationStatus = \"hydration-not-started\";\n\nexport class OptimisticReplicationDbPlugin implements IDbPlugin {\n\n protected plugins: OptimisticReplicationPluginOptions;\n\n protected constructor(plugins: OptimisticReplicationPluginOptions) {\n this.plugins = plugins;\n }\n\n /**\n * Creates a new OptimisticDbPluginReplicator that coordinates operations between a source database and its replicas.\n * \n * @param source The primary database plugin that will receive all operations first\n * @param replicas Additional database plugins that will replicate operations from the source\n * @returns A new DbPluginReplicator instance that manages the source-replica relationship\n */\n static create(plugins: OptimisticReplicationPluginOptions) {\n return new OptimisticReplicationDbPlugin(plugins);\n }\n\n /**\n * Will query the read plugin if there is one, otherwise the source plugin will be queried\n */\n query<TEntity extends {}, TShape extends any = TEntity>(event: DbPluginQueryEvent<TEntity, TShape>, done: PluginEventCallbackResult<ITranslatedValue<TShape>>): void {\n try {\n\n const readPlugin = this.plugins.read;\n const sourcePlugin = this.plugins.source;\n const collectionSize = getMemoryPluginCollectionSize(this.plugins.read, event.operation.schema);\n\n if (collectionSize === 0 && hydrationStatus === \"hydration-not-started\") {\n\n // Notify the cache that the db was hydrated right away\n hydrationStatus = \"hydration-pending\";\n\n console.log('[ROUTIER] - Optimistic Query', hydrationStatus);\n\n // nothing is hydrated, let's try and hydrate before querying\n // Memory plugin might not be hydrated, lets hydrate it for the targeted schema only,\n // Other queries will do the same and hydrate if needed\n // We want to select all data here\n sourcePlugin.query<TEntity, TShape>({\n id: uuid(8),\n schemas: event.schemas,\n source: \"collection\",\n // Select All Data\n operation: Query.EMPTY<TEntity, TShape>(event.operation.schema)\n }, (sourceResult) => {\n\n if (sourceResult.ok === Result.ERROR) {\n\n // Notify that hydration failed\n hydrationStatus = \"hydration-error\";\n console.log(\"[ROUTIER] - Hydration Error - Source Query\", sourceResult);\n done(sourceResult);\n return;\n }\n\n if (sourceResult == null || (Array.isArray(sourceResult.data) && sourceResult.data.length === 0)) {\n // Notify that hydration had no data\n hydrationStatus = \"hydration-error\";\n console.log(\"[ROUTIER] - Hydration Error - No Data\", sourceResult);\n done(sourceResult);\n return;\n }\n\n if (Array.isArray(sourceResult.data) === false) {\n // Notify that hydration failed\n hydrationStatus = \"hydration-error\";\n console.log(\"[ROUTIER] - Hydration Error - Bad Result\", sourceResult);\n done(PluginEventResult.error(event.id, \"Query result is not an array\"));\n return;\n }\n\n const changesCollection = new BulkPersistChanges();\n const schemaChanges = changesCollection.resolve(event.operation.schema.id);\n\n // Add the existing items into the persist payload as adds\n schemaChanges.adds = sourceResult.data;\n\n readPlugin.bulkPersist({\n id: uuid(8),\n schemas: event.schemas,\n operation: changesCollection,\n source: \"collection\",\n }, (readPersistResult) => {\n\n if (readPersistResult.ok === Result.ERROR) {\n // Notify that hydration failed\n hydrationStatus = \"hydration-error\";\n console.log(\"[ROUTIER] - Hydration Error - Could Not Save\", readPersistResult);\n done(readPersistResult);\n return;\n }\n\n hydrationStatus = \"hydration-success\";\n\n // requery the read plugin\n readPlugin.query(event, done);\n });\n });\n\n return;\n }\n\n // Collection is hydrated for the targeted collection and should be in sync\n readPlugin.query(event, (readResult) => {\n\n if (readResult.ok === Result.ERROR) {\n done(readResult);\n return;\n }\n\n done(readResult);\n return;\n\n });\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n destroy(event: DbPluginEvent, done: PluginEventCallbackResult<never>): void {\n try {\n\n const workPipeline = new WorkPipeline();\n const plugins = [this.plugins.source, ...this.plugins.replicas];\n\n for (let i = 0, length = plugins.length; i < length; i++) {\n workPipeline.pipe((done) => plugins[i].destroy(event, done));\n }\n\n workPipeline.filter((result) => {\n\n if (result.ok === Result.ERROR) {\n done(PluginEventResult.error(event.id, result.error));\n return;\n }\n\n done(PluginEventResult.success(event.id));\n });\n\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n bulkPersist(event: DbPluginBulkPersistEvent, done: PluginEventCallbackPartialResult<BulkPersistResult>): void {\n try {\n\n const workPipeline = new WorkPipeline();\n const deferredPlugins = [this.plugins.source, ... this.plugins.replicas];\n\n // Since we are doing optimistic, we insert into the read plugin first and assume later plugins will succeed\n // This means the read plugin will generate ids for the source plugin\n this.plugins.read.bulkPersist({\n id: uuid(8),\n operation: event.operation,\n schemas: event.schemas,\n source: \"data-store\",\n }, (r) => {\n\n if (r.ok !== Result.SUCCESS) {\n done(r);\n return;\n }\n\n // optimistically call done and still continue saving the rest of the data. We read from the memory\n // db anyways\n done(r);\n\n const optimisticBulkPersistChanges = new BulkPersistChanges();\n\n // make sure we swap the adds here, that way we can make sure other persist events\n // don't take their additions and try to change subsequent calls\n resolveBulkPersistChanges(event, r.data, optimisticBulkPersistChanges);\n\n for (let i = 0, length = deferredPlugins.length; i < length; i++) {\n workPipeline.pipe((d) => {\n\n const plugin = deferredPlugins[i];\n\n plugin.bulkPersist({\n id: uuid(8),\n operation: optimisticBulkPersistChanges,\n schemas: event.schemas,\n source: \"data-store\",\n }, (r) => {\n\n if (r.ok === Result.ERROR) {\n d(r);\n return;\n }\n\n d(Result.success());\n });\n });\n }\n\n setTimeout(() => {\n workPipeline.filter((_) => {\n // no-op for now, maybe implement retries?\n });\n }, 5);\n });\n\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n}","import { PluginEventCallbackPartialResult, PluginEventCallbackResult, PluginEventResult, Result } from '../../results';\nimport { DbPluginBulkPersistEvent, DbPluginEvent, DbPluginQueryEvent, IDbPlugin, ReplicationPluginOptions } from '../types';\nimport { AsyncPipeline, WorkPipeline } from '../../pipeline';\nimport { BulkPersistResult } from '../../collections';\nimport { resolveBulkPersistChanges } from '../../utilities';\nimport { ITranslatedValue } from '../translators';\n\nexport class ReplicationDbPlugin implements IDbPlugin {\n\n plugins: ReplicationPluginOptions;\n\n protected constructor(plugins: ReplicationPluginOptions) {\n this.plugins = plugins;\n }\n\n /**\n * Creates a new DbPluginReplicator that coordinates operations between a source database and its replicas.\n * \n * @param source The primary database plugin that will receive all operations first\n * @param replicas Additional database plugins that will replicate operations from the source\n * @returns A new DbPluginReplicator instance that manages the source-replica relationship\n */\n static create(plugins: ReplicationPluginOptions) {\n return new ReplicationDbPlugin(plugins);\n }\n\n /**\n * Will query the read plugin if there is one, otherwise the source plugin will be queried\n */\n query<TEntity extends {}, TShape extends any = TEntity>(event: DbPluginQueryEvent<TEntity, TShape>, done: PluginEventCallbackResult<ITranslatedValue<TShape>>): void {\n try {\n\n const plugin = this.plugins.read != null ? this.plugins.read : this.plugins.source;\n\n plugin.query(event, done);\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n destroy(event: DbPluginEvent, done: PluginEventCallbackResult<never>): void {\n try {\n\n const pipeline = new AsyncPipeline<IDbPlugin, never>();\n const plugins = [this.plugins.source, ...this.plugins.replicas];\n\n for (let i = 0, length = plugins.length; i < length; i++) {\n pipeline.pipe(plugins[i], (plugin, done) => plugin.destroy(event, done));\n }\n\n pipeline.filter((result) => {\n\n if (result.ok === Result.ERROR) {\n done(PluginEventResult.error(event.id, result.error));\n return;\n }\n\n done(PluginEventResult.success(event.id));\n });\n\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n\n\n bulkPersist(event: DbPluginBulkPersistEvent, done: PluginEventCallbackPartialResult<BulkPersistResult>): void {\n try {\n // insert into the source first to generate any ids, then take the result and persist that into the replicas\n const pipeline = new WorkPipeline();\n const plugins = [this.plugins.source, ...this.plugins.replicas];\n\n if (this.plugins.read != null) {\n plugins.push(this.plugins.read);\n }\n\n const result = new BulkPersistResult();\n\n for (let i = 0, length = plugins.length; i < length; i++) {\n pipeline.pipe((d) => {\n\n const plugin = plugins[i];\n\n // source is first\n if (i === 0) {\n plugin.bulkPersist(event, (r) => {\n\n if (r.ok === Result.ERROR) {\n d(r)\n return;\n }\n\n // make sure we swap the adds here, that way we can make sure other persist events\n // don't take their additions and try to change subsequent calls\n resolveBulkPersistChanges(event, r.data, event.operation);\n\n d(Result.success());\n });\n return;\n }\n\n plugin.bulkPersist(event, (r) => {\n\n if (r.ok === Result.ERROR) {\n d(r)\n return;\n }\n\n d(Result.success());\n });\n })\n }\n\n let successCount = 0;\n\n pipeline.filter((r) => {\n\n if (r.ok === Result.ERROR) {\n\n if (successCount > 0) {\n done(PluginEventResult.partial(event.id, result, r.error));\n return;\n }\n\n done(PluginEventResult.error(event.id, r.error));\n return;\n }\n\n successCount++;\n\n done(PluginEventResult.success(event.id, result));\n });\n\n } catch (e: any) {\n done(PluginEventResult.error(event.id, e));\n }\n }\n}","export * from './ReplicationDbPlugin';\nexport * from './OptimisticReplicationDbPlugin';\nexport * from './types';","import { QueryOption, QueryOptionName } from \"../query/types\";\nimport { IQuery } from \"../types\";\nimport { TranslatedArrayValue } from \"./TranslatedArrayValue\";\nimport { TranslatedGroupValue } from \"./TranslatedGroupValue\";\nimport { TranslatedSingleValue } from \"./TranslatedSingleValue\";\nimport { ITranslatedValue } from \"./types\";\n\nexport abstract class DataTranslator<TRoot extends {}, TShape> {\n\n protected query: IQuery<TRoot, TShape>;\n private functionMap: Record<QueryOptionName, (data: unknown, option: QueryOption<any, any>) => TShape> = {\n count: (data: unknown, option: QueryOption<TShape, \"count\">) => this.count<any>(data, option),\n distinct: (data: unknown, option: QueryOption<TShape, \"distinct\">) => this.distinct(data, option),\n filter: (data: unknown, option: QueryOption<TShape, \"filter\">) => this.filter(data, option),\n map: (data: unknown, option: QueryOption<TShape, \"map\">) => this.map(data, option),\n max: (data: unknown, option: QueryOption<TShape, \"max\">) => this.max<any>(data, option),\n min: (data: unknown, option: QueryOption<TShape, \"min\">) => this.min<any>(data, option),\n skip: (data: unknown, option: QueryOption<TShape, \"skip\">) => this.skip(data, option),\n sort: (data: unknown, option: QueryOption<TShape, \"sort\">) => this.sort(data, option),\n sum: (data: unknown, option: QueryOption<TShape, \"sum\">) => this.sum<any>(data, option),\n take: (data: unknown, option: QueryOption<TShape, \"take\">) => this.take(data, option),\n group: (data: unknown, option: QueryOption<TShape, \"group\">) => this.group(data, option)\n };\n\n constructor(query: IQuery<TRoot, TShape>) {\n this.query = query;\n }\n\n // Terminators\n abstract count<TResult extends number>(data: unknown, option: QueryOption<TShape, \"count\">): TResult;\n abstract min<TResult extends string | number | Date>(data: unknown, option: QueryOption<TShape, \"min\">): TResult;\n abstract max<TResult extends string | number | Date>(data: unknown, option: QueryOption<TShape, \"max\">): TResult;\n abstract sum<TResult extends number>(data: unknown, option: QueryOption<TShape, \"sum\">): TResult;\n abstract distinct<TResult>(data: unknown, option: QueryOption<TShape, \"distinct\">): TResult;\n\n // Shapers\n abstract filter<TResult>(data: unknown, option: QueryOption<TShape, \"filter\">): TResult;\n abstract skip(data: unknown, option: QueryOption<TShape, \"skip\">): TShape;\n abstract take(data: unknown, option: QueryOption<TShape, \"take\">): TShape;\n abstract sort(data: unknown, option: QueryOption<TShape, \"sort\">): TShape;\n abstract map(data: unknown, option: QueryOption<TShape, \"map\">): TShape;\n abstract group(data: unknown, option: QueryOption<TShape, \"group\">): TShape;\n\n translate(data: unknown): ITranslatedValue<TShape> {\n\n this.query.options.forEach(item => {\n data = this.functionMap[item.name](data, item);\n });\n\n if (Array.isArray(data)) {\n return new TranslatedArrayValue<TShape>(data);\n }\n\n if (this.query.options.has(\"group\")) {\n return new TranslatedGroupValue<TShape>(data);\n }\n\n return new TranslatedSingleValue<TShape>(data);\n }\n}","import { DataTranslator } from \"./DataTranslator\";\nimport { QueryOption } from \"../query/types\";\nimport { assertIsArray } from \"../../assertions\";\nimport { ParamsFilter } from \"../../expressions\";\nimport { isDate, UnknownRecord } from \"../../utilities\";\nimport { IdType } from \"../../schema\";\n\nexport class JsonTranslator<TRoot extends {}, TShape> extends DataTranslator<TRoot, TShape> {\n\n override filter<TResult>(data: unknown, option: QueryOption<TShape, \"filter\">): TResult {\n\n assertIsArray(data);\n\n if (option.value.filter) {\n\n if (option.value.params == null) {\n // standard filtering\n return data.filter(option.value.filter) as TResult;\n }\n\n // params filtering\n const selector = option.value.filter as ParamsFilter<unknown, {}>\n return data.filter(w => selector([w, option.value.params])) as TResult;\n }\n\n return data as TResult;\n }\n\n override map<T>(data: unknown, option: QueryOption<T, \"map\">): T {\n\n if (Array.isArray(data) == false) {\n throw new Error(\"Can only map an array of data\");\n }\n\n const response = new Array(data.length);\n\n for (let i = 0, length = data.length; i < length; i++) {\n\n for (let j = 0, l = option.value.fields.length; j < l; j++) {\n const field = option.value.fields[j];\n\n if (field.property != null) {\n const value = field.property.getValue(data[i]);\n\n if (value != null) {\n // Some types do not support deserialization (Array, Function, Computed, etc), just directly set the incoming value\n const resolvedValue = field.property.supportsDeserialization ? field.property.deserialize(value) : value;\n field.property.setValue(data[i], resolvedValue);\n }\n }\n }\n\n response[i] = option.value.selector(data[i]);\n }\n\n return response as T;\n }\n\n override group<T>(data: unknown, option: QueryOption<T, \"group\">): T {\n\n if (Array.isArray(data) == false) {\n throw new Error(\"Can only group an array of data\");\n }\n\n const group: Record<IdType, unknown[]> = {};\n\n for (let i = 0, length = data.length; i < length; i++) {\n\n const keyValue = option.value.selector(data[i]) as IdType;\n\n if (!group[keyValue]) {\n group[keyValue] = [];\n }\n\n const item: UnknownRecord = {};\n\n for (let j = 0, l = option.value.fields.length; j < l; j++) {\n const field = option.value.fields[j];\n\n if (field.property != null) {\n const value = field.property.getValue(data[i]);\n\n if (value != null) {\n // Some types do not support deserialization (Array, Function, Computed, etc), just directly set the incoming value\n const resolvedValue = field.property.supportsDeserialization ? field.property.deserialize(value) : value;\n field.property.setValue(item, resolvedValue);\n continue;\n }\n\n // The property exists, lets set it to the value (null/undefined)\n if (Object.hasOwn(data[i], field.destinationName)) {\n field.property.setValue(item, value);\n }\n }\n }\n\n group[keyValue].push(item);\n }\n\n return group as T;\n }\n\n override count<TResult extends number>(data: unknown, _: QueryOption<TShape, \"count\">): TResult {\n\n if (Array.isArray(data)) {\n return data.length as TResult;\n }\n\n throw new Error(\"Cannot count resulting data, it must be an array. Please return array of data for function: count()\");\n }\n\n override min<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, \"min\">): TResult {\n return this._minMax(data, \"min\", (a: any, b: any) => a - b);\n }\n\n override max<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, \"max\">): TResult {\n return this._minMax(data, \"max\", (a: any, b: any) => b - a);\n }\n\n override sort<TResult>(data: unknown, option: QueryOption<TShape, \"sort\">): TResult {\n\n if (Array.isArray(data)) {\n\n data.sort((a, b) => {\n if (option.value.direction === \"asc\") {\n return (option.value.selector(a) as any) - (option.value.selector(b) as any);\n }\n\n return (option.value.selector(b) as any) - (option.value.selector(a) as any);\n });\n }\n\n return data as TResult;\n }\n\n override sum<TResult extends number>(data: unknown, _: QueryOption<TShape, \"sum\">): TResult {\n\n assertIsArray(data, this._formatDataNotArrayError(\"sum\"));\n\n if (data.length === 0) {\n throw new Error(\"Cannot perform operation on empty array, result query contains no data\")\n }\n\n const map = this.query.options.getLast(\"map\");\n\n let sum = 0;\n const field = this._getSelectionField(\"sum\", map);\n\n for (let i = 0, length = data.length; i < length; i++) {\n const value = data[i];\n\n if (typeof value !== \"number\") {\n throw new Error(`Cannot sum, property is not a number. Property: ${field.sourceName}`);\n }\n\n sum += value;\n }\n\n return sum as TResult;\n }\n\n override distinct<TResult>(data: unknown, _: QueryOption<TShape, \"distinct\">): TResult {\n\n assertIsArray(data, this._formatDataNotArrayError(\"distinct\"));\n\n const result = new Set<string | number | Date>();\n\n // would be nice to have property info here for type detection\n let needsDateConversion = false;\n\n for (let i = 0, length = data.length; i < length; i++) {\n const value = data[i];\n\n if (typeof value === \"number\" || typeof value === \"string\") {\n result.add(value);\n continue;\n }\n\n if (isDate(value)) {\n needsDateConversion = true;\n result.add(value.toISOString());\n continue;\n }\n\n }\n\n if (needsDateConversion) {\n return [...result].map(w => new Date(w)) as TResult;\n }\n\n return [...result] as TResult\n }\n\n override skip<TResult>(data: unknown, option: QueryOption<TShape, \"skip\">): TResult {\n\n if (Array.isArray(data)) {\n\n if (option.value > 0) {\n\n if (data.length < option.value) {\n // We don't have enough data to skip, return an empty array\n return [] as TResult;\n }\n\n return data.slice(option.value) as TResult;\n }\n\n return data as TResult;\n }\n\n return data as TResult;\n }\n\n override take<TResult>(data: unknown, option: QueryOption<TShape, \"take\">): TResult {\n if (Array.isArray(data)) {\n\n if (option.value > 0) {\n\n if (data.length < option.value) {\n return data as TResult;\n }\n\n return data.slice(0, option.value) as TResult;\n }\n\n return data as TResult;\n }\n\n return data as TResult;\n }\n\n private _getSelectionField(name: string, mapOption: QueryOption<TShape, \"map\"> | null) {\n\n if (mapOption == null ||\n mapOption.value.fields.length === 0 ||\n mapOption.value.fields.length > 1) {\n throw new Error(`${name}() operation can only be performed when one field is mapped for a result. Ex. myset.map(x => x.someNumberOrDateOrString).${name}()`)\n }\n\n return mapOption.value.fields[0];\n }\n\n private _minMax<T extends string | number | Date>(data: unknown, name: string, sort: (a: any, b: any) => any): T {\n\n assertIsArray(data, this._formatDataNotArrayError(name));\n\n data.sort(sort);\n\n if (data.length === 0) {\n throw new Error(\"Cannot perform operation on empty array, result query contains no data\")\n }\n\n return data[0] as T;\n }\n\n private _formatDataNotArrayError(functionName: string) {\n return `Cannot sum resulting data, it must be an array. Please return array of data for function: ${functionName}()`\n }\n}","import { IdType } from \"../../schema/types\";\nimport { UnknownRecord } from \"../../utilities/types\";\nimport { QueryOption } from \"../query/types\";\nimport { DataTranslator } from \"./DataTranslator\";\n\nexport class SqlTranslator<TRoot extends {}, TShape> extends DataTranslator<TRoot, TShape> {\n\n count<TResult extends number>(data: unknown, _: QueryOption<TShape, \"count\">): TResult {\n if (Array.isArray(data) && data.length > 0) {\n // Count should be returned as the property alias on the query\n return data[0].count;\n }\n\n return data as TResult;\n }\n\n min<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, \"min\">): TResult {\n return this.shapeResult(data);\n }\n\n max<TResult extends string | number | Date>(data: unknown, _: QueryOption<TShape, \"max\">): TResult {\n return this.shapeResult(data);\n }\n\n sum<TResult extends number>(data: unknown, _: QueryOption<TShape, \"sum\">): TResult {\n return this.shapeResult(data);\n }\n\n private shapeResult<TResult>(data: unknown) {\n if (Array.isArray(data) && data.length > 0) {\n // Shape the result\n return data[0];\n }\n\n return data as TResult;\n }\n\n distinct<TResult>(data: unknown, _: QueryOption<TShape, \"distinct\">): TResult {\n return data as TResult;\n }\n\n filter<TResult>(data: unknown, _: QueryOption<TShape, \"filter\">): TResult {\n return data as TResult;\n }\n\n skip(data: unknown, _: QueryOption<TShape, \"skip\">): TShape {\n return data as TShape;\n }\n\n take(data: unknown, _: QueryOption<TShape, \"take\">): TShape {\n return data as TShape;\n }\n\n sort(data: unknown, _: QueryOption<TShape, \"sort\">): TShape {\n return data as TShape;\n }\n\n group<T>(data: unknown, option: QueryOption<T, \"group\">): T {\n\n if (Array.isArray(data) == false) {\n throw new Error(\"Can only group an array of data\");\n }\n\n const group: Record<IdType, unknown[]> = {};\n\n for (let i = 0, length = data.length; i < length; i++) {\n\n const keyValue = option.value.selector(data[i]) as IdType;\n\n if (!group[keyValue]) {\n group[keyValue] = [];\n }\n\n const item: UnknownRecord = {};\n\n for (let j = 0, l = option.value.fields.length; j < l; j++) {\n const field = option.value.fields[j];\n\n if (field.property != null) {\n const value = field.property.getValue(data[i]);\n\n if (value != null) {\n field.property.setValue(item, field.property.deserialize(value));\n }\n }\n }\n\n group[keyValue].push(item);\n }\n\n return group as T;\n }\n\n map(data: unknown, option: QueryOption<TShape, \"map\">): TShape {\n if (Array.isArray(data) == false) {\n throw new Error(\"Can only map an array of data\");\n }\n\n if (this.query.options.has(\"count\") && data.length === 1) {\n // data here is the shape of { count: number }[] and will map to nothing. \n // Return the original data and let count take care of this\n return data as TShape;\n }\n\n const response = [];\n\n for (let i = 0, length = data.length; i < length; i++) {\n\n for (let j = 0, l = option.value.fields.length; j < l; j++) {\n const field = option.value.fields[j];\n\n if (field.property != null) {\n const value = field.property.getValue(data[i]);\n\n if (value != null) {\n field.property.setValue(data[i], field.property.deserialize(value));\n }\n }\n }\n\n response.push(option.value.selector(data[i]));\n }\n\n return response as TShape;\n }\n}","import { ITranslatedValue } from './types';\n\nexport class TranslatedArrayValue<T> implements ITranslatedValue<T> {\n\n readonly value: T;\n\n constructor(value: unknown,) {\n this.value = value as T;\n }\n\n forEach(callback: (item: unknown) => unknown): void {\n const data = this.value as unknown[];\n for (let i = 0, length = data.length; i < length; i++) {\n const result = callback(data[i]);\n\n if (result) {\n // reassign if the callback returns a result\n data[i] = result;\n }\n }\n }\n}","import { ITranslatedValue } from './types';\n\nexport class TranslatedGroupValue<T> implements ITranslatedValue<T> {\n\n readonly value: T;\n\n constructor(value: unknown) {\n this.value = value as T;\n }\n\n forEach(callback: (item: unknown) => unknown): void {\n const group = this.value as Record<string, unknown[]>;\n const keys = Object.keys(group);\n for (let i = 0, length = keys.length; i < length; i++) {\n const key = keys[i];\n const data = group[key];\n\n for (let j = 0, len = data.length; j < len; j++) {\n\n const result = callback(data[j]);\n\n if (result) {\n // reassign if the callback returns a result\n data[j] = result;\n }\n }\n }\n }\n}","import { ITranslatedValue } from './types';\n\nexport class TranslatedSingleValue<T> implements ITranslatedValue<T> {\n\n value: T;\n\n constructor(value: unknown) {\n this.value = value as T;\n }\n\n forEach(callback: (item: unknown) => unknown): void {\n const result = callback(this.value) as T;\n\n if (result) {\n this.value = result;\n }\n }\n}","export * from './DataTranslator';\nexport * from './JsonTranslator';\nexport * from './SqlTranslator';\nexport * from './types';\nexport * from './TranslatedArrayValue';\nexport * from './TranslatedGroupValue';\nexport * from './TranslatedSingleValue';","import { PartialResultType, PluginEventPartialResultType, PluginEventResultType, ResultType } from \"./types\";\n\nabstract class BaseResult {\n static ERROR = \"error\" as const;\n static SUCCESS = \"success\" as const;\n static PARTIAL = \"partial\" as const;\n\n static resolve<T>(result: ResultType<T> | PartialResultType<T>, resolve: (data: T) => void, reject: (error?: any) => void) {\n if (result.ok === BaseResult.SUCCESS) {\n resolve(result.data);\n return;\n }\n\n if (result.ok === BaseResult.PARTIAL) {\n reject({\n partial: result.data,\n error: result.error\n });\n return;\n }\n\n reject(result.error);\n }\n\n static assertSuccess<T>(result: any): asserts result is { ok: \"success\"; data: T } {\n if (result.ok !== BaseResult.SUCCESS) {\n throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);\n }\n }\n}\n\nexport class Result extends BaseResult {\n static success<T>(data: T): ResultType<T>;\n static success<T>(): ResultType<never>;\n static success<T>(data?: T): ResultType<T> {\n return {\n ok: Result.SUCCESS,\n data\n }\n }\n\n static error<T>(error: any): ResultType<T> {\n return {\n ok: Result.ERROR,\n error\n }\n }\n\n static partial<T>(data: T, error: any): PartialResultType<T> {\n return {\n ok: Result.PARTIAL,\n data,\n error\n }\n }\n}\n\nexport class PluginEventResult extends BaseResult {\n static success<T>(id: string, data: T): PluginEventResultType<T>;\n static success<T>(id: string): PluginEventResultType<never>;\n static success<T>(id: string, data?: T): PluginEventResultType<T> {\n return {\n id,\n ok: Result.SUCCESS,\n data\n }\n }\n\n static error<T>(id: string, error: any): PluginEventResultType<T> {\n return {\n id,\n ok: Result.ERROR,\n error\n }\n }\n\n static partial<T>(id: string, data: T, error: any): PluginEventPartialResultType<T> {\n return {\n id,\n ok: Result.PARTIAL,\n data,\n error\n }\n }\n\n static assertSuccess<T>(result: PluginEventResultType<T>): asserts result is { ok: \"success\"; data: T; id: string } {\n if (result.ok !== Result.SUCCESS) {\n throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);\n }\n }\n}\n","export * from './Result';\nexport * from './types';\nexport * from './utils';","import { Result } from \"./Result\";\nimport { CallbackResult } from \"./types\";\n\nexport function toPromise<T>(fn: (callback: CallbackResult<T>) => void) {\n return new Promise<T>((resolve, reject) => {\n fn((r) => {\n if (r.ok === Result.ERROR) {\n reject(r.error);\n return;\n }\n\n resolve(r.data);\n });\n });\n}\n","import { UnknownRecord } from '../utilities';\nimport { SchemaBase } from './property/base/SchemaBase';\nimport { SchemaArray } from './property/types/SchemaArray';\nimport { DefaultValue, FunctionBody, PropertyDeserializer, PropertySerializer, SchemaTypes } from './types';\n\nconst SUPPORTED_DESERIALIZATION_TYPES = new Set<SchemaTypes>([\n SchemaTypes.Boolean,\n SchemaTypes.Date,\n SchemaTypes.Number,\n SchemaTypes.String,\n]);\n\n/**\n * Represents metadata and utilities for a property in a schema, including its type, name, parent, children, and serialization details.\n */\nexport class PropertyInfo<T extends {}> {\n\n get id() {\n if (this._idCache) {\n return this._idCache;\n }\n this._idCache = this.getPathArray().join(\".\");\n return this._idCache;\n }\n\n /** The name of the property. */\n readonly name: string;\n /** The name of the property we need to map from. */\n readonly from: string | null = null;\n /** The schema type of the property. */\n readonly type: SchemaTypes;\n\n /** Whether the property can be null. */\n readonly isNullable: boolean;\n /** Whether the property is optional. */\n readonly isOptional: boolean;\n /** Whether the property is a key. */\n readonly isKey: boolean;\n /** Whether the property is an identity property. */\n readonly isIdentity: boolean;\n /** Whether the property is readonly. */\n readonly isReadonly: boolean;\n /** Whether the property is unmapped. */\n readonly isUnmapped: boolean;\n /** Whether the property is distinct. */\n readonly isDistinct: boolean;\n /** Indexes associated with the property. */\n readonly indexes: string[];\n\n /** Any injected value for the property. */\n readonly injected: any | null = null;\n /** The default value for the property, if any. */\n readonly defaultValue: DefaultValue<any> | null = null;\n /** Serializer for the property value, if any. */\n readonly valueSerializer: PropertySerializer<T> | null = null;\n /** Deserializer for the property value, if any. */\n readonly valueDeserializer: PropertyDeserializer<T> | null = null;\n /** Function body for computed properties, if any. */\n readonly functionBody: FunctionBody<any, T> | null;\n /** Child properties of this property. */\n readonly children: PropertyInfo<T>[] = [];\n /** The schema this property belongs to. */\n readonly schema: SchemaBase<T, any>;\n /** The inner schema if this property is an array. */\n readonly innerSchema?: SchemaBase<unknown, any>;\n /** Literal values allowed for this property. */\n readonly literals: T[];\n\n /** The parent property, if any. */\n readonly parent?: PropertyInfo<T>;\n\n // Cached computed values for performance\n private _propertyChainCache?: PropertyInfo<T>[];\n private _pathArrayCache?: string[];\n private _parentPathArrayCache?: string[];\n private _idCache?: string;\n private _levelCache?: number;\n private _hasNullableParentsCache?: boolean;\n\n constructor(schema: SchemaBase<T, any>, name: string, parent?: PropertyInfo<T> | null) {\n this.schema = schema;\n this.name = name;\n this.type = schema.type;\n this.literals = schema.literals;\n\n if (schema instanceof SchemaArray) {\n this.innerSchema = schema.innerSchema;\n }\n\n this.isNullable = schema.isNullable;\n this.isOptional = schema.isOptional;\n this.isKey = schema.isKey;\n this.isIdentity = schema.isIdentity;\n this.isReadonly = schema.isReadonly;\n this.isUnmapped = schema.isUnmapped;\n this.injected = schema.injected;\n this.isDistinct = schema.isDistict;\n this.indexes = schema.indexes;\n this.from = schema.fromPropertyName;\n\n this.defaultValue = schema.defaultValue;\n this.valueSerializer = schema.valueSerializer;\n this.valueDeserializer = schema.valueDeserializer;\n this.functionBody = schema.functionBody;\n\n this.parent = parent;\n }\n\n /**\n * Returns the depth (level) of this property in the property tree.\n *\n * The root property has a level of 0. Each child property increases the level by 1.\n * Traverses up the parent chain, incrementing the level for each parent until the root is reached.\n * \n * @returns {number} The number of parent properties above this property (0 for root).\n */\n get level() {\n if (this._levelCache !== undefined) {\n return this._levelCache;\n }\n\n let level = 0;\n let current: PropertyInfo<T> | undefined = this;\n\n while (current) {\n if (current.parent == null) {\n this._levelCache = level;\n return level;\n }\n\n current = current.parent;\n level++;\n }\n\n this._levelCache = level;\n return level;\n }\n\n get isRenamed() {\n return !!this.from;\n }\n\n get supportsDeserialization() {\n return this.valueDeserializer != null || SUPPORTED_DESERIALIZATION_TYPES.has(this.type);\n }\n\n private _getPropertyChain(): PropertyInfo<T>[] {\n if (this._propertyChainCache) {\n return this._propertyChainCache;\n }\n\n const chain: PropertyInfo<T>[] = [];\n let current: PropertyInfo<T> | undefined = this;\n\n while (current) {\n chain.unshift(current);\n current = current.parent;\n }\n\n this._propertyChainCache = chain;\n return chain;\n }\n\n private _needsOptionalChaining(prop: PropertyInfo<T>, assignmentType?: AssignmentType): boolean {\n if (assignmentType === \"ASSIGNMENT\") {\n return false;\n }\n\n return assignmentType === \"FORCE_NULLABLE_OR_OPTIONAL\" || prop.isNullable || prop.isOptional;\n }\n\n private _resolvePathArray(options?: {\n root?: string,\n assignmentType?: AssignmentType\n useFromPropertyName?: boolean,\n }) {\n const propertyChain = this._getPropertyChain();\n const hasRoot = options?.root != null;\n const path: string[] = hasRoot ? [options!.root!] : [];\n\n for (const prop of propertyChain) {\n const accessor = this._needsOptionalChaining(prop, options?.assignmentType) ? '?.' : '.';\n path.push(accessor, options?.useFromPropertyName ? prop.from : prop.name);\n }\n\n return path;\n }\n\n getResolvedName() {\n return this.from ?? this.name;\n }\n\n /**\n * Returns an array of property names representing the path from the root to this property.\n *\n * @returns {string[]} The property path as an array of names.\n */\n getPathArray() {\n if (this._pathArrayCache) {\n return this._pathArrayCache;\n }\n\n const path: string[] = [];\n const propertyChain = this._getPropertyChain();\n\n for (const prop of propertyChain) {\n path.push(prop.name);\n }\n\n this._pathArrayCache = path;\n return path;\n }\n\n /**\n * Returns an array of property names representing the path from the root to the parent of this property.\n *\n * @returns {string[]} The property path as an array of names, excluding this property.\n */\n getParentPathArray() {\n if (this._parentPathArrayCache) {\n return this._parentPathArrayCache;\n }\n\n const path: string[] = [];\n const propertyChain = this._getPropertyChain();\n\n for (let i = 0; i < propertyChain.length - 1; i++) {\n const prop = propertyChain[i];\n path.push(prop.name);\n }\n\n this._parentPathArrayCache = path;\n return path;\n }\n\n /**\n * Returns true if any parent property is nullable or optional.\n *\n * @returns {boolean} True if any parent is nullable or optional, false otherwise.\n */\n get hasNullableParents() {\n if (this._hasNullableParentsCache !== undefined) {\n return this._hasNullableParentsCache;\n }\n\n let parent = this.parent;\n while (parent != null) {\n if (parent.isNullable || parent.isOptional) {\n this._hasNullableParentsCache = true;\n return true;\n }\n parent = parent.parent;\n }\n\n this._hasNullableParentsCache = false;\n return false;\n }\n\n /**\n * Returns true if any child property (recursively) is an identity property.\n *\n * @returns {boolean} True if any child is an identity property, false otherwise.\n */\n get hasIdentityChildren() {\n const children = [...this.children];\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (child.isIdentity === true) {\n return true;\n }\n if (child.children.length > 0) {\n children.push(...child.children)\n }\n }\n return false;\n }\n\n /**\n * Gets the value of this property from the given instance, following the property path.\n *\n * @param instance The object instance to retrieve the value from.\n * @returns The value of the property, or null if not found.\n */\n getValue(instance: UnknownRecord) {\n if (instance == null) {\n return null;\n }\n const pathArray = this.getPathArray();\n const length = pathArray.length;\n // Fast path for single level properties\n if (length === 1) {\n return instance[pathArray[0]];\n }\n let current: any = instance;\n for (let i = 0; i < length; i++) {\n if (current == null) {\n return null;\n }\n current = current[pathArray[i]];\n }\n return current;\n }\n\n /**\n * Sets the value of this property on the given instance, creating intermediate objects as needed.\n *\n * @param instance The object instance to set the value on.\n * @param value The value to set.\n */\n setValue(instance: unknown, value: unknown) {\n if (instance == null) {\n throw new Error('Cannot set value on null or undefined instance');\n }\n const pathArray = this.getPathArray();\n const length = pathArray.length;\n // Fast path for single level properties\n if (length === 1) {\n (instance as any)[pathArray[0]] = value;\n return;\n }\n let current: any = instance;\n let i = 0;\n // Navigate to the parent of the target property\n while (i < length - 1) {\n const prop = pathArray[i];\n const next = current[prop];\n // Only create new object if next level doesn't exist\n if (next == null) {\n current[prop] = {};\n }\n current = current[prop];\n i++;\n }\n // Set the value on the final property\n current[pathArray[length - 1]] = value;\n }\n\n /**\n * Returns a selector path string for this property, starting from the given parent variable name.\n *\n * @param options.parent The root variable name.\n * @param options.assignmentType Optional assignment type for path resolution.\n * @returns {string} The selector path string (e.g., 'parent.prop1.prop2').\n */\n getSelectrorPath(options: { parent: string, assignmentType?: AssignmentType, useFromPropertyName?: boolean, useRemappedName?: boolean }) {\n const parts = this._resolvePathArray({\n root: options.parent,\n assignmentType: options?.assignmentType,\n useFromPropertyName: options?.useFromPropertyName\n });\n return parts.join(\"\");\n }\n\n /**\n * Returns an assignment path string for this property, optionally starting from a parent variable name.\n *\n * @param options.parent Optional root variable name.\n * @returns {string} The assignment path string (e.g., 'prop1.prop2').\n */\n getAssignmentPath(options?: { parent?: string, useFromPropertyName?: boolean }) {\n const parts = this._resolvePathArray({\n root: options?.parent,\n assignmentType: \"ASSIGNMENT\",\n useFromPropertyName: options?.useFromPropertyName\n });\n\n if (options?.parent == null) {\n return parts.slice(1).join(\"\");\n }\n\n return parts.join(\"\");\n }\n\n deserialize(value: string | number) {\n\n if (this.valueDeserializer != null) {\n return this.valueDeserializer(value);\n }\n\n if (this.type === SchemaTypes.Date) {\n return new Date(value);\n }\n\n if (this.type === SchemaTypes.String) {\n return String(value);\n }\n\n if (this.type === SchemaTypes.Number) {\n return Number(value);\n }\n\n if (this.type === SchemaTypes.Boolean) {\n return Boolean(value);\n }\n\n throw new Error(`Unsupported deserialization for type. Type: ${this.type}`);\n }\n}\n\ntype AssignmentType = \"FORCE_NULLABLE_OR_OPTIONAL\" | \"ASSIGNMENT\";","import { SchemaFunction } from './table/SchemaFunction';\nimport { SchemaComputed } from './table/SchemaComputed';\nimport { SchemaBase } from \"./property/base/SchemaBase\";\nimport { PropertyInfo } from './PropertyInfo';\nimport { CodeBuilder, FunctionBuilder, SlotBlock } from '../codegen';\nimport { EnrichmentHandlerBuilder } from '../codegen/handlers/EnrichmentHandlerBuilder';\nimport { MergeHandlerBuilder } from '../codegen/handlers/MergeHandlerBuilder';\nimport { PrepareHandlerBuilder } from '../codegen/handlers/PrepareHandlerBuilder';\nimport { StripHandlerBuilder } from '../codegen/handlers/StripHandlerBuilder';\nimport { CloneHandlerBuilder } from '../codegen/handlers/CloneHandlerBuilder';\nimport { CompareHandlerBuilder } from '../codegen/handlers/CompareHandlerBuilder';\nimport { DeserializeHandlerBuilder } from '../codegen/handlers/DeserializeHandlerBuilder';\nimport { HashTypeHandlerBuilder } from '../codegen/handlers/HashTypeHandlerBuilder';\nimport { IdSelectorHandlerBuilder } from '../codegen/handlers/IdSelectorHandlerBuilder';\nimport { HashHandlerBuilder } from '../codegen/handlers/HashHandlerBuilder';\nimport { EnableChangeTrackingHandlerBuilder } from '../codegen/handlers/EnableChangeTrackingHandlerBuilder';\nimport { FreezeHandlerBuilder } from '../codegen/handlers/FreezeHandlerBuilder';\nimport { SchemaError } from '../errors/SchemaError';\nimport { SerializeHandlerBuilder } from \"../codegen/handlers/SerializeHandlerBuilder\";\nimport { hash } from \"../utilities\";\nimport { CompiledSchema, CompiledSchemaCore, GetHashTypeFunction, HashFunction, HashType, IdType, Index, InferCreateType, InferType, Prepare, Preprocess, SchemaTypes } from './types';\nimport { DeepPartial } from '../types';\nimport { SchemaSubscription } from './communication/broadcast';\nimport { CompareIdsHandlerBuilder } from '../codegen/handlers/CompareIdsHandlerBuilder';\n\nexport class SchemaDefinition<T extends {}> extends SchemaBase<T, any> {\n\n instance: T;\n type = SchemaTypes.Definition;\n collectionName: string;\n\n constructor(collectionName: string, schema: T) {\n super();\n this.collectionName = collectionName;\n this.instance = schema;\n this.isNullable = false;\n this.isOptional = false;\n }\n\n modify<R>(builder: (d: {\n function: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: string, injected: I) => UU, injected?: I) => SchemaFunction<UU, I, \"unmapped\">;\n computed: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: string, injected: I) => UU, injected?: I) => SchemaComputed<UU, I, \"computed\" | \"unmapped\">;\n }) => R) {\n\n const b = {\n function: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: string, injected?: I) => UU, injected?: I) => new SchemaFunction<UU, I, \"unmapped\">(fn as any, injected),\n computed: <UU, I = never>(fn: (entity: InferType<CompiledSchema<T>>, collectionName: string, injected?: I) => UU, injected?: I) => new SchemaComputed<UU, I, \"computed\" | \"unmapped\">(fn as any, injected)\n }\n\n const r = builder(b)\n\n return new SchemaDefinition<R & T>(this.collectionName, { ...this.instance, ...r });\n }\n\n private _iterate(\n instance: SchemaBase<any, any>,\n callback: (property: PropertyInfo<any>) => void\n ) {\n const explore: {\n path: string | null;\n instance:\n | SchemaBase<any, any>\n | { [key: string]: SchemaBase<any, any> };\n parents: {\n schema: { [key: string]: SchemaBase<any, any> };\n propertyInfo: PropertyInfo<any>;\n }[];\n propertyInfo: PropertyInfo<any> | null;\n }[] = [\n { path: null, instance, parents: [], propertyInfo: null }\n ];\n const properties: PropertyInfo<any>[] = [];\n\n for (let i = 0; i < explore.length; i++) {\n const item = explore[i];\n\n if (item.instance.type === SchemaTypes.Definition) {\n explore.push({\n path: null,\n instance: item.instance.instance,\n parents: [],\n propertyInfo: null\n });\n continue;\n }\n\n const instanceObj = item.instance as {\n [key: string]: SchemaBase<any, any>;\n };\n for (const key in instanceObj) {\n const propertyInstance = instanceObj[key] as SchemaBase<any, any>;\n const previousParent =\n item.parents.length === 0\n ? null\n : item.parents[item.parents.length - 1].propertyInfo;\n\n if (propertyInstance.type === SchemaTypes.Object) {\n const propertyInfo = new PropertyInfo<any>(\n propertyInstance,\n key,\n previousParent\n );\n explore.push({\n path: [item.path, key].filter((w) => w != null).join(\".\"),\n instance: propertyInstance.instance,\n parents: [\n ...item.parents,\n { schema: instanceObj, propertyInfo: propertyInfo }\n ],\n propertyInfo\n });\n\n if (previousParent === null) {\n properties.push(propertyInfo);\n continue;\n }\n\n previousParent.children.push(propertyInfo);\n continue;\n }\n\n const childPrimitivePropertyInfo = new PropertyInfo<any>(\n (item.instance as any)[key],\n key,\n previousParent\n );\n if (previousParent === null) {\n properties.push(childPrimitivePropertyInfo);\n continue;\n }\n\n previousParent.children.push(childPrimitivePropertyInfo);\n }\n }\n\n // Recursively trigger callbacks on properties and their children\n function recursiveCallback(prop: PropertyInfo<any>) {\n callback(prop);\n for (const child of prop.children) {\n recursiveCallback(child);\n }\n }\n\n for (const prop of properties) {\n recursiveCallback(prop);\n }\n }\n\n private createChangeTracker() {\n\n const DIRTY_ENTITY_MARKER: string = \"isDirty\";\n const CHANGES_ENTITY_KEY: string = \"changes\";\n const ORIGINAL_ENTITY_KEY: string = \"original\";\n const PAUSED_ENTITY_KEY: string = \"isPaused\";\n const TRACKING_KEY: string = \"__tracking__\";\n const PROXY_MARKER: string = \"__isProxy__\";\n\n return <TEntity extends {}>(entity: TEntity, path?: string, parent?: TEntity) => {\n\n const proxyHandler: ProxyHandler<TEntity> = {\n set: (entity, property, value) => {\n const indexableEntity: { [key: string]: any } = entity;\n const key = String(property);\n const originalValue = indexableEntity[key];\n\n // if values are the same, do nothing\n if (originalValue === value) {\n return true;\n }\n\n const resolvedParent: { [key: string]: any } = parent ?? entity;\n\n if (resolvedParent[TRACKING_KEY] == null) {\n resolvedParent[TRACKING_KEY] = {\n [CHANGES_ENTITY_KEY]: {},\n [DIRTY_ENTITY_MARKER]: false,\n [ORIGINAL_ENTITY_KEY]: {},\n [PAUSED_ENTITY_KEY]: false\n }\n }\n\n if (key == TRACKING_KEY) {\n return true;\n }\n\n if (resolvedParent[TRACKING_KEY] != null && resolvedParent[TRACKING_KEY][PAUSED_ENTITY_KEY] === true) {\n Reflect.set(indexableEntity, property, value);\n return true;\n }\n\n const resolvedPath = path == null ? key : `${path}.${key}`;\n const changes = resolvedParent[TRACKING_KEY];\n\n if (changes[CHANGES_ENTITY_KEY][resolvedPath] != null) {\n\n if (changes[ORIGINAL_ENTITY_KEY][resolvedPath] === value) {\n // we are changing the value back to the original value, remove the change\n delete changes[ORIGINAL_ENTITY_KEY][resolvedPath];\n delete changes[CHANGES_ENTITY_KEY][resolvedPath];\n } else {\n // track the change\n changes[CHANGES_ENTITY_KEY][resolvedPath] = value;\n }\n\n } else if (changes[CHANGES_ENTITY_KEY][resolvedPath] == null) {\n // don't keep updating, keep the original value\n changes[CHANGES_ENTITY_KEY][resolvedPath] = value;\n changes[ORIGINAL_ENTITY_KEY][resolvedPath] = originalValue;\n }\n\n const isDirty = Object.keys(changes[ORIGINAL_ENTITY_KEY]).length > 0;\n changes[DIRTY_ENTITY_MARKER] = isDirty;\n\n Reflect.set(indexableEntity, property, value);\n\n return true;\n },\n get: (target, property, receiver) => {\n\n if (property === PROXY_MARKER) {\n return true;\n }\n\n return Reflect.get(target, property, receiver);\n }\n }\n\n return new Proxy(entity, proxyHandler) as TEntity\n }\n }\n\n compile(): CompiledSchema<T> {\n\n try {\n const schema = this;\n const properties: PropertyInfo<T>[] = [];\n const propertyMap: Map<string, PropertyInfo<T>> = new Map<string, PropertyInfo<T>>();\n\n const enrichmentHandlerBuilder = new EnrichmentHandlerBuilder();\n const mergeHandlerFactory = new MergeHandlerBuilder();\n const prepareHandlerBuilder = new PrepareHandlerBuilder();\n const stripHandlerBuilder = new StripHandlerBuilder();\n const cloneHandlerBuilder = new CloneHandlerBuilder();\n const compareHandlerBuilder = new CompareHandlerBuilder();\n const deserializeHandlerBuilder = new DeserializeHandlerBuilder();\n const hashTypeHandlerBuilder = new HashTypeHandlerBuilder();\n const idSelectorHandlerBuilder = new IdSelectorHandlerBuilder();\n const hashHandlerBuilder = new HashHandlerBuilder();\n const enableChangeTrackingHandlerBuilder = new EnableChangeTrackingHandlerBuilder();\n const freezeHandlerBuilder = new FreezeHandlerBuilder();\n const serializeHandlerBuilder = new SerializeHandlerBuilder();\n const compareIdsHandlerBuilder = new CompareIdsHandlerBuilder();\n\n const enricher = enrichmentHandlerBuilder.build();\n const merge = mergeHandlerFactory.build();\n const prepare = prepareHandlerBuilder.build();\n const strip = stripHandlerBuilder.build();\n const clone = cloneHandlerBuilder.build();\n const compare = compareHandlerBuilder.build();\n const deserialize = deserializeHandlerBuilder.build();\n const hashTypeHandler = hashTypeHandlerBuilder.build();\n const idSelectorHandler = idSelectorHandlerBuilder.build();\n const hashHandler = hashHandlerBuilder.build();\n const enableChangeTrackingHandler = enableChangeTrackingHandlerBuilder.build();\n const freezeHandler = freezeHandlerBuilder.build();\n const serializeHandler = serializeHandlerBuilder.build();\n const compareIdsHandler = compareIdsHandlerBuilder.build();\n\n const changeTrackingCodeBuilder = new CodeBuilder();\n changeTrackingCodeBuilder.raw(`function ${this.createChangeTracker.toString()}`);\n changeTrackingCodeBuilder.slot(\"declarations\").variable(\"enableChangeTracking\").value('createChangeTracker()');\n changeTrackingCodeBuilder.slot(\"assignment\");\n changeTrackingCodeBuilder.slot(\"return\").raw('\\treturn enableChangeTracking(entity);');\n\n const freezeCodeBuilder = new CodeBuilder();\n freezeCodeBuilder.slot(\"assignment\");\n freezeCodeBuilder.slot(\"return\").raw('\\treturn Object.freeze(entity);');\n\n const enricherCodeBuilder = new CodeBuilder();\n const enricherFunctionRoot = enricherCodeBuilder.factory(\"factory\", { name: \"factory\" }).parameters({ name: \"collectionName\", value: this.collectionName });\n const enricherFunctionBody = enricherFunctionRoot.function(undefined, { name: \"function\" }).parameters(\"entity\", \"changeTrackingType\").return();\n\n enricherFunctionBody.slot(\"changeTracker\").raw(`\\tfunction ${this.createChangeTracker.toString()}`);\n enricherFunctionBody.slot(\"enableChangeTracking\")\n .variable(\"enableChangeTracking\")\n .value('changeTrackingType === \"proxy\" ? createChangeTracker() : e => e');\n\n enricherFunctionBody.slot(\"append\");\n enricherFunctionBody.slot(\"enriched\");\n enricherFunctionBody.slot(\"declarations\");\n enricherFunctionBody.slot(\"assignment\");\n enricherFunctionBody.slot(\"ifs\");\n enricherFunctionBody.slot(\"tracking\").if('changeTrackingType === \"immutable\"', { name: \"freeze\" });\n enricherFunctionBody.slot(\"return\").raw('\\treturn enableChangeTracking(enriched);');\n\n const preprocessCodeBuilder = new CodeBuilder();\n preprocessCodeBuilder.slot(\"main\");\n preprocessCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const postprocessCodeBuilder = new CodeBuilder();\n postprocessCodeBuilder.slot(\"main\");\n postprocessCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const mergeCodeBuilder = new CodeBuilder();\n\n const mergeFunctionRoot = mergeCodeBuilder.factory(\"factory\", { name: \"factory\" }).parameters({ name: \"collectionName\", value: this.collectionName });\n const mergeFunctionBody = mergeFunctionRoot.function(undefined, { name: \"function\" }).parameters(\"destination\", \"source\").return();\n\n const pauseFunctionBody = mergeFunctionBody.function(\"pause\")\n .appendBody(\"// initiate change tracking if needed\");\n\n pauseFunctionBody.if(\"destination.__tracking__ == null\")\n .appendBody(\"destination.__tracking__ = {};\");\n\n pauseFunctionBody.appendBody(\"destination.__tracking__.isPaused = true;\");\n\n mergeFunctionBody.function(\"unpause\")\n .appendBody(\"// unpause change tracking if needed\")\n .if(\"destination.__tracking__ != null\")\n .appendBody(\"destination.__tracking__.isPaused = false;\");\n\n mergeFunctionBody.slot(\"header\").raw(`pause()`);\n mergeFunctionBody.slot(\"assignments\");\n mergeFunctionBody.slot(\"ifs\");\n mergeFunctionBody.slot(\"return\").raw(`\n unpause();\n\n return destination;`);\n\n const prepareCodeBuilder = new CodeBuilder();\n prepareCodeBuilder.slot(\"result\");\n prepareCodeBuilder.slot(\"assignments\");\n prepareCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const stripCodeBuilder = new CodeBuilder();\n stripCodeBuilder.slot(\"result\");\n stripCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const cloneCodeBuilder = new CodeBuilder();\n cloneCodeBuilder.slot(\"result\").raw(\"const result = {};\");;\n cloneCodeBuilder.slot(\"assignments\");\n cloneCodeBuilder.slot(\"if\");\n cloneCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const compareCodeBuilder = new CodeBuilder();\n compareCodeBuilder.slot(\"result\");\n compareCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const compareIdsCodeBuilder = new CodeBuilder();\n compareIdsCodeBuilder.slot(\"ifs\");\n compareIdsCodeBuilder.slot(\"return\").raw(` return true;`);\n\n const deserializeCodeBuilder = new CodeBuilder();\n deserializeCodeBuilder.slot(\"functions\");\n deserializeCodeBuilder.slot(\"result\");\n deserializeCodeBuilder.slot(\"if\");\n deserializeCodeBuilder.slot(\"return\").raw(` return entity;`);\n\n const serializeCodeBuilder = new CodeBuilder();\n serializeCodeBuilder.slot(\"result\").raw(\"const result = {};\");\n serializeCodeBuilder.slot(\"assignments\");\n serializeCodeBuilder.slot(\"functions\");\n serializeCodeBuilder.slot(\"if\");\n serializeCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const idSelectorCodeBuilder = new CodeBuilder();\n idSelectorCodeBuilder.slot(\"result\");\n idSelectorCodeBuilder.slot(\"return\").raw(` return result;`);\n\n const hashTypeCodeBuilder = new CodeBuilder();\n hashTypeCodeBuilder.slot(\"ifs\");\n hashTypeCodeBuilder.slot(\"return\").raw(` return \"Ids\";`);\n\n const hashCodeBuilder = new CodeBuilder();\n hashCodeBuilder.slot(\"functions\").raw(`\n function stringifyDate(d) {\n\n if (d == null) {\n return \"\";\n }\n\n if (typeof d === \"string\") {\n return d;\n }\n\n if (d.toISOString != null) {\n return d.toISOString();\n }\n\n return d.toString();\n } \n`);\n const hashCodeBuilderIfBlock = hashCodeBuilder.if(`type === \"Ids\"`, { name: \"hash-id-if\" });\n hashCodeBuilderIfBlock.slot(\"if-body\");\n hashCodeBuilderIfBlock.appendBody(\"return result\");\n hashCodeBuilder.slot(\"hash-object-return\");\n hashCodeBuilder.raw(` return result;`)\n\n const idProperties: PropertyInfo<any>[] = [];\n const allPropertyNamesAndPaths: string[] = [];\n let hashType: HashType = HashType.Ids;\n let hasIdentities = false;\n let hasIdentityKeys = false;\n\n this._iterate(schema, (property) => {\n\n properties.push(property);\n propertyMap.set(property.id, property);\n allPropertyNamesAndPaths.push(property.getSelectrorPath({ parent: \"entity\" }));\n\n if (property.isIdentity === true) {\n hasIdentities = true;\n }\n\n if (property.isKey === true) {\n idProperties.push(property);\n }\n\n if (property.isKey === true && property.isIdentity === true) {\n hasIdentityKeys = true;\n }\n\n enricher.handle(property, enricherCodeBuilder);\n merge.handle(property, mergeCodeBuilder);\n prepare.handle(property, prepareCodeBuilder);\n strip.handle(property, stripCodeBuilder);\n clone.handle(property, cloneCodeBuilder);\n compare.handle(property, compareCodeBuilder);\n deserialize.handle(property, deserializeCodeBuilder);\n serializeHandler.handle(property, serializeCodeBuilder)\n hashTypeHandler.handle(property, hashTypeCodeBuilder);\n idSelectorHandler.handle(property, idSelectorCodeBuilder);\n hashHandler.handle(property, hashCodeBuilder);\n enableChangeTrackingHandler.handle(property, changeTrackingCodeBuilder);\n freezeHandler.handle(property, freezeCodeBuilder);\n compareIdsHandler.handle(property, compareIdsCodeBuilder);\n });\n\n if (idProperties.length === 0) {\n throw new Error(`Schema must have a key. Use .key() to mark a property as a key. Collection Name: ${this.collectionName}`)\n }\n\n const enrichParams = enricherFunctionRoot.getParameters();\n const mergeParams = mergeFunctionRoot.getParameters();\n const enrichGenerator = Function(`return ${enricherCodeBuilder.toString()}`);\n const mergeGenerator = Function(`return ${mergeCodeBuilder.toString()}`);\n\n // After enricher is used, we modify it to be deserialize and enrich\n enricherFunctionBody.get<SlotBlock>(\"append\").insert(deserializeCodeBuilder.get<SlotBlock>(\"functions\"));\n enricherFunctionBody.get<SlotBlock>(\"append\").insert(deserializeCodeBuilder.get<SlotBlock>(\"result\"));\n enricherFunctionBody.get<SlotBlock>(\"append\").insert(deserializeCodeBuilder.get<SlotBlock>(\"if\"));\n enricherFunctionRoot.replace(\"function\", new FunctionBuilder(undefined).parameters(\"unserialized\", \"changeTrackingType\").return());\n\n const postProcessGenerator = Function(`return ${enricherCodeBuilder.toString()}`);\n const postProcessParams = enricherFunctionRoot.getParameters();\n\n // Combine prepare and serialize\n preprocessCodeBuilder.get<SlotBlock>(\"main\").insert(prepareCodeBuilder.get<SlotBlock>(\"result\"));\n preprocessCodeBuilder.get<SlotBlock>(\"main\").insert(prepareCodeBuilder.get<SlotBlock>(\"assignments\"));\n\n preprocessCodeBuilder.get<SlotBlock>(\"main\").insert(serializeCodeBuilder.get<SlotBlock>(\"assignments\"));\n preprocessCodeBuilder.get<SlotBlock>(\"main\").insert(serializeCodeBuilder.get<SlotBlock>(\"functions\"));\n preprocessCodeBuilder.get<SlotBlock>(\"main\").insert(serializeCodeBuilder.get<SlotBlock>(\"if\"));\n\n\n const getIdsFunction = Function(\"entity\", idSelectorCodeBuilder.toString()) as (entity: InferType<T>) => [IdType];\n const getHashTypeFunction = Function(\"entity\", hashTypeCodeBuilder.toString()) as GetHashTypeFunction<T>;\n const prepareFunction = Function(\"entity\", prepareCodeBuilder.toString()) as Prepare<T>;\n const cloneFunction = Function(\"entity\", cloneCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const deserializeFunction = Function(\"unserialized\", deserializeCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const serializeFunction = Function(\"entity\", serializeCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const compareFunction = Function(\"a\", \"b\", compareCodeBuilder.toString()) as (a: InferType<T>, b: InferType<T>) => boolean;\n const stripFunction = Function(\"entity\", stripCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const hashFunction = Function(\"entity\", \"type\", hashCodeBuilder.toString()) as HashFunction<T>;\n const enableChangeTrackingFunction = Function(\"entity\", changeTrackingCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const freezeFunction = Function(\"entity\", freezeCodeBuilder.toString()) as (entity: InferType<T>) => InferType<T>;\n const compareIdsFunction = Function(\"a\", \"b\", compareIdsCodeBuilder.toString()) as (a: InferType<T>, b: InferType<T>) => boolean;\n const preprocessFunction = Function(\"entity\", preprocessCodeBuilder.toString()) as Preprocess<T>;\n\n const enricherFactoryFunction = enrichGenerator();\n const postProcessFactoryFunction = postProcessGenerator();\n const mergeFactoryFunction = mergeGenerator();\n const postProcessFunction = postProcessFactoryFunction(...postProcessParams.map(w => w.value))\n const enricherFunction = enricherFactoryFunction(...enrichParams.map(w => w.value));\n const mergeFunction = mergeFactoryFunction(...mergeParams.map(w => w.value));\n\n const idPropertyNames = idProperties.map(w => w.name);\n const getId = (entity: InferType<T>) => {\n if (idPropertyNames.length > 1) {\n return hashFunction(entity, HashType.Ids) as IdType;\n }\n\n return getIdsFunction(entity as any)[0] as IdType;\n }\n\n const getProperty = (id: string) => propertyMap.get(id);\n const id = hash([...allPropertyNamesAndPaths, this.collectionName].join(\",\"));\n\n // memoize this by the validProperties\n // TODO: See if we can generate a function to do this and eliminate loops\n const deserializePartial = (item: Record<string, unknown>, properties: PropertyInfo<T>[]) => {\n\n for (let i = 0, length = properties.length; i < length; i++) {\n const property = properties[i];\n const value = property.getValue(item);\n\n if (value == null) {\n continue;\n }\n\n const deserialized = property.deserialize(value);\n property.setValue(item, deserialized);\n }\n\n return item as DeepPartial<InferType<T>>;\n }\n\n const result: CompiledSchemaCore<T> = {\n preprocess: preprocessFunction,\n postprocess: postProcessFunction,\n getId,\n getProperty,\n properties,\n idProperties,\n hasIdentities,\n hashType,\n getHashType: getHashTypeFunction,\n merge: mergeFunction,\n prepare: prepareFunction,\n clone: cloneFunction,\n deserializePartial,\n deserialize: deserializeFunction,\n serialize: serializeFunction,\n compare: compareFunction,\n compareIds: compareIdsFunction,\n strip: stripFunction,\n hash: hashFunction,\n id,\n getIds: getIdsFunction,\n enrich: enricherFunction,\n collectionName: this.collectionName,\n hasIdentityKeys,\n freeze: freezeFunction,\n enableChangeTracking: enableChangeTrackingFunction,\n definition: this,\n getIndexes: () => {\n\n const indexes: Index[] = [];\n\n for (let i = 0, length = properties.length; i < length; i++) {\n const property = properties[i];\n\n if (property.indexes.length === 0) {\n continue; // No Index\n }\n\n for (let j = 0, l = property.indexes.length; j < l; j++) {\n const indexName = property.indexes[j];\n\n // Test for compound indexes\n const connections = properties.filter(w =>\n w !== property && // Don't match with self\n w.indexes.some(index => index === indexName)\n );\n\n const indexedProperties = [property, ...connections];\n\n if (indexedProperties.length === 1) {\n // Not a compound property\n if (indexedProperties[0].isKey) {\n indexes.push({\n properties: indexedProperties,\n type: \"primary-key\",\n name: indexName\n });\n continue;\n }\n\n if (indexedProperties[0].isDistinct) {\n indexes.push({\n properties: indexedProperties,\n type: \"unique\",\n name: indexName\n });\n continue;\n }\n\n indexes.push({\n properties: indexedProperties,\n type: \"single\",\n name: indexName\n });\n continue;\n }\n\n if (indexes.some(w => w.name === indexName)) {\n continue; // Already in a compound index\n }\n\n indexes.push({\n properties: indexedProperties,\n type: \"compound\",\n name: indexName\n });\n }\n }\n\n return indexes;\n }\n };\n\n return {\n createSubscription: (signal?: AbortSignal) => new SchemaSubscription(result, signal),\n ...result\n }\n } catch (e) {\n throw new SchemaError(e, `Error compiling schema for collection: ${this.collectionName}`);\n }\n }\n}\n","import { SchemaArray } from \"./property/types/SchemaArray\";\nimport { SchemaBase } from \"./property/base/SchemaBase\";\nimport { SchemaBoolean } from \"./property/types/SchemaBoolean\";\nimport { SchemaDate } from \"./property/types/SchemaDate\";\nimport { SchemaDefinition } from \"./SchemaDefinition\";\nimport { SchemaNumber } from \"./property/types/SchemaNumber\";\nimport { SchemaObject } from \"./property/types/SchemaObject\";\nimport { SchemaString } from \"./property/types/SchemaString\";\n\nexport const s = {\n number: <T extends number[] = number[]>(...literals: T) => new SchemaNumber<T[number] extends never ? number : T[number], never>(null, literals),\n string: <T extends string[] = string[]>(...literals: T) => new SchemaString<T[number] extends never ? string : T[number], never>(null, literals),\n boolean: <T extends boolean = boolean>() => new SchemaBoolean<T, never>(),\n date: <T extends Date = Date>() => new SchemaDate<T, never>(),\n array: <T extends any>(schema: SchemaBase<T, never>) => new SchemaArray<SchemaBase<T, never>, never>(schema as any),\n object: <T extends {} = {}>(schema: T) => new SchemaObject<T, never>(schema),\n define: <T extends {}>(collectionName: string, schema: T) => new SchemaDefinition<T>(collectionName, schema)\n}","import { now } from \"../../performance\";\nimport { Tagged, uuid } from \"../../utilities\";\nimport { CompiledSchema, CompiledSchemaCore, InferType, ISchemaSubscription, SchemaId, SubscriptionChanges } from \"../types\";\n\ntype BroadcastChannelReceiverId = Tagged<string, \"BroadcastChannelReceiverId\">;\ntype SubscriptionListenerCallback<T> = (changes: StampedChanges<T>) => void;\ninterface ISubscriptionAction<T> {\n action(changes: StampedChanges<T>): void\n}\ntype StampedChanges<T> = { data: SubscriptionChanges<T>, timestamp: number };\n\nconst registry: Record<SchemaId, SchemaChannel<unknown>> = {};\n\nconst getChannelRegistry = <T>(schemaId: SchemaId): SchemaChannel<T> => {\n\n if (registry[schemaId]) {\n return registry[schemaId] as SchemaChannel<T>;\n }\n\n const channel = new SchemaChannel<T>(schemaId);\n\n registry[schemaId] = channel;\n\n return channel;\n}\n\n// Must have a sender and receiver. Sender cannot listen for it's own message\nclass SchemaChannel<T> {\n\n readonly sender: SchemaChannelSender<T>;\n readonly receiver: SchemaChannelReceiver<T>;\n\n constructor(schemaId: SchemaId) {\n this.sender = new SchemaChannelSender<T>(schemaId);\n this.receiver = new SchemaChannelReceiver<T>(schemaId);\n }\n}\n\nclass SchemaChannelSender<T> {\n\n private readonly broadcastChannel: BroadcastChannel;\n\n constructor(schemaId: SchemaId) {\n this.broadcastChannel = new BroadcastChannel(`__routier-schema-subscription-channel:${schemaId}`);\n }\n\n send(changes: StampedChanges<T>) {\n this.broadcastChannel.postMessage(changes)\n }\n}\n\nclass SchemaChannelReceiver<T> {\n\n private readonly broadcastChannel: BroadcastChannel;\n private subscriptions: SubscriptionListener<T>[] = [];\n\n constructor(schemaId: SchemaId) {\n this.broadcastChannel = new BroadcastChannel(`__routier-schema-subscription-channel:${schemaId}`);\n\n this.broadcastChannel.onmessage = (e) => {\n\n // We can't send to the same instance it is not possbile\n const stampedChanges = e.data as StampedChanges<T>;\n\n for (let i = 0, length = this.subscriptions.length; i < length; i++) {\n const subscription = this.subscriptions[i];\n\n subscription.action(stampedChanges);\n }\n };\n }\n\n addListener(id: BroadcastChannelReceiverId, listener: SubscriptionListenerCallback<T>) {\n this.subscriptions.push(new SubscriptionListener<T>(id, listener));\n }\n\n removeListeners(id: BroadcastChannelReceiverId) {\n this.subscriptions = this.subscriptions.filter(w => w.id !== id);\n }\n}\n\nclass SubscriptionListener<T> implements ISubscriptionAction<T> {\n\n readonly id: BroadcastChannelReceiverId;\n private readonly listener: SubscriptionListenerCallback<T>;\n\n constructor(id: BroadcastChannelReceiverId, listener: SubscriptionListenerCallback<T>) {\n this.id = id;\n this.listener = listener;\n }\n\n action(changes: StampedChanges<T>) {\n this.listener(changes);\n }\n}\n\nexport class SchemaSubscription<T extends {}> implements ISchemaSubscription<T> {\n\n private readonly id: BroadcastChannelReceiverId;\n private readonly schema: CompiledSchemaCore<T>;\n private readonly createdAt: number;\n\n constructor(schema: CompiledSchemaCore<T>, signal?: AbortSignal) {\n this.createdAt = now();\n this.id = uuid(8) as BroadcastChannelReceiverId;\n this.schema = schema;\n\n signal?.addEventListener(\"abort\", () => {\n this.dispose();\n }, { once: true });\n }\n\n send(changes: SubscriptionChanges<T>) {\n const regisry = getChannelRegistry<T>(this.schema.id);\n\n // cannot send raw data, needs to be preprocessed\n const preprocessedChanges: SubscriptionChanges<T> = {\n adds: new Array<InferType<T>>(changes.adds.length),\n removals: new Array<InferType<T>>(changes.removals.length),\n unknown: new Array<InferType<T>>(changes.unknown.length),\n updates: new Array<InferType<T>>(changes.updates.length),\n };\n\n for (let i = 0, length = changes.adds.length; i < length; i++) {\n preprocessedChanges.adds[i] = this.schema.preprocess(changes.adds[i]);\n }\n\n for (let i = 0, length = changes.removals.length; i < length; i++) {\n preprocessedChanges.removals[i] = this.schema.preprocess(changes.removals[i]);\n }\n\n for (let i = 0, length = changes.unknown.length; i < length; i++) {\n preprocessedChanges.unknown[i] = this.schema.preprocess(changes.unknown[i]);\n }\n\n for (let i = 0, length = changes.updates.length; i < length; i++) {\n preprocessedChanges.updates[i] = this.schema.preprocess(changes.updates[i]);\n }\n\n // Send message to all listeners.\n // Since we create a new listener when we do onMessage,\n // we don't need to worry about sending to ourselves, it \n // can't happen\n regisry.sender.send({\n data: preprocessedChanges,\n timestamp: now()\n });\n }\n\n onMessage(callback: (changes: SubscriptionChanges<T>) => void) {\n\n const regisry = getChannelRegistry<T>(this.schema.id);\n\n // Link the callback to an instance\n regisry.receiver.addListener(this.id, ({ data, timestamp }) => {\n\n if (timestamp < this.createdAt) {\n // Sent before the receiver was even created\n return;\n }\n\n // Changes were preprocessed before they were sent, need to postprocess them\n const postProcessedChanges: SubscriptionChanges<T> = {\n adds: new Array<InferType<T>>(data.adds.length),\n removals: new Array<InferType<T>>(data.removals.length),\n unknown: new Array<InferType<T>>(data.unknown.length),\n updates: new Array<InferType<T>>(data.updates.length),\n };\n\n for (let i = 0, length = data.adds.length; i < length; i++) {\n postProcessedChanges.adds[i] = this.schema.preprocess(data.adds[i]);\n }\n\n for (let i = 0, length = data.removals.length; i < length; i++) {\n postProcessedChanges.removals[i] = this.schema.preprocess(data.removals[i]);\n }\n\n for (let i = 0, length = data.unknown.length; i < length; i++) {\n postProcessedChanges.unknown[i] = this.schema.preprocess(data.unknown[i]);\n }\n\n for (let i = 0, length = data.updates.length; i < length; i++) {\n postProcessedChanges.updates[i] = this.schema.preprocess(data.updates[i]);\n }\n\n callback(postProcessedChanges);\n });\n }\n\n dispose() {\n this[Symbol.dispose]();\n }\n\n [Symbol.dispose](): void {\n const regisry = getChannelRegistry<T>(this.schema.id);\n\n // Remove listeners for this instance only\n regisry.receiver.removeListeners(this.id);\n }\n}","export * from './builder';\nexport * from './table';\nexport * from './property/base';\nexport * from './property/modifiers';\nexport * from './property/types';\nexport * from './PropertyInfo';\nexport * from './types';","import { DefaultValue, FunctionBody, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\n\nexport abstract class SchemaBase<T extends any, TModifiers extends SchemaModifiers> {\n\n abstract instance: T;\n modifiers: TModifiers;\n\n isNullable: boolean = false;\n isUnmapped: boolean = false;\n isOptional: boolean = false;\n isKey: boolean = false;\n isIdentity: boolean = false;\n isReadonly: boolean = false;\n isDistict: boolean = false;\n indexes: string[] = [];\n fromPropertyName: string | null = null;\n\n injected: any = null;\n defaultValue: DefaultValue<T> | null = null;\n valueSerializer: PropertySerializer<T> | null = null;\n valueDeserializer: PropertyDeserializer<T> | null = null;\n type: SchemaTypes;\n functionBody: FunctionBody<any, T> | null;\n private _schemaBase = true;\n readonly literals: T[] = [];\n\n constructor(entity?: SchemaBase<T, TModifiers>, literals?: T[]) {\n\n if (entity != null) {\n this.valueSerializer = entity.valueSerializer;\n this.valueDeserializer = entity.valueDeserializer;\n this.functionBody = entity.functionBody;\n this.isNullable = entity.isNullable;\n this.isOptional = entity.isOptional;\n this.isKey = entity.isKey;\n this.isIdentity = entity.isIdentity;\n this.isReadonly = entity.isReadonly;\n this.defaultValue = entity.defaultValue;\n this.type = entity.type;\n this.injected = entity.injected;\n this.indexes = entity.indexes;\n this.fromPropertyName = entity.fromPropertyName;\n }\n\n if (literals) {\n this.literals = literals;\n }\n }\n}","export * from './SchemaBase';","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\nimport { SchemaFrom } from \"./SchemaFrom\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaDefault<T extends any, I, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaDefault = true;\n\n constructor(defaultValue: DefaultValue<T, I>, injected: I, current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.injected = injected;\n this.defaultValue = defaultValue;\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaFrom } from \"./SchemaFrom\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaDeserialize<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaDeserialize = true;\n\n constructor(deserializer: PropertyDeserializer<T>, current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.valueDeserializer = deserializer;\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\n\nexport class SchemaDistinct<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaDistinct = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isDistict = true;\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"./SchemaDefault\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\nimport { SchemaDistinct } from \"./SchemaDistinct\";\nimport { SchemaIdentity } from \"./SchemaIdentity\";\nimport { SchemaNullable } from \"./SchemaNullable\";\nimport { SchemaOptional } from \"./SchemaOptional\";\nimport { SchemaReadonly } from \"./SchemaReadonly\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaFrom<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaFrom = true;\n\n constructor(propertyName: string, current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.fromPropertyName = propertyName;\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\" | \"readonly\">(this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n}","import { SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\n\nexport class SchemaIdentity<T, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaIdentity = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isIdentity = true;\n }\n}","import { uuidv4 } from \"../../../utilities\";\nimport { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"./SchemaDefault\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\nimport { SchemaDistinct } from \"./SchemaDistinct\";\nimport { SchemaFrom } from \"./SchemaFrom\";\nimport { SchemaNullable } from \"./SchemaNullable\";\nimport { SchemaOptional } from \"./SchemaOptional\";\nimport { SchemaReadonly } from \"./SchemaReadonly\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaIndex<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaIndex = true;\n\n constructor(current: SchemaBase<T, TModifiers>, ...indexes: string[]) {\n super(current);\n this.instance = current.instance;\n\n if (indexes.length === 0) {\n indexes.push(uuidv4()); // Create our own unique index identifier\n }\n\n this.indexes = indexes;\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaIdentity } from \"./SchemaIdentity\";\nimport { SchemaDefault } from \"./SchemaDefault\";\nimport { DefaultValue, IdType, SchemaModifiers } from \"../../types\";\nimport { SchemaFrom } from \"./SchemaFrom\";\n\nexport class SchemaKey<T extends IdType, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaKey = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isKey = true;\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaOptional } from \"./SchemaOptional\";\n\nexport class SchemaNullable<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaNullable = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isNullable = true;\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n}","import { SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaNullable } from \"./SchemaNullable\";\n\nexport class SchemaOptional<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaOptional = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isOptional = true;\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"./SchemaDefault\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\nimport { SchemaFrom } from \"./SchemaFrom\";\nimport { SchemaSerialize } from \"./SchemaSerialize\";\n\nexport class SchemaReadonly<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaReadonly = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isReadonly = true;\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n deserializer(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serializer(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"deserialize\">(serializer, this);\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n}","import { PropertyDeserializer, PropertySerializer, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDeserialize } from \"./SchemaDeserialize\";\n\nexport class SchemaSerialize<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n instance: T;\n private _schemaSerialize = true;\n\n constructor(serializer: PropertySerializer<T>, current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.valueSerializer = serializer;\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n}","import { IdType, SchemaModifiers } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaKey } from \"./SchemaKey\";\n\nexport class SchemaTracked<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n private _schemaTracked = true;\n\n constructor(current: SchemaBase<T, TModifiers>) {\n super(current);\n this.instance = current.instance;\n this.isUnmapped = false;\n }\n\n key(): T extends IdType ? SchemaKey<T, TModifiers | \"key\"> : never {\n return new SchemaKey(this as SchemaBase<T & IdType, TModifiers>) as T extends IdType ? SchemaKey<T, TModifiers | \"key\"> : never;\n }\n}","export * from './SchemaDefault';\nexport * from './SchemaDeserialize';\nexport * from './SchemaDistinct';\nexport * from './SchemaIdentity';\nexport * from './SchemaIndex';\nexport * from './SchemaKey';\nexport * from './SchemaNullable';\nexport * from './SchemaOptional';\nexport * from './SchemaReadonly';\nexport * from './SchemaSerialize';\nexport * from './SchemaTracked';\nexport * from './SchemaFrom';","import { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaDeserialize } from '../modifiers/SchemaDeserialize';\nimport { SchemaSerialize } from '../modifiers/SchemaSerialize';\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\n\nexport class SchemaArray<T extends any, TModifiers extends SchemaModifiers> extends SchemaBase<T[], TModifiers> {\n\n instance: T[];\n type = SchemaTypes.Array;\n private _schemaArray = true;\n readonly innerSchema?: SchemaBase<any, any>; // we need to know the type of the array, that is what this is for\n\n constructor(entity?: SchemaBase<T[], TModifiers>, literals?: T[][]) {\n super(entity, literals);\n this.innerSchema = entity;\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T[], TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T[], TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T[], TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T[], I>, injected?: I) {\n return new SchemaDefault<T[], I, TModifiers | \"default\">(value, injected, this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T[]>) {\n return new SchemaDeserialize<T[], TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T[]>) {\n return new SchemaSerialize<T[], TModifiers | \"serialize\">(serializer, this);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T[], TModifiers>(this as any, ...indexes);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaDeserialize } from \"../modifiers/SchemaDeserialize\";\nimport { SchemaDistinct } from \"../modifiers/SchemaDistinct\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaReadonly } from \"../modifiers/SchemaReadonly\";\nimport { SchemaSerialize } from \"../modifiers/SchemaSerialize\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaBoolean<T extends boolean, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.Boolean;\n private _schemaBoolean = true;\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T, TModifiers>(this as any, ...indexes);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaDeserialize } from \"../modifiers/SchemaDeserialize\";\nimport { SchemaDistinct } from \"../modifiers/SchemaDistinct\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaReadonly } from \"../modifiers/SchemaReadonly\";\nimport { SchemaSerialize } from \"../modifiers/SchemaSerialize\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaDate<T extends Date, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.Date;\n private _schemaDate = true;\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T, TModifiers>(this as any, ...indexes);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaDeserialize } from \"../modifiers/SchemaDeserialize\";\nimport { SchemaDistinct } from \"../modifiers/SchemaDistinct\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIdentity } from \"../modifiers/SchemaIdentity\";\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { SchemaKey } from \"../modifiers/SchemaKey\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaReadonly } from \"../modifiers/SchemaReadonly\";\nimport { SchemaSerialize } from \"../modifiers/SchemaSerialize\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaNumber<T extends number, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.Number;\n private _schemaNumber = true;\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n key() {\n return new SchemaKey<T, TModifiers | \"key\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\" | \"readonly\">(this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T, TModifiers>(this as any, ...indexes);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n}","import { DefaultValue, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIdentity } from \"../modifiers/SchemaIdentity\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaObject<T extends {}, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.Object;\n private _schemaObject = true;\n\n constructor(schema: T) {\n super();\n this.instance = schema;\n }\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\" | \"readonly\">(this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n}","import { DefaultValue, PropertyDeserializer, PropertySerializer, SchemaModifiers, SchemaTypes } from \"../../types\";\nimport { SchemaBase } from \"../base/SchemaBase\";\nimport { SchemaDefault } from \"../modifiers/SchemaDefault\";\nimport { SchemaDeserialize } from \"../modifiers/SchemaDeserialize\";\nimport { SchemaDistinct } from \"../modifiers/SchemaDistinct\";\nimport { SchemaFrom } from \"../modifiers/SchemaFrom\";\nimport { SchemaIdentity } from \"../modifiers/SchemaIdentity\";\nimport { SchemaIndex } from \"../modifiers/SchemaIndex\";\nimport { SchemaKey } from \"../modifiers/SchemaKey\";\nimport { SchemaNullable } from \"../modifiers/SchemaNullable\";\nimport { SchemaOptional } from \"../modifiers/SchemaOptional\";\nimport { SchemaReadonly } from \"../modifiers/SchemaReadonly\";\nimport { SchemaSerialize } from \"../modifiers/SchemaSerialize\";\nimport { SchemaArray } from \"./SchemaArray\";\n\nexport class SchemaString<T extends string, TModifiers extends SchemaModifiers> extends SchemaBase<T, TModifiers> {\n\n instance: T;\n type = SchemaTypes.String;\n private _schemaString = true;\n\n from(propertyName: string) {\n return new SchemaFrom<T, TModifiers>(propertyName, this);\n }\n\n optional() {\n return new SchemaOptional<T, TModifiers | \"optional\">(this);\n }\n\n nullable() {\n return new SchemaNullable<T, TModifiers | \"nullable\">(this);\n }\n\n key() {\n return new SchemaKey<T, TModifiers | \"key\">(this);\n }\n\n default<I = never>(value: DefaultValue<T, I>, injected?: I) {\n return new SchemaDefault<T, I, TModifiers | \"default\">(value, injected, this);\n }\n\n readonly() {\n return new SchemaReadonly<T, TModifiers | \"readonly\">(this);\n }\n\n deserialize(deserializer: PropertyDeserializer<T>) {\n return new SchemaDeserialize<T, TModifiers | \"deserialize\">(deserializer, this);\n }\n\n serialize(serializer: PropertySerializer<T>) {\n return new SchemaSerialize<T, TModifiers | \"serialize\">(serializer, this);\n }\n\n identity() {\n return new SchemaIdentity<T, TModifiers | \"identity\" | \"readonly\">(this);\n }\n\n array() {\n return new SchemaArray<typeof this, TModifiers>(this as any);\n }\n\n index(...indexes: string[]) {\n return new SchemaIndex<T, TModifiers>(this as any, ...indexes);\n }\n\n distinct() {\n return new SchemaDistinct<T, TModifiers | \"distinct\">(this);\n }\n}","export * from './SchemaArray';\nexport * from './SchemaBoolean';\nexport * from './SchemaDate';\nexport * from './SchemaNumber';\nexport * from './SchemaObject';\nexport * from './SchemaString';","import { SchemaBase } from \"../property/base/SchemaBase\";\nimport { SchemaTracked } from '../property/modifiers/SchemaTracked';\nimport { SchemaModifiers, SchemaTypes } from \"../types\";\n\nexport class SchemaComputed<T extends any, I, TModifiers extends SchemaModifiers = \"computed\"> extends SchemaBase<T, TModifiers> {\n instance: T;\n type = SchemaTypes.Computed;\n private _schemaComputed = true;\n\n constructor(fn: T, injected: I, current?: SchemaBase<T, TModifiers>) {\n super(current);\n this.injected = injected;\n this.isUnmapped = true;\n this.functionBody = fn as any;\n }\n\n tracked() {\n return new SchemaTracked<T, Exclude<TModifiers, \"unmapped\">>(this as unknown as SchemaBase<T, Exclude<TModifiers, \"unmapped\">>);\n }\n}","import { SchemaBase } from \"../property/base/SchemaBase\";\nimport { SchemaModifiers, SchemaTypes } from \"../types\";\n\nexport class SchemaFunction<T extends any, I, TModifiers extends SchemaModifiers = \"unmapped\"> extends SchemaBase<() => T, TModifiers> {\n instance: () => T;\n type = SchemaTypes.Function;\n private _schemaFunction = true;\n\n constructor(fn: (injected: I) => T, injected: I, current?: SchemaBase<() => T, TModifiers>) {\n super(current);\n this.injected = injected;\n this.isUnmapped = true;\n this.functionBody = fn as any;\n }\n}","export * from './SchemaComputed';\nexport * from './SchemaFunction';","import { SchemaDefinition } from \"./SchemaDefinition\";\nimport { SchemaBase } from \"./property/base/SchemaBase\";\nimport { SchemaArray } from \"./property/types/SchemaArray\";\nimport { SchemaObject } from \"./property/types/SchemaObject\";\nimport { PropertyInfo } from \"./PropertyInfo\";\nimport { DeepPartial } from \"../types\";\nimport { SchemaFunction } from \"./table\";\nimport { SchemaString } from \"./property/types\";\nimport { SchemaOptional } from \"./property/modifiers\";\n\nexport type DefaultValue<T, I = never> = T | ((injected: I) => T);\nexport type FunctionBody<TEntity, TResult> = (entity: TEntity, collectionName: string) => TResult;\nexport type IdType = string | number;\n\nexport enum SchemaTypes {\n Array = \"Array\",\n Boolean = \"Boolean\",\n Date = \"Date\",\n Number = \"Number\",\n Object = \"Object\",\n String = \"String\",\n Definition = \"Definition\",\n Function = \"Function\",\n Computed = \"Computed\"\n}\n\nexport type ArrayShape = string | number | Date | {};\n\nexport type ExpandedProperty = ExpandedChildProperty & {\n assignmentPath: string;\n selectorPath: string;\n properties: Map<string, ExpandedChildProperty>;\n childDegree: number;\n};\n\nexport type ExpandedChildProperty = {\n propertyName: string;\n type: SchemaTypes;\n isNullableOrOptional: boolean;\n isReadonly: boolean;\n isIdentity: boolean;\n isUnmapped: boolean;\n}\n\nexport enum HashType {\n Ids = \"Ids\",\n Object = \"Object\"\n}\n\nexport type HashFunction<TEntity extends {}> = {\n (entity: InferCreateType<TEntity>, type: HashType.Object): string;\n (entity: InferType<TEntity>, type: HashType.Ids): string;\n}\n\nexport type GetHashTypeFunction<TEntity extends {}> = {\n (entity: InferCreateType<TEntity>): HashType.Object;\n (entity: InferType<TEntity>): HashType.Ids;\n}\n\nexport type ChangeTrackingType = \"proxy\" | \"diff\" | \"immutable\";\n\nexport type IndexType = \"single\" | \"compound\" | \"unique\" | \"primary-key\"\nexport type Index = {\n properties: PropertyInfo<any>[],\n type: IndexType;\n name: string;\n}\n\n/**\n * Represents changes to subscriptions, categorizing them by modifications to\n * entities (additions, updates, removals) or query-driven removals.\n * @template T - The type of the entities in the subscription.\n */\nexport type SubscriptionChanges<T extends {}> = {\n /**\n * Entities that have been added to the subscription.\n */\n adds: InferType<T>[];\n /**\n * Entities that have been updated within the subscription.\n */\n updates: InferType<T>[];\n /**\n * Entities that have been removed from the subscription.\n */\n removals: InferType<T>[];\n /**\n * Entities that have been added/updated/removed from the subscription and it is unknown \n * if the entities have been added/updated/removed.\n */\n unknown: InferType<T>[];\n}\n\nexport interface ISchemaSubscription<T extends {}> extends Disposable {\n send(changes: SubscriptionChanges<T>): void;\n onMessage(callback: (changes: SubscriptionChanges<T>) => void): void;\n}\n\ntype Enrich<TEntity extends {}> = {\n (entity: InferType<TEntity>, changeTrackingType: ChangeTrackingType): InferType<TEntity>;\n (entity: InferCreateType<TEntity>, changeTrackingType: ChangeTrackingType): InferCreateType<TEntity>;\n}\nexport type Prepare<TEntity extends {}> = {\n (entity: InferCreateType<TEntity>): InferCreateType<TEntity>;\n (entity: InferType<TEntity>): InferType<TEntity>;\n}\nexport type Preprocess<TEntity extends {}> = {\n (entity: InferCreateType<TEntity>): InferType<TEntity>;\n (entity: InferType<TEntity>): InferType<TEntity>;\n}\n\nexport type CompiledSchemaCore<TEntity extends {}> = Omit<CompiledSchema<TEntity>, \"createSubscription\">;\n\n/**\n * Represents a fully compiled schema with all utilities and metadata for an entity type.\n */\nexport type CompiledSchema<TEntity extends {}> = {\n\n deserializePartial: (item: Record<string, unknown>, properties: PropertyInfo<TEntity>[]) => DeepPartial<InferType<TEntity>>;\n\n createSubscription: (abortSignal?: AbortSignal) => ISchemaSubscription<TEntity>;\n /** Returns the property info for a given id (full path) */\n getProperty: (id: string) => PropertyInfo<TEntity>;\n /** Returns the ID of the given entity. */\n getId: (entity: InferType<TEntity>) => IdType;\n /** Returns a deep clone of the given entity. */\n clone: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** Removes unmapped or extraneous properties from the entity. */\n strip: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** Prepares a new entity for creation, applying defaults and transformations. */\n prepare: Prepare<TEntity>;\n /** Merges the source entity into the destination entity. */\n merge: (destination: InferType<TEntity> | InferCreateType<TEntity>, source: InferType<TEntity>) => InferType<TEntity>;\n /** Indicates if the schema has identity properties. */\n hasIdentities: boolean;\n /** List of properties that are identity keys. */\n idProperties: PropertyInfo<TEntity>[];\n /** All property metadata for the schema. */\n properties: PropertyInfo<TEntity>[],\n /** The hash type used for this schema. */\n hashType: HashType;\n /** Computes a hash for the given entity. */\n hash: HashFunction<TEntity>;\n /** Returns the hash type for the given entity. */\n getHashType: GetHashTypeFunction<TEntity>;\n /** Compares two entities for equality. */\n compare: (a: InferType<TEntity>, fromDb: InferType<TEntity>) => boolean;\n /** Deserializes an entity from storage format. */\n deserialize: (entity: InferType<TEntity>) => InferType<TEntity>;\n\n /** Combines serializing and preparing an entity for saving. */\n preprocess: Preprocess<TEntity>;\n /** Combines deserializing and enriching an entity for selection. */\n postprocess: Enrich<TEntity>;\n\n /** Serializes an entity to storage format. */\n serialize: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** Unique id for the schema. */\n id: SchemaId,\n /** The name of the collection for this schema. */\n collectionName: string;\n /** Returns all IDs for the given entity (usually a single-element tuple). */\n getIds: (entity: InferType<TEntity>) => [IdType];\n /** Enriches the entity with change tracking or other metadata. */\n enrich: Enrich<TEntity>;\n /** Indicates if the schema has identity keys. */\n hasIdentityKeys: boolean;\n /** Returns a deeply frozen (immutable) version of the entity. */\n freeze: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** Enables change tracking on the entity. */\n enableChangeTracking: (entity: InferType<TEntity>) => InferType<TEntity>;\n /** The schema definition object. */\n definition: SchemaDefinition<TEntity>;\n /** Returns all indexes defined for this schema. */\n getIndexes: () => Index[];\n /** Compares two entities for Id equality. */\n compareIds: (a: InferType<TEntity>, b: InferType<TEntity>) => boolean;\n}\n\nexport type PropertySerializer<T extends any> = (value: T) => string | number;\nexport type PropertyDeserializer<T extends any> = (value: string | number) => T;\n\nexport type SchemaId = number\n\nexport type SchemaModifiers = \"default\" | \"deserialize\" |\n \"identity\" | \"key\" |\n \"nullable\" | \"optional\" |\n \"readonly\" | \"serialize\" |\n \"unmapped\" | \"computed\" |\n \"distinct\";\n\ntype InferPrimitive<T> =\n T extends SchemaOptional<infer C, infer __> ? C extends (string | number | Date) ? C : { [K in keyof C]: InferPrimitive<C[K]> } :\n T extends SchemaArray<infer Y, infer __> ? InferPrimitive<Y>[]\n : T extends SchemaObject<infer Obj, infer _> ?\n { [K in keyof Obj]: InferPrimitive<Obj[K]> } : // Process nested objects\n T extends SchemaFunction<infer F, infer __> ? F : T extends SchemaBase<infer X, infer _> ?\n X extends Array<infer A> ? InferPrimitive<A>[] : X : // Extract the primitive type\n never;\n\nexport type InferType<T> = T extends CompiledSchema<infer R> ? InferCompiledSchema<R> : T extends {} ? InferCompiledSchema<T> : T;\nexport type InferCreateType<T> = T extends CompiledSchema<infer R> ? InferCompiledCreateSchema<R> : T extends {} ? InferCompiledCreateSchema<T> : unknown;\nexport type InferMappedType<T> = T extends SchemaBase<infer K, infer __> ? InferType<K> : InferCompiledSchema<T>;\n\ntype HasModifier<T, K extends keyof T, M extends SchemaModifiers> =\n T[K] extends SchemaBase<any, infer Mods> ?\n M extends Mods ? true : false :\n false;\n\ntype IsPlainProperty<T, K extends keyof T> =\n [\n HasModifier<T, K, \"readonly\">,\n HasModifier<T, K, \"optional\">,\n HasModifier<T, K, \"nullable\">\n ] extends [\n false,\n false,\n false\n ] ? true : false;\n\ntype IsPlainCreateProperty<T, K extends keyof T> =\n [\n HasModifier<T, K, \"identity\">,\n HasModifier<T, K, \"default\">,\n HasModifier<T, K, \"computed\">,\n HasModifier<T, K, \"unmapped\">,\n HasModifier<T, K, \"optional\">,\n HasModifier<T, K, \"nullable\">\n ] extends [\n false,\n false,\n false,\n false,\n false,\n false\n ] ? true : false;\n\ntype InferCompiledSchema<T> = CoalesceEmpty<{\n [K in keyof T as IsPlainProperty<T, K> extends true ? K : never]: InferPrimitive<T[K]>\n}, {\n readonly [K in keyof T as HasModifier<T, K, \"readonly\"> extends true ? K : never]: InferPrimitive<T[K]>\n }, {\n [K in keyof T as HasModifier<T, K, \"optional\"> extends true ? K : never]?: InferPrimitive<T[K]>\n }, {\n [K in keyof T as HasModifier<T, K, \"nullable\"> extends true ? K : never]: null | InferPrimitive<T[K]>\n }>;\n\ntype InferCompiledCreateSchema<T> = CoalesceEmpty<{\n [K in keyof T as IsPlainCreateProperty<T, K> extends true ? K : never]: InferPrimitive<T[K]>\n}, {\n [K in keyof T as HasModifier<T, K, \"optional\"> extends true ? K : never]?: InferPrimitive<T[K]>\n }, {\n [K in keyof T as HasModifier<T, K, \"default\"> extends true ? K : never]?: InferPrimitive<T[K]>\n }, {\n [K in keyof T as HasModifier<T, K, \"nullable\"> extends true ? K : never]: null | InferPrimitive<T[K]>\n }>;\n\ntype IsEmptyObject<T> = keyof T extends never ? true : false;\ntype 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);\n","export const toMap = <T extends {}>(data: T[], keySelector: (item: T) => T[keyof T] | string) => {\n\n const result = new Map<T[keyof T] | string, T>();\n\n for (let i = 0; i < data.length; i++) {\n const item = data[i];\n const key = keySelector(item);\n result.set(key, item);\n }\n\n return result;\n}\n","export const isDate = (data: unknown): data is Date => {\n if (data == null) {\n return false;\n }\n\n if (typeof data !== \"object\") {\n return false;\n }\n\n return data instanceof Date;\n}","import { InferCreateType, InferType, SchemaId } from \"../schema\";\nimport { DbPluginBulkPersistEvent, EntityUpdateInfo } from \"../plugins\";\n\ntype DbEvent = {\n type: \"add\",\n data: InferCreateType<unknown>;\n} | {\n type: \"update\",\n data: EntityUpdateInfo<unknown>;\n} | {\n type: \"remove\",\n data: InferType<unknown>;\n}\n\nexport const toEventArray = (event: DbPluginBulkPersistEvent): [SchemaId, DbEvent][] => {\n\n const result: [SchemaId, DbEvent][] = [];\n for (const [schemaId, changes] of event.operation) {\n\n if (changes.hasItems === false) {\n continue;\n }\n\n if (changes.adds.length > 0) {\n result.push(...changes.adds.map(add => {\n return [schemaId as SchemaId, { data: { ...add }, type: \"add\" }] as [SchemaId, DbEvent];\n }));\n }\n\n if (changes.updates.length > 0) {\n result.push(...changes.updates.map(update => {\n return [schemaId as SchemaId, { data: { ...update }, type: \"update\" }] as [SchemaId, DbEvent];\n }));\n }\n\n if (changes.removes.length > 0) {\n result.push(...changes.removes.map(remove => {\n return [schemaId as SchemaId, { data: { ...remove }, type: \"remove\" }] as [SchemaId, DbEvent];\n }));\n }\n }\n\n return result\n}","export const noop = (...args: any[]) => { };","export * from './arrays';\nexport * from './strings';\nexport * from './dates';\nexport * from './objects';\nexport * from './runtime';\nexport * from './uuid';\nexport * from './replication';\nexport * from './types';\nexport * from './queryOptionsCollection';\nexport * from './dbPluginEventUtils';\nexport * from './functions';","export const cast = <TIn, TOut>(item: TIn) => {\n return item as unknown as TOut;\n}\n\nexport function clone<T extends {}>(data: T): T {\n return JSON.parse(JSON.stringify(data)) as T;\n}","import { QueryOptionsCollection } from \"../plugins/query\";\n\nexport const combineQueryOptionsCollections = <T>(...collections: QueryOptionsCollection<T>[]) => {\n const result = new QueryOptionsCollection<T>();\n\n for (let i = 0, length = collections.length; i < length; i++) {\n const collection = collections[i];\n\n // Add scoped items first\n collection.forEach(item => {\n result.add(item.name, item.value);\n });\n }\n\n return result;\n}","import { BulkPersistResult, BulkPersistChanges } from \"../collections\";\nimport { DbPluginBulkPersistEvent } from \"../plugins\";\n\nexport const resolveBulkPersistChanges = (event: DbPluginBulkPersistEvent, result: BulkPersistResult, bulkPersistChanges: BulkPersistChanges) => {\n // make sure we swap the adds here, that way we can make sure other persist events\n // don't take their additions and try to change subsequent calls\n for (const [schemaId, changes] of event.operation) {\n\n const schemmaBulkPersistResult = result.get(schemaId);\n const schemaBulkPersistChanges = bulkPersistChanges.resolve(schemaId);\n\n // Set the original removes\n schemaBulkPersistChanges.removes = changes.removes;\n\n // Set the original updates\n schemaBulkPersistChanges.updates = changes.updates;\n\n // Take the adds from the result and set them to be persisted\n // in the replicated plugins because the id's are set in the \n // memory data store\n schemaBulkPersistChanges.adds = schemmaBulkPersistResult.adds;\n }\n}","export const isNodeRuntime = () => typeof process !== 'undefined' &&\n process.versions != null &&\n process.versions.node != null;","export const hash = (value: string, seed: number = 0) => {\n // From Stack Overflow\n // https://stackoverflow.com/a/52171480/3329760\n let h1 = 0xdeadbeef ^ seed, h2 = 0x41c6ce57 ^ seed;\n\n for (let i = 0, ch: number; i < value.length; i++) {\n ch = value.charCodeAt(i);\n h1 = Math.imul(h1 ^ ch, 2654435761);\n h2 = Math.imul(h2 ^ ch, 1597334677);\n }\n\n h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507);\n h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909);\n h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507);\n h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909);\n\n return 4294967296 * (2097151 & h2) + (h1 >>> 0);\n}\n\n/**\n * Fast string hash optimized for comparisons.\n * Uses djb2 algorithm - very fast and good distribution for short to medium strings.\n * Same input always produces same output (deterministic).\n * \n * @param value - The string to hash\n * @param seed - Optional seed value (default: 5381)\n * @returns A positive 32-bit integer hash value\n * \n * @example\n * ```ts\n * fastHash(\"test\") === fastHash(\"test\") // true\n * fastHash(\"test\") !== fastHash(\"test2\") // true\n * ```\n */\nexport const fastHash = (value: string, seed: number = 5381): number => {\n let hash = seed;\n for (let i = 0; i < value.length; i++) {\n hash = ((hash << 5) + hash) + value.charCodeAt(i);\n }\n return hash >>> 0; // Convert to unsigned 32-bit integer\n}\n\n/**\n * Converts any value to a readable string representation.\n * Handles primitives, objects, arrays, classes, dates, errors, and functions.\n * Supports depth limiting to prevent infinite recursion on circular references.\n * \n * @param obj - The value to stringify\n * @param maxDepth - Maximum depth for nested objects (default: 3)\n * @param currentDepth - Current recursion depth (default: 0)\n * @returns String representation of the value\n * \n * @example\n * ```ts\n * stringifyObject({ name: \"test\", count: 5 }) // '{ name: \"test\", count: 5 }'\n * stringifyObject([1, 2, 3]) // '[1, 2, 3]'\n * stringifyObject(new Date()) // 'Date(2024-01-01T00:00:00.000Z)'\n * ```\n */\nexport function stringifyObject(obj: unknown, maxDepth: number = 3, currentDepth: number = 0): string {\n if (obj === null) return 'null';\n if (obj === undefined) return 'undefined';\n\n const type = typeof obj;\n\n switch (type) {\n case 'string':\n return `\"${obj}\"`;\n case 'number':\n case 'boolean':\n return String(obj);\n case 'function':\n return `[Function: ${getFunctionName(obj as Function)}]`;\n case 'object':\n if (currentDepth >= maxDepth) {\n return '[Max Depth Reached]';\n }\n return stringifyObjectValue(obj, maxDepth, currentDepth);\n default:\n return `[${type}]`;\n }\n}\n\nfunction getFunctionName(fn: Function): string {\n const name = fn.name;\n return name || 'anonymous';\n}\n\nfunction getObjectProperties(obj: any): Record<string, any> {\n const properties: Record<string, any> = {};\n\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n properties[key] = obj[key];\n }\n }\n\n return properties;\n}\n\nfunction stringifyObjectValue(obj: any, maxDepth: number, currentDepth: number): string {\n if (obj === null) return 'null';\n\n if (obj instanceof Date) {\n return `Date(${obj.toISOString()})`;\n }\n\n if (obj instanceof Error) {\n return `Error(${obj.message})`;\n }\n\n if (obj instanceof RegExp) {\n return obj.toString();\n }\n\n if (Array.isArray(obj)) {\n return stringifyArray(obj, maxDepth, currentDepth);\n }\n\n if (obj.constructor && obj.constructor.name !== 'Object') {\n return stringifyClassInstance(obj, maxDepth, currentDepth);\n }\n\n return stringifyPlainObject(obj, maxDepth, currentDepth);\n}\n\nfunction stringifyArray(arr: any[], maxDepth: number, currentDepth: number): string {\n if (arr.length === 0) return '[]';\n\n const items = arr.slice(0, 5).map(item =>\n stringifyObject(item, maxDepth, currentDepth + 1)\n );\n\n const suffix = arr.length > 5 ? `... (+${arr.length - 5} more)` : '';\n return `[${items.join(', ')}${suffix}]`;\n}\n\nfunction stringifyClassInstance(obj: any, maxDepth: number, currentDepth: number): string {\n const className = obj.constructor.name;\n const properties = getObjectProperties(obj);\n\n if (Object.keys(properties).length === 0) {\n return `${className} {}`;\n }\n\n const props = Object.entries(properties)\n .slice(0, 5)\n .map(([key, value]) => {\n const isPrimitive = value === null || value === undefined ||\n (typeof value !== 'object' && typeof value !== 'function');\n const depth = isPrimitive ? currentDepth : currentDepth + 1;\n return `${key}: ${stringifyObject(value, maxDepth, depth)}`;\n });\n\n const suffix = Object.keys(properties).length > 5 ?\n `... (+${Object.keys(properties).length - 5} more)` : '';\n\n return `${className} { ${props.join(', ')}${suffix} }`;\n}\n\nfunction stringifyPlainObject(obj: any, maxDepth: number, currentDepth: number): string {\n const properties = getObjectProperties(obj);\n\n if (Object.keys(properties).length === 0) {\n return '{}';\n }\n\n const props = Object.entries(properties)\n .slice(0, 5)\n .map(([key, value]) => {\n const isPrimitive = value === null || value === undefined ||\n (typeof value !== 'object' && typeof value !== 'function');\n const depth = isPrimitive ? currentDepth : currentDepth + 1;\n return `${key}: ${stringifyObject(value, maxDepth, depth)}`;\n });\n\n const suffix = Object.keys(properties).length > 5 ?\n `... (+${Object.keys(properties).length - 5} more)` : '';\n\n return `{ ${props.join(', ')}${suffix} }`;\n}","export const uuid = (length: number = 16): string => {\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const charLength = chars.length;\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += chars[Math.random() * charLength | 0];\n }\n return result;\n}\n\nconst HEX_CHARS = '0123456789abcdef';\nconst UUID_TEMPLATE = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n\nconst hasCrypto =\n typeof crypto !== 'undefined' && typeof crypto.getRandomValues === 'function';\n\nexport const uuidv4 = (): string => {\n let randomBytes: Uint8Array | null = null;\n if (hasCrypto) {\n randomBytes = crypto.getRandomValues(new Uint8Array(16));\n }\n\n let byteIndex = 0;\n let uuid = '';\n\n for (let i = 0; i < UUID_TEMPLATE.length; i++) {\n const c = UUID_TEMPLATE[i];\n if (c === '-') {\n uuid += '-';\n continue;\n }\n\n let r: number;\n if (hasCrypto && randomBytes) {\n // Each byte gives two hex digits (nibbles)\n r =\n (i % 2 === 0\n ? randomBytes[byteIndex] >> 4\n : randomBytes[byteIndex++] & 0x0f);\n } else {\n r = Math.floor(Math.random() * 16);\n }\n\n if (c === 'x') {\n uuid += HEX_CHARS[r];\n } else if (c === 'y') {\n // Variant bits: 8, 9, A, or B\n uuid += HEX_CHARS[(r & 0x3) | 0x8];\n } else if (c === '4') {\n uuid += '4';\n }\n }\n\n return uuid;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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 * from './assertions';\nexport * from './codegen';\nexport * from './collections';\nexport * from './errors';\nexport * from './expressions';\nexport * from './performance';\nexport * from './pipeline';\nexport * from './plugins';\nexport * from './results';\nexport * from './schema';\nexport * from './types';\nexport * from './utilities';\nexport * from './capabilities';"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAsC;AAE/B,SAAS,UAAU,CAAC,IAAa;IACpC,IAAI,kDAAM,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;QACzB,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAC;IAC/C,CAAC;AACL,CAAC;AAEM,SAAS,eAAe,CAAI,IAA0B,EAAE,OAAiC;IAC5F,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACf,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,IAAI,SAAS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