lakutata 2.0.80 → 2.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/com/cacher.cjs +8 -10
- package/com/cacher.d.ts +83 -14
- package/com/cacher.mjs +8 -10
- package/com/database.cjs +11 -11
- package/com/database.mjs +11 -11
- package/com/docker.cjs +17 -19
- package/com/docker.d.ts +3 -141
- package/com/docker.mjs +13 -15
- package/com/entrypoint.cjs +7 -5
- package/com/entrypoint.mjs +7 -5
- package/com/logger.cjs +7 -7
- package/com/logger.mjs +7 -7
- package/com/monitor.cjs +5 -3
- package/com/monitor.mjs +5 -3
- package/decorator/ctrl.cjs +3 -3
- package/decorator/ctrl.mjs +3 -3
- package/decorator/orm.cjs +98 -98
- package/decorator/orm.mjs +142 -56
- package/helper.cjs +9 -11
- package/helper.mjs +5 -7
- package/lakutata.cjs +23 -30
- package/lakutata.mjs +14 -18
- package/orm.cjs +1421 -884
- package/orm.mjs +1474 -724
- package/package.json +1 -1
- package/provider/database.cjs +11 -11
- package/provider/database.mjs +11 -11
- package/provider/passwordHash.cjs +4 -2
- package/provider/passwordHash.mjs +4 -2
- package/src/components/Database.cjs +13 -13
- package/src/components/Database.mjs +17 -17
- package/src/components/Logger.cjs +7 -7
- package/src/components/Logger.mjs +7 -7
- package/src/components/cacher/Cacher.cjs +1186 -272
- package/src/components/cacher/Cacher.mjs +1094 -180
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +478 -2962
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +468 -2946
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +12 -12
- package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +11 -11
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +16 -16
- package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +14 -14
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +11 -11
- package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +11 -11
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +12 -12
- package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +13 -13
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +2 -2
- package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +2 -2
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +10 -10
- package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +10 -10
- package/src/components/cacher/lib/IsDriverPackageInstalled.cjs +2 -2
- package/src/components/cacher/lib/IsDriverPackageInstalled.mjs +5 -5
- package/src/components/docker/ConnectionOptionsBuilder.cjs +23 -25
- package/src/components/docker/ConnectionOptionsBuilder.mjs +19 -21
- package/src/components/docker/Docker.cjs +5035 -5096
- package/src/components/docker/Docker.mjs +4955 -5016
- package/src/components/docker/lib/DockerContainer.cjs +23 -25
- package/src/components/docker/lib/DockerContainer.mjs +17 -19
- package/src/components/docker/lib/DockerContainerTTY.cjs +9 -11
- package/src/components/docker/lib/DockerContainerTTY.mjs +9 -11
- package/src/components/docker/lib/DockerImage.cjs +4 -2
- package/src/components/docker/lib/DockerImage.mjs +4 -2
- package/src/components/docker/lib/ParseEnvToRecord.cjs +2 -2
- package/src/components/docker/lib/ParseEnvToRecord.mjs +12 -12
- package/src/components/docker/lib/ParseRepositoryTag.cjs +9 -9
- package/src/components/docker/lib/ParseRepositoryTag.mjs +11 -11
- package/src/components/entrypoint/Entrypoint.cjs +2179 -1687
- package/src/components/entrypoint/Entrypoint.mjs +2182 -1690
- package/src/components/entrypoint/lib/AccessControl.cjs +4 -2
- package/src/components/entrypoint/lib/AccessControl.mjs +4 -2
- package/src/components/entrypoint/lib/AccessControlRule.cjs +4 -2
- package/src/components/entrypoint/lib/AccessControlRule.mjs +4 -2
- package/src/components/entrypoint/lib/Controller.cjs +4 -2
- package/src/components/entrypoint/lib/Controller.mjs +4 -2
- package/src/components/monitor/AliveMonitor.cjs +6 -4
- package/src/components/monitor/AliveMonitor.mjs +6 -4
- package/src/components/monitor/CpuMonitor.cjs +5 -3
- package/src/components/monitor/CpuMonitor.mjs +5 -3
- package/src/components/monitor/EventLoopMonitor.cjs +4 -2
- package/src/components/monitor/EventLoopMonitor.mjs +4 -2
- package/src/components/monitor/HttpRequestMonitor.cjs +5 -3
- package/src/components/monitor/HttpRequestMonitor.mjs +5 -3
- package/src/components/monitor/MemoryMonitor.cjs +8 -6
- package/src/components/monitor/MemoryMonitor.mjs +5 -3
- package/src/decorators/asst/After.cjs +3 -3
- package/src/decorators/asst/After.mjs +2 -2
- package/src/decorators/asst/Before.cjs +2 -2
- package/src/decorators/asst/Before.mjs +4 -4
- package/src/decorators/ctrl/CLIAction.cjs +5 -5
- package/src/decorators/ctrl/CLIAction.mjs +10 -10
- package/src/decorators/ctrl/HTTPAction.cjs +9 -9
- package/src/decorators/ctrl/HTTPAction.mjs +7 -7
- package/src/decorators/ctrl/ServiceAction.cjs +6 -6
- package/src/decorators/ctrl/ServiceAction.mjs +7 -7
- package/src/decorators/ctrl/http/DELETE.cjs +5 -5
- package/src/decorators/ctrl/http/DELETE.mjs +5 -5
- package/src/decorators/ctrl/http/GET.cjs +5 -5
- package/src/decorators/ctrl/http/GET.mjs +5 -5
- package/src/decorators/ctrl/http/HEAD.cjs +5 -5
- package/src/decorators/ctrl/http/HEAD.mjs +5 -5
- package/src/decorators/ctrl/http/OPTIONS.cjs +5 -5
- package/src/decorators/ctrl/http/OPTIONS.mjs +5 -5
- package/src/decorators/ctrl/http/PATCH.cjs +5 -5
- package/src/decorators/ctrl/http/PATCH.mjs +5 -5
- package/src/decorators/ctrl/http/POST.cjs +5 -5
- package/src/decorators/ctrl/http/POST.mjs +5 -5
- package/src/decorators/ctrl/http/PUT.cjs +5 -5
- package/src/decorators/ctrl/http/PUT.mjs +5 -5
- package/src/decorators/di/Autoload.cjs +2 -2
- package/src/decorators/di/Autoload.mjs +2 -2
- package/src/decorators/di/Configurable.cjs +3 -3
- package/src/decorators/di/Configurable.mjs +2 -2
- package/src/decorators/di/Inject.cjs +6 -6
- package/src/decorators/di/Inject.mjs +11 -11
- package/src/decorators/di/Lifetime.cjs +18 -18
- package/src/decorators/di/Lifetime.mjs +13 -13
- package/src/decorators/dto/Accept.cjs +3 -3
- package/src/decorators/dto/Accept.mjs +2 -2
- package/src/decorators/dto/Expect.cjs +2 -2
- package/src/decorators/dto/Expect.mjs +3 -3
- package/src/decorators/dto/IndexSignature.cjs +2 -2
- package/src/decorators/dto/IndexSignature.mjs +3 -3
- package/src/decorators/dto/Return.cjs +3 -3
- package/src/decorators/dto/Return.mjs +2 -2
- package/src/decorators/orm/AfterInsert.cjs +17 -39
- package/src/decorators/orm/AfterInsert.mjs +18 -38
- package/src/decorators/orm/AfterLoad.cjs +17 -39
- package/src/decorators/orm/AfterLoad.mjs +18 -38
- package/src/decorators/orm/AfterRecover.cjs +17 -39
- package/src/decorators/orm/AfterRecover.mjs +18 -38
- package/src/decorators/orm/AfterRemove.cjs +17 -39
- package/src/decorators/orm/AfterRemove.mjs +18 -38
- package/src/decorators/orm/AfterSoftRemove.cjs +17 -39
- package/src/decorators/orm/AfterSoftRemove.mjs +18 -38
- package/src/decorators/orm/AfterUpdate.cjs +17 -39
- package/src/decorators/orm/AfterUpdate.mjs +18 -38
- package/src/decorators/orm/BeforeInsert.cjs +17 -39
- package/src/decorators/orm/BeforeInsert.mjs +18 -38
- package/src/decorators/orm/BeforeRecover.cjs +17 -39
- package/src/decorators/orm/BeforeRecover.mjs +18 -38
- package/src/decorators/orm/BeforeRemove.cjs +17 -39
- package/src/decorators/orm/BeforeRemove.mjs +18 -38
- package/src/decorators/orm/BeforeSoftRemove.cjs +17 -39
- package/src/decorators/orm/BeforeSoftRemove.mjs +18 -38
- package/src/decorators/orm/BeforeUpdate.cjs +17 -39
- package/src/decorators/orm/BeforeUpdate.mjs +18 -38
- package/src/decorators/orm/Check.cjs +17 -42
- package/src/decorators/orm/Check.mjs +18 -41
- package/src/decorators/orm/ChildEntity.cjs +17 -42
- package/src/decorators/orm/ChildEntity.mjs +18 -41
- package/src/decorators/orm/Column.cjs +17 -74
- package/src/decorators/orm/Column.mjs +19 -74
- package/src/decorators/orm/CreateDateColumn.cjs +17 -38
- package/src/decorators/orm/CreateDateColumn.mjs +18 -37
- package/src/decorators/orm/DeleteDateColumn.cjs +17 -38
- package/src/decorators/orm/DeleteDateColumn.mjs +17 -36
- package/src/decorators/orm/Entity.cjs +17 -48
- package/src/decorators/orm/Entity.mjs +17 -46
- package/src/decorators/orm/EventSubscriber.cjs +17 -35
- package/src/decorators/orm/EventSubscriber.mjs +18 -34
- package/src/decorators/orm/Exclusion.cjs +17 -42
- package/src/decorators/orm/Exclusion.mjs +18 -41
- package/src/decorators/orm/Generated.cjs +17 -37
- package/src/decorators/orm/Generated.mjs +18 -36
- package/src/decorators/orm/Index.cjs +17 -54
- package/src/decorators/orm/Index.mjs +19 -54
- package/src/decorators/orm/JoinColumn.cjs +17 -42
- package/src/decorators/orm/JoinColumn.mjs +18 -41
- package/src/decorators/orm/JoinTable.cjs +17 -43
- package/src/decorators/orm/JoinTable.mjs +17 -41
- package/src/decorators/orm/ManyToMany.cjs +17 -55
- package/src/decorators/orm/ManyToMany.mjs +17 -53
- package/src/decorators/orm/ManyToOne.cjs +17 -55
- package/src/decorators/orm/ManyToOne.mjs +17 -53
- package/src/decorators/orm/ObjectIdColumn.cjs +17 -41
- package/src/decorators/orm/ObjectIdColumn.mjs +18 -40
- package/src/decorators/orm/OneToMany.cjs +17 -47
- package/src/decorators/orm/OneToMany.mjs +19 -47
- package/src/decorators/orm/OneToOne.cjs +17 -55
- package/src/decorators/orm/OneToOne.mjs +17 -53
- package/src/decorators/orm/PrimaryColumn.cjs +17 -62
- package/src/decorators/orm/PrimaryColumn.mjs +19 -62
- package/src/decorators/orm/PrimaryGeneratedColumn.cjs +17 -67
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +19 -67
- package/src/decorators/orm/RelationId.cjs +17 -39
- package/src/decorators/orm/RelationId.mjs +18 -38
- package/src/decorators/orm/TableInheritance.cjs +17 -39
- package/src/decorators/orm/TableInheritance.mjs +18 -38
- package/src/decorators/orm/Tree.cjs +17 -37
- package/src/decorators/orm/Tree.mjs +18 -36
- package/src/decorators/orm/TreeChildren.cjs +17 -44
- package/src/decorators/orm/TreeChildren.mjs +17 -42
- package/src/decorators/orm/TreeLevelColumn.cjs +17 -38
- package/src/decorators/orm/TreeLevelColumn.mjs +17 -36
- package/src/decorators/orm/TreeParent.cjs +17 -44
- package/src/decorators/orm/TreeParent.mjs +17 -42
- package/src/decorators/orm/Unique.cjs +17 -57
- package/src/decorators/orm/Unique.mjs +19 -57
- package/src/decorators/orm/UpdateDateColumn.cjs +17 -38
- package/src/decorators/orm/UpdateDateColumn.mjs +18 -37
- package/src/decorators/orm/VersionColumn.cjs +17 -38
- package/src/decorators/orm/VersionColumn.mjs +18 -37
- package/src/decorators/orm/ViewColumn.cjs +17 -38
- package/src/decorators/orm/ViewColumn.mjs +18 -37
- package/src/decorators/orm/ViewEntity.cjs +17 -47
- package/src/decorators/orm/ViewEntity.mjs +18 -46
- package/src/decorators/orm/VirtualColumn.cjs +17 -55
- package/src/decorators/orm/VirtualColumn.mjs +17 -53
- package/src/lib/base/BaseObject.cjs +4 -2
- package/src/lib/base/BaseObject.mjs +4 -2
- package/src/lib/base/EventEmitter.cjs +1202 -1195
- package/src/lib/base/EventEmitter.mjs +1202 -1195
- package/src/lib/base/async-constructor/Append.cjs +11 -11
- package/src/lib/base/async-constructor/Append.mjs +7 -7
- package/src/lib/base/internal/ApplicationConfigLoader.cjs +4 -2
- package/src/lib/base/internal/ApplicationConfigLoader.mjs +4 -2
- package/src/lib/base/internal/BasicInfo.cjs +10 -10
- package/src/lib/base/internal/BasicInfo.mjs +9 -9
- package/src/lib/base/internal/CamelCase.cjs +4 -4
- package/src/lib/base/internal/CamelCase.mjs +11 -11
- package/src/lib/base/internal/ConfigurableRecordsInjection.cjs +19 -19
- package/src/lib/base/internal/ConfigurableRecordsInjection.mjs +18 -18
- package/src/lib/base/internal/ConstructorSymbol.cjs +10 -10
- package/src/lib/base/internal/ConstructorSymbol.mjs +8 -8
- package/src/lib/base/internal/ControllerEntrypoint.cjs +67 -67
- package/src/lib/base/internal/ControllerEntrypoint.mjs +38 -38
- package/src/lib/base/internal/DataValidator.cjs +176 -179
- package/src/lib/base/internal/DataValidator.mjs +221 -224
- package/src/lib/base/internal/GetActionDTOAndOptions.cjs +9 -9
- package/src/lib/base/internal/GetActionDTOAndOptions.mjs +10 -10
- package/src/lib/base/internal/IEEE754.cjs +74 -74
- package/src/lib/base/internal/IEEE754.mjs +70 -70
- package/src/lib/base/internal/MethodAssistantFunction.cjs +28 -28
- package/src/lib/base/internal/MethodAssistantFunction.mjs +38 -38
- package/src/lib/base/internal/MethodValidation.cjs +25 -25
- package/src/lib/base/internal/MethodValidation.mjs +20 -20
- package/src/lib/base/internal/ModuleConfigLoader.cjs +4 -3
- package/src/lib/base/internal/ModuleConfigLoader.mjs +4 -3
- package/src/lib/base/internal/ObjectConfiguration.cjs +10 -10
- package/src/lib/base/internal/ObjectConfiguration.mjs +15 -15
- package/src/lib/base/internal/ObjectContainer.cjs +7 -7
- package/src/lib/base/internal/ObjectContainer.mjs +6 -6
- package/src/lib/base/internal/ObjectInjection.cjs +16 -16
- package/src/lib/base/internal/ObjectInjection.mjs +13 -13
- package/src/lib/base/internal/ObjectLifetime.cjs +10 -10
- package/src/lib/base/internal/ObjectLifetime.mjs +9 -9
- package/src/lib/base/internal/ObjectType.cjs +4 -2
- package/src/lib/base/internal/ObjectType.mjs +4 -2
- package/src/lib/base/internal/ObjectWeakRefs.cjs +11 -11
- package/src/lib/base/internal/ObjectWeakRefs.mjs +9 -9
- package/src/lib/base/internal/PatternManager.cjs +744 -739
- package/src/lib/base/internal/PatternManager.mjs +748 -743
- package/src/lib/base/internal/StringifyPattern.cjs +26 -26
- package/src/lib/base/internal/StringifyPattern.mjs +26 -26
- package/src/lib/base/internal/ThrowWarning.cjs +2 -2
- package/src/lib/base/internal/ThrowWarning.mjs +2 -2
- package/src/lib/core/Alias.cjs +5 -5
- package/src/lib/core/Application.cjs +146 -142
- package/src/lib/core/Application.mjs +204 -202
- package/src/lib/core/Component.cjs +4 -2
- package/src/lib/core/Component.mjs +4 -2
- package/src/lib/core/Container.cjs +4 -2
- package/src/lib/core/Container.mjs +4 -2
- package/src/lib/core/Module.cjs +5 -3
- package/src/lib/core/Module.mjs +5 -3
- package/src/lib/core/Provider.cjs +4 -2
- package/src/lib/core/Provider.mjs +4 -2
- package/src/lib/helpers/ArrayToSet.cjs +2 -2
- package/src/lib/helpers/ArrayToSet.mjs +3 -3
- package/src/lib/helpers/As.cjs +2 -2
- package/src/lib/helpers/As.mjs +2 -2
- package/src/lib/helpers/ConvertArrayLikeToIterable.cjs +3 -3
- package/src/lib/helpers/ConvertArrayLikeToIterable.mjs +3 -3
- package/src/lib/helpers/ConvertArrayLikeToStream.cjs +2 -2
- package/src/lib/helpers/ConvertArrayLikeToStream.mjs +2 -2
- package/src/lib/helpers/Delay.cjs +2 -2
- package/src/lib/helpers/Delay.mjs +2 -2
- package/src/lib/helpers/DevNull.cjs +2 -2
- package/src/lib/helpers/DevNull.mjs +2 -2
- package/src/lib/helpers/GetObjectNestingDepth.cjs +12 -12
- package/src/lib/helpers/GetObjectNestingDepth.mjs +11 -11
- package/src/lib/helpers/GetObjectPropertyPaths.cjs +7 -7
- package/src/lib/helpers/GetObjectPropertyPaths.mjs +9 -9
- package/src/lib/helpers/Glob.cjs +1192 -943
- package/src/lib/helpers/Glob.mjs +1256 -1007
- package/src/lib/helpers/GraceExit.cjs +3 -3
- package/src/lib/helpers/GraceExit.mjs +7 -7
- package/src/lib/helpers/HexToIEEE754.cjs +4 -4
- package/src/lib/helpers/HexToIEEE754.mjs +2 -2
- package/src/lib/helpers/HexToSigned.cjs +5 -5
- package/src/lib/helpers/HexToSigned.mjs +4 -4
- package/src/lib/helpers/HexToUnsigned.cjs +2 -2
- package/src/lib/helpers/HexToUnsigned.mjs +2 -2
- package/src/lib/helpers/IEEE754ToHex.cjs +5 -5
- package/src/lib/helpers/IEEE754ToHex.mjs +5 -5
- package/src/lib/helpers/IsAbortError.cjs +2 -2
- package/src/lib/helpers/IsAbortError.mjs +3 -3
- package/src/lib/helpers/IsEmptyObject.cjs +3 -3
- package/src/lib/helpers/IsEmptyObject.mjs +3 -3
- package/src/lib/helpers/IsExists.cjs +5 -5
- package/src/lib/helpers/IsExists.mjs +4 -4
- package/src/lib/helpers/IsHtml.cjs +18 -8
- package/src/lib/helpers/IsHtml.mjs +18 -8
- package/src/lib/helpers/IsNativeFunction.cjs +2 -2
- package/src/lib/helpers/IsNativeFunction.mjs +2 -2
- package/src/lib/helpers/IsPath.cjs +2 -2
- package/src/lib/helpers/IsPath.mjs +5 -5
- package/src/lib/helpers/IsPromise.cjs +2 -2
- package/src/lib/helpers/IsPromise.mjs +2 -2
- package/src/lib/helpers/IsPromiseLike.cjs +5 -5
- package/src/lib/helpers/IsPromiseLike.mjs +6 -6
- package/src/lib/helpers/IsXML.cjs +1525 -1531
- package/src/lib/helpers/IsXML.mjs +1521 -1527
- package/src/lib/helpers/MD5.cjs +3 -3
- package/src/lib/helpers/MD5.mjs +3 -3
- package/src/lib/helpers/MergeArray.cjs +3 -3
- package/src/lib/helpers/MergeArray.mjs +3 -3
- package/src/lib/helpers/MergeMap.cjs +3 -3
- package/src/lib/helpers/MergeMap.mjs +3 -3
- package/src/lib/helpers/MergeSet.cjs +2 -2
- package/src/lib/helpers/MergeSet.mjs +3 -3
- package/src/lib/helpers/NoCase.cjs +27 -27
- package/src/lib/helpers/NoCase.mjs +24 -24
- package/src/lib/helpers/NonceStr.cjs +3 -3
- package/src/lib/helpers/NonceStr.mjs +3 -3
- package/src/lib/helpers/ObjectConstructor.cjs +2 -2
- package/src/lib/helpers/ObjectConstructor.mjs +4 -4
- package/src/lib/helpers/ObjectHash.cjs +385 -378
- package/src/lib/helpers/ObjectHash.mjs +381 -374
- package/src/lib/helpers/ObjectParentConstructor.cjs +2 -2
- package/src/lib/helpers/ObjectParentConstructor.mjs +5 -5
- package/src/lib/helpers/ObjectParentConstructors.cjs +6 -6
- package/src/lib/helpers/ObjectParentConstructors.mjs +2 -2
- package/src/lib/helpers/ObjectPrototype.cjs +2 -2
- package/src/lib/helpers/ObjectPrototype.mjs +2 -2
- package/src/lib/helpers/ObjectToMap.cjs +2 -2
- package/src/lib/helpers/ObjectToMap.mjs +3 -3
- package/src/lib/helpers/Paginator.cjs +2 -2
- package/src/lib/helpers/Paginator.mjs +6 -6
- package/src/lib/helpers/RandomString.cjs +170 -149
- package/src/lib/helpers/RandomString.mjs +167 -146
- package/src/lib/helpers/SHA1.cjs +3 -3
- package/src/lib/helpers/SHA1.mjs +3 -3
- package/src/lib/helpers/SHA256.cjs +3 -3
- package/src/lib/helpers/SHA256.mjs +3 -3
- package/src/lib/helpers/SetToArray.cjs +2 -2
- package/src/lib/helpers/SetToArray.mjs +2 -2
- package/src/lib/helpers/SignedToHex.cjs +4 -4
- package/src/lib/helpers/SignedToHex.mjs +4 -4
- package/src/lib/helpers/SortArray.cjs +17 -17
- package/src/lib/helpers/SortArray.mjs +16 -16
- package/src/lib/helpers/SortKeys.cjs +41 -41
- package/src/lib/helpers/SortKeys.mjs +41 -41
- package/src/lib/helpers/SortObject.cjs +2 -2
- package/src/lib/helpers/SortObject.mjs +2 -2
- package/src/lib/helpers/Statistics.cjs +1 -1
- package/src/lib/helpers/Statistics.mjs +1 -1
- package/src/lib/helpers/Templating.cjs +25 -25
- package/src/lib/helpers/Templating.mjs +25 -25
- package/src/lib/helpers/URLBuilder.cjs +355 -355
- package/src/lib/helpers/URLBuilder.mjs +349 -349
- package/src/lib/helpers/UUID.cjs +1 -1
- package/src/lib/helpers/UUID.mjs +1 -1
- package/src/lib/helpers/UniqueArray.cjs +3 -3
- package/src/lib/helpers/UniqueArray.mjs +2 -2
- package/src/lib/helpers/UnsignedToHex.cjs +3 -3
- package/src/lib/helpers/UnsignedToHex.mjs +3 -3
- package/src/lib/ioc/DependencyInjectionContainer.cjs +111 -109
- package/src/lib/ioc/DependencyInjectionContainer.mjs +123 -121
- package/src/lib/ioc/FunctionTokenizer.cjs +115 -115
- package/src/lib/ioc/FunctionTokenizer.mjs +102 -102
- package/src/lib/ioc/Lifetime.cjs +5 -5
- package/src/lib/ioc/Lifetime.mjs +5 -5
- package/src/lib/ioc/ListModules.cjs +5222 -5297
- package/src/lib/ioc/ListModules.mjs +5187 -5262
- package/src/lib/ioc/LoadModules.cjs +56 -56
- package/src/lib/ioc/LoadModules.mjs +69 -69
- package/src/lib/ioc/ParamParser.cjs +30 -30
- package/src/lib/ioc/ParamParser.mjs +41 -41
- package/src/lib/ioc/Resolvers.cjs +87 -87
- package/src/lib/ioc/Resolvers.mjs +109 -109
- package/src/lib/ioc/Utils.cjs +12 -12
- package/src/lib/ioc/Utils.mjs +18 -18
- package/src/lib/validation/VLD.cjs +4198 -4020
- package/src/lib/validation/VLD.mjs +3137 -2959
- package/src/options/ApplicationOptions.cjs +4 -2
- package/src/options/ApplicationOptions.mjs +4 -2
- package/src/options/LoadAnonymousObjectOptions.cjs +4 -2
- package/src/options/LoadAnonymousObjectOptions.mjs +4 -2
- package/src/options/LoadNamedObjectOptions.cjs +4 -2
- package/src/options/LoadNamedObjectOptions.mjs +4 -2
- package/src/options/LoadObjectOptions.cjs +4 -2
- package/src/options/LoadObjectOptions.mjs +4 -2
- package/src/options/ModuleLoadObjectsOptions.cjs +4 -2
- package/src/options/ModuleLoadObjectsOptions.mjs +4 -2
- package/src/options/ModuleOptions.cjs +4 -4
- package/src/options/ModuleOptions.mjs +4 -4
- package/src/options/OverridableNamedObjectOptions.cjs +4 -2
- package/src/options/OverridableNamedObjectOptions.mjs +4 -2
- package/src/options/OverridableObjectOptions.cjs +4 -2
- package/src/options/OverridableObjectOptions.mjs +4 -2
- package/src/providers/Database.cjs +13 -13
- package/src/providers/Database.mjs +18 -18
- package/src/providers/PasswordHash.cjs +334 -332
- package/src/providers/PasswordHash.mjs +389 -387
- package/src/providers/migration/GenerateMigration.cjs +15 -19
- package/src/providers/migration/GenerateMigration.mjs +15 -19
- package/vendor/Package.1.cjs +256 -256
- package/vendor/Package.1.mjs +254 -254
- package/vendor/Package.10.cjs +2 -8
- package/vendor/Package.10.mjs +2 -8
- package/vendor/Package.11.cjs +5 -83
- package/vendor/Package.11.mjs +5 -77
- package/vendor/Package.112.cjs +48900 -0
- package/vendor/Package.112.mjs +48764 -0
- package/vendor/Package.12.cjs +4 -2
- package/vendor/Package.12.mjs +6 -4
- package/vendor/Package.13.cjs +87 -1
- package/vendor/Package.13.mjs +81 -1
- package/vendor/Package.14.cjs +1 -14057
- package/vendor/Package.14.mjs +1 -14031
- package/vendor/Package.15.cjs +1 -1
- package/vendor/Package.15.mjs +1 -1
- package/vendor/Package.16.cjs +18115 -1921
- package/vendor/Package.16.mjs +18115 -1839
- package/vendor/Package.17.cjs +1926 -47922
- package/vendor/Package.17.mjs +1852 -47915
- package/vendor/Package.18.cjs +35 -1
- package/vendor/Package.18.mjs +35 -1
- package/vendor/Package.19.cjs +37 -0
- package/vendor/Package.19.mjs +35 -0
- package/vendor/Package.2.cjs +5856 -5827
- package/vendor/Package.2.mjs +5854 -5825
- package/vendor/Package.20.cjs +37 -0
- package/vendor/Package.20.mjs +35 -0
- package/vendor/Package.21.cjs +37 -0
- package/vendor/Package.21.mjs +35 -0
- package/vendor/Package.22.cjs +37 -0
- package/vendor/Package.22.mjs +35 -0
- package/vendor/Package.23.cjs +37 -0
- package/vendor/Package.23.mjs +35 -0
- package/vendor/Package.24.cjs +37 -0
- package/vendor/Package.24.mjs +35 -0
- package/vendor/Package.25.cjs +37 -0
- package/vendor/Package.25.mjs +35 -0
- package/vendor/Package.26.cjs +37 -0
- package/vendor/Package.26.mjs +35 -0
- package/vendor/Package.27.cjs +37 -0
- package/vendor/Package.27.mjs +35 -0
- package/vendor/Package.28.cjs +37 -0
- package/vendor/Package.28.mjs +35 -0
- package/vendor/Package.29.cjs +40 -0
- package/vendor/Package.29.mjs +38 -0
- package/vendor/Package.3.cjs +60 -60
- package/vendor/Package.3.mjs +85 -85
- package/vendor/Package.30.cjs +41 -0
- package/vendor/Package.30.mjs +39 -0
- package/vendor/Package.31.cjs +72 -0
- package/vendor/Package.31.mjs +70 -0
- package/vendor/Package.32.cjs +37 -0
- package/vendor/Package.32.mjs +35 -0
- package/vendor/Package.33.cjs +37 -0
- package/vendor/Package.33.mjs +35 -0
- package/vendor/Package.34.cjs +46 -0
- package/vendor/Package.34.mjs +44 -0
- package/vendor/Package.35.cjs +34 -0
- package/vendor/Package.35.mjs +32 -0
- package/vendor/Package.36.cjs +40 -0
- package/vendor/Package.36.mjs +38 -0
- package/vendor/Package.37.cjs +36 -0
- package/vendor/Package.37.mjs +34 -0
- package/vendor/Package.38.cjs +52 -0
- package/vendor/Package.38.mjs +50 -0
- package/vendor/Package.39.cjs +41 -0
- package/vendor/Package.39.mjs +39 -0
- package/vendor/Package.4.cjs +884 -874
- package/vendor/Package.4.mjs +887 -877
- package/vendor/Package.40.cjs +42 -0
- package/vendor/Package.40.mjs +40 -0
- package/vendor/Package.41.cjs +53 -0
- package/vendor/Package.41.mjs +51 -0
- package/vendor/Package.42.cjs +53 -0
- package/vendor/Package.42.mjs +51 -0
- package/vendor/Package.43.cjs +40 -0
- package/vendor/Package.43.mjs +38 -0
- package/vendor/Package.44.cjs +46 -0
- package/vendor/Package.44.mjs +44 -0
- package/vendor/Package.45.cjs +53 -0
- package/vendor/Package.45.mjs +51 -0
- package/vendor/Package.46.cjs +59 -0
- package/vendor/Package.46.mjs +57 -0
- package/vendor/Package.47.cjs +65 -0
- package/vendor/Package.47.mjs +63 -0
- package/vendor/Package.48.cjs +38 -0
- package/vendor/Package.48.mjs +36 -0
- package/vendor/Package.49.cjs +38 -0
- package/vendor/Package.49.mjs +36 -0
- package/vendor/Package.5.cjs +19 -15
- package/vendor/Package.5.mjs +14 -10
- package/vendor/Package.50.cjs +36 -0
- package/vendor/Package.50.mjs +34 -0
- package/vendor/Package.51.cjs +43 -0
- package/vendor/Package.51.mjs +41 -0
- package/vendor/Package.52.cjs +37 -0
- package/vendor/Package.52.mjs +35 -0
- package/vendor/Package.53.cjs +43 -0
- package/vendor/Package.53.mjs +41 -0
- package/vendor/Package.54.cjs +55 -0
- package/vendor/Package.54.mjs +53 -0
- package/vendor/Package.55.cjs +37 -0
- package/vendor/Package.55.mjs +35 -0
- package/vendor/Package.56.cjs +37 -0
- package/vendor/Package.56.mjs +35 -0
- package/vendor/Package.57.cjs +37 -0
- package/vendor/Package.57.mjs +35 -0
- package/vendor/Package.58.cjs +45 -0
- package/vendor/Package.58.mjs +43 -0
- package/vendor/Package.59.cjs +53 -0
- package/vendor/Package.59.mjs +51 -0
- package/vendor/Package.6.cjs +2067 -2058
- package/vendor/Package.6.mjs +2073 -2064
- package/vendor/Package.60.cjs +47649 -0
- package/vendor/Package.60.mjs +47606 -0
- package/vendor/Package.610.cjs +19 -19
- package/vendor/Package.610.mjs +11 -11
- package/vendor/Package.611.cjs +40 -30
- package/vendor/Package.611.mjs +30 -20
- package/vendor/Package.612.cjs +48 -42
- package/vendor/Package.612.mjs +39 -33
- package/vendor/Package.613.cjs +64 -63
- package/vendor/Package.613.mjs +34 -33
- package/vendor/Package.62.cjs +300 -297
- package/vendor/Package.62.mjs +283 -280
- package/vendor/Package.63.cjs +511 -168
- package/vendor/Package.63.mjs +490 -165
- package/vendor/Package.64.cjs +139 -511
- package/vendor/Package.64.mjs +139 -491
- package/vendor/Package.65.cjs +4135 -150
- package/vendor/Package.65.mjs +4143 -150
- package/vendor/Package.66.cjs +346 -4150
- package/vendor/Package.66.mjs +346 -4158
- package/vendor/Package.67.cjs +433 -282
- package/vendor/Package.67.mjs +431 -280
- package/vendor/Package.68.cjs +248 -397
- package/vendor/Package.68.mjs +81 -230
- package/vendor/Package.69.cjs +8 -8
- package/vendor/Package.7.cjs +3 -3
- package/vendor/Package.7.mjs +3 -3
- package/vendor/Package.8.cjs +0 -4
- package/vendor/Package.8.mjs +0 -4
- package/vendor/Package.9.cjs +138 -124
- package/vendor/Package.9.mjs +135 -121
- package/vendor/TypeDef.internal.3.d.ts +0 -4
- package/vendor/Package.102.cjs +0 -48773
- package/vendor/Package.102.mjs +0 -48697
- package/vendor/Package.122.cjs +0 -3
- package/vendor/Package.122.mjs +0 -1
|
@@ -2,57 +2,55 @@ import { _ as t, a as e } from "../../../vendor/Package.1.mjs";
|
|
|
2
2
|
|
|
3
3
|
import { Provider as o } from "./Provider.mjs";
|
|
4
4
|
|
|
5
|
-
import { Configurable as
|
|
5
|
+
import { Configurable as i } from "../../decorators/di/Configurable.mjs";
|
|
6
6
|
|
|
7
|
-
import { D as
|
|
7
|
+
import { D as r } from "../../../vendor/Package.2.mjs";
|
|
8
8
|
|
|
9
9
|
import n from "path";
|
|
10
10
|
|
|
11
|
-
import { D as s } from "../../../vendor/Package.
|
|
11
|
+
import { D as s } from "../../../vendor/Package.11.mjs";
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { g as a } from "../../../vendor/Package.5.mjs";
|
|
14
14
|
|
|
15
|
-
import { g as d } from "../../../vendor/Package.
|
|
15
|
+
import { a as c, b as p, c as m, d as l, e as u, f as h, g as d } from "../../../vendor/Package.112.mjs";
|
|
16
16
|
|
|
17
17
|
import { r as g } from "../../../vendor/Package.12.mjs";
|
|
18
18
|
|
|
19
19
|
import "../../../vendor/Package.8.mjs";
|
|
20
20
|
|
|
21
|
-
import
|
|
21
|
+
import f from "fs/promises";
|
|
22
22
|
|
|
23
|
-
import {
|
|
23
|
+
import { Transient as j } from "../../decorators/di/Lifetime.mjs";
|
|
24
24
|
|
|
25
|
-
import { Module as
|
|
25
|
+
import { Module as y, MODULE_INITIALIZED as b, MODULE_INITIALIZE_ERROR as v } from "./Module.mjs";
|
|
26
26
|
|
|
27
|
-
import { C as
|
|
27
|
+
import { C as x } from "../../../vendor/Package.3.mjs";
|
|
28
28
|
|
|
29
|
-
import { ApplicationConfigLoader as
|
|
29
|
+
import { ApplicationConfigLoader as E } from "../base/internal/ApplicationConfigLoader.mjs";
|
|
30
30
|
|
|
31
|
-
import { ApplicationOptions as
|
|
31
|
+
import { ApplicationOptions as w } from "../../options/ApplicationOptions.mjs";
|
|
32
32
|
|
|
33
|
-
import { Alias as
|
|
33
|
+
import { Alias as O } from "./Alias.mjs";
|
|
34
34
|
|
|
35
35
|
import { GetBasicInfo as C } from "../base/internal/BasicInfo.mjs";
|
|
36
36
|
|
|
37
|
-
import { Entrypoint as
|
|
37
|
+
import { Entrypoint as P } from "../../components/entrypoint/Entrypoint.mjs";
|
|
38
38
|
|
|
39
|
-
import { L as
|
|
39
|
+
import { L as A } from "../../../vendor/Package.16.mjs";
|
|
40
40
|
|
|
41
|
-
import { Accept as
|
|
41
|
+
import { Accept as S } from "../../decorators/dto/Accept.mjs";
|
|
42
42
|
|
|
43
|
-
import { mkdirSync as
|
|
43
|
+
import { mkdirSync as k } from "fs";
|
|
44
44
|
|
|
45
|
-
import
|
|
45
|
+
import I from "node:path";
|
|
46
46
|
|
|
47
|
-
import { existsSync as
|
|
47
|
+
import { existsSync as D } from "node:fs";
|
|
48
48
|
|
|
49
|
-
import { As as
|
|
49
|
+
import { As as R } from "../helpers/As.mjs";
|
|
50
50
|
|
|
51
|
-
import { EventEmitter as
|
|
51
|
+
import { EventEmitter as N } from "../base/EventEmitter.mjs";
|
|
52
52
|
|
|
53
|
-
import { DatabaseSymbol as
|
|
54
|
-
|
|
55
|
-
import { Inject as L } from "../../decorators/di/Inject.mjs";
|
|
53
|
+
import { DatabaseSymbol as B } from "../base/internal/DatabaseSymbol.mjs";
|
|
56
54
|
|
|
57
55
|
import "../base/async-constructor/AsyncConstructor.mjs";
|
|
58
56
|
|
|
@@ -130,6 +128,8 @@ import "../ioc/ListModules.mjs";
|
|
|
130
128
|
|
|
131
129
|
import "os";
|
|
132
130
|
|
|
131
|
+
import "../../../vendor/Package.10.mjs";
|
|
132
|
+
|
|
133
133
|
import "stream";
|
|
134
134
|
|
|
135
135
|
import "events";
|
|
@@ -174,9 +174,9 @@ import "../helpers/IsEmptyObject.mjs";
|
|
|
174
174
|
|
|
175
175
|
import "../../../vendor/Package.62.mjs";
|
|
176
176
|
|
|
177
|
-
import "../../../vendor/Package.
|
|
177
|
+
import "../../../vendor/Package.13.mjs";
|
|
178
178
|
|
|
179
|
-
import "../../../vendor/Package.
|
|
179
|
+
import "../../../vendor/Package.14.mjs";
|
|
180
180
|
|
|
181
181
|
import "buffer";
|
|
182
182
|
|
|
@@ -184,12 +184,10 @@ import "module";
|
|
|
184
184
|
|
|
185
185
|
import "tty";
|
|
186
186
|
|
|
187
|
-
import "../../../vendor/Package.
|
|
187
|
+
import "../../../vendor/Package.15.mjs";
|
|
188
188
|
|
|
189
189
|
import "crypto";
|
|
190
190
|
|
|
191
|
-
import "../../../vendor/Package.63.mjs";
|
|
192
|
-
|
|
193
191
|
import "node:url";
|
|
194
192
|
|
|
195
193
|
import "node:fs/promises";
|
|
@@ -242,11 +240,11 @@ import "../helpers/GetObjectNestingDepth.mjs";
|
|
|
242
240
|
|
|
243
241
|
import "../../exceptions/InvalidActionPatternDepthException.mjs";
|
|
244
242
|
|
|
245
|
-
import "../../../vendor/Package.
|
|
243
|
+
import "../../../vendor/Package.63.mjs";
|
|
246
244
|
|
|
247
245
|
import "../base/internal/StringifyPattern.mjs";
|
|
248
246
|
|
|
249
|
-
import "../../../vendor/Package.
|
|
247
|
+
import "../../../vendor/Package.64.mjs";
|
|
250
248
|
|
|
251
249
|
import "../base/internal/PatternManager.mjs";
|
|
252
250
|
|
|
@@ -282,136 +280,142 @@ import "../../components/entrypoint/exceptions/InvalidActionGroupException.mjs";
|
|
|
282
280
|
|
|
283
281
|
import "worker_threads";
|
|
284
282
|
|
|
285
|
-
import "../../../vendor/Package.15.mjs";
|
|
286
|
-
|
|
287
283
|
import "assert";
|
|
288
284
|
|
|
289
285
|
import "string_decoder";
|
|
290
286
|
|
|
291
|
-
var
|
|
287
|
+
var M = c();
|
|
292
288
|
|
|
293
|
-
|
|
289
|
+
const L = a(M);
|
|
294
290
|
|
|
295
|
-
|
|
296
|
-
value: true
|
|
297
|
-
});
|
|
291
|
+
var T = p();
|
|
298
292
|
|
|
299
|
-
|
|
293
|
+
const q = a(T);
|
|
300
294
|
|
|
301
|
-
|
|
295
|
+
var F = m();
|
|
302
296
|
|
|
303
|
-
const
|
|
297
|
+
const U = a(F);
|
|
304
298
|
|
|
305
|
-
|
|
299
|
+
var $ = {};
|
|
306
300
|
|
|
307
|
-
|
|
301
|
+
var G;
|
|
308
302
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
if (
|
|
332
|
-
|
|
303
|
+
function requireCommandUtils() {
|
|
304
|
+
if (G) return $;
|
|
305
|
+
G = 1;
|
|
306
|
+
"use strict";
|
|
307
|
+
Object.defineProperty($, "__esModule", {
|
|
308
|
+
value: true
|
|
309
|
+
});
|
|
310
|
+
$.CommandUtils = void 0;
|
|
311
|
+
const t = g;
|
|
312
|
+
const e = t.__importDefault(f);
|
|
313
|
+
const o = t.__importDefault(n);
|
|
314
|
+
const i = l();
|
|
315
|
+
const r = u();
|
|
316
|
+
const s = h();
|
|
317
|
+
class CommandUtils {
|
|
318
|
+
static async loadDataSource(t) {
|
|
319
|
+
let e;
|
|
320
|
+
try {
|
|
321
|
+
[e] = await (0, s.importOrRequireFile)(t);
|
|
322
|
+
} catch (e) {
|
|
323
|
+
throw new Error(`Unable to open file: "${t}". ${e.message}`);
|
|
324
|
+
}
|
|
325
|
+
if (!e || typeof e !== "object") {
|
|
326
|
+
throw new Error(`Given data source file must contain export of a DataSource instance`);
|
|
327
|
+
}
|
|
328
|
+
if (r.InstanceChecker.isDataSource(e)) {
|
|
329
|
+
return e;
|
|
330
|
+
}
|
|
331
|
+
const o = [];
|
|
332
|
+
for (const t in e) {
|
|
333
|
+
const i = e[t];
|
|
334
|
+
const n = await i;
|
|
335
|
+
if (r.InstanceChecker.isDataSource(n)) {
|
|
336
|
+
o.push(n);
|
|
337
|
+
}
|
|
333
338
|
}
|
|
339
|
+
if (o.length === 0) {
|
|
340
|
+
throw new Error(`Given data source file must contain export of a DataSource instance`);
|
|
341
|
+
}
|
|
342
|
+
if (o.length > 1) {
|
|
343
|
+
throw new Error(`Given data source file must contain only one export of DataSource instance`);
|
|
344
|
+
}
|
|
345
|
+
return o[0];
|
|
334
346
|
}
|
|
335
|
-
|
|
336
|
-
|
|
347
|
+
static async createDirectories(t) {
|
|
348
|
+
await e.default.mkdir(t, {
|
|
349
|
+
recursive: true
|
|
350
|
+
});
|
|
337
351
|
}
|
|
338
|
-
|
|
339
|
-
|
|
352
|
+
static async createFile(t, i, r = true) {
|
|
353
|
+
await CommandUtils.createDirectories(o.default.dirname(t));
|
|
354
|
+
if (r === false && await CommandUtils.fileExists(t)) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
await e.default.writeFile(t, i);
|
|
340
358
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
await $.default.mkdir(t, {
|
|
345
|
-
recursive: true
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
static async createFile(t, e, o = true) {
|
|
349
|
-
await CommandUtils.createDirectories(U.default.dirname(t));
|
|
350
|
-
if (o === false && await CommandUtils.fileExists(t)) {
|
|
351
|
-
return;
|
|
359
|
+
static async readFile(t) {
|
|
360
|
+
const o = await e.default.readFile(t);
|
|
361
|
+
return o.toString();
|
|
352
362
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
try {
|
|
361
|
-
await $.default.access(t, $.default.constants.F_OK);
|
|
362
|
-
return true;
|
|
363
|
-
} catch {
|
|
364
|
-
return false;
|
|
363
|
+
static async fileExists(t) {
|
|
364
|
+
try {
|
|
365
|
+
await e.default.access(t, e.default.constants.F_OK);
|
|
366
|
+
return true;
|
|
367
|
+
} catch {
|
|
368
|
+
return false;
|
|
369
|
+
}
|
|
365
370
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
371
|
+
static getTimestamp(t) {
|
|
372
|
+
if (t && (isNaN(t) || t < 0)) {
|
|
373
|
+
throw new i.TypeORMError(`timestamp option should be a non-negative number. received: ${t}`);
|
|
374
|
+
}
|
|
375
|
+
return t ? new Date(Number(t)).getTime() : Date.now();
|
|
370
376
|
}
|
|
371
|
-
return t ? new Date(Number(t)).getTime() : Date.now();
|
|
372
377
|
}
|
|
378
|
+
$.CommandUtils = CommandUtils;
|
|
379
|
+
return $;
|
|
373
380
|
}
|
|
374
381
|
|
|
375
|
-
|
|
382
|
+
var Q = requireCommandUtils();
|
|
376
383
|
|
|
377
|
-
|
|
384
|
+
const _ = a(Q);
|
|
378
385
|
|
|
379
|
-
|
|
386
|
+
var J = d();
|
|
380
387
|
|
|
381
|
-
const
|
|
388
|
+
const V = a(J);
|
|
382
389
|
|
|
383
|
-
|
|
390
|
+
const {Ansis: H, ansi256: z, fg: W, bgAnsi256: K, bg: X, rgb: Y, bgRgb: Z, hex: tt, bgHex: et, reset: ot, inverse: it, hidden: rt, visible: nt, bold: st, dim: at, italic: ct, underline: pt, strikethrough: mt, strike: lt, black: ut, red: ht, green: dt, yellow: gt, blue: ft, magenta: jt, cyan: yt, white: bt, grey: vt, gray: xt, blackBright: Et, redBright: wt, greenBright: Ot, yellowBright: Ct, blueBright: Pt, magentaBright: At, cyanBright: St, whiteBright: kt, bgBlack: It, bgRed: Dt, bgGreen: Rt, bgYellow: Nt, bgBlue: Bt, bgMagenta: Mt, bgCyan: Lt, bgWhite: Tt, bgGrey: qt, bgGray: Ft, bgBlackBright: Ut, bgRedBright: $t, bgGreenBright: Gt, bgYellowBright: Qt, bgBlueBright: _t, bgMagentaBright: Jt, bgCyanBright: Vt, bgWhiteBright: Ht} = V;
|
|
384
391
|
|
|
385
|
-
var
|
|
392
|
+
var zt;
|
|
386
393
|
|
|
387
394
|
(function(t) {
|
|
388
395
|
t["Launched"] = "LAUNCHED";
|
|
389
396
|
t["Done"] = "DONE";
|
|
390
397
|
t["UncaughtException"] = "UNCAUGHT_EXCEPTION";
|
|
391
398
|
t["FatalException"] = "FATAL_EXCEPTION";
|
|
392
|
-
})(
|
|
399
|
+
})(zt || (zt = {}));
|
|
393
400
|
|
|
394
|
-
|
|
401
|
+
class Application extends y {
|
|
395
402
|
constructor() {
|
|
396
403
|
super(...arguments);
|
|
397
|
-
this.ConfigLoader =
|
|
404
|
+
this.ConfigLoader = E;
|
|
398
405
|
this.options = {
|
|
399
406
|
components: {
|
|
400
407
|
log: {
|
|
401
|
-
class:
|
|
408
|
+
class: A
|
|
402
409
|
},
|
|
403
410
|
entrypoint: {
|
|
404
|
-
class:
|
|
411
|
+
class: P
|
|
405
412
|
}
|
|
406
413
|
},
|
|
407
414
|
bootstrap: [ "log" ]
|
|
408
415
|
};
|
|
409
416
|
}
|
|
410
417
|
static {
|
|
411
|
-
|
|
412
|
-
}
|
|
413
|
-
static {
|
|
414
|
-
this.eventEmitter = new B;
|
|
418
|
+
this.eventEmitter = new N;
|
|
415
419
|
}
|
|
416
420
|
static {
|
|
417
421
|
this.environmentVariableMap = new Map;
|
|
@@ -420,7 +424,7 @@ let Kt = class Application extends b {
|
|
|
420
424
|
this.aliasDeclarations = [];
|
|
421
425
|
}
|
|
422
426
|
static async getLogger() {
|
|
423
|
-
return this.appInstance ? await this.appInstance.getObject("log") : await (new
|
|
427
|
+
return this.appInstance ? await this.appInstance.getObject("log") : await (new x).set(A);
|
|
424
428
|
}
|
|
425
429
|
static env(t) {
|
|
426
430
|
Object.keys(t).forEach((e => this.environmentVariableMap.set(e, t[e])));
|
|
@@ -434,26 +438,26 @@ let Kt = class Application extends b {
|
|
|
434
438
|
return this.launch();
|
|
435
439
|
}
|
|
436
440
|
static onLaunched(t) {
|
|
437
|
-
this.eventEmitter.once(
|
|
441
|
+
this.eventEmitter.once(zt.Launched, (async e => t(e, await e.getObject("log"))));
|
|
438
442
|
return this.launch();
|
|
439
443
|
}
|
|
440
444
|
static onDone(t) {
|
|
441
|
-
this.eventEmitter.once(
|
|
445
|
+
this.eventEmitter.once(zt.Done, (async e => t(e, await e.getObject("log"))));
|
|
442
446
|
return this.launch();
|
|
443
447
|
}
|
|
444
448
|
static onUncaughtException(t) {
|
|
445
|
-
this.eventEmitter.on(
|
|
449
|
+
this.eventEmitter.on(zt.UncaughtException, (async e => {
|
|
446
450
|
const o = await this.getLogger();
|
|
447
451
|
await t(e, o);
|
|
448
452
|
}));
|
|
449
453
|
return this.launch();
|
|
450
454
|
}
|
|
451
455
|
static onFatalException(t) {
|
|
452
|
-
this.eventEmitter.once(
|
|
456
|
+
this.eventEmitter.once(zt.FatalException, (async e => {
|
|
453
457
|
const o = await this.getLogger();
|
|
454
|
-
let
|
|
455
|
-
if (typeof
|
|
456
|
-
return process.exit(
|
|
458
|
+
let i = await t(e, o);
|
|
459
|
+
if (typeof i !== "number") i = 1;
|
|
460
|
+
return process.exit(i);
|
|
457
461
|
}));
|
|
458
462
|
return this.launch();
|
|
459
463
|
}
|
|
@@ -465,7 +469,7 @@ let Kt = class Application extends b {
|
|
|
465
469
|
if (this.launchTimeout) clearTimeout(this.launchTimeout);
|
|
466
470
|
this.launchTimeout = setTimeout((async () => {
|
|
467
471
|
process.on("uncaughtException", (async t => {
|
|
468
|
-
if (this.eventEmitter.listenerCount(
|
|
472
|
+
if (this.eventEmitter.listenerCount(zt.UncaughtException)) return this.eventEmitter.emit(zt.UncaughtException, t);
|
|
469
473
|
const e = await this.getLogger();
|
|
470
474
|
return e.warn(new Error("UncaughtException", {
|
|
471
475
|
cause: t
|
|
@@ -480,7 +484,7 @@ let Kt = class Application extends b {
|
|
|
480
484
|
return this;
|
|
481
485
|
}
|
|
482
486
|
static processFatalException(t) {
|
|
483
|
-
if (!this.eventEmitter.listenerCount(
|
|
487
|
+
if (!this.eventEmitter.listenerCount(zt.FatalException)) {
|
|
484
488
|
return process.nextTick((async () => {
|
|
485
489
|
const e = await this.getLogger();
|
|
486
490
|
e.error(new Error("FatalException", {
|
|
@@ -488,12 +492,12 @@ let Kt = class Application extends b {
|
|
|
488
492
|
}));
|
|
489
493
|
}));
|
|
490
494
|
}
|
|
491
|
-
this.eventEmitter.emit(
|
|
495
|
+
this.eventEmitter.emit(zt.FatalException, t);
|
|
492
496
|
}
|
|
493
497
|
static async launchApplication() {
|
|
494
498
|
this.eventEmitter.once("exit", (async (t, e) => {
|
|
495
499
|
try {
|
|
496
|
-
await this.eventEmitter.emitRequest(
|
|
500
|
+
await this.eventEmitter.emitRequest(zt.Done, t);
|
|
497
501
|
await o.destroy();
|
|
498
502
|
process.exit(e ? e : 0);
|
|
499
503
|
} catch (t) {
|
|
@@ -501,16 +505,16 @@ let Kt = class Application extends b {
|
|
|
501
505
|
}
|
|
502
506
|
}));
|
|
503
507
|
this.environmentVariableMap.forEach(((t, e) => process.env[e] = t));
|
|
504
|
-
const t =
|
|
508
|
+
const t = O.getAliasInstance();
|
|
505
509
|
t.set("@runtime", process.cwd());
|
|
506
510
|
this.aliasDeclarations.forEach((e => {
|
|
507
511
|
const o = e.alias;
|
|
508
|
-
const
|
|
512
|
+
const i = e.createIfNotExist;
|
|
509
513
|
Object.keys(o).forEach((e => {
|
|
510
514
|
t.set(e, o[e]);
|
|
511
|
-
if (
|
|
512
|
-
const t =
|
|
513
|
-
if (!
|
|
515
|
+
if (i) {
|
|
516
|
+
const t = I.resolve(e);
|
|
517
|
+
if (!D(t)) k(I.resolve(e), {
|
|
514
518
|
recursive: true
|
|
515
519
|
});
|
|
516
520
|
}
|
|
@@ -521,31 +525,31 @@ let Kt = class Application extends b {
|
|
|
521
525
|
switch (t.toUpperCase()) {
|
|
522
526
|
case "MIGRATION_GENERATE":
|
|
523
527
|
{
|
|
524
|
-
this.eventEmitter.removeAllListeners(
|
|
525
|
-
this.eventEmitter.removeAllListeners(
|
|
526
|
-
this.eventEmitter.removeAllListeners(
|
|
527
|
-
this.eventEmitter.removeAllListeners(
|
|
528
|
+
this.eventEmitter.removeAllListeners(zt.Launched);
|
|
529
|
+
this.eventEmitter.removeAllListeners(zt.Done);
|
|
530
|
+
this.eventEmitter.removeAllListeners(zt.UncaughtException);
|
|
531
|
+
this.eventEmitter.removeAllListeners(zt.FatalException);
|
|
528
532
|
const o = process.env[t];
|
|
529
|
-
const
|
|
533
|
+
const getDataSourceOptionsArray = t => {
|
|
530
534
|
const e = [];
|
|
531
535
|
for (const o in t) {
|
|
532
|
-
if (t[o] && t[o].class && t[o].class.databaseSymbol && t[o].class.databaseSymbol ===
|
|
533
|
-
const
|
|
534
|
-
if (!
|
|
535
|
-
Reflect.set(
|
|
536
|
-
e.push(
|
|
536
|
+
if (t[o] && t[o].class && t[o].class.databaseSymbol && t[o].class.databaseSymbol === B) {
|
|
537
|
+
const i = t[o].options;
|
|
538
|
+
if (!i) continue;
|
|
539
|
+
Reflect.set(i, "dataSourceName", o);
|
|
540
|
+
e.push(i);
|
|
537
541
|
}
|
|
538
542
|
}
|
|
539
543
|
return e;
|
|
540
544
|
};
|
|
541
|
-
const i = [ ...e.components ?
|
|
545
|
+
const i = [ ...e.components ? getDataSourceOptionsArray(e.components) : [], ...e.providers ? getDataSourceOptionsArray(e.providers) : [] ];
|
|
542
546
|
if (!i.length) process.exit(0);
|
|
543
547
|
e.bootstrap = [];
|
|
544
548
|
i.forEach(((t, r) => {
|
|
545
549
|
const n = `GenerateMigration${r}${Date.now()}`;
|
|
546
550
|
if (!e.providers) e.providers = {};
|
|
547
551
|
e.providers[n] = {
|
|
548
|
-
class:
|
|
552
|
+
class: Kt,
|
|
549
553
|
path: o,
|
|
550
554
|
outputJs: false,
|
|
551
555
|
exitProcess: r === i.length - 1,
|
|
@@ -558,25 +562,25 @@ let Kt = class Application extends b {
|
|
|
558
562
|
break;
|
|
559
563
|
}
|
|
560
564
|
}
|
|
561
|
-
const o = new
|
|
562
|
-
return new Promise(((t,
|
|
563
|
-
|
|
565
|
+
const o = new x;
|
|
566
|
+
return new Promise(((t, i) => {
|
|
567
|
+
w.validateAsync(e).then((e => {
|
|
564
568
|
e.bootstrap?.push((async t => {
|
|
565
|
-
const
|
|
569
|
+
const launchedCallbackRemover = function() {
|
|
566
570
|
this.options.bootstrap?.pop();
|
|
567
|
-
|
|
571
|
+
R(Reflect.getOwnMetadata("#bootstrap", this))?.pop();
|
|
568
572
|
};
|
|
569
|
-
|
|
570
|
-
this.eventEmitter.emit(
|
|
573
|
+
launchedCallbackRemover.bind(R(t))();
|
|
574
|
+
this.eventEmitter.emit(zt.Launched, R(t));
|
|
571
575
|
}));
|
|
572
|
-
o.set(
|
|
576
|
+
o.set(Application, {
|
|
573
577
|
options: e
|
|
574
|
-
}).then((e => e.once(
|
|
575
|
-
})).catch(
|
|
578
|
+
}).then((e => e.once(b, (() => t(e))).once(v, (t => this.processFatalException(t))))).catch(i);
|
|
579
|
+
})).catch(i);
|
|
576
580
|
}));
|
|
577
581
|
}
|
|
578
582
|
get alias() {
|
|
579
|
-
return
|
|
583
|
+
return O.getAliasInstance();
|
|
580
584
|
}
|
|
581
585
|
get appId() {
|
|
582
586
|
return C().appId;
|
|
@@ -594,20 +598,18 @@ let Kt = class Application extends b {
|
|
|
594
598
|
if (typeof t === "boolean" && t) {
|
|
595
599
|
return process.exit(2);
|
|
596
600
|
} else {
|
|
597
|
-
|
|
601
|
+
Application.eventEmitter.emit("exit", this, t ? t : 0);
|
|
598
602
|
}
|
|
599
603
|
}
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
t([ A(i.Object().pattern(i.String(), i.String()).required()), e("design:type", Function), e("design:paramtypes", [ Object ]), e("design:returntype", Object) ], Kt, "env", null);
|
|
604
|
+
}
|
|
603
605
|
|
|
604
|
-
t([
|
|
606
|
+
t([ S(r.Object().pattern(r.String(), r.String()).required()), e("design:type", Function), e("design:paramtypes", [ Object ]), e("design:returntype", Object) ], Application, "env", null);
|
|
605
607
|
|
|
606
|
-
|
|
608
|
+
t([ S(r.Object().pattern(r.String(), r.String()).required(), r.Boolean().optional().default(false)), e("design:type", Function), e("design:paramtypes", [ Object, Boolean ]), e("design:returntype", Object) ], Application, "alias", null);
|
|
607
609
|
|
|
608
|
-
var
|
|
610
|
+
var Wt;
|
|
609
611
|
|
|
610
|
-
let
|
|
612
|
+
let Kt = Wt = class GenerateMigration extends o {
|
|
611
613
|
get extension() {
|
|
612
614
|
return this.outputJs ? ".js" : ".ts";
|
|
613
615
|
}
|
|
@@ -615,67 +617,69 @@ let Yt = Xt = class GenerateMigration extends o {
|
|
|
615
617
|
return this.timestamp + "-" + (this.dataSourceName ? this.dataSourceName : n.basename(this.path)) + this.extension;
|
|
616
618
|
}
|
|
617
619
|
#t;
|
|
620
|
+
#e;
|
|
618
621
|
async init() {
|
|
619
|
-
this.#t =
|
|
620
|
-
this.#
|
|
622
|
+
this.#t = await this.getObject(Application);
|
|
623
|
+
this.#e = new s.DataSource(this.dataSource);
|
|
624
|
+
this.#e.setOptions({
|
|
621
625
|
synchronize: false,
|
|
622
626
|
migrationsRun: false,
|
|
623
627
|
dropSchema: false,
|
|
624
628
|
logging: false
|
|
625
629
|
});
|
|
626
|
-
this.#
|
|
630
|
+
this.#e = await this.#e.initialize();
|
|
627
631
|
await this.handle();
|
|
628
632
|
}
|
|
629
633
|
async destroy() {
|
|
630
|
-
await (this.#
|
|
634
|
+
await (this.#e?.destroy());
|
|
631
635
|
}
|
|
632
636
|
async handle() {
|
|
633
637
|
try {
|
|
634
638
|
const t = [], e = [];
|
|
635
639
|
try {
|
|
636
|
-
const o = await this.#
|
|
640
|
+
const o = await this.#e.driver.createSchemaBuilder().log();
|
|
637
641
|
if (this.pretty) {
|
|
638
642
|
o.upQueries.forEach((t => {
|
|
639
|
-
t.query =
|
|
643
|
+
t.query = Wt.prettifyQuery(t.query);
|
|
640
644
|
}));
|
|
641
645
|
o.downQueries.forEach((t => {
|
|
642
|
-
t.query =
|
|
646
|
+
t.query = Wt.prettifyQuery(t.query);
|
|
643
647
|
}));
|
|
644
648
|
}
|
|
645
649
|
o.upQueries.forEach((e => {
|
|
646
|
-
t.push(" await queryRunner.query(`" + e.query.replaceAll("`", "\\`") + "`" +
|
|
650
|
+
t.push(" await queryRunner.query(`" + e.query.replaceAll("`", "\\`") + "`" + Wt.queryParams(e.parameters) + ");");
|
|
647
651
|
}));
|
|
648
652
|
o.downQueries.forEach((t => {
|
|
649
|
-
e.push(" await queryRunner.query(`" + t.query.replaceAll("`", "\\`") + "`" +
|
|
653
|
+
e.push(" await queryRunner.query(`" + t.query.replaceAll("`", "\\`") + "`" + Wt.queryParams(t.parameters) + ");");
|
|
650
654
|
}));
|
|
651
655
|
} finally {
|
|
652
|
-
await this.#
|
|
656
|
+
await this.#e.destroy();
|
|
653
657
|
}
|
|
654
658
|
if (!t.length) {
|
|
655
659
|
if (this.check) {
|
|
656
660
|
console.log(V.green`No changes in database schema were found`);
|
|
657
661
|
if (this.exitProcess) {
|
|
658
|
-
return this.
|
|
662
|
+
return this.#t.exit(0);
|
|
659
663
|
} else {
|
|
660
664
|
return;
|
|
661
665
|
}
|
|
662
666
|
} else {
|
|
663
667
|
console.log(V.yellow`No changes in database schema were found`);
|
|
664
668
|
if (this.exitProcess) {
|
|
665
|
-
return this.
|
|
669
|
+
return this.#t.exit(1);
|
|
666
670
|
} else {
|
|
667
671
|
return;
|
|
668
672
|
}
|
|
669
673
|
}
|
|
670
674
|
} else if (!this.path) {
|
|
671
675
|
console.log(V.yellow`Please specify a migration path`);
|
|
672
|
-
return this.
|
|
676
|
+
return this.#t.exit(1);
|
|
673
677
|
}
|
|
674
|
-
const o = this.outputJs ?
|
|
678
|
+
const o = this.outputJs ? Wt.getJavascriptTemplate(n.basename(this.path), this.timestamp, t, e.reverse(), this.esm) : Wt.getTemplate(n.basename(this.path), this.timestamp, t, e.reverse());
|
|
675
679
|
if (this.check) {
|
|
676
680
|
console.log(V.yellow`Unexpected changes in database schema were found in check mode:\n\n${V.white(o)}`);
|
|
677
681
|
if (this.exitProcess) {
|
|
678
|
-
return this.
|
|
682
|
+
return this.#t.exit(0);
|
|
679
683
|
} else {
|
|
680
684
|
return;
|
|
681
685
|
}
|
|
@@ -684,17 +688,17 @@ let Yt = Xt = class GenerateMigration extends o {
|
|
|
684
688
|
console.log(V.green(`Migration ${V.blue(this.path + this.extension)} has content:\n\n${V.white(o)}`));
|
|
685
689
|
} else {
|
|
686
690
|
const t = n.isAbsolute(this.path) ? n.join(this.path, this.filename) : n.join(process.cwd(), this.path, this.filename);
|
|
687
|
-
await
|
|
691
|
+
await Q.CommandUtils.createFile(t, o);
|
|
688
692
|
console.log(V.green`Migration ${V.blue(t)} has been generated successfully.`);
|
|
689
693
|
if (this.exitProcess) {
|
|
690
|
-
return this.
|
|
694
|
+
return this.#t.exit(0);
|
|
691
695
|
} else {
|
|
692
696
|
return;
|
|
693
697
|
}
|
|
694
698
|
}
|
|
695
699
|
} catch (t) {
|
|
696
|
-
|
|
697
|
-
return this.
|
|
700
|
+
F.PlatformTools.logCmdErr("Error during migration generation:", t);
|
|
701
|
+
return this.#t.exit(1);
|
|
698
702
|
}
|
|
699
703
|
}
|
|
700
704
|
static queryParams(t) {
|
|
@@ -703,45 +707,43 @@ let Yt = Xt = class GenerateMigration extends o {
|
|
|
703
707
|
}
|
|
704
708
|
return `, ${JSON.stringify(t)}`;
|
|
705
709
|
}
|
|
706
|
-
static getTemplate(t, e, o,
|
|
707
|
-
const
|
|
708
|
-
return `import { MigrationInterface, QueryRunner } from "lakutata/orm";\n\nexport class ${
|
|
710
|
+
static getTemplate(t, e, o, i) {
|
|
711
|
+
const r = `${T.camelCase(t, true)}${e}`;
|
|
712
|
+
return `import { MigrationInterface, QueryRunner } from "lakutata/orm";\n\nexport class ${r} implements MigrationInterface {\n name = '${r}'\n\n public async up(queryRunner: QueryRunner): Promise<void> {\n${o.join(`\n`)}\n }\n\n public async down(queryRunner: QueryRunner): Promise<void> {\n${i.join(`\n`)}\n }\n\n}\n`;
|
|
709
713
|
}
|
|
710
|
-
static getJavascriptTemplate(t, e, o,
|
|
711
|
-
const n = `${
|
|
712
|
-
const s =
|
|
713
|
-
return `/**\n * @typedef {import('lakutata/orm').MigrationInterface} MigrationInterface\n * @typedef {import('lakutata/orm').QueryRunner} QueryRunner\n */\n\n/**\n * @class\n * @implements {MigrationInterface}\n */\n${s} class ${n} {\n name = '${n}'\n\n /**\n * @param {QueryRunner} queryRunner\n */\n async up(queryRunner) {\n${o.join(`\n`)}\n }\n\n /**\n * @param {QueryRunner} queryRunner\n */\n async down(queryRunner) {\n${
|
|
714
|
+
static getJavascriptTemplate(t, e, o, i, r) {
|
|
715
|
+
const n = `${T.camelCase(t, true)}${e}`;
|
|
716
|
+
const s = r ? "export" : "module.exports =";
|
|
717
|
+
return `/**\n * @typedef {import('lakutata/orm').MigrationInterface} MigrationInterface\n * @typedef {import('lakutata/orm').QueryRunner} QueryRunner\n */\n\n/**\n * @class\n * @implements {MigrationInterface}\n */\n${s} class ${n} {\n name = '${n}'\n\n /**\n * @param {QueryRunner} queryRunner\n */\n async up(queryRunner) {\n${o.join(`\n`)}\n }\n\n /**\n * @param {QueryRunner} queryRunner\n */\n async down(queryRunner) {\n${i.join(`\n`)}\n }\n}\n`;
|
|
714
718
|
}
|
|
715
719
|
static prettifyQuery(t) {
|
|
716
|
-
const e =
|
|
720
|
+
const e = M.format(t, {
|
|
717
721
|
indent: " "
|
|
718
722
|
});
|
|
719
723
|
return "\n" + e.replace(/^/gm, " ") + "\n ";
|
|
720
724
|
}
|
|
721
725
|
};
|
|
722
726
|
|
|
723
|
-
t([
|
|
724
|
-
|
|
725
|
-
t([ r(i.String().required()), e("design:type", String) ], Yt.prototype, "path", void 0);
|
|
727
|
+
t([ i(r.String().required()), e("design:type", String) ], Kt.prototype, "path", void 0);
|
|
726
728
|
|
|
727
|
-
t([ r
|
|
729
|
+
t([ i(r.String().allow("").optional().default("")), e("design:type", String) ], Kt.prototype, "dataSourceName", void 0);
|
|
728
730
|
|
|
729
|
-
t([
|
|
731
|
+
t([ i(), e("design:type", Object) ], Kt.prototype, "dataSource", void 0);
|
|
730
732
|
|
|
731
|
-
t([ r
|
|
733
|
+
t([ i(r.Boolean().optional().default(true)), e("design:type", Boolean) ], Kt.prototype, "pretty", void 0);
|
|
732
734
|
|
|
733
|
-
t([ r
|
|
735
|
+
t([ i(r.Boolean().optional().default(false)), e("design:type", Boolean) ], Kt.prototype, "outputJs", void 0);
|
|
734
736
|
|
|
735
|
-
t([ r
|
|
737
|
+
t([ i(r.Boolean().optional().default(false)), e("design:type", Boolean) ], Kt.prototype, "esm", void 0);
|
|
736
738
|
|
|
737
|
-
t([ r
|
|
739
|
+
t([ i(r.Boolean().optional().default(false)), e("design:type", Boolean) ], Kt.prototype, "dryRun", void 0);
|
|
738
740
|
|
|
739
|
-
t([ r
|
|
741
|
+
t([ i(r.Boolean().optional().default(false)), e("design:type", Boolean) ], Kt.prototype, "check", void 0);
|
|
740
742
|
|
|
741
|
-
t([ r
|
|
743
|
+
t([ i(r.Number().optional().default((() => Date.now()))), e("design:type", Number) ], Kt.prototype, "timestamp", void 0);
|
|
742
744
|
|
|
743
|
-
t([ r
|
|
745
|
+
t([ i(r.Boolean().optional().default(true)), e("design:type", Boolean) ], Kt.prototype, "exitProcess", void 0);
|
|
744
746
|
|
|
745
|
-
|
|
747
|
+
Kt = Wt = t([ j() ], Kt);
|
|
746
748
|
|
|
747
|
-
export {
|
|
749
|
+
export { Application, zt as ApplicationState, Kt as G };
|