mirror of
https://github.com/EthanShoeDev/fressh.git
synced 2026-01-11 14:22:51 +00:00
passing lint
This commit is contained in:
@@ -33,8 +33,8 @@ export type ConnectionDetails = {
|
|||||||
port: number;
|
port: number;
|
||||||
username: string;
|
username: string;
|
||||||
security:
|
security:
|
||||||
| { type: 'password'; password: string }
|
| { type: 'password'; password: string }
|
||||||
| { type: 'key'; privateKey: string };
|
| { type: 'key'; privateKey: string };
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -323,8 +323,8 @@ function wrapConnection(
|
|||||||
term: terminalTypeLiteralToEnum[params.term],
|
term: terminalTypeLiteralToEnum[params.term],
|
||||||
onClosedCallback: onClosed
|
onClosedCallback: onClosed
|
||||||
? {
|
? {
|
||||||
onChange: (channelId) => onClosed(channelId),
|
onChange: (channelId) => onClosed(channelId),
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
terminalMode: params.terminalMode,
|
terminalMode: params.terminalMode,
|
||||||
terminalPixelSize: params.terminalPixelSize,
|
terminalPixelSize: params.terminalPixelSize,
|
||||||
@@ -343,11 +343,11 @@ async function connect(options: ConnectOptions): Promise<SshConnection> {
|
|||||||
const security =
|
const security =
|
||||||
options.security.type === 'password'
|
options.security.type === 'password'
|
||||||
? new GeneratedRussh.Security.Password({
|
? new GeneratedRussh.Security.Password({
|
||||||
password: options.security.password,
|
password: options.security.password,
|
||||||
})
|
})
|
||||||
: new GeneratedRussh.Security.Key({
|
: new GeneratedRussh.Security.Key({
|
||||||
privateKeyContent: options.security.privateKey,
|
privateKeyContent: options.security.privateKey,
|
||||||
});
|
});
|
||||||
const sshConnection = await GeneratedRussh.connect(
|
const sshConnection = await GeneratedRussh.connect(
|
||||||
{
|
{
|
||||||
connectionDetails: {
|
connectionDetails: {
|
||||||
@@ -358,16 +358,16 @@ async function connect(options: ConnectOptions): Promise<SshConnection> {
|
|||||||
},
|
},
|
||||||
onConnectionProgressCallback: options.onConnectionProgress
|
onConnectionProgressCallback: options.onConnectionProgress
|
||||||
? {
|
? {
|
||||||
onChange: (statusEnum) =>
|
onChange: (statusEnum) =>
|
||||||
options.onConnectionProgress!(
|
options.onConnectionProgress!(
|
||||||
sshConnProgressEnumToLiteral[statusEnum]
|
sshConnProgressEnumToLiteral[statusEnum]
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
onDisconnectedCallback: options.onDisconnected
|
onDisconnectedCallback: options.onDisconnected
|
||||||
? {
|
? {
|
||||||
onChange: (connectionId) => options.onDisconnected!(connectionId),
|
onChange: (connectionId) => options.onDisconnected!(connectionId),
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
},
|
},
|
||||||
options.abortSignal ? { signal: options.abortSignal } : undefined
|
options.abortSignal ? { signal: options.abortSignal } : undefined
|
||||||
|
|||||||
Reference in New Issue
Block a user