@zero-transfer/sftp 0.1.5 → 0.3.1
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/README.md +18 -17
- package/dist/index.cjs +6185 -8301
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +540 -93
- package/dist/index.d.ts +540 -93
- package/dist/index.mjs +6274 -8385
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
import { SecureVersion, PeerCertificate } from 'node:tls';
|
|
3
3
|
import { Readable } from 'node:stream';
|
|
4
|
-
import { BaseAgent, Algorithms, ConnectConfig, Client, SFTPWrapper } from 'ssh2';
|
|
5
4
|
import { Buffer } from 'node:buffer';
|
|
5
|
+
import { Socket } from 'node:net';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Structured logging contracts and helpers for ZeroTransfer.
|
|
@@ -306,10 +306,25 @@ interface RemoteStat extends RemoteEntry {
|
|
|
306
306
|
type TlsSecretSource = SecretSource | SecretSource[];
|
|
307
307
|
/** Known-hosts material source accepted by SSH connection profiles. */
|
|
308
308
|
type SshKnownHostsSource = SecretSource | SecretSource[];
|
|
309
|
+
/** Minimal SSH agent contract used by profile validation and SSH adapters. */
|
|
310
|
+
interface SshAgentLike {
|
|
311
|
+
/** Returns public identities exposed by the agent implementation. */
|
|
312
|
+
getIdentities: (...args: any[]) => unknown;
|
|
313
|
+
/** Signs payloads using a selected identity. */
|
|
314
|
+
sign: (...args: any[]) => unknown;
|
|
315
|
+
}
|
|
316
|
+
/** Ordered algorithm list mutation operations used by SSH adapters. */
|
|
317
|
+
interface SshAlgorithmMutations {
|
|
318
|
+
append?: string | readonly string[];
|
|
319
|
+
prepend?: string | readonly string[];
|
|
320
|
+
remove?: string | readonly string[];
|
|
321
|
+
}
|
|
322
|
+
/** Single SSH algorithm override value accepted by connection profiles. */
|
|
323
|
+
type SshAlgorithmOverride = readonly string[] | SshAlgorithmMutations;
|
|
309
324
|
/** SSH agent source accepted by SFTP providers. */
|
|
310
|
-
type SshAgentSource = string |
|
|
325
|
+
type SshAgentSource = string | SshAgentLike;
|
|
311
326
|
/** SSH transport algorithm overrides accepted by SFTP providers. */
|
|
312
|
-
type SshAlgorithms =
|
|
327
|
+
type SshAlgorithms = Record<string, SshAlgorithmOverride | undefined>;
|
|
313
328
|
/** Context passed to SSH socket factories before opening an SSH session. */
|
|
314
329
|
interface SshSocketFactoryContext {
|
|
315
330
|
/** Target SSH host from the resolved connection profile. */
|
|
@@ -327,7 +342,7 @@ interface SshSocketFactoryContext {
|
|
|
327
342
|
* Use this hook for HTTP CONNECT, SOCKS, bastion, or custom tunnel integrations.
|
|
328
343
|
*
|
|
329
344
|
* @param context - Resolved SSH target information for the socket being opened.
|
|
330
|
-
* @returns Preconnected readable stream, or a promise for one, passed to
|
|
345
|
+
* @returns Preconnected readable stream, or a promise for one, passed to the SSH adapter socket option.
|
|
331
346
|
*/
|
|
332
347
|
type SshSocketFactory = (context: SshSocketFactoryContext) => Readable | Promise<Readable>;
|
|
333
348
|
/** Prompt metadata supplied by an SSH keyboard-interactive server challenge. */
|
|
@@ -1629,45 +1644,6 @@ interface RunConnectionDiagnosticsOptions {
|
|
|
1629
1644
|
*/
|
|
1630
1645
|
declare function runConnectionDiagnostics(options: RunConnectionDiagnosticsOptions): Promise<ConnectionDiagnosticsResult>;
|
|
1631
1646
|
|
|
1632
|
-
/**
|
|
1633
|
-
* Built-in provider capability matrix.
|
|
1634
|
-
*
|
|
1635
|
-
* Aggregates the {@link CapabilitySet} advertised by every shipped provider
|
|
1636
|
-
* factory so applications, docs, and diagnostics can compare features across
|
|
1637
|
-
* providers without instantiating each one. The S3 entry is captured twice —
|
|
1638
|
-
* once with multipart upload disabled (default) and once with multipart
|
|
1639
|
-
* upload enabled — because that flag flips `resumeUpload`.
|
|
1640
|
-
*
|
|
1641
|
-
* @module providers/capabilityMatrix
|
|
1642
|
-
*/
|
|
1643
|
-
|
|
1644
|
-
/** Identifier for an entry in {@link getBuiltinCapabilityMatrix}. */
|
|
1645
|
-
type BuiltinProviderMatrixId = ProviderId | "s3:multipart";
|
|
1646
|
-
/** Single entry in the built-in capability matrix. */
|
|
1647
|
-
interface BuiltinCapabilityMatrixEntry {
|
|
1648
|
-
/** Stable matrix identifier (provider id, or `s3:multipart` for the multipart variant). */
|
|
1649
|
-
id: BuiltinProviderMatrixId;
|
|
1650
|
-
/** Human-readable label, suitable for documentation tables. */
|
|
1651
|
-
label: string;
|
|
1652
|
-
/** Capability snapshot advertised by the provider factory. */
|
|
1653
|
-
capabilities: CapabilitySet;
|
|
1654
|
-
}
|
|
1655
|
-
/**
|
|
1656
|
-
* Returns the capability matrix for every shipped provider factory.
|
|
1657
|
-
*
|
|
1658
|
-
* Each call constructs a fresh factory snapshot, so the result reflects the
|
|
1659
|
-
* current build (including any future new metadata or notes). Web providers
|
|
1660
|
-
* are constructed with a no-op fetch since capability advertisement does not
|
|
1661
|
-
* require a live transport.
|
|
1662
|
-
*/
|
|
1663
|
-
declare function getBuiltinCapabilityMatrix(): BuiltinCapabilityMatrixEntry[];
|
|
1664
|
-
/**
|
|
1665
|
-
* Renders the matrix returned by {@link getBuiltinCapabilityMatrix} as a
|
|
1666
|
-
* GitHub-flavored Markdown table covering the most commonly-compared
|
|
1667
|
-
* capability flags.
|
|
1668
|
-
*/
|
|
1669
|
-
declare function formatCapabilityMatrixMarkdown(matrix?: ReadonlyArray<BuiltinCapabilityMatrixEntry>): string;
|
|
1670
|
-
|
|
1671
1647
|
/** Options used to create a local file-system provider factory. */
|
|
1672
1648
|
interface LocalProviderOptions {
|
|
1673
1649
|
/** Root directory exposed as `/`. When omitted, `profile.host` is treated as the root path. */
|
|
@@ -3191,70 +3167,541 @@ declare function joinRemotePath(...segments: string[]): string;
|
|
|
3191
3167
|
*/
|
|
3192
3168
|
declare function basenameRemotePath(input: string): string;
|
|
3193
3169
|
|
|
3194
|
-
/**
|
|
3195
|
-
interface
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3170
|
+
/** Algorithm lists exchanged during SSH KEXINIT negotiation. */
|
|
3171
|
+
interface SshAlgorithmPreferences {
|
|
3172
|
+
compressionClientToServer: readonly string[];
|
|
3173
|
+
compressionServerToClient: readonly string[];
|
|
3174
|
+
encryptionClientToServer: readonly string[];
|
|
3175
|
+
encryptionServerToClient: readonly string[];
|
|
3176
|
+
kexAlgorithms: readonly string[];
|
|
3177
|
+
languagesClientToServer: readonly string[];
|
|
3178
|
+
languagesServerToClient: readonly string[];
|
|
3179
|
+
macClientToServer: readonly string[];
|
|
3180
|
+
macServerToClient: readonly string[];
|
|
3181
|
+
serverHostKeyAlgorithms: readonly string[];
|
|
3182
|
+
}
|
|
3183
|
+
/** Selected algorithms after intersecting client preferences with server capabilities. */
|
|
3184
|
+
interface NegotiatedSshAlgorithms {
|
|
3185
|
+
compressionClientToServer: string;
|
|
3186
|
+
compressionServerToClient: string;
|
|
3187
|
+
encryptionClientToServer: string;
|
|
3188
|
+
encryptionServerToClient: string;
|
|
3189
|
+
kexAlgorithm: string;
|
|
3190
|
+
languageClientToServer?: string;
|
|
3191
|
+
languageServerToClient?: string;
|
|
3192
|
+
macClientToServer: string;
|
|
3193
|
+
macServerToClient: string;
|
|
3194
|
+
serverHostKeyAlgorithm: string;
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
/** Parsed SSH identification components from the RFC 4253 banner line. */
|
|
3198
|
+
interface SshIdentification {
|
|
3199
|
+
protocolVersion: string;
|
|
3200
|
+
softwareVersion: string;
|
|
3201
|
+
comments?: string;
|
|
3202
|
+
raw: string;
|
|
3202
3203
|
}
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3204
|
+
|
|
3205
|
+
/** Parsed SSH_MSG_KEXINIT payload. */
|
|
3206
|
+
interface SshKexInitMessage extends SshAlgorithmPreferences {
|
|
3207
|
+
cookie: Buffer;
|
|
3208
|
+
firstKexPacketFollows: boolean;
|
|
3209
|
+
messageType: number;
|
|
3210
|
+
reserved: number;
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
/** Directional key material used after SSH NEWKEYS. */
|
|
3214
|
+
interface SshTransportDirectionKeys {
|
|
3215
|
+
encryptionKey: Buffer;
|
|
3216
|
+
iv: Buffer;
|
|
3217
|
+
macKey: Buffer;
|
|
3218
|
+
}
|
|
3219
|
+
/** Session key bundle derived from K, H, and session id. */
|
|
3220
|
+
interface SshDerivedSessionKeys {
|
|
3221
|
+
clientToServer: SshTransportDirectionKeys;
|
|
3222
|
+
exchangeHash: Buffer;
|
|
3223
|
+
serverToClient: SshTransportDirectionKeys;
|
|
3224
|
+
sessionId: Buffer;
|
|
3225
|
+
}
|
|
3226
|
+
|
|
3227
|
+
/** Initial client-side handshake state before key exchange math starts. */
|
|
3228
|
+
interface SshTransportHandshakeResult {
|
|
3229
|
+
keyExchange: {
|
|
3230
|
+
algorithm: string;
|
|
3231
|
+
clientKexInitPayload: Buffer;
|
|
3232
|
+
clientPublicKey: Buffer;
|
|
3233
|
+
exchangeHash: Buffer;
|
|
3234
|
+
serverHostKey: Buffer;
|
|
3235
|
+
serverKexInitPayload: Buffer;
|
|
3236
|
+
serverPublicKey: Buffer;
|
|
3237
|
+
serverSignature: Buffer;
|
|
3238
|
+
sessionId: Buffer;
|
|
3239
|
+
sharedSecret: Buffer;
|
|
3240
|
+
transportKeys: {
|
|
3241
|
+
clientToServer: SshDerivedSessionKeys["clientToServer"];
|
|
3242
|
+
serverToClient: SshDerivedSessionKeys["serverToClient"];
|
|
3243
|
+
};
|
|
3244
|
+
};
|
|
3245
|
+
negotiatedAlgorithms: NegotiatedSshAlgorithms;
|
|
3246
|
+
serverIdentification: SshIdentification;
|
|
3247
|
+
serverKexInit: SshKexInitMessage;
|
|
3248
|
+
/**
|
|
3249
|
+
* Number of unencrypted packets the client sent during the handshake (KEXINIT,
|
|
3250
|
+
* KEX_ECDH_INIT, NEWKEYS). Per RFC 4253 §6.4, packet sequence numbers are never
|
|
3251
|
+
* reset across NEWKEYS, so this value seeds the outbound protector.
|
|
3252
|
+
*/
|
|
3253
|
+
outboundPacketCount: number;
|
|
3254
|
+
/**
|
|
3255
|
+
* Number of unencrypted packets the client received from the server during the
|
|
3256
|
+
* handshake (server KEXINIT, KEX_ECDH_REPLY, NEWKEYS). Seeds the inbound unprotector.
|
|
3257
|
+
*/
|
|
3258
|
+
inboundPacketCount: number;
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
/** Standard SSH disconnect reason codes (RFC 4253 §11.1). */
|
|
3262
|
+
declare const SshDisconnectReason: {
|
|
3263
|
+
readonly HOST_NOT_ALLOWED_TO_CONNECT: 1;
|
|
3264
|
+
readonly PROTOCOL_ERROR: 2;
|
|
3265
|
+
readonly KEY_EXCHANGE_FAILED: 3;
|
|
3266
|
+
readonly MAC_ERROR: 5;
|
|
3267
|
+
readonly COMPRESSION_ERROR: 6;
|
|
3268
|
+
readonly SERVICE_NOT_AVAILABLE: 7;
|
|
3269
|
+
readonly PROTOCOL_VERSION_NOT_SUPPORTED: 8;
|
|
3270
|
+
readonly HOST_KEY_NOT_VERIFIABLE: 9;
|
|
3271
|
+
readonly CONNECTION_LOST: 10;
|
|
3272
|
+
readonly BY_APPLICATION: 11;
|
|
3273
|
+
readonly TOO_MANY_CONNECTIONS: 12;
|
|
3274
|
+
readonly AUTH_CANCELLED_BY_USER: 13;
|
|
3275
|
+
readonly NO_MORE_AUTH_METHODS: 14;
|
|
3276
|
+
readonly ILLEGAL_USER_NAME: 15;
|
|
3277
|
+
};
|
|
3278
|
+
type SshDisconnectReason = (typeof SshDisconnectReason)[keyof typeof SshDisconnectReason];
|
|
3279
|
+
interface SshTransportConnectionOptions {
|
|
3280
|
+
/** AbortSignal that cancels the in-flight `connect()` call and tears down the socket. */
|
|
3281
|
+
abortSignal?: AbortSignal;
|
|
3282
|
+
/** Algorithm preference overrides. Defaults to the library defaults. */
|
|
3283
|
+
algorithms?: SshAlgorithmPreferences;
|
|
3284
|
+
/** SSH software version string embedded in the identification line. */
|
|
3285
|
+
clientSoftwareVersion?: string;
|
|
3286
|
+
/**
|
|
3287
|
+
* Hard cap (milliseconds) on the SSH identification + key exchange + first
|
|
3288
|
+
* NEWKEYS handshake. If exceeded the socket is destroyed and `connect()`
|
|
3289
|
+
* rejects with a `TimeoutError`. Has no effect once `connect()` resolves.
|
|
3290
|
+
*/
|
|
3291
|
+
handshakeTimeoutMs?: number;
|
|
3292
|
+
/**
|
|
3293
|
+
* If set, sends a `SSH_MSG_IGNORE` packet every `keepaliveIntervalMs`
|
|
3294
|
+
* milliseconds while the transport is connected and idle. This prevents
|
|
3295
|
+
* stateful NAT / firewall devices from dropping long-lived idle sessions
|
|
3296
|
+
* (e.g. between batches in a transfer queue). The timer is reset on every
|
|
3297
|
+
* outbound payload, so active transfers do not generate extra traffic.
|
|
3298
|
+
*/
|
|
3299
|
+
keepaliveIntervalMs?: number;
|
|
3300
|
+
/**
|
|
3301
|
+
* Synchronous host-key policy hook invoked after the signature on the SSH
|
|
3302
|
+
* exchange hash is verified. Throw to reject the server's identity.
|
|
3303
|
+
*/
|
|
3304
|
+
verifyHostKey?: (input: {
|
|
3305
|
+
hostKeyBlob: Buffer;
|
|
3306
|
+
hostKeySha256: Buffer;
|
|
3307
|
+
algorithmName: string;
|
|
3308
|
+
}) => void;
|
|
3209
3309
|
}
|
|
3210
3310
|
/**
|
|
3211
|
-
*
|
|
3311
|
+
* Live SSH transport connection over a TCP socket.
|
|
3212
3312
|
*
|
|
3213
|
-
*
|
|
3214
|
-
*
|
|
3313
|
+
* Runs the SSH identification exchange and key exchange handshake on the supplied socket,
|
|
3314
|
+
* then provides an encrypted packet send/receive interface for higher-level SSH layers
|
|
3315
|
+
* (authentication, connection, SFTP subsystem).
|
|
3215
3316
|
*
|
|
3216
|
-
*
|
|
3317
|
+
* Usage:
|
|
3217
3318
|
* ```ts
|
|
3218
|
-
*
|
|
3319
|
+
* const conn = new SshTransportConnection();
|
|
3320
|
+
* const result = await conn.connect(socket); // runs handshake
|
|
3321
|
+
* conn.sendPayload(payload); // post-NEWKEYS send
|
|
3322
|
+
* for await (const payload of conn.receivePayloads()) { ... }
|
|
3323
|
+
* conn.disconnect();
|
|
3324
|
+
* ```
|
|
3325
|
+
*/
|
|
3326
|
+
declare class SshTransportConnection {
|
|
3327
|
+
private readonly options;
|
|
3328
|
+
private connected;
|
|
3329
|
+
private disposed;
|
|
3330
|
+
private protector;
|
|
3331
|
+
private unprotector;
|
|
3332
|
+
private socket;
|
|
3333
|
+
private keepaliveTimer;
|
|
3334
|
+
private readonly inboundQueue;
|
|
3335
|
+
/**
|
|
3336
|
+
* FIFO of waiters when the queue is empty. Multiple iterators may suspend on
|
|
3337
|
+
* the same transport (auth session, channel setup, connection-manager pump);
|
|
3338
|
+
* each receives exactly one entry in arrival order. A single-slot field would
|
|
3339
|
+
* lose wakeups when a second consumer suspends before the first is resolved.
|
|
3340
|
+
*/
|
|
3341
|
+
private readonly waitingConsumers;
|
|
3342
|
+
constructor(options?: SshTransportConnectionOptions);
|
|
3343
|
+
/**
|
|
3344
|
+
* Runs the SSH handshake on a TCP-connected socket.
|
|
3345
|
+
* Resolves when NEWKEYS completes and the transport is ready for encrypted messages.
|
|
3346
|
+
* Rejects on socket error, abort, or protocol failure.
|
|
3347
|
+
*/
|
|
3348
|
+
connect(socket: Socket): Promise<SshTransportHandshakeResult>;
|
|
3349
|
+
/**
|
|
3350
|
+
* Sends an SSH payload over the encrypted transport.
|
|
3351
|
+
* The payload must start with the SSH message type byte.
|
|
3352
|
+
*/
|
|
3353
|
+
sendPayload(payload: Buffer | Uint8Array): void;
|
|
3354
|
+
/**
|
|
3355
|
+
* Async generator that yields inbound SSH payloads (post-NEWKEYS).
|
|
3356
|
+
*
|
|
3357
|
+
* Transparent handling:
|
|
3358
|
+
* - SSH_MSG_IGNORE (2) and SSH_MSG_DEBUG (4) are silently dropped.
|
|
3359
|
+
* - SSH_MSG_DISCONNECT (1) from the server throws a `ConnectionError`.
|
|
3360
|
+
* - Socket error or close terminates the generator.
|
|
3361
|
+
*/
|
|
3362
|
+
receivePayloads(): AsyncGenerator<Buffer>;
|
|
3363
|
+
/**
|
|
3364
|
+
* Sends SSH_MSG_DISCONNECT and ends the socket.
|
|
3365
|
+
* Safe to call multiple times; subsequent calls are no-ops.
|
|
3366
|
+
*/
|
|
3367
|
+
disconnect(reason?: SshDisconnectReason, description?: string): void;
|
|
3368
|
+
isConnected(): boolean;
|
|
3369
|
+
private onEncryptedData;
|
|
3370
|
+
private onSocketError;
|
|
3371
|
+
private onSocketClose;
|
|
3372
|
+
private enqueueEntry;
|
|
3373
|
+
private dequeuePayload;
|
|
3374
|
+
private assertConnected;
|
|
3375
|
+
private startKeepalive;
|
|
3376
|
+
private stopKeepalive;
|
|
3377
|
+
private resetKeepaliveTimer;
|
|
3378
|
+
private sendKeepalivePing;
|
|
3379
|
+
}
|
|
3380
|
+
|
|
3381
|
+
/**
|
|
3382
|
+
* SSH session channel (RFC 4254 §6).
|
|
3219
3383
|
*
|
|
3220
|
-
*
|
|
3384
|
+
* Manages a single "session" channel from the client side:
|
|
3385
|
+
* CHANNEL_OPEN → OPEN_CONFIRMATION → CHANNEL_REQUEST (subsystem/exec) →
|
|
3386
|
+
* bidirectional CHANNEL_DATA with window management → CHANNEL_EOF/CLOSE.
|
|
3221
3387
|
*
|
|
3388
|
+
* Window management strategy:
|
|
3389
|
+
* - Local window starts at INITIAL_WINDOW_SIZE.
|
|
3390
|
+
* - When consumed bytes exceed WINDOW_REFILL_THRESHOLD, a WINDOW_ADJUST is sent.
|
|
3391
|
+
* - Outbound data respects the remote window; excess is queued and flushed
|
|
3392
|
+
* as the remote issues WINDOW_ADJUST messages.
|
|
3393
|
+
*/
|
|
3394
|
+
|
|
3395
|
+
interface SshSessionChannelOptions {
|
|
3396
|
+
/**
|
|
3397
|
+
* Local channel id allocated by the caller.
|
|
3398
|
+
* If omitted, defaults to 0 (single-channel use case).
|
|
3399
|
+
*/
|
|
3400
|
+
localChannelId?: number;
|
|
3401
|
+
}
|
|
3402
|
+
/**
|
|
3403
|
+
* A single SSH session channel.
|
|
3404
|
+
* Not safe to share across concurrent callers; each SftpSession should own one.
|
|
3405
|
+
*/
|
|
3406
|
+
declare class SshSessionChannel {
|
|
3407
|
+
private readonly transport;
|
|
3408
|
+
private phase;
|
|
3409
|
+
/** Remote channel id assigned by the server in OPEN_CONFIRMATION. */
|
|
3410
|
+
private remoteChannelId;
|
|
3411
|
+
/** Bytes the remote side can still receive before we must stop sending. */
|
|
3412
|
+
private remoteWindowRemaining;
|
|
3413
|
+
/** Maximum packet data size the remote accepts. */
|
|
3414
|
+
private remoteMaxPacketSize;
|
|
3415
|
+
/** Local window: bytes we can still accept from remote. */
|
|
3416
|
+
private localWindowConsumed;
|
|
3417
|
+
private localWindowSize;
|
|
3418
|
+
/** Queue of inbound data for the `receiveData()` generator. */
|
|
3419
|
+
private readonly inboundQueue;
|
|
3420
|
+
private waitingConsumer;
|
|
3421
|
+
/** Queue of outbound data waiting for remote window space. */
|
|
3422
|
+
private readonly outboundQueue;
|
|
3423
|
+
/**
|
|
3424
|
+
* FIFO of waiters blocked on remote window credit. Each WINDOW_ADJUST wakes
|
|
3425
|
+
* exactly one waiter; concurrent senders must not lose wakeups.
|
|
3426
|
+
*/
|
|
3427
|
+
private readonly outboundDrainedWaiters;
|
|
3428
|
+
/** Serializes sendData() calls so byte order on the wire matches call order. */
|
|
3429
|
+
private sendChain;
|
|
3430
|
+
private readonly localChannelId;
|
|
3431
|
+
constructor(transport: SshTransportConnection, options?: SshSessionChannelOptions);
|
|
3432
|
+
/**
|
|
3433
|
+
* Opens the channel and requests a subsystem.
|
|
3434
|
+
* Resolves once the server confirms both CHANNEL_OPEN and the subsystem request.
|
|
3435
|
+
*/
|
|
3436
|
+
openSubsystem(subsystemName: string): Promise<void>;
|
|
3437
|
+
/**
|
|
3438
|
+
* Opens the channel and executes a command.
|
|
3439
|
+
*/
|
|
3440
|
+
openExec(command: string): Promise<void>;
|
|
3441
|
+
private openChannel;
|
|
3442
|
+
private requestSubsystem;
|
|
3443
|
+
private requestExec;
|
|
3444
|
+
private awaitChannelRequestReply;
|
|
3445
|
+
/**
|
|
3446
|
+
* Sends data on the channel. Respects the remote window; if there is no space,
|
|
3447
|
+
* splits the data and queues the remainder for when WINDOW_ADJUST arrives.
|
|
3448
|
+
*
|
|
3449
|
+
* Concurrent calls are serialized so wire byte order matches call order.
|
|
3450
|
+
*/
|
|
3451
|
+
sendData(data: Uint8Array): Promise<void>;
|
|
3452
|
+
private sendDataLocked;
|
|
3453
|
+
/**
|
|
3454
|
+
* Async generator that yields raw data buffers from the channel.
|
|
3455
|
+
* Returns (done) when the channel receives EOF or CLOSE.
|
|
3456
|
+
*/
|
|
3457
|
+
receiveData(): AsyncGenerator<Buffer, void, undefined>;
|
|
3458
|
+
/**
|
|
3459
|
+
* Sends EOF and CLOSE. Should be called when the client is done sending.
|
|
3460
|
+
*/
|
|
3461
|
+
close(): void;
|
|
3462
|
+
/**
|
|
3463
|
+
* Feed an inbound transport payload to this channel.
|
|
3464
|
+
* Called by the channel multiplexer (`SshConnectionManager`).
|
|
3465
|
+
*/
|
|
3466
|
+
dispatch(payload: Buffer): void;
|
|
3467
|
+
dispatchError(error: Error): void;
|
|
3468
|
+
private consumeLocalWindow;
|
|
3469
|
+
private enqueueInbound;
|
|
3470
|
+
private dequeueInbound;
|
|
3471
|
+
/** Pull the next payload from the transport (used during channel setup only). */
|
|
3472
|
+
private nextPayload;
|
|
3473
|
+
}
|
|
3474
|
+
|
|
3475
|
+
/**
|
|
3476
|
+
* SFTP v3 file attribute encoding and decoding (draft-ietf-secsh-filexfer-02 §5).
|
|
3477
|
+
*
|
|
3478
|
+
* ATTRS flags:
|
|
3479
|
+
* SSH_FILEXFER_ATTR_SIZE 0x00000001
|
|
3480
|
+
* SSH_FILEXFER_ATTR_UIDGID 0x00000002
|
|
3481
|
+
* SSH_FILEXFER_ATTR_PERMISSIONS 0x00000004
|
|
3482
|
+
* SSH_FILEXFER_ATTR_ACMODTIME 0x00000008
|
|
3483
|
+
* SSH_FILEXFER_ATTR_EXTENDED 0x80000000
|
|
3484
|
+
*/
|
|
3485
|
+
|
|
3486
|
+
interface SftpFileAttributes {
|
|
3487
|
+
/** File size in bytes. Present when SFTP_ATTR_FLAG.SIZE is set. */
|
|
3488
|
+
size?: bigint;
|
|
3489
|
+
/** User id. Present when SFTP_ATTR_FLAG.UIDGID is set. */
|
|
3490
|
+
uid?: number;
|
|
3491
|
+
/** Group id. Present when SFTP_ATTR_FLAG.UIDGID is set. */
|
|
3492
|
+
gid?: number;
|
|
3493
|
+
/** POSIX file permissions (octal mode). Present when SFTP_ATTR_FLAG.PERMISSIONS is set. */
|
|
3494
|
+
permissions?: number;
|
|
3495
|
+
/** Access time (seconds since Unix epoch). Present when SFTP_ATTR_FLAG.ACMODTIME is set. */
|
|
3496
|
+
atime?: number;
|
|
3497
|
+
/** Modification time (seconds since Unix epoch). Present when SFTP_ATTR_FLAG.ACMODTIME is set. */
|
|
3498
|
+
mtime?: number;
|
|
3499
|
+
/**
|
|
3500
|
+
* Extended attributes as key-value pairs.
|
|
3501
|
+
* Present when SFTP_ATTR_FLAG.EXTENDED is set.
|
|
3502
|
+
*/
|
|
3503
|
+
extended?: Array<{
|
|
3504
|
+
type: string;
|
|
3505
|
+
data: Buffer;
|
|
3506
|
+
}>;
|
|
3507
|
+
}
|
|
3508
|
+
|
|
3509
|
+
/**
|
|
3510
|
+
* SFTP v3 request and response message codecs (draft-ietf-secsh-filexfer-02).
|
|
3511
|
+
*
|
|
3512
|
+
* Each encode function produces the payload bytes that go inside an
|
|
3513
|
+
* SSH_FXP_* packet (the type byte and length prefix are added by the framer).
|
|
3514
|
+
*
|
|
3515
|
+
* Each decode function accepts the full framed packet payload (starting at the
|
|
3516
|
+
* byte immediately after the type byte, i.e. at request-id).
|
|
3517
|
+
*/
|
|
3518
|
+
|
|
3519
|
+
interface SftpVersionResponse {
|
|
3520
|
+
version: number;
|
|
3521
|
+
extensions: Array<{
|
|
3522
|
+
name: string;
|
|
3523
|
+
data: string;
|
|
3524
|
+
}>;
|
|
3525
|
+
}
|
|
3526
|
+
/** A single entry returned by SSH_FXP_NAME. */
|
|
3527
|
+
interface SftpNameEntry {
|
|
3528
|
+
filename: string;
|
|
3529
|
+
longname: string;
|
|
3530
|
+
attrs: SftpFileAttributes;
|
|
3531
|
+
}
|
|
3532
|
+
|
|
3533
|
+
/**
|
|
3534
|
+
* SFTP v3 client session (draft-ietf-secsh-filexfer-02).
|
|
3535
|
+
*
|
|
3536
|
+
* Provides a fully concurrent, typed API over an open SSH session channel.
|
|
3537
|
+
* Multiple requests can be in flight simultaneously; each is tracked by its
|
|
3538
|
+
* SFTP request id. Responses are dispatched to the correct awaiter.
|
|
3539
|
+
*
|
|
3540
|
+
* Lifecycle:
|
|
3541
|
+
* const channel = await connectionManager.openSubsystemChannel("sftp");
|
|
3542
|
+
* const sftp = new SftpSession(channel);
|
|
3543
|
+
* await sftp.init();
|
|
3544
|
+
* const handle = await sftp.open("/path/to/file", SFTP_OPEN_FLAG.READ, {});
|
|
3545
|
+
* const data = await sftp.read(handle, 0n, 4096);
|
|
3546
|
+
* await sftp.close(handle);
|
|
3547
|
+
*/
|
|
3548
|
+
|
|
3549
|
+
declare class SftpSession {
|
|
3550
|
+
private readonly channel;
|
|
3551
|
+
private nextRequestId;
|
|
3552
|
+
private readonly pending;
|
|
3553
|
+
private readonly framer;
|
|
3554
|
+
/** Resolves on the first packet (VERSION) during init(). */
|
|
3555
|
+
private versionWaiter;
|
|
3556
|
+
private serverVersion;
|
|
3557
|
+
constructor(channel: SshSessionChannel);
|
|
3558
|
+
/**
|
|
3559
|
+
* Sends SSH_FXP_INIT and awaits SSH_FXP_VERSION.
|
|
3560
|
+
* Must be called once before any other operation.
|
|
3561
|
+
*/
|
|
3562
|
+
init(): Promise<SftpVersionResponse>;
|
|
3563
|
+
get negotiatedVersion(): number;
|
|
3564
|
+
/**
|
|
3565
|
+
* Opens a remote file. Returns an opaque handle buffer.
|
|
3566
|
+
*/
|
|
3567
|
+
open(path: string, pflags: number, attrs?: SftpFileAttributes): Promise<Buffer>;
|
|
3568
|
+
/**
|
|
3569
|
+
* Closes a file or directory handle.
|
|
3570
|
+
*/
|
|
3571
|
+
close(handle: Uint8Array): Promise<void>;
|
|
3572
|
+
/**
|
|
3573
|
+
* Reads up to `length` bytes from `handle` at `offset`.
|
|
3574
|
+
* Returns `null` on EOF.
|
|
3575
|
+
*/
|
|
3576
|
+
read(handle: Uint8Array, offset: bigint, length: number): Promise<Buffer | null>;
|
|
3577
|
+
/**
|
|
3578
|
+
* Writes `data` to `handle` at `offset`.
|
|
3579
|
+
*/
|
|
3580
|
+
write(handle: Uint8Array, offset: bigint, data: Uint8Array): Promise<void>;
|
|
3581
|
+
stat(path: string): Promise<SftpFileAttributes>;
|
|
3582
|
+
lstat(path: string): Promise<SftpFileAttributes>;
|
|
3583
|
+
fstat(handle: Uint8Array): Promise<SftpFileAttributes>;
|
|
3584
|
+
setstat(path: string, attrs: SftpFileAttributes): Promise<void>;
|
|
3585
|
+
fsetstat(handle: Uint8Array, attrs: SftpFileAttributes): Promise<void>;
|
|
3586
|
+
opendir(path: string): Promise<Buffer>;
|
|
3587
|
+
/**
|
|
3588
|
+
* Reads one batch of directory entries.
|
|
3589
|
+
* Returns an empty array when the server sends SSH_FX_EOF.
|
|
3590
|
+
*/
|
|
3591
|
+
readdir(handle: Uint8Array): Promise<SftpNameEntry[]>;
|
|
3592
|
+
/**
|
|
3593
|
+
* Convenience: opens a directory, reads all entries, and closes the handle.
|
|
3594
|
+
*/
|
|
3595
|
+
readdirAll(path: string): Promise<SftpNameEntry[]>;
|
|
3596
|
+
remove(path: string): Promise<void>;
|
|
3597
|
+
mkdir(path: string, attrs?: SftpFileAttributes): Promise<void>;
|
|
3598
|
+
rmdir(path: string): Promise<void>;
|
|
3599
|
+
realpath(path: string): Promise<string>;
|
|
3600
|
+
rename(oldPath: string, newPath: string): Promise<void>;
|
|
3601
|
+
readlink(path: string): Promise<string>;
|
|
3602
|
+
symlink(linkPath: string, targetPath: string): Promise<void>;
|
|
3603
|
+
private allocRequestId;
|
|
3604
|
+
/**
|
|
3605
|
+
* Sends raw SFTP message bytes over the channel.
|
|
3606
|
+
* The message encoders embed the type byte at position 0, followed by the body.
|
|
3607
|
+
* We prefix with a uint32 length so the remote SFTP framer can parse the frame.
|
|
3608
|
+
*
|
|
3609
|
+
* Send is asynchronous because the underlying SSH channel may apply
|
|
3610
|
+
* backpressure when the remote window is exhausted; the channel itself
|
|
3611
|
+
* serializes concurrent calls so byte ordering is preserved.
|
|
3612
|
+
*/
|
|
3613
|
+
private sendRaw;
|
|
3614
|
+
private pump;
|
|
3615
|
+
private dispatchPacket;
|
|
3616
|
+
private awaitResponse;
|
|
3617
|
+
}
|
|
3618
|
+
|
|
3619
|
+
/**
|
|
3620
|
+
* Options for {@link createNativeSftpProviderFactory}.
|
|
3621
|
+
*
|
|
3622
|
+
* The native provider is a zero-dependency replacement for the legacy
|
|
3623
|
+
* `ssh2`-backed provider. It implements RFC 4253 SSH transport, RFC 4252 user
|
|
3624
|
+
* authentication (`password`, `keyboard-interactive`, `publickey` with
|
|
3625
|
+
* Ed25519/RSA), RFC 5656 ECDSA host keys (`nistp256/384/521`), and the
|
|
3626
|
+
* SFTP v3 client protocol multiplexed over a single channel.
|
|
3627
|
+
*/
|
|
3628
|
+
interface NativeSftpProviderOptions {
|
|
3629
|
+
/**
|
|
3630
|
+
* Default connection timeout in milliseconds when the profile omits
|
|
3631
|
+
* `timeoutMs`. Bounds both the TCP connect *and* the SSH identification +
|
|
3632
|
+
* key-exchange handshake, so a hung server cannot stall `connect()`
|
|
3633
|
+
* indefinitely after the socket is accepted.
|
|
3634
|
+
*/
|
|
3635
|
+
readyTimeoutMs?: number;
|
|
3636
|
+
/**
|
|
3637
|
+
* Default interval (milliseconds) between SSH-level keepalive pings sent
|
|
3638
|
+
* once the transport is connected and idle. Prevents stateful firewalls /
|
|
3639
|
+
* NAT devices from dropping long-lived sessions. The timer is reset on
|
|
3640
|
+
* every outbound payload so active transfers do not generate extra
|
|
3641
|
+
* traffic. Disabled when omitted or `0`.
|
|
3642
|
+
*/
|
|
3643
|
+
keepaliveIntervalMs?: number;
|
|
3644
|
+
}
|
|
3645
|
+
/**
|
|
3646
|
+
* Low-level handles exposed by a native SFTP session for diagnostics and
|
|
3647
|
+
* advanced extension. Most applications should use the
|
|
3648
|
+
* {@link TransferSession} returned from `client.connect()` instead.
|
|
3649
|
+
*/
|
|
3650
|
+
interface NativeSftpRawSession {
|
|
3651
|
+
/** SFTP v3 client multiplexed over the SSH session channel. */
|
|
3652
|
+
sftp: SftpSession;
|
|
3653
|
+
/** Underlying SSH transport (key exchange, packet protection, channel mux). */
|
|
3654
|
+
transport: SshTransportConnection;
|
|
3655
|
+
}
|
|
3656
|
+
/**
|
|
3657
|
+
* Creates a {@link ProviderFactory} backed by the native SSH/SFTP protocol
|
|
3658
|
+
* stack — no `ssh2` dependency required.
|
|
3659
|
+
*
|
|
3660
|
+
* **Supported algorithms**
|
|
3661
|
+
* - Key exchange: `curve25519-sha256`, `curve25519-sha256@libssh.org`
|
|
3662
|
+
* - Host keys: `ssh-ed25519`, `ecdsa-sha2-nistp256/384/521`, `rsa-sha2-256`,
|
|
3663
|
+
* `rsa-sha2-512` (legacy SHA-1 `ssh-rsa` is rejected)
|
|
3664
|
+
* - Ciphers: `aes128-ctr`, `aes256-ctr`
|
|
3665
|
+
* - MACs: `hmac-sha2-256`, `hmac-sha2-512`
|
|
3666
|
+
*
|
|
3667
|
+
* **Authentication**
|
|
3668
|
+
* - `password`
|
|
3669
|
+
* - `keyboard-interactive` (RFC 4256)
|
|
3670
|
+
* - `publickey` for Ed25519 and RSA private keys (`rsa-sha2-512` preferred,
|
|
3671
|
+
* `rsa-sha2-256` fallback). Encrypted keys are unlocked via
|
|
3672
|
+
* `profile.ssh.passphrase`.
|
|
3673
|
+
*
|
|
3674
|
+
* **Host-key verification**
|
|
3675
|
+
* - The server's signature over the exchange hash is always verified.
|
|
3676
|
+
* - Optional pinning via `profile.ssh.pinnedHostKeySha256` (`SHA256:...`,
|
|
3677
|
+
* raw base64, or hex).
|
|
3678
|
+
* - Optional `profile.ssh.knownHosts` (OpenSSH format, hashed and plain
|
|
3679
|
+
* patterns, `[host]:port`, negation, and `@revoked` markers).
|
|
3680
|
+
*
|
|
3681
|
+
* **Resilience**
|
|
3682
|
+
* - `readyTimeoutMs` bounds TCP connect + SSH handshake.
|
|
3683
|
+
* - `keepaliveIntervalMs` keeps idle sessions alive through stateful
|
|
3684
|
+
* firewalls / NAT.
|
|
3685
|
+
*
|
|
3686
|
+
* @example
|
|
3687
|
+
* ```ts
|
|
3688
|
+
* const client = createTransferClient({
|
|
3689
|
+
* providers: [createNativeSftpProviderFactory({
|
|
3690
|
+
* readyTimeoutMs: 10_000,
|
|
3691
|
+
* keepaliveIntervalMs: 30_000,
|
|
3692
|
+
* })],
|
|
3693
|
+
* });
|
|
3222
3694
|
* const session = await client.connect({
|
|
3223
|
-
* host: "sftp.example.com",
|
|
3224
3695
|
* provider: "sftp",
|
|
3696
|
+
* host: "sftp.example.com",
|
|
3225
3697
|
* username: "deploy",
|
|
3226
3698
|
* ssh: {
|
|
3227
|
-
* privateKey: {
|
|
3228
|
-
*
|
|
3229
|
-
* pinnedHostKeySha256: "SHA256:abc123basesixfourpinFromKnownHosts=",
|
|
3699
|
+
* privateKey: { kind: "literal", value: process.env.DEPLOY_KEY! },
|
|
3700
|
+
* pinnedHostKeySha256: "SHA256:abc...",
|
|
3230
3701
|
* },
|
|
3231
3702
|
* });
|
|
3232
3703
|
* ```
|
|
3233
|
-
*
|
|
3234
|
-
* Host-key verification (`ssh.knownHosts` and/or `ssh.pinnedHostKeySha256`) is
|
|
3235
|
-
* optional; without either, the client trusts whatever host key the server
|
|
3236
|
-
* presents. Use one for any non-lab deployment.
|
|
3237
|
-
*/
|
|
3238
|
-
declare function createSftpProviderFactory(options?: SftpProviderOptions): ProviderFactory;
|
|
3239
|
-
|
|
3240
|
-
/** Options for {@link createSftpJumpHostSocketFactory}. */
|
|
3241
|
-
interface SftpJumpHostOptions {
|
|
3242
|
-
/** Static ssh2 connect configuration for the bastion. Mutually exclusive with {@link buildBastion}. */
|
|
3243
|
-
bastion?: ConnectConfig;
|
|
3244
|
-
/** Per-connection builder used to refresh credentials before each tunnel attempt. */
|
|
3245
|
-
buildBastion?: (context: SshSocketFactoryContext) => ConnectConfig | Promise<ConnectConfig>;
|
|
3246
|
-
/** Optional logger used for tunnel diagnostics. */
|
|
3247
|
-
logger?: ZeroTransferLogger;
|
|
3248
|
-
/** Optional ssh2 client factory override used in tests. */
|
|
3249
|
-
createClient?: () => Client;
|
|
3250
|
-
}
|
|
3251
|
-
/**
|
|
3252
|
-
* Builds an {@link SshSocketFactory} that tunnels SFTP connections through a bastion host.
|
|
3253
|
-
*
|
|
3254
|
-
* @param options - Bastion configuration and overrides.
|
|
3255
|
-
* @returns Factory that returns a forwarded ssh2 channel stream when invoked.
|
|
3256
|
-
* @throws {@link ConfigurationError} When neither {@link SftpJumpHostOptions.bastion} nor {@link SftpJumpHostOptions.buildBastion} is supplied.
|
|
3257
3704
|
*/
|
|
3258
|
-
declare function
|
|
3705
|
+
declare function createNativeSftpProviderFactory(options?: NativeSftpProviderOptions): ProviderFactory;
|
|
3259
3706
|
|
|
3260
|
-
export { AbortError, type AtomicDeployActivateOperation, type AtomicDeployActivateStep, type AtomicDeployPlan, type AtomicDeployPruneStep, type AtomicDeployStrategy, type AuthenticationCapability, AuthenticationError, AuthorizationError, type BandwidthSleep, type BandwidthThrottle, type BandwidthThrottleOptions, type Base64EnvSecretSource, type BuiltInProviderId,
|
|
3707
|
+
export { AbortError, type AtomicDeployActivateOperation, type AtomicDeployActivateStep, type AtomicDeployPlan, type AtomicDeployPruneStep, type AtomicDeployStrategy, type AuthenticationCapability, AuthenticationError, AuthorizationError, type BandwidthSleep, type BandwidthThrottle, type BandwidthThrottleOptions, type Base64EnvSecretSource, type BuiltInProviderId, CLASSIC_PROVIDER_IDS, type CapabilitySet, type ChecksumCapability, type ClassicProviderId, type ClientDiagnostics, type CompareRemoteManifestsOptions, ConfigurationError, type ConnectionDiagnosticTimings, type ConnectionDiagnosticsResult, ConnectionError, type ConnectionProfile, type CopyBetweenOptions, type CreateAtomicDeployPlanOptions, type CreateRemoteBrowserOptions, type CreateRemoteManifestOptions, type CreateSyncPlanOptions, type DiffRemoteTreesOptions, type DownloadFileOptions, type EnvSecretSource, type FileSecretSource, type FileZillaSite, type FriendlyTransferOptions, type FtpReplyErrorInput, type ImportFileZillaSitesResult, type ImportOpenSshConfigOptions, type ImportOpenSshConfigResult, type ImportWinScpSessionsResult, type KnownHostsEntry, type KnownHostsMarker, type ListOptions, type LocalProviderOptions, type LogLevel, type LogRecord, type LogRecordInput, type LoggerMethod, type MemoryProviderEntry, type MemoryProviderOptions, type MetadataCapability, type MkdirOptions, type NativeSftpProviderOptions, type NativeSftpRawSession, type OAuthAccessToken, type OAuthRefreshCallback, type OAuthTokenSecretSourceOptions, type OpenSshConfigEntry, ParseError, PathAlreadyExistsError, PathNotFoundError, PermissionDeniedError, type ProgressEventInput, ProtocolError, type AuthenticationCapability as ProviderAuthenticationCapability, type CapabilitySet as ProviderCapabilities, type ChecksumCapability as ProviderChecksumCapability, type ProviderFactory, type ProviderId, type MetadataCapability as ProviderMetadataCapability, ProviderRegistry, type ProviderSelection, type ProviderTransferEndpointRole, type ProviderTransferExecutorOptions, type ProviderTransferOperations, type ProviderTransferReadRequest, type ProviderTransferReadResult, type ProviderTransferRequest, type ProviderTransferSessionResolver, type ProviderTransferSessionResolverInput, type ProviderTransferWriteRequest, type ProviderTransferWriteResult, REDACTED, REMOTE_MANIFEST_FORMAT_VERSION, type RemoteBreadcrumb, type RemoteBrowser, type RemoteBrowserFilter, type RemoteBrowserSnapshot, type RemoteEntry, type RemoteEntrySortKey, type RemoteEntrySortOrder, type RemoteEntryType, type RemoteFileAdapter, type RemoteFileEndpoint, type RemoteFileSystem, type RemoteManifest, type RemoteManifestEntry, type RemotePermissions, type RemoteProtocol, type RemoteStat, type RemoteTreeDiff, type RemoteTreeDiffEntry, type RemoteTreeDiffReason, type RemoteTreeDiffStatus, type RemoteTreeDiffSummary, type RemoteTreeEntry, type RemoteTreeFilter, type RemoveOptions, type RenameOptions, type ResolveSecretOptions, type ResolvedConnectionProfile, type ResolvedOpenSshHost, type ResolvedSshProfile, type ResolvedTlsProfile, type RmdirOptions, type RunConnectionDiagnosticsOptions, type SecretProvider, type SecretSource, type SecretValue, type NativeSftpProviderOptions as SftpProviderOptions, type NativeSftpRawSession as SftpRawSession, type SpecializedErrorDetails, type SshAgentSource, type SshAlgorithms, type SshKeyboardInteractiveChallenge, type SshKeyboardInteractiveHandler, type SshKeyboardInteractivePrompt, type SshKnownHostsSource, type SshProfile, type SshSocketFactory, type SshSocketFactoryContext, type StatOptions, type SyncConflictPolicy, type SyncDeletePolicy, type SyncDirection, type SyncEndpointInput, TimeoutError, type TlsProfile, type TlsSecretSource, type TransferAttempt, type TransferAttemptError, type TransferBandwidthLimit, type TransferByteRange, TransferClient, type TransferClientOptions, type TransferDataChunk, type TransferDataSource, type TransferEndpoint, TransferEngine, type TransferEngineExecuteOptions, type TransferEngineOptions, TransferError, type TransferExecutionContext, type TransferExecutionResult, type TransferExecutor, type TransferJob, type TransferOperation, type TransferPlan, type TransferPlanAction, type TransferPlanInput, type TransferPlanStep, type TransferPlanSummary, type TransferProgressEvent, type TransferProvider, TransferQueue, type TransferQueueExecutorResolver, type TransferQueueItem, type TransferQueueItemStatus, type TransferQueueOptions, type TransferQueueRunOptions, type TransferQueueSummary, type TransferReceipt, type TransferResult, type TransferResultInput, type TransferRetryDecisionInput, type TransferRetryPolicy, type TransferSession, type TransferTimeoutPolicy, type TransferVerificationResult, UnsupportedFeatureError, type UploadFileOptions, type ValueSecretSource, VerificationError, type WalkRemoteTreeOptions, type WinScpSession, ZeroTransfer, type ZeroTransferCapabilities, ZeroTransferError, type ZeroTransferErrorDetails, type ZeroTransferLogger, type ZeroTransferOptions, assertSafeFtpArgument, basenameRemotePath, buildRemoteBreadcrumbs, compareRemoteManifests, copyBetween, createAtomicDeployPlan, createBandwidthThrottle, createLocalProviderFactory, createMemoryProviderFactory, createNativeSftpProviderFactory, createOAuthTokenSecretSource, createProgressEvent, createProviderTransferExecutor, createRemoteBrowser, createRemoteManifest, createNativeSftpProviderFactory as createSftpProviderFactory, createSyncPlan, createTransferClient, createTransferJobsFromPlan, createTransferPlan, createTransferResult, diffRemoteTrees, downloadFile, emitLog, errorFromFtpReply, filterRemoteEntries, importFileZillaSites, importOpenSshConfig, importWinScpSessions, isClassicProviderId, isSensitiveKey, joinRemotePath, matchKnownHosts, matchKnownHostsEntry, noopLogger, normalizeRemotePath, parentRemotePath, parseKnownHosts, parseOpenSshConfig, parseRemoteManifest, redactCommand, redactConnectionProfile, redactObject, redactSecretSource, redactValue, resolveConnectionProfileSecrets, resolveOpenSshHost, resolveProviderId, resolveSecret, runConnectionDiagnostics, serializeRemoteManifest, sortRemoteEntries, summarizeClientDiagnostics, summarizeTransferPlan, throttleByteIterable, uploadFile, validateConnectionProfile, walkRemoteTree };
|