mirror of
https://github.com/coder/code-server.git
synced 2025-07-31 14:04:06 +08:00
Refactor vscode endpoints to use fork directly.
This commit is contained in:
@ -3,11 +3,13 @@ import { JSONSchemaForNPMPackageJsonFiles } from "@schemastore/package"
|
||||
import * as os from "os"
|
||||
import * as path from "path"
|
||||
|
||||
export const WORKBENCH_WEB_CONFIG_ID = "vscode-workbench-web-configuration"
|
||||
|
||||
export function getPackageJson(relativePath: string): JSONSchemaForNPMPackageJsonFiles {
|
||||
let pkg = {}
|
||||
try {
|
||||
pkg = require(relativePath)
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
logger.warn(error.message)
|
||||
}
|
||||
|
||||
@ -19,5 +21,6 @@ const pkg = getPackageJson("../../package.json")
|
||||
export const version = pkg.version || "development"
|
||||
export const commit = pkg.commit || "development"
|
||||
export const rootPath = path.resolve(__dirname, "../..")
|
||||
export const vsRootPath = path.join(rootPath, "vendor/modules/code-oss-dev")
|
||||
export const tmpdir = path.join(os.tmpdir(), "code-server")
|
||||
export const isDevMode = commit === "development"
|
||||
|
Reference in New Issue
Block a user