@zero-transfer/sftp 0.4.6 → 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 +14 -19
- package/dist/index.cjs +2 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
npm install @zero-transfer/sftp
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Installing this package automatically pulls in [`@zero-transfer/core`](https://www.npmjs.com/package/@zero-transfer/core) as a transitive dependency. The full core surface (`createTransferClient`, `uploadFile`, `downloadFile`, profiles, errors, sync planner, …) is re-exported from this package, so a single `import { … } from "@zero-transfer/sftp"` is all you need. If your app uses multiple protocols, install the umbrella [`@zero-transfer/sdk`](https://www.npmjs.com/package/@zero-transfer/sdk) instead of multiple scoped packages.
|
|
12
|
-
|
|
13
11
|
## Overview
|
|
14
12
|
|
|
15
|
-
Zero-dependency SFTP over SSH built on a first-party SSH transport stack: Ed25519 / RSA-SHA2-256/512 / ECDSA P-256/384/521 host keys, password / keyboard-interactive / public-key (Ed25519 + RSA) auth, host-key pinning, OpenSSH `known_hosts` (hashed/plain, `[host]:port`, `@revoked`), handshake timeout, and idle NAT keepalive.
|
|
13
|
+
Zero-dependency SFTP over SSH built on a first-party SSH transport stack: Ed25519 / RSA-SHA2-256/512 / ECDSA P-256/384/521 host keys, password / keyboard-interactive / public-key (Ed25519 + RSA) auth, host-key pinning, OpenSSH `known_hosts` (hashed/plain, `[host]:port`, `@revoked`), handshake timeout, and idle NAT keepalive.
|
|
16
14
|
|
|
17
15
|
## Usage
|
|
18
16
|
|
|
@@ -21,27 +19,24 @@ import {
|
|
|
21
19
|
createTransferClient,
|
|
22
20
|
uploadFile,
|
|
23
21
|
downloadFile,
|
|
24
|
-
|
|
22
|
+
createSftpProviderFactory,
|
|
25
23
|
} from "@zero-transfer/sftp";
|
|
26
24
|
```
|
|
27
25
|
|
|
28
26
|
## Public surface
|
|
29
27
|
|
|
30
|
-
This package publishes a narrowed surface of **
|
|
31
|
-
|
|
32
|
-
| Symbol | Kind
|
|
33
|
-
| --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| [`
|
|
38
|
-
| [`
|
|
39
|
-
| [`
|
|
40
|
-
| [`
|
|
41
|
-
| [`
|
|
42
|
-
| [`parseKnownHosts`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/parseKnownHosts.md) | Function | See API reference. |
|
|
43
|
-
| [`KnownHostsEntry`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/KnownHostsEntry.md) | Interface | See API reference. |
|
|
44
|
-
| [`KnownHostsMarker`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/type-aliases/KnownHostsMarker.md) | Type | See API reference. |
|
|
28
|
+
This package publishes a narrowed surface of **8** exports. These symbols are also available from [`@zero-transfer/sdk`](https://www.npmjs.com/package/@zero-transfer/sdk); the table below links into the full API reference:
|
|
29
|
+
|
|
30
|
+
| Symbol | Kind | Notes |
|
|
31
|
+
| --------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------ |
|
|
32
|
+
| [`createSftpProviderFactory`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/createSftpProviderFactory.md) | Function | See API reference. |
|
|
33
|
+
| [`SftpProviderOptions`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/SftpProviderOptions.md) | Interface | See API reference. |
|
|
34
|
+
| [`SftpRawSession`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/SftpRawSession.md) | Interface | See API reference. |
|
|
35
|
+
| [`matchKnownHosts`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/matchKnownHosts.md) | Function | See API reference. |
|
|
36
|
+
| [`matchKnownHostsEntry`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/matchKnownHostsEntry.md) | Function | See API reference. |
|
|
37
|
+
| [`parseKnownHosts`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/functions/parseKnownHosts.md) | Function | See API reference. |
|
|
38
|
+
| [`KnownHostsEntry`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/interfaces/KnownHostsEntry.md) | Interface | See API reference. |
|
|
39
|
+
| [`KnownHostsMarker`](https://github.com/tonywied17/zero-transfer/blob/main/docs/api-md/type-aliases/KnownHostsMarker.md) | Type | See API reference. |
|
|
45
40
|
|
|
46
41
|
## Examples
|
|
47
42
|
|
package/dist/index.cjs
CHANGED
|
@@ -62,14 +62,13 @@ __export(sftp_exports, {
|
|
|
62
62
|
createBandwidthThrottle: () => createBandwidthThrottle,
|
|
63
63
|
createLocalProviderFactory: () => createLocalProviderFactory,
|
|
64
64
|
createMemoryProviderFactory: () => createMemoryProviderFactory,
|
|
65
|
-
createNativeSftpProviderFactory: () => createNativeSftpProviderFactory,
|
|
66
65
|
createOAuthTokenSecretSource: () => createOAuthTokenSecretSource,
|
|
67
66
|
createPooledTransferClient: () => createPooledTransferClient,
|
|
68
67
|
createProgressEvent: () => createProgressEvent,
|
|
69
68
|
createProviderTransferExecutor: () => createProviderTransferExecutor,
|
|
70
69
|
createRemoteBrowser: () => createRemoteBrowser,
|
|
71
70
|
createRemoteManifest: () => createRemoteManifest,
|
|
72
|
-
createSftpProviderFactory: () =>
|
|
71
|
+
createSftpProviderFactory: () => createSftpProviderFactory,
|
|
73
72
|
createSyncPlan: () => createSyncPlan,
|
|
74
73
|
createTransferClient: () => createTransferClient,
|
|
75
74
|
createTransferJobsFromPlan: () => createTransferJobsFromPlan,
|
|
@@ -8481,7 +8480,7 @@ function buildNativeSftpCapabilities(maxConcurrency) {
|
|
|
8481
8480
|
var NATIVE_SFTP_PROVIDER_CAPABILITIES = buildNativeSftpCapabilities(
|
|
8482
8481
|
NATIVE_SFTP_DEFAULT_MAX_CONCURRENCY
|
|
8483
8482
|
);
|
|
8484
|
-
function
|
|
8483
|
+
function createSftpProviderFactory(options = {}) {
|
|
8485
8484
|
validateNativeSftpOptions(options);
|
|
8486
8485
|
const capabilities = buildNativeSftpCapabilities(
|
|
8487
8486
|
options.maxConcurrency ?? NATIVE_SFTP_DEFAULT_MAX_CONCURRENCY
|
|
@@ -9171,7 +9170,6 @@ function validateNativeSftpOptions(options) {
|
|
|
9171
9170
|
createBandwidthThrottle,
|
|
9172
9171
|
createLocalProviderFactory,
|
|
9173
9172
|
createMemoryProviderFactory,
|
|
9174
|
-
createNativeSftpProviderFactory,
|
|
9175
9173
|
createOAuthTokenSecretSource,
|
|
9176
9174
|
createPooledTransferClient,
|
|
9177
9175
|
createProgressEvent,
|