@kreuzberg/node 4.2.4 → 4.2.6
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/README.md +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/index.d.ts +23 -0
- package/index.js +52 -52
- package/package.json +7 -6
package/dist/index.mjs
CHANGED
|
@@ -7,6 +7,12 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
|
|
8
8
|
// typescript/core/binding.ts
|
|
9
9
|
import { createRequire } from "module";
|
|
10
|
+
function isNapiRuntime() {
|
|
11
|
+
if (typeof process === "undefined") return false;
|
|
12
|
+
if (process.versions?.["bun"]) return true;
|
|
13
|
+
if (process.versions?.node) return true;
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
10
16
|
var binding = null;
|
|
11
17
|
var bindingInitialized = false;
|
|
12
18
|
function createNativeBindingError(error) {
|
|
@@ -83,7 +89,7 @@ function getBinding() {
|
|
|
83
89
|
return binding;
|
|
84
90
|
}
|
|
85
91
|
try {
|
|
86
|
-
if (
|
|
92
|
+
if (isNapiRuntime()) {
|
|
87
93
|
binding = loadNativeBinding();
|
|
88
94
|
bindingInitialized = true;
|
|
89
95
|
return binding;
|
|
@@ -444,6 +450,8 @@ function normalizeExtractionConfig(config) {
|
|
|
444
450
|
setIfDefined(normalized, "pages", pages);
|
|
445
451
|
const htmlOptions = normalizeHtmlOptions(config.htmlOptions);
|
|
446
452
|
setIfDefined(normalized, "htmlOptions", htmlOptions);
|
|
453
|
+
setIfDefined(normalized, "outputFormat", config.outputFormat);
|
|
454
|
+
setIfDefined(normalized, "resultFormat", config.resultFormat);
|
|
447
455
|
return normalized;
|
|
448
456
|
}
|
|
449
457
|
|
|
@@ -1280,7 +1288,7 @@ function getEmbeddingPreset(name) {
|
|
|
1280
1288
|
}
|
|
1281
1289
|
|
|
1282
1290
|
// typescript/index.ts
|
|
1283
|
-
var __version__ = "4.2.
|
|
1291
|
+
var __version__ = "4.2.6";
|
|
1284
1292
|
export {
|
|
1285
1293
|
CacheError,
|
|
1286
1294
|
ErrorCode,
|