diff --git a/package-lock.json b/package-lock.json index 86f1cd2..965916b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,18 +10,18 @@ "license": "MIT", "dependencies": { "@dqbd/tiktoken": "^1.0.17", - "@opendocsg/pdf2md": "0.1.31", + "@opendocsg/pdf2md": "0.2.0", "@supabase/supabase-js": "^2.45.6", "command-line-args": "^6.0.0", "exponential-backoff": "3.1.1", "nodejs-file-downloader": "^4.13.0", - "openai": "4.68.1", + "openai": "4.75.0", "pdf-img-convert": "2.0.0", "pdf-lib": "^1.17.1", "pdf-page-counter": "1.0.3", "postgres": "^3.4.4", "progress": "^2.0.3", - "puppeteer": "23.6.0", + "puppeteer": "23.10.0", "tesseract.js": "5.1.1", "xml2js": "0.6.2" }, @@ -958,13 +958,14 @@ } }, "node_modules/@opendocsg/pdf2md": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/@opendocsg/pdf2md/-/pdf2md-0.1.31.tgz", - "integrity": "sha512-Pinl9WSL3P7pMeIdriQCYuBymspbGwt+Wic9ocoIGSYQuxccRC6fMzhRXAgO//MqwTSbgPiKHzYFE2v7Azd9gw==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@opendocsg/pdf2md/-/pdf2md-0.2.0.tgz", + "integrity": "sha512-00sd98aUvbxf7SNlg3gBCrlwTW5ncwbRkPYBuIrchDpsma1Q9MDTveZfid450SXlZnzoYRYiCpNi6/YM4wbmMQ==", + "license": "MIT", "dependencies": { "enumify": "^1.0.4", "minimist": "^1.2.5", - "pdfjs-dist": "^4.2.67" + "unpdf": "^0.12.1" }, "bin": { "pdf2md": "lib/pdf2md-cli.js" @@ -1028,11 +1029,12 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.4.0.tgz", - "integrity": "sha512-x8J1csfIygOwf6D6qUAZ0ASk3z63zPb7wkNeHRerCMh82qWKUrOgkuP005AJC8lDL6/evtXETGEJVcwykKT4/g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.5.0.tgz", + "integrity": "sha512-6TQAc/5uRILE6deixJ1CR8rXyTbzXIXNgO1D0Woi9Bqicz2FV5iKP3BHYEg6o4UATCMcbQQ0jbmeaOkn/HQk2w==", + "license": "Apache-2.0", "dependencies": { - "debug": "^4.3.6", + "debug": "^4.3.7", "extract-zip": "^2.0.1", "progress": "^2.0.3", "proxy-agent": "^6.4.0", @@ -1510,14 +1512,15 @@ } }, "node_modules/@supabase/realtime-js": { - "version": "2.10.7", - "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.10.7.tgz", - "integrity": "sha512-OLI0hiSAqQSqRpGMTUwoIWo51eUivSYlaNBgxsXZE7PSoWh12wPRdVt0psUMaUzEonSB85K21wGc7W5jHnT6uA==", + "version": "2.10.9", + "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.10.9.tgz", + "integrity": "sha512-0AjN65VDNIScZzrrPaVvlND4vbgVS+j9Wcy3zf7e+l9JY4IwCTahFenPLcKy9bkr7KY0wfB7MkipZPKxMaDnjw==", + "license": "MIT", "dependencies": { "@supabase/node-fetch": "^2.6.14", "@types/phoenix": "^1.5.4", "@types/ws": "^8.5.10", - "ws": "^8.14.2" + "ws": "^8.18.0" } }, "node_modules/@supabase/storage-js": { @@ -1529,15 +1532,16 @@ } }, "node_modules/@supabase/supabase-js": { - "version": "2.45.6", - "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.45.6.tgz", - "integrity": "sha512-qVXSSUhhIqdFnF2VUGgeecPvw1cDW6+avcTbRgur4LaGnzrJCbM3Rx7g81/SSZjjeqYOtmHuKWhiHzV/EN8Ktw==", + "version": "2.46.2", + "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.46.2.tgz", + "integrity": "sha512-5FEzYMZhfIZrMWEqo5/dQincvrhM+DeMWH3/okeZrkBBW1AJxblOQhnhF4/dfNYK25oZ1O8dAnnxZ9gQqdr40w==", + "license": "MIT", "dependencies": { "@supabase/auth-js": "2.65.1", "@supabase/functions-js": "2.4.3", "@supabase/node-fetch": "2.6.15", "@supabase/postgrest-js": "1.16.3", - "@supabase/realtime-js": "2.10.7", + "@supabase/realtime-js": "2.10.9", "@supabase/storage-js": "2.7.1" } }, @@ -2429,17 +2433,26 @@ } }, "node_modules/command-line-args": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-6.0.0.tgz", - "integrity": "sha512-zDdHxHzlCp/gA1gy0VtPK3YL0Aob3ijJdwZ7H3HSl55hh8EziLtRlyj/od8EGRJfX8IjussC/mQkScl2Ms5Suw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-6.0.1.tgz", + "integrity": "sha512-Jr3eByUjqyK0qd8W0SGFW1nZwqCaNCtbXjRo2cRJC1OYxWl3MZ5t1US3jq+cO4sPavqgw4l9BMGX0CBe+trepg==", + "license": "MIT", "dependencies": { "array-back": "^6.2.2", - "find-replace": "^5.0.1", + "find-replace": "^5.0.2", "lodash.camelcase": "^4.3.0", - "typical": "^7.1.1" + "typical": "^7.2.0" }, "engines": { "node": ">=12.20" + }, + "peerDependencies": { + "@75lb/nature": "latest" + }, + "peerDependenciesMeta": { + "@75lb/nature": { + "optional": true + } } }, "node_modules/compare-func": { @@ -2729,9 +2742,10 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1354347", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1354347.tgz", - "integrity": "sha512-BlmkSqV0V84E2WnEnoPnwyix57rQxAM5SKJjf4TbYOCGLAWtz8CDH8RIaGOjPgPCXo2Mce3kxSY497OySidY3Q==" + "version": "0.0.1367902", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1367902.tgz", + "integrity": "sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==", + "license": "BSD-3-Clause" }, "node_modules/dir-glob": { "version": "3.0.1", @@ -3441,14 +3455,20 @@ } }, "node_modules/find-replace": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-5.0.1.tgz", - "integrity": "sha512-o5/Y8HrCNRuFF5rdNTkX8Vhv6kTFTV0t1zIoigwlCdbkA9qaapRzxvWPND2VvlFa9LBI05Q1i8ml/saMqkOJUQ==", - "dependencies": { - "array-back": "^6.2.2" - }, + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-5.0.2.tgz", + "integrity": "sha512-Y45BAiE3mz2QsrN2fb5QEtO4qb44NcS7en/0y9PEVsg351HsLeVclP8QPMH79Le9sH3rs5RSwJu99W0WPZO43Q==", + "license": "MIT", "engines": { "node": ">=14" + }, + "peerDependencies": { + "@75lb/nature": "latest" + }, + "peerDependenciesMeta": { + "@75lb/nature": { + "optional": true + } } }, "node_modules/find-up": { @@ -7506,9 +7526,10 @@ } }, "node_modules/openai": { - "version": "4.68.1", - "resolved": "https://registry.npmjs.org/openai/-/openai-4.68.1.tgz", - "integrity": "sha512-C9XmYRHgra1U1G4GGFNqRHQEjxhoOWbQYR85IibfJ0jpHUhOm4/lARiKaC/h3zThvikwH9Dx/XOKWPNVygIS3g==", + "version": "4.75.0", + "resolved": "https://registry.npmjs.org/openai/-/openai-4.75.0.tgz", + "integrity": "sha512-8cWaK3td0qLspaflKWD6AvpQnl0gynWFbHg7sMAgiu//F20I4GJlCCpllDrECO6WFSuY8HXJj8gji3urw2BGGg==", + "license": "Apache-2.0", "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", @@ -7531,9 +7552,10 @@ } }, "node_modules/openai/node_modules/@types/node": { - "version": "18.19.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz", - "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==", + "version": "18.19.67", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.67.tgz", + "integrity": "sha512-wI8uHusga+0ZugNp0Ol/3BqQfEcCCNfojtO6Oou9iVNGPTL6QNSdnUdqq85fRgIorLhLMuPIKpsN98QE9Nh+KQ==", + "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } @@ -8045,9 +8067,10 @@ } }, "node_modules/postgres": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.4.tgz", - "integrity": "sha512-IbyN+9KslkqcXa8AO9fxpk97PA4pzewvpi2B3Dwy9u4zpV32QicaEdgmF3eSQUzdRk7ttDHQejNgAEr4XoeH4A==", + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.5.tgz", + "integrity": "sha512-cDWgoah1Gez9rN3H4165peY9qfpEo+SA61oQv65O3cRUE1pOEoJWwddwcqKE8XZYjbblOJlYDlLV4h67HrEVDg==", + "license": "Unlicense", "engines": { "node": ">=12" }, @@ -8276,16 +8299,17 @@ } }, "node_modules/puppeteer": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.6.0.tgz", - "integrity": "sha512-l+Fgo8SVFSd51STtq2crz8t1Y3VXowsuR4zfR64qDOn6oggz7YIZauWiNR4IJjczQ6nvFs3S4cgng55/nesxTQ==", + "version": "23.10.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.10.0.tgz", + "integrity": "sha512-vLpEvUM8POKBX4j6y/yyD4oGRhS1oBAbMn3lYpz1yeakhRsA8IhF5QmjXwAIQYGdR/INxyFiY6kQDoUtLGDP3g==", "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.4.0", + "@puppeteer/browsers": "2.5.0", "chromium-bidi": "0.8.0", "cosmiconfig": "^9.0.0", - "devtools-protocol": "0.0.1354347", - "puppeteer-core": "23.6.0", + "devtools-protocol": "0.0.1367902", + "puppeteer-core": "23.10.0", "typed-query-selector": "^2.12.0" }, "bin": { @@ -8296,14 +8320,15 @@ } }, "node_modules/puppeteer-core": { - "version": "23.6.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.6.0.tgz", - "integrity": "sha512-se1bhgUpR9C529SgHGr/eyT92mYyQPAhA2S9pGtGrVG2xob9qE6Pbp7TlqiSPlnnY1lINqhn6/67EwkdzOmKqQ==", + "version": "23.10.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.10.0.tgz", + "integrity": "sha512-7pv6kFget4Iki0RLBDowi35vaccz73XpC6/FAnfCrYa2IXVUlBHfZw+HGWzlvvTGwM9HHd32rgCrIDzil3kj+w==", + "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.4.0", + "@puppeteer/browsers": "2.5.0", "chromium-bidi": "0.8.0", "debug": "^4.3.7", - "devtools-protocol": "0.0.1354347", + "devtools-protocol": "0.0.1367902", "typed-query-selector": "^2.12.0", "ws": "^8.18.0" }, @@ -8315,6 +8340,7 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "license": "MIT", "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -8339,17 +8365,20 @@ "node_modules/puppeteer/node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "license": "MIT" }, "node_modules/puppeteer/node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "license": "MIT" }, "node_modules/puppeteer/node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -9854,9 +9883,10 @@ } }, "node_modules/typical": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-7.1.1.tgz", - "integrity": "sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.3.0.tgz", + "integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==", + "license": "MIT", "engines": { "node": ">=12.17" } @@ -9927,6 +9957,15 @@ "node": ">= 10.0.0" } }, + "node_modules/unpdf": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/unpdf/-/unpdf-0.12.1.tgz", + "integrity": "sha512-ktP8+TTLDBrlu/j8rQVNbHoMMpFXzkVAkb1rt/JdshFC3jOHdZjuGCNl/voPL0kraUrUOH7ZC88kVxMvlvDBzA==", + "license": "MIT", + "optionalDependencies": { + "canvas": "^2.11.2" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index f5a64a5..2db405e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ ] }, "dependencies": { - "@opendocsg/pdf2md": "0.1.31", + "@opendocsg/pdf2md": "0.2.0", "pdf-img-convert": "2.0.0", "tesseract.js": "5.1.1", "@dqbd/tiktoken": "^1.0.17", @@ -44,12 +44,12 @@ "command-line-args": "^6.0.0", "exponential-backoff": "3.1.1", "nodejs-file-downloader": "^4.13.0", - "openai": "4.68.1", + "openai": "4.75.0", "pdf-lib": "^1.17.1", "pdf-page-counter": "1.0.3", "postgres": "^3.4.4", "progress": "^2.0.3", - "puppeteer": "23.6.0", + "puppeteer": "23.10.0", "xml2js": "0.6.2" } }