@heripo/pdf-parser 0.1.16 → 0.1.17

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/index.d.cts CHANGED
@@ -132,12 +132,6 @@ declare class PDFParser {
132
132
  private environment?;
133
133
  constructor(options: Options);
134
134
  init(): Promise<void>;
135
- private checkOperatingSystem;
136
- private checkJqInstalled;
137
- private checkPopplerInstalled;
138
- private checkMacOSVersion;
139
- private checkImageMagickInstalled;
140
- private checkGhostscriptInstalled;
141
135
  /**
142
136
  * Check if an error is a connection refused error (ECONNREFUSED).
143
137
  * This typically indicates the Docling server has crashed.
@@ -155,13 +149,10 @@ declare class PDFParser {
155
149
  private waitForServerReady;
156
150
  parse(url: string, reportId: string, onComplete: ConversionCompleteCallback, cleanupAfterCallback: boolean, options: PDFConvertOptions, abortSignal?: AbortSignal): Promise<TokenUsageReport | null>;
157
151
  /**
158
- * Parse a PDF using OCR strategy sampling to decide between ocrmac and VLM.
159
- * Delegates to PDFConverter.convertWithStrategy() and returns the token usage report.
160
- *
161
- * Server recovery (restart on ECONNREFUSED) is preserved because
162
- * the ocrmac path still uses the Docling server.
152
+ * Execute a function with automatic server recovery on ECONNREFUSED errors.
153
+ * Recovery is only attempted in local server mode (no baseUrl, port defined).
163
154
  */
164
- private parseWithStrategy;
155
+ private executeWithRecovery;
165
156
  /**
166
157
  * Dispose the parser instance.
167
158
  * - Sets the internal client to null
package/dist/index.d.ts CHANGED
@@ -132,12 +132,6 @@ declare class PDFParser {
132
132
  private environment?;
133
133
  constructor(options: Options);
134
134
  init(): Promise<void>;
135
- private checkOperatingSystem;
136
- private checkJqInstalled;
137
- private checkPopplerInstalled;
138
- private checkMacOSVersion;
139
- private checkImageMagickInstalled;
140
- private checkGhostscriptInstalled;
141
135
  /**
142
136
  * Check if an error is a connection refused error (ECONNREFUSED).
143
137
  * This typically indicates the Docling server has crashed.
@@ -155,13 +149,10 @@ declare class PDFParser {
155
149
  private waitForServerReady;
156
150
  parse(url: string, reportId: string, onComplete: ConversionCompleteCallback, cleanupAfterCallback: boolean, options: PDFConvertOptions, abortSignal?: AbortSignal): Promise<TokenUsageReport | null>;
157
151
  /**
158
- * Parse a PDF using OCR strategy sampling to decide between ocrmac and VLM.
159
- * Delegates to PDFConverter.convertWithStrategy() and returns the token usage report.
160
- *
161
- * Server recovery (restart on ECONNREFUSED) is preserved because
162
- * the ocrmac path still uses the Docling server.
152
+ * Execute a function with automatic server recovery on ECONNREFUSED errors.
153
+ * Recovery is only attempted in local server mode (no baseUrl, port defined).
163
154
  */
164
- private parseWithStrategy;
155
+ private executeWithRecovery;
165
156
  /**
166
157
  * Dispose the parser instance.
167
158
  * - Sets the internal client to null