Merge branch 'master' into 99129-theme-colour-git-staged

This commit is contained in:
Michael Wood 2020-09-28 08:02:47 +02:00 committed by GitHub
commit b8c953da4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
216 changed files with 2925 additions and 2578 deletions

View file

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vscode-github-triage-actions/master/classifier-deep/apply/apply-labels/deep-classifier-config.schema.json",
"vacation": ["joaomoreno"],
"vacation": ["joaomoreno"],
"assignees": {
"JacksonKearl": {"accuracy": 0.5}
},
@ -20,8 +20,8 @@
"context-keys": {"assign": []},
"css-less-scss": {"assign": ["aeschli"]},
"custom-editors": {"assign": ["mjbvz"]},
"debug": {"assign": ["weinand"]},
"debug-console": {"assign": ["weinand"]},
"debug": {"assign": ["isidorn"]},
"debug-console": {"assign": ["isidorn"]},
"dialogs": {"assign": ["sbatten"]},
"diff-editor": {"assign": []},
"dropdown": {"assign": []},

4
build/.gitignore vendored
View file

@ -1 +1,3 @@
*.js
azure-pipelines/**/*.js
darwin/**/*.js
lib/**/*.js

View file

@ -14,7 +14,7 @@ const i18n = require('./lib/i18n');
const standalone = require('./lib/standalone');
const cp = require('child_process');
const compilation = require('./lib/compilation');
const monacoapi = require('./monaco/api');
const monacoapi = require('./lib/monaco-api');
const fs = require('fs');
const webpack = require('webpack');
const webpackGulp = require('webpack-stream');

View file

@ -3,38 +3,54 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
import * as rimraf from 'rimraf';
import * as es from 'event-stream';
import * as rename from 'gulp-rename';
import * as vfs from 'vinyl-fs';
import * as ext from './extensions';
import * as fancyLog from 'fancy-log';
import * as ansiColors from 'ansi-colors';
import { Stream } from 'stream';
const fs = require('fs');
const path = require('path');
const os = require('os');
const mkdirp = require('mkdirp');
const rimraf = require('rimraf');
const es = require('event-stream');
const rename = require('gulp-rename');
const vfs = require('vinyl-fs');
const ext = require('./extensions');
const fancyLog = require('fancy-log');
const ansiColors = require('ansi-colors');
const root = path.dirname(path.dirname(__dirname));
const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
const builtInExtensions = productjson.builtInExtensions;
const webBuiltInExtensions = productjson.webBuiltInExtensions;
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE'];
function log() {
if (ENABLE_LOGGING) {
fancyLog.apply(this, arguments);
interface IExtensionDefinition {
name: string;
version: string;
repo: string;
metadata: {
id: string;
publisherId: {
publisherId: string;
publisherName: string;
displayName: string;
flags: string;
};
publisherDisplayName: string;
}
}
function getExtensionPath(extension) {
const root = path.dirname(path.dirname(__dirname));
const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
const builtInExtensions = <IExtensionDefinition[]>productjson.builtInExtensions;
const webBuiltInExtensions = <IExtensionDefinition[]>productjson.webBuiltInExtensions;
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE'];
function log(...messages: string[]): void {
if (ENABLE_LOGGING) {
fancyLog(...messages);
}
}
function getExtensionPath(extension: IExtensionDefinition): string {
return path.join(root, '.build', 'builtInExtensions', extension.name);
}
function isUpToDate(extension) {
function isUpToDate(extension: IExtensionDefinition): boolean {
const packagePath = path.join(getExtensionPath(extension), 'package.json');
if (!fs.existsSync(packagePath)) {
@ -51,7 +67,7 @@ function isUpToDate(extension) {
}
}
function syncMarketplaceExtension(extension) {
function syncMarketplaceExtension(extension: IExtensionDefinition): Stream {
if (isUpToDate(extension)) {
log(ansiColors.blue('[marketplace]'), `${extension.name}@${extension.version}`, ansiColors.green('✔︎'));
return es.readArray([]);
@ -65,7 +81,7 @@ function syncMarketplaceExtension(extension) {
.on('end', () => log(ansiColors.blue('[marketplace]'), extension.name, ansiColors.green('✔︎')));
}
function syncExtension(extension, controlState) {
function syncExtension(extension: IExtensionDefinition, controlState: 'disabled' | 'marketplace'): Stream {
switch (controlState) {
case 'disabled':
log(ansiColors.blue('[disabled]'), ansiColors.gray(extension.name));
@ -89,7 +105,11 @@ function syncExtension(extension, controlState) {
}
}
function readControlFile() {
interface IControlFile {
[name: string]: 'disabled' | 'marketplace';
}
function readControlFile(): IControlFile {
try {
return JSON.parse(fs.readFileSync(controlFilePath, 'utf8'));
} catch (err) {
@ -97,17 +117,17 @@ function readControlFile() {
}
}
function writeControlFile(control) {
function writeControlFile(control: IControlFile): void {
mkdirp.sync(path.dirname(controlFilePath));
fs.writeFileSync(controlFilePath, JSON.stringify(control, null, 2));
}
exports.getBuiltInExtensions = function getBuiltInExtensions() {
export function getBuiltInExtensions(): Promise<void> {
log('Syncronizing built-in extensions...');
log(`You can manage built-in extensions with the ${ansiColors.cyan('--builtin')} flag`);
const control = readControlFile();
const streams = [];
const streams: Stream[] = [];
for (const extension of [...builtInExtensions, ...webBuiltInExtensions]) {
let controlState = control[extension.name] || 'marketplace';
@ -123,10 +143,10 @@ exports.getBuiltInExtensions = function getBuiltInExtensions() {
.on('error', reject)
.on('end', resolve);
});
};
}
if (require.main === module) {
exports.getBuiltInExtensions().then(() => process.exit(0)).catch(err => {
getBuiltInExtensions().then(() => process.exit(0)).catch(err => {
console.error(err);
process.exit(1);
});

View file

@ -12,7 +12,7 @@ import * as bom from 'gulp-bom';
import * as sourcemaps from 'gulp-sourcemaps';
import * as tsb from 'gulp-tsb';
import * as path from 'path';
import * as monacodts from '../monaco/api';
import * as monacodts from './monaco-api';
import * as nls from './nls';
import { createReporter } from './reporter';
import * as util from './util';

View file

@ -13,6 +13,10 @@
'use strict';
import * as eslint from 'eslint';
import { TSESTree } from '@typescript-eslint/experimental-utils';
import * as ESTree from 'estree';
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
@ -50,29 +54,29 @@ module.exports = {
]
},
create(context) {
create(context: eslint.Rule.RuleContext) {
const config = context.options[0] || {},
allowShortCircuit = config.allowShortCircuit || false,
allowTernary = config.allowTernary || false,
allowTaggedTemplates = config.allowTaggedTemplates || false;
// eslint-disable-next-line jsdoc/require-description
/**
* @param {ASTNode} node any node
* @returns {boolean} whether the given node structurally represents a directive
*/
function looksLikeDirective(node) {
/**
* @param node any node
* @returns whether the given node structurally represents a directive
*/
function looksLikeDirective(node: TSESTree.Node): boolean {
return node.type === 'ExpressionStatement' &&
node.expression.type === 'Literal' && typeof node.expression.value === 'string';
}
// eslint-disable-next-line jsdoc/require-description
/**
* @param {Function} predicate ([a] -> Boolean) the function used to make the determination
* @param {a[]} list the input list
* @returns {a[]} the leading sequence of members in the given list that pass the given predicate
*/
function takeWhile(predicate, list) {
/**
* @param predicate ([a] -> Boolean) the function used to make the determination
* @param list the input list
* @returns the leading sequence of members in the given list that pass the given predicate
*/
function takeWhile<T>(predicate: (item: T) => boolean, list: T[]): T[] {
for (let i = 0; i < list.length; ++i) {
if (!predicate(list[i])) {
return list.slice(0, i);
@ -82,21 +86,21 @@ module.exports = {
}
// eslint-disable-next-line jsdoc/require-description
/**
* @param {ASTNode} node a Program or BlockStatement node
* @returns {ASTNode[]} the leading sequence of directive nodes in the given node's body
*/
function directives(node) {
/**
* @param node a Program or BlockStatement node
* @returns the leading sequence of directive nodes in the given node's body
*/
function directives(node: TSESTree.Program | TSESTree.BlockStatement): TSESTree.Node[] {
return takeWhile(looksLikeDirective, node.body);
}
// eslint-disable-next-line jsdoc/require-description
/**
* @param {ASTNode} node any node
* @param {ASTNode[]} ancestors the given node's ancestors
* @returns {boolean} whether the given node is considered a directive in its current position
*/
function isDirective(node, ancestors) {
/**
* @param node any node
* @param ancestors the given node's ancestors
* @returns whether the given node is considered a directive in its current position
*/
function isDirective(node: TSESTree.Node, ancestors: TSESTree.Node[]): boolean {
const parent = ancestors[ancestors.length - 1],
grandparent = ancestors[ancestors.length - 2];
@ -105,12 +109,12 @@ module.exports = {
directives(parent).indexOf(node) >= 0;
}
/**
* Determines whether or not a given node is a valid expression. Recurses on short circuit eval and ternary nodes if enabled by flags.
* @param {ASTNode} node any node
* @returns {boolean} whether the given node is a valid expression
*/
function isValidExpression(node) {
/**
* Determines whether or not a given node is a valid expression. Recurses on short circuit eval and ternary nodes if enabled by flags.
* @param node any node
* @returns whether the given node is a valid expression
*/
function isValidExpression(node: TSESTree.Node): boolean {
if (allowTernary) {
// Recursive check for ternary and logical expressions
@ -134,9 +138,9 @@ module.exports = {
}
return {
ExpressionStatement(node) {
if (!isValidExpression(node.expression) && !isDirective(node, context.getAncestors())) {
context.report({ node, message: 'Expected an assignment or function call and instead saw an expression.' });
ExpressionStatement(node: TSESTree.ExpressionStatement) {
if (!isValidExpression(node.expression) && !isDirective(node, <TSESTree.Node[]>context.getAncestors())) {
context.report({ node: <ESTree.Node>node, message: 'Expected an assignment or function call and instead saw an expression.' });
}
}
};

View file

@ -14,7 +14,7 @@ const dtsv = '3';
const tsfmt = require('../../tsfmt.json');
const SRC = path.join(__dirname, '../../src');
export const RECIPE_PATH = path.join(__dirname, './monaco.d.ts.recipe');
export const RECIPE_PATH = path.join(__dirname, '../monaco/monaco.d.ts.recipe');
const DECLARATION_PATH = path.join(__dirname, '../../src/vs/monaco.d.ts');
function logErr(message: any, ...rest: any[]): void {

View file

@ -3,16 +3,17 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var path = require('path');
var cp = require('child_process');
var fs = require('fs');
var File = require('vinyl');
var es = require('event-stream');
var filter = require('gulp-filter');
import * as path from 'path';
import * as cp from 'child_process';
import * as fs from 'fs';
import * as File from 'vinyl';
import * as es from 'event-stream';
import * as filter from 'gulp-filter';
import { Stream } from 'stream';
var watcherPath = path.join(__dirname, 'watcher.exe');
const watcherPath = path.join(__dirname, 'watcher.exe');
function toChangeType(type) {
function toChangeType(type: '0' | '1' | '2'): 'change' | 'add' | 'unlink' {
switch (type) {
case '0': return 'change';
case '1': return 'add';
@ -20,33 +21,33 @@ function toChangeType(type) {
}
}
function watch(root) {
var result = es.through();
var child = cp.spawn(watcherPath, [root]);
function watch(root: string): Stream {
const result = es.through();
let child: cp.ChildProcess | null = cp.spawn(watcherPath, [root]);
child.stdout.on('data', function (data) {
var lines = data.toString('utf8').split('\n');
for (var i = 0; i < lines.length; i++) {
var line = lines[i].trim();
const lines: string[] = data.toString('utf8').split('\n');
for (let i = 0; i < lines.length; i++) {
const line = lines[i].trim();
if (line.length === 0) {
continue;
}
var changeType = line[0];
var changePath = line.substr(2);
const changeType = <'0' | '1' | '2'>line[0];
const changePath = line.substr(2);
// filter as early as possible
if (/^\.git/.test(changePath) || /(^|\\)out($|\\)/.test(changePath)) {
continue;
}
var changePathFull = path.join(root, changePath);
const changePathFull = path.join(root, changePath);
var file = new File({
const file = new File({
path: changePathFull,
base: root
});
file.event = toChangeType(changeType);
(<any>file).event = toChangeType(changeType);
result.emit('data', file);
}
});
@ -62,44 +63,44 @@ function watch(root) {
process.once('SIGTERM', function () { process.exit(0); });
process.once('SIGTERM', function () { process.exit(0); });
process.once('exit', function () { child && child.kill(); });
process.once('exit', function () { if (child) { child.kill(); } });
return result;
}
var cache = Object.create(null);
const cache: { [cwd: string]: Stream; } = Object.create(null);
module.exports = function (pattern, options) {
module.exports = function (pattern: string | string[] | filter.FileFunction, options?: { cwd?: string; base?: string; }) {
options = options || {};
var cwd = path.normalize(options.cwd || process.cwd());
var watcher = cache[cwd];
const cwd = path.normalize(options.cwd || process.cwd());
let watcher = cache[cwd];
if (!watcher) {
watcher = cache[cwd] = watch(cwd);
}
var rebase = !options.base ? es.through() : es.mapSync(function (f) {
f.base = options.base;
const rebase = !options.base ? es.through() : es.mapSync(function (f: File) {
f.base = options!.base!;
return f;
});
return watcher
.pipe(filter(['**', '!.git{,/**}'])) // ignore all things git
.pipe(filter(pattern))
.pipe(es.map(function (file, cb) {
.pipe(es.map(function (file: File, cb) {
fs.stat(file.path, function (err, stat) {
if (err && err.code === 'ENOENT') { return cb(null, file); }
if (err && err.code === 'ENOENT') { return cb(undefined, file); }
if (err) { return cb(); }
if (!stat.isFile()) { return cb(); }
fs.readFile(file.path, function (err, contents) {
if (err && err.code === 'ENOENT') { return cb(null, file); }
if (err && err.code === 'ENOENT') { return cb(undefined, file); }
if (err) { return cb(); }
file.contents = contents;
file.stat = stat;
cb(null, file);
cb(undefined, file);
});
});
}))

View file

@ -45,7 +45,7 @@
"minimist": "^1.2.3",
"request": "^2.85.0",
"terser": "4.3.8",
"typescript": "^4.1.0-dev.20200918",
"typescript": "^4.1.0-dev.20200924",
"vsce": "1.48.0",
"vscode-telemetry-extractor": "^1.6.0",
"xml2js": "^0.4.17"

View file

@ -2535,10 +2535,10 @@ typescript@^3.0.1:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
typescript@^4.1.0-dev.20200918:
version "4.1.0-dev.20200918"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.0-dev.20200918.tgz#b00beedf2da8dbba09284085114e77bf8f329686"
integrity sha512-cEcXJvz55OH3k3cmpMYoVfqdAQ2YvgeccUmccmleUnQ8VqR8T/7GI761Qky/vGZO/VhiU3Y8xJF3oLkAkNrG1g==
typescript@^4.1.0-dev.20200924:
version "4.1.0-dev.20200924"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.0-dev.20200924.tgz#d8b2aaa6f94ec22725eafcadf0b9a17aae9c32b9"
integrity sha512-AXwqVrp2AeVZ3jaZ/gcvxb0nnvqEbDFuFFjvV5/9wfcyz7KZx5KvyJENUgGoJHywCvl1PHKasQKYjzjk1QixnQ==
typical@^4.0.0:
version "4.0.0"

View file

@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { window, workspace, Uri, Disposable, Event, EventEmitter, Decoration, DecorationProvider, ThemeColor } from 'vscode';
import { window, workspace, Uri, Disposable, Event, EventEmitter, FileDecoration, FileDecorationProvider, ThemeColor } from 'vscode';
import * as path from 'path';
import { Repository, GitResourceGroup } from './repository';
import { Model } from './model';
@ -11,16 +11,16 @@ import { debounce } from './decorators';
import { filterEvent, dispose, anyEvent, fireEvent, PromiseSource } from './util';
import { GitErrorCodes, Status } from './api/git';
class GitIgnoreDecorationProvider implements DecorationProvider {
class GitIgnoreDecorationProvider implements FileDecorationProvider {
private static Decoration: Decoration = { priority: 3, color: new ThemeColor('gitDecoration.ignoredResourceForeground') };
private static Decoration: FileDecoration = { color: new ThemeColor('gitDecoration.ignoredResourceForeground') };
readonly onDidChangeDecorations: Event<Uri[]>;
private queue = new Map<string, { repository: Repository; queue: Map<string, PromiseSource<Decoration | undefined>>; }>();
readonly onDidChange: Event<Uri[]>;
private queue = new Map<string, { repository: Repository; queue: Map<string, PromiseSource<FileDecoration | undefined>>; }>();
private disposables: Disposable[] = [];
constructor(private model: Model) {
this.onDidChangeDecorations = fireEvent(anyEvent<any>(
this.onDidChange = fireEvent(anyEvent<any>(
filterEvent(workspace.onDidSaveTextDocument, e => /\.gitignore$|\.git\/info\/exclude$/.test(e.uri.path)),
model.onDidOpenRepository,
model.onDidCloseRepository
@ -29,7 +29,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
this.disposables.push(window.registerDecorationProvider(this));
}
async provideDecoration(uri: Uri): Promise<Decoration | undefined> {
async provideFileDecoration(uri: Uri): Promise<FileDecoration | undefined> {
const repository = this.model.getRepository(uri);
if (!repository) {
@ -39,7 +39,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
let queueItem = this.queue.get(repository.root);
if (!queueItem) {
queueItem = { repository, queue: new Map<string, PromiseSource<Decoration | undefined>>() };
queueItem = { repository, queue: new Map<string, PromiseSource<FileDecoration | undefined>>() };
this.queue.set(repository.root, queueItem);
}
@ -84,19 +84,19 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
}
}
class GitDecorationProvider implements DecorationProvider {
class GitDecorationProvider implements FileDecorationProvider {
private static SubmoduleDecorationData: Decoration = {
title: 'Submodule',
letter: 'S',
private static SubmoduleDecorationData: FileDecoration = {
tooltip: 'Submodule',
badge: 'S',
color: new ThemeColor('gitDecoration.submoduleResourceForeground')
};
private readonly _onDidChangeDecorations = new EventEmitter<Uri[]>();
readonly onDidChangeDecorations: Event<Uri[]> = this._onDidChangeDecorations.event;
readonly onDidChange: Event<Uri[]> = this._onDidChangeDecorations.event;
private disposables: Disposable[] = [];
private decorations = new Map<string, Decoration>();
private decorations = new Map<string, FileDecoration>();
constructor(private repository: Repository) {
this.disposables.push(
@ -106,7 +106,7 @@ class GitDecorationProvider implements DecorationProvider {
}
private onDidRunGitStatus(): void {
let newDecorations = new Map<string, Decoration>();
let newDecorations = new Map<string, FileDecoration>();
this.collectSubmoduleDecorationData(newDecorations);
this.collectDecorationData(this.repository.indexGroup, newDecorations);
@ -119,7 +119,7 @@ class GitDecorationProvider implements DecorationProvider {
this._onDidChangeDecorations.fire([...uris.values()].map(value => Uri.parse(value, true)));
}
private collectDecorationData(group: GitResourceGroup, bucket: Map<string, Decoration>): void {
private collectDecorationData(group: GitResourceGroup, bucket: Map<string, FileDecoration>): void {
for (const r of group.resourceStates) {
const decoration = r.resourceDecoration;
@ -134,13 +134,13 @@ class GitDecorationProvider implements DecorationProvider {
}
}
private collectSubmoduleDecorationData(bucket: Map<string, Decoration>): void {
private collectSubmoduleDecorationData(bucket: Map<string, FileDecoration>): void {
for (const submodule of this.repository.submodules) {
bucket.set(Uri.file(path.join(this.repository.root, submodule.path)).toString(), GitDecorationProvider.SubmoduleDecorationData);
}
}
provideDecoration(uri: Uri): Decoration | undefined {
provideFileDecoration(uri: Uri): FileDecoration | undefined {
return this.decorations.get(uri.toString());
}

View file

@ -5,7 +5,7 @@
import * as fs from 'fs';
import * as path from 'path';
import { CancellationToken, Command, Disposable, Event, EventEmitter, Memento, OutputChannel, ProgressLocation, ProgressOptions, scm, SourceControl, SourceControlInputBox, SourceControlInputBoxValidation, SourceControlInputBoxValidationType, SourceControlResourceDecorations, SourceControlResourceGroup, SourceControlResourceState, ThemeColor, Uri, window, workspace, WorkspaceEdit, Decoration } from 'vscode';
import { CancellationToken, Command, Disposable, Event, EventEmitter, Memento, OutputChannel, ProgressLocation, ProgressOptions, scm, SourceControl, SourceControlInputBox, SourceControlInputBoxValidation, SourceControlInputBoxValidationType, SourceControlResourceDecorations, SourceControlResourceGroup, SourceControlResourceState, ThemeColor, Uri, window, workspace, WorkspaceEdit, FileDecoration } from 'vscode';
import * as nls from 'vscode-nls';
import { Branch, Change, GitErrorCodes, LogOptions, Ref, RefType, Remote, Status, CommitOptions, BranchQuery } from './api/git';
import { AutoFetcher } from './autofetch';
@ -256,14 +256,10 @@ export class Resource implements SourceControlResourceState {
}
}
get resourceDecoration(): Decoration {
return {
bubble: this.type !== Status.DELETED && this.type !== Status.INDEX_DELETED,
title: this.tooltip,
letter: this.letter,
color: this.color,
priority: this.priority
};
get resourceDecoration(): FileDecoration {
const res = new FileDecoration(this.letter, this.tooltip, this.color);
res.propagate = this.type !== Status.DELETED && this.type !== Status.INDEX_DELETED;
return res;
}
constructor(

View file

@ -121,9 +121,16 @@ export function activate(context: vscode.ExtensionContext) {
function relativePathToUri(path: string, resultsUri: vscode.Uri): vscode.Uri | undefined {
if (pathUtils.isAbsolute(path)) { return vscode.Uri.file(path); }
if (pathUtils.isAbsolute(path)) {
return vscode.Uri
.file(path)
.with({ scheme: process.env.HOME ? 'file' : 'vscode-userdata' });
}
if (path.indexOf('~/') === 0) {
return vscode.Uri.file(pathUtils.join(process.env.HOME!, path.slice(2)));
return vscode.Uri
.file(pathUtils.join(process.env.HOME ?? '', path.slice(2)))
.with({ scheme: process.env.HOME ? 'file' : 'vscode-userdata' });
}
const uriFromFolderWithPath = (folder: vscode.WorkspaceFolder, path: string): vscode.Uri =>

View file

@ -12,8 +12,6 @@
"activityBarBadge.background": "#007ACC",
"sideBarTitle.foreground": "#BBBBBB",
"input.placeholderForeground": "#A6A6A6",
"settings.textInputBackground": "#292929",
"settings.numberInputBackground": "#292929",
"menu.background": "#252526",
"menu.foreground": "#CCCCCC",
"statusBarItem.remoteForeground": "#FFF",

View file

@ -11,8 +11,6 @@
"list.activeSelectionBackground": "#75715E",
"list.focusBackground": "#414339",
"dropdown.listBackground": "#1e1f1c",
"settings.textInputBackground": "#32342d",
"settings.numberInputBackground": "#32342d",
"list.inactiveSelectionBackground": "#414339",
"list.hoverBackground": "#3e3d32",
"list.dropBackground": "#414339",
@ -46,6 +44,7 @@
"panelTitle.activeBorder": "#75715E",
"panelTitle.inactiveForeground": "#75715E",
"panel.border": "#414339",
"settings.focusedRowBackground": "#4143395A",
"titleBar.activeBackground": "#1e1f1c",
"statusBar.background": "#414339",
"statusBar.noFolderBackground": "#414339",

View file

@ -53,7 +53,7 @@ export function activate(
new TypeScriptVersion(
TypeScriptVersionSource.Bundled,
vscode.Uri.joinPath(context.extensionUri, 'dist/browser/typescript-web/tsserver.web.js').toString(),
API.v400));
API.fromSimpleString('4.0.3')));
const lazyClientHost = createLazyClientHost(context, false, {
pluginManager,

View file

@ -9,7 +9,7 @@ import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
export default class API {
private static fromSimpleString(value: string): API {
public static fromSimpleString(value: string): API {
return new API(value, value, value);
}

View file

@ -30,24 +30,23 @@
dependencies:
mkdirp "^1.0.4"
"@types/events@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==
"@tootallnate/once@1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==
"@types/glob@*":
version "7.1.1"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575"
integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==
version "7.1.3"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183"
integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==
dependencies:
"@types/events" "*"
"@types/minimatch" "*"
"@types/node" "*"
"@types/json-schema@^7.0.4":
version "7.0.5"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd"
integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==
"@types/json-schema@^7.0.5":
version "7.0.6"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==
"@types/minimatch@*":
version "3.0.3"
@ -55,14 +54,14 @@
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
"@types/node@*":
version "13.1.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.6.tgz#076028d0b0400be8105b89a0a55550c86684ffec"
integrity "sha1-B2Ao0LBAC+gQW4mgpVVQyGaE/+w= sha512-Jg1F+bmxcpENHP23sVKkNuU3uaxPnsBMW0cLjleiikFKomJQbsn0Cqk2yDvQArqzZN6ABfBkZ0To7pQ8sLdWDg=="
version "14.11.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.2.tgz#2de1ed6670439387da1c9f549a2ade2b0a799256"
integrity sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==
"@types/node@^12.11.7":
version "12.12.24"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.24.tgz#d4606afd8cf6c609036b854360367d1b2c78931f"
integrity "sha1-1GBq/Yz2xgkDa4VDYDZ9Gyx4kx8= sha512-1Ciqv9pqwVtW6FsIUKSZNB82E5Cu1I2bBTj1xuIHXLe/1zYLl3956Nbhg2MzSYHVfl9/rmanjbQIb7LibfCnug=="
version "12.12.62"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.62.tgz#733923d73669188d35950253dd18a21570085d2b"
integrity sha512-qAfo81CsD7yQIM9mVyh6B/U47li5g7cfpVQEDMfQeF8pSZVwzbhwU3crc0qG4DmpsebpJPR49AKOExQyJ05Cpg==
"@types/rimraf@2.0.2":
version "2.0.2"
@ -84,39 +83,36 @@ agent-base@4, agent-base@^4.3.0:
dependencies:
es6-promisify "^5.0.0"
agent-base@6:
version "6.0.1"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.1.tgz#808007e4e5867decb0ab6ab2f928fbdb5a596db4"
integrity sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==
dependencies:
debug "4"
aggregate-error@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0"
integrity sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==
version "3.1.0"
resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a"
integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==
dependencies:
clean-stack "^2.0.0"
indent-string "^4.0.0"
ajv-keywords@^3.4.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.1.tgz#b83ca89c5d42d69031f424cad49aada0236c6957"
integrity sha512-KWcq3xN8fDjSB+IMoh2VaXVhRI0BBGxoYp3rx7Pkb6z0cFjYR9Q9l4yZqqals0/zsioCmocC5H6UvsGD4MoIBA==
ajv-keywords@^3.5.2:
version "3.5.2"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d"
integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==
ajv@^6.12.2:
version "6.12.3"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.3.tgz#18c5af38a111ddeb4f2697bd78d68abc1cabd706"
integrity sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==
ajv@^6.12.4:
version "6.12.5"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.5.tgz#19b0e8bae8f476e5ba666300387775fb1a00a4da"
integrity sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
ajv@^6.5.5:
version "6.10.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52"
integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==
dependencies:
fast-deep-equal "^2.0.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
applicationinsights@1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-1.0.8.tgz#db6e3d983cf9f9405fe1ee5ba30ac6e1914537b5"
@ -131,45 +127,11 @@ array-union@^2.1.0:
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
asn1@~0.2.3:
version "0.2.4"
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
dependencies:
safer-buffer "~2.1.0"
assert-plus@1.0.0, assert-plus@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
aws4@^1.8.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c"
integrity "sha1-JDkOatYThrCnRyZXVNKhchnehiw= sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A=="
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
bcrypt-pbkdf@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
dependencies:
tweetnacl "^0.14.3"
big.js@^5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
@ -200,7 +162,7 @@ buffer-from@^1.0.0:
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
cacache@^15.0.4:
cacache@^15.0.5:
version "15.0.5"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.0.5.tgz#69162833da29170d6732334643c60e005f5f17d0"
integrity sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==
@ -223,11 +185,6 @@ cacache@^15.0.4:
tar "^6.0.2"
unique-filename "^1.1.1"
caseless@~0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
chownr@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
@ -238,13 +195,6 @@ clean-stack@^2.0.0:
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
combined-stream@^1.0.6, combined-stream@~1.0.6:
version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
dependencies:
delayed-stream "~1.0.0"
commander@2.15.1:
version "2.15.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
@ -266,34 +216,22 @@ concat-map@0.0.1:
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
copy-webpack-plugin@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.0.3.tgz#2b3d2bfc6861b96432a65f0149720adbd902040b"
integrity sha512-q5m6Vz4elsuyVEIUXr7wJdIdePWTubsqVbEMvf1WQnHGv0Q+9yPRu7MtYFPt+GBOXRav9lvIINifTQ1vSCs+eA==
version "6.1.1"
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.1.1.tgz#737a3ba21c16cc6ddca972f5cf8de25568ca0616"
integrity sha512-4TlkHFYkrZ3WppLA5XkPmBLI5lnEpFsXvpeqxCf5PzkratZiVklNXsvoQkLhUU43q7ZL3AOXtaHAd9jLNJoU0w==
dependencies:
cacache "^15.0.4"
cacache "^15.0.5"
fast-glob "^3.2.4"
find-cache-dir "^3.3.1"
glob-parent "^5.1.1"
globby "^11.0.1"
loader-utils "^2.0.0"
normalize-path "^3.0.0"
p-limit "^3.0.1"
schema-utils "^2.7.0"
serialize-javascript "^4.0.0"
p-limit "^3.0.2"
schema-utils "^2.7.1"
serialize-javascript "^5.0.1"
webpack-sources "^1.4.3"
core-util-is@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
dependencies:
assert-plus "^1.0.0"
debug@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
@ -301,6 +239,13 @@ debug@3.1.0:
dependencies:
ms "2.0.0"
debug@4:
version "4.2.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1"
integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==
dependencies:
ms "2.1.2"
debug@^3.1.0:
version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
@ -308,11 +253,6 @@ debug@^3.1.0:
dependencies:
ms "^2.1.1"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
diagnostic-channel-publishers@0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.2.1.tgz#8e2d607a8b6d79fe880b548bc58cc6beb288c4f3"
@ -337,14 +277,6 @@ dir-glob@^3.0.1:
dependencies:
path-type "^4.0.0"
ecc-jsbn@~0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
dependencies:
jsbn "~0.1.0"
safer-buffer "^2.1.0"
emojis-list@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78"
@ -367,26 +299,6 @@ escape-string-regexp@1.0.5:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
extend@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
extsprintf@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
extsprintf@^1.2.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
fast-deep-equal@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
fast-deep-equal@^3.1.1:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
@ -407,7 +319,7 @@ fast-glob@^3.1.1, fast-glob@^3.2.4:
fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM= sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
fastq@^1.6.0:
version "1.8.0"
@ -440,20 +352,6 @@ find-up@^4.0.0:
locate-path "^5.0.0"
path-exists "^4.0.0"
forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
form-data@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.6"
mime-types "^2.1.12"
fs-minipass@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb"
@ -466,13 +364,6 @@ fs.realpath@^1.0.0:
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
getpass@^0.1.1:
version "0.1.7"
resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
dependencies:
assert-plus "^1.0.0"
glob-parent@^5.1.0, glob-parent@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
@ -521,19 +412,6 @@ growl@1.10.5:
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==
har-schema@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
har-validator@~5.1.0:
version "5.1.3"
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080"
integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==
dependencies:
ajv "^6.5.5"
har-schema "^2.0.0"
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
@ -552,14 +430,14 @@ http-proxy-agent@^2.1.0:
agent-base "4"
debug "3.1.0"
http-signature@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
http-proxy-agent@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a"
integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==
dependencies:
assert-plus "^1.0.0"
jsprim "^1.2.2"
sshpk "^1.7.0"
"@tootallnate/once" "1"
agent-base "6"
debug "4"
https-proxy-agent@^2.2.1:
version "2.2.4"
@ -569,6 +447,14 @@ https-proxy-agent@^2.2.1:
agent-base "^4.3.0"
debug "^3.1.0"
https-proxy-agent@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==
dependencies:
agent-base "6"
debug "4"
ignore@^5.1.4:
version "5.1.8"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
@ -619,36 +505,11 @@ is-number@^7.0.0:
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
json5@^2.1.2:
version "2.1.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43"
@ -657,19 +518,9 @@ json5@^2.1.2:
minimist "^1.2.5"
jsonc-parser@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc"
integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==
jsprim@^1.2.2:
version "1.4.1"
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
dependencies:
assert-plus "1.0.0"
extsprintf "1.3.0"
json-schema "0.2.3"
verror "1.10.0"
version "2.3.1"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342"
integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==
loader-utils@^2.0.0:
version "2.0.0"
@ -714,18 +565,6 @@ micromatch@^4.0.2:
braces "^3.0.1"
picomatch "^2.0.5"
mime-db@1.43.0:
version "1.43.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58"
integrity "sha1-ChLgUCZQ5HPXNVNQUOfI9OtPrlg= sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ=="
mime-types@^2.1.12, mime-types@~2.1.19:
version "2.1.26"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06"
integrity "sha1-nJIfwJt+FJpl39wNpNIJlyALCgY= sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ=="
dependencies:
mime-db "1.43.0"
minimatch@3.0.4, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
@ -758,9 +597,9 @@ minipass-flush@^1.0.5:
minipass "^3.0.0"
minipass-pipeline@^1.2.2:
version "1.2.3"
resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.3.tgz#55f7839307d74859d6e8ada9c3ebe72cec216a34"
integrity sha512-cFOknTvng5vqnwOpDsZTWhNll6Jf8o2x+/diplafmxpuIymAjzoOolZG0VvQf3V2HgqzJNhnuKHYp2BqDgz8IQ==
version "1.2.4"
resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c"
integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==
dependencies:
minipass "^3.0.0"
@ -771,10 +610,10 @@ minipass@^3.0.0, minipass@^3.1.1:
dependencies:
yallist "^4.0.0"
minizlib@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.0.tgz#fd52c645301ef09a63a2c209697c294c6ce02cf3"
integrity sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA==
minizlib@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931"
integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==
dependencies:
minipass "^3.0.0"
yallist "^4.0.0"
@ -813,7 +652,7 @@ ms@2.0.0:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
ms@^2.1.1:
ms@2.1.2, ms@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
@ -823,11 +662,6 @@ normalize-path@^3.0.0:
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
oauth-sign@~0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
@ -842,7 +676,7 @@ p-limit@^2.2.0:
dependencies:
p-try "^2.0.0"
p-limit@^3.0.1:
p-limit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe"
integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==
@ -883,11 +717,6 @@ path-type@^4.0.0:
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
picomatch@^2.0.5, picomatch@^2.2.1:
version "2.2.2"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
@ -905,31 +734,11 @@ promise-inflight@^1.0.1:
resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=
psl@^1.1.24:
version "1.7.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c"
integrity "sha1-8cTEeo75cWfepda79IFtc26ISjw= sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ=="
punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
integrity sha1-wNWmOycYgArY4esPpSachN1BhF4=
punycode@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
qs@~6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
querystringify@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e"
integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==
randombytes@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
@ -937,37 +746,6 @@ randombytes@^2.1.0:
dependencies:
safe-buffer "^5.1.0"
request@^2.88.0:
version "2.88.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.8.0"
caseless "~0.12.0"
combined-stream "~1.0.6"
extend "~3.0.2"
forever-agent "~0.6.1"
form-data "~2.3.2"
har-validator "~5.1.0"
http-signature "~1.2.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.19"
oauth-sign "~0.9.0"
performance-now "^2.1.0"
qs "~6.5.2"
safe-buffer "^5.1.2"
tough-cookie "~2.4.3"
tunnel-agent "^0.6.0"
uuid "^3.3.2"
requires-port@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=
reusify@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
@ -992,29 +770,19 @@ run-parallel@^1.1.9:
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679"
integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==
safe-buffer@^5.0.1, safe-buffer@^5.1.2:
version "5.2.0"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
safe-buffer@^5.1.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
schema-utils@^2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7"
integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==
schema-utils@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7"
integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==
dependencies:
"@types/json-schema" "^7.0.4"
ajv "^6.12.2"
ajv-keywords "^3.4.1"
"@types/json-schema" "^7.0.5"
ajv "^6.12.4"
ajv-keywords "^3.5.2"
semver@5.5.1:
version "5.5.1"
@ -1031,10 +799,10 @@ semver@^6.0.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
serialize-javascript@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa"
integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==
serialize-javascript@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4"
integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==
dependencies:
randombytes "^2.1.0"
@ -1048,15 +816,7 @@ source-list-map@^2.0.0:
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==
source-map-support@^0.5.0:
version "0.5.16"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map-support@~0.5.12:
source-map-support@^0.5.0, source-map-support@~0.5.12:
version "0.5.19"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
@ -1069,21 +829,6 @@ source-map@^0.6.0, source-map@~0.6.1:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
sshpk@^1.7.0:
version "1.16.1"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
dependencies:
asn1 "~0.2.3"
assert-plus "^1.0.0"
bcrypt-pbkdf "^1.0.0"
dashdash "^1.12.0"
ecc-jsbn "~0.1.1"
getpass "^0.1.1"
jsbn "~0.1.0"
safer-buffer "^2.0.2"
tweetnacl "~0.14.0"
ssri@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.0.tgz#79ca74e21f8ceaeddfcb4b90143c458b8d988808"
@ -1099,14 +844,14 @@ supports-color@5.4.0:
has-flag "^3.0.0"
tar@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.2.tgz#5df17813468a6264ff14f766886c622b84ae2f39"
integrity sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg==
version "6.0.5"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.5.tgz#bde815086e10b39f1dcd298e89d596e1535e200f"
integrity sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
minipass "^3.0.0"
minizlib "^2.1.0"
minizlib "^2.1.1"
mkdirp "^1.0.3"
yallist "^4.0.0"
@ -1126,26 +871,6 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"
tough-cookie@~2.4.3:
version "2.4.3"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==
dependencies:
psl "^1.1.24"
punycode "^1.4.1"
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
dependencies:
safe-buffer "^5.0.1"
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
typescript-vscode-sh-plugin@^0.6.14:
version "0.6.14"
resolved "https://registry.yarnpkg.com/typescript-vscode-sh-plugin/-/typescript-vscode-sh-plugin-0.6.14.tgz#a81031b502f6346a26ea49ce082438c3e353bb38"
@ -1153,7 +878,7 @@ typescript-vscode-sh-plugin@^0.6.14:
"typescript-web-server@git://github.com/mjbvz/ts-server-web-build":
version "0.0.0"
resolved "git://github.com/mjbvz/ts-server-web-build#1d85be25043f9b5e36a531941ea345dd5a2ca007"
resolved "git://github.com/mjbvz/ts-server-web-build#2a70d88432760118a6aab21da7b819a57e7d4e5e"
unique-filename@^1.1.1:
version "1.1.1"
@ -1170,34 +895,12 @@ unique-slug@^2.0.0:
imurmurhash "^0.1.4"
uri-js@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
version "4.4.0"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602"
integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==
dependencies:
punycode "^2.1.0"
url-parse@^1.4.4:
version "1.4.7"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278"
integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==
dependencies:
querystringify "^2.1.1"
requires-port "^1.0.0"
uuid@^3.3.2:
version "3.3.3"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866"
integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==
verror@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
dependencies:
assert-plus "^1.0.0"
core-util-is "1.0.2"
extsprintf "^1.2.0"
vscode-extension-telemetry@0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.1.tgz#91387e06b33400c57abd48979b0e790415ae110b"
@ -1206,9 +909,9 @@ vscode-extension-telemetry@0.1.1:
applicationinsights "1.0.8"
vscode-nls@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.1.tgz#f9916b64e4947b20322defb1e676a495861f133c"
integrity sha512-4R+2UoUUU/LdnMnFjePxfLqNhBS8lrAFyX7pjb2ud/lqDkrUavFUTcG7wR0HBZFakae0Q6KLBFjMS6W93F403A==
version "4.1.2"
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167"
integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==
vscode-test@^0.4.1:
version "0.4.3"
@ -1219,16 +922,16 @@ vscode-test@^0.4.1:
https-proxy-agent "^2.2.1"
vscode@^1.1.36:
version "1.1.36"
resolved "https://registry.yarnpkg.com/vscode/-/vscode-1.1.36.tgz#5e1a0d1bf4977d0c7bc5159a9a13d5b104d4b1b6"
integrity sha512-cGFh9jmGLcTapCpPCKvn8aG/j9zVQ+0x5hzYJq5h5YyUXVGa1iamOaB2M2PZXoumQPES4qeAP1FwkI0b6tL4bQ==
version "1.1.37"
resolved "https://registry.yarnpkg.com/vscode/-/vscode-1.1.37.tgz#c2a770bee4bb3fff765e2b72c7bcc813b8a6bb0a"
integrity sha512-vJNj6IlN7IJPdMavlQa1KoFB3Ihn06q1AiN3ZFI/HfzPNzbKZWPPuiU+XkpNOfGU5k15m4r80nxNPlM7wcc0wg==
dependencies:
glob "^7.1.2"
http-proxy-agent "^4.0.1"
https-proxy-agent "^5.0.0"
mocha "^5.2.0"
request "^2.88.0"
semver "^5.4.1"
source-map-support "^0.5.0"
url-parse "^1.4.4"
vscode-test "^0.4.1"
webpack-sources@^1.4.3:

View file

@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.50.0",
"distro": "20bcc93e22ceef0a6c4464ae78363429f59be797",
"distro": "d56fa71c6a1c5f3177d01be5ed2de7c3d73edc84",
"author": {
"name": "Microsoft Corporation"
},
@ -166,7 +166,7 @@
"style-loader": "^1.0.0",
"ts-loader": "^4.4.2",
"tsec": "googleinterns/tsec",
"typescript": "^4.1.0-dev.20200918",
"typescript": "^4.1.0-dev.20200924",
"typescript-formatter": "7.1.0",
"underscore": "^1.8.2",
"vinyl": "^2.0.0",

View file

@ -31,7 +31,7 @@
"builtInExtensions": [
{
"name": "ms-vscode.node-debug",
"version": "1.44.11",
"version": "1.44.14",
"repo": "https://github.com/microsoft/vscode-node-debug",
"metadata": {
"id": "b6ded8fb-a0a0-4c1c-acbd-ab2a3bc995a6",
@ -61,7 +61,7 @@
},
{
"name": "ms-vscode.references-view",
"version": "0.0.63",
"version": "0.0.64",
"repo": "https://github.com/microsoft/vscode-reference-view",
"metadata": {
"id": "dc489f46-520d-4556-ae85-1f9eab3c412d",

View file

@ -14,7 +14,7 @@ const nlsConfig = bootstrap.setupNLS();
// Bootstrap: Loader
loader.config({
baseUrl: bootstrap.fileUriFromPath(__dirname, process.platform === 'win32'),
baseUrl: bootstrap.fileUriFromPath(__dirname, { isWindows: process.platform === 'win32' }),
catchError: true,
nodeRequire: require,
nodeMain: __filename,

View file

@ -103,7 +103,7 @@
window['MonacoEnvironment'] = {};
const loaderConfig = {
baseUrl: `${bootstrapLib.fileUriFromPath(configuration.appRoot, safeProcess.platform === 'win32')}/out`,
baseUrl: `${bootstrapLib.fileUriFromPath(configuration.appRoot, { isWindows: safeProcess.platform === 'win32' })}/out`,
'vs/nls': nlsConfig
};
@ -241,7 +241,7 @@
}
/**
* @return {{ fileUriFromPath: (path: string, isWindows: boolean) => string; }}
* @return {{ fileUriFromPath: (path: string, config: { isWindows?: boolean, scheme?: string, fallbackAuthority?: string }) => string; }}
*/
function bootstrap() {
// @ts-ignore (defined in bootstrap.js)

22
src/bootstrap.js vendored
View file

@ -88,10 +88,13 @@
/**
* @param {string} path
* @param {boolean} isWindows
* @param {{ isWindows?: boolean, scheme?: string, fallbackAuthority?: string }} config
* @returns {string}
*/
function fileUriFromPath(path, isWindows) {
function fileUriFromPath(path, config) {
// Since we are building a URI, we normalize any backlsash
// to slashes and we ensure that the path begins with a '/'.
let pathName = path.replace(/\\/g, '/');
if (pathName.length > 0 && pathName.charAt(0) !== '/') {
pathName = `/${pathName}`;
@ -99,10 +102,17 @@
/** @type {string} */
let uri;
if (isWindows && pathName.startsWith('//')) { // specially handle Windows UNC paths
uri = encodeURI(`file:${pathName}`);
} else {
uri = encodeURI(`file://${pathName}`);
// Windows: in order to support UNC paths (which start with '//')
// that have their own authority, we do not use the provided authority
// but rather preserve it.
if (config.isWindows && pathName.startsWith('//')) {
uri = encodeURI(`${config.scheme || 'file'}:${pathName}`);
}
// Otherwise we optionally add the provided authority if specified
else {
uri = encodeURI(`${config.scheme || 'file'}://${config.fallbackAuthority || ''}${pathName}`);
}
return uri.replace(/#/g, '%23');

View file

@ -41,6 +41,9 @@ declare const define: {
};
interface NodeRequire {
/**
* @deprecated use `FileAccess.asFileUri()` for node.js contexts or `FileAccess.asBrowserUri` for browser contexts.
*/
toUrl(path: string): string;
(dependencies: string[], callback: (...args: any[]) => any, errorback?: (err: any) => void): any;
config(data: any): any;

View file

@ -13,7 +13,7 @@ import { Emitter, Event } from 'vs/base/common/event';
import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
import * as platform from 'vs/base/common/platform';
import { URI } from 'vs/base/common/uri';
import { Schemas, RemoteAuthorities } from 'vs/base/common/network';
import { FileAccess, RemoteAuthorities } from 'vs/base/common/network';
import { BrowserFeatures } from 'vs/base/browser/canIUse';
export function clearNode(node: HTMLElement): void {
@ -1219,16 +1219,6 @@ export function animate(fn: () => void): IDisposable {
RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href) ? 'https' : 'http');
export function asDomUri(uri: URI): URI {
if (!uri) {
return uri;
}
if (Schemas.vscodeRemote === uri.scheme) {
return RemoteAuthorities.rewrite(uri);
}
return uri;
}
/**
* returns url('...')
*/
@ -1236,7 +1226,7 @@ export function asCSSUrl(uri: URI): string {
if (!uri) {
return `url('')`;
}
return `url('${asDomUri(uri).toString(true).replace(/'/g, '%27')}')`;
return `url('${FileAccess.asBrowserUri(uri).toString(true).replace(/'/g, '%27')}')`;
}

View file

@ -14,7 +14,7 @@ import { parse } from 'vs/base/common/marshalling';
import { cloneAndChange } from 'vs/base/common/objects';
import { escape } from 'vs/base/common/strings';
import { URI } from 'vs/base/common/uri';
import { Schemas } from 'vs/base/common/network';
import { FileAccess, Schemas } from 'vs/base/common/network';
import { markdownEscapeEscapedCodicons } from 'vs/base/common/codicons';
import { resolvePath } from 'vs/base/common/resources';
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
@ -70,7 +70,7 @@ export function renderMarkdown(markdown: IMarkdownString, options: MarkdownRende
// and because of that special rewriting needs to be done
// so that the URI uses a protocol that's understood by
// browsers (like http or https)
return DOM.asDomUri(uri).toString(true);
return FileAccess.asBrowserUri(uri).toString(true);
}
if (uri.query) {
uri = uri.with({ query: _uriMassage(uri.query) });

View file

@ -277,8 +277,8 @@ export class Dialog extends Disposable {
if (this.styles) {
const style = this.styles;
const fgColor = style.dialogForeground ? `${style.dialogForeground}` : '';
const bgColor = style.dialogBackground ? `${style.dialogBackground}` : '';
const fgColor = style.dialogForeground;
const bgColor = style.dialogBackground;
const shadowColor = style.dialogShadow ? `0 0px 8px ${style.dialogShadow}` : '';
const border = style.dialogBorder ? `1px solid ${style.dialogBorder}` : '';
@ -287,8 +287,8 @@ export class Dialog extends Disposable {
}
if (this.element) {
this.element.style.color = fgColor;
this.element.style.backgroundColor = bgColor;
this.element.style.color = fgColor?.toString() ?? '';
this.element.style.backgroundColor = bgColor?.toString() ?? '';
this.element.style.border = border;
if (this.buttonGroup) {
@ -300,8 +300,8 @@ export class Dialog extends Disposable {
}
if (this.messageDetailElement && fgColor && bgColor) {
const messageDetailColor = Color.fromHex(fgColor).transparent(.9);
this.messageDetailElement.style.color = messageDetailColor.makeOpaque(Color.fromHex(bgColor)).toString();
const messageDetailColor = fgColor.transparent(.9);
this.messageDetailElement.style.color = messageDetailColor.makeOpaque(bgColor).toString();
}
if (this.iconElement) {

View file

@ -186,7 +186,7 @@ function asListOptions<T, TFilterData, TRef>(modelProvider: () => ITreeModel<T,
return options.accessibilityProvider!.getWidgetAriaLabel();
},
getWidgetRole: options.accessibilityProvider && options.accessibilityProvider.getWidgetRole ? () => options.accessibilityProvider!.getWidgetRole!() : () => 'tree',
getAriaLevel(node) {
getAriaLevel: options.accessibilityProvider && options.accessibilityProvider.getAriaLevel ? (node) => options.accessibilityProvider!.getAriaLevel!(node.element) : (node) => {
return node.depth;
},
getActiveDescendantId: options.accessibilityProvider.getActiveDescendantId && (node => {

View file

@ -5,10 +5,16 @@
import { URI } from 'vs/base/common/uri';
/**
* @deprecated use `FileAccess.asFileUri(relativePath, requireFn).fsPath`
*/
export function getPathFromAmdModule(requirefn: typeof require, relativePath: string): string {
return getUriFromAmdModule(requirefn, relativePath).fsPath;
}
/**
* @deprecated use `FileAccess.asFileUri()` for node.js contexts or `FileAccess.asBrowserUri` for browser contexts.
*/
export function getUriFromAmdModule(requirefn: typeof require, relativePath: string): URI {
return URI.parse(requirefn.toUrl(relativePath));
}

View file

@ -482,6 +482,7 @@ export namespace Codicon {
export const magnet = new Codicon('magnet', { character: '\\ebae' });
export const notebook = new Codicon('notebook', { character: '\\ebaf' });
export const redo = new Codicon('redo', { character: '\\ebb0' });
export const checkAll = new Codicon('check-all', { character: '\\ebb1' });
}

View file

@ -129,3 +129,44 @@ class RemoteAuthoritiesImpl {
}
export const RemoteAuthorities = new RemoteAuthoritiesImpl();
class FileAccessImpl {
/**
* Returns a URI to use in contexts where the browser is responsible
* for loading (e.g. fetch()) or when used within the DOM.
*/
asBrowserUri(uri: URI): URI;
asBrowserUri(moduleId: string, moduleIdToUrl: { toUrl(moduleId: string): string }): URI;
asBrowserUri(uriOrModule: URI | string, moduleIdToUrl?: { toUrl(moduleId: string): string }): URI {
const uri = this.toUri(uriOrModule, moduleIdToUrl);
if (uri.scheme === Schemas.vscodeRemote) {
return RemoteAuthorities.rewrite(uri);
}
return uri;
}
/**
* Returns the `file` URI to use in contexts where node.js
* is responsible for loading.
*/
asFileUri(uri: URI): URI;
asFileUri(moduleId: string, moduleIdToUrl: { toUrl(moduleId: string): string }): URI;
asFileUri(uriOrModule: URI | string, moduleIdToUrl?: { toUrl(moduleId: string): string }): URI {
const uri = this.toUri(uriOrModule, moduleIdToUrl);
return uri;
}
private toUri(uriOrModule: URI | string, moduleIdToUrl?: { toUrl(moduleId: string): string }): URI {
if (URI.isUri(uriOrModule)) {
return uriOrModule;
}
return URI.parse(moduleIdToUrl!.toUrl(uriOrModule));
}
}
export const FileAccess = new FileAccessImpl();

View file

@ -3,14 +3,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { FileAccess } from 'vs/base/common/network';
interface IPaths {
getAppDataPath(platform: string): string;
getDefaultUserDataPath(platform: string): string;
}
const pathsPath = getPathFromAmdModule(require, 'paths');
const pathsPath = FileAccess.asFileUri('paths', require).fsPath;
const paths = require.__$__nodeRequire<IPaths>(pathsPath);
export const getAppDataPath = paths.getAppDataPath;
export const getDefaultUserDataPath = paths.getDefaultUserDataPath;

View file

@ -15,7 +15,7 @@ import * as extpath from 'vs/base/common/extpath';
import * as Platform from 'vs/base/common/platform';
import { LineDecoder } from 'vs/base/node/decoder';
import { CommandOptions, ForkOptions, SuccessData, Source, TerminateResponse, TerminateResponseCode, Executable } from 'vs/base/common/processes';
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { FileAccess } from 'vs/base/common/network';
export { CommandOptions, ForkOptions, SuccessData, Source, TerminateResponse, TerminateResponseCode };
export type ValueCallback<T> = (value: T | Promise<T>) => void;
@ -67,7 +67,7 @@ function terminateProcess(process: cp.ChildProcess, cwd?: string): Promise<Termi
}
} else if (Platform.isLinux || Platform.isMacintosh) {
try {
const cmd = getPathFromAmdModule(require, 'vs/base/node/terminateProcess.sh');
const cmd = FileAccess.asFileUri('vs/base/node/terminateProcess.sh', require).fsPath;
return new Promise((resolve, reject) => {
cp.execFile(cmd, [process.pid.toString()], { encoding: 'utf8', shell: true } as cp.ExecFileOptions, (err, stdout, stderr) => {
if (err) {

View file

@ -5,7 +5,7 @@
import { exec } from 'child_process';
import { ProcessItem } from 'vs/base/common/processes';
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { FileAccess } from 'vs/base/common/network';
export function listProcesses(rootPid: number): Promise<ProcessItem> {
@ -180,7 +180,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
// The cpu usage value reported on Linux is the average over the process lifetime,
// recalculate the usage over a one second interval
// JSON.stringify is needed to escape spaces, https://github.com/nodejs/node/issues/6803
let cmd = JSON.stringify(getPathFromAmdModule(require, 'vs/base/node/cpuUsage.sh'));
let cmd = JSON.stringify(FileAccess.asFileUri('vs/base/node/cpuUsage.sh', require).fsPath);
cmd += ' ' + pids.join(' ');
exec(cmd, {}, (err, stdout, stderr) => {
@ -208,7 +208,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
if (process.platform !== 'linux') {
reject(err || new Error(stderr.toString()));
} else {
const cmd = JSON.stringify(getPathFromAmdModule(require, 'vs/base/node/ps.sh'));
const cmd = JSON.stringify(FileAccess.asFileUri('vs/base/node/ps.sh', require).fsPath);
exec(cmd, {}, (err, stdout, stderr) => {
if (err || stderr) {
reject(err || new Error(stderr.toString()));

View file

@ -55,8 +55,6 @@ import { UserDataSyncChannel, UserDataSyncUtilServiceClient, UserDataAutoSyncCha
import { INativeHostService } from 'vs/platform/native/electron-sandbox/native';
import { LoggerService } from 'vs/platform/log/node/loggerService';
import { UserDataSyncLogService } from 'vs/platform/userDataSync/common/userDataSyncLog';
import { ICredentialsService } from 'vs/platform/credentials/common/credentials';
import { KeytarCredentialsService } from 'vs/platform/credentials/node/credentialsService';
import { UserDataAutoSyncService } from 'vs/platform/userDataSync/electron-sandbox/userDataAutoSyncService';
import { NativeStorageService } from 'vs/platform/storage/node/storageService';
import { GlobalStorageDatabaseChannelClient } from 'vs/platform/storage/node/storageIpc';
@ -68,6 +66,9 @@ import { UserDataSyncBackupStoreService } from 'vs/platform/userDataSync/common/
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
import { ExtensionTipsService } from 'vs/platform/extensionManagement/electron-sandbox/extensionTipsService';
import { UserDataSyncMachinesService, IUserDataSyncMachinesService } from 'vs/platform/userDataSync/common/userDataSyncMachines';
import { IExtensionRecommendationNotificationService } from 'vs/platform/extensionRecommendations/common/extensionRecommendations';
import { ExtensionRecommendationNotificationServiceChannelClient } from 'vs/platform/extensionRecommendations/electron-sandbox/extensionRecommendationsIpc';
import { ActiveWindowManager } from 'vs/platform/windows/electron-sandbox/windowTracker';
export interface ISharedProcessConfiguration {
readonly machineId: string;
@ -158,8 +159,11 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat
const nativeHostService = createChannelSender<INativeHostService>(mainProcessService.getChannel('nativeHost'), { context: configuration.windowId });
services.set(INativeHostService, nativeHostService);
const activeWindowManager = new ActiveWindowManager(nativeHostService);
const activeWindowRouter = new StaticRouter(ctx => activeWindowManager.getActiveClientId().then(id => ctx === id));
services.set(IDownloadService, new SyncDescriptor(DownloadService));
services.set(IExtensionRecommendationNotificationService, new ExtensionRecommendationNotificationServiceChannelClient(server.getChannel('IExtensionRecommendationNotificationService', activeWindowRouter)));
const instantiationService = new InstantiationService(services);
@ -198,7 +202,6 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat
services.set(IDiagnosticsService, new SyncDescriptor(DiagnosticsService));
services.set(IExtensionTipsService, new SyncDescriptor(ExtensionTipsService));
services.set(ICredentialsService, new SyncDescriptor(KeytarCredentialsService));
services.set(IUserDataSyncAccountService, new SyncDescriptor(UserDataSyncAccountService));
services.set(IUserDataSyncLogService, new SyncDescriptor(UserDataSyncLogService));
services.set(IUserDataSyncUtilService, new UserDataSyncUtilServiceClient(server.getChannel('userDataSyncUtil', client => client.ctx !== 'main')));

View file

@ -689,8 +689,8 @@ export class CodeApplication extends Disposable {
});
}
// new window if "-n" or "--remote" was used without paths
if ((args['new-window'] || args.remote) && !hasCliArgs && !hasFolderURIs && !hasFileURIs) {
// new window if "-n"
if (args['new-window'] && !hasCliArgs && !hasFolderURIs && !hasFileURIs) {
return windowsMainService.open({
context,
cli: args,

View file

@ -6,7 +6,7 @@
import { localize } from 'vs/nls';
import { Disposable } from 'vs/base/common/lifecycle';
import { Event } from 'vs/base/common/event';
import { URI } from 'vs/base/common/uri';
import { FileAccess } from 'vs/base/common/network';
import { BrowserWindow, BrowserWindowConstructorOptions, app, AuthInfo, WebContents, Event as ElectronEvent } from 'electron';
type LoginEvent = {
@ -59,7 +59,7 @@ export class ProxyAuthHandler extends Disposable {
show: true,
title: 'VS Code',
webPreferences: {
preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,
preload: FileAccess.asFileUri('vs/base/parts/sandbox/electron-browser/preload.js', require).fsPath,
sandbox: true,
contextIsolation: true,
enableWebSQL: false,
@ -76,7 +76,7 @@ export class ProxyAuthHandler extends Disposable {
}
const win = new BrowserWindow(opts);
const url = require.toUrl('vs/code/electron-sandbox/proxy/auth.html');
const windowUrl = FileAccess.asBrowserUri('vs/code/electron-sandbox/proxy/auth.html', require);
const proxyUrl = `${authInfo.host}:${authInfo.port}`;
const title = localize('authRequire', "Proxy Authentication Required");
const message = localize('proxyauth', "The proxy {0} requires authentication.", proxyUrl);
@ -97,6 +97,6 @@ export class ProxyAuthHandler extends Disposable {
win.close();
}
});
win.loadURL(url);
win.loadURL(windowUrl.toString(true));
}
}

View file

@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { URI } from 'vs/base/common/uri';
import { memoize } from 'vs/base/common/decorators';
import { INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import { BrowserWindow, ipcMain, WebContents, Event as ElectronEvent } from 'electron';
@ -14,6 +13,7 @@ import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifec
import { IThemeMainService } from 'vs/platform/theme/electron-main/themeMainService';
import { toDisposable, DisposableStore } from 'vs/base/common/lifecycle';
import { Event } from 'vs/base/common/event';
import { FileAccess } from 'vs/base/common/network';
export class SharedProcess implements ISharedProcess {
@ -41,7 +41,7 @@ export class SharedProcess implements ISharedProcess {
show: false,
backgroundColor: this.themeMainService.getBackgroundColor(),
webPreferences: {
preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,
preload: FileAccess.asFileUri('vs/base/parts/sandbox/electron-browser/preload.js', require).fsPath,
nodeIntegration: true,
enableWebSQL: false,
enableRemoteModule: false,
@ -60,8 +60,10 @@ export class SharedProcess implements ISharedProcess {
windowId: this.window.id
};
const url = `${require.toUrl('vs/code/electron-browser/sharedProcess/sharedProcess.html')}?config=${encodeURIComponent(JSON.stringify(config))}`;
this.window.loadURL(url);
const windowUrl = FileAccess
.asBrowserUri('vs/code/electron-browser/sharedProcess/sharedProcess.html', require)
.with({ query: `config=${encodeURIComponent(JSON.stringify(config))}` });
this.window.loadURL(windowUrl.toString(true));
// Prevent the window from dying
const onClose = (e: ElectronEvent) => {

View file

@ -15,7 +15,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv';
import { NativeParsedArgs } from 'vs/platform/environment/common/argv';
import product from 'vs/platform/product/common/product';
import { IWindowSettings, MenuBarVisibility, getTitleBarStyle, getMenuBarVisibility, zoomLevelToZoomFactor, INativeWindowConfiguration } from 'vs/platform/windows/common/windows';
import { WindowMinimumSize, IWindowSettings, MenuBarVisibility, getTitleBarStyle, getMenuBarVisibility, zoomLevelToZoomFactor, INativeWindowConfiguration } from 'vs/platform/windows/common/windows';
import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform';
import { ICodeWindow, IWindowState, WindowMode } from 'vs/platform/windows/electron-main/windows';
@ -34,6 +34,7 @@ import { ThemeIcon } from 'vs/platform/theme/common/themeService';
import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService';
import { IStorageMainService } from 'vs/platform/storage/node/storageMainService';
import { IFileService } from 'vs/platform/files/common/files';
import { FileAccess, Schemas } from 'vs/base/common/network';
import { ColorScheme } from 'vs/platform/theme/common/theme';
export interface IWindowCreationOptions {
@ -84,9 +85,6 @@ const enum ReadyState {
export class CodeWindow extends Disposable implements ICodeWindow {
private static readonly MIN_WIDTH = 600;
private static readonly MIN_HEIGHT = 270;
private static readonly MAX_URL_LENGTH = 2 * 1024 * 1024; // https://cs.chromium.org/chromium/src/url/url_constants.cc?l=32
private readonly _onLoad = this._register(new Emitter<void>());
@ -161,12 +159,12 @@ export class CodeWindow extends Disposable implements ICodeWindow {
x: this.windowState.x,
y: this.windowState.y,
backgroundColor: this.themeMainService.getBackgroundColor(),
minWidth: CodeWindow.MIN_WIDTH,
minHeight: CodeWindow.MIN_HEIGHT,
minWidth: WindowMinimumSize.WIDTH,
minHeight: WindowMinimumSize.HEIGHT,
show: !isFullscreenOrMaximized,
title: product.nameLong,
webPreferences: {
preload: URI.parse(this.doGetPreloadUrl()).fsPath,
preload: FileAccess.asFileUri('vs/base/parts/sandbox/electron-browser/preload.js', require).fsPath,
enableWebSQL: false,
enableRemoteModule: false,
spellcheck: false,
@ -835,11 +833,10 @@ export class CodeWindow extends Disposable implements ICodeWindow {
workbench = 'vs/code/electron-browser/workbench/workbench.html';
}
return `${require.toUrl(workbench)}?config=${encodeURIComponent(JSON.stringify(config))}`;
}
private doGetPreloadUrl(): string {
return require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js');
return FileAccess
.asBrowserUri(workbench, require)
.with({ query: `config=${encodeURIComponent(JSON.stringify(config))}` })
.toString(true);
}
serializeWindowState(): IWindowState {
@ -1294,7 +1291,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
private createTouchBarGroupSegments(items: ISerializableCommandAction[] = []): ITouchBarSegment[] {
const segments: ITouchBarSegment[] = items.map(item => {
let icon: NativeImage | undefined;
if (item.icon && !ThemeIcon.isThemeIcon(item.icon) && item.icon?.dark?.scheme === 'file') {
if (item.icon && !ThemeIcon.isThemeIcon(item.icon) && item.icon?.dark?.scheme === Schemas.file) {
icon = nativeImage.createFromPath(URI.revive(item.icon.dark).fsPath);
if (icon.isEmpty()) {
icon = undefined;

View file

@ -268,6 +268,7 @@ export interface HoverProvider {
/**
* An evaluatable expression represents additional information for an expression in a document. Evaluatable expression are
* evaluated by a debugger or runtime and their result is rendered in a tooltip-like widget.
* @internal
*/
export interface EvaluatableExpression {
/**
@ -283,6 +284,7 @@ export interface EvaluatableExpression {
/**
* The hover provider interface defines the contract between extensions and
* the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature.
* @internal
*/
export interface EvaluatableExpressionProvider {
/**
@ -1493,11 +1495,13 @@ export interface CommentThread {
comments: Comment[] | undefined;
onDidChangeComments: Event<Comment[] | undefined>;
collapsibleState?: CommentThreadCollapsibleState;
readOnly: boolean;
input?: CommentInput;
onDidChangeInput: Event<CommentInput | undefined>;
onDidChangeRange: Event<IRange>;
onDidChangeLabel: Event<string | undefined>;
onDidChangeCollasibleState: Event<CommentThreadCollapsibleState | undefined>;
onDidChangeReadOnly: Event<boolean>;
isDisposed: boolean;
}

View file

@ -24,9 +24,9 @@ import { RunOnceScheduler } from 'vs/base/common/async';
import { CancellationTokenSource } from 'vs/base/common/cancellation';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ILogService } from 'vs/platform/log/common/log';
import { IUndoRedoService, IUndoRedoElement, IPastFutureElements, ResourceEditStackSnapshot } from 'vs/platform/undoRedo/common/undoRedo';
import { IUndoRedoService, ResourceEditStackSnapshot } from 'vs/platform/undoRedo/common/undoRedo';
import { StringSHA1 } from 'vs/base/common/hash';
import { SingleModelEditStackElement, MultiModelEditStackElement, EditStackElement, isEditStackElement } from 'vs/editor/common/model/editStack';
import { EditStackElement, isEditStackElement } from 'vs/editor/common/model/editStack';
import { Schemas } from 'vs/base/common/network';
import { SemanticTokensProviderStyling, toMultilineTokens2 } from 'vs/editor/common/services/semanticTokensProviderStyling';
@ -118,23 +118,6 @@ export interface EditStackPastFutureElements {
future: EditStackElement[];
}
export function isEditStackPastFutureElements(undoElements: IPastFutureElements): undoElements is EditStackPastFutureElements {
return (isEditStackElements(undoElements.past) && isEditStackElements(undoElements.future));
}
function isEditStackElements(elements: IUndoRedoElement[]): elements is EditStackElement[] {
for (const element of elements) {
if (element instanceof SingleModelEditStackElement) {
continue;
}
if (element instanceof MultiModelEditStackElement) {
continue;
}
return false;
}
return true;
}
class DisposedModelInfo {
constructor(
public readonly uri: URI,

View file

@ -6,8 +6,7 @@
import { IModelService } from 'vs/editor/common/services/modelService';
import { ITextModelService } from 'vs/editor/common/services/resolverService';
import { Disposable, IDisposable, dispose } from 'vs/base/common/lifecycle';
import { IUndoRedoService, UndoRedoElementType } from 'vs/platform/undoRedo/common/undoRedo';
import { isEditStackPastFutureElements } from 'vs/editor/common/services/modelServiceImpl';
import { IUndoRedoService } from 'vs/platform/undoRedo/common/undoRedo';
import { IUndoRedoDelegate, MultiModelEditStackElement } from 'vs/editor/common/model/editStack';
export class ModelUndoRedoParticipant extends Disposable implements IUndoRedoDelegate {
@ -23,16 +22,13 @@ export class ModelUndoRedoParticipant extends Disposable implements IUndoRedoDel
if (elements.past.length === 0 && elements.future.length === 0) {
return;
}
if (!isEditStackPastFutureElements(elements)) {
return;
}
for (const element of elements.past) {
if (element.type === UndoRedoElementType.Workspace) {
if (element instanceof MultiModelEditStackElement) {
element.setDelegate(this);
}
}
for (const element of elements.future) {
if (element.type === UndoRedoElementType.Workspace) {
if (element instanceof MultiModelEditStackElement) {
element.setDelegate(this);
}
}

View file

@ -1314,11 +1314,11 @@ export class SimpleButton extends Widget {
public setExpanded(expanded: boolean): void {
this._domNode.setAttribute('aria-expanded', String(!!expanded));
if (expanded) {
dom.removeClasses(this._domNode, findCollapsedIcon.classNames);
dom.addClasses(this._domNode, findExpandedIcon.classNames);
this._domNode.classList.remove(...findCollapsedIcon.classNames.split(' '));
this._domNode.classList.add(...findExpandedIcon.classNames.split(' '));
} else {
dom.removeClasses(this._domNode, findExpandedIcon.classNames);
dom.addClasses(this._domNode, findCollapsedIcon.classNames);
this._domNode.classList.remove(...findExpandedIcon.classNames.split(' '));
this._domNode.classList.add(...findCollapsedIcon.classNames.split(' '));
}
}
}

View file

@ -298,7 +298,7 @@ export class LinkDetector implements IEditorContribution {
// Support for relative file URIs of the shape file://./relativeFile.txt or file:///./relativeFile.txt
if (typeof uri === 'string' && this.editor.hasModel()) {
const modelUri = this.editor.getModel().uri;
if (modelUri.scheme === Schemas.file && uri.startsWith('file:')) {
if (modelUri.scheme === Schemas.file && uri.startsWith(`${Schemas.file}:`)) {
const parsedUri = URI.parse(uri);
if (parsedUri.scheme === Schemas.file) {
const fsPath = resources.originalFSPath(parsedUri);

View file

@ -152,7 +152,7 @@ export class ParameterHintsWidget extends Disposable implements IContentWidget {
this.visible = true;
setTimeout(() => {
if (this.domNodes) {
dom.addClass(this.domNodes.element, 'visible');
this.domNodes.element.classList.add('visible');
}
}, 100);
this.editor.layoutContentWidget(this);
@ -169,7 +169,7 @@ export class ParameterHintsWidget extends Disposable implements IContentWidget {
this.visible = false;
this.announcedLabel = null;
if (this.domNodes) {
dom.removeClass(this.domNodes.element, 'visible');
this.domNodes.element.classList.remove('visible');
}
this.editor.layoutContentWidget(this);
}
@ -225,7 +225,7 @@ export class ParameterHintsWidget extends Disposable implements IContentWidget {
documentation.textContent = activeParameter.documentation;
} else {
const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(activeParameter.documentation));
dom.addClass(renderedContents.element, 'markdown-docs');
renderedContents.element.classList.add('markdown-docs');
documentation.appendChild(renderedContents.element);
}
dom.append(this.domNodes.docs, $('p', {}, documentation));
@ -237,7 +237,7 @@ export class ParameterHintsWidget extends Disposable implements IContentWidget {
dom.append(this.domNodes.docs, $('p', {}, signature.documentation));
} else {
const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(signature.documentation));
dom.addClass(renderedContents.element, 'markdown-docs');
renderedContents.element.classList.add('markdown-docs');
dom.append(this.domNodes.docs, renderedContents.element);
}

View file

@ -27,7 +27,7 @@ export interface IGotoSymbolQuickPickItem extends IQuickPickItem {
}
export interface IGotoSymbolQuickAccessProviderOptions extends IEditorNavigationQuickAccessOptions {
openSideBySideDirection: () => undefined | 'right' | 'down'
openSideBySideDirection?: () => undefined | 'right' | 'down'
}
export abstract class AbstractGotoSymbolQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider {
@ -306,7 +306,7 @@ export abstract class AbstractGotoSymbolQuickAccessProvider extends AbstractEdit
},
strikethrough: deprecated,
buttons: (() => {
const openSideBySideDirection = this.options?.openSideBySideDirection();
const openSideBySideDirection = this.options?.openSideBySideDirection ? this.options?.openSideBySideDirection() : undefined;
if (!openSideBySideDirection) {
return undefined;
}

25
src/vs/monaco.d.ts vendored
View file

@ -5413,31 +5413,6 @@ declare namespace monaco.languages {
provideHover(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<Hover>;
}
/**
* An evaluatable expression represents additional information for an expression in a document. Evaluatable expression are
* evaluated by a debugger or runtime and their result is rendered in a tooltip-like widget.
*/
export interface EvaluatableExpression {
/**
* The range to which this expression applies.
*/
range: IRange;
expression?: string;
}
/**
* The hover provider interface defines the contract between extensions and
* the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature.
*/
export interface EvaluatableExpressionProvider {
/**
* Provide a hover for the given position and document. Multiple hovers at the same
* position will be merged by the editor. A hover can have a range which defaults
* to the word range at the position when omitted.
*/
provideEvaluatableExpression(model: editor.ITextModel, position: Position, token: CancellationToken): ProviderResult<EvaluatableExpression>;
}
export enum CompletionItemKind {
Method = 0,
Function = 1,

View file

@ -1,20 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
export interface ICredentialsProvider {
getPassword(service: string, account: string): Promise<string | null>;
setPassword(service: string, account: string, password: string): Promise<void>;
deletePassword(service: string, account: string): Promise<boolean>;
findPassword(service: string): Promise<string | null>;
findCredentials(service: string): Promise<Array<{ account: string, password: string }>>;
}
export const ICredentialsService = createDecorator<ICredentialsService>('ICredentialsService');
export interface ICredentialsService extends ICredentialsProvider {
readonly _serviceBrand: undefined;
}

View file

@ -1,40 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import type * as keytar from 'keytar';
import { ICredentialsService } from 'vs/platform/credentials/common/credentials';
import { IdleValue } from 'vs/base/common/async';
export class KeytarCredentialsService implements ICredentialsService {
declare readonly _serviceBrand: undefined;
private readonly _keytar = new IdleValue<Promise<typeof keytar>>(() => import('keytar'));
async getPassword(service: string, account: string): Promise<string | null> {
const keytar = await this._keytar.value;
return keytar.getPassword(service, account);
}
async setPassword(service: string, account: string, password: string): Promise<void> {
const keytar = await this._keytar.value;
return keytar.setPassword(service, account, password);
}
async deletePassword(service: string, account: string): Promise<boolean> {
const keytar = await this._keytar.value;
return keytar.deletePassword(service, account);
}
async findPassword(service: string): Promise<string | null> {
const keytar = await this._keytar.value;
return keytar.findPassword(service);
}
async findCredentials(service: string): Promise<Array<{ account: string, password: string }>> {
const keytar = await this._keytar.value;
return keytar.findCredentials(service);
}
}

View file

@ -17,6 +17,7 @@ import { IMainProcessInfo } from 'vs/platform/launch/node/launch';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { Iterable } from 'vs/base/common/iterator';
import { Schemas } from 'vs/base/common/network';
export const ID = 'diagnosticsService';
export const IDiagnosticsService = createDecorator<IDiagnosticsService>(ID);
@ -85,7 +86,7 @@ export async function collectWorkspaceStats(folder: string, filter: string[]): P
return;
}
if (token.count > MAX_FILES) {
if (token.count >= MAX_FILES) {
token.count += files.length;
token.maxReached = true;
resolve();
@ -450,7 +451,7 @@ export class DiagnosticsService implements IDiagnosticsService {
window.folderURIs.forEach(uriComponents => {
const folderUri = URI.revive(uriComponents);
if (folderUri.scheme === 'file') {
if (folderUri.scheme === Schemas.file) {
const folder = folderUri.fsPath;
workspaceStatPromises.push(collectWorkspaceStats(folder, ['node_modules', '.git']).then(stats => {
let countMessage = `${stats.fileCount} files`;
@ -518,7 +519,7 @@ export class DiagnosticsService implements IDiagnosticsService {
public async reportWorkspaceStats(workspace: IWorkspaceInformation): Promise<void> {
for (const { uri } of workspace.folders) {
const folderUri = URI.revive(uri);
if (folderUri.scheme !== 'file') {
if (folderUri.scheme !== Schemas.file) {
continue;
}

View file

@ -21,6 +21,7 @@ export class DownloadService implements IDownloadService {
async download(resource: URI, target: URI, cancellationToken: CancellationToken = CancellationToken.None): Promise<void> {
if (resource.scheme === Schemas.file || resource.scheme === Schemas.vscodeRemote) {
// Intentionally only support this for file|remote<->file|remote scenarios
await this.fileService.copy(resource, target);
return;
}

View file

@ -14,7 +14,7 @@ import { memoize } from 'vs/base/common/decorators';
import product from 'vs/platform/product/common/product';
import { toLocalISOString } from 'vs/base/common/date';
import { isWindows, Platform, platform } from 'vs/base/common/platform';
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { FileAccess } from 'vs/base/common/network';
import { URI } from 'vs/base/common/uri';
export class NativeEnvironmentService implements INativeEnvironmentService {
@ -24,7 +24,7 @@ export class NativeEnvironmentService implements INativeEnvironmentService {
get args(): NativeParsedArgs { return this._args; }
@memoize
get appRoot(): string { return path.dirname(getPathFromAmdModule(require, '')); }
get appRoot(): string { return path.dirname(FileAccess.asFileUri('', require).fsPath); }
readonly logsPath: string;
@ -111,7 +111,7 @@ export class NativeEnvironmentService implements INativeEnvironmentService {
if (fromArgs) {
return fromArgs;
} else {
return path.normalize(path.join(getPathFromAmdModule(require, ''), '..', 'extensions'));
return path.normalize(path.join(FileAccess.asFileUri('', require).fsPath, '..', 'extensions'));
}
}

View file

@ -10,6 +10,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
import { URI } from 'vs/base/common/uri';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IExtensionManifest, IExtension, ExtensionType } from 'vs/platform/extensions/common/extensions';
import { FileAccess } from 'vs/base/common/network';
export const EXTENSION_IDENTIFIER_PATTERN = '^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$';
export const EXTENSION_IDENTIFIER_REGEX = new RegExp(EXTENSION_IDENTIFIER_PATTERN);
@ -260,7 +261,7 @@ export interface IExtensionTipsService {
}
export const DefaultIconPath = require.toUrl('./media/defaultIcon.png');
export const DefaultIconPath = FileAccess.asBrowserUri('./media/defaultIcon.png', require).toString(true);
export const ExtensionsLabel = localize('extensions', "Extensions");
export const ExtensionsLocalizedLabel = { value: ExtensionsLabel, original: 'Extensions' };
export const ExtensionsChannelId = 'extensions';

View file

@ -4,18 +4,28 @@
*--------------------------------------------------------------------------------------------*/
import { URI } from 'vs/base/common/uri';
import { join, } from 'vs/base/common/path';
import { basename, join, } from 'vs/base/common/path';
import { IProductService } from 'vs/platform/product/common/productService';
import { INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import { process } from 'vs/base/parts/sandbox/electron-sandbox/globals';
import { IFileService } from 'vs/platform/files/common/files';
import { isWindows } from 'vs/base/common/platform';
import { isNonEmptyArray } from 'vs/base/common/arrays';
import { IExecutableBasedExtensionTip } from 'vs/platform/extensionManagement/common/extensionManagement';
import { forEach } from 'vs/base/common/collections';
import { IExecutableBasedExtensionTip, IExtensionManagementService, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
import { forEach, IStringDictionary } from 'vs/base/common/collections';
import { IRequestService } from 'vs/platform/request/common/request';
import { ILogService } from 'vs/platform/log/common/log';
import { ExtensionTipsService as BaseExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionTipsService';
import { timeout } from 'vs/base/common/async';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IExtensionRecommendationNotificationService } from 'vs/platform/extensionRecommendations/common/extensionRecommendations';
import { localize } from 'vs/nls';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
type ExeExtensionRecommendationsClassification = {
extensionId: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' };
exeName: { classification: 'PublicNonPersonalData', purpose: 'FeatureInsight' };
};
type IExeBasedExtensionTips = {
readonly exeFriendlyName: string,
@ -23,6 +33,8 @@ type IExeBasedExtensionTips = {
readonly recommendations: { extensionId: string, extensionName: string, isExtensionPack: boolean }[];
};
const promptedExecutableTipsStorageKey = 'extensionTips/promptedExecutableTips';
export class ExtensionTipsService extends BaseExtensionTipsService {
_serviceBrand: any;
@ -32,6 +44,10 @@ export class ExtensionTipsService extends BaseExtensionTipsService {
constructor(
@INativeEnvironmentService private readonly environmentService: INativeEnvironmentService,
@ITelemetryService private readonly telemetryService: ITelemetryService,
@IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService,
@IStorageService private readonly storageService: IStorageService,
@IExtensionRecommendationNotificationService private readonly extensionRecommendationNotificationService: IExtensionRecommendationNotificationService,
@IFileService fileService: IFileService,
@IProductService productService: IProductService,
@IRequestService requestService: IRequestService,
@ -57,6 +73,12 @@ export class ExtensionTipsService extends BaseExtensionTipsService {
}
});
}
/*
3s has come out to be the good number to fetch and prompt important exe based recommendations
Also fetch important exe based recommendations for reporting telemetry
*/
timeout(3000).then(() => this.promptImportantExeBasedRecommendations());
}
getImportantExecutableBasedTips(): Promise<IExecutableBasedExtensionTip[]> {
@ -67,6 +89,77 @@ export class ExtensionTipsService extends BaseExtensionTipsService {
return this.getValidExecutableBasedExtensionTips(this.allOtherExecutableTips);
}
private async promptImportantExeBasedRecommendations(): Promise<void> {
const importantExeBasedRecommendations = new Map<string, IExecutableBasedExtensionTip>();
const importantExeBasedTips = await this.getImportantExecutableBasedTips();
importantExeBasedTips.forEach(tip => importantExeBasedRecommendations.set(tip.extensionId.toLowerCase(), tip));
const local = await this.extensionManagementService.getInstalled();
const { installed, uninstalled: recommendations } = this.groupByInstalled([...importantExeBasedRecommendations.keys()], local);
/* Log installed and uninstalled exe based recommendations */
for (const extensionId of installed) {
const tip = importantExeBasedRecommendations.get(extensionId);
if (tip) {
this.telemetryService.publicLog2<{ exeName: string, extensionId: string }, ExeExtensionRecommendationsClassification>('exeExtensionRecommendations:alreadyInstalled', { extensionId, exeName: basename(tip.windowsPath!) });
}
}
for (const extensionId of recommendations) {
const tip = importantExeBasedRecommendations.get(extensionId);
if (tip) {
this.telemetryService.publicLog2<{ exeName: string, extensionId: string }, ExeExtensionRecommendationsClassification>('exeExtensionRecommendations:notInstalled', { extensionId, exeName: basename(tip.windowsPath!) });
}
}
const recommendationsByExe = new Map<string, IExecutableBasedExtensionTip[]>();
const promptedExecutableTips = this.getPromptedExecutableTips();
for (const extensionId of recommendations) {
const tip = importantExeBasedRecommendations.get(extensionId);
if (tip && (!promptedExecutableTips[tip.exeName] || !promptedExecutableTips[tip.exeName].includes(tip.extensionId))) {
let tips = recommendationsByExe.get(tip.exeName);
if (!tips) {
tips = [];
recommendationsByExe.set(tip.exeName, tips);
}
tips.push(tip);
}
}
for (const [, tips] of recommendationsByExe) {
const extensionIds = tips.map(({ extensionId }) => extensionId.toLowerCase());
const message = localize('exeRecommended', "You have {0} installed on your system. Do you want to install the recommended extensions for it?", tips[0].exeFriendlyName);
this.extensionRecommendationNotificationService.promptImportantExtensionsInstallNotification(extensionIds, message, `@exe:"${tips[0].exeName}"`)
.then(result => {
if (result) {
this.addToRecommendedExecutables(tips[0].exeName, extensionIds);
}
});
}
}
private getPromptedExecutableTips(): IStringDictionary<string[]> {
return JSON.parse(this.storageService.get(promptedExecutableTipsStorageKey, StorageScope.GLOBAL, '{}'));
}
private addToRecommendedExecutables(exeName: string, extensions: string[]) {
const promptedExecutableTips = this.getPromptedExecutableTips();
promptedExecutableTips[exeName] = extensions;
this.storageService.store(promptedExecutableTipsStorageKey, JSON.stringify(promptedExecutableTips), StorageScope.GLOBAL);
}
private groupByInstalled(recommendationsToSuggest: string[], local: ILocalExtension[]): { installed: string[], uninstalled: string[] } {
const installed: string[] = [], uninstalled: string[] = [];
const installedExtensionsIds = local.reduce((result, i) => { result.add(i.identifier.id.toLowerCase()); return result; }, new Set<string>());
recommendationsToSuggest.forEach(id => {
if (installedExtensionsIds.has(id.toLowerCase())) {
installed.push(id);
} else {
uninstalled.push(id);
}
});
return { installed, uninstalled };
}
private async getValidExecutableBasedExtensionTips(executableTips: Map<string, IExeBasedExtensionTips>): Promise<IExecutableBasedExtensionTip[]> {
const result: IExecutableBasedExtensionTip[] = [];

View file

@ -14,7 +14,6 @@ import { areSameExtensions, ExtensionIdentifierWithVersion, groupByExtension, ge
import { Limiter, Queue } from 'vs/base/common/async';
import { URI } from 'vs/base/common/uri';
import { INativeEnvironmentService } from 'vs/platform/environment/common/environment';
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { localizeManifest } from 'vs/platform/extensionManagement/common/extensionNls';
import { localize } from 'vs/nls';
import { IProductService } from 'vs/platform/product/common/productService';
@ -23,6 +22,7 @@ import { extract, ExtractError } from 'vs/base/node/zip';
import { isWindows } from 'vs/base/common/platform';
import { flatten } from 'vs/base/common/arrays';
import { IStringDictionary } from 'vs/base/common/collections';
import { FileAccess } from 'vs/base/common/network';
const ERROR_SCANNING_SYS_EXTENSIONS = 'scanningSystem';
const ERROR_SCANNING_USER_EXTENSIONS = 'scanningUser';
@ -336,7 +336,7 @@ export class ExtensionsScanner extends Disposable {
private _devSystemExtensionsPath: string | null = null;
private get devSystemExtensionsPath(): string {
if (!this._devSystemExtensionsPath) {
this._devSystemExtensionsPath = path.normalize(path.join(getPathFromAmdModule(require, ''), '..', '.build', 'builtInExtensions'));
this._devSystemExtensionsPath = path.normalize(path.join(FileAccess.asFileUri('', require).fsPath, '..', '.build', 'builtInExtensions'));
}
return this._devSystemExtensionsPath;
}

View file

@ -0,0 +1,19 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
export const IExtensionRecommendationNotificationService = createDecorator<IExtensionRecommendationNotificationService>('IExtensionRecommendationNotificationService');
export interface IExtensionRecommendationNotificationService {
readonly _serviceBrand: undefined;
readonly ignoredRecommendations: string[];
hasToIgnoreRecommendationNotifications(): boolean;
promptImportantExtensionsInstallNotification(extensionIds: string[], message: string, searchValue: string): Promise<boolean>;
promptWorkspaceRecommendations(recommendations: string[]): Promise<boolean>;
}

View file

@ -0,0 +1,48 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Event } from 'vs/base/common/event';
import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
import { IExtensionRecommendationNotificationService } from 'vs/platform/extensionRecommendations/common/extensionRecommendations';
export class ExtensionRecommendationNotificationServiceChannelClient implements IExtensionRecommendationNotificationService {
declare readonly _serviceBrand: undefined;
constructor(private readonly channel: IChannel) { }
get ignoredRecommendations(): string[] { throw new Error('not supported'); }
promptImportantExtensionsInstallNotification(extensionIds: string[], message: string, searchValue: string): Promise<boolean> {
return this.channel.call('promptImportantExtensionsInstallNotification', [extensionIds, message, searchValue]);
}
promptWorkspaceRecommendations(recommendations: string[]): Promise<boolean> {
throw new Error('not supported');
}
hasToIgnoreRecommendationNotifications(): boolean {
throw new Error('not supported');
}
}
export class ExtensionRecommendationNotificationServiceChannel implements IServerChannel {
constructor(private service: IExtensionRecommendationNotificationService) { }
listen(_: unknown, event: string): Event<any> {
throw new Error(`Event not found: ${event}`);
}
call(_: unknown, command: string, args?: any): Promise<any> {
switch (command) {
case 'promptImportantExtensionsInstallNotification': return this.service.promptImportantExtensionsInstallNotification(args[0], args[1], args[2]);
}
throw new Error(`Call not found: ${command}`);
}
}

View file

@ -8,7 +8,7 @@ import { Client } from 'vs/base/parts/ipc/node/ipc.cp';
import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher';
import { Disposable } from 'vs/base/common/lifecycle';
import { IWatcherRequest, IWatcherService } from 'vs/platform/files/node/watcher/nsfw/watcher';
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { FileAccess } from 'vs/base/common/network';
export class FileWatcher extends Disposable {
@ -34,7 +34,7 @@ export class FileWatcher extends Disposable {
private startWatching(): void {
const client = this._register(new Client(
getPathFromAmdModule(require, 'bootstrap-fork'),
FileAccess.asFileUri('bootstrap-fork', require).fsPath,
{
serverName: 'File Watcher (nsfw)',
args: ['--type=watcherService'],

View file

@ -8,7 +8,7 @@ import { Client } from 'vs/base/parts/ipc/node/ipc.cp';
import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher';
import { Disposable } from 'vs/base/common/lifecycle';
import { IWatcherRequest, IWatcherOptions, IWatcherService } from 'vs/platform/files/node/watcher/unix/watcher';
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { FileAccess } from 'vs/base/common/network';
export class FileWatcher extends Disposable {
@ -35,7 +35,7 @@ export class FileWatcher extends Disposable {
private startWatching(): void {
const client = this._register(new Client(
getPathFromAmdModule(require, 'bootstrap-fork'),
FileAccess.asFileUri('bootstrap-fork', require).fsPath,
{
serverName: 'File Watcher (chokidar)',
args: ['--type=watcherService'],

View file

@ -8,7 +8,7 @@ import { FileChangeType } from 'vs/platform/files/common/files';
import * as decoder from 'vs/base/node/decoder';
import * as glob from 'vs/base/common/glob';
import { IDiskFileChange, ILogMessage } from 'vs/platform/files/node/watcher/watcher';
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { FileAccess } from 'vs/base/common/network';
export class OutOfProcessWin32FolderWatcher {
@ -50,7 +50,7 @@ export class OutOfProcessWin32FolderWatcher {
args.push('-verbose');
}
this.handle = cp.spawn(getPathFromAmdModule(require, 'vs/platform/files/node/watcher/win32/CodeHelper.exe'), args);
this.handle = cp.spawn(FileAccess.asFileUri('vs/platform/files/node/watcher/win32/CodeHelper.exe', require).fsPath, args);
const stdoutLineDecoder = new decoder.LineDecoder();

View file

@ -18,9 +18,9 @@ import { ILogService } from 'vs/platform/log/common/log';
import { IWindowState } from 'vs/platform/windows/electron-main/windows';
import { listProcesses } from 'vs/base/node/ps';
import { IDialogMainService } from 'vs/platform/dialogs/electron-main/dialogs';
import { URI } from 'vs/base/common/uri';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { zoomLevelToZoomFactor } from 'vs/platform/windows/common/windows';
import { FileAccess } from 'vs/base/common/network';
const DEFAULT_BACKGROUND_COLOR = '#1E1E1E';
@ -195,7 +195,7 @@ export class IssueMainService implements ICommonIssueService {
title: localize('issueReporter', "Issue Reporter"),
backgroundColor: data.styles.backgroundColor || DEFAULT_BACKGROUND_COLOR,
webPreferences: {
preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,
preload: FileAccess.asFileUri('vs/base/parts/sandbox/electron-browser/preload.js', require).fsPath,
enableWebSQL: false,
enableRemoteModule: false,
spellcheck: false,
@ -261,7 +261,7 @@ export class IssueMainService implements ICommonIssueService {
backgroundColor: data.styles.backgroundColor,
title: localize('processExplorer', "Process Explorer"),
webPreferences: {
preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,
preload: FileAccess.asFileUri('vs/base/parts/sandbox/electron-browser/preload.js', require).fsPath,
enableWebSQL: false,
enableRemoteModule: false,
spellcheck: false,
@ -294,7 +294,7 @@ export class IssueMainService implements ICommonIssueService {
};
this._processExplorerWindow.loadURL(
toLauchUrl('vs/code/electron-sandbox/processExplorer/processExplorer.html', windowConfiguration));
toWindowUrl('vs/code/electron-sandbox/processExplorer/processExplorer.html', windowConfiguration));
this._processExplorerWindow.on('close', () => this._processExplorerWindow = null);
@ -435,11 +435,11 @@ export class IssueMainService implements ICommonIssueService {
}
};
return toLauchUrl('vs/code/electron-sandbox/issue/issueReporter.html', windowConfiguration);
return toWindowUrl('vs/code/electron-sandbox/issue/issueReporter.html', windowConfiguration);
}
}
function toLauchUrl<T>(pathToHtml: string, windowConfiguration: T): string {
function toWindowUrl<T>(modulePathToHtml: string, windowConfiguration: T): string {
const environment = parseArgs(process.argv, OPTIONS);
const config = Object.assign(environment, windowConfiguration);
for (const keyValue of Object.keys(config)) {
@ -449,5 +449,8 @@ function toLauchUrl<T>(pathToHtml: string, windowConfiguration: T): string {
}
}
return `${require.toUrl(pathToHtml)}?config=${encodeURIComponent(JSON.stringify(config))}`;
return FileAccess
.asBrowserUri(modulePathToHtml, require)
.with({ query: `config=${encodeURIComponent(JSON.stringify(config))}` })
.toString(true);
}

View file

@ -67,6 +67,8 @@ export interface ICommonNativeHostService {
unmaximizeWindow(): Promise<void>;
minimizeWindow(): Promise<void>;
setMinimumSize(width: number | undefined, height: number | undefined): Promise<void>;
/**
* Make the window focused.
*
@ -141,4 +143,11 @@ export interface ICommonNativeHostService {
// Registry (windows only)
windowsGetStringRegKey(hive: 'HKEY_CURRENT_USER' | 'HKEY_LOCAL_MACHINE' | 'HKEY_CLASSES_ROOT' | 'HKEY_USERS' | 'HKEY_CURRENT_CONFIG', path: string, name: string): Promise<string | undefined>;
// Credentials
getPassword(service: string, account: string): Promise<string | null>;
setPassword(service: string, account: string, password: string): Promise<void>;
deletePassword(service: string, account: string): Promise<boolean>;
findPassword(service: string): Promise<string | null>;
findCredentials(service: string): Promise<Array<{ account: string, password: string }>>
}

View file

@ -211,6 +211,23 @@ export class NativeHostMainService implements INativeHostMainService {
}
}
async setMinimumSize(windowId: number | undefined, width: number | undefined, height: number | undefined): Promise<void> {
const window = this.windowById(windowId);
if (window) {
const [windowWidth, windowHeight] = window.win.getSize();
const [minWindowWidth, minWindowHeight] = window.win.getMinimumSize();
const [newMinWindowWidth, newMinWindowHeight] = [width ?? minWindowWidth, height ?? minWindowHeight];
const [newWindowWidth, newWindowHeight] = [Math.max(windowWidth, newMinWindowWidth), Math.max(windowHeight, newMinWindowHeight)];
if (minWindowWidth !== newMinWindowWidth || minWindowHeight !== newMinWindowHeight) {
window.win.setMinimumSize(newMinWindowWidth, newMinWindowHeight);
}
if (windowWidth !== newWindowWidth || windowHeight !== newWindowHeight) {
window.win.setSize(newWindowWidth, newWindowHeight);
}
}
}
//#endregion
//#region Dialog
@ -610,6 +627,42 @@ export class NativeHostMainService implements INativeHostMainService {
}
}
//#endregion
//#region Credentials
async getPassword(windowId: number | undefined, service: string, account: string): Promise<string | null> {
const keytar = await import('keytar');
return keytar.getPassword(service, account);
}
async setPassword(windowId: number | undefined, service: string, account: string, password: string): Promise<void> {
const keytar = await import('keytar');
return keytar.setPassword(service, account, password);
}
async deletePassword(windowId: number | undefined, service: string, account: string): Promise<boolean> {
const keytar = await import('keytar');
return keytar.deletePassword(service, account);
}
async findPassword(windowId: number | undefined, service: string): Promise<string | null> {
const keytar = await import('keytar');
return keytar.findPassword(service);
}
async findCredentials(windowId: number | undefined, service: string): Promise<Array<{ account: string, password: string }>> {
const keytar = await import('keytar');
return keytar.findCredentials(service);
}
//#endregion
private windowById(windowId: number | undefined): ICodeWindow | undefined {
if (typeof windowId !== 'number') {
return undefined;

View file

@ -5,9 +5,9 @@
import { IProductConfiguration } from 'vs/platform/product/common/productService';
import { isWeb } from 'vs/base/common/platform';
import * as path from 'vs/base/common/path';
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { env } from 'vs/base/common/process';
import { FileAccess } from 'vs/base/common/network';
import { dirname, joinPath } from 'vs/base/common/resources';
let product: IProductConfiguration;
@ -43,10 +43,10 @@ if (isWeb || typeof require === 'undefined' || typeof require.__$__nodeRequire !
else {
// Obtain values from product.json and package.json
const rootPath = path.dirname(getPathFromAmdModule(require, ''));
const rootPath = dirname(FileAccess.asFileUri('', require));
product = require.__$__nodeRequire(path.join(rootPath, 'product.json'));
const pkg = require.__$__nodeRequire(path.join(rootPath, 'package.json')) as { version: string; };
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string; };
// Running out of sources
if (env['VSCODE_DEV']) {

View file

@ -443,6 +443,18 @@ export const problemsErrorIconForeground = registerColor('problemsErrorIcon.fore
export const problemsWarningIconForeground = registerColor('problemsWarningIcon.foreground', { dark: editorWarningForeground, light: editorWarningForeground, hc: editorWarningForeground }, nls.localize('problemsWarningIconForeground', "The color used for the problems warning icon."));
export const problemsInfoIconForeground = registerColor('problemsInfoIcon.foreground', { dark: editorInfoForeground, light: editorInfoForeground, hc: editorInfoForeground }, nls.localize('problemsInfoIconForeground', "The color used for the problems info icon."));
/**
* Chart colors
*/
export const chartsForeground = registerColor('charts.foreground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('chartsForeground', "The foreground color used in charts."));
export const chartsLines = registerColor('charts.lines', { dark: transparent(foreground, .5), light: transparent(foreground, .5), hc: transparent(foreground, .5) }, nls.localize('chartsLines', "The color used for horizontal lines in charts."));
export const chartsRed = registerColor('charts.red', { dark: editorErrorForeground, light: editorErrorForeground, hc: editorErrorForeground }, nls.localize('chartsRed', "The red color used charts."));
export const chartsBlue = registerColor('charts.blue', { dark: editorInfoForeground, light: editorInfoForeground, hc: editorInfoForeground }, nls.localize('chartsBlue', "The blue color used charts."));
export const chartsYellow = registerColor('charts.yellow', { dark: editorWarningForeground, light: editorWarningForeground, hc: editorWarningForeground }, nls.localize('chartsYellow', "The yellow color used charts."));
export const chartsOrange = registerColor('charts.orange', { dark: minimapFindMatch, light: minimapFindMatch, hc: minimapFindMatch }, nls.localize('chartsOrange', "The orange color used charts."));
export const chartsGreen = registerColor('charts.green', { dark: '#89D185', light: '#388A34', hc: '#89D185' }, nls.localize('chartsGreen', "The green color used charts."));
export const chartsPurple = registerColor('charts.purple', { dark: '#B180D7', light: '#652D90', hc: '#B180D7' }, nls.localize('chartsPurple', "The purple color used charts."));
// ----- color functions
export function darken(colorValue: ColorValue, factor: number): ColorFunction {

View file

@ -136,7 +136,7 @@ export class WebviewProtocolProvider extends Disposable {
} else {
url = require.toUrl(`vs/workbench/contrib/webview/browser/pre/${entry}`);
}
return callback(decodeURIComponent(url.replace('file://', '')));
return callback(decodeURIComponent(url.replace(`${Schemas.file}://`, '')));
}
} catch {
// noop

View file

@ -13,6 +13,12 @@ import { LogLevel } from 'vs/platform/log/common/log';
import { ExportData } from 'vs/base/common/performance';
import { ColorScheme } from 'vs/platform/theme/common/theme';
export const WindowMinimumSize = {
WIDTH: 400,
WIDTH_WITH_VERTICAL_PANEL: 600,
HEIGHT: 270
};
export interface IBaseOpenWindowsOptions {
forceReuseWindow?: boolean;
}

View file

@ -972,7 +972,7 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic
if (pathToOpen?.folderUri) {
windowsToOpen.push(pathToOpen);
}
} else if (restoreWindows !== 'folders' && openedWindow.backupPath && !openedWindow.remoteAuthority) { // Local windows that were empty. Empty windows with backups will always be restored in open()
} else if (restoreWindows !== 'folders' && openedWindow.backupPath) { // Empty window, potentially editors open to be restored
windowsToOpen.push({ backupPath: openedWindow.backupPath, remoteAuthority: openedWindow.remoteAuthority });
}
}

View file

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Event } from 'vs/base/common/event';
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { CancelablePromise, createCancelablePromise } from 'vs/base/common/async';
import { INativeHostService } from 'vs/platform/native/electron-sandbox/native';
export class ActiveWindowManager extends Disposable {
private readonly disposables = this._register(new DisposableStore());
private firstActiveWindowIdPromise: CancelablePromise<number | undefined> | undefined;
private activeWindowId: number | undefined;
constructor(@INativeHostService nativeHostService: INativeHostService) {
super();
// remember last active window id upon events
const onActiveWindowChange = Event.latch(Event.any(nativeHostService.onWindowOpen, nativeHostService.onWindowFocus));
onActiveWindowChange(this.setActiveWindow, this, this.disposables);
// resolve current active window
this.firstActiveWindowIdPromise = createCancelablePromise(() => nativeHostService.getActiveWindowId());
(async () => {
try {
const windowId = await this.firstActiveWindowIdPromise;
this.activeWindowId = (typeof this.activeWindowId === 'number') ? this.activeWindowId : windowId;
} finally {
this.firstActiveWindowIdPromise = undefined;
}
})();
}
private setActiveWindow(windowId: number | undefined) {
if (this.firstActiveWindowIdPromise) {
this.firstActiveWindowIdPromise.cancel();
this.firstActiveWindowIdPromise = undefined;
}
this.activeWindowId = windowId;
}
async getActiveClientId(): Promise<string | undefined> {
const id = this.firstActiveWindowIdPromise ? (await this.firstActiveWindowIdPromise) : this.activeWindowId;
return `window:${id}`;
}
}

24
src/vs/vscode.d.ts vendored
View file

@ -2221,7 +2221,7 @@ declare module 'vscode' {
*
* A code action can be any command that is [known](#commands.getCommands) to the system.
*/
export interface CodeActionProvider {
export interface CodeActionProvider<T extends CodeAction = CodeAction> {
/**
* Provide commands for the given document and range.
*
@ -2234,6 +2234,22 @@ declare module 'vscode' {
* signaled by returning `undefined`, `null`, or an empty array.
*/
provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<(Command | CodeAction)[]>;
/**
* Given a code action fill in its [`edit`](#CodeAction.edit)-property. Changes to
* all other properties, like title, are ignored. A code action that has an edit
* will not be resolved.
*
* *Note* that a code action provider that returns commands, not code actions, cannot successfully
* implement this function. Returning commands is deprecated and instead code actions should be
* returned.
*
* @param codeAction A code action.
* @param token A cancellation token.
* @return The resolved code action or a thenable that resolves to such. It is OK to return the given
* `item`. When no result is returned, the given `item` will be used.
*/
resolveCodeAction?(codeAction: T, token: CancellationToken): ProviderResult<T>;
}
/**
@ -8599,6 +8615,12 @@ declare module 'vscode' {
*/
title?: string;
/**
* An optional human-readable description which is rendered less prominently in the title of the view.
* Setting the title description to null, undefined, or empty string will remove the description from the view.
*/
description?: string;
/**
* Reveals the given element in the tree view.
* If the tree view is not visible then the tree view is shown and element is revealed.

View file

@ -16,30 +16,6 @@
declare module 'vscode' {
//#region https://github.com/microsoft/vscode/issues/106410
export interface CodeActionProvider<T extends CodeAction = CodeAction> {
/**
* Given a code action fill in its [`edit`](#CodeAction.edit)-property, changes to
* all other properties, like title, are ignored. A code action that has an edit
* will not be resolved.
*
* *Note* that a code action provider that returns commands, not code actions, cannot successfully
* implement this function. Returning commands is deprecated and instead code actions should be
* returned.
*
* @param codeAction A code action.
* @param token A cancellation token.
* @return The resolved code action or a thenable that resolve to such. It is OK to return the given
* `item`. When no result is returned, the given `item` will be used.
*/
resolveCodeAction?(codeAction: T, token: CancellationToken): ProviderResult<T>;
}
//#endregion
// #region auth provider: https://github.com/microsoft/vscode/issues/88309
/**
@ -741,76 +717,65 @@ declare module 'vscode' {
//#region file-decorations: https://github.com/microsoft/vscode/issues/54938
// TODO@jrieken FileDecoration, FileDecorationProvider etc.
// TODO@jrieken Add selector notion to limit decorations to a view.
// TODO@jrieken Rename `Decoration.letter` to `short` so that it could be used for coverage et al.
// TODO@jrieken priority -> DecorationSeverity.INFO,WARN,ERROR
// TODO@jrieken title -> tooltip
// TODO@jrieken bubble -> propagte
export class Decoration {
export class FileDecoration {
/**
* A letter that represents this decoration.
* A very short string that represents this decoration.
*/
letter?: string;
badge?: string;
/**
* The human-readable title for this decoration.
* A human-readable tooltip for this decoration.
*/
title?: string;
tooltip?: string;
/**
* The color of this decoration.
*/
color?: ThemeColor;
/**
* The priority of this decoration.
*/
priority?: number;
/**
* A flag expressing that this decoration should be
* propagted to its parents.
* propagated to its parents.
*/
bubble?: boolean;
propagate?: boolean;
/**
* Creates a new decoration.
*
* @param letter A letter that represents the decoration.
* @param title The title of the decoration.
* @param badge A letter that represents the decoration.
* @param tooltip The tooltip of the decoration.
* @param color The color of the decoration.
*/
constructor(letter?: string, title?: string, color?: ThemeColor);
constructor(badge?: string, tooltip?: string, color?: ThemeColor);
}
/**
* The decoration provider interfaces defines the contract between extensions and
* file decorations.
*/
export interface DecorationProvider {
export interface FileDecorationProvider {
/**
* An event to signal decorations for one or many files have changed.
*
* @see [EventEmitter](#EventEmitter
*/
onDidChangeDecorations: Event<undefined | Uri | Uri[]>;
onDidChange: Event<undefined | Uri | Uri[]>;
/**
* Provide decorations for a given uri.
*
*
* @param uri The uri of the file to provide a decoration for.
* @param token A cancellation token.
* @returns A decoration or a thenable that resolves to such.
*/
provideDecoration(uri: Uri, token: CancellationToken): ProviderResult<Decoration>;
provideFileDecoration(uri: Uri, token: CancellationToken): ProviderResult<FileDecoration>;
}
export namespace window {
export function registerDecorationProvider(provider: DecorationProvider): Disposable;
export function registerDecorationProvider(provider: FileDecorationProvider): Disposable;
}
//#endregion
@ -2134,7 +2099,7 @@ declare module 'vscode' {
}
//#endregion
//#region
//#region https://github.com/microsoft/vscode/issues/91697
export interface FileSystem {
/**
@ -2156,17 +2121,6 @@ declare module 'vscode' {
//#endregion
//#region https://github.com/microsoft/vscode/issues/105667
export interface TreeView<T> {
/**
* An optional human-readable description that will be rendered in the title of the view.
* Setting the title description to null, undefined, or empty string will remove the title description from the view.
*/
description?: string | undefined;
}
//#endregion
//#region https://github.com/microsoft/vscode/issues/103120 @alexr00
export class ThemeIcon2 extends ThemeIcon {
@ -2183,4 +2137,14 @@ declare module 'vscode' {
constructor(id: string, color?: ThemeColor);
}
//#endregion
//#region https://github.com/microsoft/vscode/issues/102665 Comment API @rebornix
export interface CommentThread {
/**
* Whether the thread supports reply.
* Defaults to false.
*/
readOnly: boolean;
}
//#endregion
}

View file

@ -84,6 +84,17 @@ export class MainThreadCommentThread implements modes.CommentThread {
return this._range;
}
private readonly _onDidChangeReadOnly = new Emitter<boolean>();
get onDidChangeReadOnly(): Event<boolean> { return this._onDidChangeReadOnly.event; }
set readOnly(state: boolean) {
this._readOnly = state;
this._onDidChangeReadOnly.fire(this._readOnly);
}
get readOnly() {
return this._readOnly;
}
private readonly _onDidChangeRange = new Emitter<IRange>();
public onDidChangeRange = this._onDidChangeRange.event;
@ -112,7 +123,8 @@ export class MainThreadCommentThread implements modes.CommentThread {
public extensionId: string,
public threadId: string,
public resource: string,
private _range: IRange
private _range: IRange,
private _readOnly: boolean
) {
this._isDisposed = false;
}
@ -126,6 +138,7 @@ export class MainThreadCommentThread implements modes.CommentThread {
if (modified('contextValue')) { this._contextValue = changes.contextValue; }
if (modified('comments')) { this._comments = changes.comments; }
if (modified('collapseState')) { this._collapsibleState = changes.collapseState; }
if (modified('readOnly')) { this.readOnly = changes.readOnly!; }
}
dispose() {
@ -214,7 +227,8 @@ export class MainThreadCommentController {
extensionId,
threadId,
URI.revive(resource).toString(),
range
range,
false
);
this._threads.set(commentThreadHandle, thread);

View file

@ -92,9 +92,9 @@ export class MainThreadDecorations implements MainThreadDecorationsShape {
if (!data) {
return undefined;
}
const [weight, bubble, tooltip, letter, themeColor] = data;
const [bubble, tooltip, letter, themeColor] = data;
return <IDecorationData>{
weight: weight ?? 0,
weight: 10,
bubble: bubble ?? false,
color: themeColor?.id,
tooltip,

View file

@ -50,7 +50,7 @@ export class MainThreadExtensionService implements MainThreadExtensionServiceSha
$activateExtension(extensionId: ExtensionIdentifier, reason: ExtensionActivationReason): Promise<void> {
return this._extensionService._activateById(extensionId, reason);
}
$onWillActivateExtension(extensionId: ExtensionIdentifier): void {
async $onWillActivateExtension(extensionId: ExtensionIdentifier): Promise<void> {
this._extensionService._onWillActivateExtension(extensionId);
}
$onDidActivateExtension(extensionId: ExtensionIdentifier, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number, activationReason: ExtensionActivationReason): void {

View file

@ -5,7 +5,7 @@
import { extHostNamedCustomer } from 'vs/workbench/api/common/extHostCustomers';
import { MainContext, MainThreadKeytarShape, IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
import { ICredentialsService } from 'vs/platform/credentials/common/credentials';
import { ICredentialsService } from 'vs/workbench/services/credentials/common/credentials';
@extHostNamedCustomer(MainContext.MainThreadKeytar)
export class MainThreadKeytar implements MainThreadKeytarShape {

View file

@ -303,6 +303,10 @@ export class MainThreadSCM implements MainThreadSCMShape {
setTimeout(() => this._proxy.$setSelectedSourceControl(handle), 0);
}
if (repository.input.value) {
setTimeout(() => this._proxy.$onInputBoxValueChange(handle, repository.input.value), 0);
}
this._repositoryDisposables.set(handle, disposable);
}

View file

@ -479,11 +479,6 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
return null;
}
if (type === ViewType.Webview && !extension.description.enableProposedApi) {
collector.error(localize('webviewViewsRequireProposed', "Webview views are proposed api and are only supported when running out of dev or with the following command line switch: --enable-proposed-api"));
return null;
}
const viewDescriptor = <ICustomTreeViewDescriptor>{
type: type,
ctorDescriptor: type === ViewType.Tree ? new SyncDescriptor(TreeViewPane) : new SyncDescriptor(WebviewViewPane),

View file

@ -16,7 +16,7 @@ import { IWorkspacesService, hasWorkspaceFileExtension, IRecent } from 'vs/platf
import { Schemas } from 'vs/base/common/network';
import { ILogService } from 'vs/platform/log/common/log';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IViewDescriptorService, IViewsService } from 'vs/workbench/common/views';
import { IViewDescriptorService, IViewsService, ViewVisibilityState } from 'vs/workbench/common/views';
// -----------------------------------------------------------------
// The following commands are registered on both sides separately.
@ -279,7 +279,7 @@ CommandsRegistry.registerCommand('_workbench.action.moveViews', async function (
for (const viewId of options.viewIds) {
const viewDescriptor = viewDescriptorService.getViewDescriptorById(viewId);
if (viewDescriptor?.canMoveView) {
viewDescriptorService.moveViewsToContainer([viewDescriptor], destination);
viewDescriptorService.moveViewsToContainer([viewDescriptor], destination, ViewVisibilityState.Default);
}
}

View file

@ -605,7 +605,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
registerCustomEditorProvider: (viewType: string, provider: vscode.CustomTextEditorProvider | vscode.CustomReadonlyEditorProvider, options: { webviewOptions?: vscode.WebviewPanelOptions, supportsMultipleEditorsPerDocument?: boolean } = {}) => {
return extHostCustomEditors.registerCustomEditorProvider(extension, viewType, provider, options);
},
registerDecorationProvider(provider: vscode.DecorationProvider) {
registerDecorationProvider(provider: vscode.FileDecorationProvider) {
checkProposedApiEnabled(extension);
return extHostDecorations.registerDecorationProvider(provider, extension.identifier);
},
@ -1138,7 +1138,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
CallHierarchyItem: extHostTypes.CallHierarchyItem,
DebugConsoleMode: extHostTypes.DebugConsoleMode,
DebugConfigurationProviderTriggerKind: extHostTypes.DebugConfigurationProviderTriggerKind,
Decoration: extHostTypes.Decoration,
FileDecoration: extHostTypes.FileDecoration,
UIKind: UIKind,
ColorThemeKind: extHostTypes.ColorThemeKind,
TimelineItem: extHostTypes.TimelineItem,

View file

@ -144,6 +144,7 @@ export type CommentThreadChanges = Partial<{
contextValue: string,
comments: modes.Comment[],
collapseState: modes.CommentThreadCollapsibleState;
readOnly: boolean;
}>;
export interface MainThreadCommentsShape extends IDisposable {
@ -830,7 +831,7 @@ export interface MainThreadTaskShape extends IDisposable {
export interface MainThreadExtensionServiceShape extends IDisposable {
$activateExtension(extensionId: ExtensionIdentifier, reason: ExtensionActivationReason): Promise<void>;
$onWillActivateExtension(extensionId: ExtensionIdentifier): void;
$onWillActivateExtension(extensionId: ExtensionIdentifier): Promise<void>;
$onDidActivateExtension(extensionId: ExtensionIdentifier, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number, activationReason: ExtensionActivationReason): void;
$onExtensionActivationError(extensionId: ExtensionIdentifier, error: ExtensionActivationError): Promise<void>;
$onExtensionRuntimeError(extensionId: ExtensionIdentifier, error: SerializedError): void;
@ -1605,7 +1606,7 @@ export interface DecorationRequest {
readonly uri: UriComponents;
}
export type DecorationData = [number, boolean, string, string, ThemeColor];
export type DecorationData = [boolean, string, string, ThemeColor];
export type DecorationReply = { [id: number]: DecorationData; };
export interface ExtHostDecorationsShape {

View file

@ -219,6 +219,7 @@ type CommentThreadModification = Partial<{
contextValue: string | undefined,
comments: vscode.Comment[],
collapsibleState: vscode.CommentThreadCollapsibleState
readOnly: boolean;
}>;
export class ExtHostCommentThread implements vscode.CommentThread {
@ -263,6 +264,19 @@ export class ExtHostCommentThread implements vscode.CommentThread {
return this._range;
}
private _readonly: boolean = false;
set readOnly(state: boolean) {
if (this._readonly !== state) {
this._readonly = state;
this.modifications.readOnly = state;
this._onDidUpdateCommentThread.fire();
}
}
get readOnly() {
return this._readonly;
}
private _label: string | undefined;
get label(): string | undefined {
@ -387,6 +401,9 @@ export class ExtHostCommentThread implements vscode.CommentThread {
if (modified('collapsibleState')) {
formattedModifications.collapseState = convertToCollapsibleState(this._collapseState);
}
if (modified('readOnly')) {
formattedModifications.readOnly = this.readOnly;
}
this.modifications = {};
this._proxy.$updateCommentThread(

View file

@ -6,7 +6,7 @@
import type * as vscode from 'vscode';
import { URI } from 'vs/base/common/uri';
import { MainContext, ExtHostDecorationsShape, MainThreadDecorationsShape, DecorationData, DecorationRequest, DecorationReply } from 'vs/workbench/api/common/extHost.protocol';
import { Disposable, Decoration } from 'vs/workbench/api/common/extHostTypes';
import { Disposable, FileDecoration } from 'vs/workbench/api/common/extHostTypes';
import { CancellationToken } from 'vs/base/common/cancellation';
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
@ -15,7 +15,7 @@ import { ILogService } from 'vs/platform/log/common/log';
import { asArray } from 'vs/base/common/arrays';
interface ProviderData {
provider: vscode.DecorationProvider;
provider: vscode.FileDecorationProvider;
extensionId: ExtensionIdentifier;
}
@ -34,12 +34,12 @@ export class ExtHostDecorations implements ExtHostDecorationsShape {
this._proxy = extHostRpc.getProxy(MainContext.MainThreadDecorations);
}
registerDecorationProvider(provider: vscode.DecorationProvider, extensionId: ExtensionIdentifier): vscode.Disposable {
registerDecorationProvider(provider: vscode.FileDecorationProvider, extensionId: ExtensionIdentifier): vscode.Disposable {
const handle = ExtHostDecorations._handlePool++;
this._provider.set(handle, { provider, extensionId });
this._proxy.$registerDecorationProvider(handle, extensionId.value);
const listener = provider.onDidChangeDecorations(e => {
const listener = provider.onDidChange(e => {
this._proxy.$onDidChange(handle, !e || (Array.isArray(e) && e.length > 250)
? null
: asArray(e));
@ -65,13 +65,13 @@ export class ExtHostDecorations implements ExtHostDecorationsShape {
await Promise.all(requests.map(async request => {
try {
const { uri, id } = request;
const data = await Promise.resolve(provider.provideDecoration(URI.revive(uri), token));
const data = await Promise.resolve(provider.provideFileDecoration(URI.revive(uri), token));
if (!data) {
return;
}
try {
Decoration.validate(data);
result[id] = <DecorationData>[data.priority, data.bubble, data.title, data.letter, data.color];
FileDecoration.validate(data);
result[id] = <DecorationData>[data.propagate, data.tooltip, data.badge, data.color];
} catch (e) {
this._logService.warn(`INVALID decoration from extension '${extensionId.value}': ${e}`);
}

View file

@ -303,8 +303,15 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
// --- impl
private _activateExtension(extensionDescription: IExtensionDescription, reason: ExtensionActivationReason): Promise<ActivatedExtension> {
this._mainThreadExtensionsProxy.$onWillActivateExtension(extensionDescription.identifier);
private async _activateExtension(extensionDescription: IExtensionDescription, reason: ExtensionActivationReason): Promise<ActivatedExtension> {
if (!this._initData.remote.isRemote) {
// local extension host process
await this._mainThreadExtensionsProxy.$onWillActivateExtension(extensionDescription.identifier);
} else {
// remote extension host process
// do not wait for renderer confirmation
this._mainThreadExtensionsProxy.$onWillActivateExtension(extensionDescription.identifier);
}
return this._doActivateExtension(extensionDescription, reason).then((activatedExtension) => {
const activationTimes = activatedExtension.activationTimes;
this._mainThreadExtensionsProxy.$onDidActivateExtension(extensionDescription.identifier, activationTimes.codeLoadingTime, activationTimes.activateCallTime, activationTimes.activateResolvedTime, reason);
@ -499,7 +506,7 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
const host: IExtensionActivationHost = {
folders: folders.map(folder => folder.uri),
forceUsingSearch: localWithRemote,
exists: (path) => this._hostUtils.exists(path),
exists: (uri) => this._hostUtils.exists(uri.fsPath),
checkExists: (folders, includes, token) => this._mainThreadWorkspaceProxy.$checkExists(folders, includes, token)
};

View file

@ -349,7 +349,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
.map(pattern => typeConverters.NotebookExclusiveDocumentPattern.from(pattern))
.filter(pattern => pattern !== undefined) as (string | IRelativePattern | INotebookExclusiveDocumentFilter)[];
if (!viewOptionsFilenamePattern) {
if (options?.viewOptions?.filenamePattern && !viewOptionsFilenamePattern) {
console.warn(`Notebook content provider view options file name pattern is invalid ${options?.viewOptions?.filenamePattern}`);
}

View file

@ -13,7 +13,7 @@ import { ITerminalChildProcess, ITerminalDimensions, EXT_HOST_CREATION_DELAY, IT
import { timeout } from 'vs/base/common/async';
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
import { TerminalDataBufferer } from 'vs/workbench/contrib/terminal/common/terminalDataBuffering';
import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
import { IDisposable, DisposableStore, Disposable } from 'vs/base/common/lifecycle';
import { Disposable as VSCodeDisposable, EnvironmentVariableMutatorType } from './extHostTypes';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { ISerializableEnvironmentVariableCollection } from 'vs/workbench/contrib/terminal/common/environmentVariable';
@ -22,7 +22,7 @@ import { NotSupportedError } from 'vs/base/common/errors';
import { serializeEnvironmentVariableCollection } from 'vs/workbench/contrib/terminal/common/environmentVariableShared';
import { CancellationTokenSource } from 'vs/base/common/cancellation';
export interface IExtHostTerminalService extends ExtHostTerminalServiceShape {
export interface IExtHostTerminalService extends ExtHostTerminalServiceShape, IDisposable {
readonly _serviceBrand: undefined;
@ -306,14 +306,14 @@ interface ICachedLinkEntry {
link: vscode.TerminalLink;
}
export abstract class BaseExtHostTerminalService implements IExtHostTerminalService, ExtHostTerminalServiceShape {
export abstract class BaseExtHostTerminalService extends Disposable implements IExtHostTerminalService, ExtHostTerminalServiceShape {
readonly _serviceBrand: undefined;
protected _proxy: MainThreadTerminalServiceShape;
protected _activeTerminal: ExtHostTerminal | undefined;
protected _terminals: ExtHostTerminal[] = [];
protected _terminalProcesses: { [id: number]: ITerminalChildProcess } = {};
protected _terminalProcesses: Map<number, ITerminalChildProcess> = new Map();
protected _terminalProcessDisposables: { [id: number]: IDisposable } = {};
protected _extensionTerminalAwaitingStart: { [id: number]: { initialDimensions: ITerminalDimensionsDto | undefined } | undefined } = {};
protected _getTerminalPromises: { [id: number]: Promise<ExtHostTerminal | undefined> } = {};
@ -342,6 +342,7 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
supportsProcesses: boolean,
@IExtHostRpcService extHostRpc: IExtHostRpcService
) {
super();
this._proxy = extHostRpc.getProxy(MainContext.MainThreadTerminalService);
this._bufferer = new TerminalDataBufferer(this._proxy.$sendProcessData);
this._onDidWriteTerminalData = new Emitter<vscode.TerminalDataWriteEvent>({
@ -349,6 +350,13 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
onLastListenerRemove: () => this._proxy.$stopSendingDataEvents()
});
this._proxy.$registerProcessSupport(supportsProcesses);
this._register({
dispose: () => {
for (const [_, terminalProcess] of this._terminalProcesses) {
terminalProcess.shutdown(true);
}
}
});
}
public abstract createTerminal(name?: string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal;
@ -421,11 +429,9 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
public async $acceptTerminalMaximumDimensions(id: number, cols: number, rows: number): Promise<void> {
await this._getTerminalByIdEventually(id);
if (this._terminalProcesses[id]) {
// Extension pty terminal only - when virtual process resize fires it means that the
// terminal's maximum dimensions changed
this._terminalProcesses[id]?.resize(cols, rows);
}
// Extension pty terminal only - when virtual process resize fires it means that the
// terminal's maximum dimensions changed
this._terminalProcesses.get(id)?.resize(cols, rows);
}
public async $acceptTerminalTitleChange(id: number, name: string): Promise<void> {
@ -497,8 +503,9 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
});
}
if (this._terminalProcesses[id]) {
(this._terminalProcesses[id] as ExtHostPseudoterminal).startSendingEvents(initialDimensions);
const terminalProcess = this._terminalProcesses.get(id);
if (terminalProcess) {
(terminalProcess as ExtHostPseudoterminal).startSendingEvents(initialDimensions);
} else {
// Defer startSendingEvents call to when _setupExtHostProcessListeners is called
this._extensionTerminalAwaitingStart[id] = { initialDimensions };
@ -520,7 +527,7 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
if (p.onProcessOverrideDimensions) {
disposables.add(p.onProcessOverrideDimensions(e => this._proxy.$sendOverrideDimensions(id, e)));
}
this._terminalProcesses[id] = p;
this._terminalProcesses.set(id, p);
const awaitingStart = this._extensionTerminalAwaitingStart[id];
if (awaitingStart && p instanceof ExtHostPseudoterminal) {
@ -532,12 +539,12 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
}
public $acceptProcessInput(id: number, data: string): void {
this._terminalProcesses[id]?.input(data);
this._terminalProcesses.get(id)?.input(data);
}
public $acceptProcessResize(id: number, cols: number, rows: number): void {
try {
this._terminalProcesses[id]?.resize(cols, rows);
this._terminalProcesses.get(id)?.resize(cols, rows);
} catch (error) {
// We tried to write to a closed pipe / channel.
if (error.code !== 'EPIPE' && error.code !== 'ERR_IPC_CHANNEL_CLOSED') {
@ -547,15 +554,15 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
}
public $acceptProcessShutdown(id: number, immediate: boolean): void {
this._terminalProcesses[id]?.shutdown(immediate);
this._terminalProcesses.get(id)?.shutdown(immediate);
}
public $acceptProcessRequestInitialCwd(id: number): void {
this._terminalProcesses[id]?.getInitialCwd().then(initialCwd => this._proxy.$sendProcessInitialCwd(id, initialCwd));
this._terminalProcesses.get(id)?.getInitialCwd().then(initialCwd => this._proxy.$sendProcessInitialCwd(id, initialCwd));
}
public $acceptProcessRequestCwd(id: number): void {
this._terminalProcesses[id]?.getCwd().then(cwd => this._proxy.$sendProcessCwd(id, cwd));
this._terminalProcesses.get(id)?.getCwd().then(cwd => this._proxy.$sendProcessCwd(id, cwd));
}
public $acceptProcessRequestLatency(id: number): number {
@ -648,7 +655,7 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
this._bufferer.stopBuffering(id);
// Remove process reference
delete this._terminalProcesses[id];
this._terminalProcesses.delete(id);
delete this._extensionTerminalAwaitingStart[id];
// Clean up process disposables

View file

@ -102,11 +102,9 @@ export class ExtHostTreeViews implements ExtHostTreeViewsShape {
treeView.title = title;
},
get description() {
checkProposedApiEnabled(extension);
return treeView.description;
},
set description(description: string | undefined) {
checkProposedApiEnabled(extension);
treeView.description = description;
},
reveal: (element: T, options?: IRevealOptions): Promise<void> => {

View file

@ -338,7 +338,9 @@ export namespace MarkdownString {
}
export function to(value: htmlContent.IMarkdownString): vscode.MarkdownString {
return new htmlContent.MarkdownString(value.value, { isTrusted: value.isTrusted, supportThemeIcons: value.supportThemeIcons });
const result = new types.MarkdownString(value.value, value.supportThemeIcons);
result.isTrusted = value.isTrusted;
return result;
}
export function fromStrict(value: string | types.MarkdownString): undefined | string | htmlContent.IMarkdownString {

View file

@ -781,7 +781,7 @@ export class SnippetString {
}
appendChoice(values: string[], number: number = this._tabstop++): SnippetString {
const value = SnippetString._escape(values.toString());
const value = values.map(s => s.replace(/\$|}|\\|,/g, '\\$&')).join(',');
this.value += '${';
this.value += number;
@ -2729,22 +2729,29 @@ export enum ExtensionKind {
Workspace = 2
}
export class Decoration {
export class FileDecoration {
static validate(d: Decoration): void {
if (d.letter && d.letter.length !== 1) {
static validate(d: FileDecoration): void {
if (d.badge && d.badge.length !== 1) {
throw new Error(`The 'letter'-property must be undefined or a single character`);
}
if (!d.bubble && !d.color && !d.letter && !d.priority && !d.title) {
if (!d.color && !d.badge && !d.tooltip) {
throw new Error(`The decoration is empty`);
}
}
letter?: string;
title?: string;
badge?: string;
tooltip?: string;
color?: vscode.ThemeColor;
priority?: number;
bubble?: boolean;
propagate?: boolean;
constructor(badge?: string, tooltip?: string, color?: ThemeColor) {
this.badge = badge;
this.tooltip = tooltip;
this.color = color;
}
}
//#region Theming

View file

@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'vs/base/common/path';
import * as resources from 'vs/base/common/resources';
import { URI, UriComponents } from 'vs/base/common/uri';
import { CancellationTokenSource, CancellationToken } from 'vs/base/common/cancellation';
import * as errors from 'vs/base/common/errors';
@ -19,7 +19,7 @@ export interface IExtensionActivationHost {
readonly folders: readonly UriComponents[];
readonly forceUsingSearch: boolean;
exists(path: string): Promise<boolean>;
exists(uri: URI): Promise<boolean>;
checkExists(folders: readonly UriComponents[], includes: string[], token: CancellationToken): Promise<boolean>;
}
@ -69,7 +69,7 @@ export function checkActivateWorkspaceContainsExtension(host: IExtensionActivati
async function _activateIfFileName(host: IExtensionActivationHost, fileName: string, activate: (activationEvent: string) => void): Promise<void> {
// find exact path
for (const uri of host.folders) {
if (await host.exists(path.join(URI.revive(uri).fsPath, fileName))) {
if (await host.exists(resources.joinPath(URI.revive(uri), fileName))) {
// the file was found
activate(`workspaceContains:${fileName}`);
return;

View file

@ -10,7 +10,7 @@ import { IFileService } from 'vs/platform/files/common/files';
import { IWindowOpenable } from 'vs/platform/windows/common/windows';
import { URI } from 'vs/base/common/uri';
import { ITextFileService, stringToSnapshot } from 'vs/workbench/services/textfile/common/textfiles';
import { Schemas } from 'vs/base/common/network';
import { FileAccess, Schemas } from 'vs/base/common/network';
import { ITextEditorOptions } from 'vs/platform/editor/common/editor';
import { DataTransfers, IDragAndDropData } from 'vs/base/browser/dnd';
import { DragMouseEvent } from 'vs/base/browser/mouseEvent';
@ -22,7 +22,7 @@ import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
import { IEditorIdentifier, GroupIdentifier } from 'vs/workbench/common/editor';
import { IEditorService, IResourceEditorInputType } from 'vs/workbench/services/editor/common/editorService';
import { Disposable, IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
import { addDisposableListener, EventType, asDomUri } from 'vs/base/browser/dom';
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IWorkspaceEditingService } from 'vs/workbench/services/workspaces/common/workspaceEditing';
import { withNullAsUndefined } from 'vs/base/common/types';
@ -322,7 +322,7 @@ export function fillResourceDataTransfers(accessor: ServicesAccessor, resources:
// Download URL: enables support to drag a tab as file to desktop (only single file supported)
// Disabled for PWA web due to: https://github.com/microsoft/vscode/issues/83441
if (!sources[0].isDirectory && (!isWeb || !isStandalone)) {
event.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, basename(sources[0].resource), asDomUri(sources[0].resource).toString()].join(':'));
event.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, basename(sources[0].resource), FileAccess.asBrowserUri(sources[0].resource).toString()].join(':'));
}
// Resource URLs: allows to drop multiple resources to a target in VS Code (not directories)

View file

@ -1307,7 +1307,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
[titleBar, editorPart, activityBar, panelPart, sideBar, statusBar].forEach((part: Part) => {
this._register(part.onDidVisibilityChange((visible) => {
this._onPartVisibilityChange.fire();
if (part === sideBar) {
this.setSideBarHidden(!visible, true);
} else if (part === panelPart) {
@ -1315,6 +1314,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
} else if (part === editorPart) {
this.setEditorHidden(!visible, true);
}
this._onPartVisibilityChange.fire();
}));
});
@ -1543,6 +1543,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
}
setPanelHidden(hidden: boolean, skipLayout?: boolean): void {
const wasHidden = this.state.panel.hidden;
this.state.panel.hidden = hidden;
// Return if not initialized fully #105480
@ -1581,21 +1582,23 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
this.toggleMaximizedPanel();
}
// Propagate layout changes to grid
if (!skipLayout) {
this.workbenchGrid.setViewVisible(this.panelPartView, !hidden);
// If in process of showing, toggle whether or not panel is maximized
if (!hidden) {
if (isPanelMaximized !== panelOpensMaximized) {
this.toggleMaximizedPanel();
}
}
else {
// If in process of hiding, remember whether the panel is maximized or not
this.state.panel.wasLastMaximized = isPanelMaximized;
}
// Don't proceed if we have already done this before
if (wasHidden === hidden) {
return;
}
// Propagate layout changes to grid
this.workbenchGrid.setViewVisible(this.panelPartView, !hidden);
// If in process of showing, toggle whether or not panel is maximized
if (!hidden) {
if (isPanelMaximized !== panelOpensMaximized) {
this.toggleMaximizedPanel();
}
}
else {
// If in process of hiding, remember whether the panel is maximized or not
this.state.panel.wasLastMaximized = isPanelMaximized;
}
// Remember in settings
if (!hidden) {
this.storageService.store(Storage.PANEL_HIDDEN, 'false', StorageScope.WORKSPACE);

View file

@ -54,6 +54,7 @@ import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry';
import { IQuickAccessRegistry, Extensions as QuickAccessExtensions } from 'vs/platform/quickinput/common/quickAccess';
import { ActiveGroupEditorsByMostRecentlyUsedQuickAccess, AllEditorsByAppearanceQuickAccess, AllEditorsByMostRecentlyUsedQuickAccess } from 'vs/workbench/browser/parts/editor/editorQuickAccess';
import { IPathService } from 'vs/workbench/services/path/common/pathService';
import { FileAccess } from 'vs/base/common/network';
// Register String Editor
Registry.as<IEditorRegistry>(EditorExtensions.Editors).registerEditor(
@ -422,13 +423,13 @@ editorCommands.setup();
// Touch Bar
if (isMacintosh) {
MenuRegistry.appendMenuItem(MenuId.TouchBarContext, {
command: { id: NavigateBackwardsAction.ID, title: NavigateBackwardsAction.LABEL, icon: { dark: URI.parse(require.toUrl('vs/workbench/browser/parts/editor/media/back-tb.png')) } },
command: { id: NavigateBackwardsAction.ID, title: NavigateBackwardsAction.LABEL, icon: { dark: FileAccess.asFileUri('vs/workbench/browser/parts/editor/media/back-tb.png', require) } },
group: 'navigation',
order: 0
});
MenuRegistry.appendMenuItem(MenuId.TouchBarContext, {
command: { id: NavigateForwardAction.ID, title: NavigateForwardAction.LABEL, icon: { dark: URI.parse(require.toUrl('vs/workbench/browser/parts/editor/media/forward-tb.png')) } },
command: { id: NavigateForwardAction.ID, title: NavigateForwardAction.LABEL, icon: { dark: FileAccess.asFileUri('vs/workbench/browser/parts/editor/media/forward-tb.png', require) } },
group: 'navigation',
order: 1
});

View file

@ -46,7 +46,7 @@ import { withNullAsUndefined, withUndefinedAsNull } from 'vs/base/common/types';
import { hash } from 'vs/base/common/hash';
import { guessMimeTypes } from 'vs/base/common/mime';
import { extname } from 'vs/base/common/resources';
import { Schemas } from 'vs/base/common/network';
import { FileAccess, Schemas } from 'vs/base/common/network';
import { EditorActivation, EditorOpenContext } from 'vs/platform/editor/common/editor';
import { IDialogService, IFileDialogService, ConfirmResult } from 'vs/platform/dialogs/common/dialogs';
import { ILogService } from 'vs/platform/log/common/log';
@ -1780,7 +1780,7 @@ registerThemingParticipant((theme, collector, environment) => {
const letterpress = `./media/letterpress${theme.type === 'dark' ? '-dark' : theme.type === 'hc' ? '-hc' : ''}.svg`;
collector.addRule(`
.monaco-workbench .part.editor > .content .editor-group-container.empty .editor-group-letterpress {
background-image: url('${require.toUrl(letterpress)}')
background-image: url('${FileAccess.asBrowserUri(letterpress, require).fsPath}')
}
`);

View file

@ -509,6 +509,11 @@ export function getVisbileViewContextKey(viewId: string): string { return `${vie
export const IViewDescriptorService = createDecorator<IViewDescriptorService>('viewDescriptorService');
export enum ViewVisibilityState {
Default = 0,
Expand = 1
}
export interface IViewDescriptorService {
readonly _serviceBrand: undefined;
@ -535,7 +540,7 @@ export interface IViewDescriptorService {
getViewLocationById(id: string): ViewContainerLocation | null;
readonly onDidChangeContainer: Event<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }>;
moveViewsToContainer(views: IViewDescriptor[], viewContainer: ViewContainer): void;
moveViewsToContainer(views: IViewDescriptor[], viewContainer: ViewContainer, visibilityState?: ViewVisibilityState): void;
readonly onDidChangeLocation: Event<{ views: IViewDescriptor[], from: ViewContainerLocation, to: ViewContainerLocation }>;
moveViewToLocation(view: IViewDescriptor, location: ViewContainerLocation): void;

View file

@ -71,7 +71,7 @@ class CreateOperation implements IFileOperation {
return new Noop(); // not overwriting, but ignoring, and the target file exists
}
await this._workingCopyFileService.create(this.newUri, this.contents, { overwrite: this.options.overwrite });
return this._instaService.createInstance(DeleteOperation, this.newUri, this.options);
return this._instaService.createInstance(DeleteOperation, this.newUri, this.options, true);
}
}
@ -80,6 +80,7 @@ class DeleteOperation implements IFileOperation {
constructor(
readonly oldUri: URI,
readonly options: WorkspaceFileEditOptions,
private readonly _undoesCreateOperation: boolean,
@IWorkingCopyFileService private readonly _workingCopyFileService: IWorkingCopyFileService,
@IFileService private readonly _fileService: IFileService,
@IConfigurationService private readonly _configurationService: IConfigurationService,
@ -101,10 +102,12 @@ class DeleteOperation implements IFileOperation {
}
let contents: VSBuffer | undefined;
try {
contents = (await this._fileService.readFile(this.oldUri)).value;
} catch (err) {
this._logService.critical(err);
if (!this._undoesCreateOperation) {
try {
contents = (await this._fileService.readFile(this.oldUri)).value;
} catch (err) {
this._logService.critical(err);
}
}
const useTrash = this._fileService.hasCapability(this.oldUri, FileSystemProviderCapabilities.Trash) && this._configurationService.getValue<boolean>('files.enableTrash');
@ -166,7 +169,7 @@ export class BulkFileEdits {
op = this._instaService.createInstance(RenameOperation, edit.newResource, edit.oldResource, options);
} else if (!edit.newResource && edit.oldResource) {
// delete file
op = this._instaService.createInstance(DeleteOperation, edit.oldResource, options);
op = this._instaService.createInstance(DeleteOperation, edit.oldResource, options, false);
} else if (edit.newResource && !edit.oldResource) {
// create file
op = this._instaService.createInstance(CreateOperation, edit.newResource, options, undefined);

View file

@ -19,7 +19,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import Severity from 'vs/base/common/severity';
import { ILogService } from 'vs/platform/log/common/log';
import { getPathFromAmdModule } from 'vs/base/common/amd';
import { FileAccess } from 'vs/base/common/network';
import { IProductService } from 'vs/platform/product/common/productService';
function ignore<T>(code: string, value: T): (err: any) => Promise<T> {
@ -29,7 +29,7 @@ function ignore<T>(code: string, value: T): (err: any) => Promise<T> {
let _source: string | null = null;
function getSource(): string {
if (!_source) {
const root = getPathFromAmdModule(require, '');
const root = FileAccess.asFileUri('', require).fsPath;
_source = path.resolve(root, '..', 'bin', 'code');
}
return _source;

View file

@ -314,7 +314,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);
this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);
dom.toggleClass(this._domNode, 'replaceToggled', this._isReplaceVisible);
this._domNode.classList.toggle('replaceToggled', this._isReplaceVisible);
this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
}
@ -345,8 +345,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
this.updateButtons(this.foundMatch);
setTimeout(() => {
dom.addClass(this._domNode, 'visible');
dom.addClass(this._domNode, 'visible-transition');
this._domNode.classList.add('visible', 'visible-transition');
this._domNode.setAttribute('aria-hidden', 'false');
this._findInput.select();
}, 0);
@ -364,8 +363,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
this._isVisible = true;
setTimeout(() => {
dom.addClass(this._domNode, 'visible');
dom.addClass(this._domNode, 'visible-transition');
this._domNode.classList.add('visible', 'visible-transition');
this._domNode.setAttribute('aria-hidden', 'false');
this.focus();
@ -391,8 +389,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
}
setTimeout(() => {
dom.addClass(this._domNode, 'visible');
dom.addClass(this._domNode, 'visible-transition');
this._domNode.classList.add('visible', 'visible-transition');
this._domNode.setAttribute('aria-hidden', 'false');
this._updateButtons();
@ -402,13 +399,13 @@ export abstract class SimpleFindReplaceWidget extends Widget {
public hide(): void {
if (this._isVisible) {
dom.removeClass(this._domNode, 'visible-transition');
this._domNode.classList.remove('visible-transition');
this._domNode.setAttribute('aria-hidden', 'true');
// Need to delay toggling visibility until after Transition, then visibility hidden - removes from tabIndex list
setTimeout(() => {
this._isVisible = false;
this.updateButtons(this.foundMatch);
dom.removeClass(this._domNode, 'visible');
this._domNode.classList.remove('visible');
}, 200);
}
}

View file

@ -212,8 +212,7 @@ export abstract class SimpleFindWidget extends Widget {
this.updateButtons(this.foundMatch);
setTimeout(() => {
dom.addClass(this._innerDomNode, 'visible');
dom.addClass(this._innerDomNode, 'visible-transition');
this._innerDomNode.classList.add('visible', 'visible-transition');
this._innerDomNode.setAttribute('aria-hidden', 'false');
this._findInput.select();
}, 0);
@ -227,21 +226,20 @@ export abstract class SimpleFindWidget extends Widget {
this._isVisible = true;
setTimeout(() => {
dom.addClass(this._innerDomNode, 'visible');
dom.addClass(this._innerDomNode, 'visible-transition');
this._innerDomNode.classList.add('visible', 'visible-transition');
this._innerDomNode.setAttribute('aria-hidden', 'false');
}, 0);
}
public hide(): void {
if (this._isVisible) {
dom.removeClass(this._innerDomNode, 'visible-transition');
this._innerDomNode.classList.remove('visible-transition');
this._innerDomNode.setAttribute('aria-hidden', 'true');
// Need to delay toggling visibility until after Transition, then visibility hidden - removes from tabIndex list
setTimeout(() => {
this._isVisible = false;
this.updateButtons(this.foundMatch);
dom.removeClass(this._innerDomNode, 'visible');
this._innerDomNode.classList.remove('visible');
}, 200);
}
}

Some files were not shown because too many files have changed in this diff Show more