@smartsoft001/crud-shell-nestjs 2.154.0 → 2.156.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/crud-shell-nestjs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.156.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./src/index.d.ts",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"@nestjs/jwt": "^11.0.0",
|
|
35
35
|
"@nestjs/passport": "^11.0.5",
|
|
36
36
|
"@nestjs/websockets": "^11.2.1",
|
|
37
|
-
"@smartsoft001/crud-domain": "2.
|
|
38
|
-
"@smartsoft001/crud-shell-app-services": "2.
|
|
39
|
-
"@smartsoft001/crud-shell-dtos": "2.
|
|
40
|
-
"@smartsoft001/domain-core": "2.
|
|
41
|
-
"@smartsoft001/mongo": "2.
|
|
42
|
-
"@smartsoft001/nestjs": "2.
|
|
43
|
-
"@smartsoft001/users": "2.
|
|
44
|
-
"@smartsoft001/utils": "2.
|
|
37
|
+
"@smartsoft001/crud-domain": "2.156.0",
|
|
38
|
+
"@smartsoft001/crud-shell-app-services": "2.156.0",
|
|
39
|
+
"@smartsoft001/crud-shell-dtos": "2.156.0",
|
|
40
|
+
"@smartsoft001/domain-core": "2.156.0",
|
|
41
|
+
"@smartsoft001/mongo": "2.156.0",
|
|
42
|
+
"@smartsoft001/nestjs": "2.156.0",
|
|
43
|
+
"@smartsoft001/users": "2.156.0",
|
|
44
|
+
"@smartsoft001/utils": "2.156.0",
|
|
45
45
|
"express": "^5.2.1",
|
|
46
46
|
"rxjs": "^7.8.1",
|
|
47
47
|
"socket.io": "^4.8.1"
|
package/src/lib/nestjs.module.js
CHANGED
|
@@ -16,6 +16,8 @@ let CrudShellNestjsModule = CrudShellNestjsModule_1 = class CrudShellNestjsModul
|
|
|
16
16
|
static forRoot(options) {
|
|
17
17
|
// Without a token config the REST API is served without JWT auth, as before.
|
|
18
18
|
const tokenConfig = options.tokenConfig;
|
|
19
|
+
// The model type reaches CrudService through SharedConfig, for validation.
|
|
20
|
+
const config = { ...options, type: options.type ?? options.db?.type };
|
|
19
21
|
return {
|
|
20
22
|
module: CrudShellNestjsModule_1,
|
|
21
23
|
controllers: options.restApi ? controllers_1.CONTROLLERS : [],
|
|
@@ -39,7 +41,7 @@ let CrudShellNestjsModule = CrudShellNestjsModule_1 = class CrudShellNestjsModul
|
|
|
39
41
|
}),
|
|
40
42
|
]
|
|
41
43
|
: []),
|
|
42
|
-
nestjs_1.SharedModule.forFeature(
|
|
44
|
+
nestjs_1.SharedModule.forFeature(config),
|
|
43
45
|
mongo_1.MongoModule.forRoot(options.db),
|
|
44
46
|
],
|
|
45
47
|
exports: [...crud_shell_app_services_1.SERVICES, auth_guard_1.AuthJwtGuard, mongo_1.MongoModule.forRoot(options.db)],
|
|
@@ -56,6 +58,7 @@ let CrudShellNestjsCoreModule = CrudShellNestjsCoreModule_1 = class CrudShellNes
|
|
|
56
58
|
* optional here: a missing one used to fail at startup with a TypeError.
|
|
57
59
|
*/
|
|
58
60
|
static forRoot(options) {
|
|
61
|
+
const config = { ...options, type: options.type ?? options.db?.type };
|
|
59
62
|
return {
|
|
60
63
|
module: CrudShellNestjsCoreModule_1,
|
|
61
64
|
providers: [...crud_shell_app_services_1.SERVICES, ...gateways_1.GATEWAYS, auth_guard_1.AuthJwtGuard],
|
|
@@ -67,7 +70,7 @@ let CrudShellNestjsCoreModule = CrudShellNestjsCoreModule_1 = class CrudShellNes
|
|
|
67
70
|
expiresIn: options.tokenConfig.expiredIn,
|
|
68
71
|
},
|
|
69
72
|
}),
|
|
70
|
-
nestjs_1.SharedModule.forRoot(
|
|
73
|
+
nestjs_1.SharedModule.forRoot(config),
|
|
71
74
|
mongo_1.MongoModule.forRoot(options.db),
|
|
72
75
|
],
|
|
73
76
|
exports: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nestjs.module.js","sourceRoot":"","sources":["../../../../../../../packages/crud/shell/nestjs/src/lib/nestjs.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuD;AACvD,qCAAwC;AACxC,+CAAkD;AAElD,mFAAiE;AACjE,+CAAkD;AAClD,iDAAkE;AAElE,+CAA4C;AAC5C,yCAAsC;AACtC,yDAAwD;AAGjD,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAChC,MAAM,CAAC,OAAO,CACZ,OAaC;QAED,6EAA6E;QAC7E,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"nestjs.module.js","sourceRoot":"","sources":["../../../../../../../packages/crud/shell/nestjs/src/lib/nestjs.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuD;AACvD,qCAAwC;AACxC,+CAAkD;AAElD,mFAAiE;AACjE,+CAAkD;AAClD,iDAAkE;AAElE,+CAA4C;AAC5C,yCAAsC;AACtC,yDAAwD;AAGjD,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAChC,MAAM,CAAC,OAAO,CACZ,OAaC;QAED,6EAA6E;QAC7E,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACxC,2EAA2E;QAC3E,MAAM,MAAM,GAAG,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;QAEtE,OAAO;YACL,MAAM,EAAE,uBAAqB;YAC7B,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAW,CAAC,CAAC,CAAC,EAAE;YAC/C,SAAS,EAAE;gBACT,GAAG,kCAAQ;gBACX,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,mBAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;gBACnC,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