mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-10 16:28:17 +03:00
feat: make monorepo sane
This commit is contained in:
+6
-2
@@ -1,2 +1,6 @@
|
||||
**/.git
|
||||
**/node_modules
|
||||
.git
|
||||
node_modules
|
||||
.tsbuildinfo
|
||||
**/node_modules
|
||||
**/.tsbuildinfo
|
||||
database-seeds
|
||||
+3
-1
@@ -34,4 +34,6 @@ logs
|
||||
.nyc_output
|
||||
coverage
|
||||
out.*
|
||||
failed-tests.log
|
||||
failed-tests.log
|
||||
|
||||
.tsbuildinfo
|
||||
+9
-9
@@ -11,23 +11,23 @@ RUN apk add --no-cache
|
||||
|
||||
FROM base AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY pnpm-lock.yaml .
|
||||
|
||||
RUN pnpm fetch
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN pnpm install -r --offline --silent
|
||||
RUN pnpm --filter ./common --filter ./server --filter . install --prefer-offline
|
||||
|
||||
WORKDIR /app/server
|
||||
|
||||
RUN pnpm build
|
||||
RUN pnpm --filter ./common --filter ./server build
|
||||
|
||||
FROM base AS app
|
||||
WORKDIR /app/server
|
||||
COPY --from=build /app /app
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/node_modules /app/node_modules
|
||||
COPY --from=build /app/server /app/server
|
||||
COPY --from=build /app/common /app/common
|
||||
COPY --from=build /app/package.json /app/package.json
|
||||
|
||||
HEALTHCHECK --interval=15s --timeout=5s CMD curl -f http://localhost:8080/api/v1/status || exit 1
|
||||
ENV NODE_PATH=js/
|
||||
CMD ["pnpm", "start-no-build"]
|
||||
ENV NODE_PATH=/app/server/js
|
||||
CMD ["node", "/app/server/js/main.js"]
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
src/
|
||||
+6
-4
@@ -2,13 +2,15 @@
|
||||
"name": "tachi-common",
|
||||
"version": "2.2.0",
|
||||
"description": "Common Types & Utilities for Tachi",
|
||||
"main": "js/index.js",
|
||||
"files": [
|
||||
"js/**/*"
|
||||
],
|
||||
"main": "./js/index.js",
|
||||
"exports": {
|
||||
".": "./js/index.js",
|
||||
"./*": "./js/*.js"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
"build": "tsc",
|
||||
"install": "tsc",
|
||||
"prepublish": "tsc",
|
||||
"lint": "eslint . --ext .ts --fix"
|
||||
},
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./js",
|
||||
"target": "ES2020"
|
||||
"rootDir": "src",
|
||||
"outDir": "js",
|
||||
"target": "ES2020",
|
||||
"composite": true,
|
||||
"tsBuildInfoFile": ".tsbuildinfo"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.test.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"src/legacy/**/*.ts"
|
||||
]
|
||||
}
|
||||
+5
-5
@@ -26,18 +26,18 @@
|
||||
"devDependencies": {
|
||||
"@types/node": "16.11.7",
|
||||
"@types/tap": "15.0.3",
|
||||
"@typescript-eslint/eslint-plugin": "5.22.0",
|
||||
"@typescript-eslint/parser": "5.22.0",
|
||||
"eslint": "8.18.0",
|
||||
"eslint-plugin-cadence": "0.0.4",
|
||||
"tap": "15.0.9",
|
||||
"ts-node": "10.0.0",
|
||||
"typescript": "4.6.3",
|
||||
"@typescript-eslint/eslint-plugin": "5.22.0",
|
||||
"@typescript-eslint/parser": "5.22.0",
|
||||
"tsconfig-paths": "3.12.0"
|
||||
"tsc-alias": "1.7.1",
|
||||
"typescript": "4.6.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/mongodb": "3.6.18",
|
||||
"@types/bson": "1.0.11",
|
||||
"@types/mongodb": "3.6.18",
|
||||
"@types/node": "16.11.7"
|
||||
},
|
||||
"pnpm": {
|
||||
|
||||
Generated
+32
-3
@@ -18,7 +18,7 @@ importers:
|
||||
eslint-plugin-cadence: 0.0.4
|
||||
tap: 15.0.9
|
||||
ts-node: 10.0.0
|
||||
tsconfig-paths: 3.12.0
|
||||
tsc-alias: 1.7.1
|
||||
typescript: 4.6.3
|
||||
devDependencies:
|
||||
'@types/node': 16.11.7
|
||||
@@ -29,7 +29,7 @@ importers:
|
||||
eslint-plugin-cadence: 0.0.4_qt5lczejmvvdmrtns7px3uxl6e
|
||||
tap: 15.0.9_brhf6n5slbghal4nq2ewuwl5ie
|
||||
ts-node: 10.0.0_yebhed3ekczgx3zz6hdxw3kxou
|
||||
tsconfig-paths: 3.12.0
|
||||
tsc-alias: 1.7.1
|
||||
typescript: 4.6.3
|
||||
|
||||
bot:
|
||||
@@ -389,6 +389,7 @@ importers:
|
||||
semver: ^7.3.7
|
||||
seq-logging: 1.1.1
|
||||
supertest: 6.2.2
|
||||
tachi-common: workspace:../common
|
||||
tap: 15.1.6
|
||||
ts-node: 10.0.0
|
||||
tsconfig-paths: 3.12.0
|
||||
@@ -453,6 +454,7 @@ importers:
|
||||
safe-json-stringify: 1.2.0
|
||||
semver: 7.3.7
|
||||
seq-logging: 1.1.1
|
||||
tachi-common: link:../common
|
||||
ts-node: 10.0.0_eyk5xebzzzbswsv7f7bz54zw5q
|
||||
tsconfig-paths: 3.12.0
|
||||
typescript: 4.5.5
|
||||
@@ -5372,7 +5374,6 @@ packages:
|
||||
/commander/9.0.0:
|
||||
resolution: {integrity: sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==}
|
||||
engines: {node: ^12.20.0 || >=14}
|
||||
dev: false
|
||||
|
||||
/commist/1.1.0:
|
||||
resolution: {integrity: sha512-rraC8NXWOEjhADbZe9QBNzLAN5Q3fsTPQtBV+fEVj6xKIgDgNiEVE6ZNfHpZOqfQ21YUzfVNUXLOEZquYvQPPg==}
|
||||
@@ -10198,6 +10199,11 @@ packages:
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/mylas/2.1.13:
|
||||
resolution: {integrity: sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: true
|
||||
|
||||
/nan/2.16.0:
|
||||
resolution: {integrity: sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==}
|
||||
requiresBuild: true
|
||||
@@ -11034,6 +11040,12 @@ packages:
|
||||
find-up: 2.1.0
|
||||
dev: true
|
||||
|
||||
/plimit-lit/1.5.0:
|
||||
resolution: {integrity: sha512-Eb/MqCb1Iv/ok4m1FqIXqvUKPISufcjZ605hl3KM/n8GaX8zfhtgdLwZU3vKjuHGh2O9Rjog/bHTq8ofIShdng==}
|
||||
dependencies:
|
||||
queue-lit: 1.5.0
|
||||
dev: true
|
||||
|
||||
/pnp-webpack-plugin/1.5.0_typescript@4.3.5:
|
||||
resolution: {integrity: sha512-jd9olUr9D7do+RN8Wspzhpxhgp1n6Vd0NtQ4SFkmIACZoEL1nkyAdW9Ygrinjec0vgDcWjscFQQ1gDW8rsfKTg==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -11939,6 +11951,10 @@ packages:
|
||||
resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
|
||||
dev: true
|
||||
|
||||
/queue-lit/1.5.0:
|
||||
resolution: {integrity: sha512-IslToJ4eiCEE9xwMzq3viOO5nH8sUWUCwoElrhNMozzr9IIt2qqvB4I+uHu/zJTQVqc9R5DFwok4ijNK1pU3fA==}
|
||||
dev: true
|
||||
|
||||
/queue-microtask/1.2.3:
|
||||
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
|
||||
dev: true
|
||||
@@ -14134,6 +14150,18 @@ packages:
|
||||
dependencies:
|
||||
typescript: 4.3.5
|
||||
|
||||
/tsc-alias/1.7.1:
|
||||
resolution: {integrity: sha512-P4+0i+OB0hX17Ca+U6EJ4WZZ+OSupqW32VJ34N7g7+Ch+bwSx1AqYOvDdIVYEKymBh3dfG0t1qxbxPlBbtB1lQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
chokidar: 3.5.3
|
||||
commander: 9.0.0
|
||||
globby: 11.1.0
|
||||
mylas: 2.1.13
|
||||
normalize-path: 3.0.0
|
||||
plimit-lit: 1.5.0
|
||||
dev: true
|
||||
|
||||
/tsconfig-paths-webpack-plugin/3.5.2:
|
||||
resolution: {integrity: sha512-EhnfjHbzm5IYI9YPNVIxx1moxMI4bpHD2e0zTXeDNQcwjjRaGepP7IhTHJkyDBG0CAOoxRfe7jCG630Ou+C6Pw==}
|
||||
dependencies:
|
||||
@@ -14149,6 +14177,7 @@ packages:
|
||||
json5: 1.0.1
|
||||
minimist: 1.2.6
|
||||
strip-bom: 3.0.0
|
||||
dev: false
|
||||
|
||||
/tsconfig-paths/3.14.1:
|
||||
resolution: {integrity: sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==}
|
||||
|
||||
+1
-1
@@ -7,4 +7,4 @@ packages:
|
||||
- "database-seeds/**"
|
||||
- "server/**"
|
||||
- "sieglinde/**"
|
||||
- "github-bot/**"
|
||||
- "github-bot/**"
|
||||
+8
-4
@@ -2,7 +2,10 @@
|
||||
"name": "tachi-server",
|
||||
"version": "0.1.0-see-project-root",
|
||||
"description": "A score tracking server.",
|
||||
"main": "js/server/src/main.js",
|
||||
"main": "./js/main.js",
|
||||
"files": [
|
||||
"/js"
|
||||
],
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
@@ -12,8 +15,8 @@
|
||||
"typecheck": "tsc --project tsconfig.build.json --noEmit",
|
||||
"lint": "eslint ./src --ext .ts --fix",
|
||||
"start": "pnpm build && pnpm start-no-build",
|
||||
"start-no-build": "node -r ts-node/register -r tsconfig-paths/register js/server/src/main.js",
|
||||
"runscoreworker": "node -r ts-node/register -r tsconfig-paths/register js/server/src/lib/score-import/worker/worker.js",
|
||||
"start-no-build": "node js/server/main.js",
|
||||
"runscoreworker": "node js/server/lib/score-import/worker/worker.js",
|
||||
"sync-database": "ts-node src/scripts/sync-database",
|
||||
"sync-database-local": "ts-node src/scripts/sync-database --localPath '../database-seeds/collections'",
|
||||
"recalc-everything": "ts-node src/scripts/state-sync/sync-state.ts"
|
||||
@@ -90,7 +93,8 @@
|
||||
"typescript": "4.5.5",
|
||||
"winston": "3.5.1",
|
||||
"winston-daily-rotate-file": "4.6.0",
|
||||
"winston-transport": "4.5.0"
|
||||
"winston-transport": "4.5.0",
|
||||
"tachi-common": "workspace:../common"
|
||||
},
|
||||
"nyc": {
|
||||
"reporter": [
|
||||
|
||||
@@ -11,5 +11,10 @@
|
||||
"node_modules",
|
||||
"src/test-utils",
|
||||
"src/**/*.test.ts"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../common"
|
||||
}
|
||||
]
|
||||
}
|
||||
+11
-8
@@ -6,8 +6,9 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"baseUrl": "src",
|
||||
"outDir": "./js",
|
||||
"outDir": "js",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2019",
|
||||
@@ -26,18 +27,20 @@
|
||||
],
|
||||
"tachi-common/*": [
|
||||
"../../common/src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"require": [
|
||||
"tsconfig-paths/register"
|
||||
]
|
||||
],
|
||||
},
|
||||
"composite": true,
|
||||
"tsBuildInfoFile": ".tsbuildinfo"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../common"
|
||||
}
|
||||
]
|
||||
}
|
||||
+15
-1
@@ -10,6 +10,20 @@
|
||||
"allowJs": false,
|
||||
"esModuleInterop": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"sourceMap": true
|
||||
"sourceMap": true,
|
||||
"rootDir": ".",
|
||||
"composite": true,
|
||||
"tsBuildInfoFile": ".tsbuildinfo"
|
||||
},
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./common",
|
||||
"prepend": true
|
||||
},
|
||||
{
|
||||
"path": "./server",
|
||||
"prepend": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user