@hedhog/admin 0.0.96 → 0.0.98
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth/auth.module.d.ts.map +1 -1
- package/dist/auth/auth.module.js +5 -6
- package/dist/auth/auth.module.js.map +1 -1
- package/dist/auth/guards/auth.guard.d.ts.map +1 -1
- package/dist/auth/guards/auth.guard.js +0 -1
- package/dist/auth/guards/auth.guard.js.map +1 -1
- package/dist/role/guards/role.guard.d.ts.map +1 -1
- package/dist/role/guards/role.guard.js +0 -3
- package/dist/role/guards/role.guard.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.module.d.ts","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":"AASA,
|
1
|
+
{"version":3,"file":"auth.module.d.ts","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":"AASA,qBA6Ba,UAAU;CAAG"}
|
package/dist/auth/auth.module.js
CHANGED
@@ -7,14 +7,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
9
|
exports.AuthModule = void 0;
|
10
|
-
const
|
11
|
-
const auth_service_1 = require("./auth.service");
|
12
|
-
const auth_controller_1 = require("./auth.controller");
|
10
|
+
const mail_1 = require("@hedhog/mail");
|
13
11
|
const prisma_1 = require("@hedhog/prisma");
|
14
|
-
const
|
12
|
+
const common_1 = require("@nestjs/common");
|
15
13
|
const core_1 = require("@nestjs/core");
|
14
|
+
const jwt_1 = require("@nestjs/jwt");
|
15
|
+
const auth_controller_1 = require("./auth.controller");
|
16
|
+
const auth_service_1 = require("./auth.service");
|
16
17
|
const auth_guard_1 = require("./guards/auth.guard");
|
17
|
-
const mail_1 = require("@hedhog/mail");
|
18
18
|
let AuthModule = class AuthModule {
|
19
19
|
};
|
20
20
|
exports.AuthModule = AuthModule;
|
@@ -24,7 +24,6 @@ exports.AuthModule = AuthModule = __decorate([
|
|
24
24
|
(0, common_1.forwardRef)(() => jwt_1.JwtModule.registerAsync({
|
25
25
|
global: true,
|
26
26
|
useFactory: () => {
|
27
|
-
console.log('AuthModule -> process.env.JWT_SECRET', process.env.JWT_SECRET);
|
28
27
|
return {
|
29
28
|
secret: String(process.env.JWT_SECRET),
|
30
29
|
global: true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../src/auth/auth.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAA0C;AAC1C,2CAA8C;AAC9C,2CAAoD;AACpD,uCAAyC;AACzC,qCAAwC;AACxC,uDAAmD;AACnD,iDAA6C;AAC7C,oDAAgD;AA+BzC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IA7BtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CACd,eAAS,CAAC,aAAa,CAAC;gBACtB,MAAM,EAAE,IAAI;gBACZ,UAAU,EAAE,GAAG,EAAE;oBACf,OAAO;wBACL,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;wBACtC,MAAM,EAAE,IAAI;wBACZ,WAAW,EAAE;4BACX,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,KAAK;yBAC/C;qBACF,CAAC;gBACJ,CAAC;aACF,CAAC,CACH;YACD,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;SAC7B;QACD,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE;YACT,0BAAW;YACX;gBACE,OAAO,EAAE,gBAAS;gBAClB,QAAQ,EAAE,sBAAS;aACpB;SACF;QACD,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.guard.d.ts","sourceRoot":"","sources":["../../../src/auth/guards/auth.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAGjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,qBACa,SAAU,YAAW,WAAW;IAEzC,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,SAAS;gBADT,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,SAAS;IAGxB,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"auth.guard.d.ts","sourceRoot":"","sources":["../../../src/auth/guards/auth.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAGjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,qBACa,SAAU,YAAW,WAAW;IAEzC,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,SAAS;gBADT,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,SAAS;IAGxB,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IA0B9D,OAAO,CAAC,sBAAsB;CAK/B"}
|
@@ -20,7 +20,6 @@ let AuthGuard = class AuthGuard {
|
|
20
20
|
this.reflector = reflector;
|
21
21
|
}
|
22
22
|
async canActivate(context) {
|
23
|
-
console.log('AuthGuard');
|
24
23
|
const isPublic = this.reflector.getAllAndOverride(public_decorator_1.IS_PUBLIC_KEY, [
|
25
24
|
context.getHandler(),
|
26
25
|
context.getClass(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../../src/auth/guards/auth.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAKwB;AACxB,uCAAyC;AAEzC,kDAA8C;AAC9C,qEAA+D;AAGxD,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,YACU,IAAiB,EACjB,SAAoB;QADpB,SAAI,GAAJ,IAAI,CAAa;QACjB,cAAS,GAAT,SAAS,CAAW;IAC3B,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,OAAyB;QACzC,
|
1
|
+
{"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../../src/auth/guards/auth.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAKwB;AACxB,uCAAyC;AAEzC,kDAA8C;AAC9C,qEAA+D;AAGxD,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,YACU,IAAiB,EACjB,SAAoB;QADpB,SAAI,GAAJ,IAAI,CAAa;QACjB,cAAS,GAAT,SAAS,CAAW;IAC3B,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,OAAyB;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAU,gCAAa,EAAE;YACxE,OAAO,CAAC,UAAU,EAAE;YACpB,OAAO,CAAC,QAAQ,EAAE;SACnB,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QAEnD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,8BAAqB,EAAE,CAAC;QACpC,CAAC;QACD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAEnD,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;QAC5B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,8BAAqB,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,sBAAsB,CAAC,OAAgB;;QAC7C,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAA,MAAA,OAAO,CAAC,OAAO,CAAC,aAAa,0CAAE,KAAK,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAC;QAEtE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/C,CAAC;CACF,CAAA;AArCY,8BAAS;oBAAT,SAAS;IADrB,IAAA,mBAAU,GAAE;qCAGK,0BAAW;QACN,gBAAS;GAHnB,SAAS,CAqCrB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.guard.d.ts","sourceRoot":"","sources":["../../../src/role/guards/role.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,WAAW,EACX,gBAAgB,EAMjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC,qBACa,SAAU,YAAW,WAAW;IAEzC,OAAO,CAAC,SAAS;IAEjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFf,SAAS,EAAE,SAAS,EAEX,MAAM,EAAE,aAAa;IAGlC,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"role.guard.d.ts","sourceRoot":"","sources":["../../../src/role/guards/role.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,WAAW,EACX,gBAAgB,EAMjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC,qBACa,SAAU,YAAW,WAAW;IAEzC,OAAO,CAAC,SAAS;IAEjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFf,SAAS,EAAE,SAAS,EAEX,MAAM,EAAE,aAAa;IAGlC,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IA6F9D,OAAO,CAAC,sBAAsB;CAI/B"}
|
@@ -26,12 +26,10 @@ let RoleGuard = class RoleGuard {
|
|
26
26
|
}
|
27
27
|
async canActivate(context) {
|
28
28
|
var _a, _b;
|
29
|
-
console.log('RoleGuard');
|
30
29
|
const isPublic = this.reflector.getAllAndOverride(public_decorator_1.IS_PUBLIC_KEY, [
|
31
30
|
context.getHandler(),
|
32
31
|
context.getClass(),
|
33
32
|
]);
|
34
|
-
console.log('isPublic', isPublic);
|
35
33
|
if (isPublic) {
|
36
34
|
return true;
|
37
35
|
}
|
@@ -39,7 +37,6 @@ let RoleGuard = class RoleGuard {
|
|
39
37
|
context.getHandler(),
|
40
38
|
context.getClass(),
|
41
39
|
]);
|
42
|
-
console.log('withRole', withRole);
|
43
40
|
if (!withRole) {
|
44
41
|
return true;
|
45
42
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.guard.js","sourceRoot":"","sources":["../../../src/role/guards/role.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+C;AAC/C,2CAQwB;AACxB,wDAA2D;AAC3D,uCAAyC;AAEzC,6EAAuE;AACvE,iEAAyD;AAGlD,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,YACU,SAAoB,EAEX,MAAqB;QAF9B,cAAS,GAAT,SAAS,CAAW;QAEX,WAAM,GAAN,MAAM,CAAe;IACrC,CAAC;IAEJ,KA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