mp-front-cli 0.0.67 → 0.0.68

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.
@@ -1,12 +1,12 @@
1
1
  var o = Object.defineProperty;
2
2
  var c = (r, e, t) => e in r ? o(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var a = (r, e, t) => (c(r, typeof e != "symbol" ? e + "" : e, t), t);
4
- import i, { JWE as E } from "node-jose";
5
- import { createHash as y } from "crypto";
6
- import { CustomEncoder as p } from "./mp-front-cli-encoder.es.js";
4
+ import i from "node-jose";
5
+ import { createHash as E } from "crypto";
6
+ import { CustomEncoder as y } from "./mp-front-cli-encoder.es.js";
7
7
  import "./mp-front-cli-logger.es.js";
8
- const u = (r) => r.replace(/[\u00A0-\uffff]/gu, (e) => "\\u" + ("000" + e.charCodeAt(0).toString(16)).slice(-4));
9
- class T extends p {
8
+ const p = (r) => r.replace(/[\u00A0-\uffff]/gu, (e) => "\\u" + ("000" + e.charCodeAt(0).toString(16)).slice(-4));
9
+ class l extends y {
10
10
  constructor() {
11
11
  super(...arguments);
12
12
  a(this, "signatureKey");
@@ -23,8 +23,8 @@ class T extends p {
23
23
  async encrypt(t) {
24
24
  if (await this.generateKey(), !this.signatureKey)
25
25
  throw new Error("PLEASE CREATE A KEY TO ENCRYPT 🙂");
26
- const n = JSON.stringify(t), s = u(n);
27
- return await E.createEncrypt(
26
+ const n = JSON.stringify(t), s = p(n);
27
+ return await i.JWE.createEncrypt(
28
28
  { format: "compact" },
29
29
  this.signatureKey
30
30
  ).update(s).final();
@@ -47,9 +47,9 @@ class T extends p {
47
47
  }
48
48
  generateSHA(t) {
49
49
  const n = JSON.stringify(t);
50
- return y("sha256").update(n).digest("hex");
50
+ return E("sha256").update(n).digest("hex");
51
51
  }
52
52
  }
53
53
  export {
54
- T as CustomEncrypter
54
+ l as CustomEncrypter
55
55
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-front-cli",
3
- "version": "0.0.67",
3
+ "version": "0.0.68",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {