chore: add info
This commit is contained in:
@@ -5,7 +5,7 @@ import { Terminal } from './terminal/Terminal'
|
||||
import { EventBroadcaster } from './utils/EventBroadcaster'
|
||||
|
||||
export const WEBSHELL_VERSION = "0.2.1"
|
||||
export const VERSION_COMMENT: string | null = "hi"
|
||||
export const INFO_COMMENT: string | null = "hi"
|
||||
|
||||
// initialize object store for webfs
|
||||
let WebfsDatabase: IDBDatabase | null = null
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GetCurrentTerminal, WEBSHELL_VERSION, VERSION_COMMENT } from '../app'
|
||||
import { GetCurrentTerminal, WEBSHELL_VERSION, INFO_COMMENT } from '../app'
|
||||
import type { Item } from '../fs/Item'
|
||||
import { Terminal } from '../terminal/Terminal'
|
||||
import type { SimpleStream } from '../utils/SimpleStream'
|
||||
@@ -6,13 +6,19 @@ import { Program } from './Program'
|
||||
|
||||
export class Info extends Program {
|
||||
async Exec(_: SimpleStream<string>, stdout: SimpleStream<string>, __: Item, ___: string[]): Promise<number> {
|
||||
stdout.emit(`Webshell v${WEBSHELL_VERSION}\n`)
|
||||
stdout.emit(`Terminal v${Terminal.Version}\n`)
|
||||
stdout.emit(`Running ${GetCurrentTerminal().GetShell()?.Name} v${GetCurrentTerminal().GetShell()?.Version}\n`)
|
||||
stdout.emit(`binekrasik's Webshell\n`)
|
||||
stdout.emit(`Copyright (C) 2026 binekrasik.\n\n`)
|
||||
stdout.emit(`Webshell and its components are licensed under the Apache 2.0 license.\n`)
|
||||
stdout.emit(`Source available at https://git.martinpetr.dev/binekrasik/webshell.\n\n`)
|
||||
|
||||
// print a comment for the current release if any
|
||||
if (VERSION_COMMENT)
|
||||
stdout.emit(`-> ${VERSION_COMMENT}\n`)
|
||||
// print a comment for the current release (if any)
|
||||
if (INFO_COMMENT)
|
||||
stdout.emit(`${INFO_COMMENT}\n\n`)
|
||||
|
||||
stdout.emit(`-> Versions\n`)
|
||||
stdout.emit(` | Webshell ${WEBSHELL_VERSION}\n`)
|
||||
stdout.emit(` | Terminal ${Terminal.Version}\n`)
|
||||
stdout.emit(` | Shell '${GetCurrentTerminal().GetShell()?.Name}' version ${GetCurrentTerminal().GetShell()?.Version}\n\n`)
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user