-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Devpodio/branch0.5.0
Branch 0.5.0
- Loading branch information
Showing
12 changed files
with
113 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
packages/plugin-ext-vscode/src/node/plugin-vscode-cli-contribution.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/******************************************************************************** | ||
* Copyright (C) 2019 Red Hat, Inc. and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the Eclipse | ||
* Public License v. 2.0 are satisfied: GNU General Public License, version 2 | ||
* with the GNU Classpath Exception which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
********************************************************************************/ | ||
|
||
import { injectable } from 'inversify'; | ||
import { Argv, Arguments } from 'yargs'; | ||
import { CliContribution } from '@devpodio/core/lib/node/cli'; | ||
import { PluginHostEnvironmentVariable } from '@devpodio/plugin-ext/lib/common'; | ||
import { VSCODE_DEFAULT_API_VERSION } from './plugin-vscode-init'; | ||
/** | ||
* CLI Contribution allowing to override the VS Code API version which is returned by `vscode.version` API call. | ||
*/ | ||
@injectable() | ||
export class PluginVsCodeCliContribution implements CliContribution, PluginHostEnvironmentVariable { | ||
|
||
static VSCODE_API_VERSION = 'vscode-api-version'; | ||
|
||
protected vsCodeApiVersion: string | undefined; | ||
|
||
configure(conf: Argv): void { | ||
conf.option(PluginVsCodeCliContribution.VSCODE_API_VERSION, { | ||
// tslint:disable-next-line:max-line-length | ||
description: `Overrides the version returned by VSCode API 'vscode.version'. Example: --${PluginVsCodeCliContribution.VSCODE_API_VERSION}=<Wanted Version>. Default [${VSCODE_DEFAULT_API_VERSION}]`, | ||
type: 'string', | ||
nargs: 1 | ||
}); | ||
} | ||
|
||
setArguments(args: Arguments): void { | ||
const arg = args[PluginVsCodeCliContribution.VSCODE_API_VERSION]; | ||
if (arg) { | ||
this.vsCodeApiVersion = arg; | ||
} | ||
} | ||
|
||
process(env: NodeJS.ProcessEnv): void { | ||
if (this.vsCodeApiVersion) { | ||
env['VSCODE_API_VERSION'] = this.vsCodeApiVersion; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -699,6 +699,7 @@ | |
"@types/yargs@^11.1.0": | ||
version "11.1.2" | ||
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-11.1.2.tgz#fd4b676846fe731a5de5c6d2e5ef6a377262fc30" | ||
integrity sha512-zG61PAp2OcoIBjRV44wftJj6AJgzJrOc32LCYOBqk9bdgcdzK5DCJHV9QZJ60+Fu+fOn79g8Ks3Gixm4CfkZ+w== | ||
|
||
"@webassemblyjs/[email protected]": | ||
version "1.7.8" | ||
|