@mastra/dane 0.0.2-alpha.7 → 0.0.2-alpha.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.
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/pdf.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pdf.d.ts","sourceRoot":"","sources":["../../../src/mastra/tools/pdf.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;iDAsClB,CAAC"}
|
package/dist/mastra/tools/pdf.js
CHANGED
|
@@ -2,7 +2,8 @@ import { createTool } from '@mastra/core';
|
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import { existsSync, readFileSync } from 'fs';
|
|
4
4
|
import path from 'path';
|
|
5
|
-
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
import pdfParse from "pdf-parse/lib/pdf-parse.js";
|
|
6
7
|
import { z } from 'zod';
|
|
7
8
|
export const readPDF = createTool({
|
|
8
9
|
id: 'readPDF',
|
|
@@ -27,7 +28,7 @@ export const readPDF = createTool({
|
|
|
27
28
|
// Read the PDF file
|
|
28
29
|
const dataBuffer = readFileSync(pdfPath);
|
|
29
30
|
// Parse PDF content
|
|
30
|
-
const data = await
|
|
31
|
+
const data = await pdfParse(dataBuffer);
|
|
31
32
|
console.log(chalk.blue('\n'));
|
|
32
33
|
console.log(chalk.blue('PDF Information:'));
|
|
33
34
|
console.log(chalk.blue('-----------------'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/dane",
|
|
3
|
-
"version": "0.0.2-alpha.
|
|
3
|
+
"version": "0.0.2-alpha.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"chalk": "^5.3.0",
|
|
26
26
|
"cli-table3": "^0.6.5",
|
|
27
27
|
"commander": "^12.1.0",
|
|
28
|
+
"dotenv": "^16.4.7",
|
|
28
29
|
"execa": "^9.3.1",
|
|
29
30
|
"inquirer": "^12.2.0",
|
|
30
31
|
"luxon": "^3.5.0",
|
|
@@ -36,12 +37,12 @@
|
|
|
36
37
|
"sqlite3": "^5.1.7",
|
|
37
38
|
"typescript": "^5.5.4",
|
|
38
39
|
"zod": "^3.24.0",
|
|
39
|
-
"@mastra/core": "0.1.27-alpha.
|
|
40
|
-
"@mastra/engine": "0.0.5-alpha.
|
|
41
|
-
"@mastra/
|
|
42
|
-
"@mastra/
|
|
43
|
-
"@mastra/
|
|
44
|
-
"@mastra/rag": "0.0.2-alpha.
|
|
40
|
+
"@mastra/core": "0.1.27-alpha.41",
|
|
41
|
+
"@mastra/engine": "0.0.5-alpha.35",
|
|
42
|
+
"@mastra/firecrawl": "1.0.4-alpha.26",
|
|
43
|
+
"@mastra/github": "1.0.3-alpha.25",
|
|
44
|
+
"@mastra/memory": "0.0.2-alpha.20",
|
|
45
|
+
"@mastra/rag": "0.0.2-alpha.25"
|
|
45
46
|
},
|
|
46
47
|
"scripts": {
|
|
47
48
|
"build": "npx tsc",
|