feat: tasks.json编排

This commit is contained in:
Mozzie 2023-09-07 13:12:13 +08:00
parent 07a6394913
commit 558ca8e7ac
11 changed files with 3788 additions and 8071 deletions

152
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,152 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "start-all-tasks",
"dependsOn": [
"build:pkg",
"cert-authorize",
"cert-authenticate",
"cert-gateway",
"cert-web",
"aorta-web",
"aorta-gateway",
"dmp-archive",
"dmp-web",
"dmp-gateway",
"dicom",
"logger"
]
},
{
"label": "build:pkg",
"type": "shell",
"command": "bash",
"args": [
"-c",
"for package in @tavi/util @tavi/oss @tavi/i18n; do (pnpm run --filter $package build); done && echo 'build:pkg completed'"
]
},
{
"label": "aorta-web",
"type": "shell",
"command": "pnpm",
"args": [
"dev:aorta-web",
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "aorta-gateway",
"type": "shell",
"command": "pnpm",
"args": [
"dev:aorta-gateway",
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "dmp-archive",
"type": "shell",
"command": "pnpm",
"args": [
"dev:dmp-archive",
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "dmp-gateway",
"type": "shell",
"command": "pnpm",
"args": [
"dev:dmp-gateway",
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "dmp-web",
"type": "shell",
"command": "pnpm",
"args": [
"dev:dmp-web",
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "logger",
"type": "shell",
"command": "pnpm",
"args": [
"dev:logger",
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "dicom",
"type": "shell",
"command": "pnpm",
"args": [
"dev:dicom",
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "cert-authorize",
"type": "shell",
"command": "pnpm",
"args": [
"dev:authorize",
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "cert-authenticate",
"type": "shell",
"command": "pnpm",
"args": [
"dev:authenticate"
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "cert-gateway",
"type": "shell",
"command": "pnpm",
"args": [
"dev:cert-gateway"
],
"dependsOn": [
"build:pkg"
]
},
{
"label": "cert-web",
"type": "shell",
"command": "pnpm",
"args": [
"dev:cert-web"
],
"dependsOn": [
"build:pkg"
]
},
]
}

View File

@ -29,7 +29,7 @@
"@casl/ability": "6.5.0",
"typeorm": "0.3.17",
"@nestjs/typeorm": "10.0.0",
"bcrypt": "5.1.0",
"bcryptjs": "2.4.3",
"minimatch": "9.0.3",
"nanoid": "3.3.4"
},

View File

@ -1,4 +1,4 @@
import * as bcrypt from 'bcrypt';
import * as bcrypt from 'bcryptjs';
import { Injectable } from '@nestjs/common';
@Injectable()

View File

@ -29,7 +29,7 @@
"@casl/ability": "6.5.0",
"typeorm": "0.3.17",
"@nestjs/typeorm": "10.0.0",
"bcrypt": "5.1.0",
"bcryptjs": "2.4.3",
"minimatch": "9.0.3",
"dayjs": "1.11.9",
"flatted": "3.2.7",

View File

@ -29,7 +29,7 @@
"@casl/ability": "6.5.0",
"typeorm": "0.3.17",
"@nestjs/typeorm": "10.0.0",
"bcrypt": "5.1.0",
"bcryptjs": "2.4.3",
"minimatch": "9.0.3",
"dayjs": "1.11.9",
"flatted": "3.2.7",

View File

@ -29,7 +29,7 @@
"@casl/ability": "6.5.0",
"typeorm": "0.3.17",
"@nestjs/typeorm": "10.0.0",
"bcrypt": "5.1.0",
"bcryptjs": "2.4.3",
"minimatch": "9.0.3",
"dayjs": "1.11.9",
"flatted": "3.2.7",

View File

@ -18,6 +18,8 @@ services:
MYSQL_ROOT_PASSWORD: root
ports:
- "3306:3306"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
nacos:
image: nacos/nacos-server

5
init.sql Normal file
View File

@ -0,0 +1,5 @@
CREATE DATABASE rbac CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE dmp CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE aorta CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE logger CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE dicom CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

View File

@ -9,10 +9,8 @@
"dev:dmp-web": "pnpm run --filter @tavi/dmp-web dev",
"dev:dmp-gateway": "pnpm run --filter @tavi/dmp-gateway start:dev",
"dev:dmp-archive": "pnpm run --filter @tavi/dmp-archive start:dev",
"dev:aorta": "pnpm run --filter @tavi/aorta dev",
"dev:aorta-web": "pnpm run --filter @tavi/aorta dev",
"dev:aorta-gateway": "pnpm run --filter @tavi/aorta-gateway start:dev",
"build:aorta": "pnpm run --filter @tavi/aorta build",
"analyze:aorta": "pnpm run --filter @tavi/aorta build:analyze",
"dev:cert-web": "pnpm run --filter @tavi/cert-web dev",
"dev:cert-gateway": "pnpm run --filter @tavi/cert-gateway start:dev",
"dev:authenticate": "pnpm run --filter @tavi/authenticate start:dev",
@ -26,6 +24,8 @@
"build:i18n": "pnpm run --filter @tavi/i18n build",
"build:oss": "pnpm run --filter @tavi/oss build",
"build:hook": "pnpm run --filter @tavi/hook build",
"build:aorta": "pnpm run --filter @tavi/aorta build",
"analyze:aorta": "pnpm run --filter @tavi/aorta build:analyze",
"changeset": "changeset",
"pkg:version": "changeset version",
"pkg:publish": "changeset publish"

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +0,0 @@
#!/bin/bash
# 数据管理平台 web
osascript -e "tell app \"Terminal\" to do script \"cd $PWD && pnpm dev:dmp-web\""
# 数据管理平台 网关
osascript -e "tell app \"Terminal\" to do script \"cd $PWD && pnpm dev:dmp-gateway\""
# 主动脉 web
osascript -e "tell app \"Terminal\" to do script \"cd $PWD && pnpm dev:aorta\""
# 主动脉 网关
osascript -e "tell app \"Terminal\" to do script \"cd $PWD && pnpm dev:aorta-gateway\""
# 认证中心 web
osascript -e "tell app \"Terminal\" to do script \"cd $PWD && pnpm dev:cert-web\""
# 认证中心 网关
osascript -e "tell app \"Terminal\" to do script \"cd $PWD && pnpm dev:cert-gateway\""
# 认证中心 认证服务
osascript -e "tell app \"Terminal\" to do script \"cd $PWD && pnpm dev:authenticate\""
# 认证中心 鉴权服务
osascript -e "tell app \"Terminal\" to do script \"cd $PWD && pnpm dev:authorize\""
# 日志服务
osascript -e "tell app \"Terminal\" to do script \"cd $PWD && pnpm dev:logger\""