Merge branch 'ts-project-refs' into game

This commit is contained in:
wancat committed 2024-03-06 22:39:49 +08:00
commit a8a19ca902
18 files changed
+1017 -75

No files matched your search

+1 -3
View File
@@ -20,9 +20,7 @@ COPY packages/file-graph ./packages/file-graph
COPY packages/utils ./packages/utils
COPY packages/constants ./packages/constants
COPY app ./app
RUN yarn workspace @linux-odyssey/file-graph build
RUN yarn workspace @linux-odyssey/utils build
RUN yarn workspace @linux-odyssey/constants build
RUN yarn workspace app build:refs
RUN yarn workspace app build
# Production stage
+1
View File
@@ -7,6 +7,7 @@
"dev": "vite",
"dev:docker": "API_TARGET=http://backend:3000 vite",
"build": "vite build",
"build:refs": "tsc --build",
"preview": "vite preview"
},
"dependencies": {
+5 -1
View File
@@ -22,5 +22,9 @@
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "src/**/*.js"],
"references": [{ "path": "./tsconfig.node.json" }]
"references": [
{ "path": "../packages/utils" },
{ "path": "../packages/constants" },
{ "path": "../packages/file-graph" }
]
}
-10
View File
@@ -1,10 +0,0 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
+6
View File
@@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
}
-1
View File
@@ -6,7 +6,6 @@
import type { Config } from 'jest'
const config: Config = {
preset: 'ts-jest/presets/default-esm',
// All imported modules in your tests should be mocked automatically
// automock: false,
+5 -4
View File
@@ -13,9 +13,7 @@
],
"scripts": {
"app": "yarn workspace app dev",
"build:deps": "concurrently \"yarn workspace @linux-odyssey/constants build\" \"yarn workspace @linux-odyssey/file-graph build\" \"yarn workspace @linux-odyssey/models build\" \"yarn workspace @linux-odyssey/utils build\"",
"build:apps": "concurrently \"yarn workspace app build\" \"yarn workspace server build\" \"yarn workspace analytics build\"",
"build": "yarn build:deps && yarn build:apps",
"build": "yarn workspace server build && yarn workspace app build && yarn workspace analytics build",
"dev": "concurrently -n \"App,Server\" -c \"bgBlue.bold,bgGreen.bold\" \"yarn workspace app dev\" \"yarn workspace server dev\"",
"server": "yarn workspace server dev",
"cli": "yarn workspace client start",
@@ -30,12 +28,16 @@
"build:quests": "yarn workspace server build:quests"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/preset-typescript": "^7.23.3",
"@jest/globals": "^29.7.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vue/eslint-config-prettier": "^7.1.0",
"babel-jest": "^29.7.0",
"concurrently": "^8.2.2",
"eslint": "^8.44.0",
"eslint-config-airbnb-base": "^15.0.0",
@@ -48,7 +50,6 @@
"eslint-plugin-vue": "^9.15.1",
"jest": "^29.7.0",
"prettier": "^3.0.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
+1
View File
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"composite": true,
"outDir": "./dist"
},
"include": ["*.js", "*.ts"],
+1
View File
@@ -2,6 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"composite": true,
"outDir": "./dist"
},
"include": ["src"],
+2
View File
@@ -15,3 +15,5 @@ export default async function connectDB(uri: string) {
const db = await mongoose.connect(uri)
return db.connection.getClient()
}
console.log('Loaded models package')
+1
View File
@@ -2,6 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"composite": true,
"outDir": "./dist"
},
"include": ["src"],
+1
View File
@@ -3,6 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "./dist",
"composite": true,
"allowJs": false
},
"include": ["src"],
-4
View File
@@ -26,10 +26,6 @@ COPY server ./server
COPY quests ./quests
ENV NODE_ENV=production
RUN yarn workspace @linux-odyssey/file-graph build
RUN yarn workspace @linux-odyssey/utils build
RUN yarn workspace @linux-odyssey/models build
RUN yarn workspace @linux-odyssey/constants build
RUN yarn workspace server build
WORKDIR /app/server
CMD [ "yarn", "start" ]
+2 -3
View File
@@ -1,6 +1,5 @@
{
"watch": ["dist", "swagger.yaml", "../quests", "../packages"],
"watch": ["src", "swagger.yaml", "../quests", "../packages"],
"ext": "js,ts,yaml,yml",
"exec": "node -r source-map-support/register dist/index.js",
"delay": 200
"exec": "node --loader ts-node/esm src/index.js"
}
+6 -2
View File
@@ -7,8 +7,8 @@
"start": "node dist/index.js",
"setup": "node dist/cli/setup.js",
"clean": "node dist/cli/clean.js",
"build": "tsc",
"dev": "concurrently \"tsc -w\" \"sleep 5 && nodemon\"",
"build": "tsc -b",
"dev": "nodemon",
"build:quests": "node dist/cli/build.js"
},
"dependencies": {
@@ -44,6 +44,8 @@
"yaml": "^2.3.1"
},
"devDependencies": {
"@swc/core": "^1.4.2",
"@swc/helpers": "^0.5.6",
"@types/bcrypt": "^5.0.2",
"@types/dockerode": "^3.3.23",
"@types/express": "^4.17.21",
@@ -62,7 +64,9 @@
"concurrently": "^8.2.2",
"jest": "^29.6.1",
"nodemon": "^3.0.1",
"regenerator-runtime": "^0.14.1",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
}
+10 -1
View File
@@ -4,5 +4,14 @@
"outDir": "./dist"
},
"include": ["src"],
"exclude": ["node_modules", "src/*.test.js", "dist"]
"exclude": ["node_modules", "src/*.test.js", "dist"],
"references": [
{ "path": "../packages/constants" },
{ "path": "../packages/file-graph" },
{ "path": "../packages/models" },
{ "path": "../packages/utils" }
],
"ts-node": {
"swc": true
}
}
+2 -1
View File
@@ -8,6 +8,7 @@
"strict": true,
"skipLibCheck": true,
"sourceMap": true,
"declaration": true
"declaration": true,
"declarationMap": true
}
}
+973 -45
View File
File diff suppressed because it is too large. Load diff