@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 CHANGED
@@ -22,7 +22,7 @@
22
22
  <img src="https://img.shields.io/maven-central/v/dev.kreuzberg/kreuzberg?label=Java&color=007ec6" alt="Java">
23
23
  </a>
24
24
  <a href="https://github.com/kreuzberg-dev/kreuzberg/releases">
25
- <img src="https://img.shields.io/github/v/tag/kreuzberg-dev/kreuzberg?label=Go&color=007ec6&filter=v4.2.4" alt="Go">
25
+ <img src="https://img.shields.io/github/v/tag/kreuzberg-dev/kreuzberg?label=Go&color=007ec6&filter=v4.2.6" alt="Go">
26
26
  </a>
27
27
  <a href="https://www.nuget.org/packages/Kreuzberg/">
28
28
  <img src="https://img.shields.io/nuget/v/Kreuzberg?label=C%23&color=007ec6" alt="C#">
package/dist/index.d.mts CHANGED
@@ -1200,6 +1200,6 @@ declare function __resetBindingForTests(): void;
1200
1200
  * @module @kreuzberg/node
1201
1201
  */
1202
1202
 
1203
- declare const __version__ = "4.2.4";
1203
+ declare const __version__ = "4.2.6";
1204
1204
 
1205
1205
  export { type EmbeddingPreset, ErrorClassification, ExtractionConfig, ExtractionResult, OcrBackendProtocol, PanicContext, PostProcessorProtocol, ValidatorProtocol, WorkerPool, WorkerPoolStats, __resetBindingForTests, __setBindingForTests, __version__, batchExtractBytes, batchExtractBytesSync, batchExtractFiles, batchExtractFilesInWorker, batchExtractFilesSync, classifyError, clearDocumentExtractors, clearOcrBackends, clearPostProcessors, clearValidators, closeWorkerPool, createWorkerPool, detectMimeType, detectMimeTypeFromPath, extractBytes, extractBytesSync, extractFile, extractFileInWorker, extractFileSync, getEmbeddingPreset, getErrorCodeDescription, getErrorCodeName, getExtensionsForMime, getLastErrorCode, getLastPanicContext, getWorkerPoolStats, listDocumentExtractors, listEmbeddingPresets, listOcrBackends, listPostProcessors, listValidators, loadConfigFile, loadConfigFromPath, registerOcrBackend, registerPostProcessor, registerValidator, unregisterDocumentExtractor, unregisterOcrBackend, unregisterPostProcessor, unregisterValidator, validateMimeType };
package/dist/index.d.ts CHANGED
@@ -1200,6 +1200,6 @@ declare function __resetBindingForTests(): void;
1200
1200
  * @module @kreuzberg/node
1201
1201
  */
1202
1202
 
1203
- declare const __version__ = "4.2.4";
1203
+ declare const __version__ = "4.2.6";
1204
1204
 
1205
1205
  export { type EmbeddingPreset, ErrorClassification, ExtractionConfig, ExtractionResult, OcrBackendProtocol, PanicContext, PostProcessorProtocol, ValidatorProtocol, WorkerPool, WorkerPoolStats, __resetBindingForTests, __setBindingForTests, __version__, batchExtractBytes, batchExtractBytesSync, batchExtractFiles, batchExtractFilesInWorker, batchExtractFilesSync, classifyError, clearDocumentExtractors, clearOcrBackends, clearPostProcessors, clearValidators, closeWorkerPool, createWorkerPool, detectMimeType, detectMimeTypeFromPath, extractBytes, extractBytesSync, extractFile, extractFileInWorker, extractFileSync, getEmbeddingPreset, getErrorCodeDescription, getErrorCodeName, getExtensionsForMime, getLastErrorCode, getLastPanicContext, getWorkerPoolStats, listDocumentExtractors, listEmbeddingPresets, listOcrBackends, listPostProcessors, listValidators, loadConfigFile, loadConfigFromPath, registerOcrBackend, registerPostProcessor, registerValidator, unregisterDocumentExtractor, unregisterOcrBackend, unregisterPostProcessor, unregisterValidator, validateMimeType };
package/dist/index.js CHANGED
@@ -91,6 +91,12 @@ module.exports = __toCommonJS(index_exports);
91
91
  // typescript/core/binding.ts
92
92
  var import_node_module = require("module");
93
93
  var import_meta = {};
94
+ function isNapiRuntime() {
95
+ if (typeof process === "undefined") return false;
96
+ if (process.versions?.["bun"]) return true;
97
+ if (process.versions?.node) return true;
98
+ return false;
99
+ }
94
100
  var binding = null;
95
101
  var bindingInitialized = false;
96
102
  function createNativeBindingError(error) {
@@ -167,7 +173,7 @@ function getBinding() {
167
173
  return binding;
168
174
  }
169
175
  try {
170
- if (typeof process !== "undefined" && process.versions && process.versions.node) {
176
+ if (isNapiRuntime()) {
171
177
  binding = loadNativeBinding();
172
178
  bindingInitialized = true;
173
179
  return binding;
@@ -528,6 +534,8 @@ function normalizeExtractionConfig(config) {
528
534
  setIfDefined(normalized, "pages", pages);
529
535
  const htmlOptions = normalizeHtmlOptions(config.htmlOptions);
530
536
  setIfDefined(normalized, "htmlOptions", htmlOptions);
537
+ setIfDefined(normalized, "outputFormat", config.outputFormat);
538
+ setIfDefined(normalized, "resultFormat", config.resultFormat);
531
539
  return normalized;
532
540
  }
533
541
 
@@ -1364,7 +1372,7 @@ function getEmbeddingPreset(name) {
1364
1372
  }
1365
1373
 
1366
1374
  // typescript/index.ts
1367
- var __version__ = "4.2.4";
1375
+ var __version__ = "4.2.6";
1368
1376
  // Annotate the CommonJS export names for ESM import in node:
1369
1377
  0 && (module.exports = {
1370
1378
  CacheError,