@digitaldefiance/ecies-lib 3.0.1 → 3.0.3

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/README.md CHANGED
@@ -712,6 +712,14 @@ const passwordLogin = new PasswordLoginService(ecies, pbkdf2);
712
712
 
713
713
  ## ChangeLog
714
714
 
715
+ ### v3.0.3
716
+
717
+ - Slight tweak to InvalidEmailError
718
+
719
+ ### v3.0.2
720
+
721
+ - Update test-utils
722
+
715
723
  ### v3.0.1
716
724
 
717
725
  - Fix strings mainly
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/ecies-lib",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Digital Defiance ECIES Library",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -54,7 +54,7 @@
54
54
  "ts-brand": "^0.2.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@digitaldefiance/express-suite-test-utils": "1.0.9"
57
+ "@digitaldefiance/express-suite-test-utils": "1.0.10"
58
58
  },
59
59
  "type": "commonjs"
60
60
  }
@@ -2,6 +2,7 @@ import { InvalidEmailErrorType } from '../enumerations/invalid-email-type';
2
2
  import { HandleableErrorOptions, TypedHandleableError } from '@digitaldefiance/i18n-lib';
3
3
  import { EciesStringKey } from '../enumerations/ecies-string-key';
4
4
  export declare class InvalidEmailError extends TypedHandleableError<typeof InvalidEmailErrorType, EciesStringKey> {
5
- constructor(type: InvalidEmailErrorType, options?: HandleableErrorOptions, language?: string);
5
+ readonly email?: string;
6
+ constructor(type: InvalidEmailErrorType, email?: string, options?: HandleableErrorOptions, language?: string);
6
7
  }
7
8
  //# sourceMappingURL=invalid-email.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-email.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-ecies-lib/src/errors/invalid-email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAkB,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGlE,qBAAa,iBAAkB,SAAQ,oBAAoB,CAAC,OAAO,qBAAqB,EAAE,cAAc,CAAC;gBAC3F,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,sBAAsB,EAAE,QAAQ,CAAC,EAAE,MAAM;CAY7F"}
1
+ {"version":3,"file":"invalid-email.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-ecies-lib/src/errors/invalid-email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAkB,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGlE,qBAAa,iBAAkB,SAAQ,oBAAoB,CAAC,OAAO,qBAAqB,EAAE,cAAc,CAAC;IACvG,SAAgB,KAAK,CAAC,EAAE,MAAM,CAAC;gBACnB,IAAI,EAAE,qBAAqB,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,EAAE,QAAQ,CAAC,EAAE,MAAM;CAe7G"}
@@ -5,9 +5,13 @@ const invalid_email_type_1 = require("../enumerations/invalid-email-type");
5
5
  const i18n_lib_1 = require("@digitaldefiance/i18n-lib");
6
6
  const i18n_setup_1 = require("../i18n-setup");
7
7
  class InvalidEmailError extends i18n_lib_1.TypedHandleableError {
8
- constructor(type, options, language) {
8
+ email;
9
+ constructor(type, email, options, language) {
9
10
  const source = options?.cause instanceof Error ? options.cause : new Error();
10
- super(i18n_setup_1.EciesComponentId, type, (0, i18n_lib_1.buildReasonMap)(invalid_email_type_1.InvalidEmailErrorType, ['Error', 'InvalidEmailError']), source, { statusCode: 422, ...options }, language);
11
+ super(i18n_setup_1.EciesComponentId, type, (0, i18n_lib_1.buildReasonMap)(invalid_email_type_1.InvalidEmailErrorType, ['Error', 'InvalidEmailError']), source, { statusCode: 422, ...options }, language, {
12
+ email: email ?? ''
13
+ });
14
+ this.email = email;
11
15
  this.name = 'InvalidEmailError';
12
16
  }
13
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"invalid-email.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-ecies-lib/src/errors/invalid-email.ts"],"names":[],"mappings":";;;AAAA,2EAA2E;AAC3E,wDAAyG;AAEzG,8CAAiD;AAEjD,MAAa,iBAAkB,SAAQ,+BAAkE;IACvG,YAAY,IAA2B,EAAE,OAAgC,EAAE,QAAiB;QAC1F,MAAM,MAAM,GAAG,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC;QAC7E,KAAK,CACH,6BAAgB,EAChB,IAAI,EACJ,IAAA,yBAAc,EAA+C,0CAAqB,EAAE,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC,EACnH,MAAM,EACN,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,EAC/B,QAAQ,CACT,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAbD,8CAaC"}
1
+ {"version":3,"file":"invalid-email.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-ecies-lib/src/errors/invalid-email.ts"],"names":[],"mappings":";;;AAAA,2EAA2E;AAC3E,wDAAyG;AAEzG,8CAAiD;AAEjD,MAAa,iBAAkB,SAAQ,+BAAkE;IACvF,KAAK,CAAU;IAC/B,YAAY,IAA2B,EAAE,KAAc,EAAE,OAAgC,EAAE,QAAiB;QAC1G,MAAM,MAAM,GAAG,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC;QAC7E,KAAK,CACH,6BAAgB,EAChB,IAAI,EACJ,IAAA,yBAAc,EAA+C,0CAAqB,EAAE,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC,EACnH,MAAM,EACN,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,EAC/B,QAAQ,EAAE;YACR,KAAK,EAAE,KAAK,IAAI,EAAE;SACnB,CACF,CAAC;QACF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAjBD,8CAiBC"}