Skip to content

Commit

Permalink
fix: Fix build for workers package and add it to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Feb 11, 2024
1 parent 2c2d05f commit 5623744
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Prisma
working-directory: packages/db
run: yarn prisma generate
- name: Build the workers package
working-directory: packages/workers
run: yarn typecheck
- name: Build web app
working-directory: packages/web
run: yarn run build
2 changes: 2 additions & 0 deletions packages/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ export const prisma =
? ["query", "error", "warn"]
: ["error"],
});

export * from "@prisma/client";
2 changes: 1 addition & 1 deletion packages/workers/crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "@remember/shared/queues";
import { Job } from "bullmq";

import prisma from "@remember/db";
import { prisma } from "@remember/db";

import { Browser } from "puppeteer";
import puppeteer from "puppeteer-extra";
Expand Down
2 changes: 1 addition & 1 deletion packages/workers/openai.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import prisma, { BookmarkedLink } from "@remember/db";
import { prisma, BookmarkedLink } from "@remember/db";
import logger from "@remember/shared/logger";
import { ZOpenAIRequest, zOpenAIRequestSchema } from "@remember/shared/queues";
import { Job } from "bullmq";
Expand Down
5 changes: 4 additions & 1 deletion packages/workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"dependencies": {
"@remember/shared": "0.1.0",
"@remember/db": "0.1.0",
"dotenv": "^16.4.1",
"metascraper": "^5.43.4",
"metascraper-description": "^5.43.4",
Expand All @@ -21,10 +22,12 @@
"puppeteer-extra-plugin-stealth": "^2.11.2"
},
"devDependencies": {
"@tsconfig/node21": "^21.0.1",
"@types/metascraper": "^5.14.3",
"ts-node": "^10.9.2"
},
"scripts": {
"start": "ts-node index.ts"
"start": "ts-node index.ts",
"typecheck": "tsc --noEmit"
}
}
6 changes: 6 additions & 0 deletions packages/workers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@tsconfig/node21/tsconfig.json",
"include": ["**/*.ts"],
"exclude": ["node_modules"]
}
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,7 @@ __metadata:
resolution: "@remember/workers@workspace:packages/workers"
dependencies:
"@remember/shared": "npm:0.1.0"
"@tsconfig/node21": "npm:^21.0.1"
"@types/metascraper": "npm:^5.14.3"
dotenv: "npm:^16.4.1"
metascraper: "npm:^5.43.4"
Expand Down Expand Up @@ -1322,6 +1323,13 @@ __metadata:
languageName: node
linkType: hard

"@tsconfig/node21@npm:^21.0.1":
version: 21.0.1
resolution: "@tsconfig/node21@npm:21.0.1"
checksum: 10c0/435335bea2e7c5ecf48e4a3c3f297632f4f21a22c4630b16b02a6869a03e60e952451bee9b82b5e6a3de44c5199fdb4cb1a6e437693074edd862deaa79d5e27d
languageName: node
linkType: hard

"@types/cacheable-request@npm:^6.0.1":
version: 6.0.3
resolution: "@types/cacheable-request@npm:6.0.3"
Expand Down

0 comments on commit 5623744

Please sign in to comment.