lakutata 2.0.56 → 2.0.58
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 +2 -2
- package/com/database.mjs +2 -0
- package/com/entrypoint.cjs +2 -0
- package/com/entrypoint.d.ts +1 -1
- package/com/entrypoint.mjs +2 -0
- package/decorator/ctrl.d.ts +8 -1
- package/decorator/orm.cjs +88 -86
- package/decorator/orm.d.ts +74 -50
- package/decorator/orm.mjs +46 -44
- package/lakutata.cjs +6 -4
- package/lakutata.mjs +2 -0
- package/orm.cjs +112 -1075
- package/orm.d.ts +5 -5
- package/orm.mjs +17 -1015
- package/package.json +1 -1
- package/provider/database.cjs +2 -0
- package/provider/database.d.ts +2 -2
- package/provider/database.mjs +2 -0
- package/src/components/Database.cjs +2 -0
- package/src/components/Database.mjs +2 -0
- package/src/components/entrypoint/Entrypoint.cjs +853 -742
- package/src/components/entrypoint/Entrypoint.mjs +822 -711
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.cjs +34 -0
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.mjs +28 -0
- package/src/decorators/orm/AfterInsert.cjs +7 -27
- package/src/decorators/orm/AfterInsert.mjs +6 -28
- package/src/decorators/orm/AfterLoad.cjs +7 -27
- package/src/decorators/orm/AfterLoad.mjs +6 -28
- package/src/decorators/orm/AfterRecover.cjs +7 -27
- package/src/decorators/orm/AfterRecover.mjs +6 -28
- package/src/decorators/orm/AfterRemove.cjs +7 -27
- package/src/decorators/orm/AfterRemove.mjs +6 -28
- package/src/decorators/orm/AfterSoftRemove.cjs +7 -27
- package/src/decorators/orm/AfterSoftRemove.mjs +6 -28
- package/src/decorators/orm/AfterUpdate.cjs +7 -27
- package/src/decorators/orm/AfterUpdate.mjs +6 -28
- package/src/decorators/orm/BeforeInsert.cjs +7 -27
- package/src/decorators/orm/BeforeInsert.mjs +6 -28
- package/src/decorators/orm/BeforeRecover.cjs +7 -27
- package/src/decorators/orm/BeforeRecover.mjs +6 -28
- package/src/decorators/orm/BeforeRemove.cjs +7 -27
- package/src/decorators/orm/BeforeRemove.mjs +6 -28
- package/src/decorators/orm/BeforeSoftRemove.cjs +7 -27
- package/src/decorators/orm/BeforeSoftRemove.mjs +6 -28
- package/src/decorators/orm/BeforeUpdate.cjs +7 -27
- package/src/decorators/orm/BeforeUpdate.mjs +6 -28
- package/src/decorators/orm/Check.cjs +7 -30
- package/src/decorators/orm/Check.mjs +6 -31
- package/src/decorators/orm/ChildEntity.cjs +7 -30
- package/src/decorators/orm/ChildEntity.mjs +6 -31
- package/src/decorators/orm/Column.cjs +7 -62
- package/src/decorators/orm/Column.mjs +6 -63
- package/src/decorators/orm/CreateDateColumn.cjs +7 -26
- package/src/decorators/orm/CreateDateColumn.mjs +6 -27
- package/src/decorators/orm/DeleteDateColumn.cjs +7 -26
- package/src/decorators/orm/DeleteDateColumn.mjs +6 -27
- package/src/decorators/orm/Entity.cjs +7 -36
- package/src/decorators/orm/Entity.mjs +6 -37
- package/src/decorators/orm/EventSubscriber.cjs +7 -23
- package/src/decorators/orm/EventSubscriber.mjs +6 -24
- package/src/decorators/orm/Exclusion.cjs +7 -30
- package/src/decorators/orm/Exclusion.mjs +6 -31
- package/src/decorators/orm/Generated.cjs +7 -25
- package/src/decorators/orm/Generated.mjs +6 -26
- package/src/decorators/orm/Index.cjs +7 -42
- package/src/decorators/orm/Index.mjs +6 -43
- package/src/decorators/orm/JoinColumn.cjs +7 -30
- package/src/decorators/orm/JoinColumn.mjs +6 -31
- package/src/decorators/orm/JoinTable.cjs +7 -31
- package/src/decorators/orm/JoinTable.mjs +6 -32
- package/src/decorators/orm/ManyToMany.cjs +7 -43
- package/src/decorators/orm/ManyToMany.mjs +6 -44
- package/src/decorators/orm/ManyToOne.cjs +7 -43
- package/src/decorators/orm/ManyToOne.mjs +6 -44
- package/src/decorators/orm/ObjectIdColumn.cjs +7 -29
- package/src/decorators/orm/ObjectIdColumn.mjs +6 -30
- package/src/decorators/orm/OneToMany.cjs +7 -35
- package/src/decorators/orm/OneToMany.mjs +6 -36
- package/src/decorators/orm/OneToOne.cjs +7 -43
- package/src/decorators/orm/OneToOne.mjs +6 -44
- package/src/decorators/orm/PrimaryColumn.cjs +7 -50
- package/src/decorators/orm/PrimaryColumn.mjs +6 -51
- package/src/decorators/orm/PrimaryGeneratedColumn.cjs +7 -55
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +6 -56
- package/src/decorators/orm/RelationId.cjs +7 -27
- package/src/decorators/orm/RelationId.mjs +6 -28
- package/src/decorators/orm/TableInheritance.cjs +7 -27
- package/src/decorators/orm/TableInheritance.mjs +6 -28
- package/src/decorators/orm/Tree.cjs +7 -25
- package/src/decorators/orm/Tree.mjs +6 -26
- package/src/decorators/orm/TreeChildren.cjs +7 -32
- package/src/decorators/orm/TreeChildren.mjs +6 -33
- package/src/decorators/orm/TreeLevelColumn.cjs +7 -26
- package/src/decorators/orm/TreeLevelColumn.mjs +6 -27
- package/src/decorators/orm/TreeParent.cjs +7 -32
- package/src/decorators/orm/TreeParent.mjs +6 -33
- package/src/decorators/orm/Unique.cjs +7 -45
- package/src/decorators/orm/Unique.mjs +6 -46
- package/src/decorators/orm/UpdateDateColumn.cjs +7 -26
- package/src/decorators/orm/UpdateDateColumn.mjs +6 -27
- package/src/decorators/orm/VersionColumn.cjs +7 -26
- package/src/decorators/orm/VersionColumn.mjs +6 -27
- package/src/decorators/orm/ViewColumn.cjs +7 -26
- package/src/decorators/orm/ViewColumn.mjs +6 -27
- package/src/decorators/orm/ViewEntity.cjs +7 -35
- package/src/decorators/orm/ViewEntity.mjs +6 -36
- package/src/decorators/orm/VirtualColumn.cjs +7 -43
- package/src/decorators/orm/VirtualColumn.mjs +6 -44
- package/src/lib/core/Application.cjs +9 -7
- package/src/lib/core/Application.mjs +19 -17
- package/src/providers/Database.cjs +2 -0
- package/src/providers/Database.mjs +2 -0
- package/vendor/Package.122.cjs +19932 -14856
- package/vendor/Package.122.mjs +32675 -27699
- package/vendor/Package.19.cjs +1 -1
- package/vendor/Package.19.mjs +1 -1
- package/vendor/Package.6.cjs +1 -1
- package/vendor/Package.6.mjs +1 -1
- package/vendor/TypeDef.13.d.ts +61 -6
- package/vendor/TypeDef.4.d.ts +347 -181
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, Symbol.toStringTag, {
|
|
|
4
4
|
value: "Module"
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
require("../../../vendor/Package.5.cjs");
|
|
8
|
-
|
|
9
7
|
const e = require("../../../vendor/Package.122.cjs");
|
|
10
8
|
|
|
9
|
+
require("../../../vendor/Package.5.cjs");
|
|
10
|
+
|
|
11
11
|
require("../../../vendor/Package.13.cjs");
|
|
12
12
|
|
|
13
13
|
require("../../../vendor/Package.1.cjs");
|
|
@@ -52,6 +52,10 @@ require("../../../vendor/Package.11.cjs");
|
|
|
52
52
|
|
|
53
53
|
require("url");
|
|
54
54
|
|
|
55
|
+
require("node:util");
|
|
56
|
+
|
|
57
|
+
require("../../../vendor/Package.4.cjs");
|
|
58
|
+
|
|
55
59
|
require("../../../vendor/Package.63.cjs");
|
|
56
60
|
|
|
57
61
|
require("node:url");
|
|
@@ -68,44 +72,4 @@ require("node:stream");
|
|
|
68
72
|
|
|
69
73
|
require("node:string_decoder");
|
|
70
74
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"use strict";
|
|
74
|
-
|
|
75
|
-
Object.defineProperty(r, "__esModule", {
|
|
76
|
-
value: true
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
var t = r.VirtualColumn = i;
|
|
80
|
-
|
|
81
|
-
const o = e.error;
|
|
82
|
-
|
|
83
|
-
const u = e.requireGlobals();
|
|
84
|
-
|
|
85
|
-
function i(e, r) {
|
|
86
|
-
return function(t, i) {
|
|
87
|
-
let n;
|
|
88
|
-
if (typeof e === "string") {
|
|
89
|
-
n = e;
|
|
90
|
-
} else {
|
|
91
|
-
r = e;
|
|
92
|
-
n = r.type;
|
|
93
|
-
}
|
|
94
|
-
if (!r?.query) {
|
|
95
|
-
throw new Error("Column options must be defined for calculated columns.");
|
|
96
|
-
}
|
|
97
|
-
const s = Reflect && Reflect.getMetadata ? Reflect.getMetadata("design:type", t, i) : undefined;
|
|
98
|
-
if (!n && s) n = s;
|
|
99
|
-
if (n) r.type = n;
|
|
100
|
-
if (r.type === "hstore" && !r.hstoreType) r.hstoreType = s === Object ? "object" : "string";
|
|
101
|
-
if (!r.type) throw new o.ColumnTypeUndefinedError(t, i);
|
|
102
|
-
(0, u.getMetadataArgsStorage)().columns.push({
|
|
103
|
-
target: t.constructor,
|
|
104
|
-
propertyName: i,
|
|
105
|
-
mode: "virtual-property",
|
|
106
|
-
options: r || {}
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
exports.VirtualColumn = t;
|
|
75
|
+
exports.VirtualColumn = e.VirtualColumn_2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
export { H as VirtualColumn } from "../../../vendor/Package.122.mjs";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import "../../../vendor/Package.5.mjs";
|
|
4
4
|
|
|
5
5
|
import "../../../vendor/Package.13.mjs";
|
|
6
6
|
|
|
@@ -46,6 +46,10 @@ import "../../../vendor/Package.11.mjs";
|
|
|
46
46
|
|
|
47
47
|
import "url";
|
|
48
48
|
|
|
49
|
+
import "node:util";
|
|
50
|
+
|
|
51
|
+
import "../../../vendor/Package.4.mjs";
|
|
52
|
+
|
|
49
53
|
import "../../../vendor/Package.63.mjs";
|
|
50
54
|
|
|
51
55
|
import "node:url";
|
|
@@ -61,45 +65,3 @@ import "node:events";
|
|
|
61
65
|
import "node:stream";
|
|
62
66
|
|
|
63
67
|
import "node:string_decoder";
|
|
64
|
-
|
|
65
|
-
var o = {};
|
|
66
|
-
|
|
67
|
-
"use strict";
|
|
68
|
-
|
|
69
|
-
Object.defineProperty(o, "__esModule", {
|
|
70
|
-
value: true
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
var r = o.VirtualColumn = p;
|
|
74
|
-
|
|
75
|
-
const m = e;
|
|
76
|
-
|
|
77
|
-
const i = t();
|
|
78
|
-
|
|
79
|
-
function p(e, t) {
|
|
80
|
-
return function(o, r) {
|
|
81
|
-
let p;
|
|
82
|
-
if (typeof e === "string") {
|
|
83
|
-
p = e;
|
|
84
|
-
} else {
|
|
85
|
-
t = e;
|
|
86
|
-
p = t.type;
|
|
87
|
-
}
|
|
88
|
-
if (!t?.query) {
|
|
89
|
-
throw new Error("Column options must be defined for calculated columns.");
|
|
90
|
-
}
|
|
91
|
-
const a = Reflect && Reflect.getMetadata ? Reflect.getMetadata("design:type", o, r) : undefined;
|
|
92
|
-
if (!p && a) p = a;
|
|
93
|
-
if (p) t.type = p;
|
|
94
|
-
if (t.type === "hstore" && !t.hstoreType) t.hstoreType = a === Object ? "object" : "string";
|
|
95
|
-
if (!t.type) throw new m.ColumnTypeUndefinedError(o, r);
|
|
96
|
-
(0, i.getMetadataArgsStorage)().columns.push({
|
|
97
|
-
target: o.constructor,
|
|
98
|
-
propertyName: r,
|
|
99
|
-
mode: "virtual-property",
|
|
100
|
-
options: t || {}
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export { r as VirtualColumn };
|
|
@@ -12,9 +12,9 @@ const r = require("../../decorators/di/Lifetime.cjs");
|
|
|
12
12
|
|
|
13
13
|
const i = require("../../../vendor/Package.3.cjs");
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const n = require("../base/internal/ApplicationConfigLoader.cjs");
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const s = require("../../options/ApplicationOptions.cjs");
|
|
18
18
|
|
|
19
19
|
const c = require("./Alias.cjs");
|
|
20
20
|
|
|
@@ -250,6 +250,8 @@ require("../../components/entrypoint/exceptions/AccessDenyException.cjs");
|
|
|
250
250
|
|
|
251
251
|
require("../../components/entrypoint/lib/AccessControlRule.cjs");
|
|
252
252
|
|
|
253
|
+
require("../../components/entrypoint/exceptions/InvalidActionGroupException.cjs");
|
|
254
|
+
|
|
253
255
|
require("worker_threads");
|
|
254
256
|
|
|
255
257
|
require("../../../vendor/Package.132.cjs");
|
|
@@ -290,7 +292,7 @@ exports.ApplicationState = void 0;
|
|
|
290
292
|
exports.Application = class Application extends t.Module {
|
|
291
293
|
constructor() {
|
|
292
294
|
super(...arguments);
|
|
293
|
-
this.ConfigLoader =
|
|
295
|
+
this.ConfigLoader = n.ApplicationConfigLoader;
|
|
294
296
|
this.options = {
|
|
295
297
|
components: {
|
|
296
298
|
log: {
|
|
@@ -390,7 +392,7 @@ exports.Application = class Application extends t.Module {
|
|
|
390
392
|
this.eventEmitter.once("exit", (async (e, t) => {
|
|
391
393
|
try {
|
|
392
394
|
await this.eventEmitter.emitRequest(exports.ApplicationState.Done, e);
|
|
393
|
-
await
|
|
395
|
+
await n.destroy();
|
|
394
396
|
process.exit(t ? t : 0);
|
|
395
397
|
} catch (e) {
|
|
396
398
|
process.exit(1);
|
|
@@ -413,9 +415,9 @@ exports.Application = class Application extends t.Module {
|
|
|
413
415
|
}));
|
|
414
416
|
}));
|
|
415
417
|
const r = typeof this.launchOptions === "object" ? this.launchOptions : await this.launchOptions();
|
|
416
|
-
const
|
|
418
|
+
const n = new i.Container;
|
|
417
419
|
return new Promise(((e, i) => {
|
|
418
|
-
|
|
420
|
+
s.ApplicationOptions.validateAsync(r).then((r => {
|
|
419
421
|
r.bootstrap?.push((async e => {
|
|
420
422
|
const t = function() {
|
|
421
423
|
this.options.bootstrap?.pop();
|
|
@@ -424,7 +426,7 @@ exports.Application = class Application extends t.Module {
|
|
|
424
426
|
t.bind(h.As(e))();
|
|
425
427
|
this.eventEmitter.emit(exports.ApplicationState.Launched, h.As(e));
|
|
426
428
|
}));
|
|
427
|
-
|
|
429
|
+
n.set(b, {
|
|
428
430
|
options: r
|
|
429
431
|
}).then((r => r.once(t.MODULE_INITIALIZED, (() => e(r))).once(t.MODULE_INITIALIZE_ERROR, (e => this.processFatalException(e))))).catch(i);
|
|
430
432
|
})).catch(i);
|
|
@@ -244,6 +244,8 @@ import "../../components/entrypoint/exceptions/AccessDenyException.mjs";
|
|
|
244
244
|
|
|
245
245
|
import "../../components/entrypoint/lib/AccessControlRule.mjs";
|
|
246
246
|
|
|
247
|
+
import "../../components/entrypoint/exceptions/InvalidActionGroupException.mjs";
|
|
248
|
+
|
|
247
249
|
import "worker_threads";
|
|
248
250
|
|
|
249
251
|
import "../../../vendor/Package.132.mjs";
|
|
@@ -264,16 +266,16 @@ import "string_decoder";
|
|
|
264
266
|
|
|
265
267
|
import "node:stream";
|
|
266
268
|
|
|
267
|
-
var f;
|
|
268
|
-
|
|
269
269
|
var y;
|
|
270
270
|
|
|
271
|
+
var f;
|
|
272
|
+
|
|
271
273
|
(function(t) {
|
|
272
274
|
t["Launched"] = "LAUNCHED";
|
|
273
275
|
t["Done"] = "DONE";
|
|
274
276
|
t["UncaughtException"] = "UNCAUGHT_EXCEPTION";
|
|
275
277
|
t["FatalException"] = "FATAL_EXCEPTION";
|
|
276
|
-
})(
|
|
278
|
+
})(f || (f = {}));
|
|
277
279
|
|
|
278
280
|
let v = class Application extends o {
|
|
279
281
|
constructor() {
|
|
@@ -292,7 +294,7 @@ let v = class Application extends o {
|
|
|
292
294
|
};
|
|
293
295
|
}
|
|
294
296
|
static {
|
|
295
|
-
|
|
297
|
+
y = this;
|
|
296
298
|
}
|
|
297
299
|
static {
|
|
298
300
|
this.eventEmitter = new E;
|
|
@@ -318,22 +320,22 @@ let v = class Application extends o {
|
|
|
318
320
|
return this.launch();
|
|
319
321
|
}
|
|
320
322
|
static onLaunched(t) {
|
|
321
|
-
this.eventEmitter.once(
|
|
323
|
+
this.eventEmitter.once(f.Launched, (async e => t(e, await e.getObject("log"))));
|
|
322
324
|
return this.launch();
|
|
323
325
|
}
|
|
324
326
|
static onDone(t) {
|
|
325
|
-
this.eventEmitter.once(
|
|
327
|
+
this.eventEmitter.once(f.Done, (async e => t(e, await e.getObject("log"))));
|
|
326
328
|
return this.launch();
|
|
327
329
|
}
|
|
328
330
|
static onUncaughtException(t) {
|
|
329
|
-
this.eventEmitter.on(
|
|
331
|
+
this.eventEmitter.on(f.UncaughtException, (async e => {
|
|
330
332
|
const o = await this.getLogger();
|
|
331
333
|
await t(e, o);
|
|
332
334
|
}));
|
|
333
335
|
return this.launch();
|
|
334
336
|
}
|
|
335
337
|
static onFatalException(t) {
|
|
336
|
-
this.eventEmitter.once(
|
|
338
|
+
this.eventEmitter.once(f.FatalException, (async e => {
|
|
337
339
|
const o = await this.getLogger();
|
|
338
340
|
let i = await t(e, o);
|
|
339
341
|
if (typeof i !== "number") i = 1;
|
|
@@ -349,7 +351,7 @@ let v = class Application extends o {
|
|
|
349
351
|
if (this.launchTimeout) clearTimeout(this.launchTimeout);
|
|
350
352
|
this.launchTimeout = setTimeout((async () => {
|
|
351
353
|
process.on("uncaughtException", (async t => {
|
|
352
|
-
if (this.eventEmitter.listenerCount(
|
|
354
|
+
if (this.eventEmitter.listenerCount(f.UncaughtException)) return this.eventEmitter.emit(f.UncaughtException, t);
|
|
353
355
|
const e = await this.getLogger();
|
|
354
356
|
return e.warn(new Error("UncaughtException", {
|
|
355
357
|
cause: t
|
|
@@ -364,7 +366,7 @@ let v = class Application extends o {
|
|
|
364
366
|
return this;
|
|
365
367
|
}
|
|
366
368
|
static processFatalException(t) {
|
|
367
|
-
if (!this.eventEmitter.listenerCount(
|
|
369
|
+
if (!this.eventEmitter.listenerCount(f.FatalException)) {
|
|
368
370
|
return process.nextTick((async () => {
|
|
369
371
|
const e = await this.getLogger();
|
|
370
372
|
e.error(new Error("FatalException", {
|
|
@@ -372,12 +374,12 @@ let v = class Application extends o {
|
|
|
372
374
|
}));
|
|
373
375
|
}));
|
|
374
376
|
}
|
|
375
|
-
this.eventEmitter.emit(
|
|
377
|
+
this.eventEmitter.emit(f.FatalException, t);
|
|
376
378
|
}
|
|
377
379
|
static async launchApplication() {
|
|
378
380
|
this.eventEmitter.once("exit", (async (t, e) => {
|
|
379
381
|
try {
|
|
380
|
-
await this.eventEmitter.emitRequest(
|
|
382
|
+
await this.eventEmitter.emitRequest(f.Done, t);
|
|
381
383
|
await o.destroy();
|
|
382
384
|
process.exit(e ? e : 0);
|
|
383
385
|
} catch (t) {
|
|
@@ -410,9 +412,9 @@ let v = class Application extends o {
|
|
|
410
412
|
x(Reflect.getOwnMetadata("#bootstrap", this))?.pop();
|
|
411
413
|
};
|
|
412
414
|
e.bind(x(t))();
|
|
413
|
-
this.eventEmitter.emit(
|
|
415
|
+
this.eventEmitter.emit(f.Launched, x(t));
|
|
414
416
|
}));
|
|
415
|
-
o.set(
|
|
417
|
+
o.set(y, {
|
|
416
418
|
options: e
|
|
417
419
|
}).then((e => e.once(i, (() => t(e))).once(s, (t => this.processFatalException(t))))).catch(r);
|
|
418
420
|
})).catch(r);
|
|
@@ -437,7 +439,7 @@ let v = class Application extends o {
|
|
|
437
439
|
if (typeof t === "boolean" && t) {
|
|
438
440
|
return process.exit(2);
|
|
439
441
|
} else {
|
|
440
|
-
|
|
442
|
+
y.eventEmitter.emit("exit", this, t ? t : 0);
|
|
441
443
|
}
|
|
442
444
|
}
|
|
443
445
|
};
|
|
@@ -446,6 +448,6 @@ t([ h(u.Object().pattern(u.String(), u.String()).required()), e("design:type", F
|
|
|
446
448
|
|
|
447
449
|
t([ h(u.Object().pattern(u.String(), u.String()).required(), u.Boolean().optional().default(false)), e("design:type", Function), e("design:paramtypes", [ Object, Boolean ]), e("design:returntype", Object) ], v, "alias", null);
|
|
448
450
|
|
|
449
|
-
v =
|
|
451
|
+
v = y = t([ r(true) ], v);
|
|
450
452
|
|
|
451
|
-
export { v as Application,
|
|
453
|
+
export { v as Application, f as ApplicationState };
|