@artenx/dshb 0.1.31 → 0.1.33

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.
Files changed (36) hide show
  1. package/lib/client.js +133 -22
  2. package/lib/client.js.map +1 -1
  3. package/lib/core/index.js +6 -1
  4. package/lib/core/index.js.map +1 -1
  5. package/lib/core/sync/coordinator.d.ts +2 -2
  6. package/lib/core/sync/coordinator.js +23 -6
  7. package/lib/core/sync/coordinator.js.map +1 -1
  8. package/lib/core/sync/internal-routes.d.ts +1 -1
  9. package/lib/core/sync/internal-routes.js +80 -4
  10. package/lib/core/sync/internal-routes.js.map +1 -1
  11. package/lib/core/sync/offline-archive.d.ts +1 -1
  12. package/lib/core/sync/offline-archive.js +1 -1
  13. package/lib/core/sync/offline-routes.js +1 -1
  14. package/lib/core/sync/protocol.d.ts +2 -2
  15. package/lib/core/sync/protocol.js +4 -1
  16. package/lib/core/sync/protocol.js.map +1 -1
  17. package/lib/core/sync/remote-helper.js +107 -76
  18. package/lib/core/sync/remote-helper.js.map +1 -1
  19. package/lib/core/sync/routes.d.ts +1 -1
  20. package/lib/core/sync/routes.js +61 -1
  21. package/lib/core/sync/routes.js.map +1 -1
  22. package/lib/core/sync/session-routes.d.ts +1 -1
  23. package/lib/core/sync/session-routes.js +1 -1
  24. package/lib/core/sync/session-sync.d.ts +2 -2
  25. package/lib/core/sync/session-sync.js +2 -2
  26. package/lib/core/sync/ssh-transport.d.ts +2 -2
  27. package/lib/core/sync/ssh-transport.js +267 -3
  28. package/lib/core/sync/ssh-transport.js.map +1 -1
  29. package/lib/{protocol-KaWZArY8.d.ts → protocol-DJ0zyVlB.d.ts} +5 -2
  30. package/lib/{session-sync-Zfo1Q-qT.d.ts → session-sync-BuOJvFxK.d.ts} +54 -2
  31. package/lib/{session-sync-BQt3HXkp.js → session-sync-CIqjuWkh.js} +455 -48
  32. package/lib/session-sync-CIqjuWkh.js.map +1 -0
  33. package/lib/ssh-transport-C7povM0s.d.ts +115 -0
  34. package/package.json +1 -1
  35. package/lib/session-sync-BQt3HXkp.js.map +0 -1
  36. package/lib/ssh-transport-Cfb_nwkY.d.ts +0 -65
@@ -1,65 +0,0 @@
1
- import { a as SyncPeer } from "./model-BP7Gw1yk.js";
2
- import { i as SyncNodeManifest, t as SyncNodeApplyResult } from "./node-sync-3Z9QLz2n.js";
3
- import { SyncPeerManager, SyncPeerSecrets } from "./core/sync/peer-manager.js";
4
- import { r as SyncHostKeyChallenges, t as SyncHostKeyChallengeError } from "./host-key-C5afhAUd.js";
5
- import { c as SyncFrame } from "./protocol-KaWZArY8.js";
6
- import { c as SyncSessionEventPrefix, i as SyncSessionBundle, r as SyncSessionApplyResult, u as SyncSessionManifest } from "./session-sync-Zfo1Q-qT.js";
7
- import { Client, ClientChannel, ConnectConfig } from "ssh2";
8
- //#region src/core/sync/ssh-transport.d.ts
9
- type SyncSshErrorCategory = 'auth' | 'network' | 'hostkey' | 'timeout' | 'helper' | 'protocol';
10
- declare class SyncSshProbeError extends Error {
11
- readonly category: SyncSshErrorCategory;
12
- constructor(category: SyncSshErrorCategory);
13
- }
14
- declare class SyncSessionDeltaPrefixError extends Error {
15
- constructor();
16
- }
17
- interface SyncRemoteHandshake {
18
- protocolVersion: number;
19
- instanceId: string;
20
- capabilities: string[];
21
- }
22
- interface SyncRemoteNodeManifest extends SyncNodeManifest {
23
- capabilities?: string[];
24
- }
25
- declare class SyncSshSession {
26
- private readonly client;
27
- private readonly channel;
28
- private readonly decoder;
29
- private readonly closeSignal;
30
- private reading;
31
- private closed;
32
- private inputEnded;
33
- private nextDataSequence;
34
- private pendingError;
35
- constructor(client: Client, channel: ClientChannel);
36
- sendControl(value: Record<string, unknown>): Promise<void>;
37
- sendData(sequence: number, data: Buffer): Promise<void>;
38
- endInput(): void;
39
- readFrames(idleTimeoutMs?: number): AsyncGenerator<SyncFrame>;
40
- close(): void;
41
- private write;
42
- }
43
- declare function buildSyncSshConnectConfig(peer: SyncPeer, secrets: SyncPeerSecrets, challenges: SyncHostKeyChallenges, onChallenge: (error: SyncHostKeyChallengeError) => void): ConnectConfig;
44
- declare class SyncSshTransport {
45
- private readonly peerManager;
46
- private readonly hostKeyChallenges;
47
- constructor(peerManager: SyncPeerManager);
48
- probe(peerId: string): Promise<SyncRemoteHandshake>;
49
- openSession(peerId: string): Promise<{
50
- peer: SyncPeer;
51
- session: SyncSshSession;
52
- }>;
53
- fetchNodeManifest(peerId: string): Promise<SyncRemoteNodeManifest>;
54
- applyNodeManifest(peerId: string, records: SyncNodeManifest['records'], sourceName: string): Promise<SyncNodeApplyResult>;
55
- fetchSessionBundle(peerId: string): Promise<SyncSessionBundle>;
56
- fetchSessionManifest(peerId: string): Promise<SyncSessionManifest>;
57
- fetchSessionEntries(peerId: string, keys: readonly string[], manifestDigest: string, prefixes?: readonly SyncSessionEventPrefix[]): Promise<SyncSessionBundle>;
58
- applySessionBundle(peerId: string, bundle: SyncSessionBundle, sourceName: string): Promise<SyncSessionApplyResult>;
59
- trustObservedHostKey(peerId: string): Promise<void>;
60
- private fetchDataOperation;
61
- private requestHandshake;
62
- }
63
- //#endregion
64
- export { SyncSshProbeError as a, buildSyncSshConnectConfig as c, SyncSshErrorCategory as i, SyncRemoteNodeManifest as n, SyncSshSession as o, SyncSessionDeltaPrefixError as r, SyncSshTransport as s, SyncRemoteHandshake as t };
65
- //# sourceMappingURL=ssh-transport-Cfb_nwkY.d.ts.map