@decaf-ts/for-nest 0.2.40 → 0.2.41
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/dist/for-nest.cjs +1 -1
- package/dist/for-nest.cjs.map +1 -1
- package/dist/for-nest.js +1 -1
- package/dist/for-nest.js.map +1 -1
- package/lib/core-module.cjs +39 -25
- package/lib/core-module.d.ts +1 -1
- package/lib/core-module.js.map +1 -1
- package/lib/decaf-model/DecafModelModule.cjs +0 -24
- package/lib/decaf-model/DecafModelModule.js.map +1 -1
- package/lib/esm/core-module.d.ts +1 -1
- package/lib/esm/core-module.js +40 -26
- package/lib/esm/core-module.js.map +1 -1
- package/lib/esm/decaf-model/DecafModelModule.js +0 -24
- package/lib/esm/decaf-model/DecafModelModule.js.map +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/module.js +1 -2
- package/lib/esm/module.js.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/module.cjs +1 -2
- package/lib/module.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,10 +11,6 @@ const common_1 = require("@nestjs/common");
|
|
|
11
11
|
const core_1 = require("@decaf-ts/core");
|
|
12
12
|
const logging_1 = require("@decaf-ts/logging");
|
|
13
13
|
const FromModelController_1 = require("./FromModelController.cjs");
|
|
14
|
-
const interceptors_1 = require("./../interceptors/index.cjs");
|
|
15
|
-
const core_2 = require("@nestjs/core");
|
|
16
|
-
const request_1 = require("./../request/index.cjs");
|
|
17
|
-
const constants_1 = require("./../constants.cjs");
|
|
18
14
|
function getModuleFor(flavour) {
|
|
19
15
|
var DecafModelModule_1;
|
|
20
16
|
let DecafModelModule = class DecafModelModule {
|
|
@@ -42,26 +38,6 @@ function getModuleFor(flavour) {
|
|
|
42
38
|
module: DecafModelModule_1,
|
|
43
39
|
controllers,
|
|
44
40
|
providers: [
|
|
45
|
-
{
|
|
46
|
-
provide: constants_1.DECAF_HANDLERS,
|
|
47
|
-
useFactory: () => {
|
|
48
|
-
return (options.handlers?.map((H) => {
|
|
49
|
-
log.info(`Registered request handler: ${H.name}`);
|
|
50
|
-
return new H();
|
|
51
|
-
}) ?? []);
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
interceptors_1.AuthInterceptor,
|
|
55
|
-
{
|
|
56
|
-
provide: core_2.APP_INTERCEPTOR,
|
|
57
|
-
useExisting: interceptors_1.AuthInterceptor,
|
|
58
|
-
},
|
|
59
|
-
request_1.DecafRequestContext,
|
|
60
|
-
request_1.DecafHandlerExecutor,
|
|
61
|
-
{
|
|
62
|
-
provide: core_2.APP_INTERCEPTOR,
|
|
63
|
-
useClass: interceptors_1.DecafRequestHandlerInterceptor,
|
|
64
|
-
},
|
|
65
41
|
...modelServices,
|
|
66
42
|
],
|
|
67
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecafModelModule.js","sourceRoot":"","sources":["../../src/decaf-model/DecafModelModule.ts"],"names":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"DecafModelModule.js","sourceRoot":"","sources":["../../src/decaf-model/DecafModelModule.ts"],"names":[],"mappings":";;;;;;;;AAOA,oCAgDC;AAvDD,2CAAiE;AACjE,yCAAuD;AACvD,+CAA4C;AAC5C,mEAA4D;AAI5D,SAAgB,YAAY,CAAC,OAAe;;IAE1C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;;iBACJ,QAAG,GAAG,iBAAO,CAAC,GAAG,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,AAAlD,CAAmD;QAEtE,MAAM,CAAC,mBAAmB,CACxB,MAA6B;YAE7B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC5B,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,SAAS;gBAC/B,UAAU,EAAE,GAAG,EAAE,CAAC,mBAAY,CAAC,QAAQ,CAAC,KAAY,CAAC;aACtD,CAAC,CAAC,CAAC;QACN,CAAC;QAED,MAAM,CAAC,OAAO,CACZ,OAAe,EACf,UAAuC,EAAE;YAEzC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvC,GAAG,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YAElD,MAAM,aAAa,GAAG,cAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAE9C,IAAI,aAAa,GAAe,EAAE,CAAC;YACnC,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;gBACzB,GAAG,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC;gBACpE,aAAa,GAAG,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;gBACxD,GAAG,CAAC,IAAI,CACN,4BAA4B,aAAa,CAAC,MAAM,wBAAwB,CACzE,CAAC;YACJ,CAAC;YAED,MAAM,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,yCAAmB,CAAC,MAAM,CAAC,CAAC;YAClE,GAAG,CAAC,IAAI,CAAC,aAAa,WAAW,CAAC,MAAM,cAAc,CAAC,CAAC;YAExD,OAAO;gBACL,MAAM,EAAE,kBAAgB;gBACxB,WAAW;gBACX,SAAS,EAAE;oBACT,GAAG,aAAa;iBACjB;aACF,CAAC;QACJ,CAAC;;IAxCG,gBAAgB;QADrB,IAAA,eAAM,EAAC,EAAE,CAAC;OACL,gBAAgB,CAyCrB;IACD,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,EAAE;QACtC,KAAK,EAAE,cAAc,OAAO,EAAE;KAC/B,CAAC,CAAC;IACH,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
package/lib/esm/core-module.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class DecafCoreModule<CONF, ADAPTER extends Adapter<CONF, any, an
|
|
|
11
11
|
protected static get persistence(): PersistenceService<any>;
|
|
12
12
|
protected static get log(): Logger;
|
|
13
13
|
constructor(options: DecafModuleOptions<CONF, ADAPTER>, moduleRef: ModuleRef);
|
|
14
|
-
static bootPersistence(options: DecafModuleOptions): Promise<Adapter<any, any, any, any>[]>;
|
|
15
14
|
static forRoot(options: DecafModuleOptions): DynamicModule;
|
|
15
|
+
static bootPersistence(options: DecafModuleOptions): Promise<Adapter<any, any, any, any>[]>;
|
|
16
16
|
onApplicationShutdown(): Promise<void>;
|
|
17
17
|
}
|
package/lib/esm/core-module.js
CHANGED
|
@@ -11,13 +11,14 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
var DecafCoreModule_1;
|
|
14
|
-
import { Global, Inject, Module,
|
|
15
|
-
import { ModuleRef } from "@nestjs/core";
|
|
16
|
-
import { DECAF_ADAPTER_ID, DECAF_MODULE_OPTIONS } from "./constants.js";
|
|
14
|
+
import { Global, Inject, Module, } from "@nestjs/common";
|
|
15
|
+
import { APP_INTERCEPTOR, ModuleRef } from "@nestjs/core";
|
|
16
|
+
import { DECAF_ADAPTER_ID, DECAF_HANDLERS, DECAF_MODULE_OPTIONS } from "./constants.js";
|
|
17
17
|
import { Adapter, PersistenceService } from "@decaf-ts/core";
|
|
18
18
|
import { Logging } from "@decaf-ts/logging";
|
|
19
19
|
import { InternalError } from "@decaf-ts/db-decorators";
|
|
20
|
-
import { RequestToContextTransformer, requestToContextTransformer, } from "./interceptors/
|
|
20
|
+
import { AuthInterceptor, DecafRequestHandlerInterceptor, RequestToContextTransformer, requestToContextTransformer, } from "./interceptors/index.js";
|
|
21
|
+
import { DecafHandlerExecutor, DecafRequestContext } from "./request/index.js";
|
|
21
22
|
let DecafCoreModule = class DecafCoreModule {
|
|
22
23
|
static { DecafCoreModule_1 = this; }
|
|
23
24
|
static get persistence() {
|
|
@@ -34,6 +35,41 @@ let DecafCoreModule = class DecafCoreModule {
|
|
|
34
35
|
this.options = options;
|
|
35
36
|
this.moduleRef = moduleRef;
|
|
36
37
|
}
|
|
38
|
+
static forRoot(options) {
|
|
39
|
+
const log = this.log.for(this.forRoot);
|
|
40
|
+
return {
|
|
41
|
+
module: DecafCoreModule_1,
|
|
42
|
+
providers: [
|
|
43
|
+
{ provide: DECAF_MODULE_OPTIONS, useValue: options },
|
|
44
|
+
{ provide: DECAF_ADAPTER_ID, useValue: this.persistence.client },
|
|
45
|
+
{
|
|
46
|
+
provide: DECAF_HANDLERS,
|
|
47
|
+
useFactory: () => options.handlers?.map((H) => {
|
|
48
|
+
log.info(`Registered request handler: ${H.name}`);
|
|
49
|
+
return new H();
|
|
50
|
+
}) ?? [],
|
|
51
|
+
},
|
|
52
|
+
AuthInterceptor,
|
|
53
|
+
{
|
|
54
|
+
provide: APP_INTERCEPTOR,
|
|
55
|
+
useExisting: AuthInterceptor,
|
|
56
|
+
},
|
|
57
|
+
DecafRequestContext,
|
|
58
|
+
DecafHandlerExecutor,
|
|
59
|
+
{
|
|
60
|
+
provide: APP_INTERCEPTOR,
|
|
61
|
+
useClass: DecafRequestHandlerInterceptor,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
exports: [
|
|
65
|
+
DECAF_MODULE_OPTIONS,
|
|
66
|
+
DECAF_ADAPTER_ID,
|
|
67
|
+
DECAF_HANDLERS,
|
|
68
|
+
DecafRequestContext,
|
|
69
|
+
DecafHandlerExecutor,
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
37
73
|
static async bootPersistence(options) {
|
|
38
74
|
const log = this.log.for(this.bootPersistence);
|
|
39
75
|
if (!this._persistence) {
|
|
@@ -75,28 +111,6 @@ let DecafCoreModule = class DecafCoreModule {
|
|
|
75
111
|
// }
|
|
76
112
|
// return this.persistence;
|
|
77
113
|
}
|
|
78
|
-
static forRoot(options) {
|
|
79
|
-
const typeOrmModuleOptions = {
|
|
80
|
-
provide: DECAF_MODULE_OPTIONS,
|
|
81
|
-
useValue: options,
|
|
82
|
-
};
|
|
83
|
-
const adapter = {
|
|
84
|
-
useFactory: async (opts) => {
|
|
85
|
-
return DecafCoreModule_1.bootPersistence(opts);
|
|
86
|
-
},
|
|
87
|
-
provide: DECAF_ADAPTER_ID,
|
|
88
|
-
durable: true,
|
|
89
|
-
scope: Scope.DEFAULT,
|
|
90
|
-
inject: [DECAF_MODULE_OPTIONS],
|
|
91
|
-
};
|
|
92
|
-
const providers = [adapter, typeOrmModuleOptions];
|
|
93
|
-
const exports = [adapter];
|
|
94
|
-
return {
|
|
95
|
-
module: DecafCoreModule_1,
|
|
96
|
-
providers,
|
|
97
|
-
exports,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
114
|
async onApplicationShutdown() {
|
|
101
115
|
const log = DecafCoreModule_1.log.for(this.onApplicationShutdown);
|
|
102
116
|
const adapters = this.moduleRef.get(DECAF_ADAPTER_ID);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-module.js","sourceRoot":"","sources":["../../src/core-module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAEL,MAAM,EACN,MAAM,EACN,MAAM,
|
|
1
|
+
{"version":3,"file":"core-module.js","sourceRoot":"","sources":["../../src/core-module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAEL,MAAM,EACN,MAAM,EACN,MAAM,GAGP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,uBAAoB;AAErF,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAU,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,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EAAE,CAAC;gBACpB,GAAG,CAAC,KAAK,CAAC,gCAAgC,EAAE,CAAU,CAAC,CAAC;YAC1D,CAAC;IACL,CAAC;CACF,CAAA;AA3HY,eAAe;IAF3B,MAAM,EAAE;IACR,MAAM,CAAC,EAAE,CAAC;IAoBN,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;6CAED,SAAS;GArB5B,eAAe,CA2H3B"}
|
|
@@ -8,10 +8,6 @@ import { Module } from "@nestjs/common";
|
|
|
8
8
|
import { Adapter, ModelService } from "@decaf-ts/core";
|
|
9
9
|
import { Logging } from "@decaf-ts/logging";
|
|
10
10
|
import { FromModelController } from "./FromModelController.js";
|
|
11
|
-
import { AuthInterceptor, DecafRequestHandlerInterceptor } from "./../interceptors/index.js";
|
|
12
|
-
import { APP_INTERCEPTOR } from "@nestjs/core";
|
|
13
|
-
import { DecafHandlerExecutor, DecafRequestContext } from "./../request/index.js";
|
|
14
|
-
import { DECAF_HANDLERS } from "./../constants.js";
|
|
15
11
|
export function getModuleFor(flavour) {
|
|
16
12
|
var DecafModelModule_1;
|
|
17
13
|
let DecafModelModule = class DecafModelModule {
|
|
@@ -39,26 +35,6 @@ export function getModuleFor(flavour) {
|
|
|
39
35
|
module: DecafModelModule_1,
|
|
40
36
|
controllers,
|
|
41
37
|
providers: [
|
|
42
|
-
{
|
|
43
|
-
provide: DECAF_HANDLERS,
|
|
44
|
-
useFactory: () => {
|
|
45
|
-
return (options.handlers?.map((H) => {
|
|
46
|
-
log.info(`Registered request handler: ${H.name}`);
|
|
47
|
-
return new H();
|
|
48
|
-
}) ?? []);
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
AuthInterceptor,
|
|
52
|
-
{
|
|
53
|
-
provide: APP_INTERCEPTOR,
|
|
54
|
-
useExisting: AuthInterceptor,
|
|
55
|
-
},
|
|
56
|
-
DecafRequestContext,
|
|
57
|
-
DecafHandlerExecutor,
|
|
58
|
-
{
|
|
59
|
-
provide: APP_INTERCEPTOR,
|
|
60
|
-
useClass: DecafRequestHandlerInterceptor,
|
|
61
|
-
},
|
|
62
38
|
...modelServices,
|
|
63
39
|
],
|
|
64
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecafModelModule.js","sourceRoot":"","sources":["../../../src/decaf-model/DecafModelModule.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAiB,MAAM,EAAY,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,iCAA8B;
|
|
1
|
+
{"version":3,"file":"DecafModelModule.js","sourceRoot":"","sources":["../../../src/decaf-model/DecafModelModule.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAiB,MAAM,EAAY,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,iCAA8B;AAI5D,MAAM,UAAU,YAAY,CAAC,OAAe;;IAE1C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;;iBACJ,QAAG,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,AAAlD,CAAmD;QAEtE,MAAM,CAAC,mBAAmB,CACxB,MAA6B;YAE7B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC5B,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,SAAS;gBAC/B,UAAU,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAY,CAAC;aACtD,CAAC,CAAC,CAAC;QACN,CAAC;QAED,MAAM,CAAC,OAAO,CACZ,OAAe,EACf,UAAuC,EAAE;YAEzC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvC,GAAG,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YAElD,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAE9C,IAAI,aAAa,GAAe,EAAE,CAAC;YACnC,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;gBACzB,GAAG,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC;gBACpE,aAAa,GAAG,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;gBACxD,GAAG,CAAC,IAAI,CACN,4BAA4B,aAAa,CAAC,MAAM,wBAAwB,CACzE,CAAC;YACJ,CAAC;YAED,MAAM,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;YAClE,GAAG,CAAC,IAAI,CAAC,aAAa,WAAW,CAAC,MAAM,cAAc,CAAC,CAAC;YAExD,OAAO;gBACL,MAAM,EAAE,kBAAgB;gBACxB,WAAW;gBACX,SAAS,EAAE;oBACT,GAAG,aAAa;iBACjB;aACF,CAAC;QACJ,CAAC;;IAxCG,gBAAgB;QADrB,MAAM,CAAC,EAAE,CAAC;OACL,gBAAgB,CAyCrB;IACD,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,EAAE;QACtC,KAAK,EAAE,cAAc,OAAO,EAAE;KAC/B,CAAC,CAAC;IACH,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
package/lib/esm/index.d.ts
CHANGED
package/lib/esm/index.js
CHANGED
|
@@ -39,7 +39,7 @@ export * from "./events-module/index.js";
|
|
|
39
39
|
* @constant
|
|
40
40
|
* @type {string}
|
|
41
41
|
*/
|
|
42
|
-
export const VERSION = "0.2.
|
|
42
|
+
export const VERSION = "0.2.40";
|
|
43
43
|
export const PACKAGE_NAME = "@decaf-ts/for-nest";
|
|
44
44
|
Metadata.registerLibrary(PACKAGE_NAME, VERSION);
|
|
45
45
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/module.js
CHANGED
|
@@ -14,7 +14,7 @@ import { DecafStreamModule } from "./events-module/index.js";
|
|
|
14
14
|
*/
|
|
15
15
|
let DecafModule = DecafModule_1 = class DecafModule {
|
|
16
16
|
static async forRootAsync(options) {
|
|
17
|
-
const { autoControllers, autoServices
|
|
17
|
+
const { autoControllers, autoServices } = options;
|
|
18
18
|
const adapters = await DecafCoreModule.bootPersistence(options);
|
|
19
19
|
const flavours = adapters.map((adapter) => adapter.flavour);
|
|
20
20
|
const imports = [DecafCoreModule.forRoot(options)];
|
|
@@ -22,7 +22,6 @@ let DecafModule = DecafModule_1 = class DecafModule {
|
|
|
22
22
|
flavours.forEach((flavour) => {
|
|
23
23
|
imports.push(getModuleFor(flavour).forRoot(flavour, {
|
|
24
24
|
autoServices,
|
|
25
|
-
handlers,
|
|
26
25
|
}));
|
|
27
26
|
});
|
|
28
27
|
}
|
package/lib/esm/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAmC,MAAM,EAAQ,MAAM,gBAAgB,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,yBAAsB;AAEhD,OAAO,EAAE,YAAY,EAAE,+BAA4B;AACnD,OAAO,EAAE,iBAAiB,EAAE,iCAAwB;AAEpD;;GAEG;AAEI,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACtB,MAAM,CAAC,KAAK,CAAC,YAAY,CACvB,OAA2B;QAE3B,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAmC,MAAM,EAAQ,MAAM,gBAAgB,CAA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|
59
|
-
exports.VERSION = "0.2.
|
|
59
|
+
exports.VERSION = "0.2.40";
|
|
60
60
|
exports.PACKAGE_NAME = "@decaf-ts/for-nest";
|
|
61
61
|
decoration_1.Metadata.registerLibrary(exports.PACKAGE_NAME, exports.VERSION);
|
|
62
62
|
//# sourceMappingURL=index.js.map
|
package/lib/index.d.ts
CHANGED
package/lib/module.cjs
CHANGED
|
@@ -17,7 +17,7 @@ const events_module_1 = require("./events-module/index.cjs");
|
|
|
17
17
|
*/
|
|
18
18
|
let DecafModule = DecafModule_1 = class DecafModule {
|
|
19
19
|
static async forRootAsync(options) {
|
|
20
|
-
const { autoControllers, autoServices
|
|
20
|
+
const { autoControllers, autoServices } = options;
|
|
21
21
|
const adapters = await core_module_1.DecafCoreModule.bootPersistence(options);
|
|
22
22
|
const flavours = adapters.map((adapter) => adapter.flavour);
|
|
23
23
|
const imports = [core_module_1.DecafCoreModule.forRoot(options)];
|
|
@@ -25,7 +25,6 @@ let DecafModule = DecafModule_1 = class DecafModule {
|
|
|
25
25
|
flavours.forEach((flavour) => {
|
|
26
26
|
imports.push((0, index_1.getModuleFor)(flavour).forRoot(flavour, {
|
|
27
27
|
autoServices,
|
|
28
|
-
handlers,
|
|
29
28
|
}));
|
|
30
29
|
});
|
|
31
30
|
}
|
package/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+E;AAE/E,mDAAgD;AAEhD,mDAAmD;AACnD,6DAAoD;AAEpD;;GAEG;AAEI,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACtB,MAAM,CAAC,KAAK,CAAC,YAAY,CACvB,OAA2B;QAE3B,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+E;AAE/E,mDAAg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