@uploadista/flow-documents-plugin 0.0.20-beta.8 → 0.0.20
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 +15 -15
- package/README.md +4 -4
- package/dist/index.d.mts +2 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/document-plugin.ts +29 -30
- package/src/index.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[34mℹ[39m
|
|
7
|
-
[34mℹ[39m
|
|
8
|
-
[34mℹ[39m
|
|
9
|
-
[34mℹ[39m
|
|
10
|
-
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [
|
|
11
|
-
[34mℹ[39m [2mdist/[22mindex.mjs.map [2m1.
|
|
12
|
-
[34mℹ[39m [2mdist/[22mindex.d.mts.map [2m0.
|
|
13
|
-
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m0.
|
|
14
|
-
[34mℹ[39m 4 files, total: 3.
|
|
15
|
-
[32m✔[39m Build complete in [
|
|
1
|
+
|
|
2
|
+
> @uploadista/flow-documents-plugin@0.0.20-beta.9 build /Users/denislaboureyras/Documents/uploadista/dev/uploadista-workspace/uploadista-sdk/packages/flow/documents/plugin
|
|
3
|
+
> tsc --noEmit && tsdown
|
|
4
|
+
|
|
5
|
+
[34mℹ[39m tsdown [2mv0.18.0[22m powered by rolldown [2mv1.0.0-beta.53[22m
|
|
6
|
+
[34mℹ[39m entry: [34msrc/index.ts[39m
|
|
7
|
+
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
8
|
+
[34mℹ[39m Build start
|
|
9
|
+
[34mℹ[39m Cleaning 4 files
|
|
10
|
+
[34mℹ[39m [2mdist/[22m[1mindex.mjs[22m [2m0.99 kB[22m [2m│ gzip: 0.44 kB[22m
|
|
11
|
+
[34mℹ[39m [2mdist/[22mindex.mjs.map [2m1.78 kB[22m [2m│ gzip: 0.69 kB[22m
|
|
12
|
+
[34mℹ[39m [2mdist/[22mindex.d.mts.map [2m0.16 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
13
|
+
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.mts[22m[39m [2m0.47 kB[22m [2m│ gzip: 0.30 kB[22m
|
|
14
|
+
[34mℹ[39m 4 files, total: 3.40 kB
|
|
15
|
+
[32m✔[39m Build complete in [32m5957ms[39m
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @uploadista/flow-documents-
|
|
1
|
+
# @uploadista/flow-documents-plugin
|
|
2
2
|
|
|
3
3
|
Combined DocumentPlugin implementation using both pdf-lib and unpdf.
|
|
4
4
|
|
|
@@ -11,19 +11,19 @@ Combined DocumentPlugin implementation using both pdf-lib and unpdf.
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
pnpm add @uploadista/flow-documents-
|
|
14
|
+
pnpm add @uploadista/flow-documents-plugin
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
|
-
import {
|
|
20
|
+
import { documentPlugin } from "@uploadista/flow-documents-plugin";
|
|
21
21
|
import { Effect } from "effect";
|
|
22
22
|
|
|
23
23
|
// Provide the combined plugin to your flow execution
|
|
24
24
|
const program = Effect.gen(function* () {
|
|
25
25
|
// Your flow logic here - all DocumentPlugin operations work
|
|
26
|
-
}).pipe(Effect.provide(
|
|
26
|
+
}).pipe(Effect.provide(documentPlugin));
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Why Use This?
|
package/dist/index.d.mts
CHANGED
|
@@ -10,8 +10,7 @@ import { Layer } from "effect";
|
|
|
10
10
|
*
|
|
11
11
|
* This provides a complete DocumentPlugin implementation.
|
|
12
12
|
*/
|
|
13
|
-
declare const documentPlugin: Layer.Layer<DocumentPlugin, never, never>;
|
|
14
|
-
declare const DocumentPluginLive: Layer.Layer<DocumentPlugin, never, never>;
|
|
13
|
+
declare const documentPlugin: () => Layer.Layer<DocumentPlugin, never, never>;
|
|
15
14
|
//#endregion
|
|
16
|
-
export {
|
|
15
|
+
export { documentPlugin };
|
|
17
16
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/document-plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;AAYA
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/document-plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;AAYA;;;;;cAAa,sBAAc,KAAA,CAAA,MAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { Effect, Layer } from "effect";
|
|
|
11
11
|
*
|
|
12
12
|
* This provides a complete DocumentPlugin implementation.
|
|
13
13
|
*/
|
|
14
|
-
const documentPlugin = Layer.unwrapEffect(Effect.gen(function* () {
|
|
14
|
+
const documentPlugin = () => Layer.unwrapEffect(Effect.gen(function* () {
|
|
15
15
|
const pdfLibPlugin = yield* Effect.provide(DocumentPlugin, pdfLibDocumentPlugin);
|
|
16
16
|
const unpdfPlugin = yield* Effect.provide(DocumentPlugin, unpdfDocumentPlugin);
|
|
17
17
|
return Layer.succeed(DocumentPlugin, DocumentPlugin.of({
|
|
@@ -21,8 +21,7 @@ const documentPlugin = Layer.unwrapEffect(Effect.gen(function* () {
|
|
|
21
21
|
mergePdfs: pdfLibPlugin.mergePdfs
|
|
22
22
|
}));
|
|
23
23
|
}));
|
|
24
|
-
const DocumentPluginLive = documentPlugin;
|
|
25
24
|
|
|
26
25
|
//#endregion
|
|
27
|
-
export {
|
|
26
|
+
export { documentPlugin };
|
|
28
27
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/document-plugin.ts"],"sourcesContent":["import { DocumentPlugin } from \"@uploadista/core/flow\";\nimport { pdfLibDocumentPlugin } from \"@uploadista/flow-documents-pdflib\";\nimport { unpdfDocumentPlugin } from \"@uploadista/flow-documents-unpdf\";\nimport { Effect, Layer } from \"effect\";\n\n/**\n * Combined DocumentPlugin that uses:\n * - unpdf for text extraction\n * - pdf-lib for metadata, splitting, and merging\n *\n * This provides a complete DocumentPlugin implementation.\n */\nexport const documentPlugin = Layer.unwrapEffect(\n
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/document-plugin.ts"],"sourcesContent":["import { DocumentPlugin } from \"@uploadista/core/flow\";\nimport { pdfLibDocumentPlugin } from \"@uploadista/flow-documents-pdflib\";\nimport { unpdfDocumentPlugin } from \"@uploadista/flow-documents-unpdf\";\nimport { Effect, Layer } from \"effect\";\n\n/**\n * Combined DocumentPlugin that uses:\n * - unpdf for text extraction\n * - pdf-lib for metadata, splitting, and merging\n *\n * This provides a complete DocumentPlugin implementation.\n */\nexport const documentPlugin = () =>\n Layer.unwrapEffect(\n Effect.gen(function* () {\n // Get the pdf-lib plugin for manipulation operations\n const pdfLibPlugin = yield* Effect.provide(\n DocumentPlugin,\n pdfLibDocumentPlugin,\n );\n\n // Get the unpdf plugin for text extraction\n const unpdfPlugin = yield* Effect.provide(\n DocumentPlugin,\n unpdfDocumentPlugin,\n );\n\n // Create a combined plugin\n return Layer.succeed(\n DocumentPlugin,\n DocumentPlugin.of({\n // Use unpdf for text extraction\n extractText: unpdfPlugin.extractText,\n // Use pdf-lib for metadata\n getMetadata: pdfLibPlugin.getMetadata,\n // Use pdf-lib for splitting\n splitPdf: pdfLibPlugin.splitPdf,\n // Use pdf-lib for merging\n mergePdfs: pdfLibPlugin.mergePdfs,\n }),\n );\n }),\n );\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAa,uBACX,MAAM,aACJ,OAAO,IAAI,aAAa;CAEtB,MAAM,eAAe,OAAO,OAAO,QACjC,gBACA,qBACD;CAGD,MAAM,cAAc,OAAO,OAAO,QAChC,gBACA,oBACD;AAGD,QAAO,MAAM,QACX,gBACA,eAAe,GAAG;EAEhB,aAAa,YAAY;EAEzB,aAAa,aAAa;EAE1B,UAAU,aAAa;EAEvB,WAAW,aAAa;EACzB,CAAC,CACH;EACD,CACH"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uploadista/flow-documents-plugin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.20
|
|
4
|
+
"version": "0.0.20",
|
|
5
5
|
"description": "Combined pdf-lib + unpdf DocumentPlugin for Uploadista Flow",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Uploadista",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@uploadista/core": "0.0.20
|
|
18
|
-
"@uploadista/flow-documents-
|
|
19
|
-
"@uploadista/flow-documents-
|
|
17
|
+
"@uploadista/core": "0.0.20",
|
|
18
|
+
"@uploadista/flow-documents-pdflib": "0.0.20",
|
|
19
|
+
"@uploadista/flow-documents-unpdf": "0.0.20"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"effect": "^3.0.0"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@types/node": "24.10.4",
|
|
26
26
|
"effect": "3.19.12",
|
|
27
27
|
"tsdown": "0.18.0",
|
|
28
|
-
"@uploadista/typescript-config": "0.0.20
|
|
28
|
+
"@uploadista/typescript-config": "0.0.20"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "tsc --noEmit && tsdown",
|
package/src/document-plugin.ts
CHANGED
|
@@ -10,35 +10,34 @@ import { Effect, Layer } from "effect";
|
|
|
10
10
|
*
|
|
11
11
|
* This provides a complete DocumentPlugin implementation.
|
|
12
12
|
*/
|
|
13
|
-
export const documentPlugin =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
export const documentPlugin = () =>
|
|
14
|
+
Layer.unwrapEffect(
|
|
15
|
+
Effect.gen(function* () {
|
|
16
|
+
// Get the pdf-lib plugin for manipulation operations
|
|
17
|
+
const pdfLibPlugin = yield* Effect.provide(
|
|
18
|
+
DocumentPlugin,
|
|
19
|
+
pdfLibDocumentPlugin,
|
|
20
|
+
);
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
// Get the unpdf plugin for text extraction
|
|
23
|
+
const unpdfPlugin = yield* Effect.provide(
|
|
24
|
+
DocumentPlugin,
|
|
25
|
+
unpdfDocumentPlugin,
|
|
26
|
+
);
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
export const DocumentPluginLive = documentPlugin;
|
|
28
|
+
// Create a combined plugin
|
|
29
|
+
return Layer.succeed(
|
|
30
|
+
DocumentPlugin,
|
|
31
|
+
DocumentPlugin.of({
|
|
32
|
+
// Use unpdf for text extraction
|
|
33
|
+
extractText: unpdfPlugin.extractText,
|
|
34
|
+
// Use pdf-lib for metadata
|
|
35
|
+
getMetadata: pdfLibPlugin.getMetadata,
|
|
36
|
+
// Use pdf-lib for splitting
|
|
37
|
+
splitPdf: pdfLibPlugin.splitPdf,
|
|
38
|
+
// Use pdf-lib for merging
|
|
39
|
+
mergePdfs: pdfLibPlugin.mergePdfs,
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
}),
|
|
43
|
+
);
|
package/src/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { documentPlugin } from "./document-plugin";
|