From cebdaf450c449edd700febc28f79570776354468 Mon Sep 17 00:00:00 2001 From: CK Ng Date: Fri, 5 Jan 2024 23:04:03 +0800 Subject: [PATCH] build,pref: optimise docker build and rearrange package build dependencies --- apps/Dockerfile.apigateway | 9 +- apps/Dockerfile.service | 25 ++- apps/Dockerfile.view | 21 ++- apps/apigateway/package.json | 2 + apps/book/package.json | 48 ++++++ apps/borrowing/package.json | 48 ++++++ apps/customer/package.json | 48 ++++++ apps/notification/package.json | 48 ++++++ apps/payment/package.json | 48 ++++++ apps/view/package.json | 48 ++++++ package-lock.json | 289 ++++++++++++++++++++++++++++++--- package.json | 47 +----- 12 files changed, 603 insertions(+), 78 deletions(-) diff --git a/apps/Dockerfile.apigateway b/apps/Dockerfile.apigateway index 7424b79..b444d31 100644 --- a/apps/Dockerfile.apigateway +++ b/apps/Dockerfile.apigateway @@ -12,7 +12,7 @@ COPY apps/${service}/package*.json ./ WORKDIR /usr/src/app -RUN npm install +RUN npm install --workspace=${service} COPY . . @@ -24,7 +24,6 @@ FROM node:alpine as production ARG service ARG NODE_ENV=production ENV NODE_ENV=${NODE_ENV} -ENV SERVICE ${service} WORKDIR /usr/src/app @@ -36,14 +35,14 @@ COPY apps/${service}/package*.json ./ WORKDIR /usr/src/app -RUN npm install --omit=dev +RUN npm install --omit=dev --workspace=${service} # RUN echo ${service} # COPY . . -COPY --from=development /usr/src/app/dist ./dist +COPY --from=development /usr/src/app/dist/apps/${service} ./dist -CMD node dist/apps/$SERVICE/server.js +CMD ["node", "dist/server.js"] # docker build --build-arg="service=apigateway" -f ./apps/Dockerfile.apigateway . -t libraryapp-apigateway # docker run -p 8080:8080 libraryapp/apigateway diff --git a/apps/Dockerfile.service b/apps/Dockerfile.service index 6ebc8d2..f8b1f5a 100644 --- a/apps/Dockerfile.service +++ b/apps/Dockerfile.service @@ -6,7 +6,13 @@ WORKDIR /usr/src/app COPY package*.json ./ -RUN npm install +WORKDIR /usr/src/app/apps/${service} + +COPY apps/${service}/package*.json ./ + +WORKDIR /usr/src/app + +RUN npm install --workspace=${service} COPY . . @@ -17,16 +23,25 @@ FROM node:alpine as production ARG service ARG NODE_ENV=production ENV NODE_ENV=${NODE_ENV} -ENV SERVICE ${service} WORKDIR /usr/src/app COPY package*.json ./ -RUN npm install --omit=dev +WORKDIR /usr/src/app/apps/${service} + +COPY apps/${service}/package*.json ./ + +WORKDIR /usr/src/app + +RUN npm install --omit=dev --workspace=${service} +# RUN echo ${service} # COPY . . -COPY --from=development /usr/src/app/dist ./dist +COPY --from=development /usr/src/app/dist/apps/${service} ./dist + +CMD ["node", "dist/main.js"] -CMD node dist/apps/$SERVICE/main +# docker build --build-arg="service=apigateway" -f ./apps/Dockerfile.apigateway . -t libraryapp-apigateway +# docker run -p 8080:8080 libraryapp/apigateway diff --git a/apps/Dockerfile.view b/apps/Dockerfile.view index ad4d79e..cbb2ce7 100644 --- a/apps/Dockerfile.view +++ b/apps/Dockerfile.view @@ -6,13 +6,20 @@ WORKDIR /usr/src/app COPY package*.json ./ -WORKDIR /usr/src/app/apps/ui +WORKDIR /usr/src/app/apps/${service} +COPY apps/${service}/package*.json ./ +WORKDIR /usr/src/app/apps/ui COPY apps/ui/package*.json ./ +WORKDIR /usr/src/app/packages/common +COPY packages/common/package*.json ./ + WORKDIR /usr/src/app -RUN npm install +RUN npm install --workspace=${service} +RUN npm install --workspace=@repo/common +RUN npm install --workspace=ui COPY . . @@ -31,10 +38,18 @@ WORKDIR /usr/src/app COPY package*.json ./ -RUN npm install --omit=dev +WORKDIR /usr/src/app/apps/${service} + +COPY apps/${service}/package*.json ./ + +WORKDIR /usr/src/app + +RUN npm install --omit=dev --workspace=${service} # COPY . . +# NOTE: keep the app folder name, as will be serving dist/ui/index.html COPY --from=development /usr/src/app/dist ./dist +# Execute from this workdir, as shared for both ui and view CMD node dist/apps/$SERVICE/main diff --git a/apps/apigateway/package.json b/apps/apigateway/package.json index 97b1113..8501be7 100644 --- a/apps/apigateway/package.json +++ b/apps/apigateway/package.json @@ -19,11 +19,13 @@ }, "devDependencies": { "@jest/globals": "^29.7.0", + "@types/cors": "^2.8.17", "@types/morgan": "^1.9.9", "jest": "^29.7.0", "supertest": "^6.3.3", "ts-jest": "^29.1.1", "ts-node-dev": "^2.0.0", + "turbo": "^1.11.2", "typescript": "^5.3.3" } } diff --git a/apps/book/package.json b/apps/book/package.json index 754e128..0bd997c 100644 --- a/apps/book/package.json +++ b/apps/book/package.json @@ -5,5 +5,53 @@ "start:prod": "cd ../.. && node dist/apps/book/main", "dev": "cd ../.. && npm run start:dev book", "build": "cd ../.. && npm run build book" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" } } diff --git a/apps/borrowing/package.json b/apps/borrowing/package.json index 76ee18b..8c5f862 100644 --- a/apps/borrowing/package.json +++ b/apps/borrowing/package.json @@ -5,5 +5,53 @@ "start:prod": "cd ../.. && node dist/apps/borrowing/main", "dev": "cd ../.. && npm run start:dev borrowing", "build": "cd ../.. && npm run build borrowing" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" } } diff --git a/apps/customer/package.json b/apps/customer/package.json index 019fd5f..79c9ffb 100644 --- a/apps/customer/package.json +++ b/apps/customer/package.json @@ -5,5 +5,53 @@ "start:prod": "cd ../.. && node dist/apps/customer/main", "dev": "cd ../.. && npm run start:dev customer", "build": "cd ../.. && npm run build customer" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" } } diff --git a/apps/notification/package.json b/apps/notification/package.json index 9c2e81c..4ddf075 100644 --- a/apps/notification/package.json +++ b/apps/notification/package.json @@ -5,5 +5,53 @@ "start:prod": "cd ../.. && node dist/apps/notification/main", "dev": "cd ../.. && npm run start:dev notification", "build": "cd ../.. && npm run build notification" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" } } diff --git a/apps/payment/package.json b/apps/payment/package.json index a1ea151..f095a61 100644 --- a/apps/payment/package.json +++ b/apps/payment/package.json @@ -5,5 +5,53 @@ "start:prod": "cd ../.. && node dist/apps/payment/main", "dev": "cd ../.. && npm run start:dev payment", "build": "cd ../.. && npm run build payment" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" } } diff --git a/apps/view/package.json b/apps/view/package.json index a7a6fcb..bf8db62 100644 --- a/apps/view/package.json +++ b/apps/view/package.json @@ -5,5 +5,53 @@ "start:prod": "cd ../.. && node dist/apps/view/main", "dev": "cd ../.. && npm run start:dev view", "build": "cd ../.. && npm run build view" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" } } diff --git a/package-lock.json b/package-lock.json index 35c6b51..e34d514 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,32 @@ "apps/*", "packages/*" ], + "devDependencies": { + "turbo": "^1.11.2" + } + }, + "apps/apigateway": { + "version": "0.0.0", + "dependencies": { + "cors": "^2.8.5", + "dotenv": "^16.3.1", + "express": "^4.18.2", + "http-proxy-middleware": "^2.0.6", + "morgan": "^1.10.0" + }, + "devDependencies": { + "@jest/globals": "^29.7.0", + "@types/cors": "^2.8.17", + "@types/morgan": "^1.9.9", + "jest": "^29.7.0", + "supertest": "^6.3.3", + "ts-jest": "^29.1.1", + "ts-node-dev": "^2.0.0", + "turbo": "^1.11.2", + "typescript": "^5.3.3" + } + }, + "apps/book": { "dependencies": { "@nestjs/common": "^10.0.0", "@nestjs/config": "^3.1.1", @@ -61,30 +87,206 @@ "typescript": "^5.1.3" } }, - "apps/apigateway": { - "version": "0.0.0", + "apps/borrowing": { "dependencies": { - "cors": "^2.8.5", - "dotenv": "^16.3.1", - "express": "^4.18.2", - "http-proxy-middleware": "^2.0.6", - "morgan": "^1.10.0" + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" }, "devDependencies": { - "@jest/globals": "^29.7.0", - "@types/morgan": "^1.9.9", - "jest": "^29.7.0", + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", "supertest": "^6.3.3", - "ts-jest": "^29.1.1", - "ts-node-dev": "^2.0.0", - "typescript": "^5.3.3" + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" + } + }, + "apps/customer": { + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" + } + }, + "apps/notification": { + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" + } + }, + "apps/payment": { + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" } }, - "apps/book": {}, - "apps/borrowing": {}, - "apps/customer": {}, - "apps/notification": {}, - "apps/payment": {}, "apps/ui": { "version": "0.0.0", "dependencies": { @@ -115,7 +317,56 @@ "vite": "^5.0.5" } }, - "apps/view": {}, + "apps/view": { + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.2.10", + "@nestjs/mongoose": "^10.0.2", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-socket.io": "^10.3.0", + "@nestjs/serve-static": "^4.0.0", + "@nestjs/swagger": "^7.1.15", + "@nestjs/websockets": "^10.3.0", + "amqp-connection-manager": "^4.1.14", + "amqplib": "^0.10.3", + "class-validator": "^0.14.0", + "joi": "^17.11.0", + "mongoose": "^8.0.0", + "morgan": "^1.10.0", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@golevelup/nestjs-rabbitmq": "^4.1.0", + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "mongodb-memory-server": "^9.1.1", + "prettier": "^3.0.0", + "react-router-dom": "^6.20.1", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "turbo": "^1.11.2", + "typescript": "^5.1.3" + } + }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", diff --git a/package.json b/package.json index 00cf272..58560e3 100644 --- a/package.json +++ b/package.json @@ -36,53 +36,8 @@ "dev:apigateway": "turbo dev --filter=apigateway", "lint:apigateway": "turbo lint --filter=apigateway" }, - "dependencies": { - "@nestjs/common": "^10.0.0", - "@nestjs/config": "^3.1.1", - "@nestjs/core": "^10.0.0", - "@nestjs/microservices": "^10.2.10", - "@nestjs/mongoose": "^10.0.2", - "@nestjs/platform-express": "^10.0.0", - "@nestjs/platform-socket.io": "^10.3.0", - "@nestjs/serve-static": "^4.0.0", - "@nestjs/swagger": "^7.1.15", - "@nestjs/websockets": "^10.3.0", - "amqp-connection-manager": "^4.1.14", - "amqplib": "^0.10.3", - "class-validator": "^0.14.0", - "joi": "^17.11.0", - "mongoose": "^8.0.0", - "morgan": "^1.10.0", - "reflect-metadata": "^0.1.13", - "rxjs": "^7.8.1" - }, "devDependencies": { - "@golevelup/nestjs-rabbitmq": "^4.1.0", - "@nestjs/cli": "^10.0.0", - "@nestjs/schematics": "^10.0.0", - "@nestjs/testing": "^10.0.0", - "@types/express": "^4.17.17", - "@types/jest": "^29.5.2", - "@types/node": "^20.3.1", - "@types/supertest": "^6.0.2", - "@typescript-eslint/eslint-plugin": "^6.0.0", - "@typescript-eslint/parser": "^6.0.0", - "eslint": "^8.42.0", - "eslint-config-prettier": "^9.0.0", - "eslint-plugin-prettier": "^5.0.0", - "jest": "^29.5.0", - "jest-mock-extended": "^3.0.5", - "mongodb-memory-server": "^9.1.1", - "prettier": "^3.0.0", - "react-router-dom": "^6.20.1", - "source-map-support": "^0.5.21", - "supertest": "^6.3.3", - "ts-jest": "^29.1.0", - "ts-loader": "^9.4.3", - "ts-node": "^10.9.1", - "tsconfig-paths": "^4.2.0", - "turbo": "^1.11.2", - "typescript": "^5.1.3" + "turbo": "^1.11.2" }, "jest": { "moduleFileExtensions": [