-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move typescript config into @dotkomonline/config (#1206)
- Loading branch information
Showing
40 changed files
with
117 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,12 @@ ENV DOCKER_BUILD=1 | |
|
||
RUN npm install -g [email protected] [email protected] --ignore-scripts | ||
COPY --from=builder /app/out/json . | ||
RUN pnpm install --ignore-scripts | ||
COPY --from=builder /app/out/full/packages/db/prisma/schema.prisma packages/db/prisma/schema.prisma | ||
|
||
# Must enable scripts here for Prisma codegen to build | ||
RUN apk update && apk add --no-cache python3 gcc g++ make | ||
RUN pnpm install | ||
|
||
COPY --from=builder /app/out/full . | ||
RUN turbo run build --filter @dotkomonline/dashboard | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,14 @@ ENV DOCKER_BUILD=1 | |
|
||
RUN npm install -g [email protected] [email protected] --ignore-scripts | ||
COPY --from=builder /app/out/json . | ||
RUN pnpm install --ignore-scripts | ||
COPY --from=builder /app/out/full . | ||
RUN turbo run build --filter @dotkomonline/rpc | ||
COPY --from=builder /app/out/full/packages/db/prisma/schema.prisma packages/db/prisma/schema.prisma | ||
|
||
# Must enable scripts here for Prisma codegen to build | ||
RUN apk update && apk add --no-cache python3 gcc g++ make | ||
RUN pnpm install | ||
|
||
# Install for production | ||
RUN pnpm install --production | ||
|
||
FROM base AS runner | ||
WORKDIR /app | ||
|
@@ -34,7 +39,7 @@ RUN addgroup --system --gid 1001 nodejs | |
RUN adduser --system --uid 1001 rpc | ||
USER rpc | ||
|
||
COPY --from=installer --chown=nodejs:rpc --chmod=755 /app/apps/rpc/dist/index.js ./ | ||
COPY --from=installer --chown=nodejs:rpc --chmod=755 /app/apps/rpc/package.json ./ | ||
COPY --from=installer --chown=rpc:nodejs --chmod=755 /app . | ||
COPY --from=builder --chown=rpc:nodejs --chmod=755 /app/out/full . | ||
|
||
CMD node index.js | ||
CMD node --loader ./apps/rpc/runtime.mjs --experimental-strip-types ./apps/rpc/src/index.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import path from "node:path" | ||
import { URL } from "node:url" | ||
|
||
export async function resolve(specifier, context, nextResolve) { | ||
// Only handle relative or absolute paths without extensions | ||
if ( | ||
(specifier.startsWith("./") || specifier.startsWith("../") || specifier.startsWith("/")) && | ||
!path.extname(specifier) | ||
) { | ||
// Try with .ts extension first | ||
const tsFile = `${specifier}.ts` | ||
const resolvedTsPath = new URL(tsFile, context.parentURL).href | ||
return { | ||
url: resolvedTsPath, | ||
shortCircuit: true, | ||
} | ||
} | ||
|
||
// Let Node.js handle it if no match | ||
return nextResolve(specifier) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,7 @@ | |
"name": "monorepo", | ||
"version": "1.0.0", | ||
"description": "Monoweb is the next-generation web application for Online. This is the monorepo source.", | ||
"keywords": [ | ||
"online", | ||
"ntnu", | ||
"student-association" | ||
], | ||
"keywords": ["online", "ntnu", "student-association"], | ||
"homepage": "https://online.ntnu.no", | ||
"author": "Dotkom <[email protected]> (https://online.ntnu.no)", | ||
"bugs": { | ||
|
@@ -37,13 +33,11 @@ | |
"type-check": "turbo run type-check", | ||
"clean": "turbo run clean", | ||
"docker:login": "aws ecr get-login-password --region eu-north-1 | docker login --username AWS --password-stdin 891459268445.dkr.ecr.eu-north-1.amazonaws.com", | ||
"docker:build": "turbo run docker:build", | ||
"docker:login:public": "aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws", | ||
"shell": "pnpm --filter=@dotkomonline/shell start" | ||
}, | ||
"workspaces": [ | ||
"packages/*", | ||
"apps/*" | ||
], | ||
"workspaces": ["packages/*", "apps/*"], | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">=20.12.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import { type Prisma, PrismaClient } from "@prisma/client" | ||
import { createRequire } from "node:module" | ||
import type { Prisma, PrismaClient } from "@prisma/client" | ||
import type { DefaultArgs } from "@prisma/client/runtime/library" | ||
|
||
export * as schemas from "./schemas" | ||
const require = createRequire(import.meta.url) | ||
const { Prisma: _Prisma, PrismaClient: _PrismaClient } = require("@prisma/client") | ||
export type * from "@prisma/client" | ||
|
||
export const PrismaRuntime = _Prisma | ||
export const PrismaClientRuntime = _PrismaClient | ||
export type DBClient = PrismaClient<Prisma.PrismaClientOptions, never, DefaultArgs> | ||
export const createPrisma = (databaseUrl: string): DBClient => | ||
new PrismaClient({ | ||
new _PrismaClient({ | ||
datasourceUrl: databaseUrl, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * as schemas from "./schemas/index" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.