@pristine-ts/security 2.0.4 → 2.0.5

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.
@@ -5,20 +5,16 @@ const common_1 = require("@pristine-ts/common");
5
5
  /**
6
6
  * This Error is thrown when there's an error with the authenticator decorator.
7
7
  */
8
- class AuthenticatorDecoratorError extends common_1.LoggableError {
8
+ class AuthenticatorDecoratorError extends common_1.PristineError {
9
9
  constructor(message, authenticator, options, target, propertyKey, descriptor) {
10
- super(message, {
11
- message,
12
- authenticator,
13
- options,
14
- target,
15
- propertyKey,
16
- descriptor,
17
- });
18
- // Set the prototype explicitly.
19
- // As specified in the documentation in TypeScript
20
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
21
- Object.setPrototypeOf(this, AuthenticatorDecoratorError.prototype);
10
+ super(message, { details: {
11
+ message,
12
+ authenticator,
13
+ options,
14
+ target,
15
+ propertyKey,
16
+ descriptor,
17
+ } });
22
18
  }
23
19
  }
24
20
  exports.AuthenticatorDecoratorError = AuthenticatorDecoratorError;
@@ -1 +1 @@
1
- {"version":3,"file":"authenticator-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-decorator.error.ts"],"names":[],"mappings":";;;AAAA,gDAAkD;AAGlD;;GAEG;AACH,MAAa,2BAA4B,SAAQ,sBAAa;IAE5D,YAAmB,OAAe,EAAE,aAAgD,EAAE,OAAY,EAAE,MAAW,EAC5F,WAAoB,EACpB,UAA+B;QAChD,KAAK,CAAC,OAAO,EAAE;YACb,OAAO;YACP,aAAa;YACb,OAAO;YACP,MAAM;YACN,WAAW;YACX,UAAU;SACX,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,2BAA2B,CAAC,SAAS,CAAC,CAAC;IACrE,CAAC;CACF;AAnBD,kEAmBC"}
1
+ {"version":3,"file":"authenticator-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-decorator.error.ts"],"names":[],"mappings":";;;AAAA,gDAAkD;AAGlD;;GAEG;AACH,MAAa,2BAA4B,SAAQ,sBAAa;IAE5D,YAAmB,OAAe,EAAE,aAAgD,EAAE,OAAY,EAAE,MAAW,EAC5F,WAAoB,EACpB,UAA+B;QAChD,KAAK,CAAC,OAAO,EAAE,EAAC,OAAO,EAAE;gBACvB,OAAO;gBACP,aAAa;gBACb,OAAO;gBACP,MAAM;gBACN,WAAW;gBACX,UAAU;aACX,EAAC,CAAC,CAAC;IAAE,CAAC;CACV;AAbD,kEAaC"}
@@ -5,16 +5,12 @@ const common_1 = require("@pristine-ts/common");
5
5
  /**
6
6
  * This Error is thrown when there's an error that happens when the authenticator are being initialized
7
7
  */
8
- class AuthenticatorInstantiationError extends common_1.LoggableError {
8
+ class AuthenticatorInstantiationError extends common_1.PristineError {
9
9
  constructor(message, instantiatedAuthenticator, authenticatorContext) {
10
- super(message, {
11
- instantiatedAuthenticator,
12
- authenticatorContext,
13
- });
14
- // Set the prototype explicitly.
15
- // As specified in the documentation in TypeScript
16
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
17
- Object.setPrototypeOf(this, AuthenticatorInstantiationError.prototype);
10
+ super(message, { details: {
11
+ instantiatedAuthenticator,
12
+ authenticatorContext,
13
+ } });
18
14
  }
19
15
  }
20
16
  exports.AuthenticatorInstantiationError = AuthenticatorInstantiationError;
@@ -1 +1 @@
1
- {"version":3,"file":"authenticator-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-instantiation.error.ts"],"names":[],"mappings":";;;AAAA,gDAAkD;AAGlD;;GAEG;AACH,MAAa,+BAAgC,SAAQ,sBAAa;IAGhE,YAAmB,OAAe,EAAE,yBAA4D,EAAE,oBAAyB;QACzH,KAAK,CAAC,OAAO,EAAE;YACb,yBAAyB;YACzB,oBAAoB;SACrB,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC;IACzE,CAAC;CACF;AAdD,0EAcC"}
1
+ {"version":3,"file":"authenticator-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/authenticator-instantiation.error.ts"],"names":[],"mappings":";;;AAAA,gDAAkD;AAGlD;;GAEG;AACH,MAAa,+BAAgC,SAAQ,sBAAa;IAGhE,YAAmB,OAAe,EAAE,yBAA4D,EAAE,oBAAyB;QACzH,KAAK,CAAC,OAAO,EAAE,EAAC,OAAO,EAAE;gBACvB,yBAAyB;gBACzB,oBAAoB;aACrB,EAAC,CAAC,CAAC;IAAE,CAAC;CACV;AARD,0EAQC"}
@@ -5,20 +5,16 @@ const common_1 = require("@pristine-ts/common");
5
5
  /**
6
6
  * This Error is thrown when there's an error that happens when the guards ere being initialized
7
7
  */
8
- class GuardDecoratorError extends common_1.LoggableError {
8
+ class GuardDecoratorError extends common_1.PristineError {
9
9
  constructor(message, guard, options, target, propertyKey, descriptor) {
10
- super(message, {
11
- message,
12
- guard,
13
- options,
14
- target,
15
- propertyKey,
16
- descriptor,
17
- });
18
- // Set the prototype explicitly.
19
- // As specified in the documentation in TypeScript
20
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
21
- Object.setPrototypeOf(this, GuardDecoratorError.prototype);
10
+ super(message, { details: {
11
+ message,
12
+ guard,
13
+ options,
14
+ target,
15
+ propertyKey,
16
+ descriptor,
17
+ } });
22
18
  }
23
19
  }
24
20
  exports.GuardDecoratorError = GuardDecoratorError;
@@ -1 +1 @@
1
- {"version":3,"file":"guard-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-decorator.error.ts"],"names":[],"mappings":";;;AAAA,gDAAkD;AAGlD;;GAEG;AACH,MAAa,mBAAoB,SAAQ,sBAAa;IAEpD,YAAmB,OAAe,EAAE,KAAgC,EAAE,OAAY,EAAE,MAAW,EAC5E,WAAoB,EACpB,UAA+B;QAChD,KAAK,CAAC,OAAO,EAAE;YACb,OAAO;YACP,KAAK;YACL,OAAO;YACP,MAAM;YACN,WAAW;YACX,UAAU;SACX,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC7D,CAAC;CACF;AAnBD,kDAmBC"}
1
+ {"version":3,"file":"guard-decorator.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-decorator.error.ts"],"names":[],"mappings":";;;AAAA,gDAAkD;AAGlD;;GAEG;AACH,MAAa,mBAAoB,SAAQ,sBAAa;IAEpD,YAAmB,OAAe,EAAE,KAAgC,EAAE,OAAY,EAAE,MAAW,EAC5E,WAAoB,EACpB,UAA+B;QAChD,KAAK,CAAC,OAAO,EAAE,EAAC,OAAO,EAAE;gBACvB,OAAO;gBACP,KAAK;gBACL,OAAO;gBACP,MAAM;gBACN,WAAW;gBACX,UAAU;aACX,EAAC,CAAC,CAAC;IAAE,CAAC;CACV;AAbD,kDAaC"}
@@ -5,16 +5,12 @@ const common_1 = require("@pristine-ts/common");
5
5
  /**
6
6
  * This Error is thrown when there's an error that happens when the guards ere being initialized
7
7
  */
8
- class GuardInstantiationError extends common_1.LoggableError {
8
+ class GuardInstantiationError extends common_1.PristineError {
9
9
  constructor(message, instantiatedGuard, guardContext) {
10
- super(message, {
11
- instantiatedGuard,
12
- guardContext,
13
- });
14
- // Set the prototype explicitly.
15
- // As specified in the documentation in TypeScript
16
- // https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
17
- Object.setPrototypeOf(this, GuardInstantiationError.prototype);
10
+ super(message, { details: {
11
+ instantiatedGuard,
12
+ guardContext,
13
+ } });
18
14
  }
19
15
  }
20
16
  exports.GuardInstantiationError = GuardInstantiationError;
@@ -1 +1 @@
1
- {"version":3,"file":"guard-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-instantiation.error.ts"],"names":[],"mappings":";;;AAAA,gDAAkD;AAGlD;;GAEG;AACH,MAAa,uBAAwB,SAAQ,sBAAa;IACxD,YAAmB,OAAe,EAAE,iBAA4C,EAAE,YAAiB;QACjG,KAAK,CAAC,OAAO,EAAE;YACb,iBAAiB;YACjB,YAAY;SACb,CAAC,CAAC;QAEH,gCAAgC;QAChC,kDAAkD;QAClD,gIAAgI;QAChI,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACjE,CAAC;CACF;AAZD,0DAYC"}
1
+ {"version":3,"file":"guard-instantiation.error.js","sourceRoot":"","sources":["../../../../src/errors/guard-instantiation.error.ts"],"names":[],"mappings":";;;AAAA,gDAAkD;AAGlD;;GAEG;AACH,MAAa,uBAAwB,SAAQ,sBAAa;IACxD,YAAmB,OAAe,EAAE,iBAA4C,EAAE,YAAiB;QACjG,KAAK,CAAC,OAAO,EAAE,EAAC,OAAO,EAAE;gBACvB,iBAAiB;gBACjB,YAAY;aACb,EAAC,CAAC,CAAC;IAAE,CAAC;CACV;AAND,0DAMC"}