chore: dev env for #383
This commit is contained in:
parent
2ddf6c6ead
commit
626e581921
4 changed files with 979 additions and 2 deletions
66
app/types/config.ts
Normal file
66
app/types/config.ts
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
// app/types/config.ts
|
||||||
|
export interface SSHConfig {
|
||||||
|
host: string | null
|
||||||
|
port: number
|
||||||
|
term: string
|
||||||
|
readyTimeout: number
|
||||||
|
keepaliveInterval: number
|
||||||
|
keepaliveCountMax: number
|
||||||
|
disableInteractiveAuth: boolean
|
||||||
|
alwaysSendKeyboardInteractivePrompts: boolean
|
||||||
|
algorithms: {
|
||||||
|
cipher: string[]
|
||||||
|
compress: string[]
|
||||||
|
hmac: string[]
|
||||||
|
kex: string[]
|
||||||
|
serverHostKey: string[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface WebSSH2Config {
|
||||||
|
listen: {
|
||||||
|
ip: string
|
||||||
|
port: number
|
||||||
|
}
|
||||||
|
http: {
|
||||||
|
origins: string[]
|
||||||
|
}
|
||||||
|
user: {
|
||||||
|
name: string | null
|
||||||
|
password: string | null
|
||||||
|
privateKey: string | null
|
||||||
|
passphrase?: string | null
|
||||||
|
}
|
||||||
|
ssh: SSHConfig
|
||||||
|
useminified?: boolean
|
||||||
|
header?: {
|
||||||
|
text: string | null
|
||||||
|
background?: string
|
||||||
|
}
|
||||||
|
session?: {
|
||||||
|
secret?: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SSHCredentials {
|
||||||
|
username: string
|
||||||
|
password?: string
|
||||||
|
privateKey?: string
|
||||||
|
passphrase?: string
|
||||||
|
host: string
|
||||||
|
port: number
|
||||||
|
term?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SessionState {
|
||||||
|
authenticated: boolean
|
||||||
|
username: string | null
|
||||||
|
password: string | null
|
||||||
|
privateKey: string | null
|
||||||
|
passphrase: string | null
|
||||||
|
host: string | null
|
||||||
|
port: number | null
|
||||||
|
term: string | null
|
||||||
|
cols: number | null
|
||||||
|
rows: number | null
|
||||||
|
}
|
14
jest.config.js
Normal file
14
jest.config.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
// jest.config.js
|
||||||
|
export default {
|
||||||
|
preset: "ts-jest",
|
||||||
|
testEnvironment: "node",
|
||||||
|
moduleNameMapper: {
|
||||||
|
"^@/(.*)$": "<rootDir>/app/$1"
|
||||||
|
},
|
||||||
|
transform: {
|
||||||
|
"^.+\\.tsx?$": ["ts-jest", {
|
||||||
|
useESM: true
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
extensionsToTreatAsEsm: [".ts"]
|
||||||
|
}
|
889
package-lock.json
generated
889
package-lock.json
generated
File diff suppressed because it is too large
Load diff
12
package.json
12
package.json
|
@ -75,6 +75,14 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.16.0",
|
"@eslint/js": "^9.16.0",
|
||||||
|
"@types/debug": "^4.1.12",
|
||||||
|
"@types/express": "^5.0.0",
|
||||||
|
"@types/express-session": "^1.18.1",
|
||||||
|
"@types/node": "^22.10.2",
|
||||||
|
"@types/ssh2": "^1.15.1",
|
||||||
|
"@types/validator": "^13.12.2",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
||||||
|
"@typescript-eslint/parser": "^8.18.0",
|
||||||
"eslint": "^9.16.0",
|
"eslint": "^9.16.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
|
@ -82,7 +90,9 @@
|
||||||
"eslint-plugin-security": "^3.0.1",
|
"eslint-plugin-security": "^3.0.1",
|
||||||
"jest": "^21.2.1",
|
"jest": "^21.2.1",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"standard-version": "^4.4.0"
|
"standard-version": "^4.4.0",
|
||||||
|
"ts-node": "^10.9.2",
|
||||||
|
"typescript": "^5.7.2"
|
||||||
},
|
},
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|
Loading…
Reference in a new issue