@truto/truto-jsonata 1.0.2 → 1.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/dist/main.cjs CHANGED
@@ -6,7 +6,6 @@ var $dxT2C$dicecoefficient = require("dice-coefficient");
6
6
  var $dxT2C$mixmarkiodomino = require("@mixmark-io/domino");
7
7
  var $dxT2C$turndown = require("turndown");
8
8
  var $dxT2C$turndownplugingfm = require("turndown-plugin-gfm");
9
- var $dxT2C$crypto = require("crypto");
10
9
  var $dxT2C$xmljs = require("xml-js");
11
10
  var $dxT2C$json2md = require("json2md");
12
11
  var $dxT2C$mime = require("mime");
@@ -862,11 +861,10 @@ function $c9ed3be7896125da$export$2e2bcd8739ae039(buffer, urlSafe = false) {
862
861
  }
863
862
 
864
863
 
865
-
866
864
  const $1cf667e257c1904d$var$digest = async (text, algorithm = "SHA-256", stringType = "hex")=>{
867
865
  const encoder = new TextEncoder();
868
866
  const data = encoder.encode(text);
869
- const hashBuffer = await (0, $dxT2C$crypto.webcrypto).subtle.digest(algorithm, data);
867
+ const hashBuffer = await crypto.subtle.digest(algorithm, data);
870
868
  if (stringType === "hex") {
871
869
  const hashArray = Array.from(new Uint8Array(hashBuffer));
872
870
  return hashArray.map((b)=>b.toString(16).padStart(2, "0")).join("");
@@ -1020,9 +1018,8 @@ var $6c8155c4308ceae8$export$2e2bcd8739ae039 = $6c8155c4308ceae8$var$convertNoti
1020
1018
 
1021
1019
 
1022
1020
 
1023
-
1024
1021
  const $256af523deaf5315$var$sign = async (text, algorithm = "SHA-256", secret, outputFormat = "hex")=>{
1025
- const key = await (0, $dxT2C$crypto.webcrypto).subtle.importKey("raw", new TextEncoder().encode(secret), {
1022
+ const key = await crypto.subtle.importKey("raw", new TextEncoder().encode(secret), {
1026
1023
  name: "HMAC",
1027
1024
  hash: algorithm
1028
1025
  }, false, [
@@ -1030,7 +1027,7 @@ const $256af523deaf5315$var$sign = async (text, algorithm = "SHA-256", secret, o
1030
1027
  ]);
1031
1028
  const encoder = new TextEncoder();
1032
1029
  const data = encoder.encode(text);
1033
- const hashBuffer = await (0, $dxT2C$crypto.webcrypto).subtle.sign("HMAC", key, data);
1030
+ const hashBuffer = await crypto.subtle.sign("HMAC", key, data);
1034
1031
  if (outputFormat === "hex") {
1035
1032
  const hashArray = Array.from(new Uint8Array(hashBuffer));
1036
1033
  return hashArray.map((b)=>b.toString(16).padStart(2, "0")).join("");