@zero-transfer/http 0.1.6 → 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 +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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 } from 'ssh2';
|
|
5
4
|
import { Buffer } from 'node:buffer';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -306,10 +305,25 @@ interface RemoteStat extends RemoteEntry {
|
|
|
306
305
|
type TlsSecretSource = SecretSource | SecretSource[];
|
|
307
306
|
/** Known-hosts material source accepted by SSH connection profiles. */
|
|
308
307
|
type SshKnownHostsSource = SecretSource | SecretSource[];
|
|
308
|
+
/** Minimal SSH agent contract used by profile validation and SSH adapters. */
|
|
309
|
+
interface SshAgentLike {
|
|
310
|
+
/** Returns public identities exposed by the agent implementation. */
|
|
311
|
+
getIdentities: (...args: any[]) => unknown;
|
|
312
|
+
/** Signs payloads using a selected identity. */
|
|
313
|
+
sign: (...args: any[]) => unknown;
|
|
314
|
+
}
|
|
315
|
+
/** Ordered algorithm list mutation operations used by SSH adapters. */
|
|
316
|
+
interface SshAlgorithmMutations {
|
|
317
|
+
append?: string | readonly string[];
|
|
318
|
+
prepend?: string | readonly string[];
|
|
319
|
+
remove?: string | readonly string[];
|
|
320
|
+
}
|
|
321
|
+
/** Single SSH algorithm override value accepted by connection profiles. */
|
|
322
|
+
type SshAlgorithmOverride = readonly string[] | SshAlgorithmMutations;
|
|
309
323
|
/** SSH agent source accepted by SFTP providers. */
|
|
310
|
-
type SshAgentSource = string |
|
|
324
|
+
type SshAgentSource = string | SshAgentLike;
|
|
311
325
|
/** SSH transport algorithm overrides accepted by SFTP providers. */
|
|
312
|
-
type SshAlgorithms =
|
|
326
|
+
type SshAlgorithms = Record<string, SshAlgorithmOverride | undefined>;
|
|
313
327
|
/** Context passed to SSH socket factories before opening an SSH session. */
|
|
314
328
|
interface SshSocketFactoryContext {
|
|
315
329
|
/** Target SSH host from the resolved connection profile. */
|
|
@@ -327,7 +341,7 @@ interface SshSocketFactoryContext {
|
|
|
327
341
|
* Use this hook for HTTP CONNECT, SOCKS, bastion, or custom tunnel integrations.
|
|
328
342
|
*
|
|
329
343
|
* @param context - Resolved SSH target information for the socket being opened.
|
|
330
|
-
* @returns Preconnected readable stream, or a promise for one, passed to
|
|
344
|
+
* @returns Preconnected readable stream, or a promise for one, passed to the SSH adapter socket option.
|
|
331
345
|
*/
|
|
332
346
|
type SshSocketFactory = (context: SshSocketFactoryContext) => Readable | Promise<Readable>;
|
|
333
347
|
/** Prompt metadata supplied by an SSH keyboard-interactive server challenge. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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 } from 'ssh2';
|
|
5
4
|
import { Buffer } from 'node:buffer';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -306,10 +305,25 @@ interface RemoteStat extends RemoteEntry {
|
|
|
306
305
|
type TlsSecretSource = SecretSource | SecretSource[];
|
|
307
306
|
/** Known-hosts material source accepted by SSH connection profiles. */
|
|
308
307
|
type SshKnownHostsSource = SecretSource | SecretSource[];
|
|
308
|
+
/** Minimal SSH agent contract used by profile validation and SSH adapters. */
|
|
309
|
+
interface SshAgentLike {
|
|
310
|
+
/** Returns public identities exposed by the agent implementation. */
|
|
311
|
+
getIdentities: (...args: any[]) => unknown;
|
|
312
|
+
/** Signs payloads using a selected identity. */
|
|
313
|
+
sign: (...args: any[]) => unknown;
|
|
314
|
+
}
|
|
315
|
+
/** Ordered algorithm list mutation operations used by SSH adapters. */
|
|
316
|
+
interface SshAlgorithmMutations {
|
|
317
|
+
append?: string | readonly string[];
|
|
318
|
+
prepend?: string | readonly string[];
|
|
319
|
+
remove?: string | readonly string[];
|
|
320
|
+
}
|
|
321
|
+
/** Single SSH algorithm override value accepted by connection profiles. */
|
|
322
|
+
type SshAlgorithmOverride = readonly string[] | SshAlgorithmMutations;
|
|
309
323
|
/** SSH agent source accepted by SFTP providers. */
|
|
310
|
-
type SshAgentSource = string |
|
|
324
|
+
type SshAgentSource = string | SshAgentLike;
|
|
311
325
|
/** SSH transport algorithm overrides accepted by SFTP providers. */
|
|
312
|
-
type SshAlgorithms =
|
|
326
|
+
type SshAlgorithms = Record<string, SshAlgorithmOverride | undefined>;
|
|
313
327
|
/** Context passed to SSH socket factories before opening an SSH session. */
|
|
314
328
|
interface SshSocketFactoryContext {
|
|
315
329
|
/** Target SSH host from the resolved connection profile. */
|
|
@@ -327,7 +341,7 @@ interface SshSocketFactoryContext {
|
|
|
327
341
|
* Use this hook for HTTP CONNECT, SOCKS, bastion, or custom tunnel integrations.
|
|
328
342
|
*
|
|
329
343
|
* @param context - Resolved SSH target information for the socket being opened.
|
|
330
|
-
* @returns Preconnected readable stream, or a promise for one, passed to
|
|
344
|
+
* @returns Preconnected readable stream, or a promise for one, passed to the SSH adapter socket option.
|
|
331
345
|
*/
|
|
332
346
|
type SshSocketFactory = (context: SshSocketFactoryContext) => Readable | Promise<Readable>;
|
|
333
347
|
/** Prompt metadata supplied by an SSH keyboard-interactive server challenge. */
|
package/dist/index.mjs
CHANGED
|
@@ -439,7 +439,7 @@ function createPinnedHostKeyError(value) {
|
|
|
439
439
|
function createSshAlgorithmsError(value) {
|
|
440
440
|
return new ConfigurationError({
|
|
441
441
|
details: { algorithms: value },
|
|
442
|
-
message: "Connection profile ssh.algorithms must use
|
|
442
|
+
message: "Connection profile ssh.algorithms must use SSH-compatible non-empty algorithm lists",
|
|
443
443
|
retryable: false
|
|
444
444
|
});
|
|
445
445
|
}
|