@nestjs-kitchen/authz 2.0.5 → 2.0.6
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.
|
@@ -44,10 +44,10 @@ const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, ASYNC_OPTIONS_TYPE, OPTIO
|
|
|
44
44
|
if (!global && !routes.length) {
|
|
45
45
|
throw new errors_1.AuthzError(`InternalError: Missing parameter 'global' or 'routes' in configuration.`);
|
|
46
46
|
}
|
|
47
|
-
if (store.globalInited) {
|
|
48
|
-
throw new errors_1.AuthzError(`InternalError: Cannot initialize mutiple global modules. Only one global module is allowed.`);
|
|
49
|
-
}
|
|
50
47
|
if (global) {
|
|
48
|
+
if (store.globalInited) {
|
|
49
|
+
throw new errors_1.AuthzError(`InternalError: Cannot initialize mutiple global modules. Only one global module is allowed.`);
|
|
50
|
+
}
|
|
51
51
|
store.globalInited += 1;
|
|
52
52
|
}
|
|
53
53
|
return (0, utils_1.mergeDynamicModuleConfigs)(definition, {
|
|
@@ -48,10 +48,10 @@ const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, ASYNC_OPTIONS_TYPE, OPTIO
|
|
|
48
48
|
if (!global && !routes.length) {
|
|
49
49
|
throw new errors_1.AuthzError(`InternalError: Missing parameter 'global' or 'routes' in configuration.`);
|
|
50
50
|
}
|
|
51
|
-
if (store.globalInited) {
|
|
52
|
-
throw new errors_1.AuthzError(`InternalError: Cannot initialize mutiple global modules. Only one global module is allowed.`);
|
|
53
|
-
}
|
|
54
51
|
if (global) {
|
|
52
|
+
if (store.globalInited) {
|
|
53
|
+
throw new errors_1.AuthzError(`InternalError: Cannot initialize mutiple global modules. Only one global module is allowed.`);
|
|
54
|
+
}
|
|
55
55
|
store.globalInited += 1;
|
|
56
56
|
}
|
|
57
57
|
return (0, utils_1.mergeDynamicModuleConfigs)(definition, {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@nestjs-kitchen/authz",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "Simplest authentication & authorization module in NextJS",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.6",
|
|
6
6
|
"homepage": "https://github.com/yikenman/nestjs-kitchen",
|
|
7
7
|
"repository": "https://github.com/yikenman/nestjs-kitchen",
|
|
8
8
|
"author": "yikenman",
|