@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/main.cjs +9 -4
- package/dist/main.cjs.map +1 -1
- package/dist/module.js +9 -4
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/main.cjs
CHANGED
|
@@ -15,7 +15,6 @@ var $dxT2C$officeparser = require("officeparser");
|
|
|
15
15
|
var $dxT2C$filetype = require("file-type");
|
|
16
16
|
var $dxT2C$pdfjsserverless = require("pdfjs-serverless");
|
|
17
17
|
var $dxT2C$langchaintextsplitters = require("@langchain/textsplitters");
|
|
18
|
-
var $dxT2C$nodestreamweb = require("node:stream/web");
|
|
19
18
|
|
|
20
19
|
function $parcel$interopDefault(a) {
|
|
21
20
|
return a && a.__esModule ? a.default : a;
|
|
@@ -1435,7 +1434,7 @@ async function $05e3378f7c17d263$var$parsePdf(buffer) {
|
|
|
1435
1434
|
return (0, $dxT2C$lodashes.join)(output, "\n");
|
|
1436
1435
|
}
|
|
1437
1436
|
async function $05e3378f7c17d263$var$parseDocument(file) {
|
|
1438
|
-
if (file) {
|
|
1437
|
+
if (file instanceof ReadableStream) {
|
|
1439
1438
|
const chunks = [];
|
|
1440
1439
|
for await (const chunk of file)chunks.push(Buffer.from(chunk));
|
|
1441
1440
|
const buffer = Buffer.concat(chunks);
|
|
@@ -1459,9 +1458,8 @@ function $fe4dcef142601b8c$export$e600492876ee595b(text, options = {
|
|
|
1459
1458
|
|
|
1460
1459
|
|
|
1461
1460
|
|
|
1462
|
-
|
|
1463
1461
|
async function $15c432f5f036a88a$var$getDataUri(file) {
|
|
1464
|
-
if (file instanceof
|
|
1462
|
+
if (file instanceof ReadableStream) {
|
|
1465
1463
|
const chunks = [];
|
|
1466
1464
|
for await (const chunk of file)chunks.push(Buffer.from(chunk));
|
|
1467
1465
|
const buffer = Buffer.concat(chunks);
|
|
@@ -1479,6 +1477,12 @@ async function $15c432f5f036a88a$var$getDataUri(file) {
|
|
|
1479
1477
|
var $15c432f5f036a88a$export$2e2bcd8739ae039 = $15c432f5f036a88a$var$getDataUri;
|
|
1480
1478
|
|
|
1481
1479
|
|
|
1480
|
+
async function $9a2529096849a04f$var$teeStream(stream) {
|
|
1481
|
+
return stream.tee();
|
|
1482
|
+
}
|
|
1483
|
+
var $9a2529096849a04f$export$2e2bcd8739ae039 = $9a2529096849a04f$var$teeStream;
|
|
1484
|
+
|
|
1485
|
+
|
|
1482
1486
|
function $af351c41b7fd6f79$export$2e2bcd8739ae039(expression) {
|
|
1483
1487
|
expression.registerFunction("dtFromIso", (0, $bab42b5e4be720d3$export$2e2bcd8739ae039));
|
|
1484
1488
|
expression.registerFunction("base64decode", (0, $77081a2d6d46cd50$export$2e2bcd8739ae039));
|
|
@@ -1559,6 +1563,7 @@ function $af351c41b7fd6f79$export$2e2bcd8739ae039(expression) {
|
|
|
1559
1563
|
expression.registerFunction("parseDocument", (0, $05e3378f7c17d263$export$2e2bcd8739ae039));
|
|
1560
1564
|
expression.registerFunction("recursiveCharacterTextSplitter", (0, $fe4dcef142601b8c$export$e600492876ee595b));
|
|
1561
1565
|
expression.registerFunction("getDataUri", (0, $15c432f5f036a88a$export$2e2bcd8739ae039));
|
|
1566
|
+
expression.registerFunction("teeStream", (0, $9a2529096849a04f$export$2e2bcd8739ae039));
|
|
1562
1567
|
return expression;
|
|
1563
1568
|
}
|
|
1564
1569
|
|