From 6cbfe979123a08eafda150cbbc8efc54ea138262 Mon Sep 17 00:00:00 2001 From: "Aries.lsy" <”Aries.lsy@fanruan.com“> Date: Thu, 9 Mar 2023 10:02:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-91396=20fix:=E6=8B=BC=E6=8E=A5url?= =?UTF-8?q?=E7=B2=BE=E5=87=86=E5=8C=B9=E9=85=8D:database?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/app.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/app.service.ts b/src/modules/app.service.ts index 0464611..af79ad0 100644 --- a/src/modules/app.service.ts +++ b/src/modules/app.service.ts @@ -51,7 +51,7 @@ export function getJdbcDatabaseType(database: string, driver: string): DatabaseT export function resolveUrlInfo(url: string, database?: string) { if (BI.isNull(url)) return {}; - + return BI.Providers.getProvider('dec.connection.provider.datebase').getJdbcResolveByType(database)(url) || { host: '', port: '', @@ -77,6 +77,7 @@ export function splitUrl(host: string, port: string, database: string, baseUrl: return baseUrl.replace('hostname', host).replace(':port', port ? `:${port}` : '') .replace('/database', `/${database}`) + .replace(':database', `:${database}`) .replace('dbname', database); } From 75bd5a8a89eb80f39b0e7e067f963337e9576bf1 Mon Sep 17 00:00:00 2001 From: "Austin.Duan" Date: Thu, 9 Mar 2023 10:32:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 26 ++++++++++++++++++-------- types/globals.d.ts | 3 +-- types/request.d.ts | 9 +++++++++ 3 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 types/request.d.ts diff --git a/tsconfig.json b/tsconfig.json index 0506075..bac5abb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,8 +5,8 @@ "module": "es2015", "moduleResolution": "node", "lib": [ - "es2017", - "dom" + "es2017", + "dom" ], "declaration": true, "experimentalDecorators": true, @@ -21,11 +21,21 @@ "noFallthroughCasesInSwitch": true, "skipLibCheck": false, "paths": { - "ui": ["./src/ui"], - "ReportCst": ["./private/constants"], - "types": ["./types/index.d.ts"], - "@core/*": ["./src/modules/core/*"], - "@constants/*": ["./src/modules/constants/*"] + "ui": [ + "./src/ui" + ], + "ReportCst": [ + "./private/constants" + ], + "types": [ + "./types/index.d.ts" + ], + "@core/*": [ + "./src/modules/core/*" + ], + "@constants/*": [ + "./src/modules/constants/*" + ] } }, "include": [ @@ -33,6 +43,6 @@ "src/**/*.ts", "private/*.ts", "private/**/*.ts", - "types/globals.d.ts" + "types" ] } \ No newline at end of file diff --git a/types/globals.d.ts b/types/globals.d.ts index 6dcba21..f868d4b 100644 --- a/types/globals.d.ts +++ b/types/globals.d.ts @@ -1,4 +1,3 @@ -import type { Method, AxiosRequestConfig } from 'axios'; interface Obj { [key: string]: any; } @@ -17,7 +16,7 @@ declare const Dec: { personal: { username: string; }; - reqByEncrypt: (method: Method, url: string, data?: any, config?: AxiosRequestConfig) => {}, + reqByEncrypt: (method: AxiosType.X_Method, url: string, data?: any, config?: AxiosType.X_AxiosRequestConfig) => {}, socketEmit: (type: string, name: string, callback: (re: any) => void) => void; // req reqGet: RequestFunction; diff --git a/types/request.d.ts b/types/request.d.ts new file mode 100644 index 0000000..4042317 --- /dev/null +++ b/types/request.d.ts @@ -0,0 +1,9 @@ +import { Method, AxiosRequestConfig } from 'axios'; + +declare namespace AxiosType { + type X_Method = Method + interface X_AxiosRequestConfig extends AxiosRequestConfig { } +} + +export = AxiosType; +export as namespace AxiosType; \ No newline at end of file