diff --git a/deploy/compose.yml b/deploy/compose.yml index 8b61ebbde..526638376 100644 --- a/deploy/compose.yml +++ b/deploy/compose.yml @@ -28,6 +28,7 @@ services: timeout: 10s retries: 10 start_period: 30s + restart: always mem_limit: 1G depends_on: - redis @@ -35,6 +36,7 @@ services: be-worker: image: ghcr.io/lies-exposed/liexp-worker:alpha-latest container_name: liexp-be-worker + restart: always environment: TG_BOT_POLLING: "true" REDIS_HOST: "127.0.0.1" diff --git a/packages/@liexp/backend/package.json b/packages/@liexp/backend/package.json index 28e4ce4ff..673b21867 100644 --- a/packages/@liexp/backend/package.json +++ b/packages/@liexp/backend/package.json @@ -31,6 +31,7 @@ "@databases/sql": "^3.3.0", "@liexp/core": "workspace:*", "@liexp/shared": "workspace:*", + "canvas": "^3.0.1", "date-fns": "^4.1.0", "fp-ts": "^2.16.9", "io-ts": "^2.2.22", diff --git a/packages/@liexp/backend/src/flows/media/thumbnails/extractThumbnailFromPDF.flow.ts b/packages/@liexp/backend/src/flows/media/thumbnails/extractThumbnailFromPDF.flow.ts index 04cbbe889..7e1c3fbb2 100644 --- a/packages/@liexp/backend/src/flows/media/thumbnails/extractThumbnailFromPDF.flow.ts +++ b/packages/@liexp/backend/src/flows/media/thumbnails/extractThumbnailFromPDF.flow.ts @@ -1,4 +1,3 @@ -// import { createRequire } from "module"; import { fp, pipe } from "@liexp/core/lib/fp/index.js"; import { ImageType, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 28df495cb..23c76624d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -76,6 +76,9 @@ importers: axios: specifier: ^1 version: 1.7.9(debug@4.4.0) + canvas: + specifier: ^3.0.1 + version: 3.0.1 date-fns: specifier: ^4.1.0 version: 4.1.0 @@ -869,9 +872,6 @@ importers: '@liexp/shared': specifier: workspace:* version: link:../../packages/@liexp/shared - '@tanstack/react-query': - specifier: ^5.63.0 - version: 5.64.0(react@18.3.1) axios: specifier: ^1.7.9 version: 1.7.9(debug@4.4.0) @@ -881,18 +881,12 @@ importers: cors: specifier: 2.8.5 version: 2.8.5 - cronstrue: - specifier: ^2.50.0 - version: 2.52.0 date-fns: specifier: ^4.1.0 version: 4.1.0 debug: specifier: '*' version: 4.4.0 - domino: - specifier: ^2.1.6 - version: 2.1.6 express: specifier: ^4.21.0 version: 4.21.2 @@ -923,18 +917,9 @@ importers: multer: specifier: ^1.4.5-lts.1 version: 1.4.5-lts.1 - node-telegram-bot-api: - specifier: ^0.66.0 - version: 0.66.0(request@2.88.2) - nodemw: - specifier: ^0.22.0 - version: 0.22.0 page-metadata-parser: specifier: ^1.1.4 version: 1.1.4 - parse2-kmz: - specifier: ^1.0.7 - version: 1.0.7 pg: specifier: ^8.11.5 version: 8.13.1 @@ -959,15 +944,6 @@ importers: typescript: specifier: ^5.6.2 version: 5.7.2 - wink-eng-lite-web-model: - specifier: ^1.8.0 - version: 1.8.1 - wink-nlp: - specifier: ^2.3.0 - version: 2.3.2 - wink-nlp-utils: - specifier: ^2.1.0 - version: 2.1.0 devDependencies: '@liexp/test': specifier: workspace:* @@ -1002,9 +978,6 @@ importers: '@types/node': specifier: ^22.10.2 version: 22.10.2 - '@types/node-telegram-bot-api': - specifier: ^0.64.7 - version: 0.64.7 '@types/pg': specifier: ^8.11.10 version: 8.11.10 @@ -1286,9 +1259,12 @@ importers: axios: specifier: ^1.7.9 version: 1.7.9(debug@4.4.0) - canvas: - specifier: 3.0.1 - version: 3.0.1 + cronstrue: + specifier: ^2.50.0 + version: 2.52.0 + debug: + specifier: ^4.4.0 + version: 4.4.0 exifreader: specifier: ^4.26.0 version: 4.26.0 @@ -1298,6 +1274,9 @@ importers: fp-ts: specifier: ^2.16.9 version: 2.16.9 + instagram-private-api: + specifier: ^1.46.1 + version: 1.46.1 io-ts: specifier: ^2.2.22 version: 2.2.22(fp-ts@2.16.9) @@ -1313,6 +1292,9 @@ importers: node-telegram-bot-api: specifier: ^0.66.0 version: 0.66.0(request@2.88.2) + nodemw: + specifier: ^0.22.0 + version: 0.22.0 page-metadata-parser: specifier: ^1.1.4 version: 1.1.4 @@ -1322,6 +1304,9 @@ importers: pdfjs-dist: specifier: ^4.10.38 version: 4.10.38 + prompts: + specifier: ^2.4.2 + version: 2.4.2 puppeteer-core: specifier: ^23.11.1 version: 23.11.1 @@ -1337,13 +1322,16 @@ importers: typeorm: specifier: ^0.3.20 version: 0.3.20(ioredis@5.4.2)(pg@8.13.1) + wink-eng-lite-web-model: + specifier: ^1.8.0 + version: 1.8.1 wink-nlp: specifier: ^2.3.0 version: 2.3.2 + wink-nlp-utils: + specifier: ^2.1.0 + version: 2.1.0 devDependencies: - '@liexp/test': - specifier: workspace:* - version: link:../../packages/@liexp/test '@types/node-cron': specifier: ^3.0.11 version: 3.0.11 @@ -1356,12 +1344,6 @@ importers: eslint: specifier: ^9.18.0 version: 9.18.0(jiti@2.4.1) - prompts: - specifier: ^2.4.2 - version: 2.4.2 - supertest: - specifier: ^7.0.0 - version: 7.0.0 tsx: specifier: ^4.19.2 version: 4.19.2 @@ -1371,9 +1353,6 @@ importers: vitest: specifier: ^2.1.8 version: 2.1.8(@types/node@22.10.2)(jsdom@26.0.0(canvas@3.0.1))(sass@1.82.0)(terser@5.37.0) - vitest-mock-extended: - specifier: ^2.0.2 - version: 2.0.2(typescript@5.7.2)(vitest@2.1.8(@types/node@22.10.2)(jsdom@26.0.0(canvas@3.0.1))(sass@1.82.0)(terser@5.37.0)) packages: diff --git a/services/api/package.json b/services/api/package.json index 5f39ee598..39ec1abcc 100644 --- a/services/api/package.json +++ b/services/api/package.json @@ -60,14 +60,11 @@ "@liexp/backend": "workspace:*", "@liexp/core": "workspace:*", "@liexp/shared": "workspace:*", - "@tanstack/react-query": "^5.63.0", "axios": "^1.7.9", "body-parser": "^1.20.3", "cors": "2.8.5", - "cronstrue": "^2.50.0", "date-fns": "^4.1.0", "debug": "*", - "domino": "^2.1.6", "express": "^4.21.0", "express-jwt": "^8.5.1", "express-unless": "^2.1.3", @@ -78,10 +75,7 @@ "jsonwebtoken": "^9.0.2", "lodash": "^4.17.21", "multer": "^1.4.5-lts.1", - "node-telegram-bot-api": "^0.66.0", - "nodemw": "^0.22.0", "page-metadata-parser": "^1.1.4", - "parse2-kmz": "^1.0.7", "pg": "^8.11.5", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -89,10 +83,7 @@ "ts-endpoint-express": "^2.0.0", "tsx": "^4.19.2", "typeorm": "^0.3.20", - "typescript": "^5.6.2", - "wink-eng-lite-web-model": "^1.8.0", - "wink-nlp": "^2.3.0", - "wink-nlp-utils": "^2.1.0" + "typescript": "^5.6.2" }, "devDependencies": { "@liexp/test": "workspace:*", @@ -106,7 +97,6 @@ "@types/lodash": "^4.17.14", "@types/multer": "^1.4.12", "@types/node": "^22.10.2", - "@types/node-telegram-bot-api": "^0.64.7", "@types/pg": "^8.11.10", "@types/prompts": "^2.4.9", "@types/react": "^18.3.18", diff --git a/services/worker/package.json b/services/worker/package.json index 7d62e3b6e..19de12659 100644 --- a/services/worker/package.json +++ b/services/worker/package.json @@ -50,37 +50,39 @@ "@liexp/core": "workspace:*", "@liexp/shared": "workspace:*", "axios": "^1.7.9", - "canvas": "3.0.1", + "cronstrue": "^2.50.0", + "debug": "^4.4.0", "exifreader": "^4.26.0", "fluent-ffmpeg": "^2.1.2", "fp-ts": "^2.16.9", + "instagram-private-api": "^1.46.1", "io-ts": "^2.2.22", "io-ts-types": "^0.5.19", "ioredis": "^5.4.2", "node-cron": "^3.0.3", "node-telegram-bot-api": "^0.66.0", + "nodemw": "^0.22.0", "page-metadata-parser": "^1.1.4", "parse2-kmz": "^1.0.7", "pdfjs-dist": "^4.10.38", + "prompts": "^2.4.2", "puppeteer-core": "^23.11.1", "puppeteer-extra": "^3.3.6", "puppeteer-extra-plugin-stealth": "^2.11.2", "sharp": "^0.33.5", "typeorm": "^0.3.20", - "wink-nlp": "^2.3.0" + "wink-eng-lite-web-model": "^1.8.0", + "wink-nlp": "^2.3.0", + "wink-nlp-utils": "^2.1.0" }, "devDependencies": { - "@liexp/test": "workspace:*", "@types/node-cron": "^3.0.11", "dotenv": "^16.4.7", "esbuild": "^0.24.2", "eslint": "^9.18.0", - "prompts": "^2.4.2", - "supertest": "^7.0.0", "tsx": "^4.19.2", "vite-tsconfig-paths": "^5.1.4", - "vitest": "^2.1.8", - "vitest-mock-extended": "^2.0.2" + "vitest": "^2.1.8" }, "packageManager": "pnpm@9.15.3+sha512.1f79bc245a66eb0b07c5d4d83131240774642caaa86ef7d0434ab47c0d16f66b04e21e0c086eb61e62c77efc4d7f7ec071afad3796af64892fae66509173893a" } diff --git a/services/worker/src/bin/create-from-wikipedia.ts b/services/worker/src/bin/create-from-wikipedia.ts index 5a5d77c5a..e8e1ba64f 100644 --- a/services/worker/src/bin/create-from-wikipedia.ts +++ b/services/worker/src/bin/create-from-wikipedia.ts @@ -1,7 +1,6 @@ import { type WikiProviders } from "@liexp/backend/lib/providers/wikipedia/types.js"; import { pipe } from "@liexp/core/lib/fp/index.js"; import { throwTE } from "@liexp/shared/lib/utils/task.utils.js"; - import prompts from "prompts"; import { fetchActorFromWikipedia } from "../flows/actor/fetchAndCreateActorFromWikipedia.flow.js"; import { fetchAndCreateAreaFromWikipedia } from "../flows/area/fetchAndCreateAreaFromWikipedia.js";