@truto/truto-jsonata 1.0.11 → 1.0.12

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
@@ -16,7 +16,6 @@ import {parseOfficeAsync as $hgUW1$parseOfficeAsync} from "officeparser";
16
16
  import {fileTypeFromBuffer as $hgUW1$fileTypeFromBuffer} from "file-type";
17
17
  import {resolvePDFJS as $hgUW1$resolvePDFJS} from "pdfjs-serverless";
18
18
  import {RecursiveCharacterTextSplitter as $hgUW1$RecursiveCharacterTextSplitter} from "@langchain/textsplitters";
19
- import {ReadableStream as $hgUW1$ReadableStream} from "node:stream/web";
20
19
 
21
20
  function $parcel$interopDefault(a) {
22
21
  return a && a.__esModule ? a.default : a;
@@ -1428,7 +1427,7 @@ async function $f29f00a7536a3143$var$parsePdf(buffer) {
1428
1427
  return (0, $hgUW1$join)(output, "\n");
1429
1428
  }
1430
1429
  async function $f29f00a7536a3143$var$parseDocument(file) {
1431
- if (file) {
1430
+ if (file instanceof ReadableStream) {
1432
1431
  const chunks = [];
1433
1432
  for await (const chunk of file)chunks.push($f29f00a7536a3143$require$Buffer.from(chunk));
1434
1433
  const buffer = $f29f00a7536a3143$require$Buffer.concat(chunks);
@@ -1453,10 +1452,9 @@ function $a12871c9a32cbf3b$export$e600492876ee595b(text, options = {
1453
1452
 
1454
1453
 
1455
1454
 
1456
-
1457
1455
  var $6b4f9d8bcf8ab446$require$Buffer = $hgUW1$Buffer;
1458
1456
  async function $6b4f9d8bcf8ab446$var$getDataUri(file) {
1459
- if (file instanceof (0, $hgUW1$ReadableStream)) {
1457
+ if (file instanceof ReadableStream) {
1460
1458
  const chunks = [];
1461
1459
  for await (const chunk of file)chunks.push($6b4f9d8bcf8ab446$require$Buffer.from(chunk));
1462
1460
  const buffer = $6b4f9d8bcf8ab446$require$Buffer.concat(chunks);
@@ -1474,6 +1472,12 @@ async function $6b4f9d8bcf8ab446$var$getDataUri(file) {
1474
1472
  var $6b4f9d8bcf8ab446$export$2e2bcd8739ae039 = $6b4f9d8bcf8ab446$var$getDataUri;
1475
1473
 
1476
1474
 
1475
+ async function $5e08a3608e719b52$var$teeStream(stream) {
1476
+ return stream.tee();
1477
+ }
1478
+ var $5e08a3608e719b52$export$2e2bcd8739ae039 = $5e08a3608e719b52$var$teeStream;
1479
+
1480
+
1477
1481
  function $3e1c03caddb74419$export$2e2bcd8739ae039(expression) {
1478
1482
  expression.registerFunction("dtFromIso", (0, $9e00534fc92334a4$export$2e2bcd8739ae039));
1479
1483
  expression.registerFunction("base64decode", (0, $52da679a67e0b066$export$2e2bcd8739ae039));
@@ -1554,6 +1558,7 @@ function $3e1c03caddb74419$export$2e2bcd8739ae039(expression) {
1554
1558
  expression.registerFunction("parseDocument", (0, $f29f00a7536a3143$export$2e2bcd8739ae039));
1555
1559
  expression.registerFunction("recursiveCharacterTextSplitter", (0, $a12871c9a32cbf3b$export$e600492876ee595b));
1556
1560
  expression.registerFunction("getDataUri", (0, $6b4f9d8bcf8ab446$export$2e2bcd8739ae039));
1561
+ expression.registerFunction("teeStream", (0, $5e08a3608e719b52$export$2e2bcd8739ae039));
1557
1562
  return expression;
1558
1563
  }
1559
1564