diff --git a/.github/workflows/ec2-cd.yml b/.github/workflows/ec2-cd.yml index 1e84f63..2da7039 100644 --- a/.github/workflows/ec2-cd.yml +++ b/.github/workflows/ec2-cd.yml @@ -56,7 +56,10 @@ jobs: uses: actions/download-artifact@v4 with: name: mchat_build - + + - name: Install packages + run: pnpm i + - name: Restart application run: pm2 restart mchat diff --git a/common/package.json b/common/package.json index 07e3bfc..2f01369 100644 --- a/common/package.json +++ b/common/package.json @@ -1,8 +1,23 @@ { "name": "common", "version": "1.0.0", + "scripts": { + "build": "tsc" + }, "dependencies": { "drizzle-orm": "^0.31.2", "socket.io": "^4.7.5" + }, + "exports": { + "./tables": { + "import": "./tables/index.ts", + "types": "./tables/index.ts", + "require": "./dist/tables/index.js" + }, + "./socket": { + "import": "./socket/index.ts", + "types": "./socket/index.ts", + "require": "./dist/socket/index.js" + } } } \ No newline at end of file diff --git a/common/tsconfig.json b/common/tsconfig.json new file mode 100644 index 0000000..89ee5f7 --- /dev/null +++ b/common/tsconfig.json @@ -0,0 +1,13 @@ +{ + "include": ["socket", "tables"], + "compilerOptions": { + "target": "es6", + "module": "CommonJS", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "outDir": "dist", + "resolveJsonModule": true + } +}