@saptools/cf-hana 0.4.0 → 0.5.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/CHANGELOG.md +18 -0
- package/README.md +43 -1
- package/dist/cli.js +743 -51
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +35 -4
- package/dist/index.js +707 -29
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,12 @@ interface ConnectOptions {
|
|
|
53
53
|
readonly password?: string;
|
|
54
54
|
/** Connection pool tuning, or `false` for a single dedicated connection. */
|
|
55
55
|
readonly pool?: PoolOptions | false;
|
|
56
|
+
/** Skip the direct connection attempt and connect via an SSH tunnel immediately. */
|
|
57
|
+
readonly tunnel?: boolean;
|
|
58
|
+
/** Bypass a cached/live tunnel and force a fresh establishment attempt. */
|
|
59
|
+
readonly refreshTunnel?: boolean;
|
|
60
|
+
/** CLI-only stderr visibility hook for tunnel-fallback progress; unset stays silent. */
|
|
61
|
+
readonly onTunnelStatus?: (message: string) => void;
|
|
56
62
|
}
|
|
57
63
|
interface QueryOptions {
|
|
58
64
|
readonly timeoutMs?: number;
|
|
@@ -134,10 +140,9 @@ interface SqlBackupRecord {
|
|
|
134
140
|
declare function cfHanaBackupRoot(saptoolsRoot?: string): string;
|
|
135
141
|
declare function writeSqlBackup(input: SqlBackupWriteInput, options?: SqlBackupWriteOptions): Promise<SqlBackupRecord>;
|
|
136
142
|
|
|
137
|
-
interface
|
|
138
|
-
readonly
|
|
139
|
-
readonly
|
|
140
|
-
readonly type: "TABLE" | "VIEW";
|
|
143
|
+
interface SapCredentials {
|
|
144
|
+
readonly email: string;
|
|
145
|
+
readonly password: string;
|
|
141
146
|
}
|
|
142
147
|
|
|
143
148
|
interface DriverExecResult {
|
|
@@ -154,6 +159,12 @@ interface DriverConnectParams {
|
|
|
154
159
|
readonly schema: string;
|
|
155
160
|
readonly certificate: string;
|
|
156
161
|
readonly connectTimeoutMs: number;
|
|
162
|
+
/**
|
|
163
|
+
* TLS certificate-hostname override. Set only when `host` is a tunnel
|
|
164
|
+
* endpoint (e.g. `127.0.0.1`) so certificate verification still targets
|
|
165
|
+
* the real HANA hostname. Unset on the direct path.
|
|
166
|
+
*/
|
|
167
|
+
readonly servername?: string;
|
|
157
168
|
}
|
|
158
169
|
/** A live, single HANA connection. Implementations wrap a concrete driver. */
|
|
159
170
|
interface DriverConnection {
|
|
@@ -182,6 +193,20 @@ interface ConnectionConfig {
|
|
|
182
193
|
readonly readOnly: boolean;
|
|
183
194
|
readonly allowDestructive: boolean;
|
|
184
195
|
readonly autoLimit: number | false;
|
|
196
|
+
/** The resolved Cloud Foundry app/org/space/API this connection targets. */
|
|
197
|
+
readonly appName: string;
|
|
198
|
+
readonly orgName: string;
|
|
199
|
+
readonly spaceName: string;
|
|
200
|
+
readonly apiEndpoint: string;
|
|
201
|
+
readonly selectorSource: SelectorSource;
|
|
202
|
+
/** SAP BTP identity used to resolve bindings, reused for tunnel-fallback CF sessions. */
|
|
203
|
+
readonly sapCredentials?: SapCredentials;
|
|
204
|
+
/** `"always"` skips the direct attempt and connects via a tunnel immediately. */
|
|
205
|
+
readonly tunnelMode: "auto" | "always";
|
|
206
|
+
/** Bypasses a cached/live tunnel and forces a fresh establishment attempt. */
|
|
207
|
+
readonly refreshTunnel: boolean;
|
|
208
|
+
/** CLI-only stderr visibility hook; left unset, the library stays silent. */
|
|
209
|
+
readonly onTunnelStatus?: (message: string) => void;
|
|
185
210
|
}
|
|
186
211
|
/** A single HANA connection: applies the safety guard, auto-limit, and timeouts. */
|
|
187
212
|
declare class Connection {
|
|
@@ -203,6 +228,12 @@ declare class Connection {
|
|
|
203
228
|
private evaluateSafety;
|
|
204
229
|
}
|
|
205
230
|
|
|
231
|
+
interface CatalogObjectInfo {
|
|
232
|
+
readonly schema: string;
|
|
233
|
+
readonly name: string;
|
|
234
|
+
readonly type: "TABLE" | "VIEW";
|
|
235
|
+
}
|
|
236
|
+
|
|
206
237
|
/**
|
|
207
238
|
* A process-local, in-memory pool of HANA connections. It holds no shared disk
|
|
208
239
|
* state, so multiple pools (in this or other processes) are fully independent.
|