@runneth/cli 0.0.0-sha.19a36f654ef6.production

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/dist/ssh.d.ts ADDED
@@ -0,0 +1,129 @@
1
+ import type { Readable, Writable } from "node:stream";
2
+ import { type OAuthTokenResult } from "./oauth.js";
3
+ export type RunnethSshAppMetadata = Readonly<{
4
+ authorizedKeysPath: string;
5
+ connectRoute: string;
6
+ ok: true;
7
+ sshUser: string;
8
+ }>;
9
+ export type RunnethSshInstallResponse = RunnethSshAppMetadata & Readonly<{
10
+ installed: boolean;
11
+ }>;
12
+ export type RunnethSshTargetPaths = Readonly<{
13
+ configPath: string;
14
+ hostAlias: string;
15
+ knownHostsPath: string;
16
+ privateKeyPath: string;
17
+ publicKeyPath: string;
18
+ targetDirectory: string;
19
+ }>;
20
+ export type RunnethSshGeneratedKeyMode = "shared" | "unique";
21
+ export type RunnethSshKeyMode = RunnethSshGeneratedKeyMode | "custom";
22
+ export type RunnethSshKeyPaths = Readonly<{
23
+ keyDirectory: string;
24
+ keyMode: RunnethSshKeyMode;
25
+ privateKeyPath: string;
26
+ publicKeyPath: string;
27
+ }>;
28
+ export type RunnethSshSetupOptions = Readonly<{
29
+ cliPath: string;
30
+ homePath?: string;
31
+ identityFilePath?: string;
32
+ keyMode?: RunnethSshGeneratedKeyMode;
33
+ oauthToken: OAuthTokenResult;
34
+ resourceUrl: string;
35
+ sshUrl?: string;
36
+ targetName?: string;
37
+ }>;
38
+ export type RunnethSshSetupResult = Readonly<{
39
+ authorizedKeysPath: string;
40
+ configPath: string;
41
+ connectRoute: string;
42
+ hostAlias: string;
43
+ installed: boolean;
44
+ keyMode: RunnethSshKeyMode;
45
+ knownHostsPath: string;
46
+ privateKeyPath: string;
47
+ publicKeyPath: string;
48
+ sshUrl: string;
49
+ sshUser: string;
50
+ targetName?: string;
51
+ }>;
52
+ export type RunnethSshProxyOptions = Readonly<{
53
+ homePath?: string;
54
+ resourceUrl: string;
55
+ sshUrl?: string;
56
+ streams?: RunnethSshProxyStreams;
57
+ }>;
58
+ export type RunnethSshProxyStreams = Readonly<{
59
+ stderr: Writable;
60
+ stdin: Readable;
61
+ stdout: Writable;
62
+ }>;
63
+ export type RunnethSshTarget = Readonly<{
64
+ createdAt: string;
65
+ name: string;
66
+ resourceUrl: string;
67
+ sshUrl: string;
68
+ updatedAt: string;
69
+ }>;
70
+ export type RunnethSshTargetStore = Readonly<{
71
+ defaultTarget?: string;
72
+ targets: readonly RunnethSshTarget[];
73
+ version: 1;
74
+ }>;
75
+ export type ResolvedRunnethSshTarget = Readonly<{
76
+ resourceUrl: string;
77
+ sshUrl: string;
78
+ targetName?: string;
79
+ }>;
80
+ export type OpenSshOptions = Readonly<{
81
+ readonly extraArgs: readonly string[];
82
+ readonly setup: RunnethSshSetupResult;
83
+ }>;
84
+ export declare const normalizeRunnethSshTargetName: (value: string) => string;
85
+ export declare const resolveRunnethSshAppUrl: (input: {
86
+ readonly resourceUrl: string;
87
+ readonly sshUrl?: string;
88
+ }) => string;
89
+ export declare const resolveRunnethSshTargetsPath: (input: {
90
+ readonly homePath?: string;
91
+ }) => string;
92
+ export declare const resolveRunnethSshTargetPaths: (input: {
93
+ readonly homePath?: string;
94
+ readonly resourceUrl: string;
95
+ readonly sshUrl?: string;
96
+ }) => RunnethSshTargetPaths;
97
+ export declare const resolveRunnethSshSharedKeyPaths: (input: {
98
+ readonly homePath?: string;
99
+ }) => RunnethSshKeyPaths;
100
+ export declare const readRunnethSshTargetStore: (input: {
101
+ readonly homePath?: string;
102
+ }) => Promise<RunnethSshTargetStore>;
103
+ export declare const saveRunnethSshTarget: (input: {
104
+ readonly homePath?: string;
105
+ readonly makeDefault?: boolean;
106
+ readonly name: string;
107
+ readonly resourceUrl: string;
108
+ readonly sshUrl?: string;
109
+ }) => Promise<Readonly<{
110
+ store: RunnethSshTargetStore;
111
+ target: RunnethSshTarget;
112
+ }>>;
113
+ export declare const setDefaultRunnethSshTarget: (input: {
114
+ readonly homePath?: string;
115
+ readonly name: string;
116
+ }) => Promise<RunnethSshTargetStore>;
117
+ export declare const removeRunnethSshTarget: (input: {
118
+ readonly homePath?: string;
119
+ readonly name: string;
120
+ }) => Promise<RunnethSshTargetStore>;
121
+ export declare const resolveRunnethSshTarget: (input: {
122
+ readonly homePath?: string;
123
+ readonly resourceUrl?: string;
124
+ readonly sshUrl?: string;
125
+ readonly targetName?: string;
126
+ }) => Promise<ResolvedRunnethSshTarget>;
127
+ export declare const installRunnethSshAccess: (options: RunnethSshSetupOptions) => Promise<RunnethSshSetupResult>;
128
+ export declare const runRunnethSshProxy: (options: RunnethSshProxyOptions) => Promise<void>;
129
+ export declare const runOpenSsh: (options: OpenSshOptions) => Promise<number>;