@carllee1983/dbcli 11.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor/rules/dbcli.mdc +46 -0
- package/.cursor/skills/dbcli/reference.md +59 -3
- package/.cursor-plugin/plugin.json +1 -1
- package/.github/skills/dbcli/SKILL.md +46 -0
- package/.github/skills/dbcli/reference.md +59 -3
- package/CHANGELOG.md +88 -0
- package/README.md +16 -13
- package/assets/SKILL.md +46 -0
- package/assets/reference.md +59 -3
- package/assets/tasks/README.md +1 -1
- package/assets/tasks/analyze-table-perf.md +1 -1
- package/assets/tasks/audit-permissions.md +1 -1
- package/assets/tasks/connection-health.md +1 -2
- package/assets/tasks/design-review.md +1 -1
- package/assets/tasks/diagnose-slow-query.md +1 -1
- package/assets/tasks/migration-review.md +5 -3
- package/assets/tasks/mongo-safe-backfill.md +1 -1
- package/assets/tasks/mongo-schema-drift-review.md +1 -1
- package/assets/tasks/orm-drift-review.md +1 -1
- package/assets/tasks/pr-database-review.md +1 -1
- package/assets/tasks/safe-backfill-verify.md +1 -1
- package/assets/tasks/safe-backfill.md +13 -7
- package/assets/tasks/schema-drift-review.md +1 -1
- package/assets/tasks/slow-endpoint-investigation.md +1 -1
- package/dist/cli-runtime.mjs +15485 -23622
- package/dist/cli.mjs +2 -1
- package/dist/core.d.ts +629 -554
- package/dist/core.mjs +6243 -6080
- package/gemini-extension.json +1 -1
- package/package.json +2 -1
- package/plugins/dbcli-agent/.codex-plugin/plugin.json +1 -1
- package/plugins/dbcli-agent/skills/dbcli/SKILL.md +46 -0
- package/plugins/dbcli-agent/skills/dbcli/reference.md +59 -3
- package/skills/dbcli/SKILL.md +46 -0
- package/skills/dbcli/reference.md +59 -3
package/dist/core.d.ts
CHANGED
|
@@ -2,290 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Database adapter type definitions and interfaces
|
|
7
|
-
* Defines the contract that all database adapters must implement
|
|
8
|
-
*/
|
|
9
|
-
export type DatabaseSystem = "postgresql" | "mysql" | "mariadb" | "sqlite" | "mongodb" | "redis" | "elasticsearch";
|
|
10
|
-
type SqlDatabaseSystem = Extract<DatabaseSystem, "postgresql" | "mysql" | "mariadb" | "sqlite">;
|
|
11
|
-
type SqlExecutionMode = "normal" | "native-read-only";
|
|
12
|
-
type QueryableDatabaseSystem = Exclude<DatabaseSystem, SqlDatabaseSystem>;
|
|
13
|
-
/**
|
|
14
|
-
* Connection configuration for database adapters
|
|
15
|
-
*/
|
|
16
|
-
export interface ConnectionOptions {
|
|
17
|
-
/** Database system type */
|
|
18
|
-
system: DatabaseSystem;
|
|
19
|
-
/** Database host address or hostname */
|
|
20
|
-
host: string;
|
|
21
|
-
/** Database port number */
|
|
22
|
-
port: number;
|
|
23
|
-
/** Database user name */
|
|
24
|
-
user: string;
|
|
25
|
-
/** Database password */
|
|
26
|
-
password: string;
|
|
27
|
-
/** Database name */
|
|
28
|
-
database: string;
|
|
29
|
-
/** SQLite database file path (required for SQLite connections, absent otherwise) */
|
|
30
|
-
file?: string;
|
|
31
|
-
/** MongoDB connection URI (optional, for MongoDB connections) */
|
|
32
|
-
uri?: string;
|
|
33
|
-
/** MongoDB auth database — used when building URI from host/port/user/password (default: 'admin') */
|
|
34
|
-
authSource?: string;
|
|
35
|
-
/** MongoDB replica set name (optional, field-based config) */
|
|
36
|
-
replicaSet?: string;
|
|
37
|
-
/** MongoDB TLS switch (optional, field-based config; implied true when srv) */
|
|
38
|
-
tls?: boolean;
|
|
39
|
-
/** MongoDB extra driver options appended to the URI query string (field-based config, plain strings only) */
|
|
40
|
-
options?: Record<string, string>;
|
|
41
|
-
/** MongoDB SRV lookup — build a mongodb+srv:// URI from host (optional, field-based config) */
|
|
42
|
-
srv?: boolean;
|
|
43
|
-
/** Connection timeout in milliseconds (default: 5000) */
|
|
44
|
-
timeout?: number;
|
|
45
|
-
/**
|
|
46
|
-
* Statement timeout in milliseconds. Falls back to `timeout` when unset, and
|
|
47
|
-
* to the server default when neither is given — an unset statement timeout
|
|
48
|
-
* means the server decides, not that 5000ms applies. 0 removes the limit.
|
|
49
|
-
*/
|
|
50
|
-
statementTimeout?: number;
|
|
51
|
-
/** Elasticsearch protocol (http or https) */
|
|
52
|
-
protocol?: "http" | "https";
|
|
53
|
-
/** Elasticsearch nodes for round-robin (optional) */
|
|
54
|
-
nodes?: string[];
|
|
55
|
-
/** Elasticsearch Cloud ID (optional) */
|
|
56
|
-
cloudId?: string;
|
|
57
|
-
/** Elasticsearch API Key (optional) */
|
|
58
|
-
apiKey?: string;
|
|
59
|
-
/** Elasticsearch CA Certificate Path (optional) */
|
|
60
|
-
caPath?: string;
|
|
61
|
-
/** Whether to reject unauthorized TLS connections (default: true) */
|
|
62
|
-
rejectUnauthorized?: boolean;
|
|
63
|
-
}
|
|
64
|
-
export type SqlConnectionOptions = ConnectionOptions & {
|
|
65
|
-
system: SqlDatabaseSystem;
|
|
66
|
-
};
|
|
67
|
-
export type QueryableConnectionOptions = ConnectionOptions & {
|
|
68
|
-
system: QueryableDatabaseSystem;
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Schema information for a single column
|
|
72
|
-
*/
|
|
73
|
-
export interface ColumnSchema {
|
|
74
|
-
/** Column name */
|
|
75
|
-
name: string;
|
|
76
|
-
/** Column data type */
|
|
77
|
-
type: string;
|
|
78
|
-
/** Whether column allows NULL values */
|
|
79
|
-
nullable: boolean;
|
|
80
|
-
/** Default value for column (if any) */
|
|
81
|
-
default?: string;
|
|
82
|
-
/** Whether column is primary key */
|
|
83
|
-
primaryKey?: boolean;
|
|
84
|
-
/** Foreign key reference if applicable */
|
|
85
|
-
foreignKey?: {
|
|
86
|
-
table: string;
|
|
87
|
-
column: string;
|
|
88
|
-
};
|
|
89
|
-
/** Whether column is auto-incremented */
|
|
90
|
-
autoIncrement?: boolean;
|
|
91
|
-
/** Column comment/description */
|
|
92
|
-
comment?: string | null;
|
|
93
|
-
/** Enum values if column is ENUM type */
|
|
94
|
-
enumValues?: string[];
|
|
95
|
-
/** MongoDB only: 0..1 fraction of sampled docs that contained this dot-path. Undefined for SQL. */
|
|
96
|
-
presence?: number;
|
|
97
|
-
/** MongoDB only: true when this dot-path matches a blacklist pattern. Undefined for SQL. */
|
|
98
|
-
redacted?: boolean;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Complete schema information for a table
|
|
102
|
-
*/
|
|
103
|
-
export interface TableSchema {
|
|
104
|
-
/** Table name */
|
|
105
|
-
name: string;
|
|
106
|
-
/** Exact database schema/catalog namespace, when reliably available */
|
|
107
|
-
schema?: string;
|
|
108
|
-
/** Array of columns in the table */
|
|
109
|
-
columns: ColumnSchema[];
|
|
110
|
-
/** Approximate row count (if available) */
|
|
111
|
-
rowCount?: number;
|
|
112
|
-
/** Storage engine (PostgreSQL/MySQL) */
|
|
113
|
-
engine?: string;
|
|
114
|
-
/** Primary key column names */
|
|
115
|
-
primaryKey?: string[];
|
|
116
|
-
/** Foreign key constraints with metadata */
|
|
117
|
-
foreignKeys?: Array<{
|
|
118
|
-
name: string;
|
|
119
|
-
columns: string[];
|
|
120
|
-
refSchema?: string;
|
|
121
|
-
refTable: string;
|
|
122
|
-
refColumns: string[];
|
|
123
|
-
}>;
|
|
124
|
-
/** Table indexes with column information */
|
|
125
|
-
indexes?: Array<{
|
|
126
|
-
name: string;
|
|
127
|
-
columns: string[];
|
|
128
|
-
unique: boolean;
|
|
129
|
-
}>;
|
|
130
|
-
/** Column count (used by listTables when full column details are not loaded) */
|
|
131
|
-
columnCount?: number;
|
|
132
|
-
/** Estimated row count in table */
|
|
133
|
-
estimatedRowCount?: number;
|
|
134
|
-
/** Type of table (table or view) */
|
|
135
|
-
tableType?: "table" | "view";
|
|
136
|
-
}
|
|
137
|
-
type ConnectionErrorCode = "ECONNREFUSED" | "ETIMEDOUT" | "AUTH_FAILED" | "ENOTFOUND" | "EHOSTUNREACH" | "CONNECTION_LOST" | "TOO_MANY_CONNECTIONS" | "TLS_ERROR" | "SERVER_NOT_READY" | "CONNECTION_REJECTED" | "SQL_SYNTAX_ERROR" | "STATEMENT_TIMEOUT" | "TABLE_NOT_FOUND" | "COLUMN_NOT_FOUND" | "QUERY_ONLY_BOUNDARY_FAILED" | "UNKNOWN";
|
|
138
|
-
export declare class ConnectionError extends Error {
|
|
139
|
-
/** Error category code */
|
|
140
|
-
code: ConnectionErrorCode;
|
|
141
|
-
/** Array of actionable troubleshooting hints */
|
|
142
|
-
hints: string[];
|
|
143
|
-
/**
|
|
144
|
-
* The ceiling that was in force, in milliseconds. Set on STATEMENT_TIMEOUT so
|
|
145
|
-
* consumers can state it without parsing `message`; the recovery envelope needs
|
|
146
|
-
* it to tell an agent what `--statement-timeout <ms>` it was already up against.
|
|
147
|
-
*/
|
|
148
|
-
limitMs?: number | undefined;
|
|
149
|
-
/** Whether an interactive caller may safely retry the statement after reconnecting. */
|
|
150
|
-
readonly retrySafe: boolean;
|
|
151
|
-
constructor(
|
|
152
|
-
/** Error category code */
|
|
153
|
-
code: ConnectionErrorCode,
|
|
154
|
-
/** User-friendly error message */
|
|
155
|
-
message: string,
|
|
156
|
-
/** Array of actionable troubleshooting hints */
|
|
157
|
-
hints: string[],
|
|
158
|
-
/**
|
|
159
|
-
* The ceiling that was in force, in milliseconds. Set on STATEMENT_TIMEOUT so
|
|
160
|
-
* consumers can state it without parsing `message`; the recovery envelope needs
|
|
161
|
-
* it to tell an agent what `--statement-timeout <ms>` it was already up against.
|
|
162
|
-
*/
|
|
163
|
-
limitMs?: number | undefined,
|
|
164
|
-
/** Whether an interactive caller may safely retry the statement after reconnecting. */
|
|
165
|
-
retrySafe?: boolean);
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Result of a database query or command execution
|
|
169
|
-
*/
|
|
170
|
-
export interface ExecutionResult<T> {
|
|
171
|
-
/** Array of result rows as objects (for SELECT queries) */
|
|
172
|
-
rows: T[];
|
|
173
|
-
/** Number of rows affected by the operation (for INSERT/UPDATE/DELETE) */
|
|
174
|
-
affectedRows: number;
|
|
175
|
-
/** Last inserted ID if applicable (for INSERT operations) */
|
|
176
|
-
lastInsertId?: number | string;
|
|
177
|
-
/** Convenience row count — used by formatters; mirrors rows.length on read paths */
|
|
178
|
-
rowCount?: number;
|
|
179
|
-
/** Column ordering for the rows, used by formatters that render tabular output */
|
|
180
|
-
columnNames?: string[];
|
|
181
|
-
/** Optional warnings — emitted today only by RedisAdapter (size guard / blacklist filter). */
|
|
182
|
-
warnings?: RedisWarning[];
|
|
183
|
-
}
|
|
184
|
-
type RedisWarning = {
|
|
185
|
-
code: "REDIS_SIZE_REWRITE";
|
|
186
|
-
command: string;
|
|
187
|
-
original: string[];
|
|
188
|
-
rewritten: string[];
|
|
189
|
-
} | {
|
|
190
|
-
code: "REDIS_SIZE_TRUNCATE";
|
|
191
|
-
command: string;
|
|
192
|
-
kept: number;
|
|
193
|
-
droppedAtLeast: number;
|
|
194
|
-
} | {
|
|
195
|
-
code: "REDIS_BLACKLIST_FILTERED";
|
|
196
|
-
count: number;
|
|
197
|
-
};
|
|
198
|
-
interface TableSchemaOptions {
|
|
199
|
-
/** MongoDB: 取樣文件數 */
|
|
200
|
-
sampleSize?: number;
|
|
201
|
-
/** MongoDB: 取樣方式 */
|
|
202
|
-
sampleMethod?: "random" | "natural";
|
|
203
|
-
/**
|
|
204
|
-
* 精確列數要掃全表。掃描整個資料庫時設為 false,改用引擎的估計值——
|
|
205
|
-
* 一百張表的資料庫做不起一百次全表 COUNT。預設 true。
|
|
206
|
-
*/
|
|
207
|
-
exactRowCount?: boolean;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Database adapter interface - contract for all database implementations
|
|
211
|
-
* Defines methods that all database adapters must implement
|
|
212
|
-
*/
|
|
213
|
-
export interface DatabaseAdapter {
|
|
214
|
-
/**
|
|
215
|
-
* Establish connection and verify credentials
|
|
216
|
-
* Throws ConnectionError with categorized error type on failure
|
|
217
|
-
* @throws {ConnectionError} If connection fails (server down, auth failed, timeout, etc.)
|
|
218
|
-
*/
|
|
219
|
-
connect(): Promise<void>;
|
|
220
|
-
/**
|
|
221
|
-
* Close connection and release resources
|
|
222
|
-
* Should never throw; safe to call multiple times
|
|
223
|
-
* Handles cleanup gracefully even if already disconnected
|
|
224
|
-
*/
|
|
225
|
-
disconnect(): Promise<void>;
|
|
226
|
-
/**
|
|
227
|
-
* Execute arbitrary SQL query with parameterized values
|
|
228
|
-
* Prevents SQL injection by using parameter binding
|
|
229
|
-
* @param sql Query string with parameter placeholders ($1, $2, etc. for PostgreSQL or ? for MySQL)
|
|
230
|
-
* @param params Array of parameter values in order
|
|
231
|
-
* @returns Execution result containing rows and metadata
|
|
232
|
-
* @throws {ConnectionError} If query execution fails
|
|
233
|
-
*/
|
|
234
|
-
execute<T>(sql: string, params?: (string | number | boolean | null)[], options?: {
|
|
235
|
-
noLimit?: boolean;
|
|
236
|
-
sqlMode?: SqlExecutionMode;
|
|
237
|
-
}): Promise<ExecutionResult<T>>;
|
|
238
|
-
/**
|
|
239
|
-
* List all tables in the connected database
|
|
240
|
-
* Includes metadata such as row count and storage engine
|
|
241
|
-
* @returns Array of table schemas with basic information
|
|
242
|
-
* @throws {ConnectionError} If query fails
|
|
243
|
-
*/
|
|
244
|
-
listTables(): Promise<TableSchema[]>;
|
|
245
|
-
/**
|
|
246
|
-
* Fetch complete schema for a single table
|
|
247
|
-
* Includes all columns with types and constraints
|
|
248
|
-
* @param tableName Name of table to inspect
|
|
249
|
-
* @param options Optional adapter-specific knobs (e.g. mongo `sampleSize`); SQL adapters ignore them.
|
|
250
|
-
* @returns Complete table schema including all column details
|
|
251
|
-
* @throws {ConnectionError} If query fails
|
|
252
|
-
*/
|
|
253
|
-
getTableSchema(tableName: string, options?: TableSchemaOptions): Promise<TableSchema>;
|
|
254
|
-
/**
|
|
255
|
-
* Test connection with lightweight probe query
|
|
256
|
-
* Executes SELECT 1 or equivalent to verify connection is alive
|
|
257
|
-
* @returns true if connection successful
|
|
258
|
-
* @throws {ConnectionError} If connection test fails
|
|
259
|
-
*/
|
|
260
|
-
testConnection(): Promise<boolean>;
|
|
261
|
-
/**
|
|
262
|
-
* Get the database server version string
|
|
263
|
-
* @returns Raw version string from the server (e.g. "8.0.35", "15.4", "10.11.6-MariaDB")
|
|
264
|
-
* @throws {ConnectionError} If not connected or query fails
|
|
265
|
-
*/
|
|
266
|
-
getServerVersion(): Promise<string>;
|
|
267
|
-
}
|
|
268
|
-
type SideEffectTier = "readonly" | "dry-run" | "local-write" | "db-write" | "interactive" | "none";
|
|
269
|
-
interface BlacklistConfig {
|
|
270
|
-
/** Table names to block all operations on */
|
|
271
|
-
tables: string[];
|
|
272
|
-
/** Column names to omit per table: { tableName: [col1, col2] } */
|
|
273
|
-
columns: Record<string, string[]>;
|
|
274
|
-
}
|
|
275
|
-
interface BlacklistState {
|
|
276
|
-
/** Set of lowercase table names for O(1) case-insensitive lookup */
|
|
277
|
-
tables: Set<string>;
|
|
278
|
-
/** Map of table name -> Set of blacklisted column names */
|
|
279
|
-
columns: Map<string, Set<string>>;
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Error thrown when an operation is blocked by blacklist rules
|
|
283
|
-
*/
|
|
284
|
-
export declare class BlacklistError extends Error {
|
|
285
|
-
readonly tableName: string;
|
|
286
|
-
readonly operation: string;
|
|
287
|
-
constructor(message: string, tableName: string, operation: string);
|
|
288
|
-
}
|
|
289
5
|
/**
|
|
290
6
|
* Type definitions for data modification operations
|
|
291
7
|
* Defines results and options for data modification (INSERT, UPDATE, DELETE) operations
|
|
@@ -375,7 +91,32 @@ export interface MutationConfirmationRequest {
|
|
|
375
91
|
* Returns true to proceed, false to abandon the mutation.
|
|
376
92
|
*/
|
|
377
93
|
export type MutationConfirmer = (request: MutationConfirmationRequest) => Promise<boolean>;
|
|
94
|
+
interface BlacklistConfig {
|
|
95
|
+
/** Table names to block all operations on */
|
|
96
|
+
tables: string[];
|
|
97
|
+
/** Column names to omit per table: { tableName: [col1, col2] } */
|
|
98
|
+
columns: Record<string, string[]>;
|
|
99
|
+
}
|
|
100
|
+
interface BlacklistState {
|
|
101
|
+
/** Set of lowercase table names for O(1) case-insensitive lookup */
|
|
102
|
+
tables: Set<string>;
|
|
103
|
+
/** Map of table name -> Set of blacklisted column names */
|
|
104
|
+
columns: Map<string, Set<string>>;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Error thrown when an operation is blocked by blacklist rules
|
|
108
|
+
*/
|
|
109
|
+
export declare class BlacklistError extends Error {
|
|
110
|
+
readonly tableName: string;
|
|
111
|
+
readonly operation: string;
|
|
112
|
+
constructor(message: string, tableName: string, operation: string);
|
|
113
|
+
}
|
|
114
|
+
interface SqlTlsConfig {
|
|
115
|
+
mode: "verify-full";
|
|
116
|
+
caPath: string;
|
|
117
|
+
}
|
|
378
118
|
interface SqlConnectionConfig {
|
|
119
|
+
sqlTls?: SqlTlsConfig;
|
|
379
120
|
system: "postgresql" | "mysql" | "mariadb";
|
|
380
121
|
host: string | {
|
|
381
122
|
$env: string;
|
|
@@ -494,22 +235,296 @@ interface ElasticsearchConnectionConfig {
|
|
|
494
235
|
caPath?: string;
|
|
495
236
|
rejectUnauthorized?: boolean;
|
|
496
237
|
}
|
|
497
|
-
type ConnectionConfig = SqlConnectionConfig | SqliteConnectionConfig | MongoDBConnectionConfig | RedisConnectionConfig | ElasticsearchConnectionConfig;
|
|
238
|
+
type ConnectionConfig = SqlConnectionConfig | SqliteConnectionConfig | MongoDBConnectionConfig | RedisConnectionConfig | ElasticsearchConnectionConfig;
|
|
239
|
+
/**
|
|
240
|
+
* Permission level (coarse-grained access control)
|
|
241
|
+
*/
|
|
242
|
+
export type Permission = "query-only" | "read-write" | "data-admin" | "admin";
|
|
243
|
+
interface Metadata {
|
|
244
|
+
createdAt?: string;
|
|
245
|
+
version: string;
|
|
246
|
+
}
|
|
247
|
+
interface DbcliConfig {
|
|
248
|
+
connection: ConnectionConfig;
|
|
249
|
+
permission: Permission;
|
|
250
|
+
schema?: Record<string, unknown>;
|
|
251
|
+
metadata?: Metadata;
|
|
252
|
+
blacklist?: BlacklistConfig;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Database adapter type definitions and interfaces
|
|
256
|
+
* Defines the contract that all database adapters must implement
|
|
257
|
+
*/
|
|
258
|
+
export type DatabaseSystem = "postgresql" | "mysql" | "mariadb" | "sqlite" | "mongodb" | "redis" | "elasticsearch";
|
|
259
|
+
type SqlDatabaseSystem = Extract<DatabaseSystem, "postgresql" | "mysql" | "mariadb" | "sqlite">;
|
|
260
|
+
type SqlExecutionMode = "normal" | "native-read-only";
|
|
261
|
+
type QueryableDatabaseSystem = Exclude<DatabaseSystem, SqlDatabaseSystem>;
|
|
262
|
+
/**
|
|
263
|
+
* Connection configuration for database adapters
|
|
264
|
+
*/
|
|
265
|
+
export interface ConnectionOptions {
|
|
266
|
+
/** Explicit verified SQL TLS; currently PostgreSQL only. */
|
|
267
|
+
sqlTls?: SqlTlsConfig;
|
|
268
|
+
/** Database system type */
|
|
269
|
+
system: DatabaseSystem;
|
|
270
|
+
/** Database host address or hostname */
|
|
271
|
+
host: string;
|
|
272
|
+
/** Database port number */
|
|
273
|
+
port: number;
|
|
274
|
+
/** Database user name */
|
|
275
|
+
user: string;
|
|
276
|
+
/** Database password */
|
|
277
|
+
password: string;
|
|
278
|
+
/** Database name */
|
|
279
|
+
database: string;
|
|
280
|
+
/** SQLite database file path (required for SQLite connections, absent otherwise) */
|
|
281
|
+
file?: string;
|
|
282
|
+
/** MongoDB connection URI (optional, for MongoDB connections) */
|
|
283
|
+
uri?: string;
|
|
284
|
+
/** MongoDB auth database — used when building URI from host/port/user/password (default: 'admin') */
|
|
285
|
+
authSource?: string;
|
|
286
|
+
/** MongoDB replica set name (optional, field-based config) */
|
|
287
|
+
replicaSet?: string;
|
|
288
|
+
/** MongoDB TLS switch (optional, field-based config; implied true when srv) */
|
|
289
|
+
tls?: boolean;
|
|
290
|
+
/** MongoDB extra driver options appended to the URI query string (field-based config, plain strings only) */
|
|
291
|
+
options?: Record<string, string>;
|
|
292
|
+
/** MongoDB SRV lookup — build a mongodb+srv:// URI from host (optional, field-based config) */
|
|
293
|
+
srv?: boolean;
|
|
294
|
+
/** Connection timeout in milliseconds (default: 5000) */
|
|
295
|
+
timeout?: number;
|
|
296
|
+
/**
|
|
297
|
+
* Statement timeout in milliseconds. Falls back to `timeout` when unset, and
|
|
298
|
+
* to the server default when neither is given — an unset statement timeout
|
|
299
|
+
* means the server decides, not that 5000ms applies. 0 removes the limit.
|
|
300
|
+
*/
|
|
301
|
+
statementTimeout?: number;
|
|
302
|
+
/** Elasticsearch protocol (http or https) */
|
|
303
|
+
protocol?: "http" | "https";
|
|
304
|
+
/** Elasticsearch nodes for round-robin (optional) */
|
|
305
|
+
nodes?: string[];
|
|
306
|
+
/** Elasticsearch Cloud ID (optional) */
|
|
307
|
+
cloudId?: string;
|
|
308
|
+
/** Elasticsearch API Key (optional) */
|
|
309
|
+
apiKey?: string;
|
|
310
|
+
/** Elasticsearch CA Certificate Path (optional) */
|
|
311
|
+
caPath?: string;
|
|
312
|
+
/** Whether to reject unauthorized TLS connections (default: true) */
|
|
313
|
+
rejectUnauthorized?: boolean;
|
|
314
|
+
}
|
|
315
|
+
export type SqlConnectionOptions = ConnectionOptions & {
|
|
316
|
+
system: SqlDatabaseSystem;
|
|
317
|
+
};
|
|
318
|
+
export type QueryableConnectionOptions = ConnectionOptions & {
|
|
319
|
+
system: QueryableDatabaseSystem;
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* Schema information for a single column
|
|
323
|
+
*/
|
|
324
|
+
export interface ColumnSchema {
|
|
325
|
+
/** Column name */
|
|
326
|
+
name: string;
|
|
327
|
+
/** Column data type */
|
|
328
|
+
type: string;
|
|
329
|
+
/** Whether column allows NULL values */
|
|
330
|
+
nullable: boolean;
|
|
331
|
+
/** Default value for column (if any) */
|
|
332
|
+
default?: string;
|
|
333
|
+
/** Whether column is primary key */
|
|
334
|
+
primaryKey?: boolean;
|
|
335
|
+
/** Foreign key reference if applicable */
|
|
336
|
+
foreignKey?: {
|
|
337
|
+
table: string;
|
|
338
|
+
column: string;
|
|
339
|
+
};
|
|
340
|
+
/** Whether column is auto-incremented */
|
|
341
|
+
autoIncrement?: boolean;
|
|
342
|
+
/** Column comment/description */
|
|
343
|
+
comment?: string | null;
|
|
344
|
+
/** Enum values if column is ENUM type */
|
|
345
|
+
enumValues?: string[];
|
|
346
|
+
/** MongoDB only: 0..1 fraction of sampled docs that contained this dot-path. Undefined for SQL. */
|
|
347
|
+
presence?: number;
|
|
348
|
+
/** MongoDB only: true when this dot-path matches a blacklist pattern. Undefined for SQL. */
|
|
349
|
+
redacted?: boolean;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Complete schema information for a table
|
|
353
|
+
*/
|
|
354
|
+
export interface TableSchema {
|
|
355
|
+
/** Some metadata was omitted to protect blacklisted identities. No protected names. */
|
|
356
|
+
metadataOmitted?: boolean;
|
|
357
|
+
/** Table name */
|
|
358
|
+
name: string;
|
|
359
|
+
/** Exact database schema/catalog namespace, when reliably available */
|
|
360
|
+
schema?: string;
|
|
361
|
+
/** Array of columns in the table */
|
|
362
|
+
columns: ColumnSchema[];
|
|
363
|
+
/** Approximate row count (if available) */
|
|
364
|
+
rowCount?: number;
|
|
365
|
+
/** Storage engine (PostgreSQL/MySQL) */
|
|
366
|
+
engine?: string;
|
|
367
|
+
/** Primary key column names */
|
|
368
|
+
primaryKey?: string[];
|
|
369
|
+
/** Foreign key constraints with metadata */
|
|
370
|
+
foreignKeys?: Array<{
|
|
371
|
+
name: string;
|
|
372
|
+
columns: string[];
|
|
373
|
+
refSchema?: string;
|
|
374
|
+
refTable: string;
|
|
375
|
+
refColumns: string[];
|
|
376
|
+
}>;
|
|
377
|
+
/** Table indexes with column information */
|
|
378
|
+
indexes?: Array<{
|
|
379
|
+
name: string;
|
|
380
|
+
columns: string[];
|
|
381
|
+
unique: boolean;
|
|
382
|
+
/** False when expressions/predicates prevent complete column-only representation. */
|
|
383
|
+
columnsComplete?: boolean;
|
|
384
|
+
}>;
|
|
385
|
+
/** Column count (used by listTables when full column details are not loaded) */
|
|
386
|
+
columnCount?: number;
|
|
387
|
+
/** Estimated row count in table */
|
|
388
|
+
estimatedRowCount?: number;
|
|
389
|
+
/** Type of table (table or view) */
|
|
390
|
+
tableType?: "table" | "view";
|
|
391
|
+
}
|
|
392
|
+
type ConnectionErrorCode = "ECONNREFUSED" | "ETIMEDOUT" | "AUTH_FAILED" | "DB_PERMISSION_DENIED" | "ENOTFOUND" | "EHOSTUNREACH" | "CONNECTION_LOST" | "TOO_MANY_CONNECTIONS" | "TLS_ERROR" | "SERVER_NOT_READY" | "CONNECTION_REJECTED" | "SQL_SYNTAX_ERROR" | "STATEMENT_TIMEOUT" | "TABLE_NOT_FOUND" | "COLUMN_NOT_FOUND" | "QUERY_ONLY_BOUNDARY_FAILED" | "UNKNOWN";
|
|
393
|
+
export declare class ConnectionError extends Error {
|
|
394
|
+
/** Error category code */
|
|
395
|
+
code: ConnectionErrorCode;
|
|
396
|
+
/** Array of actionable troubleshooting hints */
|
|
397
|
+
hints: string[];
|
|
398
|
+
/**
|
|
399
|
+
* The ceiling that was in force, in milliseconds. Set on STATEMENT_TIMEOUT so
|
|
400
|
+
* consumers can state it without parsing `message`; the recovery envelope needs
|
|
401
|
+
* it to tell an agent what `--statement-timeout <ms>` it was already up against.
|
|
402
|
+
*/
|
|
403
|
+
limitMs?: number | undefined;
|
|
404
|
+
/** Whether an interactive caller may safely retry the statement after reconnecting. */
|
|
405
|
+
readonly retrySafe: boolean;
|
|
406
|
+
constructor(
|
|
407
|
+
/** Error category code */
|
|
408
|
+
code: ConnectionErrorCode,
|
|
409
|
+
/** User-friendly error message */
|
|
410
|
+
message: string,
|
|
411
|
+
/** Array of actionable troubleshooting hints */
|
|
412
|
+
hints: string[],
|
|
413
|
+
/**
|
|
414
|
+
* The ceiling that was in force, in milliseconds. Set on STATEMENT_TIMEOUT so
|
|
415
|
+
* consumers can state it without parsing `message`; the recovery envelope needs
|
|
416
|
+
* it to tell an agent what `--statement-timeout <ms>` it was already up against.
|
|
417
|
+
*/
|
|
418
|
+
limitMs?: number | undefined,
|
|
419
|
+
/** Whether an interactive caller may safely retry the statement after reconnecting. */
|
|
420
|
+
retrySafe?: boolean);
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Result of a database query or command execution
|
|
424
|
+
*/
|
|
425
|
+
export interface ExecutionResult<T> {
|
|
426
|
+
/** Array of result rows as objects (for SELECT queries) */
|
|
427
|
+
rows: T[];
|
|
428
|
+
/** Number of rows affected by the operation (for INSERT/UPDATE/DELETE) */
|
|
429
|
+
affectedRows: number;
|
|
430
|
+
/** Last inserted ID if applicable (for INSERT operations) */
|
|
431
|
+
lastInsertId?: number | string;
|
|
432
|
+
/** Convenience row count — used by formatters; mirrors rows.length on read paths */
|
|
433
|
+
rowCount?: number;
|
|
434
|
+
/** Column ordering for the rows, used by formatters that render tabular output */
|
|
435
|
+
columnNames?: string[];
|
|
436
|
+
/** Optional warnings — emitted today only by RedisAdapter (size guard / blacklist filter). */
|
|
437
|
+
warnings?: RedisWarning[];
|
|
438
|
+
}
|
|
439
|
+
type RedisWarning = {
|
|
440
|
+
code: "REDIS_SIZE_REWRITE";
|
|
441
|
+
command: string;
|
|
442
|
+
original: string[];
|
|
443
|
+
rewritten: string[];
|
|
444
|
+
} | {
|
|
445
|
+
code: "REDIS_SIZE_TRUNCATE";
|
|
446
|
+
command: string;
|
|
447
|
+
kept: number;
|
|
448
|
+
droppedAtLeast: number;
|
|
449
|
+
} | {
|
|
450
|
+
code: "REDIS_BLACKLIST_FILTERED";
|
|
451
|
+
count: number;
|
|
452
|
+
};
|
|
453
|
+
interface TableSchemaOptions {
|
|
454
|
+
/** Single-object schema command: validate presence/type and mark incomplete index metadata. */
|
|
455
|
+
metadataProtection?: boolean;
|
|
456
|
+
/** Explicit SQL namespace; local tableName remains literal. Never performs an exact count. */
|
|
457
|
+
namespace?: string;
|
|
458
|
+
/** MongoDB: 取樣文件數 */
|
|
459
|
+
sampleSize?: number;
|
|
460
|
+
/** MongoDB: 取樣方式 */
|
|
461
|
+
sampleMethod?: "random" | "natural";
|
|
462
|
+
/**
|
|
463
|
+
* 精確列數要掃全表。掃描整個資料庫時設為 false,改用引擎的估計值——
|
|
464
|
+
* 一百張表的資料庫做不起一百次全表 COUNT。預設 true。
|
|
465
|
+
*/
|
|
466
|
+
exactRowCount?: boolean;
|
|
467
|
+
}
|
|
498
468
|
/**
|
|
499
|
-
*
|
|
469
|
+
* Database adapter interface - contract for all database implementations
|
|
470
|
+
* Defines methods that all database adapters must implement
|
|
500
471
|
*/
|
|
501
|
-
export
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
472
|
+
export interface DatabaseAdapter {
|
|
473
|
+
/**
|
|
474
|
+
* Establish connection and verify credentials
|
|
475
|
+
* Throws ConnectionError with categorized error type on failure
|
|
476
|
+
* @throws {ConnectionError} If connection fails (server down, auth failed, timeout, etc.)
|
|
477
|
+
*/
|
|
478
|
+
connect(): Promise<void>;
|
|
479
|
+
/**
|
|
480
|
+
* Close connection and release resources
|
|
481
|
+
* Should never throw; safe to call multiple times
|
|
482
|
+
* Handles cleanup gracefully even if already disconnected
|
|
483
|
+
*/
|
|
484
|
+
disconnect(): Promise<void>;
|
|
485
|
+
/**
|
|
486
|
+
* Execute arbitrary SQL query with parameterized values
|
|
487
|
+
* Prevents SQL injection by using parameter binding
|
|
488
|
+
* @param sql Query string with parameter placeholders ($1, $2, etc. for PostgreSQL or ? for MySQL)
|
|
489
|
+
* @param params Array of parameter values in order
|
|
490
|
+
* @returns Execution result containing rows and metadata
|
|
491
|
+
* @throws {ConnectionError} If query execution fails
|
|
492
|
+
*/
|
|
493
|
+
execute<T>(sql: string, params?: (string | number | boolean | null)[], options?: {
|
|
494
|
+
noLimit?: boolean;
|
|
495
|
+
sqlMode?: SqlExecutionMode;
|
|
496
|
+
}): Promise<ExecutionResult<T>>;
|
|
497
|
+
/**
|
|
498
|
+
* List all tables in the connected database
|
|
499
|
+
* Includes metadata such as row count and storage engine
|
|
500
|
+
* @returns Array of table schemas with basic information
|
|
501
|
+
* @throws {ConnectionError} If query fails
|
|
502
|
+
*/
|
|
503
|
+
listTables(): Promise<TableSchema[]>;
|
|
504
|
+
/**
|
|
505
|
+
* Fetch complete schema for a single table
|
|
506
|
+
* Includes all columns with types and constraints
|
|
507
|
+
* @param tableName Name of table to inspect
|
|
508
|
+
* @param options Optional adapter-specific knobs (e.g. mongo `sampleSize`); SQL adapters ignore them.
|
|
509
|
+
* @returns Complete table schema including all column details
|
|
510
|
+
* @throws {ConnectionError} If query fails
|
|
511
|
+
*/
|
|
512
|
+
getTableSchema(tableName: string, options?: TableSchemaOptions): Promise<TableSchema>;
|
|
513
|
+
/**
|
|
514
|
+
* Test connection with lightweight probe query
|
|
515
|
+
* Executes SELECT 1 or equivalent to verify connection is alive
|
|
516
|
+
* @returns true if connection successful
|
|
517
|
+
* @throws {ConnectionError} If connection test fails
|
|
518
|
+
*/
|
|
519
|
+
testConnection(): Promise<boolean>;
|
|
520
|
+
/**
|
|
521
|
+
* Get the database server version string
|
|
522
|
+
* @returns Raw version string from the server (e.g. "8.0.35", "15.4", "10.11.6-MariaDB")
|
|
523
|
+
* @throws {ConnectionError} If not connected or query fails
|
|
524
|
+
*/
|
|
525
|
+
getServerVersion(): Promise<string>;
|
|
512
526
|
}
|
|
527
|
+
type SideEffectTier = "readonly" | "dry-run" | "local-write" | "db-write" | "interactive" | "none";
|
|
513
528
|
interface AppliedLimitMetadata {
|
|
514
529
|
/** True only when the caller fetched and removed an additional row. */
|
|
515
530
|
truncated: boolean;
|
|
@@ -813,10 +828,20 @@ export declare class BlacklistValidator {
|
|
|
813
828
|
buildSecurityNotification(_tableName: string, omittedColumns: string[]): string;
|
|
814
829
|
}
|
|
815
830
|
declare const DbcliConfigSchema: z.ZodObject<{
|
|
816
|
-
connection: z.ZodUnion<[
|
|
831
|
+
connection: z.ZodEffects<z.ZodUnion<[
|
|
817
832
|
z.ZodObject<{
|
|
818
833
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
819
834
|
statementTimeout: z.ZodOptional<z.ZodNumber>;
|
|
835
|
+
sqlTls: z.ZodOptional<z.ZodObject<{
|
|
836
|
+
mode: z.ZodLiteral<"verify-full">;
|
|
837
|
+
caPath: z.ZodEffects<z.ZodString, string, string>;
|
|
838
|
+
}, "strict", z.ZodTypeAny, {
|
|
839
|
+
mode: "verify-full";
|
|
840
|
+
caPath: string;
|
|
841
|
+
}, {
|
|
842
|
+
mode: "verify-full";
|
|
843
|
+
caPath: string;
|
|
844
|
+
}>>;
|
|
820
845
|
system: z.ZodEnum<[
|
|
821
846
|
"postgresql",
|
|
822
847
|
"mysql",
|
|
@@ -876,10 +901,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
876
901
|
password: string | {
|
|
877
902
|
$env: string;
|
|
878
903
|
};
|
|
879
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
880
904
|
host: string | {
|
|
881
905
|
$env: string;
|
|
882
906
|
};
|
|
907
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
883
908
|
port: number | {
|
|
884
909
|
$env: string;
|
|
885
910
|
};
|
|
@@ -891,11 +916,15 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
891
916
|
};
|
|
892
917
|
timeout?: number | undefined;
|
|
893
918
|
statementTimeout?: number | undefined;
|
|
919
|
+
sqlTls?: {
|
|
920
|
+
mode: "verify-full";
|
|
921
|
+
caPath: string;
|
|
922
|
+
} | undefined;
|
|
894
923
|
}, {
|
|
895
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
896
924
|
host: string | {
|
|
897
925
|
$env: string;
|
|
898
926
|
};
|
|
927
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
899
928
|
port: number | {
|
|
900
929
|
$env: string;
|
|
901
930
|
};
|
|
@@ -910,6 +939,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
910
939
|
} | undefined;
|
|
911
940
|
timeout?: number | undefined;
|
|
912
941
|
statementTimeout?: number | undefined;
|
|
942
|
+
sqlTls?: {
|
|
943
|
+
mode: "verify-full";
|
|
944
|
+
caPath: string;
|
|
945
|
+
} | undefined;
|
|
913
946
|
}>,
|
|
914
947
|
z.ZodObject<{
|
|
915
948
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
@@ -983,10 +1016,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
983
1016
|
password: string | {
|
|
984
1017
|
$env: string;
|
|
985
1018
|
};
|
|
986
|
-
system: "sqlite";
|
|
987
1019
|
host: string | {
|
|
988
1020
|
$env: string;
|
|
989
1021
|
};
|
|
1022
|
+
system: "sqlite";
|
|
990
1023
|
port: number | {
|
|
991
1024
|
$env: string;
|
|
992
1025
|
};
|
|
@@ -1115,10 +1148,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1115
1148
|
password: string | {
|
|
1116
1149
|
$env: string;
|
|
1117
1150
|
};
|
|
1118
|
-
system: "mongodb";
|
|
1119
1151
|
host: string | {
|
|
1120
1152
|
$env: string;
|
|
1121
1153
|
};
|
|
1154
|
+
system: "mongodb";
|
|
1122
1155
|
port: number | {
|
|
1123
1156
|
$env: string;
|
|
1124
1157
|
};
|
|
@@ -1129,9 +1162,7 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1129
1162
|
$env: string;
|
|
1130
1163
|
};
|
|
1131
1164
|
srv: boolean;
|
|
1132
|
-
|
|
1133
|
-
$env: string;
|
|
1134
|
-
} | undefined;
|
|
1165
|
+
options?: Record<string, string> | undefined;
|
|
1135
1166
|
authSource?: string | {
|
|
1136
1167
|
$env: string;
|
|
1137
1168
|
} | undefined;
|
|
@@ -1139,7 +1170,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1139
1170
|
$env: string;
|
|
1140
1171
|
} | undefined;
|
|
1141
1172
|
tls?: boolean | undefined;
|
|
1142
|
-
|
|
1173
|
+
uri?: string | {
|
|
1174
|
+
$env: string;
|
|
1175
|
+
} | undefined;
|
|
1143
1176
|
timeout?: number | undefined;
|
|
1144
1177
|
statementTimeout?: number | undefined;
|
|
1145
1178
|
}, {
|
|
@@ -1150,26 +1183,26 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1150
1183
|
host?: string | {
|
|
1151
1184
|
$env: string;
|
|
1152
1185
|
} | undefined;
|
|
1153
|
-
|
|
1186
|
+
options?: Record<string, string> | undefined;
|
|
1187
|
+
authSource?: string | {
|
|
1154
1188
|
$env: string;
|
|
1155
1189
|
} | undefined;
|
|
1156
|
-
|
|
1190
|
+
replicaSet?: string | {
|
|
1157
1191
|
$env: string;
|
|
1158
1192
|
} | undefined;
|
|
1159
|
-
|
|
1193
|
+
tls?: boolean | undefined;
|
|
1194
|
+
uri?: string | {
|
|
1160
1195
|
$env: string;
|
|
1161
1196
|
} | undefined;
|
|
1162
|
-
|
|
1197
|
+
port?: number | {
|
|
1163
1198
|
$env: string;
|
|
1164
1199
|
} | undefined;
|
|
1165
|
-
|
|
1200
|
+
user?: string | {
|
|
1166
1201
|
$env: string;
|
|
1167
1202
|
} | undefined;
|
|
1168
|
-
|
|
1203
|
+
database?: string | {
|
|
1169
1204
|
$env: string;
|
|
1170
1205
|
} | undefined;
|
|
1171
|
-
tls?: boolean | undefined;
|
|
1172
|
-
options?: Record<string, string> | undefined;
|
|
1173
1206
|
srv?: boolean | undefined;
|
|
1174
1207
|
timeout?: number | undefined;
|
|
1175
1208
|
statementTimeout?: number | undefined;
|
|
@@ -1232,10 +1265,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1232
1265
|
password: string | {
|
|
1233
1266
|
$env: string;
|
|
1234
1267
|
};
|
|
1235
|
-
system: "redis";
|
|
1236
1268
|
host: string | {
|
|
1237
1269
|
$env: string;
|
|
1238
1270
|
};
|
|
1271
|
+
system: "redis";
|
|
1239
1272
|
port: number | {
|
|
1240
1273
|
$env: string;
|
|
1241
1274
|
};
|
|
@@ -1248,10 +1281,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1248
1281
|
timeout?: number | undefined;
|
|
1249
1282
|
statementTimeout?: number | undefined;
|
|
1250
1283
|
}, {
|
|
1251
|
-
system: "redis";
|
|
1252
1284
|
host: string | {
|
|
1253
1285
|
$env: string;
|
|
1254
1286
|
};
|
|
1287
|
+
system: "redis";
|
|
1255
1288
|
port: number | {
|
|
1256
1289
|
$env: string;
|
|
1257
1290
|
};
|
|
@@ -1352,10 +1385,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1352
1385
|
password: string | {
|
|
1353
1386
|
$env: string;
|
|
1354
1387
|
};
|
|
1355
|
-
system: "elasticsearch";
|
|
1356
1388
|
host: string | {
|
|
1357
1389
|
$env: string;
|
|
1358
1390
|
};
|
|
1391
|
+
system: "elasticsearch";
|
|
1359
1392
|
port: number | {
|
|
1360
1393
|
$env: string;
|
|
1361
1394
|
};
|
|
@@ -1365,8 +1398,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1365
1398
|
database: string | {
|
|
1366
1399
|
$env: string;
|
|
1367
1400
|
};
|
|
1368
|
-
rejectUnauthorized: boolean;
|
|
1369
1401
|
protocol: "http" | "https";
|
|
1402
|
+
rejectUnauthorized: boolean;
|
|
1403
|
+
caPath?: string | undefined;
|
|
1370
1404
|
timeout?: number | undefined;
|
|
1371
1405
|
statementTimeout?: number | undefined;
|
|
1372
1406
|
nodes?: string[] | undefined;
|
|
@@ -1376,7 +1410,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1376
1410
|
apiKey?: string | {
|
|
1377
1411
|
$env: string;
|
|
1378
1412
|
} | undefined;
|
|
1379
|
-
caPath?: string | undefined;
|
|
1380
1413
|
}, {
|
|
1381
1414
|
system: "elasticsearch";
|
|
1382
1415
|
password?: string | {
|
|
@@ -1385,6 +1418,7 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1385
1418
|
host?: string | {
|
|
1386
1419
|
$env: string;
|
|
1387
1420
|
} | undefined;
|
|
1421
|
+
caPath?: string | undefined;
|
|
1388
1422
|
port?: number | {
|
|
1389
1423
|
$env: string;
|
|
1390
1424
|
} | undefined;
|
|
@@ -1394,7 +1428,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1394
1428
|
database?: string | {
|
|
1395
1429
|
$env: string;
|
|
1396
1430
|
} | undefined;
|
|
1397
|
-
rejectUnauthorized?: boolean | undefined;
|
|
1398
1431
|
timeout?: number | undefined;
|
|
1399
1432
|
statementTimeout?: number | undefined;
|
|
1400
1433
|
protocol?: "http" | "https" | undefined;
|
|
@@ -1405,9 +1438,133 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1405
1438
|
apiKey?: string | {
|
|
1406
1439
|
$env: string;
|
|
1407
1440
|
} | undefined;
|
|
1408
|
-
|
|
1441
|
+
rejectUnauthorized?: boolean | undefined;
|
|
1409
1442
|
}>
|
|
1410
|
-
]
|
|
1443
|
+
]>, {
|
|
1444
|
+
password: string | {
|
|
1445
|
+
$env: string;
|
|
1446
|
+
};
|
|
1447
|
+
host: string | {
|
|
1448
|
+
$env: string;
|
|
1449
|
+
};
|
|
1450
|
+
system: "mongodb";
|
|
1451
|
+
port: number | {
|
|
1452
|
+
$env: string;
|
|
1453
|
+
};
|
|
1454
|
+
user: string | {
|
|
1455
|
+
$env: string;
|
|
1456
|
+
};
|
|
1457
|
+
database: string | {
|
|
1458
|
+
$env: string;
|
|
1459
|
+
};
|
|
1460
|
+
srv: boolean;
|
|
1461
|
+
options?: Record<string, string> | undefined;
|
|
1462
|
+
authSource?: string | {
|
|
1463
|
+
$env: string;
|
|
1464
|
+
} | undefined;
|
|
1465
|
+
replicaSet?: string | {
|
|
1466
|
+
$env: string;
|
|
1467
|
+
} | undefined;
|
|
1468
|
+
tls?: boolean | undefined;
|
|
1469
|
+
uri?: string | {
|
|
1470
|
+
$env: string;
|
|
1471
|
+
} | undefined;
|
|
1472
|
+
timeout?: number | undefined;
|
|
1473
|
+
statementTimeout?: number | undefined;
|
|
1474
|
+
} | {
|
|
1475
|
+
password: string | {
|
|
1476
|
+
$env: string;
|
|
1477
|
+
};
|
|
1478
|
+
host: string | {
|
|
1479
|
+
$env: string;
|
|
1480
|
+
};
|
|
1481
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
1482
|
+
port: number | {
|
|
1483
|
+
$env: string;
|
|
1484
|
+
};
|
|
1485
|
+
user: string | {
|
|
1486
|
+
$env: string;
|
|
1487
|
+
};
|
|
1488
|
+
database: string | {
|
|
1489
|
+
$env: string;
|
|
1490
|
+
};
|
|
1491
|
+
timeout?: number | undefined;
|
|
1492
|
+
statementTimeout?: number | undefined;
|
|
1493
|
+
sqlTls?: {
|
|
1494
|
+
mode: "verify-full";
|
|
1495
|
+
caPath: string;
|
|
1496
|
+
} | undefined;
|
|
1497
|
+
} | {
|
|
1498
|
+
password: string | {
|
|
1499
|
+
$env: string;
|
|
1500
|
+
};
|
|
1501
|
+
host: string | {
|
|
1502
|
+
$env: string;
|
|
1503
|
+
};
|
|
1504
|
+
system: "sqlite";
|
|
1505
|
+
port: number | {
|
|
1506
|
+
$env: string;
|
|
1507
|
+
};
|
|
1508
|
+
user: string | {
|
|
1509
|
+
$env: string;
|
|
1510
|
+
};
|
|
1511
|
+
database: string | {
|
|
1512
|
+
$env: string;
|
|
1513
|
+
};
|
|
1514
|
+
file: string | {
|
|
1515
|
+
$env: string;
|
|
1516
|
+
};
|
|
1517
|
+
timeout?: number | undefined;
|
|
1518
|
+
statementTimeout?: number | undefined;
|
|
1519
|
+
} | {
|
|
1520
|
+
password: string | {
|
|
1521
|
+
$env: string;
|
|
1522
|
+
};
|
|
1523
|
+
host: string | {
|
|
1524
|
+
$env: string;
|
|
1525
|
+
};
|
|
1526
|
+
system: "redis";
|
|
1527
|
+
port: number | {
|
|
1528
|
+
$env: string;
|
|
1529
|
+
};
|
|
1530
|
+
user: string | {
|
|
1531
|
+
$env: string;
|
|
1532
|
+
};
|
|
1533
|
+
database: string | {
|
|
1534
|
+
$env: string;
|
|
1535
|
+
};
|
|
1536
|
+
timeout?: number | undefined;
|
|
1537
|
+
statementTimeout?: number | undefined;
|
|
1538
|
+
} | {
|
|
1539
|
+
password: string | {
|
|
1540
|
+
$env: string;
|
|
1541
|
+
};
|
|
1542
|
+
host: string | {
|
|
1543
|
+
$env: string;
|
|
1544
|
+
};
|
|
1545
|
+
system: "elasticsearch";
|
|
1546
|
+
port: number | {
|
|
1547
|
+
$env: string;
|
|
1548
|
+
};
|
|
1549
|
+
user: string | {
|
|
1550
|
+
$env: string;
|
|
1551
|
+
};
|
|
1552
|
+
database: string | {
|
|
1553
|
+
$env: string;
|
|
1554
|
+
};
|
|
1555
|
+
protocol: "http" | "https";
|
|
1556
|
+
rejectUnauthorized: boolean;
|
|
1557
|
+
caPath?: string | undefined;
|
|
1558
|
+
timeout?: number | undefined;
|
|
1559
|
+
statementTimeout?: number | undefined;
|
|
1560
|
+
nodes?: string[] | undefined;
|
|
1561
|
+
cloudId?: string | {
|
|
1562
|
+
$env: string;
|
|
1563
|
+
} | undefined;
|
|
1564
|
+
apiKey?: string | {
|
|
1565
|
+
$env: string;
|
|
1566
|
+
} | undefined;
|
|
1567
|
+
}, unknown>;
|
|
1411
1568
|
permission: z.ZodDefault<z.ZodEnum<[
|
|
1412
1569
|
"query-only",
|
|
1413
1570
|
"read-write",
|
|
@@ -1547,15 +1704,14 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1547
1704
|
max_entries: number;
|
|
1548
1705
|
};
|
|
1549
1706
|
};
|
|
1550
|
-
permission: "admin" | "query-only" | "read-write" | "data-admin";
|
|
1551
1707
|
connection: {
|
|
1552
1708
|
password: string | {
|
|
1553
1709
|
$env: string;
|
|
1554
1710
|
};
|
|
1555
|
-
system: "mongodb";
|
|
1556
1711
|
host: string | {
|
|
1557
1712
|
$env: string;
|
|
1558
1713
|
};
|
|
1714
|
+
system: "mongodb";
|
|
1559
1715
|
port: number | {
|
|
1560
1716
|
$env: string;
|
|
1561
1717
|
};
|
|
@@ -1566,27 +1722,27 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1566
1722
|
$env: string;
|
|
1567
1723
|
};
|
|
1568
1724
|
srv: boolean;
|
|
1569
|
-
|
|
1570
|
-
$env: string;
|
|
1571
|
-
} | undefined;
|
|
1725
|
+
options?: Record<string, string> | undefined;
|
|
1572
1726
|
authSource?: string | {
|
|
1573
1727
|
$env: string;
|
|
1574
1728
|
} | undefined;
|
|
1575
1729
|
replicaSet?: string | {
|
|
1576
1730
|
$env: string;
|
|
1577
1731
|
} | undefined;
|
|
1578
|
-
tls?: boolean | undefined;
|
|
1579
|
-
|
|
1732
|
+
tls?: boolean | undefined;
|
|
1733
|
+
uri?: string | {
|
|
1734
|
+
$env: string;
|
|
1735
|
+
} | undefined;
|
|
1580
1736
|
timeout?: number | undefined;
|
|
1581
1737
|
statementTimeout?: number | undefined;
|
|
1582
1738
|
} | {
|
|
1583
1739
|
password: string | {
|
|
1584
1740
|
$env: string;
|
|
1585
1741
|
};
|
|
1586
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
1587
1742
|
host: string | {
|
|
1588
1743
|
$env: string;
|
|
1589
1744
|
};
|
|
1745
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
1590
1746
|
port: number | {
|
|
1591
1747
|
$env: string;
|
|
1592
1748
|
};
|
|
@@ -1598,14 +1754,18 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1598
1754
|
};
|
|
1599
1755
|
timeout?: number | undefined;
|
|
1600
1756
|
statementTimeout?: number | undefined;
|
|
1757
|
+
sqlTls?: {
|
|
1758
|
+
mode: "verify-full";
|
|
1759
|
+
caPath: string;
|
|
1760
|
+
} | undefined;
|
|
1601
1761
|
} | {
|
|
1602
1762
|
password: string | {
|
|
1603
1763
|
$env: string;
|
|
1604
1764
|
};
|
|
1605
|
-
system: "sqlite";
|
|
1606
1765
|
host: string | {
|
|
1607
1766
|
$env: string;
|
|
1608
1767
|
};
|
|
1768
|
+
system: "sqlite";
|
|
1609
1769
|
port: number | {
|
|
1610
1770
|
$env: string;
|
|
1611
1771
|
};
|
|
@@ -1624,10 +1784,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1624
1784
|
password: string | {
|
|
1625
1785
|
$env: string;
|
|
1626
1786
|
};
|
|
1627
|
-
system: "redis";
|
|
1628
1787
|
host: string | {
|
|
1629
1788
|
$env: string;
|
|
1630
1789
|
};
|
|
1790
|
+
system: "redis";
|
|
1631
1791
|
port: number | {
|
|
1632
1792
|
$env: string;
|
|
1633
1793
|
};
|
|
@@ -1643,10 +1803,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1643
1803
|
password: string | {
|
|
1644
1804
|
$env: string;
|
|
1645
1805
|
};
|
|
1646
|
-
system: "elasticsearch";
|
|
1647
1806
|
host: string | {
|
|
1648
1807
|
$env: string;
|
|
1649
1808
|
};
|
|
1809
|
+
system: "elasticsearch";
|
|
1650
1810
|
port: number | {
|
|
1651
1811
|
$env: string;
|
|
1652
1812
|
};
|
|
@@ -1656,8 +1816,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1656
1816
|
database: string | {
|
|
1657
1817
|
$env: string;
|
|
1658
1818
|
};
|
|
1659
|
-
rejectUnauthorized: boolean;
|
|
1660
1819
|
protocol: "http" | "https";
|
|
1820
|
+
rejectUnauthorized: boolean;
|
|
1821
|
+
caPath?: string | undefined;
|
|
1661
1822
|
timeout?: number | undefined;
|
|
1662
1823
|
statementTimeout?: number | undefined;
|
|
1663
1824
|
nodes?: string[] | undefined;
|
|
@@ -1667,8 +1828,8 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1667
1828
|
apiKey?: string | {
|
|
1668
1829
|
$env: string;
|
|
1669
1830
|
} | undefined;
|
|
1670
|
-
caPath?: string | undefined;
|
|
1671
1831
|
};
|
|
1832
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
1672
1833
|
metadata: {
|
|
1673
1834
|
version: string;
|
|
1674
1835
|
createdAt?: string | undefined;
|
|
@@ -1682,127 +1843,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1682
1843
|
}[];
|
|
1683
1844
|
} | undefined;
|
|
1684
1845
|
}, {
|
|
1685
|
-
connection: {
|
|
1686
|
-
system: "mongodb";
|
|
1687
|
-
password?: string | {
|
|
1688
|
-
$env: string;
|
|
1689
|
-
} | undefined;
|
|
1690
|
-
host?: string | {
|
|
1691
|
-
$env: string;
|
|
1692
|
-
} | undefined;
|
|
1693
|
-
port?: number | {
|
|
1694
|
-
$env: string;
|
|
1695
|
-
} | undefined;
|
|
1696
|
-
user?: string | {
|
|
1697
|
-
$env: string;
|
|
1698
|
-
} | undefined;
|
|
1699
|
-
database?: string | {
|
|
1700
|
-
$env: string;
|
|
1701
|
-
} | undefined;
|
|
1702
|
-
uri?: string | {
|
|
1703
|
-
$env: string;
|
|
1704
|
-
} | undefined;
|
|
1705
|
-
authSource?: string | {
|
|
1706
|
-
$env: string;
|
|
1707
|
-
} | undefined;
|
|
1708
|
-
replicaSet?: string | {
|
|
1709
|
-
$env: string;
|
|
1710
|
-
} | undefined;
|
|
1711
|
-
tls?: boolean | undefined;
|
|
1712
|
-
options?: Record<string, string> | undefined;
|
|
1713
|
-
srv?: boolean | undefined;
|
|
1714
|
-
timeout?: number | undefined;
|
|
1715
|
-
statementTimeout?: number | undefined;
|
|
1716
|
-
} | {
|
|
1717
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
1718
|
-
host: string | {
|
|
1719
|
-
$env: string;
|
|
1720
|
-
};
|
|
1721
|
-
port: number | {
|
|
1722
|
-
$env: string;
|
|
1723
|
-
};
|
|
1724
|
-
user: string | {
|
|
1725
|
-
$env: string;
|
|
1726
|
-
};
|
|
1727
|
-
database: string | {
|
|
1728
|
-
$env: string;
|
|
1729
|
-
};
|
|
1730
|
-
password?: string | {
|
|
1731
|
-
$env: string;
|
|
1732
|
-
} | undefined;
|
|
1733
|
-
timeout?: number | undefined;
|
|
1734
|
-
statementTimeout?: number | undefined;
|
|
1735
|
-
} | {
|
|
1736
|
-
system: "sqlite";
|
|
1737
|
-
file: string | {
|
|
1738
|
-
$env: string;
|
|
1739
|
-
};
|
|
1740
|
-
password?: string | {
|
|
1741
|
-
$env: string;
|
|
1742
|
-
} | undefined;
|
|
1743
|
-
host?: string | {
|
|
1744
|
-
$env: string;
|
|
1745
|
-
} | undefined;
|
|
1746
|
-
port?: number | {
|
|
1747
|
-
$env: string;
|
|
1748
|
-
} | undefined;
|
|
1749
|
-
user?: string | {
|
|
1750
|
-
$env: string;
|
|
1751
|
-
} | undefined;
|
|
1752
|
-
database?: string | {
|
|
1753
|
-
$env: string;
|
|
1754
|
-
} | undefined;
|
|
1755
|
-
timeout?: number | undefined;
|
|
1756
|
-
statementTimeout?: number | undefined;
|
|
1757
|
-
} | {
|
|
1758
|
-
system: "redis";
|
|
1759
|
-
host: string | {
|
|
1760
|
-
$env: string;
|
|
1761
|
-
};
|
|
1762
|
-
port: number | {
|
|
1763
|
-
$env: string;
|
|
1764
|
-
};
|
|
1765
|
-
password?: string | {
|
|
1766
|
-
$env: string;
|
|
1767
|
-
} | undefined;
|
|
1768
|
-
user?: string | {
|
|
1769
|
-
$env: string;
|
|
1770
|
-
} | undefined;
|
|
1771
|
-
database?: string | {
|
|
1772
|
-
$env: string;
|
|
1773
|
-
} | undefined;
|
|
1774
|
-
timeout?: number | undefined;
|
|
1775
|
-
statementTimeout?: number | undefined;
|
|
1776
|
-
} | {
|
|
1777
|
-
system: "elasticsearch";
|
|
1778
|
-
password?: string | {
|
|
1779
|
-
$env: string;
|
|
1780
|
-
} | undefined;
|
|
1781
|
-
host?: string | {
|
|
1782
|
-
$env: string;
|
|
1783
|
-
} | undefined;
|
|
1784
|
-
port?: number | {
|
|
1785
|
-
$env: string;
|
|
1786
|
-
} | undefined;
|
|
1787
|
-
user?: string | {
|
|
1788
|
-
$env: string;
|
|
1789
|
-
} | undefined;
|
|
1790
|
-
database?: string | {
|
|
1791
|
-
$env: string;
|
|
1792
|
-
} | undefined;
|
|
1793
|
-
rejectUnauthorized?: boolean | undefined;
|
|
1794
|
-
timeout?: number | undefined;
|
|
1795
|
-
statementTimeout?: number | undefined;
|
|
1796
|
-
protocol?: "http" | "https" | undefined;
|
|
1797
|
-
nodes?: string[] | undefined;
|
|
1798
|
-
cloudId?: string | {
|
|
1799
|
-
$env: string;
|
|
1800
|
-
} | undefined;
|
|
1801
|
-
apiKey?: string | {
|
|
1802
|
-
$env: string;
|
|
1803
|
-
} | undefined;
|
|
1804
|
-
caPath?: string | undefined;
|
|
1805
|
-
};
|
|
1806
1846
|
redis?: {
|
|
1807
1847
|
mask?: {
|
|
1808
1848
|
keyPattern: string;
|
|
@@ -1822,7 +1862,8 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1822
1862
|
max_entries?: number | undefined;
|
|
1823
1863
|
} | undefined;
|
|
1824
1864
|
} | undefined;
|
|
1825
|
-
|
|
1865
|
+
connection?: unknown;
|
|
1866
|
+
permission?: "query-only" | "read-write" | "data-admin" | "admin" | undefined;
|
|
1826
1867
|
metadata?: {
|
|
1827
1868
|
version?: string | undefined;
|
|
1828
1869
|
createdAt?: string | undefined;
|
|
@@ -1841,6 +1882,16 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1841
1882
|
z.ZodObject<{
|
|
1842
1883
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
1843
1884
|
statementTimeout: z.ZodOptional<z.ZodNumber>;
|
|
1885
|
+
sqlTls: z.ZodOptional<z.ZodObject<{
|
|
1886
|
+
mode: z.ZodLiteral<"verify-full">;
|
|
1887
|
+
caPath: z.ZodEffects<z.ZodString, string, string>;
|
|
1888
|
+
}, "strict", z.ZodTypeAny, {
|
|
1889
|
+
mode: "verify-full";
|
|
1890
|
+
caPath: string;
|
|
1891
|
+
}, {
|
|
1892
|
+
mode: "verify-full";
|
|
1893
|
+
caPath: string;
|
|
1894
|
+
}>>;
|
|
1844
1895
|
system: z.ZodEnum<[
|
|
1845
1896
|
"postgresql",
|
|
1846
1897
|
"mysql",
|
|
@@ -1909,10 +1960,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1909
1960
|
password: string | {
|
|
1910
1961
|
$env: string;
|
|
1911
1962
|
};
|
|
1912
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
1913
1963
|
host: string | {
|
|
1914
1964
|
$env: string;
|
|
1915
1965
|
};
|
|
1966
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
1916
1967
|
port: number | {
|
|
1917
1968
|
$env: string;
|
|
1918
1969
|
};
|
|
@@ -1922,16 +1973,20 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1922
1973
|
database: string | {
|
|
1923
1974
|
$env: string;
|
|
1924
1975
|
};
|
|
1925
|
-
permission: "
|
|
1976
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
1926
1977
|
timeout?: number | undefined;
|
|
1927
1978
|
statementTimeout?: number | undefined;
|
|
1979
|
+
sqlTls?: {
|
|
1980
|
+
mode: "verify-full";
|
|
1981
|
+
caPath: string;
|
|
1982
|
+
} | undefined;
|
|
1928
1983
|
envFile?: string | undefined;
|
|
1929
1984
|
environment?: string | undefined;
|
|
1930
1985
|
}, {
|
|
1931
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
1932
1986
|
host: string | {
|
|
1933
1987
|
$env: string;
|
|
1934
1988
|
};
|
|
1989
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
1935
1990
|
port: number | {
|
|
1936
1991
|
$env: string;
|
|
1937
1992
|
};
|
|
@@ -1945,8 +2000,12 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1945
2000
|
$env: string;
|
|
1946
2001
|
} | undefined;
|
|
1947
2002
|
timeout?: number | undefined;
|
|
1948
|
-
permission?: "admin" | "query-only" | "read-write" | "data-admin" | undefined;
|
|
1949
2003
|
statementTimeout?: number | undefined;
|
|
2004
|
+
sqlTls?: {
|
|
2005
|
+
mode: "verify-full";
|
|
2006
|
+
caPath: string;
|
|
2007
|
+
} | undefined;
|
|
2008
|
+
permission?: "query-only" | "read-write" | "data-admin" | "admin" | undefined;
|
|
1950
2009
|
envFile?: string | undefined;
|
|
1951
2010
|
environment?: string | undefined;
|
|
1952
2011
|
}>,
|
|
@@ -2031,10 +2090,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2031
2090
|
password: string | {
|
|
2032
2091
|
$env: string;
|
|
2033
2092
|
};
|
|
2034
|
-
system: "sqlite";
|
|
2035
2093
|
host: string | {
|
|
2036
2094
|
$env: string;
|
|
2037
2095
|
};
|
|
2096
|
+
system: "sqlite";
|
|
2038
2097
|
port: number | {
|
|
2039
2098
|
$env: string;
|
|
2040
2099
|
};
|
|
@@ -2047,7 +2106,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2047
2106
|
file: string | {
|
|
2048
2107
|
$env: string;
|
|
2049
2108
|
};
|
|
2050
|
-
permission: "
|
|
2109
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2051
2110
|
timeout?: number | undefined;
|
|
2052
2111
|
statementTimeout?: number | undefined;
|
|
2053
2112
|
envFile?: string | undefined;
|
|
@@ -2073,8 +2132,8 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2073
2132
|
$env: string;
|
|
2074
2133
|
} | undefined;
|
|
2075
2134
|
timeout?: number | undefined;
|
|
2076
|
-
permission?: "admin" | "query-only" | "read-write" | "data-admin" | undefined;
|
|
2077
2135
|
statementTimeout?: number | undefined;
|
|
2136
|
+
permission?: "query-only" | "read-write" | "data-admin" | "admin" | undefined;
|
|
2078
2137
|
envFile?: string | undefined;
|
|
2079
2138
|
environment?: string | undefined;
|
|
2080
2139
|
}>,
|
|
@@ -2178,10 +2237,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2178
2237
|
password: string | {
|
|
2179
2238
|
$env: string;
|
|
2180
2239
|
};
|
|
2181
|
-
system: "mongodb";
|
|
2182
2240
|
host: string | {
|
|
2183
2241
|
$env: string;
|
|
2184
2242
|
};
|
|
2243
|
+
system: "mongodb";
|
|
2185
2244
|
port: number | {
|
|
2186
2245
|
$env: string;
|
|
2187
2246
|
};
|
|
@@ -2192,10 +2251,8 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2192
2251
|
$env: string;
|
|
2193
2252
|
};
|
|
2194
2253
|
srv: boolean;
|
|
2195
|
-
permission: "
|
|
2196
|
-
|
|
2197
|
-
$env: string;
|
|
2198
|
-
} | undefined;
|
|
2254
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2255
|
+
options?: Record<string, string> | undefined;
|
|
2199
2256
|
authSource?: string | {
|
|
2200
2257
|
$env: string;
|
|
2201
2258
|
} | undefined;
|
|
@@ -2203,7 +2260,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2203
2260
|
$env: string;
|
|
2204
2261
|
} | undefined;
|
|
2205
2262
|
tls?: boolean | undefined;
|
|
2206
|
-
|
|
2263
|
+
uri?: string | {
|
|
2264
|
+
$env: string;
|
|
2265
|
+
} | undefined;
|
|
2207
2266
|
timeout?: number | undefined;
|
|
2208
2267
|
statementTimeout?: number | undefined;
|
|
2209
2268
|
envFile?: string | undefined;
|
|
@@ -2216,30 +2275,30 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2216
2275
|
host?: string | {
|
|
2217
2276
|
$env: string;
|
|
2218
2277
|
} | undefined;
|
|
2219
|
-
|
|
2278
|
+
options?: Record<string, string> | undefined;
|
|
2279
|
+
authSource?: string | {
|
|
2220
2280
|
$env: string;
|
|
2221
2281
|
} | undefined;
|
|
2222
|
-
|
|
2282
|
+
replicaSet?: string | {
|
|
2223
2283
|
$env: string;
|
|
2224
2284
|
} | undefined;
|
|
2225
|
-
|
|
2285
|
+
tls?: boolean | undefined;
|
|
2286
|
+
uri?: string | {
|
|
2226
2287
|
$env: string;
|
|
2227
2288
|
} | undefined;
|
|
2228
|
-
|
|
2289
|
+
port?: number | {
|
|
2229
2290
|
$env: string;
|
|
2230
2291
|
} | undefined;
|
|
2231
|
-
|
|
2292
|
+
user?: string | {
|
|
2232
2293
|
$env: string;
|
|
2233
2294
|
} | undefined;
|
|
2234
|
-
|
|
2295
|
+
database?: string | {
|
|
2235
2296
|
$env: string;
|
|
2236
2297
|
} | undefined;
|
|
2237
|
-
tls?: boolean | undefined;
|
|
2238
|
-
options?: Record<string, string> | undefined;
|
|
2239
2298
|
srv?: boolean | undefined;
|
|
2240
2299
|
timeout?: number | undefined;
|
|
2241
|
-
permission?: "admin" | "query-only" | "read-write" | "data-admin" | undefined;
|
|
2242
2300
|
statementTimeout?: number | undefined;
|
|
2301
|
+
permission?: "query-only" | "read-write" | "data-admin" | "admin" | undefined;
|
|
2243
2302
|
envFile?: string | undefined;
|
|
2244
2303
|
environment?: string | undefined;
|
|
2245
2304
|
}>,
|
|
@@ -2310,10 +2369,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2310
2369
|
password: string | {
|
|
2311
2370
|
$env: string;
|
|
2312
2371
|
};
|
|
2313
|
-
system: "redis";
|
|
2314
2372
|
host: string | {
|
|
2315
2373
|
$env: string;
|
|
2316
2374
|
};
|
|
2375
|
+
system: "redis";
|
|
2317
2376
|
port: number | {
|
|
2318
2377
|
$env: string;
|
|
2319
2378
|
};
|
|
@@ -2323,16 +2382,16 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2323
2382
|
database: string | {
|
|
2324
2383
|
$env: string;
|
|
2325
2384
|
};
|
|
2326
|
-
permission: "
|
|
2385
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2327
2386
|
timeout?: number | undefined;
|
|
2328
2387
|
statementTimeout?: number | undefined;
|
|
2329
2388
|
envFile?: string | undefined;
|
|
2330
2389
|
environment?: string | undefined;
|
|
2331
2390
|
}, {
|
|
2332
|
-
system: "redis";
|
|
2333
2391
|
host: string | {
|
|
2334
2392
|
$env: string;
|
|
2335
2393
|
};
|
|
2394
|
+
system: "redis";
|
|
2336
2395
|
port: number | {
|
|
2337
2396
|
$env: string;
|
|
2338
2397
|
};
|
|
@@ -2346,8 +2405,8 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2346
2405
|
$env: string;
|
|
2347
2406
|
} | undefined;
|
|
2348
2407
|
timeout?: number | undefined;
|
|
2349
|
-
permission?: "admin" | "query-only" | "read-write" | "data-admin" | undefined;
|
|
2350
2408
|
statementTimeout?: number | undefined;
|
|
2409
|
+
permission?: "query-only" | "read-write" | "data-admin" | "admin" | undefined;
|
|
2351
2410
|
envFile?: string | undefined;
|
|
2352
2411
|
environment?: string | undefined;
|
|
2353
2412
|
}>,
|
|
@@ -2445,10 +2504,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2445
2504
|
password: string | {
|
|
2446
2505
|
$env: string;
|
|
2447
2506
|
};
|
|
2448
|
-
system: "elasticsearch";
|
|
2449
2507
|
host: string | {
|
|
2450
2508
|
$env: string;
|
|
2451
2509
|
};
|
|
2510
|
+
system: "elasticsearch";
|
|
2452
2511
|
port: number | {
|
|
2453
2512
|
$env: string;
|
|
2454
2513
|
};
|
|
@@ -2458,9 +2517,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2458
2517
|
database: string | {
|
|
2459
2518
|
$env: string;
|
|
2460
2519
|
};
|
|
2461
|
-
rejectUnauthorized: boolean;
|
|
2462
|
-
permission: "admin" | "query-only" | "read-write" | "data-admin";
|
|
2463
2520
|
protocol: "http" | "https";
|
|
2521
|
+
rejectUnauthorized: boolean;
|
|
2522
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2523
|
+
caPath?: string | undefined;
|
|
2464
2524
|
timeout?: number | undefined;
|
|
2465
2525
|
statementTimeout?: number | undefined;
|
|
2466
2526
|
nodes?: string[] | undefined;
|
|
@@ -2470,7 +2530,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2470
2530
|
apiKey?: string | {
|
|
2471
2531
|
$env: string;
|
|
2472
2532
|
} | undefined;
|
|
2473
|
-
caPath?: string | undefined;
|
|
2474
2533
|
envFile?: string | undefined;
|
|
2475
2534
|
environment?: string | undefined;
|
|
2476
2535
|
}, {
|
|
@@ -2481,6 +2540,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2481
2540
|
host?: string | {
|
|
2482
2541
|
$env: string;
|
|
2483
2542
|
} | undefined;
|
|
2543
|
+
caPath?: string | undefined;
|
|
2484
2544
|
port?: number | {
|
|
2485
2545
|
$env: string;
|
|
2486
2546
|
} | undefined;
|
|
@@ -2490,9 +2550,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2490
2550
|
database?: string | {
|
|
2491
2551
|
$env: string;
|
|
2492
2552
|
} | undefined;
|
|
2493
|
-
rejectUnauthorized?: boolean | undefined;
|
|
2494
2553
|
timeout?: number | undefined;
|
|
2495
|
-
permission?: "admin" | "query-only" | "read-write" | "data-admin" | undefined;
|
|
2496
2554
|
statementTimeout?: number | undefined;
|
|
2497
2555
|
protocol?: "http" | "https" | undefined;
|
|
2498
2556
|
nodes?: string[] | undefined;
|
|
@@ -2502,7 +2560,8 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2502
2560
|
apiKey?: string | {
|
|
2503
2561
|
$env: string;
|
|
2504
2562
|
} | undefined;
|
|
2505
|
-
|
|
2563
|
+
rejectUnauthorized?: boolean | undefined;
|
|
2564
|
+
permission?: "query-only" | "read-write" | "data-admin" | "admin" | undefined;
|
|
2506
2565
|
envFile?: string | undefined;
|
|
2507
2566
|
environment?: string | undefined;
|
|
2508
2567
|
}>
|
|
@@ -2510,10 +2569,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2510
2569
|
password: string | {
|
|
2511
2570
|
$env: string;
|
|
2512
2571
|
};
|
|
2513
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
2514
2572
|
host: string | {
|
|
2515
2573
|
$env: string;
|
|
2516
2574
|
};
|
|
2575
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
2517
2576
|
port: number | {
|
|
2518
2577
|
$env: string;
|
|
2519
2578
|
};
|
|
@@ -2523,19 +2582,23 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2523
2582
|
database: string | {
|
|
2524
2583
|
$env: string;
|
|
2525
2584
|
};
|
|
2526
|
-
permission: "
|
|
2585
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2527
2586
|
timeout?: number | undefined;
|
|
2528
2587
|
statementTimeout?: number | undefined;
|
|
2588
|
+
sqlTls?: {
|
|
2589
|
+
mode: "verify-full";
|
|
2590
|
+
caPath: string;
|
|
2591
|
+
} | undefined;
|
|
2529
2592
|
envFile?: string | undefined;
|
|
2530
2593
|
environment?: string | undefined;
|
|
2531
2594
|
} | {
|
|
2532
2595
|
password: string | {
|
|
2533
2596
|
$env: string;
|
|
2534
2597
|
};
|
|
2535
|
-
system: "sqlite";
|
|
2536
2598
|
host: string | {
|
|
2537
2599
|
$env: string;
|
|
2538
2600
|
};
|
|
2601
|
+
system: "sqlite";
|
|
2539
2602
|
port: number | {
|
|
2540
2603
|
$env: string;
|
|
2541
2604
|
};
|
|
@@ -2548,7 +2611,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2548
2611
|
file: string | {
|
|
2549
2612
|
$env: string;
|
|
2550
2613
|
};
|
|
2551
|
-
permission: "
|
|
2614
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2552
2615
|
timeout?: number | undefined;
|
|
2553
2616
|
statementTimeout?: number | undefined;
|
|
2554
2617
|
envFile?: string | undefined;
|
|
@@ -2557,10 +2620,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2557
2620
|
password: string | {
|
|
2558
2621
|
$env: string;
|
|
2559
2622
|
};
|
|
2560
|
-
system: "mongodb";
|
|
2561
2623
|
host: string | {
|
|
2562
2624
|
$env: string;
|
|
2563
2625
|
};
|
|
2626
|
+
system: "mongodb";
|
|
2564
2627
|
port: number | {
|
|
2565
2628
|
$env: string;
|
|
2566
2629
|
};
|
|
@@ -2571,10 +2634,8 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2571
2634
|
$env: string;
|
|
2572
2635
|
};
|
|
2573
2636
|
srv: boolean;
|
|
2574
|
-
permission: "
|
|
2575
|
-
|
|
2576
|
-
$env: string;
|
|
2577
|
-
} | undefined;
|
|
2637
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2638
|
+
options?: Record<string, string> | undefined;
|
|
2578
2639
|
authSource?: string | {
|
|
2579
2640
|
$env: string;
|
|
2580
2641
|
} | undefined;
|
|
@@ -2582,7 +2643,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2582
2643
|
$env: string;
|
|
2583
2644
|
} | undefined;
|
|
2584
2645
|
tls?: boolean | undefined;
|
|
2585
|
-
|
|
2646
|
+
uri?: string | {
|
|
2647
|
+
$env: string;
|
|
2648
|
+
} | undefined;
|
|
2586
2649
|
timeout?: number | undefined;
|
|
2587
2650
|
statementTimeout?: number | undefined;
|
|
2588
2651
|
envFile?: string | undefined;
|
|
@@ -2591,10 +2654,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2591
2654
|
password: string | {
|
|
2592
2655
|
$env: string;
|
|
2593
2656
|
};
|
|
2594
|
-
system: "redis";
|
|
2595
2657
|
host: string | {
|
|
2596
2658
|
$env: string;
|
|
2597
2659
|
};
|
|
2660
|
+
system: "redis";
|
|
2598
2661
|
port: number | {
|
|
2599
2662
|
$env: string;
|
|
2600
2663
|
};
|
|
@@ -2604,7 +2667,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2604
2667
|
database: string | {
|
|
2605
2668
|
$env: string;
|
|
2606
2669
|
};
|
|
2607
|
-
permission: "
|
|
2670
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2608
2671
|
timeout?: number | undefined;
|
|
2609
2672
|
statementTimeout?: number | undefined;
|
|
2610
2673
|
envFile?: string | undefined;
|
|
@@ -2613,10 +2676,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2613
2676
|
password: string | {
|
|
2614
2677
|
$env: string;
|
|
2615
2678
|
};
|
|
2616
|
-
system: "elasticsearch";
|
|
2617
2679
|
host: string | {
|
|
2618
2680
|
$env: string;
|
|
2619
2681
|
};
|
|
2682
|
+
system: "elasticsearch";
|
|
2620
2683
|
port: number | {
|
|
2621
2684
|
$env: string;
|
|
2622
2685
|
};
|
|
@@ -2626,9 +2689,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2626
2689
|
database: string | {
|
|
2627
2690
|
$env: string;
|
|
2628
2691
|
};
|
|
2629
|
-
rejectUnauthorized: boolean;
|
|
2630
|
-
permission: "admin" | "query-only" | "read-write" | "data-admin";
|
|
2631
2692
|
protocol: "http" | "https";
|
|
2693
|
+
rejectUnauthorized: boolean;
|
|
2694
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2695
|
+
caPath?: string | undefined;
|
|
2632
2696
|
timeout?: number | undefined;
|
|
2633
2697
|
statementTimeout?: number | undefined;
|
|
2634
2698
|
nodes?: string[] | undefined;
|
|
@@ -2638,17 +2702,16 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2638
2702
|
apiKey?: string | {
|
|
2639
2703
|
$env: string;
|
|
2640
2704
|
} | undefined;
|
|
2641
|
-
caPath?: string | undefined;
|
|
2642
2705
|
envFile?: string | undefined;
|
|
2643
2706
|
environment?: string | undefined;
|
|
2644
2707
|
}, unknown>>, Record<string, {
|
|
2645
2708
|
password: string | {
|
|
2646
2709
|
$env: string;
|
|
2647
2710
|
};
|
|
2648
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
2649
2711
|
host: string | {
|
|
2650
2712
|
$env: string;
|
|
2651
2713
|
};
|
|
2714
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
2652
2715
|
port: number | {
|
|
2653
2716
|
$env: string;
|
|
2654
2717
|
};
|
|
@@ -2658,19 +2721,23 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2658
2721
|
database: string | {
|
|
2659
2722
|
$env: string;
|
|
2660
2723
|
};
|
|
2661
|
-
permission: "
|
|
2724
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2662
2725
|
timeout?: number | undefined;
|
|
2663
2726
|
statementTimeout?: number | undefined;
|
|
2727
|
+
sqlTls?: {
|
|
2728
|
+
mode: "verify-full";
|
|
2729
|
+
caPath: string;
|
|
2730
|
+
} | undefined;
|
|
2664
2731
|
envFile?: string | undefined;
|
|
2665
2732
|
environment?: string | undefined;
|
|
2666
2733
|
} | {
|
|
2667
2734
|
password: string | {
|
|
2668
2735
|
$env: string;
|
|
2669
2736
|
};
|
|
2670
|
-
system: "sqlite";
|
|
2671
2737
|
host: string | {
|
|
2672
2738
|
$env: string;
|
|
2673
2739
|
};
|
|
2740
|
+
system: "sqlite";
|
|
2674
2741
|
port: number | {
|
|
2675
2742
|
$env: string;
|
|
2676
2743
|
};
|
|
@@ -2683,7 +2750,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2683
2750
|
file: string | {
|
|
2684
2751
|
$env: string;
|
|
2685
2752
|
};
|
|
2686
|
-
permission: "
|
|
2753
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2687
2754
|
timeout?: number | undefined;
|
|
2688
2755
|
statementTimeout?: number | undefined;
|
|
2689
2756
|
envFile?: string | undefined;
|
|
@@ -2692,10 +2759,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2692
2759
|
password: string | {
|
|
2693
2760
|
$env: string;
|
|
2694
2761
|
};
|
|
2695
|
-
system: "mongodb";
|
|
2696
2762
|
host: string | {
|
|
2697
2763
|
$env: string;
|
|
2698
2764
|
};
|
|
2765
|
+
system: "mongodb";
|
|
2699
2766
|
port: number | {
|
|
2700
2767
|
$env: string;
|
|
2701
2768
|
};
|
|
@@ -2706,10 +2773,8 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2706
2773
|
$env: string;
|
|
2707
2774
|
};
|
|
2708
2775
|
srv: boolean;
|
|
2709
|
-
permission: "
|
|
2710
|
-
|
|
2711
|
-
$env: string;
|
|
2712
|
-
} | undefined;
|
|
2776
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2777
|
+
options?: Record<string, string> | undefined;
|
|
2713
2778
|
authSource?: string | {
|
|
2714
2779
|
$env: string;
|
|
2715
2780
|
} | undefined;
|
|
@@ -2717,7 +2782,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2717
2782
|
$env: string;
|
|
2718
2783
|
} | undefined;
|
|
2719
2784
|
tls?: boolean | undefined;
|
|
2720
|
-
|
|
2785
|
+
uri?: string | {
|
|
2786
|
+
$env: string;
|
|
2787
|
+
} | undefined;
|
|
2721
2788
|
timeout?: number | undefined;
|
|
2722
2789
|
statementTimeout?: number | undefined;
|
|
2723
2790
|
envFile?: string | undefined;
|
|
@@ -2726,10 +2793,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2726
2793
|
password: string | {
|
|
2727
2794
|
$env: string;
|
|
2728
2795
|
};
|
|
2729
|
-
system: "redis";
|
|
2730
2796
|
host: string | {
|
|
2731
2797
|
$env: string;
|
|
2732
2798
|
};
|
|
2799
|
+
system: "redis";
|
|
2733
2800
|
port: number | {
|
|
2734
2801
|
$env: string;
|
|
2735
2802
|
};
|
|
@@ -2739,7 +2806,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2739
2806
|
database: string | {
|
|
2740
2807
|
$env: string;
|
|
2741
2808
|
};
|
|
2742
|
-
permission: "
|
|
2809
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2743
2810
|
timeout?: number | undefined;
|
|
2744
2811
|
statementTimeout?: number | undefined;
|
|
2745
2812
|
envFile?: string | undefined;
|
|
@@ -2748,10 +2815,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2748
2815
|
password: string | {
|
|
2749
2816
|
$env: string;
|
|
2750
2817
|
};
|
|
2751
|
-
system: "elasticsearch";
|
|
2752
2818
|
host: string | {
|
|
2753
2819
|
$env: string;
|
|
2754
2820
|
};
|
|
2821
|
+
system: "elasticsearch";
|
|
2755
2822
|
port: number | {
|
|
2756
2823
|
$env: string;
|
|
2757
2824
|
};
|
|
@@ -2761,9 +2828,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2761
2828
|
database: string | {
|
|
2762
2829
|
$env: string;
|
|
2763
2830
|
};
|
|
2764
|
-
rejectUnauthorized: boolean;
|
|
2765
|
-
permission: "admin" | "query-only" | "read-write" | "data-admin";
|
|
2766
2831
|
protocol: "http" | "https";
|
|
2832
|
+
rejectUnauthorized: boolean;
|
|
2833
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2834
|
+
caPath?: string | undefined;
|
|
2767
2835
|
timeout?: number | undefined;
|
|
2768
2836
|
statementTimeout?: number | undefined;
|
|
2769
2837
|
nodes?: string[] | undefined;
|
|
@@ -2773,7 +2841,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2773
2841
|
apiKey?: string | {
|
|
2774
2842
|
$env: string;
|
|
2775
2843
|
} | undefined;
|
|
2776
|
-
caPath?: string | undefined;
|
|
2777
2844
|
envFile?: string | undefined;
|
|
2778
2845
|
environment?: string | undefined;
|
|
2779
2846
|
}>, Record<string, unknown>>;
|
|
@@ -2922,10 +2989,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2922
2989
|
password: string | {
|
|
2923
2990
|
$env: string;
|
|
2924
2991
|
};
|
|
2925
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
2926
2992
|
host: string | {
|
|
2927
2993
|
$env: string;
|
|
2928
2994
|
};
|
|
2995
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
2929
2996
|
port: number | {
|
|
2930
2997
|
$env: string;
|
|
2931
2998
|
};
|
|
@@ -2935,19 +3002,23 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2935
3002
|
database: string | {
|
|
2936
3003
|
$env: string;
|
|
2937
3004
|
};
|
|
2938
|
-
permission: "
|
|
3005
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2939
3006
|
timeout?: number | undefined;
|
|
2940
3007
|
statementTimeout?: number | undefined;
|
|
3008
|
+
sqlTls?: {
|
|
3009
|
+
mode: "verify-full";
|
|
3010
|
+
caPath: string;
|
|
3011
|
+
} | undefined;
|
|
2941
3012
|
envFile?: string | undefined;
|
|
2942
3013
|
environment?: string | undefined;
|
|
2943
3014
|
} | {
|
|
2944
3015
|
password: string | {
|
|
2945
3016
|
$env: string;
|
|
2946
3017
|
};
|
|
2947
|
-
system: "sqlite";
|
|
2948
3018
|
host: string | {
|
|
2949
3019
|
$env: string;
|
|
2950
3020
|
};
|
|
3021
|
+
system: "sqlite";
|
|
2951
3022
|
port: number | {
|
|
2952
3023
|
$env: string;
|
|
2953
3024
|
};
|
|
@@ -2960,7 +3031,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2960
3031
|
file: string | {
|
|
2961
3032
|
$env: string;
|
|
2962
3033
|
};
|
|
2963
|
-
permission: "
|
|
3034
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
2964
3035
|
timeout?: number | undefined;
|
|
2965
3036
|
statementTimeout?: number | undefined;
|
|
2966
3037
|
envFile?: string | undefined;
|
|
@@ -2969,10 +3040,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2969
3040
|
password: string | {
|
|
2970
3041
|
$env: string;
|
|
2971
3042
|
};
|
|
2972
|
-
system: "mongodb";
|
|
2973
3043
|
host: string | {
|
|
2974
3044
|
$env: string;
|
|
2975
3045
|
};
|
|
3046
|
+
system: "mongodb";
|
|
2976
3047
|
port: number | {
|
|
2977
3048
|
$env: string;
|
|
2978
3049
|
};
|
|
@@ -2983,10 +3054,8 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2983
3054
|
$env: string;
|
|
2984
3055
|
};
|
|
2985
3056
|
srv: boolean;
|
|
2986
|
-
permission: "
|
|
2987
|
-
|
|
2988
|
-
$env: string;
|
|
2989
|
-
} | undefined;
|
|
3057
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
3058
|
+
options?: Record<string, string> | undefined;
|
|
2990
3059
|
authSource?: string | {
|
|
2991
3060
|
$env: string;
|
|
2992
3061
|
} | undefined;
|
|
@@ -2994,7 +3063,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2994
3063
|
$env: string;
|
|
2995
3064
|
} | undefined;
|
|
2996
3065
|
tls?: boolean | undefined;
|
|
2997
|
-
|
|
3066
|
+
uri?: string | {
|
|
3067
|
+
$env: string;
|
|
3068
|
+
} | undefined;
|
|
2998
3069
|
timeout?: number | undefined;
|
|
2999
3070
|
statementTimeout?: number | undefined;
|
|
3000
3071
|
envFile?: string | undefined;
|
|
@@ -3003,10 +3074,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3003
3074
|
password: string | {
|
|
3004
3075
|
$env: string;
|
|
3005
3076
|
};
|
|
3006
|
-
system: "redis";
|
|
3007
3077
|
host: string | {
|
|
3008
3078
|
$env: string;
|
|
3009
3079
|
};
|
|
3080
|
+
system: "redis";
|
|
3010
3081
|
port: number | {
|
|
3011
3082
|
$env: string;
|
|
3012
3083
|
};
|
|
@@ -3016,7 +3087,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3016
3087
|
database: string | {
|
|
3017
3088
|
$env: string;
|
|
3018
3089
|
};
|
|
3019
|
-
permission: "
|
|
3090
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
3020
3091
|
timeout?: number | undefined;
|
|
3021
3092
|
statementTimeout?: number | undefined;
|
|
3022
3093
|
envFile?: string | undefined;
|
|
@@ -3025,10 +3096,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3025
3096
|
password: string | {
|
|
3026
3097
|
$env: string;
|
|
3027
3098
|
};
|
|
3028
|
-
system: "elasticsearch";
|
|
3029
3099
|
host: string | {
|
|
3030
3100
|
$env: string;
|
|
3031
3101
|
};
|
|
3102
|
+
system: "elasticsearch";
|
|
3032
3103
|
port: number | {
|
|
3033
3104
|
$env: string;
|
|
3034
3105
|
};
|
|
@@ -3038,9 +3109,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3038
3109
|
database: string | {
|
|
3039
3110
|
$env: string;
|
|
3040
3111
|
};
|
|
3041
|
-
rejectUnauthorized: boolean;
|
|
3042
|
-
permission: "admin" | "query-only" | "read-write" | "data-admin";
|
|
3043
3112
|
protocol: "http" | "https";
|
|
3113
|
+
rejectUnauthorized: boolean;
|
|
3114
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
3115
|
+
caPath?: string | undefined;
|
|
3044
3116
|
timeout?: number | undefined;
|
|
3045
3117
|
statementTimeout?: number | undefined;
|
|
3046
3118
|
nodes?: string[] | undefined;
|
|
@@ -3050,7 +3122,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3050
3122
|
apiKey?: string | {
|
|
3051
3123
|
$env: string;
|
|
3052
3124
|
} | undefined;
|
|
3053
|
-
caPath?: string | undefined;
|
|
3054
3125
|
envFile?: string | undefined;
|
|
3055
3126
|
environment?: string | undefined;
|
|
3056
3127
|
}>;
|
|
@@ -3117,10 +3188,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3117
3188
|
password: string | {
|
|
3118
3189
|
$env: string;
|
|
3119
3190
|
};
|
|
3120
|
-
system: "postgresql" | "mysql" | "mariadb";
|
|
3121
3191
|
host: string | {
|
|
3122
3192
|
$env: string;
|
|
3123
3193
|
};
|
|
3194
|
+
system: "postgresql" | "mysql" | "mariadb";
|
|
3124
3195
|
port: number | {
|
|
3125
3196
|
$env: string;
|
|
3126
3197
|
};
|
|
@@ -3130,19 +3201,23 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3130
3201
|
database: string | {
|
|
3131
3202
|
$env: string;
|
|
3132
3203
|
};
|
|
3133
|
-
permission: "
|
|
3204
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
3134
3205
|
timeout?: number | undefined;
|
|
3135
3206
|
statementTimeout?: number | undefined;
|
|
3207
|
+
sqlTls?: {
|
|
3208
|
+
mode: "verify-full";
|
|
3209
|
+
caPath: string;
|
|
3210
|
+
} | undefined;
|
|
3136
3211
|
envFile?: string | undefined;
|
|
3137
3212
|
environment?: string | undefined;
|
|
3138
3213
|
} | {
|
|
3139
3214
|
password: string | {
|
|
3140
3215
|
$env: string;
|
|
3141
3216
|
};
|
|
3142
|
-
system: "sqlite";
|
|
3143
3217
|
host: string | {
|
|
3144
3218
|
$env: string;
|
|
3145
3219
|
};
|
|
3220
|
+
system: "sqlite";
|
|
3146
3221
|
port: number | {
|
|
3147
3222
|
$env: string;
|
|
3148
3223
|
};
|
|
@@ -3155,7 +3230,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3155
3230
|
file: string | {
|
|
3156
3231
|
$env: string;
|
|
3157
3232
|
};
|
|
3158
|
-
permission: "
|
|
3233
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
3159
3234
|
timeout?: number | undefined;
|
|
3160
3235
|
statementTimeout?: number | undefined;
|
|
3161
3236
|
envFile?: string | undefined;
|
|
@@ -3164,10 +3239,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3164
3239
|
password: string | {
|
|
3165
3240
|
$env: string;
|
|
3166
3241
|
};
|
|
3167
|
-
system: "mongodb";
|
|
3168
3242
|
host: string | {
|
|
3169
3243
|
$env: string;
|
|
3170
3244
|
};
|
|
3245
|
+
system: "mongodb";
|
|
3171
3246
|
port: number | {
|
|
3172
3247
|
$env: string;
|
|
3173
3248
|
};
|
|
@@ -3178,10 +3253,8 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3178
3253
|
$env: string;
|
|
3179
3254
|
};
|
|
3180
3255
|
srv: boolean;
|
|
3181
|
-
permission: "
|
|
3182
|
-
|
|
3183
|
-
$env: string;
|
|
3184
|
-
} | undefined;
|
|
3256
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
3257
|
+
options?: Record<string, string> | undefined;
|
|
3185
3258
|
authSource?: string | {
|
|
3186
3259
|
$env: string;
|
|
3187
3260
|
} | undefined;
|
|
@@ -3189,7 +3262,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3189
3262
|
$env: string;
|
|
3190
3263
|
} | undefined;
|
|
3191
3264
|
tls?: boolean | undefined;
|
|
3192
|
-
|
|
3265
|
+
uri?: string | {
|
|
3266
|
+
$env: string;
|
|
3267
|
+
} | undefined;
|
|
3193
3268
|
timeout?: number | undefined;
|
|
3194
3269
|
statementTimeout?: number | undefined;
|
|
3195
3270
|
envFile?: string | undefined;
|
|
@@ -3198,10 +3273,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3198
3273
|
password: string | {
|
|
3199
3274
|
$env: string;
|
|
3200
3275
|
};
|
|
3201
|
-
system: "redis";
|
|
3202
3276
|
host: string | {
|
|
3203
3277
|
$env: string;
|
|
3204
3278
|
};
|
|
3279
|
+
system: "redis";
|
|
3205
3280
|
port: number | {
|
|
3206
3281
|
$env: string;
|
|
3207
3282
|
};
|
|
@@ -3211,7 +3286,7 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3211
3286
|
database: string | {
|
|
3212
3287
|
$env: string;
|
|
3213
3288
|
};
|
|
3214
|
-
permission: "
|
|
3289
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
3215
3290
|
timeout?: number | undefined;
|
|
3216
3291
|
statementTimeout?: number | undefined;
|
|
3217
3292
|
envFile?: string | undefined;
|
|
@@ -3220,10 +3295,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3220
3295
|
password: string | {
|
|
3221
3296
|
$env: string;
|
|
3222
3297
|
};
|
|
3223
|
-
system: "elasticsearch";
|
|
3224
3298
|
host: string | {
|
|
3225
3299
|
$env: string;
|
|
3226
3300
|
};
|
|
3301
|
+
system: "elasticsearch";
|
|
3227
3302
|
port: number | {
|
|
3228
3303
|
$env: string;
|
|
3229
3304
|
};
|
|
@@ -3233,9 +3308,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3233
3308
|
database: string | {
|
|
3234
3309
|
$env: string;
|
|
3235
3310
|
};
|
|
3236
|
-
rejectUnauthorized: boolean;
|
|
3237
|
-
permission: "admin" | "query-only" | "read-write" | "data-admin";
|
|
3238
3311
|
protocol: "http" | "https";
|
|
3312
|
+
rejectUnauthorized: boolean;
|
|
3313
|
+
permission: "query-only" | "read-write" | "data-admin" | "admin";
|
|
3314
|
+
caPath?: string | undefined;
|
|
3239
3315
|
timeout?: number | undefined;
|
|
3240
3316
|
statementTimeout?: number | undefined;
|
|
3241
3317
|
nodes?: string[] | undefined;
|
|
@@ -3245,7 +3321,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
3245
3321
|
apiKey?: string | {
|
|
3246
3322
|
$env: string;
|
|
3247
3323
|
} | undefined;
|
|
3248
|
-
caPath?: string | undefined;
|
|
3249
3324
|
envFile?: string | undefined;
|
|
3250
3325
|
environment?: string | undefined;
|
|
3251
3326
|
}>;
|