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
|
@@ -12,13 +12,13 @@ const r = require("../../decorators/di/Lifetime.cjs");
|
|
|
12
12
|
|
|
13
13
|
const i = require("../../../vendor/Package.3.cjs");
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const s = require("../base/internal/ApplicationConfigLoader.cjs");
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const n = require("../../options/ApplicationOptions.cjs");
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const o = require("./Alias.cjs");
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const c = require("../base/internal/BasicInfo.cjs");
|
|
22
22
|
|
|
23
23
|
const a = require("../../components/entrypoint/Entrypoint.cjs");
|
|
24
24
|
|
|
@@ -30,13 +30,17 @@ const l = require("../../../vendor/Package.2.cjs");
|
|
|
30
30
|
|
|
31
31
|
const j = require("fs");
|
|
32
32
|
|
|
33
|
-
const
|
|
33
|
+
const d = require("node:path");
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const q = require("node:fs");
|
|
36
36
|
|
|
37
37
|
const h = require("../helpers/As.cjs");
|
|
38
38
|
|
|
39
|
-
const
|
|
39
|
+
const g = require("../base/EventEmitter.cjs");
|
|
40
|
+
|
|
41
|
+
const x = require("../base/internal/DatabaseSymbol.cjs");
|
|
42
|
+
|
|
43
|
+
const m = require("../../providers/migration/GenerateMigration.cjs");
|
|
40
44
|
|
|
41
45
|
require("./Component.cjs");
|
|
42
46
|
|
|
@@ -270,13 +274,33 @@ require("string_decoder");
|
|
|
270
274
|
|
|
271
275
|
require("node:stream");
|
|
272
276
|
|
|
273
|
-
|
|
277
|
+
require("../../../vendor/Package.10.cjs");
|
|
278
|
+
|
|
279
|
+
require("../../../vendor/Package.102.cjs");
|
|
280
|
+
|
|
281
|
+
require("../../../vendor/Package.12.cjs");
|
|
282
|
+
|
|
283
|
+
require("../../../vendor/Package.62.cjs");
|
|
284
|
+
|
|
285
|
+
require("fs/promises");
|
|
286
|
+
|
|
287
|
+
require("../../../vendor/Package.63.cjs");
|
|
288
|
+
|
|
289
|
+
require("node:url");
|
|
290
|
+
|
|
291
|
+
require("node:fs/promises");
|
|
292
|
+
|
|
293
|
+
require("node:events");
|
|
294
|
+
|
|
295
|
+
require("node:string_decoder");
|
|
296
|
+
|
|
297
|
+
const b = e => e && e.__esModule ? e : {
|
|
274
298
|
default: e
|
|
275
299
|
};
|
|
276
300
|
|
|
277
|
-
const
|
|
301
|
+
const E = b(d);
|
|
278
302
|
|
|
279
|
-
var
|
|
303
|
+
var v;
|
|
280
304
|
|
|
281
305
|
exports.ApplicationState = void 0;
|
|
282
306
|
|
|
@@ -290,7 +314,7 @@ exports.ApplicationState = void 0;
|
|
|
290
314
|
exports.Application = class Application extends t.Module {
|
|
291
315
|
constructor() {
|
|
292
316
|
super(...arguments);
|
|
293
|
-
this.ConfigLoader =
|
|
317
|
+
this.ConfigLoader = s.ApplicationConfigLoader;
|
|
294
318
|
this.options = {
|
|
295
319
|
components: {
|
|
296
320
|
log: {
|
|
@@ -304,10 +328,10 @@ exports.Application = class Application extends t.Module {
|
|
|
304
328
|
};
|
|
305
329
|
}
|
|
306
330
|
static {
|
|
307
|
-
|
|
331
|
+
v = this;
|
|
308
332
|
}
|
|
309
333
|
static {
|
|
310
|
-
this.eventEmitter = new
|
|
334
|
+
this.eventEmitter = new g.EventEmitter;
|
|
311
335
|
}
|
|
312
336
|
static {
|
|
313
337
|
this.environmentVariableMap = new Map;
|
|
@@ -390,14 +414,14 @@ exports.Application = class Application extends t.Module {
|
|
|
390
414
|
this.eventEmitter.once("exit", (async (e, t) => {
|
|
391
415
|
try {
|
|
392
416
|
await this.eventEmitter.emitRequest(exports.ApplicationState.Done, e);
|
|
393
|
-
await
|
|
417
|
+
await s.destroy();
|
|
394
418
|
process.exit(t ? t : 0);
|
|
395
419
|
} catch (e) {
|
|
396
420
|
process.exit(1);
|
|
397
421
|
}
|
|
398
422
|
}));
|
|
399
423
|
this.environmentVariableMap.forEach(((e, t) => process.env[t] = e));
|
|
400
|
-
const e =
|
|
424
|
+
const e = o.Alias.getAliasInstance();
|
|
401
425
|
e.set("@runtime", process.cwd());
|
|
402
426
|
this.aliasDeclarations.forEach((t => {
|
|
403
427
|
const r = t.alias;
|
|
@@ -405,17 +429,54 @@ exports.Application = class Application extends t.Module {
|
|
|
405
429
|
Object.keys(r).forEach((t => {
|
|
406
430
|
e.set(t, r[t]);
|
|
407
431
|
if (i) {
|
|
408
|
-
const e =
|
|
409
|
-
if (!
|
|
432
|
+
const e = E.default.resolve(t);
|
|
433
|
+
if (!q.existsSync(e)) j.mkdirSync(E.default.resolve(t), {
|
|
410
434
|
recursive: true
|
|
411
435
|
});
|
|
412
436
|
}
|
|
413
437
|
}));
|
|
414
438
|
}));
|
|
415
439
|
const r = typeof this.launchOptions === "object" ? this.launchOptions : await this.launchOptions();
|
|
416
|
-
const
|
|
440
|
+
for (const e in process.env) {
|
|
441
|
+
switch (e.toUpperCase()) {
|
|
442
|
+
case "MIGRATION_GENERATE":
|
|
443
|
+
{
|
|
444
|
+
const t = process.env[e];
|
|
445
|
+
const i = e => {
|
|
446
|
+
const t = [];
|
|
447
|
+
for (const r in e) {
|
|
448
|
+
if (e[r] && e[r].class && e[r].class.databaseSymbol && e[r].class.databaseSymbol === x.DatabaseSymbol) {
|
|
449
|
+
const i = e[r].options;
|
|
450
|
+
if (!i) continue;
|
|
451
|
+
Reflect.set(i, "dataSourceName", r);
|
|
452
|
+
t.push(i);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
return t;
|
|
456
|
+
};
|
|
457
|
+
const s = [ ...r.components ? i(r.components) : [], ...r.providers ? i(r.providers) : [] ];
|
|
458
|
+
if (!s.length) process.exit(0);
|
|
459
|
+
r.bootstrap = [];
|
|
460
|
+
s.forEach(((e, i) => {
|
|
461
|
+
const n = `GenerateMigration${i}${Date.now()}`;
|
|
462
|
+
if (!r.providers) r.providers = {};
|
|
463
|
+
r.providers[n] = {
|
|
464
|
+
class: m.GenerateMigration,
|
|
465
|
+
path: t,
|
|
466
|
+
outputJs: false,
|
|
467
|
+
exitProcess: i === s.length - 1,
|
|
468
|
+
dataSourceName: Reflect.get(e, "dataSourceName"),
|
|
469
|
+
dataSource: e
|
|
470
|
+
};
|
|
471
|
+
r.bootstrap.push(n);
|
|
472
|
+
}));
|
|
473
|
+
}
|
|
474
|
+
break;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
const s = new i.Container;
|
|
417
478
|
return new Promise(((e, i) => {
|
|
418
|
-
|
|
479
|
+
n.ApplicationOptions.validateAsync(r).then((r => {
|
|
419
480
|
r.bootstrap?.push((async e => {
|
|
420
481
|
const t = function() {
|
|
421
482
|
this.options.bootstrap?.pop();
|
|
@@ -424,23 +485,23 @@ exports.Application = class Application extends t.Module {
|
|
|
424
485
|
t.bind(h.As(e))();
|
|
425
486
|
this.eventEmitter.emit(exports.ApplicationState.Launched, h.As(e));
|
|
426
487
|
}));
|
|
427
|
-
|
|
488
|
+
s.set(v, {
|
|
428
489
|
options: r
|
|
429
490
|
}).then((r => r.once(t.MODULE_INITIALIZED, (() => e(r))).once(t.MODULE_INITIALIZE_ERROR, (e => this.processFatalException(e))))).catch(i);
|
|
430
491
|
})).catch(i);
|
|
431
492
|
}));
|
|
432
493
|
}
|
|
433
494
|
get alias() {
|
|
434
|
-
return
|
|
495
|
+
return o.Alias.getAliasInstance();
|
|
435
496
|
}
|
|
436
497
|
get appId() {
|
|
437
|
-
return
|
|
498
|
+
return c.GetBasicInfo().appId;
|
|
438
499
|
}
|
|
439
500
|
get appName() {
|
|
440
|
-
return
|
|
501
|
+
return c.GetBasicInfo().appName;
|
|
441
502
|
}
|
|
442
503
|
get timezone() {
|
|
443
|
-
return
|
|
504
|
+
return c.GetBasicInfo().timezone;
|
|
444
505
|
}
|
|
445
506
|
get uptime() {
|
|
446
507
|
return Math.floor(process.uptime());
|
|
@@ -449,7 +510,7 @@ exports.Application = class Application extends t.Module {
|
|
|
449
510
|
if (typeof e === "boolean" && e) {
|
|
450
511
|
return process.exit(2);
|
|
451
512
|
} else {
|
|
452
|
-
|
|
513
|
+
v.eventEmitter.emit("exit", this, e ? e : 0);
|
|
453
514
|
}
|
|
454
515
|
}
|
|
455
516
|
};
|
|
@@ -458,4 +519,4 @@ e.__decorate([ u.Accept(l.DTO.Object().pattern(l.DTO.String(), l.DTO.String()).r
|
|
|
458
519
|
|
|
459
520
|
e.__decorate([ u.Accept(l.DTO.Object().pattern(l.DTO.String(), l.DTO.String()).required(), l.DTO.Boolean().optional().default(false)), e.__metadata("design:type", Function), e.__metadata("design:paramtypes", [ Object, Boolean ]), e.__metadata("design:returntype", Object) ], exports.Application, "alias", null);
|
|
460
521
|
|
|
461
|
-
exports.Application =
|
|
522
|
+
exports.Application = v = e.__decorate([ r.Singleton(true) ], exports.Application);
|
|
@@ -18,11 +18,11 @@ import { Entrypoint as l } from "../../components/entrypoint/Entrypoint.mjs";
|
|
|
18
18
|
|
|
19
19
|
import { L as j } from "../../../vendor/Package.15.mjs";
|
|
20
20
|
|
|
21
|
-
import { Accept as
|
|
21
|
+
import { Accept as d } from "../../decorators/dto/Accept.mjs";
|
|
22
22
|
|
|
23
|
-
import { D as
|
|
23
|
+
import { D as h } from "../../../vendor/Package.2.mjs";
|
|
24
24
|
|
|
25
|
-
import { mkdirSync as
|
|
25
|
+
import { mkdirSync as u } from "fs";
|
|
26
26
|
|
|
27
27
|
import g from "node:path";
|
|
28
28
|
|
|
@@ -30,7 +30,11 @@ import { existsSync as b } from "node:fs";
|
|
|
30
30
|
|
|
31
31
|
import { As as x } from "../helpers/As.mjs";
|
|
32
32
|
|
|
33
|
-
import { EventEmitter as
|
|
33
|
+
import { EventEmitter as f } from "../base/EventEmitter.mjs";
|
|
34
|
+
|
|
35
|
+
import { DatabaseSymbol as E } from "../base/internal/DatabaseSymbol.mjs";
|
|
36
|
+
|
|
37
|
+
import { GenerateMigration as v } from "../../providers/migration/GenerateMigration.mjs";
|
|
34
38
|
|
|
35
39
|
import "./Component.mjs";
|
|
36
40
|
|
|
@@ -264,18 +268,38 @@ import "string_decoder";
|
|
|
264
268
|
|
|
265
269
|
import "node:stream";
|
|
266
270
|
|
|
271
|
+
import "../../../vendor/Package.10.mjs";
|
|
272
|
+
|
|
273
|
+
import "../../../vendor/Package.102.mjs";
|
|
274
|
+
|
|
275
|
+
import "../../../vendor/Package.12.mjs";
|
|
276
|
+
|
|
277
|
+
import "../../../vendor/Package.62.mjs";
|
|
278
|
+
|
|
279
|
+
import "fs/promises";
|
|
280
|
+
|
|
281
|
+
import "../../../vendor/Package.63.mjs";
|
|
282
|
+
|
|
283
|
+
import "node:url";
|
|
284
|
+
|
|
285
|
+
import "node:fs/promises";
|
|
286
|
+
|
|
287
|
+
import "node:events";
|
|
288
|
+
|
|
289
|
+
import "node:string_decoder";
|
|
290
|
+
|
|
267
291
|
var y;
|
|
268
292
|
|
|
269
|
-
var
|
|
293
|
+
var O;
|
|
270
294
|
|
|
271
295
|
(function(t) {
|
|
272
296
|
t["Launched"] = "LAUNCHED";
|
|
273
297
|
t["Done"] = "DONE";
|
|
274
298
|
t["UncaughtException"] = "UNCAUGHT_EXCEPTION";
|
|
275
299
|
t["FatalException"] = "FATAL_EXCEPTION";
|
|
276
|
-
})(
|
|
300
|
+
})(O || (O = {}));
|
|
277
301
|
|
|
278
|
-
let
|
|
302
|
+
let P = class Application extends o {
|
|
279
303
|
constructor() {
|
|
280
304
|
super(...arguments);
|
|
281
305
|
this.ConfigLoader = a;
|
|
@@ -295,7 +319,7 @@ let v = class Application extends o {
|
|
|
295
319
|
y = this;
|
|
296
320
|
}
|
|
297
321
|
static {
|
|
298
|
-
this.eventEmitter = new
|
|
322
|
+
this.eventEmitter = new f;
|
|
299
323
|
}
|
|
300
324
|
static {
|
|
301
325
|
this.environmentVariableMap = new Map;
|
|
@@ -318,22 +342,22 @@ let v = class Application extends o {
|
|
|
318
342
|
return this.launch();
|
|
319
343
|
}
|
|
320
344
|
static onLaunched(t) {
|
|
321
|
-
this.eventEmitter.once(
|
|
345
|
+
this.eventEmitter.once(O.Launched, (async e => t(e, await e.getObject("log"))));
|
|
322
346
|
return this.launch();
|
|
323
347
|
}
|
|
324
348
|
static onDone(t) {
|
|
325
|
-
this.eventEmitter.once(
|
|
349
|
+
this.eventEmitter.once(O.Done, (async e => t(e, await e.getObject("log"))));
|
|
326
350
|
return this.launch();
|
|
327
351
|
}
|
|
328
352
|
static onUncaughtException(t) {
|
|
329
|
-
this.eventEmitter.on(
|
|
353
|
+
this.eventEmitter.on(O.UncaughtException, (async e => {
|
|
330
354
|
const o = await this.getLogger();
|
|
331
355
|
await t(e, o);
|
|
332
356
|
}));
|
|
333
357
|
return this.launch();
|
|
334
358
|
}
|
|
335
359
|
static onFatalException(t) {
|
|
336
|
-
this.eventEmitter.once(
|
|
360
|
+
this.eventEmitter.once(O.FatalException, (async e => {
|
|
337
361
|
const o = await this.getLogger();
|
|
338
362
|
let i = await t(e, o);
|
|
339
363
|
if (typeof i !== "number") i = 1;
|
|
@@ -349,7 +373,7 @@ let v = class Application extends o {
|
|
|
349
373
|
if (this.launchTimeout) clearTimeout(this.launchTimeout);
|
|
350
374
|
this.launchTimeout = setTimeout((async () => {
|
|
351
375
|
process.on("uncaughtException", (async t => {
|
|
352
|
-
if (this.eventEmitter.listenerCount(
|
|
376
|
+
if (this.eventEmitter.listenerCount(O.UncaughtException)) return this.eventEmitter.emit(O.UncaughtException, t);
|
|
353
377
|
const e = await this.getLogger();
|
|
354
378
|
return e.warn(new Error("UncaughtException", {
|
|
355
379
|
cause: t
|
|
@@ -364,7 +388,7 @@ let v = class Application extends o {
|
|
|
364
388
|
return this;
|
|
365
389
|
}
|
|
366
390
|
static processFatalException(t) {
|
|
367
|
-
if (!this.eventEmitter.listenerCount(
|
|
391
|
+
if (!this.eventEmitter.listenerCount(O.FatalException)) {
|
|
368
392
|
return process.nextTick((async () => {
|
|
369
393
|
const e = await this.getLogger();
|
|
370
394
|
e.error(new Error("FatalException", {
|
|
@@ -372,12 +396,12 @@ let v = class Application extends o {
|
|
|
372
396
|
}));
|
|
373
397
|
}));
|
|
374
398
|
}
|
|
375
|
-
this.eventEmitter.emit(
|
|
399
|
+
this.eventEmitter.emit(O.FatalException, t);
|
|
376
400
|
}
|
|
377
401
|
static async launchApplication() {
|
|
378
402
|
this.eventEmitter.once("exit", (async (t, e) => {
|
|
379
403
|
try {
|
|
380
|
-
await this.eventEmitter.emitRequest(
|
|
404
|
+
await this.eventEmitter.emitRequest(O.Done, t);
|
|
381
405
|
await o.destroy();
|
|
382
406
|
process.exit(e ? e : 0);
|
|
383
407
|
} catch (t) {
|
|
@@ -394,13 +418,50 @@ let v = class Application extends o {
|
|
|
394
418
|
t.set(e, o[e]);
|
|
395
419
|
if (i) {
|
|
396
420
|
const t = g.resolve(e);
|
|
397
|
-
if (!b(t))
|
|
421
|
+
if (!b(t)) u(g.resolve(e), {
|
|
398
422
|
recursive: true
|
|
399
423
|
});
|
|
400
424
|
}
|
|
401
425
|
}));
|
|
402
426
|
}));
|
|
403
427
|
const e = typeof this.launchOptions === "object" ? this.launchOptions : await this.launchOptions();
|
|
428
|
+
for (const t in process.env) {
|
|
429
|
+
switch (t.toUpperCase()) {
|
|
430
|
+
case "MIGRATION_GENERATE":
|
|
431
|
+
{
|
|
432
|
+
const o = process.env[t];
|
|
433
|
+
const i = t => {
|
|
434
|
+
const e = [];
|
|
435
|
+
for (const o in t) {
|
|
436
|
+
if (t[o] && t[o].class && t[o].class.databaseSymbol && t[o].class.databaseSymbol === E) {
|
|
437
|
+
const i = t[o].options;
|
|
438
|
+
if (!i) continue;
|
|
439
|
+
Reflect.set(i, "dataSourceName", o);
|
|
440
|
+
e.push(i);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return e;
|
|
444
|
+
};
|
|
445
|
+
const s = [ ...e.components ? i(e.components) : [], ...e.providers ? i(e.providers) : [] ];
|
|
446
|
+
if (!s.length) process.exit(0);
|
|
447
|
+
e.bootstrap = [];
|
|
448
|
+
s.forEach(((t, i) => {
|
|
449
|
+
const r = `GenerateMigration${i}${Date.now()}`;
|
|
450
|
+
if (!e.providers) e.providers = {};
|
|
451
|
+
e.providers[r] = {
|
|
452
|
+
class: v,
|
|
453
|
+
path: o,
|
|
454
|
+
outputJs: false,
|
|
455
|
+
exitProcess: i === s.length - 1,
|
|
456
|
+
dataSourceName: Reflect.get(t, "dataSourceName"),
|
|
457
|
+
dataSource: t
|
|
458
|
+
};
|
|
459
|
+
e.bootstrap.push(r);
|
|
460
|
+
}));
|
|
461
|
+
}
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
404
465
|
const o = new n;
|
|
405
466
|
return new Promise(((t, r) => {
|
|
406
467
|
p.validateAsync(e).then((e => {
|
|
@@ -410,7 +471,7 @@ let v = class Application extends o {
|
|
|
410
471
|
x(Reflect.getOwnMetadata("#bootstrap", this))?.pop();
|
|
411
472
|
};
|
|
412
473
|
e.bind(x(t))();
|
|
413
|
-
this.eventEmitter.emit(
|
|
474
|
+
this.eventEmitter.emit(O.Launched, x(t));
|
|
414
475
|
}));
|
|
415
476
|
o.set(y, {
|
|
416
477
|
options: e
|
|
@@ -442,10 +503,10 @@ let v = class Application extends o {
|
|
|
442
503
|
}
|
|
443
504
|
};
|
|
444
505
|
|
|
445
|
-
t([ h
|
|
506
|
+
t([ d(h.Object().pattern(h.String(), h.String()).required()), e("design:type", Function), e("design:paramtypes", [ Object ]), e("design:returntype", Object) ], P, "env", null);
|
|
446
507
|
|
|
447
|
-
t([ h
|
|
508
|
+
t([ d(h.Object().pattern(h.String(), h.String()).required(), h.Boolean().optional().default(false)), e("design:type", Function), e("design:paramtypes", [ Object, Boolean ]), e("design:returntype", Object) ], P, "alias", null);
|
|
448
509
|
|
|
449
|
-
|
|
510
|
+
P = y = t([ r(true) ], P);
|
|
450
511
|
|
|
451
|
-
export {
|
|
512
|
+
export { P as Application, O as ApplicationState };
|
|
@@ -16,6 +16,8 @@ const a = require("../lib/core/Provider.cjs");
|
|
|
16
16
|
|
|
17
17
|
const s = require("../lib/helpers/As.cjs");
|
|
18
18
|
|
|
19
|
+
const o = require("../lib/base/internal/DatabaseSymbol.cjs");
|
|
20
|
+
|
|
19
21
|
require("../lib/base/internal/ObjectConfiguration.cjs");
|
|
20
22
|
|
|
21
23
|
require("../constants/DIMetadataKey.cjs");
|
|
@@ -188,12 +190,15 @@ require("../exceptions/dto/InvalidMethodReturnException.cjs");
|
|
|
188
190
|
|
|
189
191
|
require("../lib/helpers/IsEmptyObject.cjs");
|
|
190
192
|
|
|
191
|
-
const
|
|
193
|
+
const c = e => ({
|
|
192
194
|
class: exports.Database,
|
|
193
195
|
options: e
|
|
194
196
|
});
|
|
195
197
|
|
|
196
198
|
exports.Database = class Database extends a.Provider {
|
|
199
|
+
static {
|
|
200
|
+
this.databaseSymbol = o.DatabaseSymbol;
|
|
201
|
+
}
|
|
197
202
|
#e;
|
|
198
203
|
get datasource() {
|
|
199
204
|
return this.#e;
|
|
@@ -286,4 +291,4 @@ e.__decorate([ r.Configurable(), e.__metadata("design:type", Object) ], exports.
|
|
|
286
291
|
|
|
287
292
|
exports.Database = e.__decorate([ t.Transient() ], exports.Database);
|
|
288
293
|
|
|
289
|
-
exports.BuildDatabaseOptions =
|
|
294
|
+
exports.BuildDatabaseOptions = c;
|
|
@@ -10,6 +10,8 @@ import { Provider as s } from "../lib/core/Provider.mjs";
|
|
|
10
10
|
|
|
11
11
|
import { As as a } from "../lib/helpers/As.mjs";
|
|
12
12
|
|
|
13
|
+
import { DatabaseSymbol as n } from "../lib/base/internal/DatabaseSymbol.mjs";
|
|
14
|
+
|
|
13
15
|
import "../lib/base/internal/ObjectConfiguration.mjs";
|
|
14
16
|
|
|
15
17
|
import "../constants/DIMetadataKey.mjs";
|
|
@@ -182,12 +184,15 @@ import "../exceptions/dto/InvalidMethodReturnException.mjs";
|
|
|
182
184
|
|
|
183
185
|
import "../lib/helpers/IsEmptyObject.mjs";
|
|
184
186
|
|
|
185
|
-
const
|
|
186
|
-
class:
|
|
187
|
+
const m = t => ({
|
|
188
|
+
class: p,
|
|
187
189
|
options: t
|
|
188
190
|
});
|
|
189
191
|
|
|
190
|
-
let
|
|
192
|
+
let p = class Database extends s {
|
|
193
|
+
static {
|
|
194
|
+
this.databaseSymbol = n;
|
|
195
|
+
}
|
|
191
196
|
#t;
|
|
192
197
|
get datasource() {
|
|
193
198
|
return this.#t;
|
|
@@ -274,10 +279,10 @@ let m = class Database extends s {
|
|
|
274
279
|
}
|
|
275
280
|
};
|
|
276
281
|
|
|
277
|
-
t([ r(), e("design:type", Object) ],
|
|
282
|
+
t([ r(), e("design:type", Object) ], p.prototype, "options", void 0);
|
|
278
283
|
|
|
279
|
-
t([ r(), e("design:type", Object) ],
|
|
284
|
+
t([ r(), e("design:type", Object) ], p.prototype, "entities", void 0);
|
|
280
285
|
|
|
281
|
-
|
|
286
|
+
p = t([ i() ], p);
|
|
282
287
|
|
|
283
|
-
export {
|
|
288
|
+
export { m as BuildDatabaseOptions, p as Database };
|