diff --git a/apps/chat/Dockerfile b/apps/chat/Dockerfile index e909d2a..3e88d9d 100644 --- a/apps/chat/Dockerfile +++ b/apps/chat/Dockerfile @@ -19,7 +19,7 @@ COPY --from=builder /app/out/json/ . RUN yarn install --frozen-lockfile COPY --from=builder /app/out/full/ . -RUN --mount=type=secret,id=TURBO_TOKEN --mount=type=secret,id=TURBO_TEAM TURBO_TOKEN=$(cat /run/secrets/TURBO_TOKEN) TURBO_TEAM=$(cat /run/secrets/TURBO_TEAM) yarn turbo run build --filter=@hctv/chat +RUN --mount=type=secret,id=TURBO_TOKEN --mount=type=secret,id=TURBO_TEAM TURBO_TOKEN=$(cat /run/secrets/TURBO_TOKEN) TURBO_TEAM=$(cat /run/secrets/TURBO_TEAM) yarn turbo run build --concurrency=1 FROM base AS runner WORKDIR /app @@ -30,7 +30,8 @@ RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nodeapp USER nodeapp -COPY --from=installer --chown=nodeapp:nodejs /app/apps/chat ./apps/chat +COPY --from=installer --chown=nodeapp:nodejs /app/apps ./apps +COPY --from=installer --chown=nodeapp:nodejs /app/packages ./packages COPY --from=installer --chown=nodeapp:nodejs /app/node_modules ./node_modules COPY --from=installer --chown=nodeapp:nodejs /app/package.json ./package.json diff --git a/apps/web/package.json b/apps/web/package.json index 2480736..09e749f 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -2,6 +2,7 @@ "name": "@hctv/web", "version": "0.1.0", "private": true, + "type": "module", "scripts": { "dd": "docker compose --file ../../dev/docker-compose.yml up -d", "dev": "next dev --turbo", @@ -10,7 +11,6 @@ "start": "next start", "lint": "next lint", "ui:add": "shadcn add", - "prepare": "next-ws patch", "check-types": "tsc --noEmit" }, "dependencies": { @@ -43,7 +43,6 @@ "media-chrome": "^4.8.0", "next": "^15.2.3", "next-themes": "^0.4.4", - "next-ws": "^2.0.4", "react": "19", "react-dom": "19", "react-hook-form": "^7.54.2", diff --git a/package.json b/package.json index 69ef5da..3295cb4 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "build": "dotenvx run -f .env.docker -- turbo run build", "dev": "turbo run dev", "lint": "turbo run lint", - "docker:web": "dotenvx run -f .env.docker -- docker buildx build --platform linux/amd64 -f apps/web/Dockerfile . --build-arg TURBO_TEAM=\"ducktors\" --secret id=TURBO_TOKEN,env=TURBO_TOKEN --secret id=TURBO_TEAM,env=TURBO_TEAM --no-cache", + "docker:web": "dotenvx run -f .env.docker -- docker buildx build --platform linux/amd64 -f apps/web/Dockerfile . --secret id=TURBO_TOKEN,env=TURBO_TOKEN --secret id=TURBO_TEAM,env=TURBO_TEAM --no-cache", + "docker:chat": "dotenvx run -f .env.docker -- docker buildx build --platform linux/amd64 -f apps/chat/Dockerfile . --secret id=TURBO_TOKEN,env=TURBO_TOKEN --secret id=TURBO_TEAM,env=TURBO_TEAM --no-cache", "act": "act --secret-file .env.ci" }, "devDependencies": { diff --git a/packages/auth/package.json b/packages/auth/package.json index d530524..cbac77e 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -2,12 +2,23 @@ "name": "@hctv/auth", "version": "0.0.0", "exports": { - ".": "./src/index.ts" + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } }, "type": "module", + "scripts": { + "build": "tsc --build" + }, "dependencies": { "@hctv/db": "*", "@lucia-auth/adapter-prisma": "^4.0.1", - "arctic": "^3.1.1" + "arctic": "^3.1.1", + "lucia": "^3.2.2" + }, + "devDependencies": { + "typescript": "^5.8.2" } } diff --git a/packages/auth/tsconfig.json b/packages/auth/tsconfig.json new file mode 100644 index 0000000..4b19132 --- /dev/null +++ b/packages/auth/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "NodeNext", + "moduleResolution": "nodenext", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "outDir": "dist", + "declaration": true, + "sourceMap": true, + "resolveJsonModule": true, + "rootDir": "src" + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} \ No newline at end of file diff --git a/packages/db/Dockerfile b/packages/db/Dockerfile index 5fc71b5..64afc97 100644 --- a/packages/db/Dockerfile +++ b/packages/db/Dockerfile @@ -30,7 +30,7 @@ RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 prisma USER prisma -COPY --from=installer --chown=prisma:nodejs /app/packages/db ./packages/db +COPY --from=installer --chown=prisma:nodejs /app/packages ./packages COPY --from=installer --chown=prisma:nodejs /app/node_modules ./node_modules COPY --from=installer --chown=prisma:nodejs /app/package.json ./package.json diff --git a/packages/db/package.json b/packages/db/package.json index f3c1e1b..4c3e548 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -17,7 +17,7 @@ "db:generate": "prisma generate", "db:migrate": "prisma migrate dev", "db:deploy": "prisma migrate deploy", - "build": "tsc" + "build": "tsc --build" }, "devDependencies": { "typescript": "^5.8.2" diff --git a/packages/db/src/client.ts b/packages/db/src/client.ts index e52be57..f488586 100644 --- a/packages/db/src/client.ts +++ b/packages/db/src/client.ts @@ -1,4 +1,4 @@ -import { PrismaClient } from "../generated/client/default.js"; +import { PrismaClient } from "../generated/client/index.js"; const globalForPrisma = global as unknown as { prisma: PrismaClient }; diff --git a/packages/hono-ws/package.json b/packages/hono-ws/package.json index 2e152b0..6762a13 100644 --- a/packages/hono-ws/package.json +++ b/packages/hono-ws/package.json @@ -14,7 +14,7 @@ "exports": { ".": { "types": "./dist/index.d.mts", - "default": "./src/index.ts" + "default": "./dist/index.js" } }, "type": "module", diff --git a/yarn.lock b/yarn.lock index f11a7d0..9c053c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4006,11 +4006,6 @@ next-themes@^0.4.4: resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.4.6.tgz#8d7e92d03b8fea6582892a50a928c9b23502e8b6" integrity sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA== -next-ws@^2.0.4: - version "2.0.5" - resolved "https://registry.yarnpkg.com/next-ws/-/next-ws-2.0.5.tgz#07798246548fcf1e0116a93fc32aae448901337f" - integrity sha512-9AyLFtaOJ4UY65Qzz6Z1WQ6rjMEskKRYcq1XzYGkrtEh56wJWLrdQ9dWbJkSmjWz35yY3TCaE5pYTOY/7Z1epA== - next@^15.2.3: version "15.2.3" resolved "https://registry.yarnpkg.com/next/-/next-15.2.3.tgz#1ac803c08076d47eb5b431cb625135616c6bec7e"