lakutata 2.0.80 → 2.0.81
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 +1423 -886
- 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 +11 -11
- package/src/components/Database.mjs +11 -11
- package/src/components/Logger.cjs +7 -7
- package/src/components/Logger.mjs +7 -7
- package/src/components/cacher/Cacher.cjs +1178 -264
- package/src/components/cacher/Cacher.mjs +1087 -173
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +479 -2963
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +469 -2947
- package/src/components/docker/ConnectionOptionsBuilder.cjs +15 -17
- package/src/components/docker/ConnectionOptionsBuilder.mjs +13 -15
- package/src/components/docker/Docker.cjs +4884 -4945
- package/src/components/docker/Docker.mjs +4902 -4963
- 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/entrypoint/Entrypoint.cjs +2170 -1678
- package/src/components/entrypoint/Entrypoint.mjs +2126 -1634
- 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 +4 -2
- package/src/components/monitor/AliveMonitor.mjs +4 -2
- 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 +5 -3
- package/src/components/monitor/MemoryMonitor.mjs +5 -3
- package/src/decorators/ctrl/CLIAction.cjs +3 -3
- package/src/decorators/ctrl/CLIAction.mjs +3 -3
- package/src/decorators/ctrl/HTTPAction.cjs +3 -3
- package/src/decorators/ctrl/HTTPAction.mjs +3 -3
- package/src/decorators/ctrl/ServiceAction.cjs +3 -3
- package/src/decorators/ctrl/ServiceAction.mjs +3 -3
- package/src/decorators/ctrl/http/DELETE.cjs +3 -3
- package/src/decorators/ctrl/http/DELETE.mjs +3 -3
- package/src/decorators/ctrl/http/GET.cjs +3 -3
- package/src/decorators/ctrl/http/GET.mjs +3 -3
- package/src/decorators/ctrl/http/HEAD.cjs +3 -3
- package/src/decorators/ctrl/http/HEAD.mjs +3 -3
- package/src/decorators/ctrl/http/OPTIONS.cjs +3 -3
- package/src/decorators/ctrl/http/OPTIONS.mjs +3 -3
- package/src/decorators/ctrl/http/PATCH.cjs +3 -3
- package/src/decorators/ctrl/http/PATCH.mjs +3 -3
- package/src/decorators/ctrl/http/POST.cjs +3 -3
- package/src/decorators/ctrl/http/POST.mjs +3 -3
- package/src/decorators/ctrl/http/PUT.cjs +3 -3
- package/src/decorators/ctrl/http/PUT.mjs +3 -3
- 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 +1200 -1193
- package/src/lib/base/EventEmitter.mjs +1201 -1194
- package/src/lib/base/internal/ApplicationConfigLoader.cjs +4 -2
- package/src/lib/base/internal/ApplicationConfigLoader.mjs +4 -2
- package/src/lib/base/internal/ControllerEntrypoint.cjs +3 -3
- package/src/lib/base/internal/ControllerEntrypoint.mjs +3 -3
- package/src/lib/base/internal/DataValidator.cjs +176 -179
- package/src/lib/base/internal/DataValidator.mjs +177 -180
- package/src/lib/base/internal/ModuleConfigLoader.cjs +4 -3
- package/src/lib/base/internal/ModuleConfigLoader.mjs +4 -3
- package/src/lib/base/internal/ObjectType.cjs +4 -2
- package/src/lib/base/internal/ObjectType.mjs +4 -2
- package/src/lib/base/internal/PatternManager.cjs +740 -735
- package/src/lib/base/internal/PatternManager.mjs +745 -740
- package/src/lib/base/internal/StringifyPattern.cjs +1 -1
- package/src/lib/base/internal/StringifyPattern.mjs +1 -1
- package/src/lib/core/Application.cjs +151 -147
- package/src/lib/core/Application.mjs +199 -197
- 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/Glob.cjs +970 -721
- package/src/lib/helpers/Glob.mjs +1036 -787
- package/src/lib/helpers/IsHtml.cjs +7 -13
- package/src/lib/helpers/IsHtml.mjs +7 -13
- package/src/lib/helpers/IsXML.cjs +1158 -1016
- package/src/lib/helpers/IsXML.mjs +871 -729
- package/src/lib/helpers/MD5.cjs +1 -1
- package/src/lib/helpers/MD5.mjs +1 -1
- package/src/lib/helpers/NonceStr.cjs +1 -1
- package/src/lib/helpers/NonceStr.mjs +1 -1
- package/src/lib/helpers/ObjectHash.cjs +379 -372
- package/src/lib/helpers/ObjectHash.mjs +379 -372
- package/src/lib/helpers/RandomString.cjs +168 -147
- package/src/lib/helpers/RandomString.mjs +167 -146
- package/src/lib/helpers/SHA1.cjs +1 -1
- package/src/lib/helpers/SHA1.mjs +1 -1
- package/src/lib/helpers/SHA256.cjs +1 -1
- package/src/lib/helpers/SHA256.mjs +1 -1
- package/src/lib/helpers/SortArray.cjs +1 -1
- package/src/lib/helpers/SortArray.mjs +1 -1
- package/src/lib/helpers/Statistics.cjs +1 -1
- package/src/lib/helpers/Statistics.mjs +1 -1
- package/src/lib/helpers/URLBuilder.cjs +355 -355
- package/src/lib/helpers/URLBuilder.mjs +350 -350
- package/src/lib/helpers/UUID.cjs +1 -1
- package/src/lib/helpers/UUID.mjs +1 -1
- package/src/lib/ioc/DependencyInjectionContainer.cjs +32 -30
- package/src/lib/ioc/DependencyInjectionContainer.mjs +12 -10
- package/src/lib/ioc/ListModules.cjs +5174 -5249
- package/src/lib/ioc/ListModules.mjs +5177 -5252
- package/src/lib/validation/VLD.cjs +4080 -3902
- package/src/lib/validation/VLD.mjs +2970 -2792
- 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 +11 -11
- package/src/providers/Database.mjs +11 -11
- package/src/providers/PasswordHash.cjs +5 -3
- package/src/providers/PasswordHash.mjs +190 -188
- package/src/providers/migration/GenerateMigration.cjs +15 -19
- package/src/providers/migration/GenerateMigration.mjs +15 -19
- 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 +18129 -1935
- package/vendor/Package.16.mjs +18115 -1839
- package/vendor/Package.17.cjs +1922 -47918
- package/vendor/Package.17.mjs +1874 -47937
- 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 +5739 -5710
- package/vendor/Package.2.mjs +5733 -5704
- 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.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 +884 -874
- 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 +15 -11
- package/vendor/Package.5.mjs +11 -7
- 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 +520 -511
- package/vendor/Package.6.mjs +543 -534
- package/vendor/Package.60.cjs +47649 -0
- package/vendor/Package.60.mjs +47606 -0
- package/vendor/Package.610.cjs +11 -11
- package/vendor/Package.610.mjs +11 -11
- package/vendor/Package.611.cjs +33 -23
- package/vendor/Package.611.mjs +19 -9
- package/vendor/Package.612.cjs +42 -36
- package/vendor/Package.612.mjs +35 -29
- package/vendor/Package.613.cjs +5 -4
- package/vendor/Package.613.mjs +5 -4
- package/vendor/Package.62.cjs +92 -89
- package/vendor/Package.62.mjs +185 -182
- package/vendor/Package.63.cjs +509 -166
- 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 +412 -261
- package/vendor/Package.67.mjs +410 -259
- package/vendor/Package.68.cjs +397 -405
- package/vendor/Package.68.mjs +227 -242
- package/vendor/Package.8.cjs +0 -4
- package/vendor/Package.8.mjs +0 -4
- package/vendor/Package.9.cjs +132 -118
- package/vendor/Package.9.mjs +138 -124
- 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
|
@@ -14,11 +14,11 @@ const i = require("../../../vendor/Package.2.cjs");
|
|
|
14
14
|
|
|
15
15
|
const n = require("path");
|
|
16
16
|
|
|
17
|
-
const a = require("../../../vendor/Package.
|
|
17
|
+
const a = require("../../../vendor/Package.11.cjs");
|
|
18
18
|
|
|
19
|
-
const o = require("../../../vendor/Package.
|
|
19
|
+
const o = require("../../../vendor/Package.5.cjs");
|
|
20
20
|
|
|
21
|
-
const s = require("../../../vendor/Package.
|
|
21
|
+
const s = require("../../../vendor/Package.112.cjs");
|
|
22
22
|
|
|
23
23
|
const c = require("../../../vendor/Package.12.cjs");
|
|
24
24
|
|
|
@@ -40,11 +40,11 @@ const m = require("./Alias.cjs");
|
|
|
40
40
|
|
|
41
41
|
const q = require("../base/internal/BasicInfo.cjs");
|
|
42
42
|
|
|
43
|
-
const
|
|
43
|
+
const f = require("../../components/entrypoint/Entrypoint.cjs");
|
|
44
44
|
|
|
45
|
-
const j = require("../../../vendor/Package.
|
|
45
|
+
const j = require("../../../vendor/Package.16.cjs");
|
|
46
46
|
|
|
47
|
-
const
|
|
47
|
+
const y = require("../../decorators/dto/Accept.cjs");
|
|
48
48
|
|
|
49
49
|
const b = require("fs");
|
|
50
50
|
|
|
@@ -54,11 +54,9 @@ const v = require("node:fs");
|
|
|
54
54
|
|
|
55
55
|
const E = require("../helpers/As.cjs");
|
|
56
56
|
|
|
57
|
-
const
|
|
57
|
+
const w = require("../base/EventEmitter.cjs");
|
|
58
58
|
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
const A = require("../../decorators/di/Inject.cjs");
|
|
59
|
+
const O = require("../base/internal/DatabaseSymbol.cjs");
|
|
62
60
|
|
|
63
61
|
require("../base/async-constructor/AsyncConstructor.cjs");
|
|
64
62
|
|
|
@@ -136,6 +134,8 @@ require("../ioc/ListModules.cjs");
|
|
|
136
134
|
|
|
137
135
|
require("os");
|
|
138
136
|
|
|
137
|
+
require("../../../vendor/Package.10.cjs");
|
|
138
|
+
|
|
139
139
|
require("stream");
|
|
140
140
|
|
|
141
141
|
require("events");
|
|
@@ -180,9 +180,9 @@ require("../helpers/IsEmptyObject.cjs");
|
|
|
180
180
|
|
|
181
181
|
require("../../../vendor/Package.62.cjs");
|
|
182
182
|
|
|
183
|
-
require("../../../vendor/Package.
|
|
183
|
+
require("../../../vendor/Package.13.cjs");
|
|
184
184
|
|
|
185
|
-
require("../../../vendor/Package.
|
|
185
|
+
require("../../../vendor/Package.14.cjs");
|
|
186
186
|
|
|
187
187
|
require("buffer");
|
|
188
188
|
|
|
@@ -190,12 +190,10 @@ require("module");
|
|
|
190
190
|
|
|
191
191
|
require("tty");
|
|
192
192
|
|
|
193
|
-
require("../../../vendor/Package.
|
|
193
|
+
require("../../../vendor/Package.15.cjs");
|
|
194
194
|
|
|
195
195
|
require("crypto");
|
|
196
196
|
|
|
197
|
-
require("../../../vendor/Package.63.cjs");
|
|
198
|
-
|
|
199
197
|
require("node:url");
|
|
200
198
|
|
|
201
199
|
require("node:fs/promises");
|
|
@@ -248,11 +246,11 @@ require("../helpers/GetObjectNestingDepth.cjs");
|
|
|
248
246
|
|
|
249
247
|
require("../../exceptions/InvalidActionPatternDepthException.cjs");
|
|
250
248
|
|
|
251
|
-
require("../../../vendor/Package.
|
|
249
|
+
require("../../../vendor/Package.63.cjs");
|
|
252
250
|
|
|
253
251
|
require("../base/internal/StringifyPattern.cjs");
|
|
254
252
|
|
|
255
|
-
require("../../../vendor/Package.
|
|
253
|
+
require("../../../vendor/Package.64.cjs");
|
|
256
254
|
|
|
257
255
|
require("../base/internal/PatternManager.cjs");
|
|
258
256
|
|
|
@@ -288,115 +286,124 @@ require("../../components/entrypoint/exceptions/InvalidActionGroupException.cjs"
|
|
|
288
286
|
|
|
289
287
|
require("worker_threads");
|
|
290
288
|
|
|
291
|
-
require("../../../vendor/Package.15.cjs");
|
|
292
|
-
|
|
293
289
|
require("assert");
|
|
294
290
|
|
|
295
291
|
require("string_decoder");
|
|
296
292
|
|
|
297
|
-
const
|
|
293
|
+
const A = e => e && e.__esModule ? e : {
|
|
298
294
|
default: e
|
|
299
295
|
};
|
|
300
296
|
|
|
301
|
-
const
|
|
297
|
+
const _ = A(n);
|
|
302
298
|
|
|
303
|
-
const
|
|
299
|
+
const S = A(u);
|
|
304
300
|
|
|
305
|
-
const
|
|
301
|
+
const C = A(x);
|
|
306
302
|
|
|
307
|
-
var
|
|
303
|
+
var D = s.requireSqlFormatter();
|
|
308
304
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
Object.defineProperty(I, "__esModule", {
|
|
312
|
-
value: true
|
|
313
|
-
});
|
|
305
|
+
const I = o.getDefaultExportFromCjs(D);
|
|
314
306
|
|
|
315
|
-
var M =
|
|
307
|
+
var M = s.requireStringUtils();
|
|
316
308
|
|
|
317
|
-
const P =
|
|
309
|
+
const P = o.getDefaultExportFromCjs(M);
|
|
318
310
|
|
|
319
|
-
|
|
311
|
+
var T = s.requirePlatformTools();
|
|
320
312
|
|
|
321
|
-
const k =
|
|
313
|
+
const k = o.getDefaultExportFromCjs(T);
|
|
322
314
|
|
|
323
|
-
|
|
315
|
+
var R = {};
|
|
324
316
|
|
|
325
|
-
|
|
317
|
+
var L;
|
|
326
318
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
319
|
+
function B() {
|
|
320
|
+
if (L) return R;
|
|
321
|
+
L = 1;
|
|
322
|
+
"use strict";
|
|
323
|
+
Object.defineProperty(R, "__esModule", {
|
|
324
|
+
value: true
|
|
325
|
+
});
|
|
326
|
+
R.CommandUtils = void 0;
|
|
327
|
+
const e = c.require$$0;
|
|
328
|
+
const t = e.__importDefault(S.default);
|
|
329
|
+
const r = e.__importDefault(_.default);
|
|
330
|
+
const i = s.requireError();
|
|
331
|
+
const n = s.requireInstanceChecker();
|
|
332
|
+
const a = s.requireImportUtils();
|
|
333
|
+
class CommandUtils {
|
|
334
|
+
static async loadDataSource(e) {
|
|
335
|
+
let t;
|
|
336
|
+
try {
|
|
337
|
+
[t] = await (0, a.importOrRequireFile)(e);
|
|
338
|
+
} catch (t) {
|
|
339
|
+
throw new Error(`Unable to open file: "${e}". ${t.message}`);
|
|
340
|
+
}
|
|
341
|
+
if (!t || typeof t !== "object") {
|
|
342
|
+
throw new Error(`Given data source file must contain export of a DataSource instance`);
|
|
343
|
+
}
|
|
344
|
+
if (n.InstanceChecker.isDataSource(t)) {
|
|
345
|
+
return t;
|
|
349
346
|
}
|
|
347
|
+
const r = [];
|
|
348
|
+
for (const e in t) {
|
|
349
|
+
const i = t[e];
|
|
350
|
+
const a = await i;
|
|
351
|
+
if (n.InstanceChecker.isDataSource(a)) {
|
|
352
|
+
r.push(a);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
if (r.length === 0) {
|
|
356
|
+
throw new Error(`Given data source file must contain export of a DataSource instance`);
|
|
357
|
+
}
|
|
358
|
+
if (r.length > 1) {
|
|
359
|
+
throw new Error(`Given data source file must contain only one export of DataSource instance`);
|
|
360
|
+
}
|
|
361
|
+
return r[0];
|
|
350
362
|
}
|
|
351
|
-
|
|
352
|
-
|
|
363
|
+
static async createDirectories(e) {
|
|
364
|
+
await t.default.mkdir(e, {
|
|
365
|
+
recursive: true
|
|
366
|
+
});
|
|
353
367
|
}
|
|
354
|
-
|
|
355
|
-
|
|
368
|
+
static async createFile(e, i, n = true) {
|
|
369
|
+
await CommandUtils.createDirectories(r.default.dirname(e));
|
|
370
|
+
if (n === false && await CommandUtils.fileExists(e)) {
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
await t.default.writeFile(e, i);
|
|
356
374
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
await T.default.mkdir(e, {
|
|
361
|
-
recursive: true
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
static async createFile(e, t, r = true) {
|
|
365
|
-
await CommandUtils.createDirectories(k.default.dirname(e));
|
|
366
|
-
if (r === false && await CommandUtils.fileExists(e)) {
|
|
367
|
-
return;
|
|
375
|
+
static async readFile(e) {
|
|
376
|
+
const r = await t.default.readFile(e);
|
|
377
|
+
return r.toString();
|
|
368
378
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
try {
|
|
377
|
-
await T.default.access(e, T.default.constants.F_OK);
|
|
378
|
-
return true;
|
|
379
|
-
} catch {
|
|
380
|
-
return false;
|
|
379
|
+
static async fileExists(e) {
|
|
380
|
+
try {
|
|
381
|
+
await t.default.access(e, t.default.constants.F_OK);
|
|
382
|
+
return true;
|
|
383
|
+
} catch {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
381
386
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
387
|
+
static getTimestamp(e) {
|
|
388
|
+
if (e && (isNaN(e) || e < 0)) {
|
|
389
|
+
throw new i.TypeORMError(`timestamp option should be a non-negative number. received: ${e}`);
|
|
390
|
+
}
|
|
391
|
+
return e ? new Date(Number(e)).getTime() : Date.now();
|
|
386
392
|
}
|
|
387
|
-
return e ? new Date(Number(e)).getTime() : Date.now();
|
|
388
393
|
}
|
|
394
|
+
R.CommandUtils = CommandUtils;
|
|
395
|
+
return R;
|
|
389
396
|
}
|
|
390
397
|
|
|
391
|
-
|
|
398
|
+
var N = B();
|
|
392
399
|
|
|
393
|
-
|
|
400
|
+
const G = o.getDefaultExportFromCjs(N);
|
|
394
401
|
|
|
395
|
-
|
|
402
|
+
var F = s.requireAnsis();
|
|
396
403
|
|
|
397
|
-
const
|
|
404
|
+
const U = o.getDefaultExportFromCjs(F);
|
|
398
405
|
|
|
399
|
-
|
|
406
|
+
const {Ansis: $, ansi256: Q, fg: J, bgAnsi256: V, bg: H, rgb: z, bgRgb: W, hex: K, bgHex: X, reset: Y, inverse: Z, hidden: ee, visible: te, bold: re, dim: ie, italic: ne, underline: ae, strikethrough: oe, strike: se, black: ce, red: ue, green: pe, yellow: le, blue: de, magenta: he, cyan: ge, white: me, grey: qe, gray: fe, blackBright: je, redBright: ye, greenBright: be, yellowBright: xe, blueBright: ve, magentaBright: Ee, cyanBright: we, whiteBright: Oe, bgBlack: Ae, bgRed: _e, bgGreen: Se, bgYellow: Ce, bgBlue: De, bgMagenta: Ie, bgCyan: Me, bgWhite: Pe, bgGrey: Te, bgGray: ke, bgBlackBright: Re, bgRedBright: Le, bgGreenBright: Be, bgYellowBright: Ne, bgBlueBright: Ge, bgMagentaBright: Fe, bgCyanBright: Ue, bgWhiteBright: $e} = U;
|
|
400
407
|
|
|
401
408
|
exports.ApplicationState = void 0;
|
|
402
409
|
|
|
@@ -407,7 +414,7 @@ exports.ApplicationState = void 0;
|
|
|
407
414
|
e["FatalException"] = "FATAL_EXCEPTION";
|
|
408
415
|
})(exports.ApplicationState || (exports.ApplicationState = {}));
|
|
409
416
|
|
|
410
|
-
|
|
417
|
+
class Application extends l.Module {
|
|
411
418
|
constructor() {
|
|
412
419
|
super(...arguments);
|
|
413
420
|
this.ConfigLoader = h.ApplicationConfigLoader;
|
|
@@ -417,17 +424,14 @@ exports.Application = class Application extends l.Module {
|
|
|
417
424
|
class: j.Logger
|
|
418
425
|
},
|
|
419
426
|
entrypoint: {
|
|
420
|
-
class:
|
|
427
|
+
class: f.Entrypoint
|
|
421
428
|
}
|
|
422
429
|
},
|
|
423
430
|
bootstrap: [ "log" ]
|
|
424
431
|
};
|
|
425
432
|
}
|
|
426
433
|
static {
|
|
427
|
-
|
|
428
|
-
}
|
|
429
|
-
static {
|
|
430
|
-
this.eventEmitter = new _.EventEmitter;
|
|
434
|
+
this.eventEmitter = new w.EventEmitter;
|
|
431
435
|
}
|
|
432
436
|
static {
|
|
433
437
|
this.environmentVariableMap = new Map;
|
|
@@ -525,8 +529,8 @@ exports.Application = class Application extends l.Module {
|
|
|
525
529
|
Object.keys(r).forEach((t => {
|
|
526
530
|
e.set(t, r[t]);
|
|
527
531
|
if (i) {
|
|
528
|
-
const e =
|
|
529
|
-
if (!v.existsSync(e)) b.mkdirSync(
|
|
532
|
+
const e = C.default.resolve(t);
|
|
533
|
+
if (!v.existsSync(e)) b.mkdirSync(C.default.resolve(t), {
|
|
530
534
|
recursive: true
|
|
531
535
|
});
|
|
532
536
|
}
|
|
@@ -545,7 +549,7 @@ exports.Application = class Application extends l.Module {
|
|
|
545
549
|
const i = e => {
|
|
546
550
|
const t = [];
|
|
547
551
|
for (const r in e) {
|
|
548
|
-
if (e[r] && e[r].class && e[r].class.databaseSymbol && e[r].class.databaseSymbol ===
|
|
552
|
+
if (e[r] && e[r].class && e[r].class.databaseSymbol && e[r].class.databaseSymbol === O.DatabaseSymbol) {
|
|
549
553
|
const i = e[r].options;
|
|
550
554
|
if (!i) continue;
|
|
551
555
|
Reflect.set(i, "dataSourceName", r);
|
|
@@ -585,7 +589,7 @@ exports.Application = class Application extends l.Module {
|
|
|
585
589
|
t.bind(E.As(e))();
|
|
586
590
|
this.eventEmitter.emit(exports.ApplicationState.Launched, E.As(e));
|
|
587
591
|
}));
|
|
588
|
-
r.set(
|
|
592
|
+
r.set(Application, {
|
|
589
593
|
options: t
|
|
590
594
|
}).then((t => t.once(l.MODULE_INITIALIZED, (() => e(t))).once(l.MODULE_INITIALIZE_ERROR, (e => this.processFatalException(e))))).catch(i);
|
|
591
595
|
})).catch(i);
|
|
@@ -610,107 +614,107 @@ exports.Application = class Application extends l.Module {
|
|
|
610
614
|
if (typeof e === "boolean" && e) {
|
|
611
615
|
return process.exit(2);
|
|
612
616
|
} else {
|
|
613
|
-
|
|
617
|
+
Application.eventEmitter.emit("exit", this, e ? e : 0);
|
|
614
618
|
}
|
|
615
619
|
}
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
e.__decorate([ f.Accept(i.DTO.Object().pattern(i.DTO.String(), i.DTO.String()).required()), e.__metadata("design:type", Function), e.__metadata("design:paramtypes", [ Object ]), e.__metadata("design:returntype", Object) ], exports.Application, "env", null);
|
|
620
|
+
}
|
|
619
621
|
|
|
620
|
-
e.__decorate([
|
|
622
|
+
e.__decorate([ y.Accept(i.DTO.Object().pattern(i.DTO.String(), i.DTO.String()).required()), e.__metadata("design:type", Function), e.__metadata("design:paramtypes", [ Object ]), e.__metadata("design:returntype", Object) ], Application, "env", null);
|
|
621
623
|
|
|
622
|
-
|
|
624
|
+
e.__decorate([ y.Accept(i.DTO.Object().pattern(i.DTO.String(), i.DTO.String()).required(), i.DTO.Boolean().optional().default(false)), e.__metadata("design:type", Function), e.__metadata("design:paramtypes", [ Object, Boolean ]), e.__metadata("design:returntype", Object) ], Application, "alias", null);
|
|
623
625
|
|
|
624
|
-
var
|
|
626
|
+
var Qe;
|
|
625
627
|
|
|
626
|
-
exports.GenerateMigration =
|
|
628
|
+
exports.GenerateMigration = Qe = class GenerateMigration extends t.Provider {
|
|
627
629
|
get extension() {
|
|
628
630
|
return this.outputJs ? ".js" : ".ts";
|
|
629
631
|
}
|
|
630
632
|
get filename() {
|
|
631
|
-
return this.timestamp + "-" + (this.dataSourceName ? this.dataSourceName :
|
|
633
|
+
return this.timestamp + "-" + (this.dataSourceName ? this.dataSourceName : _.default.basename(this.path)) + this.extension;
|
|
632
634
|
}
|
|
633
635
|
#e;
|
|
636
|
+
#t;
|
|
634
637
|
async init() {
|
|
635
|
-
this.#e =
|
|
636
|
-
this.#
|
|
638
|
+
this.#e = await this.getObject(Application);
|
|
639
|
+
this.#t = new a.DataSourceExports.DataSource(this.dataSource);
|
|
640
|
+
this.#t.setOptions({
|
|
637
641
|
synchronize: false,
|
|
638
642
|
migrationsRun: false,
|
|
639
643
|
dropSchema: false,
|
|
640
644
|
logging: false
|
|
641
645
|
});
|
|
642
|
-
this.#
|
|
646
|
+
this.#t = await this.#t.initialize();
|
|
643
647
|
await this.handle();
|
|
644
648
|
}
|
|
645
649
|
async destroy() {
|
|
646
|
-
await (this.#
|
|
650
|
+
await (this.#t?.destroy());
|
|
647
651
|
}
|
|
648
652
|
async handle() {
|
|
649
653
|
try {
|
|
650
654
|
const e = [], t = [];
|
|
651
655
|
try {
|
|
652
|
-
const r = await this.#
|
|
656
|
+
const r = await this.#t.driver.createSchemaBuilder().log();
|
|
653
657
|
if (this.pretty) {
|
|
654
658
|
r.upQueries.forEach((e => {
|
|
655
|
-
e.query =
|
|
659
|
+
e.query = Qe.prettifyQuery(e.query);
|
|
656
660
|
}));
|
|
657
661
|
r.downQueries.forEach((e => {
|
|
658
|
-
e.query =
|
|
662
|
+
e.query = Qe.prettifyQuery(e.query);
|
|
659
663
|
}));
|
|
660
664
|
}
|
|
661
665
|
r.upQueries.forEach((t => {
|
|
662
|
-
e.push(" await queryRunner.query(`" + t.query.replaceAll("`", "\\`") + "`" +
|
|
666
|
+
e.push(" await queryRunner.query(`" + t.query.replaceAll("`", "\\`") + "`" + Qe.queryParams(t.parameters) + ");");
|
|
663
667
|
}));
|
|
664
668
|
r.downQueries.forEach((e => {
|
|
665
|
-
t.push(" await queryRunner.query(`" + e.query.replaceAll("`", "\\`") + "`" +
|
|
669
|
+
t.push(" await queryRunner.query(`" + e.query.replaceAll("`", "\\`") + "`" + Qe.queryParams(e.parameters) + ");");
|
|
666
670
|
}));
|
|
667
671
|
} finally {
|
|
668
|
-
await this.#
|
|
672
|
+
await this.#t.destroy();
|
|
669
673
|
}
|
|
670
674
|
if (!e.length) {
|
|
671
675
|
if (this.check) {
|
|
672
|
-
console.log(
|
|
676
|
+
console.log(U.green`No changes in database schema were found`);
|
|
673
677
|
if (this.exitProcess) {
|
|
674
|
-
return this.
|
|
678
|
+
return this.#e.exit(0);
|
|
675
679
|
} else {
|
|
676
680
|
return;
|
|
677
681
|
}
|
|
678
682
|
} else {
|
|
679
|
-
console.log(
|
|
683
|
+
console.log(U.yellow`No changes in database schema were found`);
|
|
680
684
|
if (this.exitProcess) {
|
|
681
|
-
return this.
|
|
685
|
+
return this.#e.exit(1);
|
|
682
686
|
} else {
|
|
683
687
|
return;
|
|
684
688
|
}
|
|
685
689
|
}
|
|
686
690
|
} else if (!this.path) {
|
|
687
|
-
console.log(
|
|
688
|
-
return this.
|
|
691
|
+
console.log(U.yellow`Please specify a migration path`);
|
|
692
|
+
return this.#e.exit(1);
|
|
689
693
|
}
|
|
690
|
-
const r = this.outputJs ?
|
|
694
|
+
const r = this.outputJs ? Qe.getJavascriptTemplate(_.default.basename(this.path), this.timestamp, e, t.reverse(), this.esm) : Qe.getTemplate(_.default.basename(this.path), this.timestamp, e, t.reverse());
|
|
691
695
|
if (this.check) {
|
|
692
|
-
console.log(
|
|
696
|
+
console.log(U.yellow`Unexpected changes in database schema were found in check mode:\n\n${U.white(r)}`);
|
|
693
697
|
if (this.exitProcess) {
|
|
694
|
-
return this.
|
|
698
|
+
return this.#e.exit(0);
|
|
695
699
|
} else {
|
|
696
700
|
return;
|
|
697
701
|
}
|
|
698
702
|
}
|
|
699
703
|
if (this.dryRun) {
|
|
700
|
-
console.log(
|
|
704
|
+
console.log(U.green(`Migration ${U.blue(this.path + this.extension)} has content:\n\n${U.white(r)}`));
|
|
701
705
|
} else {
|
|
702
|
-
const e =
|
|
703
|
-
await
|
|
704
|
-
console.log(
|
|
706
|
+
const e = _.default.isAbsolute(this.path) ? _.default.join(this.path, this.filename) : _.default.join(process.cwd(), this.path, this.filename);
|
|
707
|
+
await N.CommandUtils.createFile(e, r);
|
|
708
|
+
console.log(U.green`Migration ${U.blue(e)} has been generated successfully.`);
|
|
705
709
|
if (this.exitProcess) {
|
|
706
|
-
return this.
|
|
710
|
+
return this.#e.exit(0);
|
|
707
711
|
} else {
|
|
708
712
|
return;
|
|
709
713
|
}
|
|
710
714
|
}
|
|
711
715
|
} catch (e) {
|
|
712
|
-
|
|
713
|
-
return this.
|
|
716
|
+
T.PlatformTools.logCmdErr("Error during migration generation:", e);
|
|
717
|
+
return this.#e.exit(1);
|
|
714
718
|
}
|
|
715
719
|
}
|
|
716
720
|
static queryParams(e) {
|
|
@@ -720,24 +724,22 @@ exports.GenerateMigration = Ue = class GenerateMigration extends t.Provider {
|
|
|
720
724
|
return `, ${JSON.stringify(e)}`;
|
|
721
725
|
}
|
|
722
726
|
static getTemplate(e, t, r, i) {
|
|
723
|
-
const n = `${
|
|
727
|
+
const n = `${M.camelCase(e, true)}${t}`;
|
|
724
728
|
return `import { MigrationInterface, QueryRunner } from "lakutata/orm";\n\nexport class ${n} implements MigrationInterface {\n name = '${n}'\n\n public async up(queryRunner: QueryRunner): Promise<void> {\n${r.join(`\n`)}\n }\n\n public async down(queryRunner: QueryRunner): Promise<void> {\n${i.join(`\n`)}\n }\n\n}\n`;
|
|
725
729
|
}
|
|
726
730
|
static getJavascriptTemplate(e, t, r, i, n) {
|
|
727
|
-
const a = `${
|
|
728
|
-
const
|
|
729
|
-
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${
|
|
731
|
+
const a = `${M.camelCase(e, true)}${t}`;
|
|
732
|
+
const o = n ? "export" : "module.exports =";
|
|
733
|
+
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${o} class ${a} {\n name = '${a}'\n\n /**\n * @param {QueryRunner} queryRunner\n */\n async up(queryRunner) {\n${r.join(`\n`)}\n }\n\n /**\n * @param {QueryRunner} queryRunner\n */\n async down(queryRunner) {\n${i.join(`\n`)}\n }\n}\n`;
|
|
730
734
|
}
|
|
731
735
|
static prettifyQuery(e) {
|
|
732
|
-
const t =
|
|
736
|
+
const t = D.format(e, {
|
|
733
737
|
indent: " "
|
|
734
738
|
});
|
|
735
739
|
return "\n" + t.replace(/^/gm, " ") + "\n ";
|
|
736
740
|
}
|
|
737
741
|
};
|
|
738
742
|
|
|
739
|
-
e.__decorate([ A.Inject(exports.Application), e.__metadata("design:type", exports.Application) ], exports.GenerateMigration.prototype, "app", void 0);
|
|
740
|
-
|
|
741
743
|
e.__decorate([ r.Configurable(i.DTO.String().required()), e.__metadata("design:type", String) ], exports.GenerateMigration.prototype, "path", void 0);
|
|
742
744
|
|
|
743
745
|
e.__decorate([ r.Configurable(i.DTO.String().allow("").optional().default("")), e.__metadata("design:type", String) ], exports.GenerateMigration.prototype, "dataSourceName", void 0);
|
|
@@ -758,4 +760,6 @@ e.__decorate([ r.Configurable(i.DTO.Number().optional().default((() => Date.now(
|
|
|
758
760
|
|
|
759
761
|
e.__decorate([ r.Configurable(i.DTO.Boolean().optional().default(true)), e.__metadata("design:type", Boolean) ], exports.GenerateMigration.prototype, "exitProcess", void 0);
|
|
760
762
|
|
|
761
|
-
exports.GenerateMigration =
|
|
763
|
+
exports.GenerateMigration = Qe = e.__decorate([ p.Transient() ], exports.GenerateMigration);
|
|
764
|
+
|
|
765
|
+
exports.Application = Application;
|