1
0
forked from boos/BoosAPI

test:Add database migration service with normalization and masking functions

- Implemented `normalizeMigrationInput` to standardize database migration input for sqlite, mysql, and postgres.
- Added `maskConnectionString` to obscure sensitive credentials in connection strings.
- Created comprehensive tests for migration input normalization and connection string masking.
- Established database schema creation logic for multiple dialects (sqlite, mysql, postgres).
- Developed functions for managing database transactions, including begin, commit, and rollback.
- Implemented data insertion logic from backup snapshots into the target database.
This commit is contained in:
cita
2026-03-05 17:38:52 +08:00
parent 0168592c95
commit 283c052fa5
79 changed files with 3410 additions and 1111 deletions
+1 -1
View File
@@ -185,7 +185,7 @@ export abstract class BasePlatformAdapter implements PlatformAdapter {
...options?.headers,
},
};
const proxiedRequestOptions = withSiteProxyRequestInit(url, requestOptions);
const proxiedRequestOptions = await withSiteProxyRequestInit(url, requestOptions);
const res = await fetch(url, proxiedRequestOptions);
if (!res.ok) {
throw new Error(`HTTP ${res.status}: ${await res.text()}`);
+1 -1
View File
@@ -516,7 +516,7 @@ export class NewApiAdapter extends BasePlatformAdapter {
body: options?.body ?? undefined,
headers,
};
const proxiedRequestOptions = withSiteProxyRequestInit(url, requestOptions);
const proxiedRequestOptions = await withSiteProxyRequestInit(url, requestOptions);
const res = await fetch(url, proxiedRequestOptions);
const text = await res.text();
const getSetCookie = (res.headers as unknown as { getSetCookie?: () => string[] }).getSetCookie;