ChenyuRabbitLove commited on
Commit
6f19b05
·
1 Parent(s): c32e8f0

chore: use pnpm to manage packages

Browse files
Files changed (4) hide show
  1. Dockerfile +5 -16
  2. package-lock.json +0 -0
  3. package.json +8 -0
  4. pnpm-lock.yaml +29 -1
Dockerfile CHANGED
@@ -4,27 +4,16 @@ FROM node:20-alpine AS base
4
  FROM base AS frontend-deps
5
  RUN apk add --no-cache libc6-compat
6
  WORKDIR /app
7
- COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
8
- RUN \
9
- if [ -f yarn.lock ]; then \
10
- echo "Installing dependencies with yarn..." && \
11
- yarn --frozen-lockfile || exit 1; \
12
- elif [ -f package-lock.json ]; then \
13
- echo "Installing dependencies with npm..." && \
14
- npm ci || exit 1; \
15
- elif [ -f pnpm-lock.yaml ]; then \
16
- echo "Installing dependencies with pnpm..." && \
17
- yarn global add pnpm && pnpm i --frozen-lockfile || exit 1; \
18
- else \
19
- echo "No lockfile found. Please provide either yarn.lock, package-lock.json, or pnpm-lock.yaml" && \
20
- exit 1; \
21
- fi
22
 
23
  FROM base AS frontend-builder
24
  WORKDIR /app
25
  COPY --from=frontend-deps /app/node_modules ./node_modules
26
  COPY . .
27
- RUN npm run build
 
28
 
29
  # Backend build
30
  FROM python:3.9-slim AS backend
 
4
  FROM base AS frontend-deps
5
  RUN apk add --no-cache libc6-compat
6
  WORKDIR /app
7
+ COPY package.json pnpm-lock.yaml ./
8
+ RUN npm install -g pnpm && \
9
+ pnpm install --frozen-lockfile
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  FROM base AS frontend-builder
12
  WORKDIR /app
13
  COPY --from=frontend-deps /app/node_modules ./node_modules
14
  COPY . .
15
+ RUN npm install -g pnpm && \
16
+ pnpm run build
17
 
18
  # Backend build
19
  FROM python:3.9-slim AS backend
package-lock.json DELETED
The diff for this file is too large to render. See raw diff
 
package.json CHANGED
@@ -26,5 +26,13 @@
26
  "postcss": "^8",
27
  "tailwindcss": "^3.4.14",
28
  "typescript": "^5"
 
 
 
 
 
 
 
 
29
  }
30
  }
 
26
  "postcss": "^8",
27
  "tailwindcss": "^3.4.14",
28
  "typescript": "^5"
29
+ },
30
+ "pnpm": {
31
+ "peerDependencyRules": {
32
+ "allowedVersions": {
33
+ "react": "19.0.0-rc-02c0e824-20241028",
34
+ "react-dom": "19.0.0-rc-02c0e824-20241028"
35
+ }
36
+ }
37
  }
38
  }
pnpm-lock.yaml CHANGED
@@ -8,6 +8,9 @@ importers:
8
 
9
  .:
10
  dependencies:
 
 
 
11
  ai:
12
  specifier: ^3.4.31
13
@@ -20,6 +23,9 @@ importers:
20
  react-dom:
21
  specifier: 19.0.0-rc-02c0e824-20241028
22
  version: 19.0.0-rc-02c0e824-20241028([email protected])
 
 
 
23
  devDependencies:
24
  '@types/node':
25
  specifier: ^20
@@ -30,6 +36,9 @@ importers:
30
  '@types/react-dom':
31
  specifier: ^18
32
  version: 18.3.1
 
 
 
33
  eslint:
34
  specifier: ^8
35
  version: 8.57.1
@@ -40,7 +49,7 @@ importers:
40
  specifier: ^8
41
  version: 8.4.47
42
  tailwindcss:
43
- specifier: ^3.4.1
44
  version: 3.4.14
45
  typescript:
46
  specifier: ^5
@@ -155,6 +164,11 @@ packages:
155
  resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==}
156
  engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
157
 
 
 
 
 
 
158
  '@humanwhocodes/[email protected]':
159
  resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==}
160
  engines: {node: '>=10.10.0'}
@@ -406,6 +420,10 @@ packages:
406
  '@types/[email protected]':
407
  resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==}
408
 
 
 
 
 
409
  '@typescript-eslint/[email protected]':
410
  resolution: {integrity: sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==}
411
  engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -1991,6 +2009,10 @@ snapshots:
1991
 
1992
  '@eslint/[email protected]': {}
1993
 
 
 
 
 
1994
  '@humanwhocodes/[email protected]':
1995
  dependencies:
1996
  '@humanwhocodes/object-schema': 2.0.3
@@ -2184,6 +2206,12 @@ snapshots:
2184
  '@types/prop-types': 15.7.13
2185
  csstype: 3.1.3
2186
 
 
 
 
 
 
 
2187
2188
  dependencies:
2189
  '@eslint-community/regexpp': 4.12.1
 
8
 
9
  .:
10
  dependencies:
11
+ '@heroicons/react':
12
+ specifier: ^2.1.5
13
+ version: 2.1.5([email protected])
14
  ai:
15
  specifier: ^3.4.31
16
 
23
  react-dom:
24
  specifier: 19.0.0-rc-02c0e824-20241028
25
  version: 19.0.0-rc-02c0e824-20241028([email protected])
26
+ zod:
27
+ specifier: ^3.23.8
28
+ version: 3.23.8
29
  devDependencies:
30
  '@types/node':
31
  specifier: ^20
 
36
  '@types/react-dom':
37
  specifier: ^18
38
  version: 18.3.1
39
+ '@types/tailwindcss':
40
+ specifier: ^3.0.11
41
+ version: 3.1.0
42
  eslint:
43
  specifier: ^8
44
  version: 8.57.1
 
49
  specifier: ^8
50
  version: 8.4.47
51
  tailwindcss:
52
+ specifier: ^3.4.14
53
  version: 3.4.14
54
  typescript:
55
  specifier: ^5
 
164
  resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==}
165
  engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
166
 
167
+ '@heroicons/[email protected]':
168
+ resolution: {integrity: sha512-FuzFN+BsHa+7OxbvAERtgBTNeZpUjgM/MIizfVkSCL2/edriN0Hx/DWRCR//aPYwO5QX/YlgLGXk+E3PcfZwjA==}
169
+ peerDependencies:
170
+ react: '>= 16'
171
+
172
  '@humanwhocodes/[email protected]':
173
  resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==}
174
  engines: {node: '>=10.10.0'}
 
420
  '@types/[email protected]':
421
  resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==}
422
 
423
+ '@types/[email protected]':
424
+ resolution: {integrity: sha512-JxPzrm609hzvF4nmOI3StLjbBEP3WWQxDDJESqR1nh94h7gyyy3XSl0hn5RBMJ9mPudlLjtaXs5YEBtLw7CnPA==}
425
+ deprecated: This is a stub types definition. tailwindcss provides its own type definitions, so you do not need this installed.
426
+
427
  '@typescript-eslint/[email protected]':
428
  resolution: {integrity: sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==}
429
  engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
 
2009
 
2010
  '@eslint/[email protected]': {}
2011
 
2012
2013
+ dependencies:
2014
+ react: 19.0.0-rc-02c0e824-20241028
2015
+
2016
  '@humanwhocodes/[email protected]':
2017
  dependencies:
2018
  '@humanwhocodes/object-schema': 2.0.3
 
2206
  '@types/prop-types': 15.7.13
2207
  csstype: 3.1.3
2208
 
2209
+ '@types/[email protected]':
2210
+ dependencies:
2211
+ tailwindcss: 3.4.14
2212
+ transitivePeerDependencies:
2213
+ - ts-node
2214
+
2215
2216
  dependencies:
2217
  '@eslint-community/regexpp': 4.12.1