mirror of
https://github.com/coder/code-server.git
synced 2026-02-19 18:01:15 +08:00
- Add VS Code icon - Trim dashboard to just display dedicated VS Code section - Version was getting unset during build - Add back nbin shim which I temporarily took out earlier - Update tests for log level env var changes
29 lines
723 B
TypeScript
29 lines
723 B
TypeScript
import * as path from "path"
|
|
import { Application } from "../../common/api"
|
|
|
|
const getVscodeVersion = (): string => {
|
|
try {
|
|
return require(path.resolve(__dirname, "../../../lib/vscode/package.json")).version
|
|
} catch (error) {
|
|
return "unknown"
|
|
}
|
|
}
|
|
|
|
export const Vscode: Application = {
|
|
categories: ["Editor"],
|
|
installed: true,
|
|
name: "VS Code",
|
|
path: "/vscode",
|
|
version: getVscodeVersion(),
|
|
}
|
|
|
|
export const findApplications = async (): Promise<ReadonlyArray<Application>> => {
|
|
const apps: Application[] = [Vscode]
|
|
|
|
return apps.sort((a, b): number => a.name.localeCompare(b.name))
|
|
}
|
|
|
|
export const findWhitelistedApplications = async (): Promise<ReadonlyArray<Application>> => {
|
|
return [Vscode]
|
|
}
|