@doclo/core 0.2.3 → 0.2.4

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
@@ -1,33 +1,34 @@
1
1
  # @doclo/core
2
2
 
3
- Core types, utilities, and security features for the Doclo SDK.
3
+ Core types, utilities, and runtime features for the Doclo SDK.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @doclo/core
9
- # or
10
8
  pnpm add @doclo/core
11
9
  ```
12
10
 
13
11
  ## Features
14
12
 
15
- - Core type definitions for document processing
16
- - Security utilities (SSRF protection, input validation)
13
+ - Core type definitions (DocumentIR, FlowInput, providers)
14
+ - Validation utilities (JSON schema validation, node compatibility)
15
+ - Security utilities (SSRF protection, safe JSON parsing)
17
16
  - Runtime utilities (crypto, base64, environment detection)
18
- - Observability helpers for tracing and metrics
19
- - PDF utilities for document manipulation
17
+ - PDF utilities (page counting, splitting)
18
+ - Observability helpers (tracing, metrics)
20
19
 
21
20
  ## Exports
22
21
 
23
- - `.` - Main entry point with core types and utilities
24
- - `./validation` - Input validation utilities
25
- - `./security` - Security helpers (fetchWithTimeout, validateUrl, safeJsonParse)
26
- - `./observability` - Tracing and metrics helpers
27
- - `./runtime/crypto` - Cryptographic utilities
28
- - `./runtime/base64` - Base64 encoding/decoding
29
- - `./runtime/env` - Environment detection
30
- - `./pdf-utils` - PDF manipulation utilities
22
+ | Export Path | Description |
23
+ |-------------|-------------|
24
+ | `.` | Core types, validation, file utilities |
25
+ | `./validation` | Input validation utilities |
26
+ | `./security` | SSRF protection, fetchWithTimeout, safeJsonParse |
27
+ | `./observability` | Tracing and metrics hooks |
28
+ | `./runtime/crypto` | Cryptographic utilities |
29
+ | `./runtime/base64` | Base64 encoding/decoding |
30
+ | `./runtime/env` | Environment detection |
31
+ | `./pdf-utils` | PDF manipulation utilities |
31
32
 
32
33
  ## License
33
34
 
package/dist/index.js CHANGED
@@ -610,7 +610,7 @@ function validateJson(data, schema) {
610
610
  const dangerousProps = ["__proto__", "constructor", "prototype"];
611
611
  if (schema2.additionalProperties === false && schema2.properties) {
612
612
  const allowedProps = Object.keys(schema2.properties);
613
- const requiredProps = schema2.required || [];
613
+ const requiredProps = Array.isArray(schema2.required) ? schema2.required : [];
614
614
  const allAllowedProps = /* @__PURE__ */ new Set([...allowedProps, ...requiredProps]);
615
615
  for (const key of [...Object.keys(value), ...Object.getOwnPropertyNames(value)]) {
616
616
  if (dangerousProps.includes(key)) {