Prepare for release
- 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
This commit is contained in:
@ -11,6 +11,7 @@ const getVscodeVersion = (): string => {
|
||||
|
||||
export const Vscode: Application = {
|
||||
categories: ["Editor"],
|
||||
installed: true,
|
||||
name: "VS Code",
|
||||
path: "/vscode",
|
||||
version: getVscodeVersion(),
|
||||
@ -23,5 +24,5 @@ export const findApplications = async (): Promise<ReadonlyArray<Application>> =>
|
||||
}
|
||||
|
||||
export const findWhitelistedApplications = async (): Promise<ReadonlyArray<Application>> => {
|
||||
return []
|
||||
return [Vscode]
|
||||
}
|
||||
|
@ -35,10 +35,10 @@ export class VscodeHttpProvider extends HttpProvider {
|
||||
const id = generateUuid()
|
||||
const vscode = await this.fork()
|
||||
|
||||
logger.debug("Setting up VS Code...")
|
||||
logger.debug("setting up vs code...")
|
||||
return new Promise<WorkbenchOptions>((resolve, reject) => {
|
||||
vscode.once("message", (message: VscodeMessage) => {
|
||||
logger.debug("Got message from VS Code", field("message", message))
|
||||
logger.debug("got message from vs code", field("message", message))
|
||||
return message.type === "options" && message.id === id
|
||||
? resolve(message.options)
|
||||
: reject(new Error("Unexpected response during initialization"))
|
||||
@ -51,7 +51,7 @@ export class VscodeHttpProvider extends HttpProvider {
|
||||
|
||||
private fork(): Promise<cp.ChildProcess> {
|
||||
if (!this._vscode) {
|
||||
logger.debug("Forking VS Code...")
|
||||
logger.debug("forking vs code...")
|
||||
const vscode = cp.fork(path.join(this.serverRootPath, "fork"))
|
||||
vscode.on("error", (error) => {
|
||||
logger.error(error.message)
|
||||
@ -64,7 +64,7 @@ export class VscodeHttpProvider extends HttpProvider {
|
||||
|
||||
this._vscode = new Promise((resolve, reject) => {
|
||||
vscode.once("message", (message: VscodeMessage) => {
|
||||
logger.debug("Got message from VS Code", field("message", message))
|
||||
logger.debug("got message from vs code", field("message", message))
|
||||
return message.type === "ready"
|
||||
? resolve(vscode)
|
||||
: reject(new Error("Unexpected response waiting for ready response"))
|
||||
|
@ -198,16 +198,17 @@ export const parse = (argv: string[]): Args => {
|
||||
|
||||
logger.debug("parsed command line", field("args", args))
|
||||
|
||||
if (process.env.LOG_LEVEL === "trace" || args.verbose) {
|
||||
// Ensure the environment variable and the flag are synced up. The flag takes
|
||||
// priority over the environment variable.
|
||||
if (args.log === "trace" || process.env.LOG_LEVEL === "trace" || args.verbose) {
|
||||
args.log = process.env.LOG_LEVEL = "trace"
|
||||
args.verbose = true
|
||||
args.log = "trace"
|
||||
} else if (!args.log) {
|
||||
} else if (!args.log && process.env.LOG_LEVEL) {
|
||||
args.log = process.env.LOG_LEVEL
|
||||
} else if (args.log) {
|
||||
process.env.LOG_LEVEL = args.log
|
||||
}
|
||||
|
||||
// Ensure this passes down to forked processes.
|
||||
process.env.LOG_LEVEL = args.log
|
||||
|
||||
switch (args.log) {
|
||||
case "trace":
|
||||
logger.level = Level.Trace
|
||||
|
@ -110,7 +110,7 @@ if (args.help) {
|
||||
process.exit(0)
|
||||
} else if (args["list-extensions"] || args["install-extension"] || args["uninstall-extension"]) {
|
||||
process.env.NBIN_BYPASS = "true"
|
||||
logger.debug("Forking VS Code CLI...")
|
||||
logger.debug("forking vs code cli...")
|
||||
const vscode = cp.fork(path.resolve(__dirname, "../../lib/vscode/out/vs/server/fork"), [], {
|
||||
env: {
|
||||
...process.env,
|
||||
|
Reference in New Issue
Block a user