lakutata 2.0.76 → 2.0.77
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/database.cjs +2 -0
- package/com/database.d.ts +1 -0
- package/com/database.mjs +2 -0
- package/lakutata.cjs +48 -24
- package/lakutata.mjs +24 -0
- package/orm.mjs +216 -216
- package/package.json +1 -1
- package/provider/database.cjs +2 -0
- package/provider/database.d.ts +1 -0
- package/provider/database.mjs +2 -0
- package/src/components/Database.cjs +11 -6
- package/src/components/Database.mjs +11 -6
- package/src/decorators/orm/AfterInsert.mjs +1 -1
- package/src/decorators/orm/AfterLoad.mjs +3 -3
- package/src/decorators/orm/AfterRecover.mjs +1 -1
- package/src/decorators/orm/AfterRemove.mjs +1 -1
- package/src/decorators/orm/AfterSoftRemove.mjs +1 -1
- package/src/decorators/orm/AfterUpdate.mjs +3 -3
- package/src/decorators/orm/BeforeInsert.mjs +1 -1
- package/src/decorators/orm/BeforeRecover.mjs +1 -1
- package/src/decorators/orm/BeforeRemove.mjs +1 -1
- package/src/decorators/orm/BeforeSoftRemove.mjs +1 -1
- package/src/decorators/orm/BeforeUpdate.mjs +3 -3
- package/src/decorators/orm/Check.mjs +1 -1
- package/src/decorators/orm/ChildEntity.mjs +1 -1
- package/src/decorators/orm/Column.mjs +1 -1
- package/src/decorators/orm/CreateDateColumn.mjs +1 -1
- package/src/decorators/orm/DeleteDateColumn.mjs +1 -1
- package/src/decorators/orm/Entity.mjs +1 -1
- package/src/decorators/orm/EventSubscriber.mjs +1 -1
- package/src/decorators/orm/Exclusion.mjs +1 -1
- package/src/decorators/orm/Generated.mjs +1 -1
- package/src/decorators/orm/Index.mjs +1 -1
- package/src/decorators/orm/JoinColumn.mjs +1 -1
- package/src/decorators/orm/JoinTable.mjs +1 -1
- package/src/decorators/orm/ManyToMany.mjs +1 -1
- package/src/decorators/orm/ManyToOne.mjs +1 -1
- package/src/decorators/orm/ObjectIdColumn.mjs +1 -1
- package/src/decorators/orm/OneToMany.mjs +1 -1
- package/src/decorators/orm/OneToOne.mjs +8 -8
- package/src/decorators/orm/PrimaryColumn.mjs +1 -1
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +1 -1
- package/src/decorators/orm/RelationId.mjs +1 -1
- package/src/decorators/orm/TableInheritance.mjs +1 -1
- package/src/decorators/orm/Tree.mjs +1 -1
- package/src/decorators/orm/TreeChildren.mjs +6 -6
- package/src/decorators/orm/TreeLevelColumn.mjs +1 -1
- package/src/decorators/orm/TreeParent.mjs +1 -1
- package/src/decorators/orm/Unique.mjs +1 -1
- package/src/decorators/orm/UpdateDateColumn.mjs +1 -1
- package/src/decorators/orm/VersionColumn.mjs +1 -1
- package/src/decorators/orm/ViewColumn.mjs +1 -1
- package/src/decorators/orm/ViewEntity.mjs +1 -1
- package/src/decorators/orm/VirtualColumn.mjs +1 -1
- package/src/lib/base/internal/DatabaseSymbol.cjs +9 -0
- package/src/lib/base/internal/DatabaseSymbol.mjs +3 -0
- package/src/lib/core/Application.cjs +87 -26
- package/src/lib/core/Application.mjs +83 -22
- package/src/providers/Database.cjs +7 -2
- package/src/providers/Database.mjs +12 -7
- package/src/providers/migration/GenerateMigration.cjs +426 -0
- package/src/providers/migration/GenerateMigration.mjs +414 -0
- package/vendor/Package.102.cjs +4689 -4747
- package/vendor/Package.102.mjs +4506 -4576
- package/vendor/Package.17.cjs +195 -184
- package/vendor/Package.17.mjs +187 -176
package/package.json
CHANGED
package/provider/database.cjs
CHANGED
|
@@ -190,6 +190,8 @@ require("../src/exceptions/dto/InvalidMethodReturnException.cjs");
|
|
|
190
190
|
|
|
191
191
|
require("../src/lib/helpers/IsEmptyObject.cjs");
|
|
192
192
|
|
|
193
|
+
require("../src/lib/base/internal/DatabaseSymbol.cjs");
|
|
194
|
+
|
|
193
195
|
exports.BuildDatabaseOptions = e.BuildDatabaseOptions;
|
|
194
196
|
|
|
195
197
|
Object.defineProperty(exports, "Database", {
|
package/provider/database.d.ts
CHANGED
package/provider/database.mjs
CHANGED
|
@@ -10,9 +10,11 @@ const r = require("../decorators/di/Configurable.cjs");
|
|
|
10
10
|
|
|
11
11
|
const t = require("../lib/core/Component.cjs");
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const a = require("../decorators/di/Lifetime.cjs");
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const i = require("../../vendor/Package.10.cjs");
|
|
16
|
+
|
|
17
|
+
const s = require("../lib/base/internal/DatabaseSymbol.cjs");
|
|
16
18
|
|
|
17
19
|
require("../lib/base/internal/ObjectConfiguration.cjs");
|
|
18
20
|
|
|
@@ -192,12 +194,15 @@ require("node:stream");
|
|
|
192
194
|
|
|
193
195
|
require("node:string_decoder");
|
|
194
196
|
|
|
195
|
-
const
|
|
197
|
+
const o = e => ({
|
|
196
198
|
class: exports.Database,
|
|
197
199
|
options: e
|
|
198
200
|
});
|
|
199
201
|
|
|
200
202
|
exports.Database = class Database extends t.Component {
|
|
203
|
+
static {
|
|
204
|
+
this.databaseSymbol = s.DatabaseSymbol;
|
|
205
|
+
}
|
|
201
206
|
#e;
|
|
202
207
|
get datasource() {
|
|
203
208
|
return this.#e;
|
|
@@ -227,7 +232,7 @@ exports.Database = class Database extends t.Component {
|
|
|
227
232
|
return this.datasource.queryResultCache;
|
|
228
233
|
}
|
|
229
234
|
async init() {
|
|
230
|
-
this.#e = await new
|
|
235
|
+
this.#e = await new i.DataSourceExports.DataSource(this.options).initialize();
|
|
231
236
|
}
|
|
232
237
|
async destroy() {
|
|
233
238
|
await this.datasource.destroy();
|
|
@@ -281,6 +286,6 @@ exports.Database = class Database extends t.Component {
|
|
|
281
286
|
|
|
282
287
|
e.__decorate([ r.Configurable(), e.__metadata("design:type", Object) ], exports.Database.prototype, "options", void 0);
|
|
283
288
|
|
|
284
|
-
exports.Database = e.__decorate([
|
|
289
|
+
exports.Database = e.__decorate([ a.Singleton() ], exports.Database);
|
|
285
290
|
|
|
286
|
-
exports.BuildDatabaseOptions =
|
|
291
|
+
exports.BuildDatabaseOptions = o;
|
|
@@ -8,6 +8,8 @@ import { Singleton as o } from "../decorators/di/Lifetime.mjs";
|
|
|
8
8
|
|
|
9
9
|
import { D as a } from "../../vendor/Package.10.mjs";
|
|
10
10
|
|
|
11
|
+
import { DatabaseSymbol as s } from "../lib/base/internal/DatabaseSymbol.mjs";
|
|
12
|
+
|
|
11
13
|
import "../lib/base/internal/ObjectConfiguration.mjs";
|
|
12
14
|
|
|
13
15
|
import "../constants/DIMetadataKey.mjs";
|
|
@@ -186,12 +188,15 @@ import "node:stream";
|
|
|
186
188
|
|
|
187
189
|
import "node:string_decoder";
|
|
188
190
|
|
|
189
|
-
const
|
|
190
|
-
class:
|
|
191
|
+
const n = t => ({
|
|
192
|
+
class: m,
|
|
191
193
|
options: t
|
|
192
194
|
});
|
|
193
195
|
|
|
194
|
-
let
|
|
196
|
+
let m = class Database extends i {
|
|
197
|
+
static {
|
|
198
|
+
this.databaseSymbol = s;
|
|
199
|
+
}
|
|
195
200
|
#t;
|
|
196
201
|
get datasource() {
|
|
197
202
|
return this.#t;
|
|
@@ -273,8 +278,8 @@ let n = class Database extends i {
|
|
|
273
278
|
}
|
|
274
279
|
};
|
|
275
280
|
|
|
276
|
-
t([ r(), e("design:type", Object) ],
|
|
281
|
+
t([ r(), e("design:type", Object) ], m.prototype, "options", void 0);
|
|
277
282
|
|
|
278
|
-
|
|
283
|
+
m = t([ o() ], m);
|
|
279
284
|
|
|
280
|
-
export {
|
|
285
|
+
export { n as BuildDatabaseOptions, m as Database };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../vendor/Package.5.mjs";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { d as r, E as t } from "../../../vendor/Package.102.mjs";
|
|
4
4
|
|
|
5
5
|
import "../../../vendor/Package.12.mjs";
|
|
6
6
|
|
|
@@ -66,13 +66,13 @@ Object.defineProperty(e, "__esModule", {
|
|
|
66
66
|
value: true
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
var o = e.AfterLoad =
|
|
69
|
+
var o = e.AfterLoad = i;
|
|
70
70
|
|
|
71
71
|
const m = r();
|
|
72
72
|
|
|
73
73
|
const p = t;
|
|
74
74
|
|
|
75
|
-
function
|
|
75
|
+
function i() {
|
|
76
76
|
return function(r, t) {
|
|
77
77
|
(0, m.getMetadataArgsStorage)().entityListeners.push({
|
|
78
78
|
target: r.constructor,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../vendor/Package.5.mjs";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { d as r, E as t } from "../../../vendor/Package.102.mjs";
|
|
4
4
|
|
|
5
5
|
import "../../../vendor/Package.12.mjs";
|
|
6
6
|
|
|
@@ -66,13 +66,13 @@ Object.defineProperty(e, "__esModule", {
|
|
|
66
66
|
value: true
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
var o = e.AfterUpdate =
|
|
69
|
+
var o = e.AfterUpdate = i;
|
|
70
70
|
|
|
71
71
|
const m = r();
|
|
72
72
|
|
|
73
73
|
const p = t;
|
|
74
74
|
|
|
75
|
-
function
|
|
75
|
+
function i() {
|
|
76
76
|
return function(r, t) {
|
|
77
77
|
(0, m.getMetadataArgsStorage)().entityListeners.push({
|
|
78
78
|
target: r.constructor,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../vendor/Package.5.mjs";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { d as e, E as r } from "../../../vendor/Package.102.mjs";
|
|
4
4
|
|
|
5
5
|
import "../../../vendor/Package.12.mjs";
|
|
6
6
|
|
|
@@ -66,13 +66,13 @@ Object.defineProperty(t, "__esModule", {
|
|
|
66
66
|
value: true
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
var o = t.BeforeUpdate =
|
|
69
|
+
var o = t.BeforeUpdate = i;
|
|
70
70
|
|
|
71
71
|
const m = e();
|
|
72
72
|
|
|
73
73
|
const p = r;
|
|
74
74
|
|
|
75
|
-
function
|
|
75
|
+
function i() {
|
|
76
76
|
return function(e, r) {
|
|
77
77
|
(0, m.getMetadataArgsStorage)().entityListeners.push({
|
|
78
78
|
target: e.constructor,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../vendor/Package.5.mjs";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { d as e, O as t } from "../../../vendor/Package.102.mjs";
|
|
4
4
|
|
|
5
5
|
import "../../../vendor/Package.12.mjs";
|
|
6
6
|
|
|
@@ -68,27 +68,27 @@ Object.defineProperty(o, "__esModule", {
|
|
|
68
68
|
|
|
69
69
|
var r = o.OneToOne = m;
|
|
70
70
|
|
|
71
|
-
const
|
|
71
|
+
const i = e();
|
|
72
72
|
|
|
73
|
-
const
|
|
73
|
+
const a = t;
|
|
74
74
|
|
|
75
75
|
function m(e, t, o) {
|
|
76
76
|
let r;
|
|
77
|
-
if (
|
|
77
|
+
if (a.ObjectUtils.isObject(t)) {
|
|
78
78
|
o = t;
|
|
79
79
|
} else {
|
|
80
80
|
r = t;
|
|
81
81
|
}
|
|
82
|
-
return function(t,
|
|
82
|
+
return function(t, a) {
|
|
83
83
|
if (!o) o = {};
|
|
84
84
|
let m = o && o.lazy === true ? true : false;
|
|
85
85
|
if (!m && Reflect && Reflect.getMetadata) {
|
|
86
|
-
const e = Reflect.getMetadata("design:type", t,
|
|
86
|
+
const e = Reflect.getMetadata("design:type", t, a);
|
|
87
87
|
if (e && typeof e.name === "string" && e.name.toLowerCase() === "promise") m = true;
|
|
88
88
|
}
|
|
89
|
-
(0,
|
|
89
|
+
(0, i.getMetadataArgsStorage)().relations.push({
|
|
90
90
|
target: t.constructor,
|
|
91
|
-
propertyName:
|
|
91
|
+
propertyName: a,
|
|
92
92
|
isLazy: m,
|
|
93
93
|
relationType: "one-to-one",
|
|
94
94
|
type: e,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../vendor/Package.5.mjs";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { d as e } from "../../../vendor/Package.102.mjs";
|
|
4
4
|
|
|
5
5
|
import "../../../vendor/Package.12.mjs";
|
|
6
6
|
|
|
@@ -66,20 +66,20 @@ Object.defineProperty(t, "__esModule", {
|
|
|
66
66
|
value: true
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
var r = t.TreeChildren =
|
|
69
|
+
var r = t.TreeChildren = m;
|
|
70
70
|
|
|
71
71
|
const o = e();
|
|
72
72
|
|
|
73
|
-
function
|
|
73
|
+
function m(e) {
|
|
74
74
|
return function(t, r) {
|
|
75
75
|
if (!e) e = {};
|
|
76
|
-
const
|
|
77
|
-
const
|
|
76
|
+
const m = Reflect && Reflect.getMetadata ? Reflect.getMetadata("design:type", t, r) : undefined;
|
|
77
|
+
const a = m && typeof m.name === "string" && m.name.toLowerCase() === "promise" || false;
|
|
78
78
|
(0, o.getMetadataArgsStorage)().relations.push({
|
|
79
79
|
isTreeChildren: true,
|
|
80
80
|
target: t.constructor,
|
|
81
81
|
propertyName: r,
|
|
82
|
-
isLazy:
|
|
82
|
+
isLazy: a,
|
|
83
83
|
relationType: "one-to-many",
|
|
84
84
|
type: () => t.constructor,
|
|
85
85
|
options: e
|