Compare commits
6 Commits
fix/backen
...
fix/shared
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c658706ea | ||
| 1c9c21d5a7 | |||
|
|
89f75e6d40 | ||
| e69f53114d | |||
|
|
793f0c3422 | ||
| d99002dc3c |
@@ -2,9 +2,9 @@
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": false,
|
||||
"rootDir": "./src",
|
||||
"rootDir": "./",
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"include": ["src/**/*", "prisma/seed.ts"],
|
||||
"exclude": ["**/*.test.ts", "dist"]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createBrowserRouter } from 'react-router-dom';
|
||||
import { createBrowserRouter, type RouterProviderProps } from 'react-router-dom';
|
||||
import { ProtectedRoute } from './components/Layout/ProtectedRoute';
|
||||
import { AppShell } from './components/Layout/AppShell';
|
||||
import { LoginPage } from './pages/LoginPage';
|
||||
@@ -10,7 +10,7 @@ import { ProfileSettingsPage } from './pages/ProfileSettingsPage';
|
||||
import { PublicProfilePage } from './pages/PublicProfilePage';
|
||||
import { NotFoundPage } from './pages/NotFoundPage';
|
||||
|
||||
export const router = createBrowserRouter([
|
||||
export const router: RouterProviderProps['router'] = createBrowserRouter([
|
||||
{ path: '/login', element: <LoginPage /> },
|
||||
{ path: '/u/:slug', element: <PublicProfilePage /> },
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ FROM deps AS build
|
||||
WORKDIR /app
|
||||
COPY packages/shared packages/shared
|
||||
COPY apps/backend apps/backend
|
||||
RUN pnpm --filter @family-wishlist/shared build
|
||||
RUN pnpm --filter @family-wishlist/backend build
|
||||
|
||||
# ---------- runtime ----------
|
||||
@@ -48,4 +49,4 @@ WORKDIR /app/apps/backend
|
||||
EXPOSE 3000
|
||||
# Apply schema (idempotent; uses `db push` so no prior migrations required) +
|
||||
# seed env users + start server.
|
||||
CMD ["sh", "-c", "pnpm exec prisma db push --accept-data-loss --skip-generate && pnpm seed && node dist/index.js"]
|
||||
CMD ["sh", "-c", "pnpm exec prisma db push --accept-data-loss --skip-generate && node dist/prisma/seed.js && node dist/src/index.js"]
|
||||
|
||||
@@ -20,6 +20,7 @@ FROM deps AS build
|
||||
WORKDIR /app
|
||||
COPY packages/shared packages/shared
|
||||
COPY apps/frontend apps/frontend
|
||||
RUN pnpm --filter @family-wishlist/shared build
|
||||
RUN pnpm --filter @family-wishlist/frontend build
|
||||
|
||||
# ---------- runtime (nginx) ----------
|
||||
|
||||
@@ -3,16 +3,19 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "echo 'shared is source-only'",
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"lint": "echo 'skip'",
|
||||
"dev": "echo 'shared is source-only'"
|
||||
"dev": "tsc -p tsconfig.json --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^3.23.8"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"noEmit": true
|
||||
"noEmit": false
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user