@zero-transfer/sftp 0.4.2 → 0.4.6
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 +15 -7
- package/dist/index.cjs +23 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.mjs +22 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -2
package/dist/index.d.mts
CHANGED
|
@@ -395,7 +395,7 @@ interface TlsProfile {
|
|
|
395
395
|
* hex form with or without colons. When present, the TLS handshake additionally requires the
|
|
396
396
|
* leaf certificate's SHA-256 fingerprint to match one of these values.
|
|
397
397
|
*
|
|
398
|
-
* Not required for normal CA-trusted endpoints
|
|
398
|
+
* Not required for normal CA-trusted endpoints - public CAs and `ca` bundles already gate
|
|
399
399
|
* trust via `rejectUnauthorized`. Pinning is **recommended for production** when you control
|
|
400
400
|
* the server and want defence-in-depth against rogue certificates issued by trusted CAs.
|
|
401
401
|
*
|
|
@@ -1723,7 +1723,7 @@ interface ConnectionPoolOptions {
|
|
|
1723
1723
|
/**
|
|
1724
1724
|
* Maximum number of *idle* sessions retained per pool key.
|
|
1725
1725
|
*
|
|
1726
|
-
* Active leases are not counted against this limit
|
|
1726
|
+
* Active leases are not counted against this limit - the cap only applies
|
|
1727
1727
|
* to sessions waiting in the pool. When more than `maxIdlePerKey` sessions
|
|
1728
1728
|
* become idle simultaneously, the oldest ones are disconnected. Defaults
|
|
1729
1729
|
* to `4`.
|
|
@@ -3003,7 +3003,7 @@ interface DiffRemoteTreesOptions {
|
|
|
3003
3003
|
* Compares two remote subtrees and produces an entry-level diff.
|
|
3004
3004
|
*
|
|
3005
3005
|
* Source and destination paths are walked independently; entries are then aligned by
|
|
3006
|
-
* the relative path from each tree root. Directory equality is structural
|
|
3006
|
+
* the relative path from each tree root. Directory equality is structural - directories
|
|
3007
3007
|
* are equal when their relative paths match and the entry types agree.
|
|
3008
3008
|
*
|
|
3009
3009
|
* @param source - Source-side remote file system.
|
|
@@ -3248,7 +3248,7 @@ interface CreateAtomicDeployPlanOptions {
|
|
|
3248
3248
|
* 2. Atomically swap the `current` symlink/rename to point at the new release.
|
|
3249
3249
|
* 3. Optionally prune old releases beyond `retain`.
|
|
3250
3250
|
*
|
|
3251
|
-
* No I/O is performed
|
|
3251
|
+
* No I/O is performed - the host executes the plan steps. Pair with
|
|
3252
3252
|
* {@link createTransferPlan} or {@link createTransferJobsFromPlan} to execute.
|
|
3253
3253
|
*
|
|
3254
3254
|
* @param options - Inputs and policies that shape the deploy.
|
|
@@ -3468,6 +3468,12 @@ declare function joinRemotePath(...segments: string[]): string;
|
|
|
3468
3468
|
*/
|
|
3469
3469
|
declare function basenameRemotePath(input: string): string;
|
|
3470
3470
|
|
|
3471
|
+
/**
|
|
3472
|
+
* Returns `true` when the file containing `import.meta.url` is the entry point
|
|
3473
|
+
* of the current Node.js process. Returns `false` outside Node.
|
|
3474
|
+
*/
|
|
3475
|
+
declare function isMainModule(importMetaUrl: string): boolean;
|
|
3476
|
+
|
|
3471
3477
|
/** Algorithm lists exchanged during SSH KEXINIT negotiation. */
|
|
3472
3478
|
interface SshAlgorithmPreferences {
|
|
3473
3479
|
compressionClientToServer: readonly string[];
|
|
@@ -3965,7 +3971,7 @@ interface NativeSftpRawSession {
|
|
|
3965
3971
|
}
|
|
3966
3972
|
/**
|
|
3967
3973
|
* Creates a {@link ProviderFactory} backed by the native SSH/SFTP protocol
|
|
3968
|
-
* stack
|
|
3974
|
+
* stack - no `ssh2` dependency required.
|
|
3969
3975
|
*
|
|
3970
3976
|
* **Supported algorithms**
|
|
3971
3977
|
* - Key exchange: `curve25519-sha256`, `curve25519-sha256@libssh.org`
|
|
@@ -4014,4 +4020,4 @@ interface NativeSftpRawSession {
|
|
|
4014
4020
|
*/
|
|
4015
4021
|
declare function createNativeSftpProviderFactory(options?: NativeSftpProviderOptions): ProviderFactory;
|
|
4016
4022
|
|
|
4017
|
-
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 ConnectionPoolOptions, 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 PooledTransferClient, 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, createPooledTransferClient, 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 };
|
|
4023
|
+
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 ConnectionPoolOptions, 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 PooledTransferClient, 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, createPooledTransferClient, createProgressEvent, createProviderTransferExecutor, createRemoteBrowser, createRemoteManifest, createNativeSftpProviderFactory as createSftpProviderFactory, createSyncPlan, createTransferClient, createTransferJobsFromPlan, createTransferPlan, createTransferResult, diffRemoteTrees, downloadFile, emitLog, errorFromFtpReply, filterRemoteEntries, importFileZillaSites, importOpenSshConfig, importWinScpSessions, isClassicProviderId, isMainModule, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -395,7 +395,7 @@ interface TlsProfile {
|
|
|
395
395
|
* hex form with or without colons. When present, the TLS handshake additionally requires the
|
|
396
396
|
* leaf certificate's SHA-256 fingerprint to match one of these values.
|
|
397
397
|
*
|
|
398
|
-
* Not required for normal CA-trusted endpoints
|
|
398
|
+
* Not required for normal CA-trusted endpoints - public CAs and `ca` bundles already gate
|
|
399
399
|
* trust via `rejectUnauthorized`. Pinning is **recommended for production** when you control
|
|
400
400
|
* the server and want defence-in-depth against rogue certificates issued by trusted CAs.
|
|
401
401
|
*
|
|
@@ -1723,7 +1723,7 @@ interface ConnectionPoolOptions {
|
|
|
1723
1723
|
/**
|
|
1724
1724
|
* Maximum number of *idle* sessions retained per pool key.
|
|
1725
1725
|
*
|
|
1726
|
-
* Active leases are not counted against this limit
|
|
1726
|
+
* Active leases are not counted against this limit - the cap only applies
|
|
1727
1727
|
* to sessions waiting in the pool. When more than `maxIdlePerKey` sessions
|
|
1728
1728
|
* become idle simultaneously, the oldest ones are disconnected. Defaults
|
|
1729
1729
|
* to `4`.
|
|
@@ -3003,7 +3003,7 @@ interface DiffRemoteTreesOptions {
|
|
|
3003
3003
|
* Compares two remote subtrees and produces an entry-level diff.
|
|
3004
3004
|
*
|
|
3005
3005
|
* Source and destination paths are walked independently; entries are then aligned by
|
|
3006
|
-
* the relative path from each tree root. Directory equality is structural
|
|
3006
|
+
* the relative path from each tree root. Directory equality is structural - directories
|
|
3007
3007
|
* are equal when their relative paths match and the entry types agree.
|
|
3008
3008
|
*
|
|
3009
3009
|
* @param source - Source-side remote file system.
|
|
@@ -3248,7 +3248,7 @@ interface CreateAtomicDeployPlanOptions {
|
|
|
3248
3248
|
* 2. Atomically swap the `current` symlink/rename to point at the new release.
|
|
3249
3249
|
* 3. Optionally prune old releases beyond `retain`.
|
|
3250
3250
|
*
|
|
3251
|
-
* No I/O is performed
|
|
3251
|
+
* No I/O is performed - the host executes the plan steps. Pair with
|
|
3252
3252
|
* {@link createTransferPlan} or {@link createTransferJobsFromPlan} to execute.
|
|
3253
3253
|
*
|
|
3254
3254
|
* @param options - Inputs and policies that shape the deploy.
|
|
@@ -3468,6 +3468,12 @@ declare function joinRemotePath(...segments: string[]): string;
|
|
|
3468
3468
|
*/
|
|
3469
3469
|
declare function basenameRemotePath(input: string): string;
|
|
3470
3470
|
|
|
3471
|
+
/**
|
|
3472
|
+
* Returns `true` when the file containing `import.meta.url` is the entry point
|
|
3473
|
+
* of the current Node.js process. Returns `false` outside Node.
|
|
3474
|
+
*/
|
|
3475
|
+
declare function isMainModule(importMetaUrl: string): boolean;
|
|
3476
|
+
|
|
3471
3477
|
/** Algorithm lists exchanged during SSH KEXINIT negotiation. */
|
|
3472
3478
|
interface SshAlgorithmPreferences {
|
|
3473
3479
|
compressionClientToServer: readonly string[];
|
|
@@ -3965,7 +3971,7 @@ interface NativeSftpRawSession {
|
|
|
3965
3971
|
}
|
|
3966
3972
|
/**
|
|
3967
3973
|
* Creates a {@link ProviderFactory} backed by the native SSH/SFTP protocol
|
|
3968
|
-
* stack
|
|
3974
|
+
* stack - no `ssh2` dependency required.
|
|
3969
3975
|
*
|
|
3970
3976
|
* **Supported algorithms**
|
|
3971
3977
|
* - Key exchange: `curve25519-sha256`, `curve25519-sha256@libssh.org`
|
|
@@ -4014,4 +4020,4 @@ interface NativeSftpRawSession {
|
|
|
4014
4020
|
*/
|
|
4015
4021
|
declare function createNativeSftpProviderFactory(options?: NativeSftpProviderOptions): ProviderFactory;
|
|
4016
4022
|
|
|
4017
|
-
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 ConnectionPoolOptions, 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 PooledTransferClient, 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, createPooledTransferClient, 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 };
|
|
4023
|
+
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 ConnectionPoolOptions, 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 PooledTransferClient, 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, createPooledTransferClient, createProgressEvent, createProviderTransferExecutor, createRemoteBrowser, createRemoteManifest, createNativeSftpProviderFactory as createSftpProviderFactory, createSyncPlan, createTransferClient, createTransferJobsFromPlan, createTransferPlan, createTransferResult, diffRemoteTrees, downloadFile, emitLog, errorFromFtpReply, filterRemoteEntries, importFileZillaSites, importOpenSshConfig, importWinScpSessions, isClassicProviderId, isMainModule, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -4785,6 +4785,19 @@ function isModifiedAtDifferent2(source, destination, toleranceMs) {
|
|
|
4785
4785
|
return Math.abs(sourceTime - destinationTime) > toleranceMs;
|
|
4786
4786
|
}
|
|
4787
4787
|
|
|
4788
|
+
// src/utils/mainModule.ts
|
|
4789
|
+
import { fileURLToPath } from "url";
|
|
4790
|
+
function isMainModule(importMetaUrl) {
|
|
4791
|
+
if (typeof process === "undefined" || !process.argv || process.argv.length < 2) {
|
|
4792
|
+
return false;
|
|
4793
|
+
}
|
|
4794
|
+
try {
|
|
4795
|
+
return process.argv[1] === fileURLToPath(importMetaUrl);
|
|
4796
|
+
} catch {
|
|
4797
|
+
return false;
|
|
4798
|
+
}
|
|
4799
|
+
}
|
|
4800
|
+
|
|
4788
4801
|
// src/providers/native/sftp/NativeSftpProvider.ts
|
|
4789
4802
|
import { Buffer as Buffer21 } from "buffer";
|
|
4790
4803
|
import { createHash as createHash3, createPrivateKey } from "crypto";
|
|
@@ -7070,7 +7083,7 @@ var SshTransportPacketUnprotector = class {
|
|
|
7070
7083
|
}
|
|
7071
7084
|
/**
|
|
7072
7085
|
* Feeds raw encrypted bytes from the socket and returns any fully decoded payloads.
|
|
7073
|
-
* Maintains internal framing state across calls
|
|
7086
|
+
* Maintains internal framing state across calls - pass each `data` event chunk directly.
|
|
7074
7087
|
*/
|
|
7075
7088
|
pushBytes(chunk) {
|
|
7076
7089
|
this.framePendingRaw = Buffer17.concat([this.framePendingRaw, chunk]);
|
|
@@ -7578,7 +7591,7 @@ var SshTransportConnection = class {
|
|
|
7578
7591
|
assertConnected() {
|
|
7579
7592
|
if (!this.connected) {
|
|
7580
7593
|
throw new ProtocolError({
|
|
7581
|
-
message: "SshTransportConnection is not yet connected
|
|
7594
|
+
message: "SshTransportConnection is not yet connected - call connect() first",
|
|
7582
7595
|
protocol: "sftp",
|
|
7583
7596
|
retryable: false
|
|
7584
7597
|
});
|
|
@@ -7918,14 +7931,14 @@ function sftpStatusToError(status, path2) {
|
|
|
7918
7931
|
case SFTP_STATUS.NO_SUCH_FILE:
|
|
7919
7932
|
return new PathNotFoundError({
|
|
7920
7933
|
details: { path: path2, sftpMessage: status.errorMessage },
|
|
7921
|
-
message: `SFTP: no such file or directory${path2 !== void 0 ? `
|
|
7934
|
+
message: `SFTP: no such file or directory${path2 !== void 0 ? ` - ${path2}` : ""}`,
|
|
7922
7935
|
protocol: "sftp",
|
|
7923
7936
|
retryable: false
|
|
7924
7937
|
});
|
|
7925
7938
|
case SFTP_STATUS.PERMISSION_DENIED:
|
|
7926
7939
|
return new PermissionDeniedError({
|
|
7927
7940
|
details: { path: path2, sftpMessage: status.errorMessage },
|
|
7928
|
-
message: `SFTP: permission denied${path2 !== void 0 ? `
|
|
7941
|
+
message: `SFTP: permission denied${path2 !== void 0 ? ` - ${path2}` : ""}`,
|
|
7929
7942
|
protocol: "sftp",
|
|
7930
7943
|
retryable: false
|
|
7931
7944
|
});
|
|
@@ -7933,21 +7946,21 @@ function sftpStatusToError(status, path2) {
|
|
|
7933
7946
|
case SFTP_STATUS.CONNECTION_LOST:
|
|
7934
7947
|
return new ConnectionError({
|
|
7935
7948
|
details: { sftpMessage: status.errorMessage, statusCode: status.statusCode },
|
|
7936
|
-
message: `SFTP: connection error
|
|
7949
|
+
message: `SFTP: connection error - ${status.errorMessage}`,
|
|
7937
7950
|
protocol: "sftp",
|
|
7938
7951
|
retryable: true
|
|
7939
7952
|
});
|
|
7940
7953
|
case SFTP_STATUS.OP_UNSUPPORTED:
|
|
7941
7954
|
return new UnsupportedFeatureError({
|
|
7942
7955
|
details: { sftpMessage: status.errorMessage },
|
|
7943
|
-
message: `SFTP: operation unsupported
|
|
7956
|
+
message: `SFTP: operation unsupported - ${status.errorMessage}`,
|
|
7944
7957
|
protocol: "sftp",
|
|
7945
7958
|
retryable: false
|
|
7946
7959
|
});
|
|
7947
7960
|
case SFTP_STATUS.BAD_MESSAGE:
|
|
7948
7961
|
return new ProtocolError({
|
|
7949
7962
|
details: { sftpMessage: status.errorMessage },
|
|
7950
|
-
message: `SFTP: bad message
|
|
7963
|
+
message: `SFTP: bad message - ${status.errorMessage}`,
|
|
7951
7964
|
protocol: "sftp",
|
|
7952
7965
|
retryable: false
|
|
7953
7966
|
});
|
|
@@ -7955,7 +7968,7 @@ function sftpStatusToError(status, path2) {
|
|
|
7955
7968
|
return new ZeroTransferError({
|
|
7956
7969
|
code: "SFTP_FAILURE",
|
|
7957
7970
|
details: { sftpMessage: status.errorMessage, statusCode: status.statusCode },
|
|
7958
|
-
message: `SFTP: operation failed (status ${status.statusCode})
|
|
7971
|
+
message: `SFTP: operation failed (status ${status.statusCode}) - ${status.errorMessage}`,
|
|
7959
7972
|
protocol: "sftp",
|
|
7960
7973
|
retryable: false
|
|
7961
7974
|
});
|
|
@@ -9076,6 +9089,7 @@ export {
|
|
|
9076
9089
|
importOpenSshConfig,
|
|
9077
9090
|
importWinScpSessions,
|
|
9078
9091
|
isClassicProviderId,
|
|
9092
|
+
isMainModule,
|
|
9079
9093
|
isSensitiveKey,
|
|
9080
9094
|
joinRemotePath,
|
|
9081
9095
|
matchKnownHosts,
|