@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/module.js CHANGED
@@ -6,7 +6,6 @@ import {diceCoefficient as $hgUW1$diceCoefficient} from "dice-coefficient";
6
6
  import {createDocument as $hgUW1$createDocument} from "@mixmark-io/domino";
7
7
  import $hgUW1$turndown from "turndown";
8
8
  import {gfm as $hgUW1$gfm} from "turndown-plugin-gfm";
9
- import {webcrypto as $hgUW1$webcrypto} from "crypto";
10
9
  import {xml2js as $hgUW1$xml2js, js2xml as $hgUW1$js2xml} from "xml-js";
11
10
  import $hgUW1$json2md from "json2md";
12
11
  import $hgUW1$mime from "mime";
@@ -852,11 +851,10 @@ function $6910bb94876d8cd6$export$2e2bcd8739ae039(buffer, urlSafe = false) {
852
851
  }
853
852
 
854
853
 
855
-
856
854
  const $07f7ad31d6a8cbdd$var$digest = async (text, algorithm = "SHA-256", stringType = "hex")=>{
857
855
  const encoder = new TextEncoder();
858
856
  const data = encoder.encode(text);
859
- const hashBuffer = await (0, $hgUW1$webcrypto).subtle.digest(algorithm, data);
857
+ const hashBuffer = await crypto.subtle.digest(algorithm, data);
860
858
  if (stringType === "hex") {
861
859
  const hashArray = Array.from(new Uint8Array(hashBuffer));
862
860
  return hashArray.map((b)=>b.toString(16).padStart(2, "0")).join("");
@@ -1010,9 +1008,8 @@ var $1d16c841f49064ff$export$2e2bcd8739ae039 = $1d16c841f49064ff$var$convertNoti
1010
1008
 
1011
1009
 
1012
1010
 
1013
-
1014
1011
  const $9e0fe82470a4aa3f$var$sign = async (text, algorithm = "SHA-256", secret, outputFormat = "hex")=>{
1015
- const key = await (0, $hgUW1$webcrypto).subtle.importKey("raw", new TextEncoder().encode(secret), {
1012
+ const key = await crypto.subtle.importKey("raw", new TextEncoder().encode(secret), {
1016
1013
  name: "HMAC",
1017
1014
  hash: algorithm
1018
1015
  }, false, [
@@ -1020,7 +1017,7 @@ const $9e0fe82470a4aa3f$var$sign = async (text, algorithm = "SHA-256", secret, o
1020
1017
  ]);
1021
1018
  const encoder = new TextEncoder();
1022
1019
  const data = encoder.encode(text);
1023
- const hashBuffer = await (0, $hgUW1$webcrypto).subtle.sign("HMAC", key, data);
1020
+ const hashBuffer = await crypto.subtle.sign("HMAC", key, data);
1024
1021
  if (outputFormat === "hex") {
1025
1022
  const hashArray = Array.from(new Uint8Array(hashBuffer));
1026
1023
  return hashArray.map((b)=>b.toString(16).padStart(2, "0")).join("");