Compare commits

...
44 Commits
Author SHA1 Message Date
Rodrigo Zamboni b49633cbc2 Merge pull request #54 from dadosfera/beta
Beta
2022-04-18 13:58:14 -03:00
Rodrigo Zamboni 4d956e55c6 Merge pull request #53 from dadosfera/alpha
Alpha
2022-04-18 12:18:28 -03:00
Rodrigo Zamboni 735703bf3b Merge pull request #52 from dadosfera/feat/activatePipeline
Feat/activate pipeline
2022-04-18 11:54:43 -03:00
rodrigo.zamboni 93cdc3f030 UPDATE: remove unescessary console log 2022-04-18 11:50:17 -03:00
rodrigo.zamboni 12b8b5926c UPDATE: Created Trigger Pipeline route 2022-04-18 11:44:19 -03:00
rodrigo.zamboni 1643096d47 Created Trigger Pipeline route 2022-04-18 11:43:36 -03:00
Rodrigo Zamboni 8a519ac217 Merge pull request #51 from dadosfera/beta
Beta
2022-04-14 15:33:36 -03:00
Victor Radael ffa69a0cf5 Merge pull request #50 from dadosfera/alpha
Alpha
2022-04-14 15:14:12 -03:00
Rodrigo Zamboni 7722e380e3 Merge pull request #49 from dadosfera/authFix
FIX: using Unauth nest function
2022-04-14 15:01:18 -03:00
rodrigo.zamboni ecdc7b4eb6 FIX: using Unauth nest function 2022-04-14 14:56:18 -03:00
rodrigo.zamboni 7d14080ac1 FIX: Invalid auth credentials return 2022-04-14 14:48:40 -03:00
Victor Radael 7e7deba2ab FIX: CI 2022-04-12 18:10:40 -03:00
Victor Radael e425e90eeb FIX: CI 2022-04-12 17:59:41 -03:00
Victor Radael 45f35b4e39 Merge branch 'alpha' into main 2022-04-12 17:44:29 -03:00
Victor Radael d450acd007 FIX: CI 2022-04-12 17:43:46 -03:00
Victor Radael e9c1dfc320 Merge pull request #48 from dadosfera/beta
Beta
2022-04-12 17:20:18 -03:00
Rodrigo Zamboni 67484cbef8 Merge pull request #47 from dadosfera/alpha
Alpha
2022-04-12 17:07:57 -03:00
rodrigo.zamboni 740be1d98b FIX: CI 2022-04-12 16:20:03 -03:00
rodrigo.zamboni b9989d86c1 Merge branch 'alpha' of https://github.com/dadosfera/maestro into alpha 2022-04-12 16:15:25 -03:00
rodrigo.zamboni 9b3a127f6a fixed authorization on case of missing Authorization header 2022-04-12 16:15:04 -03:00
Victor Radael 55028c4b83 Merge pull request #46 from dadosfera/alpha
Alpha
2022-04-08 13:02:06 -03:00
Victor Radael 7d5dee4b0c FIX: Deploy 2022-04-08 12:48:40 -03:00
Victor Radael 708bf2f585 FIX: Deploy 2022-04-07 18:41:39 -03:00
Rodrigo Zamboni 1d53226540 Merge pull request #45 from dadosfera/alpha
FIX: CI
2022-04-07 18:12:58 -03:00
Victor Radael 5f6ae5d512 FIX: CI 2022-04-07 17:54:14 -03:00
Rodrigo Zamboni c51092260a Merge pull request #44 from dadosfera/alpha
Alpha
2022-04-07 16:54:25 -03:00
Victor Radael 3add8b026e Merge branch 'alpha' of https://github.com/dadosfera/maestro into alpha 2022-04-07 16:44:10 -03:00
Victor Radael 42726b805b FIX: Ci 2022-04-07 16:43:59 -03:00
Victor Radael 8d8c5c000e Merge pull request #43 from dadosfera/alpha
Deploy STG
2022-04-07 16:17:27 -03:00
rodrigo.zamboni b7f608f246 FIX: TestConnection Fix 2022-04-07 11:22:57 -03:00
rodrigo.zamboni e513689f4a REFACTOR: Att Functions to work with info given by auth 2022-03-30 11:32:59 -03:00
rodrigo.zamboni 761a00c6a6 removing default true value from auth 2022-03-29 18:16:18 -03:00
rodrigo.zamboni ef9cff601f Merge branch 'alpha' of https://github.com/dadosfera/maestro into alpha 2022-03-29 17:44:10 -03:00
rodrigo.zamboni a3ba9c743f Prepared Outputs and Transformations to use info params given by auth 2022-03-29 17:43:44 -03:00
Victor Radael 9dd3ec4579 FIX: Change Header Name 2022-03-29 15:44:53 -03:00
rodrigo.zamboni 8b19da9217 fixed merge conflicts 2022-03-29 15:22:42 -03:00
rodrigo.zamboni 238de920dc Prepared Inputs for info params added by auth 2022-03-29 15:18:35 -03:00
Victor Radael fe1a426e2b FIX: Add Cors Config 2022-03-29 15:16:37 -03:00
Victor Radael 1f85d3f502 FIX: Add Cors Config 2022-03-29 15:10:29 -03:00
rodrigo.zamboni c68207728b merge fix 2022-03-29 12:06:26 -03:00
rodrigo.zamboni c431867814 preparing info param 2022-03-29 12:04:10 -03:00
Victor Radael ca7f9855b1 Add body Info 2022-03-29 11:54:14 -03:00
Victor Radael 7a95ec537f REFACTOR: Add Auth Validators 2022-03-28 13:06:03 -03:00
Victor Radael 25d99089db CI: Fix 2022-03-24 14:44:26 -03:00
36 changed files with 1339 additions and 1029 deletions
+48 -5
View File
@@ -7,8 +7,26 @@ on:
- main
jobs:
extract_environment:
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.extract_environment.outputs.environment }}
steps:
- name: Extract Environment
run: |
if [ ${GITHUB_REF} == "refs/heads/main" ]; then
echo "##[set-output name=environment;]$(echo "prd")"
elif [ ${GITHUB_REF} == "refs/heads/alpha" ]; then
echo "##[set-output name=environment;]$(echo "dev")"
elif [ ${GITHUB_REF} == "refs/heads/beta" ]; then
echo "##[set-output name=environment;]$(echo "stg")"
fi
id: extract_environment
deploy:
runs-on: self-hosted
needs: extract_environment
runs-on:
[self-hosted, '${{ needs.extract_environment.outputs.environment }}']
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -70,6 +88,7 @@ jobs:
- name: Configure AWS Region
if: steps.semantic.outputs.new_release_published == 'true'
uses: aws-actions/configure-aws-credentials@v1
id: aws
with:
aws-region: us-east-1
@@ -78,9 +97,11 @@ jobs:
shell: bash
run: |
if [ ${GITHUB_REF} == "refs/heads/main" ]; then
echo "##[set-output name=result;]$(echo "production")"
else
echo "##[set-output name=result;]$(echo ${GITHUB_REF#refs/heads/})"
echo "##[set-output name=result;]$(echo "prd")"
elif [ ${GITHUB_REF} == "refs/heads/alpha" ]; then
echo "##[set-output name=result;]$(echo "dev")"
elif [ ${GITHUB_REF} == "refs/heads/beta" ]; then
echo "##[set-output name=result;]$(echo "stg")"
fi
id: extract_environment
@@ -89,6 +110,29 @@ jobs:
id: login_ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, Tag, and Push Image to AWS ECR
if: steps.semantic.outputs.new_release_published == 'true'
env:
ENV: ${{ steps.extract_environment.outputs.result }}
IMAGE_TAG: ${{ steps.semantic.outputs.new_release_version }}
ACCOUNT_ID: ${{ steps.aws.outputs.aws-account-id }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
docker-compose -f build.docker-compose.yml build --build-arg NPM_TOKEN=${NPM_TOKEN}
docker-compose -f build.docker-compose.yml push
- name: Create ZIP file to Deploy AWS Beanstalk
if: steps.semantic.outputs.new_release_published == 'true'
env:
ENV: ${{ steps.extract_environment.outputs.result }}
IMAGE_TAG: ${{ steps.semantic.outputs.new_release_version }}
ACCOUNT_ID: ${{ steps.aws.outputs.aws-account-id }}
run: |
sed -i -e "s/\${ENV}/$ENV/g" docker-compose.yml
sed -i -e "s/\${IMAGE_TAG}/$IMAGE_TAG/g" docker-compose.yml
sed -i -e "s/\${ACCOUNT_ID}/$ACCOUNT_ID/g" docker-compose.yml
zip deploy.zip docker-compose.yml -r .ebextensions
- name: Deploy AWS Beanstalk
if: steps.semantic.outputs.new_release_published == 'true'
env:
@@ -97,7 +141,6 @@ jobs:
APP_NAME: maestro
run: |
eb use $APP_NAME-$ENV
echo -e "deploy:\n artifact: deploy.zip" >> .elasticbeanstalk/config.yml
eb deploy
- name: Remove Docker's Trash
+11 -1
View File
@@ -16,6 +16,7 @@ jobs:
- name: Install Docker Compose
run: |
python3 -m pip install docker-compose --upgrade
- name: Build
env:
ENV: test
@@ -24,13 +25,22 @@ jobs:
run: |
export ENV=test
export IMAGE_TAG=test
export ACCOUNT_ID=test
docker-compose -f build.docker-compose.yml build --build-arg NPM_TOKEN=${NPM_TOKEN}
- name: Run Test
env:
ENV: test
IMAGE_TAG: test
ACCOUNT_ID: test
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
export ENV=test
export IMAGE_TAG=test
docker-compose -f build.docker-compose.yml run -e NPM_TOKEN=${NPM_TOKEN} --rm --entrypoint="npm run test" maestro
docker-compose -f build.docker-compose.yml run -e NPM_TOKEN=${NPM_TOKEN} --rm --entrypoint="npm run test" maestro
- name: Remove Docker's Trash
continue-on-error: true
run: |
docker system prune
docker rmi -f $(docker images -aq)
+3 -1
View File
@@ -33,7 +33,9 @@
{ "from": "main", "to": "alpha" },
{ "from": "main", "to": "beta" }
],
"backmergeStrategy": "merge"
"backmergeStrategy": "merge",
"clearWorkspace": true,
"restoreWorkspace": true
}
],
"@semantic-release/npm",
+2 -4
View File
@@ -1,6 +1,4 @@
<p align="center">
<image src="./assets/maestro.svg" style="width:10rem">
<h1 align="center">Maestro</h1>
</p>
x
<h1 align="center">Maestro</h1>
</p>
+1 -1
View File
@@ -2,4 +2,4 @@ version: "3.8"
services:
maestro:
build: .
image: 468720548566.dkr.ecr.us-east-1.amazonaws.com/microservices/maestro_${ENV}:${IMAGE_TAG}
image: ${ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/microservices/maestro_${ENV}:${IMAGE_TAG}
+1 -1
View File
@@ -1,7 +1,7 @@
version: "3.8"
services:
maestro:
image: 468720548566.dkr.ecr.us-east-1.amazonaws.com/microservices/maestro_${ENV}:${IMAGE_TAG}
image: ${ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/microservices/maestro_${ENV}:${IMAGE_TAG}
container_name: maestro
restart: always
ports:
+321 -229
View File
@@ -9,16 +9,16 @@
"version": "0.0.0",
"license": "UNLICENSED",
"dependencies": {
"@grpc/grpc-js": "^1.5.7",
"@grpc/grpc-js": "^1.5.10",
"@grpc/proto-loader": "^0.6.9",
"@nestjs/common": "^8.4.0",
"@nestjs/config": "^1.2.0",
"@nestjs/core": "^8.4.0",
"@nestjs/common": "^8.4.3",
"@nestjs/config": "^1.2.1",
"@nestjs/core": "^8.4.3",
"@nestjs/mapped-types": "*",
"@nestjs/microservices": "^8.4.0",
"@nestjs/platform-express": "^8.4.0",
"@nestjs/swagger": "^5.1.5",
"@victorradael/protospack": "^1.3.1",
"@nestjs/microservices": "^8.4.3",
"@nestjs/platform-express": "^8.4.3",
"@nestjs/swagger": "^5.2.1",
"@victorradael/protospack": "^1.4.2",
"axios": "^0.25.0",
"dotenv": "^14.2.0",
"grpc": "^1.24.11",
@@ -30,29 +30,29 @@
"swagger-ui-express": "^4.3.0"
},
"devDependencies": {
"@nestjs/cli": "^8.2.2",
"@nestjs/cli": "^8.2.4",
"@nestjs/schematics": "^8.0.8",
"@nestjs/testing": "^8.4.0",
"@nestjs/testing": "^8.4.3",
"@types/express": "^4.17.13",
"@types/jest": "27.0.2",
"@types/jsonwebtoken": "^8.5.8",
"@types/jwk-to-pem": "^2.0.1",
"@types/node": "^16.11.26",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"eslint": "^8.10.0",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.5.1",
"prettier": "^2.3.2",
"prettier": "^2.6.1",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"ts-jest": "^27.0.3",
"ts-jest": "^27.1.4",
"ts-loader": "^9.2.7",
"ts-node": "^10.7.0",
"tsconfig-paths": "^3.13.0",
"typescript": "^4.6.2"
"tsconfig-paths": "^3.14.1",
"typescript": "^4.6.3"
}
},
"node_modules/@ampproject/remapping": {
@@ -68,9 +68,9 @@
}
},
"node_modules/@angular-devkit/core": {
"version": "13.2.6",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.6.tgz",
"integrity": "sha512-8h2mWdBTN/dYwZuzKMg2IODlOWMdbJcpQG4XVrkk9ejCPP+3aX5Aa3glCe/voN6eBNiRfs8YDM0jxmpN2aWVtg==",
"version": "13.3.0",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.3.0.tgz",
"integrity": "sha512-8YrreVbWlJVZnk5zs4vfkRItrPEtWhUcxWOBfYT/Kwu4FwJVAnNuhJAxxXOAQ2Ckd7cv30Idh/RFVLbTZ5Gs9w==",
"dev": true,
"dependencies": {
"ajv": "8.9.0",
@@ -113,12 +113,12 @@
"dev": true
},
"node_modules/@angular-devkit/schematics": {
"version": "13.2.6",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.6.tgz",
"integrity": "sha512-mPgSqdnZRuPSMeUA+T+mwVCrq2yhXpcYm1/Rjbhy09CyHs4wSrFv21WHCrE6shlvXpcmwr0n+I0DIeagAPmjUA==",
"version": "13.3.0",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.3.0.tgz",
"integrity": "sha512-hq7tqnB3uVT/iDgqWWZ4kvnijeAcgd4cfLzZiCPaYn1nuhZf0tWsho6exhJ/odMZHvVp7w8OibqWiUKxNY9zHA==",
"dev": true,
"dependencies": {
"@angular-devkit/core": "13.2.6",
"@angular-devkit/core": "13.3.0",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -131,13 +131,13 @@
}
},
"node_modules/@angular-devkit/schematics-cli": {
"version": "13.2.6",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-13.2.6.tgz",
"integrity": "sha512-VdMLn4DoTswjk+1RL+pod8EwLkzh8pMT2OBJ9dhsITru1sr0/2nhsqRwZzZylAXjrFwdfPj1E/vfcAfSkmMGvw==",
"version": "13.3.0",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-13.3.0.tgz",
"integrity": "sha512-DXT+k4228Ke1zCoU9QxPhXm1xzeYBs5aqgMWhyjXdkfDokJcjQM79CSVLHdKX/OLgR51qhnQ5qVFEHHhVV40EQ==",
"dev": true,
"dependencies": {
"@angular-devkit/core": "13.2.6",
"@angular-devkit/schematics": "13.2.6",
"@angular-devkit/core": "13.3.0",
"@angular-devkit/schematics": "13.3.0",
"ansi-colors": "4.1.1",
"inquirer": "8.2.0",
"minimist": "1.2.5",
@@ -853,9 +853,9 @@
"dev": true
},
"node_modules/@grpc/grpc-js": {
"version": "1.5.8",
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.8.tgz",
"integrity": "sha512-sfoF2yMVJcqEoX8E3o9+idUckv/w4cM+lt3U7Qz6GUBLgxAh1NS/3fEZKOMhwdvOEgWvPqbls/EgLXGKI0sm2A==",
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.10.tgz",
"integrity": "sha512-++oAubX/7rJzlqH0ShyzDENNNDHYrlttdc3NM40KlaVQDcgGqQknuPoavmyTC+oNUDyxPCX5dHceKhfcgN3tiw==",
"dependencies": {
"@grpc/proto-loader": "^0.6.4",
"@types/node": ">=12.12.47"
@@ -1350,14 +1350,14 @@
}
},
"node_modules/@nestjs/cli": {
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-8.2.3.tgz",
"integrity": "sha512-p//DACefn40VClXroxzS+2pkSdaXYvKKcr4bFOUBMTdJqT9he+U9ifcJUkg/h1bFU/Y8SS2cUsTyl0ZBHHHRcw==",
"version": "8.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-8.2.4.tgz",
"integrity": "sha512-9zNV9oMtaz1vwLO3WXviD0wzRpyiaLWJZ7KCIZLk62U22RDNRsbtLLDS52Wkig5L8UU7Z1xRfrEv+s3f9keysQ==",
"dev": true,
"dependencies": {
"@angular-devkit/core": "13.2.6",
"@angular-devkit/schematics": "13.2.6",
"@angular-devkit/schematics-cli": "13.2.6",
"@angular-devkit/core": "13.3.0",
"@angular-devkit/schematics": "13.3.0",
"@angular-devkit/schematics-cli": "13.3.0",
"@nestjs/schematics": "^8.0.3",
"chalk": "3.0.0",
"chokidar": "3.5.3",
@@ -1386,10 +1386,56 @@
"npm": ">= 6.11.0"
}
},
"node_modules/@nestjs/cli/node_modules/json5": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"dependencies": {
"minimist": "^1.2.0"
},
"bin": {
"json5": "lib/cli.js"
}
},
"node_modules/@nestjs/cli/node_modules/strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/@nestjs/cli/node_modules/tsconfig-paths": {
"version": "3.14.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz",
"integrity": "sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==",
"dev": true,
"dependencies": {
"@types/json5": "^0.0.29",
"json5": "^1.0.1",
"minimist": "^1.2.0",
"strip-bom": "^3.0.0"
}
},
"node_modules/@nestjs/cli/node_modules/typescript": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz",
"integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/@nestjs/common": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.1.tgz",
"integrity": "sha512-g6beLHvJ2cCIdlW8Uui8rQh3+oxLOBLzDIk3yWH4ocp2HEgOJwF0iUv/pk33tFuwbXESIGMK8K165cpZUjNoxA==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.3.tgz",
"integrity": "sha512-QIhWykB7IPOwHQB/K9wMwmQKibQ5dhg9dt8ySOoD36uFFwN3RJQelzMFF9Rtu7hrMPk6pSyismEUKQ8BZMUD9w==",
"dependencies": {
"axios": "0.26.1",
"iterare": "1.2.1",
@@ -1428,12 +1474,12 @@
}
},
"node_modules/@nestjs/config": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@nestjs/config/-/config-1.2.0.tgz",
"integrity": "sha512-GGZOj2g6EMZ23orsQqeD2Vs5E2ZrmAiB0qCGvERv+5nQmZjY4nKkisG4awQsym1uotmmzgtsd9lOiKqTIFONhA==",
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@nestjs/config/-/config-1.2.1.tgz",
"integrity": "sha512-EgaGTXvG4unD5lGWmdSrUFrkGpX32lQGE/8qS60EnL82sIZV7HT1ZL7ib5S86P1nB+DnFDbDhDqTaZ3mivTyOg==",
"dependencies": {
"dotenv": "16.0.0",
"dotenv-expand": "8.0.1",
"dotenv-expand": "5.1.0",
"lodash": "4.17.21",
"uuid": "8.3.2"
},
@@ -1452,9 +1498,9 @@
}
},
"node_modules/@nestjs/core": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.1.tgz",
"integrity": "sha512-JUV2cy/5z8MS2SRwszLmyOCclMMlyumxIbC1YFFlnSInhu7ODhrHLIMztyGmyAIuaehbOnyXPtHkjl01rHxc5w==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.3.tgz",
"integrity": "sha512-1etUwTR5jTCTcNh6MW1tFYrHMCvcdIzJ3Z9O9ETR8EYIsphhzsxxRCa0dfb9peKJEQpl6SkoGOILIFkxfokOPw==",
"hasInstallScript": true,
"dependencies": {
"@nuxtjs/opencollective": "0.3.2",
@@ -1509,9 +1555,9 @@
}
},
"node_modules/@nestjs/microservices": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-8.4.1.tgz",
"integrity": "sha512-w5T4DZJQNPhN/d/pdAO6bO1YUpAgiPfNmKwflaFtuyJzJjak+naOctx+3bc1eatrsbP+JEj6oCBVBuDIWHfcOQ==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-8.4.3.tgz",
"integrity": "sha512-/ZT5wo1s65J9Cqp2g5eNrYO34VH7/qUkDu4jJyZCT61I9UqpO49J3+1YIAHfmJJzHcrenjgt1sBtlFhwPR3Lgg==",
"dependencies": {
"iterare": "1.2.1",
"json-socket": "0.3.0",
@@ -1567,9 +1613,9 @@
}
},
"node_modules/@nestjs/platform-express": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-8.4.1.tgz",
"integrity": "sha512-c18zuhoegJsS1vZueGaNyvU8mLyFtS+6FJ2WAzDOXNpchpq0okrEPdKBifIisWuxgffQYKIufoK73vEfXSfDLg==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-8.4.3.tgz",
"integrity": "sha512-MXXaShhWRChf7jKBrvRKjCFX84ii/4245TcB8Gei7UAGzDRHbM08lpLXDR+wUUUtC8rN2gWu8d8IGptAnqMGpA==",
"dependencies": {
"body-parser": "1.19.2",
"cors": "2.8.5",
@@ -1666,9 +1712,9 @@
"dev": true
},
"node_modules/@nestjs/swagger": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-5.2.0.tgz",
"integrity": "sha512-wcW2KCe7irwBw0WKsb03uFk4gnjqNcAcJxXGZxi6ljFiDgyLrQtx5MpE95o703tnn4V/hZR8MqMNFOXuup7Pqw==",
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-5.2.1.tgz",
"integrity": "sha512-7dNa08WCnTsW/oAk3Ujde+z64JMfNm19DhpXasFR8oJp/9pggYAbYU927HpA+GJsSFJX6adjIRZsCKUqaGWznw==",
"dependencies": {
"@nestjs/mapped-types": "1.0.1",
"lodash": "4.17.21",
@@ -1691,9 +1737,9 @@
}
},
"node_modules/@nestjs/testing": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-8.4.1.tgz",
"integrity": "sha512-LOvsLuNh2eRwAtyeoIZWmUZ08wt7QrPrKQujWuRyv+vBYtC+FLHjqreWLpwG2yulNEoQs9Qlr2ubPvFGT1953g==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-8.4.3.tgz",
"integrity": "sha512-6+b2UCObr5onv7TG398VUdkNeU9n+f+TeTvlzmZlp9LKIAS4ZxDxwpdLDl5m/AssdkaZpfb0u755BJfKP5wbNw==",
"dev": true,
"dependencies": {
"optional": "0.1.4",
@@ -2151,9 +2197,9 @@
}
},
"node_modules/@types/supertest": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/@types/supertest/-/supertest-2.0.11.tgz",
"integrity": "sha512-uci4Esokrw9qGb9bvhhSVEjd6rkny/dk5PK/Qz4yxKiyppEI+dOPlNrZBahE3i+PoKFYyDxChVXZ/ysS/nrm1Q==",
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/@types/supertest/-/supertest-2.0.12.tgz",
"integrity": "sha512-X3HPWTwXRerBZS7Mo1k6vMVR1Z6zmJcDVn5O/31whe0tnjE4te6ZJSJGq1RiqHPjzPdMTfjCFogDJmwng9xHaQ==",
"dev": true,
"dependencies": {
"@types/superagent": "*"
@@ -2175,14 +2221,14 @@
"dev": true
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.15.0.tgz",
"integrity": "sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz",
"integrity": "sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "5.15.0",
"@typescript-eslint/type-utils": "5.15.0",
"@typescript-eslint/utils": "5.15.0",
"@typescript-eslint/scope-manager": "5.17.0",
"@typescript-eslint/type-utils": "5.17.0",
"@typescript-eslint/utils": "5.17.0",
"debug": "^4.3.2",
"functional-red-black-tree": "^1.0.1",
"ignore": "^5.1.8",
@@ -2208,14 +2254,14 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.15.0.tgz",
"integrity": "sha512-NGAYP/+RDM2sVfmKiKOCgJYPstAO40vPAgACoWPO/+yoYKSgAXIFaBKsV8P0Cc7fwKgvj27SjRNX4L7f4/jCKQ==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.17.0.tgz",
"integrity": "sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "5.15.0",
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/typescript-estree": "5.15.0",
"@typescript-eslint/scope-manager": "5.17.0",
"@typescript-eslint/types": "5.17.0",
"@typescript-eslint/typescript-estree": "5.17.0",
"debug": "^4.3.2"
},
"engines": {
@@ -2235,13 +2281,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.15.0.tgz",
"integrity": "sha512-EFiZcSKrHh4kWk0pZaa+YNJosvKE50EnmN4IfgjkA3bTHElPtYcd2U37QQkNTqwMCS7LXeDeZzEqnsOH8chjSg==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz",
"integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/visitor-keys": "5.15.0"
"@typescript-eslint/types": "5.17.0",
"@typescript-eslint/visitor-keys": "5.17.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2252,12 +2298,12 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.15.0.tgz",
"integrity": "sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz",
"integrity": "sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==",
"dev": true,
"dependencies": {
"@typescript-eslint/utils": "5.15.0",
"@typescript-eslint/utils": "5.17.0",
"debug": "^4.3.2",
"tsutils": "^3.21.0"
},
@@ -2278,9 +2324,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.15.0.tgz",
"integrity": "sha512-yEiTN4MDy23vvsIksrShjNwQl2vl6kJeG9YkVJXjXZnkJElzVK8nfPsWKYxcsGWG8GhurYXP4/KGj3aZAxbeOA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz",
"integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2291,13 +2337,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.15.0.tgz",
"integrity": "sha512-Hb0e3dGc35b75xLzixM3cSbG1sSbrTBQDfIScqdyvrfJZVEi4XWAT+UL/HMxEdrJNB8Yk28SKxPLtAhfCbBInA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz",
"integrity": "sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/visitor-keys": "5.15.0",
"@typescript-eslint/types": "5.17.0",
"@typescript-eslint/visitor-keys": "5.17.0",
"debug": "^4.3.2",
"globby": "^11.0.4",
"is-glob": "^4.0.3",
@@ -2318,15 +2364,15 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.15.0.tgz",
"integrity": "sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.17.0.tgz",
"integrity": "sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.9",
"@typescript-eslint/scope-manager": "5.15.0",
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/typescript-estree": "5.15.0",
"@typescript-eslint/scope-manager": "5.17.0",
"@typescript-eslint/types": "5.17.0",
"@typescript-eslint/typescript-estree": "5.17.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
},
@@ -2342,12 +2388,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.15.0.tgz",
"integrity": "sha512-+vX5FKtgvyHbmIJdxMJ2jKm9z2BIlXJiuewI8dsDYMp5LzPUcuTT78Ya5iwvQg3VqSVdmxyM8Anj1Jeq7733ZQ==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz",
"integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/types": "5.17.0",
"eslint-visitor-keys": "^3.0.0"
},
"engines": {
@@ -2359,9 +2405,9 @@
}
},
"node_modules/@victorradael/protospack": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.3.1.tgz",
"integrity": "sha512-upx7LfkoWZ+by2FoymE0g/zJwNj0C1H53BMSrSc+vGHzsc4W57h547KcSvYSphVhKfsr/g53tPFmVRcnvkhWtQ==",
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.4.2.tgz",
"integrity": "sha512-UWEjCVtFag0uHoMLxb55JXG7Qfz0fn8Pk7v1H5dgZcBMLDhs9VARBVNq1JT4P6ypMyrnTbOyq08CoMukF8GHbQ==",
"dependencies": {
"rxjs": "^7.5.5"
}
@@ -3904,12 +3950,9 @@
}
},
"node_modules/dotenv-expand": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-8.0.1.tgz",
"integrity": "sha512-j/Ih7bIERDR5PzI89Zu8ayd3tXZ6E3dbY0ljQ9Db0K87qBO8zdLsi2dIvDHMWtjC3Yxb8XixOTHAtia0fDHRpg==",
"engines": {
"node": ">=12"
}
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
"integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA=="
},
"node_modules/ecdsa-sig-formatter": {
"version": "1.0.11",
@@ -4124,9 +4167,9 @@
}
},
"node_modules/eslint": {
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz",
"integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==",
"version": "8.12.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz",
"integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==",
"dev": true,
"dependencies": {
"@eslint/eslintrc": "^1.2.1",
@@ -7692,15 +7735,18 @@
}
},
"node_modules/prettier": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz",
"integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==",
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.1.tgz",
"integrity": "sha512-8UVbTBYGwN37Bs9LERmxCPjdvPxlEowx2urIL6urHzdb3SDq4B/Z6xLFCblrSnE4iKWcS6ziJ3aOYrc1kz/E2A==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/prettier-linter-helpers": {
@@ -8916,9 +8962,9 @@
}
},
"node_modules/ts-jest": {
"version": "27.1.3",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.3.tgz",
"integrity": "sha512-6Nlura7s6uM9BVUAoqLH7JHyMXjz8gluryjpPXxr3IxZdAXnU6FhjvVLHFtfd1vsE1p8zD1OJfskkc0jhTSnkA==",
"version": "27.1.4",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.4.tgz",
"integrity": "sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ==",
"dev": true,
"dependencies": {
"bs-logger": "0.x",
@@ -8940,7 +8986,6 @@
"@babel/core": ">=7.0.0-beta.0 <8",
"@types/jest": "^27.0.0",
"babel-jest": ">=27.0.0 <28",
"esbuild": "~0.14.0",
"jest": "^27.0.0",
"typescript": ">=3.8 <5.0"
},
@@ -9047,14 +9092,14 @@
}
},
"node_modules/tsconfig-paths": {
"version": "3.14.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz",
"integrity": "sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==",
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
"integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==",
"dev": true,
"dependencies": {
"@types/json5": "^0.0.29",
"json5": "^1.0.1",
"minimist": "^1.2.0",
"minimist": "^1.2.6",
"strip-bom": "^3.0.0"
}
},
@@ -9097,6 +9142,12 @@
"json5": "lib/cli.js"
}
},
"node_modules/tsconfig-paths/node_modules/minimist": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"node_modules/tsconfig-paths/node_modules/strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
@@ -9192,9 +9243,9 @@
}
},
"node_modules/typescript": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz",
"integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==",
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -9736,9 +9787,9 @@
}
},
"@angular-devkit/core": {
"version": "13.2.6",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.6.tgz",
"integrity": "sha512-8h2mWdBTN/dYwZuzKMg2IODlOWMdbJcpQG4XVrkk9ejCPP+3aX5Aa3glCe/voN6eBNiRfs8YDM0jxmpN2aWVtg==",
"version": "13.3.0",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.3.0.tgz",
"integrity": "sha512-8YrreVbWlJVZnk5zs4vfkRItrPEtWhUcxWOBfYT/Kwu4FwJVAnNuhJAxxXOAQ2Ckd7cv30Idh/RFVLbTZ5Gs9w==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -9767,12 +9818,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.6",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.6.tgz",
"integrity": "sha512-mPgSqdnZRuPSMeUA+T+mwVCrq2yhXpcYm1/Rjbhy09CyHs4wSrFv21WHCrE6shlvXpcmwr0n+I0DIeagAPmjUA==",
"version": "13.3.0",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.3.0.tgz",
"integrity": "sha512-hq7tqnB3uVT/iDgqWWZ4kvnijeAcgd4cfLzZiCPaYn1nuhZf0tWsho6exhJ/odMZHvVp7w8OibqWiUKxNY9zHA==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.6",
"@angular-devkit/core": "13.3.0",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -9797,13 +9848,13 @@
}
},
"@angular-devkit/schematics-cli": {
"version": "13.2.6",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-13.2.6.tgz",
"integrity": "sha512-VdMLn4DoTswjk+1RL+pod8EwLkzh8pMT2OBJ9dhsITru1sr0/2nhsqRwZzZylAXjrFwdfPj1E/vfcAfSkmMGvw==",
"version": "13.3.0",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-13.3.0.tgz",
"integrity": "sha512-DXT+k4228Ke1zCoU9QxPhXm1xzeYBs5aqgMWhyjXdkfDokJcjQM79CSVLHdKX/OLgR51qhnQ5qVFEHHhVV40EQ==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.6",
"@angular-devkit/schematics": "13.2.6",
"@angular-devkit/core": "13.3.0",
"@angular-devkit/schematics": "13.3.0",
"ansi-colors": "4.1.1",
"inquirer": "8.2.0",
"minimist": "1.2.5",
@@ -10337,9 +10388,9 @@
}
},
"@grpc/grpc-js": {
"version": "1.5.8",
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.8.tgz",
"integrity": "sha512-sfoF2yMVJcqEoX8E3o9+idUckv/w4cM+lt3U7Qz6GUBLgxAh1NS/3fEZKOMhwdvOEgWvPqbls/EgLXGKI0sm2A==",
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.10.tgz",
"integrity": "sha512-++oAubX/7rJzlqH0ShyzDENNNDHYrlttdc3NM40KlaVQDcgGqQknuPoavmyTC+oNUDyxPCX5dHceKhfcgN3tiw==",
"requires": {
"@grpc/proto-loader": "^0.6.4",
"@types/node": ">=12.12.47"
@@ -10730,14 +10781,14 @@
}
},
"@nestjs/cli": {
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-8.2.3.tgz",
"integrity": "sha512-p//DACefn40VClXroxzS+2pkSdaXYvKKcr4bFOUBMTdJqT9he+U9ifcJUkg/h1bFU/Y8SS2cUsTyl0ZBHHHRcw==",
"version": "8.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-8.2.4.tgz",
"integrity": "sha512-9zNV9oMtaz1vwLO3WXviD0wzRpyiaLWJZ7KCIZLk62U22RDNRsbtLLDS52Wkig5L8UU7Z1xRfrEv+s3f9keysQ==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.6",
"@angular-devkit/schematics": "13.2.6",
"@angular-devkit/schematics-cli": "13.2.6",
"@angular-devkit/core": "13.3.0",
"@angular-devkit/schematics": "13.3.0",
"@angular-devkit/schematics-cli": "13.3.0",
"@nestjs/schematics": "^8.0.3",
"chalk": "3.0.0",
"chokidar": "3.5.3",
@@ -10757,12 +10808,47 @@
"typescript": "4.6.2",
"webpack": "5.70.0",
"webpack-node-externals": "3.0.0"
},
"dependencies": {
"json5": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
}
},
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
"dev": true
},
"tsconfig-paths": {
"version": "3.14.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz",
"integrity": "sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==",
"dev": true,
"requires": {
"@types/json5": "^0.0.29",
"json5": "^1.0.1",
"minimist": "^1.2.0",
"strip-bom": "^3.0.0"
}
},
"typescript": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz",
"integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==",
"dev": true
}
}
},
"@nestjs/common": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.1.tgz",
"integrity": "sha512-g6beLHvJ2cCIdlW8Uui8rQh3+oxLOBLzDIk3yWH4ocp2HEgOJwF0iUv/pk33tFuwbXESIGMK8K165cpZUjNoxA==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-8.4.3.tgz",
"integrity": "sha512-QIhWykB7IPOwHQB/K9wMwmQKibQ5dhg9dt8ySOoD36uFFwN3RJQelzMFF9Rtu7hrMPk6pSyismEUKQ8BZMUD9w==",
"requires": {
"axios": "0.26.1",
"iterare": "1.2.1",
@@ -10799,9 +10885,9 @@
}
},
"@nestjs/core": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.1.tgz",
"integrity": "sha512-JUV2cy/5z8MS2SRwszLmyOCclMMlyumxIbC1YFFlnSInhu7ODhrHLIMztyGmyAIuaehbOnyXPtHkjl01rHxc5w==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-8.4.3.tgz",
"integrity": "sha512-1etUwTR5jTCTcNh6MW1tFYrHMCvcdIzJ3Z9O9ETR8EYIsphhzsxxRCa0dfb9peKJEQpl6SkoGOILIFkxfokOPw==",
"requires": {
"@nuxtjs/opencollective": "0.3.2",
"fast-safe-stringify": "2.1.1",
@@ -10819,9 +10905,9 @@
"requires": {}
},
"@nestjs/microservices": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-8.4.1.tgz",
"integrity": "sha512-w5T4DZJQNPhN/d/pdAO6bO1YUpAgiPfNmKwflaFtuyJzJjak+naOctx+3bc1eatrsbP+JEj6oCBVBuDIWHfcOQ==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-8.4.3.tgz",
"integrity": "sha512-/ZT5wo1s65J9Cqp2g5eNrYO34VH7/qUkDu4jJyZCT61I9UqpO49J3+1YIAHfmJJzHcrenjgt1sBtlFhwPR3Lgg==",
"requires": {
"iterare": "1.2.1",
"json-socket": "0.3.0",
@@ -10829,9 +10915,9 @@
}
},
"@nestjs/platform-express": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-8.4.1.tgz",
"integrity": "sha512-c18zuhoegJsS1vZueGaNyvU8mLyFtS+6FJ2WAzDOXNpchpq0okrEPdKBifIisWuxgffQYKIufoK73vEfXSfDLg==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-8.4.3.tgz",
"integrity": "sha512-MXXaShhWRChf7jKBrvRKjCFX84ii/4245TcB8Gei7UAGzDRHbM08lpLXDR+wUUUtC8rN2gWu8d8IGptAnqMGpA==",
"requires": {
"body-parser": "1.19.2",
"cors": "2.8.5",
@@ -10898,9 +10984,9 @@
}
},
"@nestjs/swagger": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-5.2.0.tgz",
"integrity": "sha512-wcW2KCe7irwBw0WKsb03uFk4gnjqNcAcJxXGZxi6ljFiDgyLrQtx5MpE95o703tnn4V/hZR8MqMNFOXuup7Pqw==",
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-5.2.1.tgz",
"integrity": "sha512-7dNa08WCnTsW/oAk3Ujde+z64JMfNm19DhpXasFR8oJp/9pggYAbYU927HpA+GJsSFJX6adjIRZsCKUqaGWznw==",
"requires": {
"@nestjs/mapped-types": "1.0.1",
"lodash": "4.17.21",
@@ -10908,9 +10994,9 @@
}
},
"@nestjs/testing": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-8.4.1.tgz",
"integrity": "sha512-LOvsLuNh2eRwAtyeoIZWmUZ08wt7QrPrKQujWuRyv+vBYtC+FLHjqreWLpwG2yulNEoQs9Qlr2ubPvFGT1953g==",
"version": "8.4.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-8.4.3.tgz",
"integrity": "sha512-6+b2UCObr5onv7TG398VUdkNeU9n+f+TeTvlzmZlp9LKIAS4ZxDxwpdLDl5m/AssdkaZpfb0u755BJfKP5wbNw==",
"dev": true,
"requires": {
"optional": "0.1.4",
@@ -11327,9 +11413,9 @@
}
},
"@types/supertest": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/@types/supertest/-/supertest-2.0.11.tgz",
"integrity": "sha512-uci4Esokrw9qGb9bvhhSVEjd6rkny/dk5PK/Qz4yxKiyppEI+dOPlNrZBahE3i+PoKFYyDxChVXZ/ysS/nrm1Q==",
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/@types/supertest/-/supertest-2.0.12.tgz",
"integrity": "sha512-X3HPWTwXRerBZS7Mo1k6vMVR1Z6zmJcDVn5O/31whe0tnjE4te6ZJSJGq1RiqHPjzPdMTfjCFogDJmwng9xHaQ==",
"dev": true,
"requires": {
"@types/superagent": "*"
@@ -11351,14 +11437,14 @@
"dev": true
},
"@typescript-eslint/eslint-plugin": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.15.0.tgz",
"integrity": "sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz",
"integrity": "sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "5.15.0",
"@typescript-eslint/type-utils": "5.15.0",
"@typescript-eslint/utils": "5.15.0",
"@typescript-eslint/scope-manager": "5.17.0",
"@typescript-eslint/type-utils": "5.17.0",
"@typescript-eslint/utils": "5.17.0",
"debug": "^4.3.2",
"functional-red-black-tree": "^1.0.1",
"ignore": "^5.1.8",
@@ -11368,52 +11454,52 @@
}
},
"@typescript-eslint/parser": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.15.0.tgz",
"integrity": "sha512-NGAYP/+RDM2sVfmKiKOCgJYPstAO40vPAgACoWPO/+yoYKSgAXIFaBKsV8P0Cc7fwKgvj27SjRNX4L7f4/jCKQ==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.17.0.tgz",
"integrity": "sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "5.15.0",
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/typescript-estree": "5.15.0",
"@typescript-eslint/scope-manager": "5.17.0",
"@typescript-eslint/types": "5.17.0",
"@typescript-eslint/typescript-estree": "5.17.0",
"debug": "^4.3.2"
}
},
"@typescript-eslint/scope-manager": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.15.0.tgz",
"integrity": "sha512-EFiZcSKrHh4kWk0pZaa+YNJosvKE50EnmN4IfgjkA3bTHElPtYcd2U37QQkNTqwMCS7LXeDeZzEqnsOH8chjSg==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz",
"integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==",
"dev": true,
"requires": {
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/visitor-keys": "5.15.0"
"@typescript-eslint/types": "5.17.0",
"@typescript-eslint/visitor-keys": "5.17.0"
}
},
"@typescript-eslint/type-utils": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.15.0.tgz",
"integrity": "sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz",
"integrity": "sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==",
"dev": true,
"requires": {
"@typescript-eslint/utils": "5.15.0",
"@typescript-eslint/utils": "5.17.0",
"debug": "^4.3.2",
"tsutils": "^3.21.0"
}
},
"@typescript-eslint/types": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.15.0.tgz",
"integrity": "sha512-yEiTN4MDy23vvsIksrShjNwQl2vl6kJeG9YkVJXjXZnkJElzVK8nfPsWKYxcsGWG8GhurYXP4/KGj3aZAxbeOA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz",
"integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.15.0.tgz",
"integrity": "sha512-Hb0e3dGc35b75xLzixM3cSbG1sSbrTBQDfIScqdyvrfJZVEi4XWAT+UL/HMxEdrJNB8Yk28SKxPLtAhfCbBInA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz",
"integrity": "sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg==",
"dev": true,
"requires": {
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/visitor-keys": "5.15.0",
"@typescript-eslint/types": "5.17.0",
"@typescript-eslint/visitor-keys": "5.17.0",
"debug": "^4.3.2",
"globby": "^11.0.4",
"is-glob": "^4.0.3",
@@ -11422,33 +11508,33 @@
}
},
"@typescript-eslint/utils": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.15.0.tgz",
"integrity": "sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.17.0.tgz",
"integrity": "sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.9",
"@typescript-eslint/scope-manager": "5.15.0",
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/typescript-estree": "5.15.0",
"@typescript-eslint/scope-manager": "5.17.0",
"@typescript-eslint/types": "5.17.0",
"@typescript-eslint/typescript-estree": "5.17.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
}
},
"@typescript-eslint/visitor-keys": {
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.15.0.tgz",
"integrity": "sha512-+vX5FKtgvyHbmIJdxMJ2jKm9z2BIlXJiuewI8dsDYMp5LzPUcuTT78Ya5iwvQg3VqSVdmxyM8Anj1Jeq7733ZQ==",
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz",
"integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "5.15.0",
"@typescript-eslint/types": "5.17.0",
"eslint-visitor-keys": "^3.0.0"
}
},
"@victorradael/protospack": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.3.1.tgz",
"integrity": "sha512-upx7LfkoWZ+by2FoymE0g/zJwNj0C1H53BMSrSc+vGHzsc4W57h547KcSvYSphVhKfsr/g53tPFmVRcnvkhWtQ==",
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.4.2.tgz",
"integrity": "sha512-UWEjCVtFag0uHoMLxb55JXG7Qfz0fn8Pk7v1H5dgZcBMLDhs9VARBVNq1JT4P6ypMyrnTbOyq08CoMukF8GHbQ==",
"requires": {
"rxjs": "^7.5.5"
}
@@ -12849,9 +12935,9 @@
}
},
"eslint": {
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz",
"integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==",
"version": "8.12.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz",
"integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==",
"dev": true,
"requires": {
"@eslint/eslintrc": "^1.2.1",
@@ -15574,9 +15660,9 @@
"dev": true
},
"prettier": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz",
"integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==",
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.1.tgz",
"integrity": "sha512-8UVbTBYGwN37Bs9LERmxCPjdvPxlEowx2urIL6urHzdb3SDq4B/Z6xLFCblrSnE4iKWcS6ziJ3aOYrc1kz/E2A==",
"dev": true
},
"prettier-linter-helpers": {
@@ -16470,9 +16556,9 @@
"dev": true
},
"ts-jest": {
"version": "27.1.3",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.3.tgz",
"integrity": "sha512-6Nlura7s6uM9BVUAoqLH7JHyMXjz8gluryjpPXxr3IxZdAXnU6FhjvVLHFtfd1vsE1p8zD1OJfskkc0jhTSnkA==",
"version": "27.1.4",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.4.tgz",
"integrity": "sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ==",
"dev": true,
"requires": {
"bs-logger": "0.x",
@@ -16539,14 +16625,14 @@
}
},
"tsconfig-paths": {
"version": "3.14.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz",
"integrity": "sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==",
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
"integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==",
"dev": true,
"requires": {
"@types/json5": "^0.0.29",
"json5": "^1.0.1",
"minimist": "^1.2.0",
"minimist": "^1.2.6",
"strip-bom": "^3.0.0"
},
"dependencies": {
@@ -16559,6 +16645,12 @@
"minimist": "^1.2.0"
}
},
"minimist": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
@@ -16657,9 +16749,9 @@
}
},
"typescript": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz",
"integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==",
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
"dev": true
},
"universalify": {
+17 -17
View File
@@ -21,16 +21,16 @@
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"@grpc/grpc-js": "^1.5.7",
"@grpc/grpc-js": "^1.5.10",
"@grpc/proto-loader": "^0.6.9",
"@nestjs/common": "^8.4.0",
"@nestjs/common": "^8.4.3",
"@nestjs/config": "^1.2.1",
"@nestjs/core": "^8.4.0",
"@nestjs/core": "^8.4.3",
"@nestjs/mapped-types": "*",
"@nestjs/microservices": "^8.4.0",
"@nestjs/platform-express": "^8.4.0",
"@nestjs/swagger": "^5.1.5",
"@victorradael/protospack": "^1.3.1",
"@nestjs/microservices": "^8.4.3",
"@nestjs/platform-express": "^8.4.3",
"@nestjs/swagger": "^5.2.1",
"@victorradael/protospack": "^1.4.2",
"axios": "^0.25.0",
"dotenv": "^14.2.0",
"grpc": "^1.24.11",
@@ -42,29 +42,29 @@
"swagger-ui-express": "^4.3.0"
},
"devDependencies": {
"@nestjs/cli": "^8.2.2",
"@nestjs/cli": "^8.2.4",
"@nestjs/schematics": "^8.0.8",
"@nestjs/testing": "^8.4.0",
"@nestjs/testing": "^8.4.3",
"@types/express": "^4.17.13",
"@types/jest": "27.0.2",
"@types/jsonwebtoken": "^8.5.8",
"@types/jwk-to-pem": "^2.0.1",
"@types/node": "^16.11.26",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"eslint": "^8.10.0",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.5.1",
"prettier": "^2.3.2",
"prettier": "^2.6.1",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"ts-jest": "^27.0.3",
"ts-jest": "^27.1.4",
"ts-loader": "^9.2.7",
"ts-node": "^10.7.0",
"tsconfig-paths": "^3.13.0",
"typescript": "^4.6.2"
"tsconfig-paths": "^3.14.1",
"typescript": "^4.6.3"
},
"jest": {
"moduleFileExtensions": [
+6 -6
View File
@@ -92,11 +92,11 @@ export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply(LoggerMiddleware)
.forRoutes
// InputsController,
// TransformationsController,
// OutputsController,
// PipelinesController,
();
.forRoutes(
InputsController,
TransformationsController,
OutputsController,
PipelinesController,
);
}
}
+30 -40
View File
@@ -1,10 +1,16 @@
import {
OnModuleInit,
Inject,
} from '@nestjs/common';
import { OnModuleInit, Inject } from '@nestjs/common';
import { ClientGrpc } from '@nestjs/microservices';
import { InputService } from '@victorradael/protospack';
import { ICreateInputRequest, IIdRequest, ITestConnectionRequest, UpdateInputRequest } from './interfaces';
import {
objectCamelToSnake,
objectSnakeToCamel,
} from 'src/utils/CaseConverter';
import {
ICreateInputRequest,
IIdRequest,
ITestConnectionRequest,
UpdateInputRequest,
} from './interfaces';
export class InputsClientService implements OnModuleInit {
private inputService: InputService;
@@ -12,21 +18,18 @@ export class InputsClientService implements OnModuleInit {
@Inject('INPUTS_PACKAGE') private readonly grpcClient: ClientGrpc,
) {}
onModuleInit() {
this.inputService =
this.grpcClient.getService<InputService>(
'InputService',
);
this.grpcClient.getService<InputService>('InputService');
}
async create(createInputDto: ICreateInputRequest ) {
async create(createInputDto: ICreateInputRequest) {
console.log('InputClientService', 'Create');
const createInputResponse = await new Promise((resolve, reject) => {
this.inputService.Create(createInputDto).subscribe({
this.inputService.Create(objectSnakeToCamel(createInputDto)).subscribe({
next(x) {
resolve(x);
resolve(objectCamelToSnake(x));
},
error(err) {
console.log('Observable Error');
@@ -43,19 +46,15 @@ export class InputsClientService implements OnModuleInit {
});
return createInputResponse;
}
async findOne(data: IIdRequest ) {
async findOne(data: IIdRequest) {
console.log('InputClientService', 'FindOne');
const { id } = data
const findOneInputResponse = await new Promise((resolve, reject) => {
this.inputService.FindOne({id}).subscribe({
this.inputService.FindOne(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
resolve(objectCamelToSnake(x));
},
error(err) {
console.log('Observable Error');
@@ -72,17 +71,15 @@ export class InputsClientService implements OnModuleInit {
});
return findOneInputResponse;
}
async findAll(data) {
console.log('InputClientService', 'FindAll');
const findAllInputResponse = await new Promise((resolve, reject) => {
this.inputService.FindAll({}).subscribe({
this.inputService.FindAll(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
resolve(objectCamelToSnake(x));
},
error(err) {
console.log('Observable Error');
@@ -99,16 +96,14 @@ export class InputsClientService implements OnModuleInit {
});
return findAllInputResponse;
}
async update(updateInputDTO:UpdateInputRequest) {
async update(updateInputDTO: UpdateInputRequest) {
console.log('InputClientService', 'Update');
const updateInputResponse = await new Promise((resolve, reject) => {
this.inputService.Update(updateInputDTO).subscribe({
this.inputService.Update(objectSnakeToCamel(updateInputDTO)).subscribe({
next(x) {
resolve(x);
resolve(objectCamelToSnake(x));
},
error(err) {
console.log('Observable Error');
@@ -125,16 +120,15 @@ export class InputsClientService implements OnModuleInit {
});
return updateInputResponse;
}
async remove(idRequest:IIdRequest) {
async remove(idRequest: IIdRequest) {
console.log('InputClientService', 'Remove');
const removeInputResponse = await new Promise((resolve, reject) => {
this.inputService.Remove(idRequest).subscribe({
this.inputService.Remove(objectSnakeToCamel(idRequest)).subscribe({
next(x) {
resolve(x);
resolve(objectCamelToSnake(x));
},
error(err) {
console.log('Observable Error');
@@ -151,16 +145,14 @@ export class InputsClientService implements OnModuleInit {
});
return removeInputResponse;
}
async testConnection(data:ITestConnectionRequest) {
console.log('InputClientService', 'TestCOnnection');
async testConnection(data: ITestConnectionRequest) {
console.log('InputClientService', 'TestConnection');
const testConnectionResponse = await new Promise((resolve, reject) => {
this.inputService.TestConnection(data).subscribe({
this.inputService.TestConnection(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
resolve(objectCamelToSnake(x));
},
error(err) {
console.log('Observable Error');
@@ -177,7 +169,5 @@ export class InputsClientService implements OnModuleInit {
});
return testConnectionResponse;
}
}
+13 -7
View File
@@ -8,7 +8,7 @@ interface Values {
engine: string;
schema: string;
}
interface Cron {
hours: string[];
hour_interval: boolean;
@@ -28,29 +28,35 @@ interface Cron {
week_days_resourse_value: number;
}
export interface ICreateInputRequest {
export interface Info {
costumer_id: string;
user_id: string;
}
export interface ICreateInputRequest {
cron: string;
name: string;
plugin: string;
values: Values;
operation: string;
info: Info;
}
export interface IIdRequest{
id:string;
export interface IIdRequest {
id: string;
info: Info;
}
interface UpdateInputRequest {
export interface UpdateInputRequest {
id: string;
cron: string;
name: string;
plugin: string;
values: Values;
operation: string;
info: Info;
}
export interface ITestConnectionRequest {
plugin: string;
values: Values;
}
}
+1 -1
View File
@@ -19,4 +19,4 @@ export class OutputsClientConfiguration {
},
};
}
};
}
+33 -36
View File
@@ -1,34 +1,33 @@
import {
Controller,
Inject,
OnModuleInit
} from '@nestjs/common';
import {
ClientGrpc,
Payload,
} from '@nestjs/microservices';
import { ApiTags } from '@nestjs/swagger';
import { Controller, Inject, OnModuleInit } from '@nestjs/common';
import { ClientGrpc, Payload } from '@nestjs/microservices';
import { OutputsServiceInterface } from '@victorradael/protospack';
import { objectCamelToSnake } from 'src/utils/CaseConverter';
import { ICreateOutputRequest, IIdRequest, IOutputUpdateRequest } from './interfaces';
import {
objectCamelToSnake,
objectSnakeToCamel,
} from 'src/utils/CaseConverter';
import {
ICreateOutputRequest,
IIdRequest,
IOutputUpdateRequest,
} from './interfaces';
@Controller('output')
export class OutputsClientService implements OnModuleInit {
private outputService: OutputsServiceInterface;
constructor(
@Inject('OUTPUTS_PACKAGE')private readonly grpcClient: ClientGrpc,
){}
@Inject('OUTPUTS_PACKAGE') private readonly grpcClient: ClientGrpc,
) {}
onModuleInit() {
this.outputService =
this.grpcClient.getService<OutputsServiceInterface>('OutputService');
}
async create(@Payload() createOutputDto:ICreateOutputRequest ) {
async create(@Payload() createOutputDto: ICreateOutputRequest) {
console.log('OutputClientService', 'Create');
const createOutputResponse = await new Promise((resolve, reject) => {
this.outputService.Create(createOutputDto).subscribe({
this.outputService.Create(objectSnakeToCamel(createOutputDto)).subscribe({
next(x) {
resolve(x);
},
@@ -45,17 +44,17 @@ export class OutputsClientService implements OnModuleInit {
.catch((err) => {
throw new Error(err);
});
const convertedItem = objectCamelToSnake(createOutputResponse["output"])
createOutputResponse["output"] = convertedItem
const convertedItem = objectCamelToSnake(createOutputResponse['output']);
createOutputResponse['output'] = convertedItem;
return createOutputResponse;
}
async findAll() {
async findAll(data) {
console.log('OutputClientService', 'FindAll');
const findAllOutputResponse = await new Promise((resolve, reject) => {
this.outputService.FindAll({}).subscribe({
this.outputService.FindAll(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
},
@@ -73,18 +72,18 @@ export class OutputsClientService implements OnModuleInit {
throw new Error(err);
});
const convertedOutputs = findAllOutputResponse['outputs'].map((ot)=>{
return objectCamelToSnake(ot)
})
const convertedOutputs = findAllOutputResponse['outputs'].map((ot) => {
return objectCamelToSnake(ot);
});
return {outputs:convertedOutputs};
return { outputs: convertedOutputs };
}
async findOne({id}: IIdRequest) {
async findOne(data: IIdRequest) {
console.log('OutputClientService', 'FindOne');
const findOneOutputResponse = await new Promise((resolve, reject) => {
this.outputService.FindOne({id}).subscribe({
this.outputService.FindOne(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
},
@@ -101,17 +100,15 @@ export class OutputsClientService implements OnModuleInit {
.catch((err) => {
throw new Error(err);
});
return objectCamelToSnake(findOneOutputResponse);
}
async update(updateOutPutDTO: IOutputUpdateRequest) {
console.log('OutputClientService', 'Update');
const updateOutputResponse = await new Promise((resolve, reject) => {
this.outputService.Update(updateOutPutDTO).subscribe({
this.outputService.Update(objectSnakeToCamel(updateOutPutDTO)).subscribe({
next(x) {
resolve(x);
},
@@ -128,17 +125,17 @@ export class OutputsClientService implements OnModuleInit {
.catch((err) => {
throw new Error(err);
});
return objectCamelToSnake(updateOutputResponse);
}
async remove({id}:IIdRequest) {
async remove(data: IIdRequest) {
console.log('OutputClientService', 'Remove');
const removeOutputResponse = await new Promise((resolve, reject) => {
this.outputService.Remove({id}).subscribe({
this.outputService.Remove(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
resolve(objectCamelToSnake(x));
},
error(err) {
console.log('Observable Error');
@@ -154,6 +151,6 @@ export class OutputsClientService implements OnModuleInit {
throw new Error(err);
});
return removeOutputResponse;
return removeOutputResponse;
}
}
+20 -13
View File
@@ -1,22 +1,29 @@
export interface ICreateOutputRequest {
operation: string;
name: string;
plugin: string;
values: Values;
operation: string;
name: string;
plugin: string;
values: Values;
}
export interface Values {
prefix: string;
prefix: string;
}
export interface IIdRequest{
id:string;
interface Info {
user_id: string;
customer_id: string;
}
export interface IIdRequest {
id: string;
info: Info;
}
export interface IOutputUpdateRequest {
id: string;
operation: string;
values: Values;
plugin: string;
name: string;
}
id: string;
operation: string;
values: Values;
plugin: string;
name: string;
info: Info;
}
+1 -1
View File
@@ -19,4 +19,4 @@ export class PipelinesClientConfiguration {
},
};
}
};
}
+86 -66
View File
@@ -1,53 +1,47 @@
import {
Controller,
Delete,
Get,
Inject,
OnModuleInit,
Param,
Post,
Put,
} from '@nestjs/common';
import {
Client,
ClientGrpc,
MessagePattern,
Payload,
} from '@nestjs/microservices';
import { Inject, OnModuleInit } from '@nestjs/common';
import { ClientGrpc, Payload } from '@nestjs/microservices';
import { PipelinesServiceInterface } from '@victorradael/protospack';
import { ICreatePipelineDto, IdRequest, IGetPipelineLogsRequest, IUpdatePipelineRequest } from './interfaces';
import {
objectCamelToSnake,
objectSnakeToCamel,
} from 'src/utils/CaseConverter';
import {
ICreatePipelineDto,
IdRequest,
IGetPipelineLogsRequest,
IIdRequest,
IUpdatePipelineRequest,
} from './interfaces';
export class PipelinesClientService implements OnModuleInit {
private pipelineService: PipelinesServiceInterface;
constructor(
@Inject('PIPELINES_PACKAGE') private readonly grpcClient: ClientGrpc,
){}
@Inject('PIPELINES_PACKAGE') private readonly grpcClient: ClientGrpc,
) {}
onModuleInit() {
this.pipelineService =
this.grpcClient.getService<PipelinesServiceInterface>(
'PipelineService',
);
this.grpcClient.getService<PipelinesServiceInterface>('PipelineService');
}
async create(@Payload() createPipelineDto: ICreatePipelineDto ) {
async create(@Payload() createPipelineDto: ICreatePipelineDto) {
console.log('PipelinesClientService', 'Create');
const createPipelineResponse = await new Promise((resolve, reject) => {
this.pipelineService.create(createPipelineDto).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
this.pipelineService
.create(objectSnakeToCamel(createPipelineDto))
.subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
})
.then((res) => res)
.catch((err) => {
@@ -55,14 +49,13 @@ export class PipelinesClientService implements OnModuleInit {
});
return createPipelineResponse;
}
async findAll() {
async findAll(data: IIdRequest) {
console.log('PipelinesClientService', 'FindAll');
const findAllPipelineResponse = await new Promise((resolve, reject) => {
this.pipelineService.findAll({}).subscribe({
this.pipelineService.findAll(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
},
@@ -83,11 +76,11 @@ export class PipelinesClientService implements OnModuleInit {
return findAllPipelineResponse;
}
async findOne({id}: IdRequest) {
async findOne(data: IIdRequest) {
console.log('PipelinesClientService', 'FindOne');
const findOnePipelineResponse = await new Promise((resolve, reject) => {
this.pipelineService.findOne({id}).subscribe({
this.pipelineService.findOne(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
},
@@ -108,39 +101,40 @@ export class PipelinesClientService implements OnModuleInit {
return findOnePipelineResponse;
}
async update(UpdatePipelineRequest:IUpdatePipelineRequest) {
async update(UpdatePipelineRequest: IUpdatePipelineRequest) {
console.log('PipelinesClientService', 'Update');
const updatePipelineResponse = await new Promise((resolve, reject) => {
this.pipelineService.update(UpdatePipelineRequest).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
this.pipelineService
.update(objectSnakeToCamel(UpdatePipelineRequest))
.subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
})
.then((res) => res)
.catch((err) => {
throw new Error(err);
});
return updatePipelineResponse;
return updatePipelineResponse;
}
async remove({id}:IdRequest) {
async remove(data: IIdRequest) {
console.log('PipelinesClientService', 'Remove');
const removePipelineResponse = await new Promise((resolve, reject) => {
this.pipelineService.remove({id}).subscribe({
this.pipelineService.remove(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
resolve(objectCamelToSnake(x));
},
error(err) {
console.log('Observable Error');
@@ -156,10 +150,10 @@ export class PipelinesClientService implements OnModuleInit {
throw new Error(err);
});
return removePipelineResponse;
return removePipelineResponse;
}
async getPipelineLogsMessages( data:IGetPipelineLogsRequest) {
async getPipelineLogsMessages(data: IGetPipelineLogsRequest) {
console.log('PipelinesClientService', 'GetPipelineLogsMessages');
const logsPipelineResponse = await new Promise((resolve, reject) => {
@@ -181,14 +175,14 @@ export class PipelinesClientService implements OnModuleInit {
throw new Error(err);
});
return logsPipelineResponse;
return logsPipelineResponse;
}
async getPipelineStatus({id}:IdRequest) {
async getPipelineStatus({ id }: IdRequest) {
console.log('PipelinesClientService', 'GetPipelineStatus');
const statusPipelineResponse = await new Promise((resolve, reject) => {
this.pipelineService.getPipelineStatus({id}).subscribe({
this.pipelineService.getPipelineStatus({ id }).subscribe({
next(x) {
resolve(x);
},
@@ -206,6 +200,32 @@ export class PipelinesClientService implements OnModuleInit {
throw new Error(err);
});
return statusPipelineResponse;
return statusPipelineResponse;
}
async runPipeline({ id, info }: IIdRequest) {
console.log('PipelinesClientService', 'RunPipeline');
const statusPipelineResponse = await new Promise((resolve, reject) => {
this.pipelineService
.triggerPipeline(objectSnakeToCamel({ id, info }))
.subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
})
.then((res) => res)
.catch((err) => {
throw new Error(err);
});
return statusPipelineResponse;
}
}
+29 -18
View File
@@ -1,28 +1,39 @@
export interface ICreatePipelineDto {
input: IdRequest;
transformations: IdRequest[];
output: IdRequest;
tags: string[];
name: string;
description: string;
input: IdRequest;
transformations: IdRequest[];
output: IdRequest;
tags: string[];
name: string;
description: string;
info: Info;
}
export interface Info {
customer_id: sting;
user_id: string;
}
export interface IdRequest {
id: string;
id: string;
}
export interface IIdRequest {
id: string;
info: Info;
}
export interface IUpdatePipelineRequest {
input: IdRequest;
transformations: IdRequest[];
output: IdRequest;
tags: string[];
name: string;
description: string;
id: string;
input: IdRequest;
transformations: IdRequest[];
output: IdRequest;
tags: string[];
name: string;
description: string;
id: string;
info: Info;
}
export interface IGetPipelineLogsRequest {
id: string;
details: string;
}
id: string;
details: string;
}
+1 -1
View File
@@ -19,4 +19,4 @@ export class TransformationsClientConfiguration {
},
};
}
};
}
+108 -102
View File
@@ -1,23 +1,11 @@
import {
Controller,
Delete,
Get,
Inject,
OnModuleInit,
Param,
Post,
Put,
} from '@nestjs/common';
import {
Client,
ClientGrpc,
MessagePattern,
Payload,
} from '@nestjs/microservices';
import { ApiTags } from '@nestjs/swagger';
import { Controller, Inject, OnModuleInit, Post } from '@nestjs/common';
import { ClientGrpc } from '@nestjs/microservices';
import { TransformationsServiceInterface } from '@victorradael/protospack';
import { objectCamelToSnake } from 'src/utils/CaseConverter';
import { Transformation, ICreateTransformationsRequest, IdRequest, IUpdateTransformationRequest } from './interfaces';
import {
objectCamelToSnake,
objectSnakeToCamel,
} from 'src/utils/CaseConverter';
import { ICreateTransformationsRequest, IIdRequest } from './interfaces';
@Controller('transformation')
export class TransformationsClientService implements OnModuleInit {
@@ -37,76 +25,88 @@ export class TransformationsClientService implements OnModuleInit {
async create(createTransformationsDto: ICreateTransformationsRequest) {
console.log('TransformationClientService', 'Create');
const createTransformationResponse = await new Promise((resolve, reject) => {
this.transformationService.create(createTransformationsDto).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
})
const createTransformationResponse = await new Promise(
(resolve, reject) => {
this.transformationService
.create(objectSnakeToCamel(createTransformationsDto))
.subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
},
)
.then((res) => res)
.catch((err) => {
throw new Error(err);
});
const convertedTransforms = createTransformationResponse["transformations"].map((tr)=>{
return objectCamelToSnake(tr)
})
const convertedTransforms = createTransformationResponse[
'transformations'
].map((tr) => {
return objectCamelToSnake(tr);
});
return {transformations:convertedTransforms};
return { transformations: convertedTransforms };
}
async findAll() {
async findAll(data) {
console.log('TransformationClientService', 'FindAll');
const findAllTransformationResponse = await new Promise((resolve, reject) => {
this.transformationService.findAll({}).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
})
const findAllTransformationResponse = await new Promise(
(resolve, reject) => {
this.transformationService.findAll(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
},
)
.then((res) => res)
.catch((err) => {
throw new Error(err);
});
const convertedTransforms = findAllTransformationResponse["transformations"].map((tr)=>{
return objectCamelToSnake(tr)
})
return {transformations:convertedTransforms};
const convertedTransforms = findAllTransformationResponse[
'transformations'
].map((tr) => {
return objectCamelToSnake(tr);
});
return { transformations: convertedTransforms };
}
async findOne({id}: IdRequest) {
async findOne(data: IIdRequest) {
console.log('TransformationClientService', 'FindOne');
const findOneTransformationResponse = await new Promise((resolve, reject) => {
this.transformationService.findOne({id}).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
})
const findOneTransformationResponse = await new Promise(
(resolve, reject) => {
this.transformationService.findOne(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
},
)
.then((res) => res)
.catch((err) => {
throw new Error(err);
@@ -115,48 +115,54 @@ export class TransformationsClientService implements OnModuleInit {
return objectCamelToSnake(findOneTransformationResponse);
}
async update(updateTransformationDTO: IUpdateTransformationRequest) {
async update(updateTransformationDTO) {
console.log('TransformationClientService', 'Update');
const updateTransformationResponse = await new Promise((resolve, reject) => {
this.transformationService.update(updateTransformationDTO).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
})
const updateTransformationResponse = await new Promise(
(resolve, reject) => {
this.transformationService
.update(objectSnakeToCamel(updateTransformationDTO))
.subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
},
)
.then((res) => res)
.catch((err) => {
throw new Error(err);
});
return objectCamelToSnake(updateTransformationResponse);
return objectCamelToSnake(updateTransformationResponse);
}
async remove({id}: IdRequest) {
async remove(data: IIdRequest) {
console.log('TransformationClientService', 'Remove');
const removeTransformationResponse = await new Promise((resolve, reject) => {
this.transformationService.remove({id}).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
})
const removeTransformationResponse = await new Promise(
(resolve, reject) => {
this.transformationService.remove(objectSnakeToCamel(data)).subscribe({
next(x) {
resolve(x);
},
error(err) {
console.log('Observable Error');
reject(err);
},
complete() {
console.log('done');
},
});
},
)
.then((res) => res)
.catch((err) => {
throw new Error(err);
+29 -20
View File
@@ -1,28 +1,37 @@
export interface ICreateTransformationsRequest {
transformations: Transformation[];
transformations: Transformation[];
info: Info;
}
interface Param {
base_column: string;
column_name: string;
n_digits: number;
start_index: number;
randbelow: number;
const: string;
}
interface Transformation {
created_at: string;
id: string;
client_id: string;
type: string;
params: Param[];
input_source: string;
table: string;
base_column: string;
column_name: string;
n_digits: number;
start_index: number;
randbelow: number;
const: string;
}
export interface IdRequest{
id:string;
export interface Info {
customer_id: string;
user_id: string;
}
interface Transformation {
created_at: string;
id: string;
client_id: string;
type: string;
params: Param[];
input_source: string;
table: string;
}
export interface IIdRequest {
id: string;
info: Info;
}
export interface IUpdateTransformationRequest {
transformation: Transformation;
}
transformation: Transformation;
info: Info;
}
+7
View File
@@ -0,0 +1,7 @@
import { HttpExceptionFilter } from './http-exception.filter';
describe('HttpExceptionFilter', () => {
it('should be defined', () => {
expect(new HttpExceptionFilter()).toBeDefined();
});
});
+24
View File
@@ -0,0 +1,24 @@
import {
ExceptionFilter,
Catch,
ArgumentsHost,
HttpException,
} from '@nestjs/common';
import { Request, Response } from 'express';
@Catch(HttpException)
export class HttpExceptionFilter implements ExceptionFilter {
catch(exception: HttpException, host: ArgumentsHost) {
const ctx = host.switchToHttp();
const response = ctx.getResponse<Response>();
const request = ctx.getRequest<Request>();
const status = exception.getStatus();
response.status(status).json({
status_code: status,
timestamp: new Date().toISOString(),
path: request.url,
method: request.method,
});
}
}
+8 -1
View File
@@ -5,7 +5,14 @@ import { writeFileSync } from 'fs';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const app = await NestFactory.create(AppModule, {
cors: {
origin: '*',
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
preflightContinue: false,
optionsSuccessStatus: 204,
},
});
const config = new DocumentBuilder()
.setTitle('Maestro Grpc Documentation')
+116 -14
View File
@@ -1,23 +1,125 @@
import { Request, Response, NextFunction } from 'express';
import axios from 'axios';
import { NestMiddleware } from '@nestjs/common';
import {
ForbiddenException,
InternalServerErrorException,
NestMiddleware,
UnauthorizedException,
UseFilters,
} from '@nestjs/common';
import jwkToPem from 'jwk-to-pem';
import { decode, verify } from 'jsonwebtoken';
import { HttpExceptionFilter } from 'src/error/http-exception.filter';
@UseFilters(new HttpExceptionFilter())
export class LoggerMiddleware implements NestMiddleware {
use = async (request: Request, response: Response, next: NextFunction) => {
try {
const verify_response = await axios
.post(`${process.env.DEV_URL}/user/verify`, {
token: request.get('Authorization'),
})
.then((response) => {
if (response.data.message == 'Success') {
next();
}
});
const idToken = request.get('Dadosfera-User');
const accessToken = request.get('Authorization');
const privateKey = process.env.JWT_PRIVATE_KEY;
console.log(verify_response);
} catch (error) {
response.status(401).send({ message: 'Authentication Failed!' });
const requiredMethod = request.method.trim();
const requiredRoute = request.route.path.split('/')[1].trim();
verify(idToken, privateKey, (err) => {
if (err) {
throw new UnauthorizedException();
}
});
const jwtDecoded: any = decode(idToken);
const permissions = jwtDecoded.user.permissions;
const clienId = jwtDecoded.user.customerId;
const userId = jwtDecoded.user.id;
await verifyToken(accessToken);
let havePermission = false;
permissions.forEach((permission) => {
permission = permission.split('/');
const method = permission[0].trim();
const route = permission[1].trim();
if (method === requiredMethod && route === requiredRoute) {
havePermission = true;
}
});
if (havePermission) {
request.body.info = {
customer_id: clienId,
user_id: userId,
};
next();
} else {
throw new ForbiddenException();
}
};
}
let pems: { [key: string]: Record<string, unknown> }[];
const setUp = async (region: string, id: string) => {
const URL = `https://cognito-idp.${region}.amazonaws.com/${id}/.well-known/jwks.json`;
try {
const response = await axios.get(URL);
if (response.status !== 200) {
throw new InternalServerErrorException();
}
const data = await response.data;
const { keys } = data;
pems = keys.map((key: any) => {
const modulus = key.n;
const exponent = key.e;
const keyType = key.kty;
const jwk = { kty: keyType, n: modulus, e: exponent };
const pem = jwkToPem(jwk);
const keyId = key.kid;
return { [keyId]: pem };
});
} catch (error) {
// console.log(error);
// console.log('Error! Unable to download JWKs');
}
};
const verifyToken = async (accessToken: string) => {
const awsRegion = process.env.AWS_REGION;
const awsPoolId = process.env.AWS_IDENTITY_POOL_ID;
try {
await setUp(awsRegion, awsPoolId);
if (!accessToken) {
throw new UnauthorizedException();
}
const user: any = decode(accessToken, { complete: true });
if (user === null) {
throw new UnauthorizedException();
}
const { kid } = user.header;
const pem = pems.filter((item: any) => item[kid]);
const pemValue: any = pem[0][kid];
if (!pem) {
throw new UnauthorizedException();
}
verify(accessToken, pemValue, (err: any) => {
if (err) {
throw new UnauthorizedException();
}
return;
});
} catch (error) {
throw new UnauthorizedException();
}
};
+4 -2
View File
@@ -1,4 +1,4 @@
import { Body, Controller, Post } from '@nestjs/common';
import { Body, Controller, Post, UnauthorizedException } from '@nestjs/common';
import { AuthClientService } from 'src/clients/auth/client.service';
@@ -18,7 +18,9 @@ export class AuthController {
const tokens = await this.authClient
.signIn({ username, password })
.then((result) => result)
.catch((err) => console.log(err));
.catch((err) => {
throw new UnauthorizedException(err.message);
});
return tokens;
}
+36 -45
View File
@@ -7,92 +7,83 @@ import {
Post,
Put,
} from '@nestjs/common';
import axios from 'axios';
import { InputsService } from './inputs.service';
import { InputsClientService } from 'src/clients/inputs/client.service';
import { Payload } from '@nestjs/microservices';
import {
ICreateInputRequest,
UpdateInputRequest,
} from 'src/clients/inputs/interfaces';
@Controller('input')
@Controller('inputs')
export class InputsController {
constructor(private inputsClientService: InputsClientService) {}
constructor( private inputsClientService:InputsClientService){}
@Get('/test-connection')
@Post('/test-connection')
async testConnection(@Body() data) {
console.log(
process.env.DEV_URL + `/test-connection`,
'ON TEST CONNECTION ROUTE',
);
console.log(data)
console.log(`/test-connection`, 'ON TEST CONNECTION ROUTE');
const inputService = new InputsService(this.inputsClientService)
const response = await inputService.testConnection(data)
const inputService = new InputsService(this.inputsClientService);
const response = await inputService.testConnection(data);
return response;
}
@Post()
async create(@Body() createInputDto) {
console.log(process.env.DEV_URL + `/input`, 'ON CREATE ROUTE');
async create(@Body() createInputDto: ICreateInputRequest) {
console.log(`/input`, 'ON CREATE ROUTE');
const inputService = new InputsService(this.inputsClientService)
const response = await inputService.create(createInputDto)
const inputService = new InputsService(this.inputsClientService);
const response = await inputService.create(createInputDto);
return response;
}
@Get()
async findAll() {
console.log(process.env.DEV_URL + `/input`, 'ON FIND ALL ROUTE');
async findAll(@Body() body) {
console.log(`/input`, 'ON FIND ALL ROUTE');
const inputService = new InputsService(this.inputsClientService)
const inputService = new InputsService(this.inputsClientService);
const response = await inputService.findAll()
const response = await inputService.findAll(body);
return response;
}
@Get('/:id')
async findOne(@Param() params) {
const { id } = params
console.log(process.env.DEV_URL + `/input/${id}`, 'ON FIND ONE ROUTE');
const inputService = new InputsService(this.inputsClientService)
const response = await inputService.findOne(id)
async findOne(@Body() body, @Param() params) {
const { id } = params;
console.log(`/input/${id}`, 'ON FIND ONE ROUTE');
const inputService = new InputsService(this.inputsClientService);
const response = await inputService.findOne({ id, ...body });
return response;
}
@Put(':id')
async update(
@Payload() updateInputDto,
@Param() params,
) {
const {id} = params;
async update(@Body() updateInputDto: UpdateInputRequest, @Param() params) {
const { id } = params;
const { info } = updateInputDto;
delete updateInputDto.info;
console.log(process.env.DEV_URL + `/input/${id}`, 'ON UPDATE ROUTE');
const inputService = new InputsService(this.inputsClientService)
console.log(`/input/${id}`, 'ON UPDATE ROUTE');
const inputService = new InputsService(this.inputsClientService);
const response = await inputService.update(id,updateInputDto)
const response = await inputService.update(id, updateInputDto, info);
return response;
}
@Delete(':id')
async delete(@Param() params) {
async delete(@Body() data, @Param() params) {
const { id } = params;
const {id} = params
console.log(process.env.DEV_URL + `/input/${id}`, 'ON DELETE ROUTE');
console.log(`/input/${id}`, 'ON DELETE ROUTE');
const inputService = new InputsService(this.inputsClientService)
const inputService = new InputsService(this.inputsClientService);
const response = await inputService.remove(id)
const response = await inputService.remove({ id, ...data });
return response;
}
}
+43 -53
View File
@@ -1,87 +1,77 @@
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { Body, HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { InputsClientService } from 'src/clients/inputs/client.service';
import {
ICreateInputRequest,
IIdRequest,
Info,
} from 'src/clients/inputs/interfaces';
@Injectable()
export class InputsService {
constructor(private inputClient: InputsClientService) {}
constructor( private inputClient: InputsClientService){}
async create(@Body() data: ICreateInputRequest) {
try {
const createInputResponse = await this.inputClient.create(data);
async create(data){
try{
const createInputResponse = await this.inputClient.create(data)
return createInputResponse;
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async findAll(){
async findAll(body) {
try {
const findAllInputResponse = await this.inputClient.findAll(body);
try{
const findAllInputResponse = await this.inputClient.findAll({})
return findAllInputResponse;
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async findOne(id:string){
try{
const findOneInputResponse = await this.inputClient.findOne({id})
async findOne(idRequest: IIdRequest) {
try {
const findOneInputResponse = await this.inputClient.findOne(idRequest);
return findOneInputResponse;
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async update(id:string,data){
async update(id: string, data, info: Info) {
try {
const updateInputResponse = await this.inputClient.update({
id,
info,
...data,
});
try{
const updateInputResponse = await this.inputClient.update({id,...data})
return updateInputResponse;
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async remove(id:string){
async remove(idRequest: IIdRequest) {
try {
const removeInputResponse = await this.inputClient.remove(idRequest);
try{
const removeInputResponse = await this.inputClient.remove({id})
return removeInputResponse;
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async testConnection(data){
async testConnection(data) {
try {
const testConnectionInputResponse = await this.inputClient.testConnection(
data,
);
try{
const testConnectionInputResponse = await this.inputClient.testConnection(data)
return testConnectionInputResponse;
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
}
+22 -26
View File
@@ -6,7 +6,6 @@ import {
Param,
Post,
Put,
Redirect,
} from '@nestjs/common';
import { Payload } from '@nestjs/microservices';
import { OutputsClientService } from 'src/clients/outputs/client.service';
@@ -14,63 +13,60 @@ import { OutputsService } from './outputs.service';
@Controller('outputs')
export class OutputsController {
constructor( private outputsClientService:OutputsClientService){}
constructor(private outputsClientService: OutputsClientService) {}
@Post()
async create(@Body() createOutputDto) {
console.log(process.env.DEV_URL + `/output`, 'ON CREATE ROUTE');
const outputService = new OutputsService(this.outputsClientService)
const response = await outputService.create(createOutputDto)
const outputService = new OutputsService(this.outputsClientService);
const response = await outputService.create(createOutputDto);
return response;
}
@Get()
async findAll() {
async findAll(@Body() data) {
console.log(process.env.DEV_URL + `/output`, 'ON Find All ROUTE');
const outputService = new OutputsService(this.outputsClientService)
const response = await outputService.findAll()
const outputService = new OutputsService(this.outputsClientService);
const response = await outputService.findAll(data);
return response;
}
@Get('/:id')
async findOne(@Param() params) {
const {id} = params;
async findOne(@Body() data, @Param() params) {
const { id } = params;
console.log(process.env.DEV_URL + `/output/${id}`, 'ON Find One ROUTE');
const outputService = new OutputsService(this.outputsClientService)
const response = await outputService.findOne(id)
const outputService = new OutputsService(this.outputsClientService);
const response = await outputService.findOne({ id, ...data });
return response;
}
@Put(':id')
async update(
@Payload() updateOutputDto,
@Param() params,
) {
const {id} = params;
async update(@Payload() updateOutputDto, @Param() params) {
const { id } = params;
const { info } = updateOutputDto;
delete updateOutputDto.info;
console.log(process.env.DEV_URL + `/output/${id}`, 'ON UPDATE ROUTE');
const outputService = new OutputsService(this.outputsClientService)
const response = await outputService.update(id,updateOutputDto)
const outputService = new OutputsService(this.outputsClientService);
const response = await outputService.update(id, updateOutputDto, info);
return response;
}
@Delete(':id')
async delete(@Param() params) {
const {id} = params;
async delete(@Body() data, @Param() params) {
const { id } = params;
console.log(process.env.DEV_URL + `/output/${id}`, 'ON DELETE ROUTE');
const outputService = new OutputsService(this.outputsClientService)
const response = await outputService.remove(id)
const outputService = new OutputsService(this.outputsClientService);
const response = await outputService.remove({ id, ...data });
return response;
}
+44 -50
View File
@@ -1,69 +1,63 @@
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { IIdRequest, Info } from 'src/clients/outputs/interfaces';
import { OutputsClientService } from 'src/clients/outputs/client.service';
@Injectable()
export class OutputsService {
constructor(private outputClient: OutputsClientService) {}
constructor( private outputClient: OutputsClientService){}
async create(createOutputDto) {
try {
const createOutputResponse = await this.outputClient.create(
createOutputDto,
);
async create(createOutputDto){
try{
const createOutputResponse = await this.outputClient.create(createOutputDto);
return createOutputResponse
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
}
}
async findOne(id:string){
try{
const findOneOutputResponse = await this.outputClient.findOne({id});
return findOneOutputResponse
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
}
}
async findAll(){
try{
const findAllOutputResponse = await this.outputClient.findAll();
return findAllOutputResponse
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
return createOutputResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async update(id:string, data){
try{
const updateOutputResponse = await this.outputClient.update({id,...data});
return updateOutputResponse
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
async findOne(data: IIdRequest) {
try {
const findOneOutputResponse = await this.outputClient.findOne(data);
return findOneOutputResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async remove(id:string){
async findAll(data) {
try {
const findAllOutputResponse = await this.outputClient.findAll(data);
try{
return findAllOutputResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
const removeOutputResponse = await this.outputClient.remove({id});
return removeOutputResponse
async update(id: string, data, info: Info) {
try {
const updateOutputResponse = await this.outputClient.update({
id,
info,
...data,
});
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
return updateOutputResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async remove(data: IIdRequest) {
try {
const removeOutputResponse = await this.outputClient.remove(data);
return removeOutputResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
}
+54 -47
View File
@@ -6,104 +6,111 @@ import {
Param,
Post,
Put,
Redirect,
} from '@nestjs/common';
import { Payload } from '@nestjs/microservices';
import { PipelinesClientService } from 'src/clients/pipelines/client.service';
import { objectCamelToSnake } from 'src/utils/CaseConverter';
import { PipelinesService } from './pipelines.service';
@Controller('pipelines')
export class PipelinesController {
constructor(private pipelinesClientService: PipelinesClientService) {}
constructor( private pipelinesClientService:PipelinesClientService){}
@Get('start/:id')
async activate(@Param() params, @Body() body) {
const { id } = params;
const { info } = body;
@Get(':id/status')
async getPipelineStatus(
@Param() params,
) {
const { id , details } = params;
console.log(process.env.DEV_URL + `/pipeline/${id}`, 'ON GET PIPELINE STATUS ROUTE');
console.log(
process.env.DEV_URL + `/transformation/start/${id}`,
'ON START PIPELINE ROUTE',
);
const pipelineService = new PipelinesService(this.pipelinesClientService)
const response = await pipelineService.getPipelineStatus(id)
const pipelineService = new PipelinesService(this.pipelinesClientService);
const response = await pipelineService.runPipeline({ id, info });
return response;
}
@Get(':id/status')
async getPipelineStatus(@Param() params) {
const { id } = params;
console.log(
process.env.DEV_URL + `/pipeline/${id}`,
'ON GET PIPELINE STATUS ROUTE',
);
@Get(':id/:details')
async getPipelineLogs(
@Param() params,
) {
const { id , details } = params;
console.log(process.env.DEV_URL + `/pipeline/${id}`, 'ON GET PIPELINE LOGS ROUTE');
const pipelineService = new PipelinesService(this.pipelinesClientService)
const response = await pipelineService.getPipelineLogsMessages(id,details)
const pipelineService = new PipelinesService(this.pipelinesClientService);
const response = await pipelineService.getPipelineStatus(id);
return response;
}
@Get(':id/:details')
async getPipelineLogs(@Param() params) {
const { id, details } = params;
console.log(
process.env.DEV_URL + `/pipeline/${id}`,
'ON GET PIPELINE LOGS ROUTE',
);
const pipelineService = new PipelinesService(this.pipelinesClientService);
const response = await pipelineService.getPipelineLogsMessages(id, details);
return response;
}
@Post()
async create(@Body() createPipelineDto) {
console.log(process.env.DEV_URL + `/pipelines`, 'ON CREATE ROUTE');
const pipelineService = new PipelinesService(this.pipelinesClientService)
const response = await pipelineService.create(createPipelineDto)
const pipelineService = new PipelinesService(this.pipelinesClientService);
const response = await pipelineService.create(createPipelineDto);
return response;
}
@Get()
async findAll() {
async findAll(@Body() data) {
console.log(process.env.DEV_URL + `/pipeline`, 'ON Find All ROUTE');
const pipelineService = new PipelinesService(this.pipelinesClientService)
const response = await pipelineService.findAll()
const pipelineService = new PipelinesService(this.pipelinesClientService);
const response = await pipelineService.findAll(data);
return response;
}
@Get('/:id')
async findOne(@Param() params) {
const {id} = params;
async findOne(@Body() data, @Param() params) {
const { id } = params;
console.log(process.env.DEV_URL + `/pipeline/${id}`, 'ON Find One ROUTE');
const pipelineService = new PipelinesService(this.pipelinesClientService)
const response = await pipelineService.findOne(id)
const pipelineService = new PipelinesService(this.pipelinesClientService);
const response = await pipelineService.findOne({ id, ...data });
return response;
}
@Put(':id')
async update(
@Payload() updatePipelineDto,
@Param() params,
) {
const {id} = params;
async update(@Body() updatePipelineDto, @Param() params) {
const { id } = params;
const { info } = updatePipelineDto;
delete updatePipelineDto.info;
console.log(process.env.DEV_URL + `/pipeline/${id}`, 'ON UPDATE ROUTE');
const pipelineService = new PipelinesService(this.pipelinesClientService)
const response = await pipelineService.update(id,updatePipelineDto)
const pipelineService = new PipelinesService(this.pipelinesClientService);
const response = await pipelineService.update(id, updatePipelineDto, info);
return response;
}
@Delete(':id')
async delete(@Param() params) {
const {id} = params;
async delete(@Body() data, @Param() params) {
const { id } = params;
console.log(process.env.DEV_URL + `/pipeline/${id}`, 'ON DELETE ROUTE');
const pipelineService = new PipelinesService(this.pipelinesClientService)
const response = await pipelineService.remove(id)
const pipelineService = new PipelinesService(this.pipelinesClientService);
const response = await pipelineService.remove({ id, ...data });
return response;
}
}
+73 -72
View File
@@ -1,99 +1,100 @@
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { PipelinesClientService } from 'src/clients/pipelines/client.service';
import { IIdRequest, Info } from 'src/clients/pipelines/interfaces';
import { objectCamelToSnake } from 'src/utils/CaseConverter';
@Injectable()
export class PipelinesService {
constructor(private pipelineClient: PipelinesClientService) {}
constructor( private pipelineClient: PipelinesClientService){}
async create(createPipelineDto) {
try {
const createPipelineResponse = await this.pipelineClient.create(
createPipelineDto,
);
async create(createPipelineDto){
try{
const createPipelineResponse = await this.pipelineClient.create(createPipelineDto);
return objectCamelToSnake(createPipelineResponse)
}catch(err){
console.log(err)
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
}
}
async findOne(id:string){
try{
const findOnePipelineResponse = await this.pipelineClient.findOne({id});
return objectCamelToSnake(findOnePipelineResponse)
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
}
}
async findAll(){
try{
const findAllPipelineResponse = await this.pipelineClient.findAll();
return objectCamelToSnake(findAllPipelineResponse)
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
return objectCamelToSnake(createPipelineResponse);
} catch (err) {
console.log(err);
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async update(id:string, data){
try{
const updatePipelineResponse = await this.pipelineClient.update({id,...data});
return objectCamelToSnake(updatePipelineResponse)
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
async findOne(data: IIdRequest) {
try {
const findOnePipelineResponse = await this.pipelineClient.findOne(data);
return objectCamelToSnake(findOnePipelineResponse);
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async remove(id:string){
async findAll(data) {
try {
const findAllPipelineResponse = await this.pipelineClient.findAll(data);
try{
const removePipelineResponse = await this.pipelineClient.remove({id});
return removePipelineResponse
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
return objectCamelToSnake(findAllPipelineResponse);
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async update(id: string, data, info: Info) {
try {
const updatePipelineResponse = await this.pipelineClient.update({
id,
info,
...data,
});
async getPipelineLogsMessages(id:string,details:string){
try{
const pipelineLogsResponse = await this.pipelineClient.getPipelineLogsMessages({id,details});
return objectCamelToSnake(pipelineLogsResponse)
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
return objectCamelToSnake(updatePipelineResponse);
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async getPipelineStatus(id:string){
async remove(data: IIdRequest) {
try {
const removePipelineResponse = await this.pipelineClient.remove(data);
try{
const pipelineStatusResponse = await this.pipelineClient.getPipelineStatus({id});
return objectCamelToSnake(pipelineStatusResponse)
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
return removePipelineResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async getPipelineLogsMessages(id: string, details: string) {
try {
const pipelineLogsResponse =
await this.pipelineClient.getPipelineLogsMessages({ id, details });
return objectCamelToSnake(pipelineLogsResponse);
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async getPipelineStatus(id: string) {
try {
const pipelineStatusResponse =
await this.pipelineClient.getPipelineStatus({ id });
return objectCamelToSnake(pipelineStatusResponse);
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async runPipeline({ id, info }: IIdRequest) {
try {
const triggerPipelineResponse = await this.pipelineClient.runPipeline({
id,
info,
});
return objectCamelToSnake(triggerPipelineResponse);
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
}
@@ -6,74 +6,92 @@ import {
Param,
Post,
Put,
Redirect,
} from '@nestjs/common';
import { Payload } from '@nestjs/microservices';
import { TransformationsClientService } from 'src/clients/transformations/client.service';
import { IIdRequest } from 'src/clients/transformations/interfaces';
import { TransformationsService } from './transformations.service';
@Controller('transformations')
export class TransformationsController {
constructor(
private transformationsClientService: TransformationsClientService,
) {}
constructor( private transformationsClientService:TransformationsClientService){}
@Post()
async create(@Body() createTransformationDto) {
console.log(process.env.DEV_URL + `/transformation`, 'ON CREATE ROUTE');
const transformationService = new TransformationsService(
this.transformationsClientService,
);
const response = await transformationService.create(
createTransformationDto,
);
@Post()
async create(@Body() createTransformationDto) {
console.log(process.env.DEV_URL + `/transformation`, 'ON CREATE ROUTE');
const transformationService = new TransformationsService(this.transformationsClientService)
const response = await transformationService.create(createTransformationDto)
return response;
}
@Get()
async findAll() {
console.log(process.env.DEV_URL + `/transformation`, 'ON Find All ROUTE');
const transformationService = new TransformationsService(this.transformationsClientService)
const response = await transformationService.findAll()
return response;
}
@Get('/:id')
async findOne(@Param() params) {
const {id} = params;
console.log(process.env.DEV_URL + `/transformation/${id}`, 'ON Find One ROUTE');
const transformationService = new TransformationsService(this.transformationsClientService)
const response = await transformationService.findOne(id)
return response;
}
@Put(':id')
async update(
@Payload() updateTransformationDto,
@Param() params,
) {
const {id} = params;
console.log(process.env.DEV_URL + `/transformation/${id}`, 'ON UPDATE ROUTE');
const transformationService = new TransformationsService(this.transformationsClientService)
const response = await transformationService.update(id,updateTransformationDto)
return response;
}
@Delete(':id')
async delete(@Param() params) {
const {id} = params;
console.log(process.env.DEV_URL + `/transformation/${id}`, 'ON DELETE ROUTE');
const transformationService = new TransformationsService(this.transformationsClientService)
const response = await transformationService.remove(id)
return response;
}
return response;
}
@Get()
async findAll(@Body() data: IIdRequest) {
console.log(process.env.DEV_URL + `/transformation`, 'ON Find All ROUTE');
const transformationService = new TransformationsService(
this.transformationsClientService,
);
const response = await transformationService.findAll(data);
return response;
}
@Get('/:id')
async findOne(@Body() data, @Param() params) {
const { id } = params;
console.log(
process.env.DEV_URL + `/transformation/${id}`,
'ON Find One ROUTE',
);
const transformationService = new TransformationsService(
this.transformationsClientService,
);
const response = await transformationService.findOne({ id, ...data });
return response;
}
@Put(':id')
async update(@Payload() updateTransformationDto, @Param() params) {
const { id } = params;
console.log(
process.env.DEV_URL + `/transformation/${id}`,
'ON UPDATE ROUTE',
);
const transformationService = new TransformationsService(
this.transformationsClientService,
);
const response = await transformationService.update(
id,
updateTransformationDto,
);
return response;
}
@Delete(':id')
async delete(@Body() data, @Param() params) {
const { id } = params;
console.log(
process.env.DEV_URL + `/transformation/${id}`,
'ON DELETE ROUTE',
);
const transformationService = new TransformationsService(
this.transformationsClientService,
);
const response = await transformationService.remove({ id, ...data });
return response;
}
}
@@ -1,77 +1,79 @@
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { TransformationsClientService } from 'src/clients/transformations/client.service';
import { ICreateTransformationsRequest } from 'src/clients/transformations/interfaces';
import {
ICreateTransformationsRequest,
IIdRequest,
} from 'src/clients/transformations/interfaces';
import { trSnakeToCamel } from 'src/utils/CaseConverter';
@Injectable()
export class TransformationsService {
constructor(private transformationClient: TransformationsClientService) {}
constructor( private transformationClient: TransformationsClientService){}
async create(createTransformationDto: ICreateTransformationsRequest) {
const { transformations, info } = createTransformationDto;
async create(createTransformationDto:ICreateTransformationsRequest){
try{
let convertedDTO = createTransformationDto.transformations.map((tr)=>{
return trSnakeToCamel(tr)
})
const createTransformationResponse = await this.transformationClient.create({transformations:convertedDTO});
return createTransformationResponse
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
if (!transformations || transformations.length == 0) {
throw new HttpException('Missing transformations field.', 400);
}
}
try {
const convertedDTO = transformations.map((tr) => {
return trSnakeToCamel(tr);
});
const createTransformationResponse =
await this.transformationClient.create({
transformations: convertedDTO,
info: info,
});
async findOne(id:string){
try{
const findOneTransformationResponse = await this.transformationClient.findOne({id});
return findOneTransformationResponse
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
}
}
async findAll(){
try{
const findAllTransformationResponse = await this.transformationClient.findAll();
return findAllTransformationResponse
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
return createTransformationResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async update(id:string, data){
try{
data.transformation["id"] = id
const updateTransformationResponse = await this.transformationClient.update({...data});
return updateTransformationResponse
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
async findOne(data: IIdRequest) {
try {
const findOneTransformationResponse =
await this.transformationClient.findOne(data);
return findOneTransformationResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async remove(id:string){
async findAll(data) {
try {
const findAllTransformationResponse =
await this.transformationClient.findAll(data);
try{
return findAllTransformationResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
const removeTransformationResponse = await this.transformationClient.remove({id});
return removeTransformationResponse
async update(id: string, data) {
try {
data.transformation['id'] = id;
const updateTransformationResponse =
await this.transformationClient.update({ ...data });
}catch(err){
throw new HttpException(err.message,HttpStatus.NOT_FOUND)
return updateTransformationResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
async remove(data: IIdRequest) {
try {
const removeTransformationResponse =
await this.transformationClient.remove(data);
return removeTransformationResponse;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
}
-20
View File
@@ -1,20 +0,0 @@
import axios from 'axios';
export class AuthenticateController {
private username: string;
private password: string;
constructor() {
this.username = process.env.AUTH_USERNAME;
this.password = process.env.AUTH_PASSWORD;
}
async authenticate(): Promise<string> {
const response = await axios.post(process.env.AUTH_ROUTE, {
username: this.username,
password: this.password,
});
return response.data.accessToken;
}
}
+12 -14
View File
@@ -5,7 +5,7 @@ export const objectCamelToSnake = (object) => {
const newKeys = objectKeys.map((key) => {
return key
.split(/(?=[A-Z])/)
.join("_")
.join('_')
.toLowerCase();
});
@@ -17,7 +17,7 @@ export const objectCamelToSnake = (object) => {
});
objectValues.forEach((value) => {
if (typeof value === "object") {
if (typeof value === 'object') {
objectCamelToSnake(value);
}
});
@@ -31,7 +31,7 @@ export const objectSnakeToCamel = (object) => {
const newKeys = objectKeys.map((key) => {
return key.replace(/([-_][a-z])/gi, ($1) => {
return $1.toUpperCase().replace("-", "").replace("_", "");
return $1.toUpperCase().replace('-', '').replace('_', '');
});
});
@@ -41,24 +41,22 @@ export const objectSnakeToCamel = (object) => {
delete object[key];
}
});
objectValues.forEach((value) => {
if (typeof value === "object") {
if (value == null) return;
if (typeof value === 'object') {
objectSnakeToCamel(value);
}
});
return object;
};
export const trSnakeToCamel = (object) =>{
const convertedParams = object.params.map((param)=>{
return objectSnakeToCamel(param)
})
export const trSnakeToCamel = (object) => {
const convertedParams = object.params.map((param) => {
return objectSnakeToCamel(param);
});
object.params = convertedParams
object.params = convertedParams;
return objectSnakeToCamel(object)
}
return objectSnakeToCamel(object);
};
+1 -1
View File
@@ -1 +1 @@
{"openapi":"3.0.0","paths":{"/input/test-connection":{"get":{"operationId":"InputsController_testConnection","parameters":[],"responses":{"200":{"description":""}}}},"/input":{"post":{"operationId":"InputsController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"InputsController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/input/{id}":{"get":{"operationId":"InputsController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"InputsController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"InputsController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/transformations":{"post":{"operationId":"TransformationsController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"TransformationsController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/transformations/{id}":{"get":{"operationId":"TransformationsController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"TransformationsController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"TransformationsController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/outputs":{"post":{"operationId":"OutputsController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"OutputsController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/outputs/{id}":{"get":{"operationId":"OutputsController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"OutputsController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"OutputsController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/{id}/status":{"get":{"operationId":"PipelinesController_getPipelineStatus","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/{id}/{details}":{"get":{"operationId":"PipelinesController_getPipelineLogs","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines":{"post":{"operationId":"PipelinesController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"PipelinesController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/{id}":{"get":{"operationId":"PipelinesController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"PipelinesController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"PipelinesController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/auth":{"post":{"operationId":"AuthController_signIn","parameters":[],"responses":{"201":{"description":""}}}},"/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":""}}}}},"info":{"title":"Maestro Grpc Documentation","description":"Documentation for Maestro gateway","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{}}}
{"openapi":"3.0.0","paths":{"/inputs/test-connection":{"post":{"operationId":"InputsController_testConnection","parameters":[],"responses":{"201":{"description":""}}}},"/inputs":{"post":{"operationId":"InputsController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"InputsController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/inputs/{id}":{"get":{"operationId":"InputsController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"InputsController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"InputsController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/transformations":{"post":{"operationId":"TransformationsController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"TransformationsController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/transformations/{id}":{"get":{"operationId":"TransformationsController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"TransformationsController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"TransformationsController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/outputs":{"post":{"operationId":"OutputsController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"OutputsController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/outputs/{id}":{"get":{"operationId":"OutputsController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"OutputsController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"OutputsController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/start/{id}":{"get":{"operationId":"PipelinesController_activate","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/{id}/status":{"get":{"operationId":"PipelinesController_getPipelineStatus","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/{id}/{details}":{"get":{"operationId":"PipelinesController_getPipelineLogs","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines":{"post":{"operationId":"PipelinesController_create","parameters":[],"responses":{"201":{"description":""}}},"get":{"operationId":"PipelinesController_findAll","parameters":[],"responses":{"200":{"description":""}}}},"/pipelines/{id}":{"get":{"operationId":"PipelinesController_findOne","parameters":[],"responses":{"200":{"description":""}}},"put":{"operationId":"PipelinesController_update","parameters":[],"responses":{"200":{"description":""}}},"delete":{"operationId":"PipelinesController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/auth":{"post":{"operationId":"AuthController_signIn","parameters":[],"responses":{"201":{"description":""}}}},"/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":""}}}}},"info":{"title":"Maestro Grpc Documentation","description":"Documentation for Maestro gateway","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{}}}