@uploadista/flow-documents-nodes 0.0.16-beta.2
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/.turbo/turbo-build.log +16 -0
- package/LICENSE +21 -0
- package/README.md +57 -0
- package/dist/index.d.mts +1177 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +396 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +32 -0
- package/src/convert-to-markdown-node.ts +156 -0
- package/src/describe-document-node.ts +92 -0
- package/src/extract-text-node.ts +90 -0
- package/src/index.ts +27 -0
- package/src/merge-pdf-node.ts +144 -0
- package/src/ocr-node.ts +111 -0
- package/src/split-pdf-node.ts +176 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @uploadista/flow-documents-nodes@0.0.1 build /Users/denislaboureyras/Documents/uploadista/dev/uploadista-workspace/uploadista-sdk/packages/flow/documents/nodes
|
|
4
|
+
> tsdown
|
|
5
|
+
|
|
6
|
+
[34mℹ[39m tsdown [2mv0.16.5[22m powered by rolldown [2mv1.0.0-beta.50[22m
|
|
7
|
+
[34mℹ[39m entry: [34msrc/index.ts[39m
|
|
8
|
+
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
9
|
+
[34mℹ[39m Build start
|
|
10
|
+
[34mℹ[39m Cleaning 4 files
|
|
11
|
+
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m15.42 kB[22m [2m│ gzip: 2.85 kB[22m
|
|
12
|
+
[34mℹ[39m [2mdist/[22mindex.mjs.map [2m33.62 kB[22m [2m│ gzip: 5.72 kB[22m
|
|
13
|
+
[34mℹ[39m [2mdist/[22mindex.d.mts.map [2m 6.54 kB[22m [2m│ gzip: 0.87 kB[22m
|
|
14
|
+
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m32.65 kB[22m [2m│ gzip: 1.51 kB[22m
|
|
15
|
+
[34mℹ[39m 4 files, total: 88.23 kB
|
|
16
|
+
[32m✔[39m Build complete in [32m5406ms[39m
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 uploadista
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# @uploadista/flow-documents-nodes
|
|
2
|
+
|
|
3
|
+
Document processing nodes for Uploadista Flow engine.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **OCR Node**: Extract text from scanned documents and images using AI
|
|
8
|
+
- **Extract Text Node**: Extract plain text from searchable PDFs
|
|
9
|
+
- **Split PDF Node**: Split PDFs by page range or into individual pages
|
|
10
|
+
- **Merge PDF Node**: Combine multiple PDFs into a single document
|
|
11
|
+
- **Describe Document Node**: Extract document metadata
|
|
12
|
+
- **Convert to Markdown Node**: Convert documents to Markdown format
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm add @uploadista/flow-documents-nodes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import {
|
|
24
|
+
createOcrNode,
|
|
25
|
+
createExtractTextNode,
|
|
26
|
+
createSplitPdfNode,
|
|
27
|
+
createMergePdfNode,
|
|
28
|
+
createDescribeDocumentNode,
|
|
29
|
+
createConvertToMarkdownNode,
|
|
30
|
+
} from "@uploadista/flow-documents-nodes";
|
|
31
|
+
|
|
32
|
+
// Create an OCR node
|
|
33
|
+
const ocrNode = yield* createOcrNode("ocr-1", {
|
|
34
|
+
taskType: "convertToMarkdown",
|
|
35
|
+
resolution: "gundam",
|
|
36
|
+
credentialId: "replicate-credential-id",
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Create an extract text node
|
|
40
|
+
const extractNode = yield* createExtractTextNode("extract-1", {});
|
|
41
|
+
|
|
42
|
+
// Create a split PDF node
|
|
43
|
+
const splitNode = yield* createSplitPdfNode("split-1", {
|
|
44
|
+
mode: "range",
|
|
45
|
+
startPage: 1,
|
|
46
|
+
endPage: 5,
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Requirements
|
|
51
|
+
|
|
52
|
+
- **DocumentPlugin**: Required for PDF operations (split, merge, extract text, metadata)
|
|
53
|
+
- **DocumentAiPlugin**: Required for OCR operations
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT
|