scp-next 1.1.2 → 1.1.3
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 +29 -25
- package/dist/cli/index.js +1697 -1744
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +1177 -1260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1162 -1210
- package/dist/index.js.map +1 -1
- package/guides/ARCHITECTURE.md +17 -1
- package/package.json +39 -12
package/README.md
CHANGED
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
`scp-next` is an SCP-style command-line tool and library for secure file transfers over SSH.
|
|
19
19
|
It uses SFTP internally through `ssh2-sftp-client` instead of implementing SCP or SFTP protocols manually.
|
|
20
20
|
Developer documentation is available at [GitHub Pages](https://chengchuu.github.io/scp-next/).
|
|
21
|
+
Use the [interactive examples](https://chengchuu.github.io/scp-next/examples/) to generate
|
|
22
|
+
CLI and TypeScript transfer snippets, or browse the
|
|
23
|
+
[API documentation](https://chengchuu.github.io/scp-next/api/).
|
|
21
24
|
|
|
22
25
|
## Features
|
|
23
26
|
|
|
@@ -218,7 +221,7 @@ scp-next run download-logs --config ./scp-next.config.json
|
|
|
218
221
|
| `--create-directories` | Create missing destination directories. Enabled by default. |
|
|
219
222
|
| `--no-create-directories` | Disable automatic destination directory creation. |
|
|
220
223
|
| `--dry-run` | Resolve and validate the operation without connecting or transferring. |
|
|
221
|
-
| `--post-upload-command <command>` | Run a remote command after a successful upload. Repeatable.
|
|
224
|
+
| `--post-upload-command <command>` | Run a remote command after a successful upload. Repeatable. |
|
|
222
225
|
| `--timeout <milliseconds>` | SSH connection ready timeout in milliseconds. |
|
|
223
226
|
| `--verbose` | Print non-sensitive diagnostic details. |
|
|
224
227
|
| `--quiet` | Disable progress and non-error output. |
|
|
@@ -316,27 +319,27 @@ await upload({
|
|
|
316
319
|
|
|
317
320
|
### Library Options
|
|
318
321
|
|
|
319
|
-
| Field
|
|
320
|
-
|
|
|
321
|
-
| `host`
|
|
322
|
-
| `port`
|
|
323
|
-
| `username`
|
|
324
|
-
| `password`
|
|
325
|
-
| `privateKey`
|
|
326
|
-
| `privateKeyFile`
|
|
327
|
-
| `passphrase`
|
|
328
|
-
| `agent`
|
|
329
|
-
| `hostFingerprint`
|
|
330
|
-
| `knownHostsFile`
|
|
331
|
-
| `localPath`
|
|
332
|
-
| `remotePath`
|
|
333
|
-
| `recursive`
|
|
334
|
-
| `overwrite`
|
|
335
|
-
| `createDirectories`
|
|
336
|
-
| `dryRun`
|
|
337
|
-
| `timeout`
|
|
338
|
-
| `postUploadCommands` | upload
|
|
339
|
-
| `onProgress`
|
|
322
|
+
| Field | Used by | Description |
|
|
323
|
+
| -------------------- | --------------- | ------------------------------------------------------------ |
|
|
324
|
+
| `host` | server | SSH server host. |
|
|
325
|
+
| `port` | server | SSH server port. Defaults to `22`. |
|
|
326
|
+
| `username` | server | SSH username. |
|
|
327
|
+
| `password` | server | SSH password. |
|
|
328
|
+
| `privateKey` | server | Private-key content as a string or Buffer. |
|
|
329
|
+
| `privateKeyFile` | server | Private-key file path. |
|
|
330
|
+
| `passphrase` | server | Passphrase for an encrypted private key. |
|
|
331
|
+
| `agent` | server | SSH agent socket path. |
|
|
332
|
+
| `hostFingerprint` | server | Expected server host-key SHA-256 fingerprint. |
|
|
333
|
+
| `knownHostsFile` | server | Known-hosts file for host verification. |
|
|
334
|
+
| `localPath` | upload/download | Local source for upload or local destination for download. |
|
|
335
|
+
| `remotePath` | upload/download | Remote destination for upload or remote source for download. |
|
|
336
|
+
| `recursive` | transfer | Transfer directories recursively. Defaults to `false`. |
|
|
337
|
+
| `overwrite` | transfer | Allow replacing existing files. |
|
|
338
|
+
| `createDirectories` | transfer | Create missing destination directories. Defaults to `true`. |
|
|
339
|
+
| `dryRun` | transfer | Validate and plan without modifying local or remote files. |
|
|
340
|
+
| `timeout` | server/transfer | SSH connection ready timeout in milliseconds. |
|
|
341
|
+
| `postUploadCommands` | upload | Remote command strings run sequentially after success. |
|
|
342
|
+
| `onProgress` | transfer | Progress callback for file and directory transfers. |
|
|
340
343
|
|
|
341
344
|
`client.exec(command, options)` returns `ExecResult` with `stdout`, `stderr`, `exitCode`,
|
|
342
345
|
and an optional signal. Its optional `timeout` is command-specific; `failOnStderr` can treat
|
|
@@ -651,7 +654,7 @@ npm run lint
|
|
|
651
654
|
npm test
|
|
652
655
|
npm run build
|
|
653
656
|
npm run docs:links
|
|
654
|
-
npm run docs
|
|
657
|
+
npm run docs
|
|
655
658
|
npm pack --dry-run
|
|
656
659
|
```
|
|
657
660
|
|
|
@@ -660,8 +663,9 @@ npm pack --dry-run
|
|
|
660
663
|
## Publishing
|
|
661
664
|
|
|
662
665
|
The published package includes `dist`, README, license, changelog, and handwritten guides. The CLI
|
|
663
|
-
entry is `dist/cli/index.js` and contains a Node.js shebang. `npm run docs
|
|
664
|
-
|
|
666
|
+
entry is `dist/cli/index.js` and contains a Node.js shebang. `npm run docs` generates TypeDoc,
|
|
667
|
+
builds the website and examples with Webpack, assembles the GitHub Pages artifact under `docs/`,
|
|
668
|
+
and validates its SEO and PWA metadata. Do not edit or commit generated output directly.
|
|
665
669
|
|
|
666
670
|
## Transfer Mechanism
|
|
667
671
|
|