@uploadista/flow-documents-plugin 0.0.20-beta.8 → 0.0.20-beta.9

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.
@@ -1,15 +1,16 @@
1
1
 
2
2
  
3
- > @uploadista/flow-documents-plugin@0.0.20-beta.7 build /Users/denislaboureyras/Documents/uploadista/dev/uploadista-workspace/uploadista-sdk/packages/flow/documents/plugin
3
+ > @uploadista/flow-documents-plugin@0.0.20-beta.8 build /Users/denislaboureyras/Documents/uploadista/dev/uploadista-workspace/uploadista-sdk/packages/flow/documents/plugin
4
4
  > tsc --noEmit && tsdown
5
5
 
6
6
  ℹ tsdown v0.18.0 powered by rolldown v1.0.0-beta.53
7
7
  ℹ entry: src/index.ts
8
8
  ℹ tsconfig: tsconfig.json
9
9
  ℹ Build start
10
- ℹ dist/index.mjs 1.05 kB │ gzip: 0.45 kB
11
- ℹ dist/index.mjs.map 1.79 kB │ gzip: 0.71 kB
12
- ℹ dist/index.d.mts.map 0.19 kB │ gzip: 0.16 kB
13
- ℹ dist/index.d.mts 0.56 kB │ gzip: 0.31 kB
14
- ℹ 4 files, total: 3.60 kB
15
- ✔ Build complete in 1876ms
10
+ ℹ Cleaning 4 files
11
+ ℹ dist/index.mjs 0.99 kB │ gzip: 0.44 kB
12
+ ℹ dist/index.mjs.map 1.78 kB │ gzip: 0.69 kB
13
+ ℹ dist/index.d.mts.map 0.16 kB │ gzip: 0.14 kB
14
+ ℹ dist/index.d.mts 0.47 kB │ gzip: 0.30 kB
15
+ ℹ 4 files, total: 3.40 kB
16
+ ✔ Build complete in 957ms
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @uploadista/flow-documents-combined
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-combined
14
+ pnpm add @uploadista/flow-documents-plugin
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
19
  ```typescript
20
- import { CombinedDocumentPluginLive } from "@uploadista/flow-documents-combined";
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(CombinedDocumentPluginLive));
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 { DocumentPluginLive, documentPlugin };
15
+ export { documentPlugin };
17
16
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/document-plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;AAYA;AA+BA;;;;cA/Ba,gBAAc,KAAA,CAAA,MAAA;cA+Bd,oBAAkB,KAAA,CAAA,MAAA"}
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 { DocumentPluginLive, documentPlugin };
26
+ export { documentPlugin };
28
27
  //# sourceMappingURL=index.mjs.map
@@ -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 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\nexport const DocumentPluginLive = documentPlugin;\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAa,iBAAiB,MAAM,aAClC,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;AAED,MAAa,qBAAqB"}
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-beta.8",
4
+ "version": "0.0.20-beta.9",
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-beta.8",
18
- "@uploadista/flow-documents-unpdf": "0.0.20-beta.8",
19
- "@uploadista/flow-documents-pdflib": "0.0.20-beta.8"
17
+ "@uploadista/core": "0.0.20-beta.9",
18
+ "@uploadista/flow-documents-pdflib": "0.0.20-beta.9",
19
+ "@uploadista/flow-documents-unpdf": "0.0.20-beta.9"
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-beta.8"
28
+ "@uploadista/typescript-config": "0.0.20-beta.9"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "tsc --noEmit && tsdown",
@@ -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 = Layer.unwrapEffect(
14
- Effect.gen(function* () {
15
- // Get the pdf-lib plugin for manipulation operations
16
- const pdfLibPlugin = yield* Effect.provide(
17
- DocumentPlugin,
18
- pdfLibDocumentPlugin,
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
- // Get the unpdf plugin for text extraction
22
- const unpdfPlugin = yield* Effect.provide(
23
- DocumentPlugin,
24
- unpdfDocumentPlugin,
25
- );
22
+ // Get the unpdf plugin for text extraction
23
+ const unpdfPlugin = yield* Effect.provide(
24
+ DocumentPlugin,
25
+ unpdfDocumentPlugin,
26
+ );
26
27
 
27
- // Create a combined plugin
28
- return Layer.succeed(
29
- DocumentPlugin,
30
- DocumentPlugin.of({
31
- // Use unpdf for text extraction
32
- extractText: unpdfPlugin.extractText,
33
- // Use pdf-lib for metadata
34
- getMetadata: pdfLibPlugin.getMetadata,
35
- // Use pdf-lib for splitting
36
- splitPdf: pdfLibPlugin.splitPdf,
37
- // Use pdf-lib for merging
38
- mergePdfs: pdfLibPlugin.mergePdfs,
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 { DocumentPluginLive, documentPlugin } from "./document-plugin";
1
+ export { documentPlugin } from "./document-plugin";