@zero-transfer/webdav 0.4.2 → 0.4.7
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 +7 -2
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +14 -8
- package/dist/index.d.ts +14 -8
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -2
package/dist/index.d.mts
CHANGED
|
@@ -394,7 +394,7 @@ interface TlsProfile {
|
|
|
394
394
|
* hex form with or without colons. When present, the TLS handshake additionally requires the
|
|
395
395
|
* leaf certificate's SHA-256 fingerprint to match one of these values.
|
|
396
396
|
*
|
|
397
|
-
* Not required for normal CA-trusted endpoints
|
|
397
|
+
* Not required for normal CA-trusted endpoints - public CAs and `ca` bundles already gate
|
|
398
398
|
* trust via `rejectUnauthorized`. Pinning is **recommended for production** when you control
|
|
399
399
|
* the server and want defence-in-depth against rogue certificates issued by trusted CAs.
|
|
400
400
|
*
|
|
@@ -1722,7 +1722,7 @@ interface ConnectionPoolOptions {
|
|
|
1722
1722
|
/**
|
|
1723
1723
|
* Maximum number of *idle* sessions retained per pool key.
|
|
1724
1724
|
*
|
|
1725
|
-
* Active leases are not counted against this limit
|
|
1725
|
+
* Active leases are not counted against this limit - the cap only applies
|
|
1726
1726
|
* to sessions waiting in the pool. When more than `maxIdlePerKey` sessions
|
|
1727
1727
|
* become idle simultaneously, the oldest ones are disconnected. Defaults
|
|
1728
1728
|
* to `4`.
|
|
@@ -3002,7 +3002,7 @@ interface DiffRemoteTreesOptions {
|
|
|
3002
3002
|
* Compares two remote subtrees and produces an entry-level diff.
|
|
3003
3003
|
*
|
|
3004
3004
|
* Source and destination paths are walked independently; entries are then aligned by
|
|
3005
|
-
* the relative path from each tree root. Directory equality is structural
|
|
3005
|
+
* the relative path from each tree root. Directory equality is structural - directories
|
|
3006
3006
|
* are equal when their relative paths match and the entry types agree.
|
|
3007
3007
|
*
|
|
3008
3008
|
* @param source - Source-side remote file system.
|
|
@@ -3247,7 +3247,7 @@ interface CreateAtomicDeployPlanOptions {
|
|
|
3247
3247
|
* 2. Atomically swap the `current` symlink/rename to point at the new release.
|
|
3248
3248
|
* 3. Optionally prune old releases beyond `retain`.
|
|
3249
3249
|
*
|
|
3250
|
-
* No I/O is performed
|
|
3250
|
+
* No I/O is performed - the host executes the plan steps. Pair with
|
|
3251
3251
|
* {@link createTransferPlan} or {@link createTransferJobsFromPlan} to execute.
|
|
3252
3252
|
*
|
|
3253
3253
|
* @param options - Inputs and policies that shape the deploy.
|
|
@@ -3467,6 +3467,12 @@ declare function joinRemotePath(...segments: string[]): string;
|
|
|
3467
3467
|
*/
|
|
3468
3468
|
declare function basenameRemotePath(input: string): string;
|
|
3469
3469
|
|
|
3470
|
+
/**
|
|
3471
|
+
* Returns `true` when the file containing `import.meta.url` is the entry point
|
|
3472
|
+
* of the current Node.js process. Returns `false` outside Node.
|
|
3473
|
+
*/
|
|
3474
|
+
declare function isMainModule(importMetaUrl: string): boolean;
|
|
3475
|
+
|
|
3470
3476
|
/** Fetch implementation accepted by web-family providers. */
|
|
3471
3477
|
type HttpFetch = (input: string, init?: RequestInit) => Promise<Response>;
|
|
3472
3478
|
|
|
@@ -3485,18 +3491,18 @@ interface WebDavProviderOptions {
|
|
|
3485
3491
|
/**
|
|
3486
3492
|
* Streaming policy for `PUT` request bodies.
|
|
3487
3493
|
*
|
|
3488
|
-
* - `"when-known-size"` (default)
|
|
3494
|
+
* - `"when-known-size"` (default) - stream when the caller declares
|
|
3489
3495
|
* `request.totalBytes` (an explicit `Content-Length` is sent so all
|
|
3490
3496
|
* WebDAV servers accept the upload); otherwise buffer the entire body in
|
|
3491
3497
|
* memory before sending. This is the safe default that does not require
|
|
3492
3498
|
* the server to accept HTTP/1.1 chunked transfer-encoding.
|
|
3493
|
-
* - `"always"`
|
|
3499
|
+
* - `"always"` - always stream the body, even when the size is unknown
|
|
3494
3500
|
* (the runtime will use chunked transfer-encoding). Some legacy WebDAV
|
|
3495
3501
|
* servers reject `Transfer-Encoding: chunked` and will respond `411
|
|
3496
3502
|
* Length Required` or `501 Not Implemented`; only enable this for
|
|
3497
3503
|
* servers known to accept chunked uploads (modern Apache/nginx, IIS
|
|
3498
3504
|
* with chunked transfer enabled, Nextcloud, ownCloud, sabre/dav).
|
|
3499
|
-
* - `"never"`
|
|
3505
|
+
* - `"never"` - always buffer (legacy behaviour pre-0.4.0). Use for
|
|
3500
3506
|
* maximum compatibility at the cost of memory.
|
|
3501
3507
|
*/
|
|
3502
3508
|
uploadStreaming?: "when-known-size" | "always" | "never";
|
|
@@ -3540,4 +3546,4 @@ interface WebDavProviderOptions {
|
|
|
3540
3546
|
*/
|
|
3541
3547
|
declare function createWebDavProviderFactory(options?: WebDavProviderOptions): ProviderFactory;
|
|
3542
3548
|
|
|
3543
|
-
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 OAuthAccessToken, type OAuthRefreshCallback, type OAuthTokenSecretSourceOptions, type OpenSshConfigEntry, ParseError, PathAlreadyExistsError, PathNotFoundError, PermissionDeniedError, type PooledTransferClient, type ProgressEventInput, ProtocolError, type
|
|
3549
|
+
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 OAuthAccessToken, type OAuthRefreshCallback, type OAuthTokenSecretSourceOptions, type OpenSshConfigEntry, ParseError, PathAlreadyExistsError, PathNotFoundError, PermissionDeniedError, type PooledTransferClient, type ProgressEventInput, ProtocolError, type ProviderFactory, type ProviderId, 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 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 WebDavProviderOptions, type WinScpSession, ZeroTransfer, type ZeroTransferCapabilities, ZeroTransferError, type ZeroTransferErrorDetails, type ZeroTransferLogger, type ZeroTransferOptions, assertSafeFtpArgument, basenameRemotePath, buildRemoteBreadcrumbs, compareRemoteManifests, copyBetween, createAtomicDeployPlan, createBandwidthThrottle, createLocalProviderFactory, createMemoryProviderFactory, createOAuthTokenSecretSource, createPooledTransferClient, createProgressEvent, createProviderTransferExecutor, createRemoteBrowser, createRemoteManifest, createSyncPlan, createTransferClient, createTransferJobsFromPlan, createTransferPlan, createTransferResult, createWebDavProviderFactory, 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
|
@@ -394,7 +394,7 @@ interface TlsProfile {
|
|
|
394
394
|
* hex form with or without colons. When present, the TLS handshake additionally requires the
|
|
395
395
|
* leaf certificate's SHA-256 fingerprint to match one of these values.
|
|
396
396
|
*
|
|
397
|
-
* Not required for normal CA-trusted endpoints
|
|
397
|
+
* Not required for normal CA-trusted endpoints - public CAs and `ca` bundles already gate
|
|
398
398
|
* trust via `rejectUnauthorized`. Pinning is **recommended for production** when you control
|
|
399
399
|
* the server and want defence-in-depth against rogue certificates issued by trusted CAs.
|
|
400
400
|
*
|
|
@@ -1722,7 +1722,7 @@ interface ConnectionPoolOptions {
|
|
|
1722
1722
|
/**
|
|
1723
1723
|
* Maximum number of *idle* sessions retained per pool key.
|
|
1724
1724
|
*
|
|
1725
|
-
* Active leases are not counted against this limit
|
|
1725
|
+
* Active leases are not counted against this limit - the cap only applies
|
|
1726
1726
|
* to sessions waiting in the pool. When more than `maxIdlePerKey` sessions
|
|
1727
1727
|
* become idle simultaneously, the oldest ones are disconnected. Defaults
|
|
1728
1728
|
* to `4`.
|
|
@@ -3002,7 +3002,7 @@ interface DiffRemoteTreesOptions {
|
|
|
3002
3002
|
* Compares two remote subtrees and produces an entry-level diff.
|
|
3003
3003
|
*
|
|
3004
3004
|
* Source and destination paths are walked independently; entries are then aligned by
|
|
3005
|
-
* the relative path from each tree root. Directory equality is structural
|
|
3005
|
+
* the relative path from each tree root. Directory equality is structural - directories
|
|
3006
3006
|
* are equal when their relative paths match and the entry types agree.
|
|
3007
3007
|
*
|
|
3008
3008
|
* @param source - Source-side remote file system.
|
|
@@ -3247,7 +3247,7 @@ interface CreateAtomicDeployPlanOptions {
|
|
|
3247
3247
|
* 2. Atomically swap the `current` symlink/rename to point at the new release.
|
|
3248
3248
|
* 3. Optionally prune old releases beyond `retain`.
|
|
3249
3249
|
*
|
|
3250
|
-
* No I/O is performed
|
|
3250
|
+
* No I/O is performed - the host executes the plan steps. Pair with
|
|
3251
3251
|
* {@link createTransferPlan} or {@link createTransferJobsFromPlan} to execute.
|
|
3252
3252
|
*
|
|
3253
3253
|
* @param options - Inputs and policies that shape the deploy.
|
|
@@ -3467,6 +3467,12 @@ declare function joinRemotePath(...segments: string[]): string;
|
|
|
3467
3467
|
*/
|
|
3468
3468
|
declare function basenameRemotePath(input: string): string;
|
|
3469
3469
|
|
|
3470
|
+
/**
|
|
3471
|
+
* Returns `true` when the file containing `import.meta.url` is the entry point
|
|
3472
|
+
* of the current Node.js process. Returns `false` outside Node.
|
|
3473
|
+
*/
|
|
3474
|
+
declare function isMainModule(importMetaUrl: string): boolean;
|
|
3475
|
+
|
|
3470
3476
|
/** Fetch implementation accepted by web-family providers. */
|
|
3471
3477
|
type HttpFetch = (input: string, init?: RequestInit) => Promise<Response>;
|
|
3472
3478
|
|
|
@@ -3485,18 +3491,18 @@ interface WebDavProviderOptions {
|
|
|
3485
3491
|
/**
|
|
3486
3492
|
* Streaming policy for `PUT` request bodies.
|
|
3487
3493
|
*
|
|
3488
|
-
* - `"when-known-size"` (default)
|
|
3494
|
+
* - `"when-known-size"` (default) - stream when the caller declares
|
|
3489
3495
|
* `request.totalBytes` (an explicit `Content-Length` is sent so all
|
|
3490
3496
|
* WebDAV servers accept the upload); otherwise buffer the entire body in
|
|
3491
3497
|
* memory before sending. This is the safe default that does not require
|
|
3492
3498
|
* the server to accept HTTP/1.1 chunked transfer-encoding.
|
|
3493
|
-
* - `"always"`
|
|
3499
|
+
* - `"always"` - always stream the body, even when the size is unknown
|
|
3494
3500
|
* (the runtime will use chunked transfer-encoding). Some legacy WebDAV
|
|
3495
3501
|
* servers reject `Transfer-Encoding: chunked` and will respond `411
|
|
3496
3502
|
* Length Required` or `501 Not Implemented`; only enable this for
|
|
3497
3503
|
* servers known to accept chunked uploads (modern Apache/nginx, IIS
|
|
3498
3504
|
* with chunked transfer enabled, Nextcloud, ownCloud, sabre/dav).
|
|
3499
|
-
* - `"never"`
|
|
3505
|
+
* - `"never"` - always buffer (legacy behaviour pre-0.4.0). Use for
|
|
3500
3506
|
* maximum compatibility at the cost of memory.
|
|
3501
3507
|
*/
|
|
3502
3508
|
uploadStreaming?: "when-known-size" | "always" | "never";
|
|
@@ -3540,4 +3546,4 @@ interface WebDavProviderOptions {
|
|
|
3540
3546
|
*/
|
|
3541
3547
|
declare function createWebDavProviderFactory(options?: WebDavProviderOptions): ProviderFactory;
|
|
3542
3548
|
|
|
3543
|
-
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 OAuthAccessToken, type OAuthRefreshCallback, type OAuthTokenSecretSourceOptions, type OpenSshConfigEntry, ParseError, PathAlreadyExistsError, PathNotFoundError, PermissionDeniedError, type PooledTransferClient, type ProgressEventInput, ProtocolError, type
|
|
3549
|
+
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 OAuthAccessToken, type OAuthRefreshCallback, type OAuthTokenSecretSourceOptions, type OpenSshConfigEntry, ParseError, PathAlreadyExistsError, PathNotFoundError, PermissionDeniedError, type PooledTransferClient, type ProgressEventInput, ProtocolError, type ProviderFactory, type ProviderId, 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 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 WebDavProviderOptions, type WinScpSession, ZeroTransfer, type ZeroTransferCapabilities, ZeroTransferError, type ZeroTransferErrorDetails, type ZeroTransferLogger, type ZeroTransferOptions, assertSafeFtpArgument, basenameRemotePath, buildRemoteBreadcrumbs, compareRemoteManifests, copyBetween, createAtomicDeployPlan, createBandwidthThrottle, createLocalProviderFactory, createMemoryProviderFactory, createOAuthTokenSecretSource, createPooledTransferClient, createProgressEvent, createProviderTransferExecutor, createRemoteBrowser, createRemoteManifest, createSyncPlan, createTransferClient, createTransferJobsFromPlan, createTransferPlan, createTransferResult, createWebDavProviderFactory, 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/web/WebDavProvider.ts
|
|
4789
4802
|
import { Buffer as Buffer7 } from "buffer";
|
|
4790
4803
|
|
|
@@ -5374,6 +5387,7 @@ export {
|
|
|
5374
5387
|
importOpenSshConfig,
|
|
5375
5388
|
importWinScpSessions,
|
|
5376
5389
|
isClassicProviderId,
|
|
5390
|
+
isMainModule,
|
|
5377
5391
|
isSensitiveKey,
|
|
5378
5392
|
joinRemotePath,
|
|
5379
5393
|
matchKnownHosts,
|