Archived
Merge from vscode aba87f135229c17c4624341b7a2499dcedafcb87 (#6430)
* Merge from vscode aba87f135229c17c4624341b7a2499dcedafcb87 * fix compile errors
This commit is contained in:
@@ -2,29 +2,18 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd $BUILD_STAGINGDIRECTORY
|
cd $BUILD_STAGINGDIRECTORY
|
||||||
git clone https://github.com/microsoft/vscode-telemetry-extractor.git
|
mkdir extraction
|
||||||
cd vscode-telemetry-extractor
|
cd extraction
|
||||||
git checkout 4e64f3de30f8fccb58ebdc0d85c4861a135d46cf
|
|
||||||
npm i
|
|
||||||
npm run compile
|
|
||||||
cd src
|
|
||||||
mkdir telemetry-sources
|
|
||||||
cd telemetry-sources
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-extension-telemetry.git
|
git clone --depth 1 https://github.com/Microsoft/vscode-extension-telemetry.git
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-chrome-debug-core.git
|
git clone --depth 1 https://github.com/Microsoft/vscode-chrome-debug-core.git
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-chrome-debug.git
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-node-debug2.git
|
git clone --depth 1 https://github.com/Microsoft/vscode-node-debug2.git
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-node-debug.git
|
git clone --depth 1 https://github.com/Microsoft/vscode-node-debug.git
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-docker.git
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-go.git
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-azure-account.git
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-html-languageservice.git
|
git clone --depth 1 https://github.com/Microsoft/vscode-html-languageservice.git
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-json-languageservice.git
|
git clone --depth 1 https://github.com/Microsoft/vscode-json-languageservice.git
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-mono-debug.git
|
$BUILD_SOURCESDIRECTORY/build/node_modules/.bin/vscode-telemetry-extractor --sourceDir $BUILD_SOURCESDIRECTORY --excludedDir $BUILD_SOURCESDIRECTORY/extensions --outputDir . --applyEndpoints
|
||||||
git clone --depth 1 https://github.com/Microsoft/TypeScript.git
|
$BUILD_SOURCESDIRECTORY/build/node_modules/.bin/vscode-telemetry-extractor --config $BUILD_SOURCESDIRECTORY/build/azure-pipelines/common/telemetry-config.json -o .
|
||||||
cd ../../
|
|
||||||
node ./out/cli-extract.js --sourceDir $BUILD_SOURCESDIRECTORY --excludedDirPattern extensions --outputDir . --applyEndpoints --includeIsMeasurement
|
|
||||||
node ./out/cli-extract-extensions.js --sourceDir ./src/telemetry-sources --outputDir . --applyEndpoints --includeIsMeasurement
|
|
||||||
mkdir -p $BUILD_SOURCESDIRECTORY/.build/telemetry
|
mkdir -p $BUILD_SOURCESDIRECTORY/.build/telemetry
|
||||||
mv declarations-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-core.json
|
mv declarations-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-core.json
|
||||||
mv declarations-extensions-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-extensions.json
|
mv config-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-extensions.json
|
||||||
|
cd ..
|
||||||
|
rm -rf extraction
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"eventPrefix": "typescript-language-features/",
|
||||||
|
"sourceDirs": [
|
||||||
|
"../../s/extensions/typescript-language-features"
|
||||||
|
],
|
||||||
|
"excludedDirs": [],
|
||||||
|
"applyEndpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"eventPrefix": "git/",
|
||||||
|
"sourceDirs": [
|
||||||
|
"../../s/extensions/git"
|
||||||
|
],
|
||||||
|
"excludedDirs": [],
|
||||||
|
"applyEndpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"eventPrefix": "extension-telemetry/",
|
||||||
|
"sourceDirs": [
|
||||||
|
"vscode-extension-telemetry"
|
||||||
|
],
|
||||||
|
"excludedDirs": [],
|
||||||
|
"applyEndpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"eventPrefix": "vscode-markdown/",
|
||||||
|
"sourceDirs": [
|
||||||
|
"../../s/extensions/markdown-language-features"
|
||||||
|
],
|
||||||
|
"excludedDirs": [],
|
||||||
|
"applyEndpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"eventPrefix": "html-language-features/",
|
||||||
|
"sourceDirs": [
|
||||||
|
"../../s/extensions/html-language-features",
|
||||||
|
"vscode-html-languageservice"
|
||||||
|
],
|
||||||
|
"excludedDirs": [],
|
||||||
|
"applyEndpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"eventPrefix": "json-language-features/",
|
||||||
|
"sourceDirs": [
|
||||||
|
"../../s/extensions/json-language-features",
|
||||||
|
"vscode-json-languageservice"
|
||||||
|
],
|
||||||
|
"excludedDirs": [],
|
||||||
|
"applyEndpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"eventPrefix": "ms-vscode.node2/",
|
||||||
|
"sourceDirs": [
|
||||||
|
"vscode-chrome-debug-core",
|
||||||
|
"vscode-node-debug2"
|
||||||
|
],
|
||||||
|
"excludedDirs": [],
|
||||||
|
"applyEndpoints": true,
|
||||||
|
"patchDebugEvents": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"eventPrefix": "ms-vscode.node/",
|
||||||
|
"sourceDirs": [
|
||||||
|
"vscode-chrome-debug-core",
|
||||||
|
"vscode-node-debug"
|
||||||
|
],
|
||||||
|
"excludedDirs": [],
|
||||||
|
"applyEndpoints": true,
|
||||||
|
"patchDebugEvents": true
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -44,6 +44,7 @@
|
|||||||
"service-downloader": "github:anthonydresser/service-downloader#0.1.5",
|
"service-downloader": "github:anthonydresser/service-downloader#0.1.5",
|
||||||
"typescript": "3.5.2",
|
"typescript": "3.5.2",
|
||||||
"vsce": "1.48.0",
|
"vsce": "1.48.0",
|
||||||
|
"vscode-telemetry-extractor": "1.4.3",
|
||||||
"xml2js": "^0.4.17"
|
"xml2js": "^0.4.17"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+320
-2
@@ -2,6 +2,14 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@dsherret/to-absolute-glob@^2.0.2":
|
||||||
|
version "2.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@dsherret/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1f6475dc8bd974cea07a2daf3864b317b1dd332c"
|
||||||
|
integrity sha1-H2R13IvZdM6gei2vOGSzF7HdMyw=
|
||||||
|
dependencies:
|
||||||
|
is-absolute "^1.0.0"
|
||||||
|
is-negated-glob "^1.0.0"
|
||||||
|
|
||||||
"@gulp-sourcemaps/map-sources@1.X":
|
"@gulp-sourcemaps/map-sources@1.X":
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
|
resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
|
||||||
@@ -10,6 +18,27 @@
|
|||||||
normalize-path "^2.0.1"
|
normalize-path "^2.0.1"
|
||||||
through2 "^2.0.3"
|
through2 "^2.0.3"
|
||||||
|
|
||||||
|
"@nodelib/fs.scandir@2.1.1":
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.1.tgz#7fa8fed654939e1a39753d286b48b4836d00e0eb"
|
||||||
|
integrity sha512-NT/skIZjgotDSiXs0WqYhgcuBKhUMgfekCmCGtkUAiLqZdOnrdjmZr9wRl3ll64J9NF79uZ4fk16Dx0yMc/Xbg==
|
||||||
|
dependencies:
|
||||||
|
"@nodelib/fs.stat" "2.0.1"
|
||||||
|
run-parallel "^1.1.9"
|
||||||
|
|
||||||
|
"@nodelib/fs.stat@2.0.1", "@nodelib/fs.stat@^2.0.1":
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.1.tgz#814f71b1167390cfcb6a6b3d9cdeb0951a192c14"
|
||||||
|
integrity sha512-+RqhBlLn6YRBGOIoVYthsG0J9dfpO79eJyN7BYBkZJtfqrBwf2KK+rD/M/yjZR6WBmIhAgOV7S60eCgaSWtbFw==
|
||||||
|
|
||||||
|
"@nodelib/fs.walk@^1.2.1":
|
||||||
|
version "1.2.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.2.tgz#6a6450c5e17012abd81450eb74949a4d970d2807"
|
||||||
|
integrity sha512-J/DR3+W12uCzAJkw7niXDcqcKBg6+5G5Q/ZpThpGNzAUz70eOR6RV4XnnSN01qHZiVl0eavoxJsBypQoKsV2QQ==
|
||||||
|
dependencies:
|
||||||
|
"@nodelib/fs.scandir" "2.1.1"
|
||||||
|
fastq "^1.6.0"
|
||||||
|
|
||||||
"@types/ansi-colors@^3.2.0":
|
"@types/ansi-colors@^3.2.0":
|
||||||
version "3.2.0"
|
version "3.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/ansi-colors/-/ansi-colors-3.2.0.tgz#3e4fe85d9131ce1c6994f3040bd0b25306c16a6e"
|
resolved "https://registry.yarnpkg.com/@types/ansi-colors/-/ansi-colors-3.2.0.tgz#3e4fe85d9131ce1c6994f3040bd0b25306c16a6e"
|
||||||
@@ -389,11 +418,21 @@ arr-union@^3.1.0:
|
|||||||
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
|
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
|
||||||
integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
|
integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
|
||||||
|
|
||||||
|
array-back@^3.0.1:
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0"
|
||||||
|
integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==
|
||||||
|
|
||||||
array-differ@^1.0.0:
|
array-differ@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
|
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
|
||||||
integrity sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=
|
integrity sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=
|
||||||
|
|
||||||
|
array-differ@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b"
|
||||||
|
integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==
|
||||||
|
|
||||||
array-union@^1.0.1:
|
array-union@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
|
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
|
||||||
@@ -401,6 +440,11 @@ array-union@^1.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
array-uniq "^1.0.1"
|
array-uniq "^1.0.1"
|
||||||
|
|
||||||
|
array-union@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
|
||||||
|
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
|
||||||
|
|
||||||
array-uniq@^1.0.1, array-uniq@^1.0.2:
|
array-uniq@^1.0.1, array-uniq@^1.0.2:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
|
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
|
||||||
@@ -411,6 +455,11 @@ array-unique@^0.3.2:
|
|||||||
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
|
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
|
||||||
integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
|
integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
|
||||||
|
|
||||||
|
arrify@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
|
||||||
|
integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==
|
||||||
|
|
||||||
asn1@~0.2.3:
|
asn1@~0.2.3:
|
||||||
version "0.2.3"
|
version "0.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
|
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
|
||||||
@@ -595,6 +644,13 @@ braces@^2.3.1, braces@^2.3.2:
|
|||||||
split-string "^3.0.2"
|
split-string "^3.0.2"
|
||||||
to-regex "^3.0.1"
|
to-regex "^3.0.1"
|
||||||
|
|
||||||
|
braces@^3.0.1:
|
||||||
|
version "3.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
||||||
|
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
|
||||||
|
dependencies:
|
||||||
|
fill-range "^7.0.1"
|
||||||
|
|
||||||
browserify-mime@~1.2.9:
|
browserify-mime@~1.2.9:
|
||||||
version "1.2.9"
|
version "1.2.9"
|
||||||
resolved "https://registry.yarnpkg.com/browserify-mime/-/browserify-mime-1.2.9.tgz#aeb1af28de6c0d7a6a2ce40adb68ff18422af31f"
|
resolved "https://registry.yarnpkg.com/browserify-mime/-/browserify-mime-1.2.9.tgz#aeb1af28de6c0d7a6a2ce40adb68ff18422af31f"
|
||||||
@@ -737,6 +793,11 @@ co@^4.6.0:
|
|||||||
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
||||||
integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
|
integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
|
||||||
|
|
||||||
|
code-block-writer@9.4.1:
|
||||||
|
version "9.4.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-9.4.1.tgz#1448fca79dfc7a3649000f4c85be6bc770604c4c"
|
||||||
|
integrity sha512-LHAB+DL4YZDcwK8y/kAxZ0Lf/ncwLh/Ux4cTVWbPwIdrf1gPxXiPcwpz8r8/KqXu1aD+Raz46EOxDjFlbyO6bA==
|
||||||
|
|
||||||
code-point-at@^1.0.0:
|
code-point-at@^1.0.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
||||||
@@ -786,6 +847,16 @@ combined-stream@^1.0.5, combined-stream@~1.0.5:
|
|||||||
dependencies:
|
dependencies:
|
||||||
delayed-stream "~1.0.0"
|
delayed-stream "~1.0.0"
|
||||||
|
|
||||||
|
command-line-args@^5.1.1:
|
||||||
|
version "5.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.1.1.tgz#88e793e5bb3ceb30754a86863f0401ac92fd369a"
|
||||||
|
integrity sha512-hL/eG8lrll1Qy1ezvkant+trihbGnaKaeEjj6Scyr3DN+RC7iQ5Rz84IeLERfAWDGo0HBSNAakczwgCilDXnWg==
|
||||||
|
dependencies:
|
||||||
|
array-back "^3.0.1"
|
||||||
|
find-replace "^3.0.0"
|
||||||
|
lodash.camelcase "^4.3.0"
|
||||||
|
typical "^4.0.0"
|
||||||
|
|
||||||
commander@^2.12.1, commander@^2.8.1:
|
commander@^2.12.1, commander@^2.8.1:
|
||||||
version "2.19.0"
|
version "2.19.0"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
|
||||||
@@ -1050,6 +1121,13 @@ diff@^3.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
|
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
|
||||||
integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==
|
integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==
|
||||||
|
|
||||||
|
dir-glob@^3.0.1:
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
|
||||||
|
integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
|
||||||
|
dependencies:
|
||||||
|
path-type "^4.0.0"
|
||||||
|
|
||||||
documentdb@1.13.0:
|
documentdb@1.13.0:
|
||||||
version "1.13.0"
|
version "1.13.0"
|
||||||
resolved "https://registry.yarnpkg.com/documentdb/-/documentdb-1.13.0.tgz#bba6f03150b2f42498cec4261bc439d834a33f8b"
|
resolved "https://registry.yarnpkg.com/documentdb/-/documentdb-1.13.0.tgz#bba6f03150b2f42498cec4261bc439d834a33f8b"
|
||||||
@@ -1235,11 +1313,30 @@ fast-deep-equal@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
|
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
|
||||||
integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=
|
integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=
|
||||||
|
|
||||||
|
fast-glob@^3.0.3:
|
||||||
|
version "3.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.0.4.tgz#d484a41005cb6faeb399b951fd1bd70ddaebb602"
|
||||||
|
integrity sha512-wkIbV6qg37xTJwqSsdnIphL1e+LaGz4AIQqr00mIubMaEhv1/HEmJ0uuCGZRNRUkZZmOB5mJKO0ZUTVq+SxMQg==
|
||||||
|
dependencies:
|
||||||
|
"@nodelib/fs.stat" "^2.0.1"
|
||||||
|
"@nodelib/fs.walk" "^1.2.1"
|
||||||
|
glob-parent "^5.0.0"
|
||||||
|
is-glob "^4.0.1"
|
||||||
|
merge2 "^1.2.3"
|
||||||
|
micromatch "^4.0.2"
|
||||||
|
|
||||||
fast-json-stable-stringify@^2.0.0:
|
fast-json-stable-stringify@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
|
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
|
||||||
integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I=
|
integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I=
|
||||||
|
|
||||||
|
fastq@^1.6.0:
|
||||||
|
version "1.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.0.tgz#4ec8a38f4ac25f21492673adb7eae9cfef47d1c2"
|
||||||
|
integrity sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==
|
||||||
|
dependencies:
|
||||||
|
reusify "^1.0.0"
|
||||||
|
|
||||||
fd-slicer@~1.1.0:
|
fd-slicer@~1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
|
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
|
||||||
@@ -1272,6 +1369,20 @@ fill-range@^4.0.0:
|
|||||||
repeat-string "^1.6.1"
|
repeat-string "^1.6.1"
|
||||||
to-regex-range "^2.1.0"
|
to-regex-range "^2.1.0"
|
||||||
|
|
||||||
|
fill-range@^7.0.1:
|
||||||
|
version "7.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
|
||||||
|
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
|
||||||
|
dependencies:
|
||||||
|
to-regex-range "^5.0.1"
|
||||||
|
|
||||||
|
find-replace@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38"
|
||||||
|
integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==
|
||||||
|
dependencies:
|
||||||
|
array-back "^3.0.1"
|
||||||
|
|
||||||
for-in@^1.0.2:
|
for-in@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
|
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
|
||||||
@@ -1312,6 +1423,15 @@ fs-constants@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
|
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
|
||||||
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
|
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
|
||||||
|
|
||||||
|
fs-extra@^8.1.0:
|
||||||
|
version "8.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
|
||||||
|
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
|
||||||
|
dependencies:
|
||||||
|
graceful-fs "^4.2.0"
|
||||||
|
jsonfile "^4.0.0"
|
||||||
|
universalify "^0.1.0"
|
||||||
|
|
||||||
fs-minipass@^1.2.5:
|
fs-minipass@^1.2.5:
|
||||||
version "1.2.5"
|
version "1.2.5"
|
||||||
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
|
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
|
||||||
@@ -1384,7 +1504,14 @@ glob-parent@^3.1.0:
|
|||||||
is-glob "^3.1.0"
|
is-glob "^3.1.0"
|
||||||
path-dirname "^1.0.0"
|
path-dirname "^1.0.0"
|
||||||
|
|
||||||
glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.3:
|
glob-parent@^5.0.0:
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954"
|
||||||
|
integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==
|
||||||
|
dependencies:
|
||||||
|
is-glob "^4.0.1"
|
||||||
|
|
||||||
|
glob@^7.0.3, glob@^7.0.6, glob@^7.1.1:
|
||||||
version "7.1.3"
|
version "7.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
|
||||||
integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==
|
integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==
|
||||||
@@ -1396,6 +1523,32 @@ glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.3:
|
|||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
glob@^7.1.3:
|
||||||
|
version "7.1.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
|
||||||
|
integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
|
||||||
|
dependencies:
|
||||||
|
fs.realpath "^1.0.0"
|
||||||
|
inflight "^1.0.4"
|
||||||
|
inherits "2"
|
||||||
|
minimatch "^3.0.4"
|
||||||
|
once "^1.3.0"
|
||||||
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
globby@^10.0.1:
|
||||||
|
version "10.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22"
|
||||||
|
integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==
|
||||||
|
dependencies:
|
||||||
|
"@types/glob" "^7.1.1"
|
||||||
|
array-union "^2.1.0"
|
||||||
|
dir-glob "^3.0.1"
|
||||||
|
fast-glob "^3.0.3"
|
||||||
|
glob "^7.1.3"
|
||||||
|
ignore "^5.1.1"
|
||||||
|
merge2 "^1.2.3"
|
||||||
|
slash "^3.0.0"
|
||||||
|
|
||||||
globby@^6.1.0:
|
globby@^6.1.0:
|
||||||
version "6.1.0"
|
version "6.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
|
resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
|
||||||
@@ -1424,6 +1577,11 @@ graceful-fs@^4.1.10, graceful-fs@^4.1.11:
|
|||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
|
||||||
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
|
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
|
||||||
|
|
||||||
|
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
|
||||||
|
version "4.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b"
|
||||||
|
integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==
|
||||||
|
|
||||||
"graceful-readlink@>= 1.0.0":
|
"graceful-readlink@>= 1.0.0":
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
|
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
|
||||||
@@ -1676,6 +1834,11 @@ ignore-walk@^3.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
|
|
||||||
|
ignore@^5.1.1:
|
||||||
|
version "5.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.2.tgz#e28e584d43ad7e92f96995019cc43b9e1ac49558"
|
||||||
|
integrity sha512-vdqWBp7MyzdmHkkRWV5nY+PfGRbYbahfuvsBCh277tq+w9zyNi7h5CYJCK0kmzti9kU+O/cB7sE8HvKv6aXAKQ==
|
||||||
|
|
||||||
inflight@^1.0.4:
|
inflight@^1.0.4:
|
||||||
version "1.0.6"
|
version "1.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||||
@@ -1694,6 +1857,14 @@ ini@~1.3.0:
|
|||||||
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
|
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
|
||||||
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
|
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
|
||||||
|
|
||||||
|
is-absolute@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576"
|
||||||
|
integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==
|
||||||
|
dependencies:
|
||||||
|
is-relative "^1.0.0"
|
||||||
|
is-windows "^1.0.1"
|
||||||
|
|
||||||
is-accessor-descriptor@^0.1.6:
|
is-accessor-descriptor@^0.1.6:
|
||||||
version "0.1.6"
|
version "0.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
|
resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
|
||||||
@@ -1795,11 +1966,23 @@ is-glob@^4.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-extglob "^2.1.1"
|
is-extglob "^2.1.1"
|
||||||
|
|
||||||
|
is-glob@^4.0.1:
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
|
||||||
|
integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
|
||||||
|
dependencies:
|
||||||
|
is-extglob "^2.1.1"
|
||||||
|
|
||||||
is-natural-number@^4.0.1:
|
is-natural-number@^4.0.1:
|
||||||
version "4.0.1"
|
version "4.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8"
|
resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8"
|
||||||
integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=
|
integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=
|
||||||
|
|
||||||
|
is-negated-glob@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2"
|
||||||
|
integrity sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=
|
||||||
|
|
||||||
is-number@^3.0.0:
|
is-number@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
|
resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
|
||||||
@@ -1807,6 +1990,11 @@ is-number@^3.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
kind-of "^3.0.2"
|
kind-of "^3.0.2"
|
||||||
|
|
||||||
|
is-number@^7.0.0:
|
||||||
|
version "7.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
||||||
|
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
||||||
|
|
||||||
is-path-cwd@^1.0.0:
|
is-path-cwd@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
|
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
|
||||||
@@ -1833,6 +2021,13 @@ is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
|
|||||||
dependencies:
|
dependencies:
|
||||||
isobject "^3.0.1"
|
isobject "^3.0.1"
|
||||||
|
|
||||||
|
is-relative@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d"
|
||||||
|
integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==
|
||||||
|
dependencies:
|
||||||
|
is-unc-path "^1.0.0"
|
||||||
|
|
||||||
is-stream@^1.1.0:
|
is-stream@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
|
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
|
||||||
@@ -1843,12 +2038,19 @@ is-typedarray@~1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
|
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
|
||||||
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
|
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
|
||||||
|
|
||||||
|
is-unc-path@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d"
|
||||||
|
integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==
|
||||||
|
dependencies:
|
||||||
|
unc-path-regex "^0.1.2"
|
||||||
|
|
||||||
is-utf8@^0.2.0:
|
is-utf8@^0.2.0:
|
||||||
version "0.2.1"
|
version "0.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
|
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
|
||||||
integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
|
integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
|
||||||
|
|
||||||
is-windows@^1.0.2:
|
is-windows@^1.0.1, is-windows@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
|
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
|
||||||
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
|
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
|
||||||
@@ -1927,6 +2129,13 @@ json-stringify-safe@~5.0.1:
|
|||||||
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||||
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
|
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
|
||||||
|
|
||||||
|
jsonfile@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
|
||||||
|
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
|
||||||
|
optionalDependencies:
|
||||||
|
graceful-fs "^4.1.6"
|
||||||
|
|
||||||
jsonify@~0.0.0:
|
jsonify@~0.0.0:
|
||||||
version "0.0.0"
|
version "0.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
|
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
|
||||||
@@ -2028,6 +2237,11 @@ lodash._root@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
|
resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
|
||||||
integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=
|
integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=
|
||||||
|
|
||||||
|
lodash.camelcase@^4.3.0:
|
||||||
|
version "4.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
|
||||||
|
integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY=
|
||||||
|
|
||||||
lodash.escape@^3.0.0:
|
lodash.escape@^3.0.0:
|
||||||
version "3.2.0"
|
version "3.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
|
resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
|
||||||
@@ -2130,6 +2344,11 @@ mdurl@^1.0.1:
|
|||||||
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
|
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
|
||||||
integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=
|
integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=
|
||||||
|
|
||||||
|
merge2@^1.2.3:
|
||||||
|
version "1.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5"
|
||||||
|
integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==
|
||||||
|
|
||||||
micromatch@^3.1.10, micromatch@^3.1.4:
|
micromatch@^3.1.10, micromatch@^3.1.4:
|
||||||
version "3.1.10"
|
version "3.1.10"
|
||||||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
|
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
|
||||||
@@ -2149,6 +2368,14 @@ micromatch@^3.1.10, micromatch@^3.1.4:
|
|||||||
snapdragon "^0.8.1"
|
snapdragon "^0.8.1"
|
||||||
to-regex "^3.0.2"
|
to-regex "^3.0.2"
|
||||||
|
|
||||||
|
micromatch@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259"
|
||||||
|
integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==
|
||||||
|
dependencies:
|
||||||
|
braces "^3.0.1"
|
||||||
|
picomatch "^2.0.5"
|
||||||
|
|
||||||
mime-db@~1.30.0:
|
mime-db@~1.30.0:
|
||||||
version "1.30.0"
|
version "1.30.0"
|
||||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01"
|
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01"
|
||||||
@@ -2240,6 +2467,17 @@ ms@^2.1.1:
|
|||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
|
||||||
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
|
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
|
||||||
|
|
||||||
|
multimatch@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3"
|
||||||
|
integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==
|
||||||
|
dependencies:
|
||||||
|
"@types/minimatch" "^3.0.3"
|
||||||
|
array-differ "^3.0.0"
|
||||||
|
array-union "^2.1.0"
|
||||||
|
arrify "^2.0.1"
|
||||||
|
minimatch "^3.0.4"
|
||||||
|
|
||||||
multipipe@^0.1.2:
|
multipipe@^0.1.2:
|
||||||
version "0.1.2"
|
version "0.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
|
resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
|
||||||
@@ -2474,6 +2712,11 @@ path-parse@^1.0.5:
|
|||||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
|
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
|
||||||
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
|
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
|
||||||
|
|
||||||
|
path-type@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
|
||||||
|
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
|
||||||
|
|
||||||
pend@~1.2.0:
|
pend@~1.2.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
||||||
@@ -2489,6 +2732,11 @@ performance-now@^2.1.0:
|
|||||||
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
||||||
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
||||||
|
|
||||||
|
picomatch@^2.0.5:
|
||||||
|
version "2.0.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.0.7.tgz#514169d8c7cd0bdbeecc8a2609e34a7163de69f6"
|
||||||
|
integrity sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==
|
||||||
|
|
||||||
pify@^2.0.0, pify@^2.3.0:
|
pify@^2.0.0, pify@^2.3.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
||||||
@@ -2730,6 +2978,11 @@ ret@~0.1.10:
|
|||||||
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
||||||
integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
|
integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
|
||||||
|
|
||||||
|
reusify@^1.0.0:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
|
||||||
|
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
|
||||||
|
|
||||||
rimraf@^2.2.8, rimraf@^2.6.1:
|
rimraf@^2.2.8, rimraf@^2.6.1:
|
||||||
version "2.6.3"
|
version "2.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
|
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
|
||||||
@@ -2737,6 +2990,11 @@ rimraf@^2.2.8, rimraf@^2.6.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.1.3"
|
glob "^7.1.3"
|
||||||
|
|
||||||
|
run-parallel@^1.1.9:
|
||||||
|
version "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.1:
|
safe-buffer@^5.0.1, safe-buffer@^5.1.1:
|
||||||
version "5.1.1"
|
version "5.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||||
@@ -2827,6 +3085,11 @@ signal-exit@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
||||||
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
|
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
|
||||||
|
|
||||||
|
slash@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
|
||||||
|
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
|
||||||
|
|
||||||
snapdragon-node@^2.0.1:
|
snapdragon-node@^2.0.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
|
resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
|
||||||
@@ -3094,6 +3357,13 @@ to-regex-range@^2.1.0:
|
|||||||
is-number "^3.0.0"
|
is-number "^3.0.0"
|
||||||
repeat-string "^1.6.1"
|
repeat-string "^1.6.1"
|
||||||
|
|
||||||
|
to-regex-range@^5.0.1:
|
||||||
|
version "5.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
|
||||||
|
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
|
||||||
|
dependencies:
|
||||||
|
is-number "^7.0.0"
|
||||||
|
|
||||||
to-regex@^3.0.1, to-regex@^3.0.2:
|
to-regex@^3.0.1, to-regex@^3.0.2:
|
||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
|
resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
|
||||||
@@ -3118,6 +3388,20 @@ tough-cookie@~2.3.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
punycode "^1.4.1"
|
punycode "^1.4.1"
|
||||||
|
|
||||||
|
ts-morph@^3.1.2:
|
||||||
|
version "3.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-3.1.3.tgz#bbfa1d14481ee23bdd1c030340ccf4a243cfc844"
|
||||||
|
integrity sha512-CwjgyJTtd3f8vBi7Vr0IOgdOY6Wi/Tq0MhieXOE2B5ns5WWRD7BwMNHtv+ZufKI/S2U/lMrh+Q3bOauE4tsv2g==
|
||||||
|
dependencies:
|
||||||
|
"@dsherret/to-absolute-glob" "^2.0.2"
|
||||||
|
code-block-writer "9.4.1"
|
||||||
|
fs-extra "^8.1.0"
|
||||||
|
glob-parent "^5.0.0"
|
||||||
|
globby "^10.0.1"
|
||||||
|
is-negated-glob "^1.0.0"
|
||||||
|
multimatch "^4.0.0"
|
||||||
|
typescript "^3.0.1"
|
||||||
|
|
||||||
tslib@^1.8.0, tslib@^1.8.1:
|
tslib@^1.8.0, tslib@^1.8.1:
|
||||||
version "1.9.3"
|
version "1.9.3"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
|
||||||
@@ -3178,6 +3462,16 @@ typescript@3.5.2:
|
|||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
|
||||||
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
|
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
|
||||||
|
|
||||||
|
typescript@^3.0.1:
|
||||||
|
version "3.5.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
|
||||||
|
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
|
||||||
|
|
||||||
|
typical@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4"
|
||||||
|
integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==
|
||||||
|
|
||||||
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376"
|
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376"
|
||||||
@@ -3191,6 +3485,11 @@ unbzip2-stream@^1.0.9:
|
|||||||
buffer "^5.2.1"
|
buffer "^5.2.1"
|
||||||
through "^2.3.8"
|
through "^2.3.8"
|
||||||
|
|
||||||
|
unc-path-regex@^0.1.2:
|
||||||
|
version "0.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
|
||||||
|
integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo=
|
||||||
|
|
||||||
underscore@1.8.3, underscore@~1.8.3:
|
underscore@1.8.3, underscore@~1.8.3:
|
||||||
version "1.8.3"
|
version "1.8.3"
|
||||||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
|
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
|
||||||
@@ -3211,6 +3510,11 @@ union-value@^1.0.0:
|
|||||||
is-extendable "^0.1.1"
|
is-extendable "^0.1.1"
|
||||||
set-value "^0.4.3"
|
set-value "^0.4.3"
|
||||||
|
|
||||||
|
universalify@^0.1.0:
|
||||||
|
version "0.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
||||||
|
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
|
||||||
|
|
||||||
unset-value@^1.0.0:
|
unset-value@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
|
resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
|
||||||
@@ -3309,6 +3613,20 @@ vsce@1.48.0:
|
|||||||
yauzl "^2.3.1"
|
yauzl "^2.3.1"
|
||||||
yazl "^2.2.2"
|
yazl "^2.2.2"
|
||||||
|
|
||||||
|
vscode-ripgrep@^1.4.0:
|
||||||
|
version "1.5.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.4.tgz#dae1c3eef350513299341cdf96e622c00b548eff"
|
||||||
|
integrity sha512-Bs8SvFAkR0QHf09J46VgNo19yRikOtj/f0zHzK3AM3ICjCGNN/BNoG9of6zGVHUTO+6Mk1RbKglyOHLKr8D1lg==
|
||||||
|
|
||||||
|
vscode-telemetry-extractor@1.4.3:
|
||||||
|
version "1.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/vscode-telemetry-extractor/-/vscode-telemetry-extractor-1.4.3.tgz#e4af380beb4e2a63d6e4fa819b25ba7ef6dc4a10"
|
||||||
|
integrity sha512-OFklPErZnUBjrKte3hg+irQXue5rzgz4qnvE8kdaOnW1E/wynHUEXW9t5vF5q0hu2lodpGMkybwLkSjONZVzvg==
|
||||||
|
dependencies:
|
||||||
|
command-line-args "^5.1.1"
|
||||||
|
ts-morph "^3.1.2"
|
||||||
|
vscode-ripgrep "^1.4.0"
|
||||||
|
|
||||||
vso-node-api@6.1.2-preview:
|
vso-node-api@6.1.2-preview:
|
||||||
version "6.1.2-preview"
|
version "6.1.2-preview"
|
||||||
resolved "https://registry.yarnpkg.com/vso-node-api/-/vso-node-api-6.1.2-preview.tgz#aab3546df2451ecd894e071bb99b5df19c5fa78f"
|
resolved "https://registry.yarnpkg.com/vso-node-api/-/vso-node-api-6.1.2-preview.tgz#aab3546df2451ecd894e071bb99b5df19c5fa78f"
|
||||||
|
|||||||
@@ -1246,12 +1246,18 @@
|
|||||||
},
|
},
|
||||||
"git.ignoredRepositories": {
|
"git.ignoredRepositories": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"default": [],
|
"default": [],
|
||||||
"scope": "window",
|
"scope": "window",
|
||||||
"description": "%config.ignoredRepositories%"
|
"description": "%config.ignoredRepositories%"
|
||||||
},
|
},
|
||||||
"git.scanRepositories": {
|
"git.scanRepositories": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"default": [],
|
"default": [],
|
||||||
"scope": "resource",
|
"scope": "resource",
|
||||||
"description": "%config.scanRepositories%"
|
"description": "%config.scanRepositories%"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { xhr, XHRResponse, getErrorStatusDescription } from 'request-light';
|
|||||||
|
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
import { workspace, window, languages, commands, ExtensionContext, extensions, Uri, LanguageConfiguration, Diagnostic, StatusBarAlignment, TextEditor, TextDocument, Position, SelectionRange } from 'vscode';
|
import { workspace, window, languages, commands, ExtensionContext, extensions, Uri, LanguageConfiguration, Diagnostic, StatusBarAlignment, TextEditor } from 'vscode';
|
||||||
import { LanguageClient, LanguageClientOptions, RequestType, ServerOptions, TransportKind, NotificationType, DidChangeConfigurationNotification, HandleDiagnosticsSignature, ResponseError } from 'vscode-languageclient';
|
import { LanguageClient, LanguageClientOptions, RequestType, ServerOptions, TransportKind, NotificationType, DidChangeConfigurationNotification, HandleDiagnosticsSignature, ResponseError } from 'vscode-languageclient';
|
||||||
import TelemetryReporter from 'vscode-extension-telemetry';
|
import TelemetryReporter from 'vscode-extension-telemetry';
|
||||||
|
|
||||||
@@ -216,26 +216,6 @@ export function activate(context: ExtensionContext) {
|
|||||||
extensions.onDidChange(_ => {
|
extensions.onDidChange(_ => {
|
||||||
client.sendNotification(SchemaAssociationNotification.type, getSchemaAssociation(context));
|
client.sendNotification(SchemaAssociationNotification.type, getSchemaAssociation(context));
|
||||||
});
|
});
|
||||||
|
|
||||||
documentSelector.forEach(selector => {
|
|
||||||
toDispose.push(languages.registerSelectionRangeProvider(selector, {
|
|
||||||
async provideSelectionRanges(document: TextDocument, positions: Position[]): Promise<SelectionRange[]> {
|
|
||||||
const textDocument = client.code2ProtocolConverter.asTextDocumentIdentifier(document);
|
|
||||||
const rawResult = await client.sendRequest<SelectionRange[][]>('$/textDocument/selectionRanges', { textDocument, positions: positions.map(client.code2ProtocolConverter.asPosition) });
|
|
||||||
if (Array.isArray(rawResult)) {
|
|
||||||
return rawResult.map(rawSelectionRanges => {
|
|
||||||
return rawSelectionRanges.reduceRight((parent: SelectionRange | undefined, selectionRange: SelectionRange) => {
|
|
||||||
return {
|
|
||||||
range: client.protocol2CodeConverter.asRange(selectionRange.range),
|
|
||||||
parent,
|
|
||||||
};
|
|
||||||
}, undefined)!;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -433,7 +433,8 @@ connection.onFoldingRanges((params, token) => {
|
|||||||
}, null, `Error while computing folding ranges for ${params.textDocument.uri}`, token);
|
}, null, `Error while computing folding ranges for ${params.textDocument.uri}`, token);
|
||||||
});
|
});
|
||||||
|
|
||||||
connection.onRequest('$/textDocument/selectionRanges', async (params, token) => {
|
|
||||||
|
connection.onSelectionRanges((params, token) => {
|
||||||
return runSafe(() => {
|
return runSafe(() => {
|
||||||
const document = documents.get(params.textDocument.uri);
|
const document = documents.get(params.textDocument.uri);
|
||||||
if (document) {
|
if (document) {
|
||||||
|
|||||||
@@ -197,6 +197,9 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"markdown.styles": {
|
"markdown.styles": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"default": [],
|
"default": [],
|
||||||
"description": "%markdown.styles.dec%",
|
"description": "%markdown.styles.dec%",
|
||||||
"scope": "resource"
|
"scope": "resource"
|
||||||
|
|||||||
@@ -15,9 +15,11 @@ export class ShowSourceCommand implements Command {
|
|||||||
) { }
|
) { }
|
||||||
|
|
||||||
public execute() {
|
public execute() {
|
||||||
if (this.previewManager.activePreviewResource) {
|
const { activePreviewResource, activePreviewResourceColumn } = this.previewManager;
|
||||||
return vscode.workspace.openTextDocument(this.previewManager.activePreviewResource)
|
if (activePreviewResource && activePreviewResourceColumn) {
|
||||||
.then(document => vscode.window.showTextDocument(document));
|
return vscode.workspace.openTextDocument(activePreviewResource).then(document => {
|
||||||
|
vscode.window.showTextDocument(document, activePreviewResourceColumn);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,11 +102,13 @@ export class MarkdownPreview extends Disposable {
|
|||||||
const resource = vscode.Uri.parse(state.resource);
|
const resource = vscode.Uri.parse(state.resource);
|
||||||
const locked = state.locked;
|
const locked = state.locked;
|
||||||
const line = state.line;
|
const line = state.line;
|
||||||
|
const resourceColumn = state.resourceColumn;
|
||||||
|
|
||||||
const preview = new MarkdownPreview(
|
const preview = new MarkdownPreview(
|
||||||
webview,
|
webview,
|
||||||
resource,
|
resource,
|
||||||
locked,
|
locked,
|
||||||
|
resourceColumn,
|
||||||
contentProvider,
|
contentProvider,
|
||||||
previewConfigurations,
|
previewConfigurations,
|
||||||
logger,
|
logger,
|
||||||
@@ -125,6 +127,7 @@ export class MarkdownPreview extends Disposable {
|
|||||||
public static create(
|
public static create(
|
||||||
resource: vscode.Uri,
|
resource: vscode.Uri,
|
||||||
previewColumn: vscode.ViewColumn,
|
previewColumn: vscode.ViewColumn,
|
||||||
|
resourceColumn: vscode.ViewColumn,
|
||||||
locked: boolean,
|
locked: boolean,
|
||||||
contentProvider: MarkdownContentProvider,
|
contentProvider: MarkdownContentProvider,
|
||||||
previewConfigurations: MarkdownPreviewConfigurationManager,
|
previewConfigurations: MarkdownPreviewConfigurationManager,
|
||||||
@@ -144,6 +147,7 @@ export class MarkdownPreview extends Disposable {
|
|||||||
webview,
|
webview,
|
||||||
resource,
|
resource,
|
||||||
locked,
|
locked,
|
||||||
|
resourceColumn,
|
||||||
contentProvider,
|
contentProvider,
|
||||||
previewConfigurations,
|
previewConfigurations,
|
||||||
logger,
|
logger,
|
||||||
@@ -155,6 +159,7 @@ export class MarkdownPreview extends Disposable {
|
|||||||
webview: vscode.WebviewPanel,
|
webview: vscode.WebviewPanel,
|
||||||
resource: vscode.Uri,
|
resource: vscode.Uri,
|
||||||
locked: boolean,
|
locked: boolean,
|
||||||
|
private readonly _resourceColumn: vscode.ViewColumn,
|
||||||
private readonly _contentProvider: MarkdownContentProvider,
|
private readonly _contentProvider: MarkdownContentProvider,
|
||||||
private readonly _previewConfigurations: MarkdownPreviewConfigurationManager,
|
private readonly _previewConfigurations: MarkdownPreviewConfigurationManager,
|
||||||
private readonly _logger: Logger,
|
private readonly _logger: Logger,
|
||||||
@@ -249,11 +254,16 @@ export class MarkdownPreview extends Disposable {
|
|||||||
return this._resource;
|
return this._resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get resourceColumn(): vscode.ViewColumn {
|
||||||
|
return this._resourceColumn;
|
||||||
|
}
|
||||||
|
|
||||||
public get state() {
|
public get state() {
|
||||||
return {
|
return {
|
||||||
resource: this.resource.toString(),
|
resource: this.resource.toString(),
|
||||||
locked: this._locked,
|
locked: this._locked,
|
||||||
line: this.line,
|
line: this.line,
|
||||||
|
resourceColumn: this.resourceColumn,
|
||||||
imageInfo: this.imageInfo
|
imageInfo: this.imageInfo
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
|||||||
return this._activePreview && this._activePreview.resource;
|
return this._activePreview && this._activePreview.resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get activePreviewResourceColumn() {
|
||||||
|
return this._activePreview && this._activePreview.resourceColumn;
|
||||||
|
}
|
||||||
|
|
||||||
public toggleLock() {
|
public toggleLock() {
|
||||||
const preview = this._activePreview;
|
const preview = this._activePreview;
|
||||||
if (preview) {
|
if (preview) {
|
||||||
@@ -110,6 +114,7 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
|
|||||||
const preview = MarkdownPreview.create(
|
const preview = MarkdownPreview.create(
|
||||||
resource,
|
resource,
|
||||||
previewSettings.previewColumn,
|
previewSettings.previewColumn,
|
||||||
|
previewSettings.resourceColumn,
|
||||||
previewSettings.locked,
|
previewSettings.locked,
|
||||||
this._contentProvider,
|
this._contentProvider,
|
||||||
this._previewConfigurations,
|
this._previewConfigurations,
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
".dita",
|
".dita",
|
||||||
".ditamap",
|
".ditamap",
|
||||||
".dtd",
|
".dtd",
|
||||||
|
".ent",
|
||||||
|
".mod",
|
||||||
".dtml",
|
".dtml",
|
||||||
".fsproj",
|
".fsproj",
|
||||||
".fxml",
|
".fxml",
|
||||||
|
|||||||
+5
-5
@@ -66,14 +66,14 @@
|
|||||||
"reflect-metadata": "^0.1.8",
|
"reflect-metadata": "^0.1.8",
|
||||||
"rxjs": "5.4.0",
|
"rxjs": "5.4.0",
|
||||||
"sanitize-html": "^1.19.1",
|
"sanitize-html": "^1.19.1",
|
||||||
"semver": "^5.5.0",
|
"semver-umd": "^5.5.3",
|
||||||
"slickgrid": "github:anthonydresser/SlickGrid#2.3.29",
|
"slickgrid": "github:anthonydresser/SlickGrid#2.3.29",
|
||||||
"spdlog": "^0.9.0",
|
"spdlog": "^0.9.0",
|
||||||
"sudo-prompt": "9.0.0",
|
"sudo-prompt": "9.0.0",
|
||||||
"v8-inspect-profiler": "^0.0.20",
|
"v8-inspect-profiler": "^0.0.20",
|
||||||
"vscode-chokidar": "2.1.7",
|
"vscode-chokidar": "2.1.7",
|
||||||
"vscode-proxy-agent": "0.4.0",
|
"vscode-proxy-agent": "0.4.0",
|
||||||
"vscode-ripgrep": "^1.3.1",
|
"vscode-ripgrep": "^1.5.4",
|
||||||
"vscode-sqlite3": "4.0.8",
|
"vscode-sqlite3": "4.0.8",
|
||||||
"vscode-textmate": "^4.2.2",
|
"vscode-textmate": "^4.2.2",
|
||||||
"xterm": "3.15.0-beta71",
|
"xterm": "3.15.0-beta71",
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
"fast-plist": "0.1.2",
|
"fast-plist": "0.1.2",
|
||||||
"glob": "^5.0.13",
|
"glob": "^5.0.13",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"gulp-atom-electron": "^1.20.0",
|
"gulp-atom-electron": "^1.21.1",
|
||||||
"gulp-azure-storage": "^0.10.0",
|
"gulp-azure-storage": "^0.10.0",
|
||||||
"gulp-buffer": "0.0.2",
|
"gulp-buffer": "0.0.2",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
@@ -188,8 +188,8 @@
|
|||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"vscode-windows-ca-certs": "0.1.0",
|
"vscode-windows-ca-certs": "0.1.0",
|
||||||
"vscode-windows-registry": "1.0.1",
|
"vscode-windows-registry": "1.0.1",
|
||||||
"windows-foreground-love": "0.1.0",
|
"windows-foreground-love": "0.2.0",
|
||||||
"windows-mutex": "0.2.1",
|
"windows-mutex": "0.3.0",
|
||||||
"windows-process-tree": "0.2.4"
|
"windows-process-tree": "0.2.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -14,11 +14,11 @@
|
|||||||
"node-pty": "0.9.0-beta19",
|
"node-pty": "0.9.0-beta19",
|
||||||
"nsfw": "1.2.5",
|
"nsfw": "1.2.5",
|
||||||
"onigasm-umd": "^2.2.2",
|
"onigasm-umd": "^2.2.2",
|
||||||
"semver": "^5.5.0",
|
"semver-umd": "^5.5.3",
|
||||||
"spdlog": "^0.9.0",
|
"spdlog": "^0.9.0",
|
||||||
"vscode-chokidar": "2.1.7",
|
"vscode-chokidar": "2.1.7",
|
||||||
"vscode-proxy-agent": "0.4.0",
|
"vscode-proxy-agent": "0.4.0",
|
||||||
"vscode-ripgrep": "^1.3.1",
|
"vscode-ripgrep": "^1.5.4",
|
||||||
"vscode-textmate": "^4.2.2",
|
"vscode-textmate": "^4.2.2",
|
||||||
"xterm": "3.15.0-beta71",
|
"xterm": "3.15.0-beta71",
|
||||||
"xterm-addon-search": "0.2.0-beta2",
|
"xterm-addon-search": "0.2.0-beta2",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"vscode-textmate": "^4.1.1",
|
"vscode-textmate": "^4.1.1",
|
||||||
"xterm": "3.15.0-beta67",
|
"xterm": "3.15.0-beta67",
|
||||||
"xterm-addon-search": "0.2.0-beta2",
|
"xterm-addon-search": "0.2.0-beta2",
|
||||||
"xterm-addon-web-links": "0.1.0-beta10"
|
"xterm-addon-web-links": "0.1.0-beta10",
|
||||||
|
"semver-umd": "^5.5.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,11 @@ oniguruma@^7.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
nan "^2.14.0"
|
nan "^2.14.0"
|
||||||
|
|
||||||
|
semver-umd@^5.5.3:
|
||||||
|
version "5.5.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.3.tgz#b64d7a2d4f5a717b369d56e31940a38e47e34d1e"
|
||||||
|
integrity sha512-HOnQrn2iKnVe/xlqCTzMXQdvSz3rPbD0DmQXYuQ+oK1dpptGFfPghonQrx5JHl2O7EJwDqtQnjhE7ME23q6ngw==
|
||||||
|
|
||||||
vscode-textmate@^4.1.1:
|
vscode-textmate@^4.1.1:
|
||||||
version "4.2.2"
|
version "4.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-4.2.2.tgz#0b4dabc69a6fba79a065cb6b615f66eac07c8f4c"
|
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-4.2.2.tgz#0b4dabc69a6fba79a065cb6b615f66eac07c8f4c"
|
||||||
|
|||||||
+9
-9
@@ -876,16 +876,16 @@ safe-regex@^1.1.0:
|
|||||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||||
|
|
||||||
|
semver-umd@^5.5.3:
|
||||||
|
version "5.5.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.3.tgz#b64d7a2d4f5a717b369d56e31940a38e47e34d1e"
|
||||||
|
integrity sha512-HOnQrn2iKnVe/xlqCTzMXQdvSz3rPbD0DmQXYuQ+oK1dpptGFfPghonQrx5JHl2O7EJwDqtQnjhE7ME23q6ngw==
|
||||||
|
|
||||||
semver@^5.3.0:
|
semver@^5.3.0:
|
||||||
version "5.6.0"
|
version "5.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
|
||||||
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
|
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
|
||||||
|
|
||||||
semver@^5.5.0:
|
|
||||||
version "5.5.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
|
|
||||||
integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==
|
|
||||||
|
|
||||||
semver@^5.6.0:
|
semver@^5.6.0:
|
||||||
version "5.7.0"
|
version "5.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
|
||||||
@@ -1123,10 +1123,10 @@ vscode-proxy-agent@0.4.0:
|
|||||||
https-proxy-agent "2.2.1"
|
https-proxy-agent "2.2.1"
|
||||||
socks-proxy-agent "4.0.1"
|
socks-proxy-agent "4.0.1"
|
||||||
|
|
||||||
vscode-ripgrep@^1.3.1:
|
vscode-ripgrep@^1.5.4:
|
||||||
version "1.3.1"
|
version "1.5.4"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.3.1.tgz#51fb93debcd0c18a8b90dbc37f84f94333d0c486"
|
resolved "https://registry.yarnpkg.com/vscode-ripgrep/-/vscode-ripgrep-1.5.4.tgz#dae1c3eef350513299341cdf96e622c00b548eff"
|
||||||
integrity sha512-4WLB/n4ZeWNi5AEzPTkfYrqbKtXlv0SlgmxbRVdulwZzGx/lfWeWPu9Shy32orM27IofQAQDuirbRBOYNJVzBA==
|
integrity sha512-Bs8SvFAkR0QHf09J46VgNo19yRikOtj/f0zHzK3AM3ICjCGNN/BNoG9of6zGVHUTO+6Mk1RbKglyOHLKr8D1lg==
|
||||||
|
|
||||||
vscode-textmate@^4.2.2:
|
vscode-textmate@^4.2.2:
|
||||||
version "4.2.2"
|
version "4.2.2"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
|||||||
import * as TypeMoq from 'typemoq';
|
import * as TypeMoq from 'typemoq';
|
||||||
import * as assert from 'assert';
|
import * as assert from 'assert';
|
||||||
import { NullLogService } from 'vs/platform/log/common/log';
|
import { NullLogService } from 'vs/platform/log/common/log';
|
||||||
import { SimpleTelemetryService } from 'vs/workbench/browser/web.simpleservices';
|
import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService';
|
||||||
|
|
||||||
suite('SQL Telemetry Utilities tests', () => {
|
suite('SQL Telemetry Utilities tests', () => {
|
||||||
let telemetryService: TypeMoq.Mock<ITelemetryService>;
|
let telemetryService: TypeMoq.Mock<ITelemetryService>;
|
||||||
@@ -35,7 +35,7 @@ suite('SQL Telemetry Utilities tests', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
setup(() => {
|
setup(() => {
|
||||||
telemetryService = TypeMoq.Mock.ofType(SimpleTelemetryService, TypeMoq.MockBehavior.Strict);
|
telemetryService = TypeMoq.Mock.ofType(TelemetryService, TypeMoq.MockBehavior.Strict, Object.create(null));
|
||||||
telemetryService.setup(x => x.publicLog(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(x => Promise.resolve(none));
|
telemetryService.setup(x => x.publicLog(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(x => Promise.resolve(none));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBa
|
|||||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/workbench/browser/modelComponents/interfaces';
|
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/workbench/browser/modelComponents/interfaces';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
import { IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||||
import { WebviewContentOptions } from 'vs/workbench/contrib/webview/common/webview';
|
import { WebviewContentOptions } from 'vs/workbench/contrib/webview/common/webview';
|
||||||
|
|
||||||
function reviveWebviewOptions(options: vscode.WebviewOptions): vscode.WebviewOptions {
|
function reviveWebviewOptions(options: vscode.WebviewOptions): vscode.WebviewOptions {
|
||||||
@@ -38,7 +38,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
|||||||
|
|
||||||
private static readonly standardSupportedLinkSchemes = ['http', 'https', 'mailto'];
|
private static readonly standardSupportedLinkSchemes = ['http', 'https', 'mailto'];
|
||||||
|
|
||||||
private _webview: WebviewElement;
|
private _webview: ElectronWebviewBasedWebview;
|
||||||
private _renderedHtml: string;
|
private _renderedHtml: string;
|
||||||
private _extensionLocationUri: URI;
|
private _extensionLocationUri: URI;
|
||||||
private _ready: Promise<void>;
|
private _ready: Promise<void>;
|
||||||
@@ -65,7 +65,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _createWebview(): void {
|
private _createWebview(): void {
|
||||||
this._webview = this.instantiationService.createInstance(WebviewElement,
|
this._webview = this.instantiationService.createInstance(ElectronWebviewBasedWebview,
|
||||||
{
|
{
|
||||||
allowSvgs: true
|
allowSvgs: true
|
||||||
},
|
},
|
||||||
@@ -158,7 +158,7 @@ export default class WebViewComponent extends ComponentBase implements IComponen
|
|||||||
this._ready.then(() => {
|
this._ready.then(() => {
|
||||||
super.setProperties(properties);
|
super.setProperties(properties);
|
||||||
if (this.options) {
|
if (this.options) {
|
||||||
this._webview.options = this.getExtendedOptions();
|
this._webview.contentOptions = this.getExtendedOptions();
|
||||||
}
|
}
|
||||||
if (this.html !== this._renderedHtml) {
|
if (this.html !== this._renderedHtml) {
|
||||||
this.setHtml();
|
this.setHtml();
|
||||||
|
|||||||
+3
-3
@@ -18,7 +18,7 @@ import { AngularDisposable } from 'sql/base/browser/lifecycle';
|
|||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: '',
|
template: '',
|
||||||
@@ -33,7 +33,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
|||||||
public readonly onMessage: Event<string> = this._onMessage.event;
|
public readonly onMessage: Event<string> = this._onMessage.event;
|
||||||
|
|
||||||
private _onMessageDisposable: IDisposable;
|
private _onMessageDisposable: IDisposable;
|
||||||
private _webview: WebviewElement;
|
private _webview: ElectronWebviewBasedWebview;
|
||||||
private _html: string;
|
private _html: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -100,7 +100,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
|
|||||||
this._onMessageDisposable.dispose();
|
this._onMessageDisposable.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
this._webview = this.instantiationService.createInstance(WebviewElement,
|
this._webview = this.instantiationService.createInstance(ElectronWebviewBasedWebview,
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
allowScripts: true
|
allowScripts: true
|
||||||
|
|||||||
+3
-3
@@ -16,7 +16,7 @@ import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard
|
|||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||||
|
|
||||||
interface IWebviewWidgetConfig {
|
interface IWebviewWidgetConfig {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -31,7 +31,7 @@ const selector = 'webview-widget';
|
|||||||
export class WebviewWidget extends DashboardWidget implements IDashboardWidget, OnInit, IDashboardWebview {
|
export class WebviewWidget extends DashboardWidget implements IDashboardWidget, OnInit, IDashboardWebview {
|
||||||
|
|
||||||
private _id: string;
|
private _id: string;
|
||||||
private _webview: WebviewElement;
|
private _webview: ElectronWebviewBasedWebview;
|
||||||
private _html: string;
|
private _html: string;
|
||||||
private _onMessage = new Emitter<string>();
|
private _onMessage = new Emitter<string>();
|
||||||
public readonly onMessage: Event<string> = this._onMessage.event;
|
public readonly onMessage: Event<string> = this._onMessage.event;
|
||||||
@@ -99,7 +99,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
|||||||
this._onMessageDisposable.dispose();
|
this._onMessageDisposable.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
this._webview = this.instantiationService.createInstance(WebviewElement,
|
this._webview = this.instantiationService.createInstance(ElectronWebviewBasedWebview,
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
allowScripts: true,
|
allowScripts: true,
|
||||||
|
|||||||
@@ -5,17 +5,13 @@
|
|||||||
|
|
||||||
import 'vs/css!./media/connectionViewletPanel';
|
import 'vs/css!./media/connectionViewletPanel';
|
||||||
import * as DOM from 'vs/base/browser/dom';
|
import * as DOM from 'vs/base/browser/dom';
|
||||||
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||||
import { IExtensionTipsService, IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
|
||||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
|
||||||
import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
|
||||||
import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet';
|
import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/views/panelViewlet';
|
||||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
|
||||||
import { IAction } from 'vs/base/common/actions';
|
import { IAction } from 'vs/base/common/actions';
|
||||||
import { ServerTreeView } from 'sql/workbench/parts/objectExplorer/browser/serverTreeView';
|
import { ServerTreeView } from 'sql/workbench/parts/objectExplorer/browser/serverTreeView';
|
||||||
import {
|
import {
|
||||||
@@ -23,12 +19,10 @@ import {
|
|||||||
AddServerAction, AddServerGroupAction
|
AddServerAction, AddServerGroupAction
|
||||||
} from 'sql/workbench/parts/objectExplorer/browser/connectionTreeAction';
|
} from 'sql/workbench/parts/objectExplorer/browser/connectionTreeAction';
|
||||||
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/common/objectExplorerService';
|
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/common/objectExplorerService';
|
||||||
import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
|
|
||||||
|
|
||||||
export class ConnectionViewletPanel extends ViewletPanel {
|
export class ConnectionViewletPanel extends ViewletPanel {
|
||||||
|
|
||||||
private _root: HTMLElement;
|
private _root: HTMLElement;
|
||||||
private _toDisposeViewlet: IDisposable[] = [];
|
|
||||||
private _serverTreeView: ServerTreeView;
|
private _serverTreeView: ServerTreeView;
|
||||||
private _addServerAction: IAction;
|
private _addServerAction: IAction;
|
||||||
private _addServerGroupAction: IAction;
|
private _addServerGroupAction: IAction;
|
||||||
@@ -36,17 +30,11 @@ export class ConnectionViewletPanel extends ViewletPanel {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private options: IViewletViewOptions,
|
private options: IViewletViewOptions,
|
||||||
@INotificationService protected notificationService: INotificationService,
|
|
||||||
@IKeybindingService keybindingService: IKeybindingService,
|
@IKeybindingService keybindingService: IKeybindingService,
|
||||||
@IContextMenuService contextMenuService: IContextMenuService,
|
@IContextMenuService contextMenuService: IContextMenuService,
|
||||||
@IInstantiationService protected instantiationService: IInstantiationService,
|
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||||
@IThemeService private themeService: IThemeService,
|
|
||||||
@IExtensionsWorkbenchService protected extensionsWorkbenchService: IExtensionsWorkbenchService,
|
|
||||||
@IExtensionTipsService protected tipsService: IExtensionTipsService,
|
|
||||||
@IConfigurationService configurationService: IConfigurationService,
|
@IConfigurationService configurationService: IConfigurationService,
|
||||||
@IWorkspaceContextService protected contextService: IWorkspaceContextService,
|
@IObjectExplorerService private readonly objectExplorerService: IObjectExplorerService
|
||||||
@IExtensionManagementServerService protected extensionManagementServerService: IExtensionManagementServerService,
|
|
||||||
@IObjectExplorerService private objectExplorerService: IObjectExplorerService
|
|
||||||
) {
|
) {
|
||||||
super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService);
|
super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService);
|
||||||
this._addServerAction = this.instantiationService.createInstance(AddServerAction,
|
this._addServerAction = this.instantiationService.createInstance(AddServerAction,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
|
|||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
import { ElectronWebviewBasedWebview } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||||
import * as DOM from 'vs/base/browser/dom';
|
import * as DOM from 'vs/base/browser/dom';
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from 'vs/platform/log/common/log';
|
||||||
@@ -27,7 +27,7 @@ export class WebViewDialog extends Modal {
|
|||||||
private _okButton: Button;
|
private _okButton: Button;
|
||||||
private _okLabel: string;
|
private _okLabel: string;
|
||||||
private _closeLabel: string;
|
private _closeLabel: string;
|
||||||
private _webview: WebviewElement;
|
private _webview: ElectronWebviewBasedWebview;
|
||||||
private _html: string;
|
private _html: string;
|
||||||
private _headerTitle: string;
|
private _headerTitle: string;
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ export class WebViewDialog extends Modal {
|
|||||||
protected renderBody(container: HTMLElement) {
|
protected renderBody(container: HTMLElement) {
|
||||||
this._body = DOM.append(container, DOM.$('div.webview-dialog'));
|
this._body = DOM.append(container, DOM.$('div.webview-dialog'));
|
||||||
|
|
||||||
this._webview = this._instantiationService.createInstance(WebviewElement,
|
this._webview = this._instantiationService.createInstance(ElectronWebviewBasedWebview,
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
allowScripts: true
|
allowScripts: true
|
||||||
|
|||||||
Vendored
+10
@@ -0,0 +1,10 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
declare module 'semver-umd' {
|
||||||
|
|
||||||
|
export * from "semver";
|
||||||
|
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ let _isWeb = false;
|
|||||||
let _locale: string | undefined = undefined;
|
let _locale: string | undefined = undefined;
|
||||||
let _language: string = LANGUAGE_DEFAULT;
|
let _language: string = LANGUAGE_DEFAULT;
|
||||||
let _translationsConfigFile: string | undefined = undefined;
|
let _translationsConfigFile: string | undefined = undefined;
|
||||||
|
let _userAgent: string | undefined = undefined;
|
||||||
|
|
||||||
interface NLSConfig {
|
interface NLSConfig {
|
||||||
locale: string;
|
locale: string;
|
||||||
@@ -48,10 +49,10 @@ const isElectronRenderer = (typeof process !== 'undefined' && typeof process.ver
|
|||||||
|
|
||||||
// OS detection
|
// OS detection
|
||||||
if (typeof navigator === 'object' && !isElectronRenderer) {
|
if (typeof navigator === 'object' && !isElectronRenderer) {
|
||||||
const userAgent = navigator.userAgent;
|
_userAgent = navigator.userAgent;
|
||||||
_isWindows = userAgent.indexOf('Windows') >= 0;
|
_isWindows = _userAgent.indexOf('Windows') >= 0;
|
||||||
_isMacintosh = userAgent.indexOf('Macintosh') >= 0;
|
_isMacintosh = _userAgent.indexOf('Macintosh') >= 0;
|
||||||
_isLinux = userAgent.indexOf('Linux') >= 0;
|
_isLinux = _userAgent.indexOf('Linux') >= 0;
|
||||||
_isWeb = true;
|
_isWeb = true;
|
||||||
_locale = navigator.language;
|
_locale = navigator.language;
|
||||||
_language = _locale;
|
_language = _locale;
|
||||||
@@ -108,6 +109,7 @@ export const isLinux = _isLinux;
|
|||||||
export const isNative = _isNative;
|
export const isNative = _isNative;
|
||||||
export const isWeb = _isWeb;
|
export const isWeb = _isWeb;
|
||||||
export const platform = _platform;
|
export const platform = _platform;
|
||||||
|
export const userAgent = _userAgent;
|
||||||
|
|
||||||
export function isRootUser(): boolean {
|
export function isRootUser(): boolean {
|
||||||
return _isNative && !_isWindows && (process.getuid() === 0);
|
return _isNative && !_isWindows && (process.getuid() === 0);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ for PID in "$@"; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PROCESS_BEFORE_TIMES[$ITER]=$PROCESS_TIME_BEFORE
|
PROCESS_BEFORE_TIMES[$ITER]=$PROCESS_TIME_BEFORE
|
||||||
((ITER++))
|
((++ITER))
|
||||||
done
|
done
|
||||||
|
|
||||||
# Wait for a second
|
# Wait for a second
|
||||||
@@ -60,5 +60,5 @@ for PID in "$@"; do
|
|||||||
|
|
||||||
# Parent script reads from stdout, so echo result to be read
|
# Parent script reads from stdout, so echo result to be read
|
||||||
echo $CPU_USAGE
|
echo $CPU_USAGE
|
||||||
((ITER++))
|
((++ITER))
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export interface IChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An `IServerChannel` is the couter part to `IChannel`,
|
* An `IServerChannel` is the counter part to `IChannel`,
|
||||||
* on the server-side. You should implement this interface
|
* on the server-side. You should implement this interface
|
||||||
* if you'd like to handle remote promises or events.
|
* if you'd like to handle remote promises or events.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
||||||
|
|
||||||
<meta http-equiv="Content-Security-Policy"
|
<meta http-equiv="Content-Security-Policy"
|
||||||
content="default-src 'none'; img-src 'self' https: data: blob: vscode-remote:; media-src 'none'; child-src 'self' {{WEBVIEW_ENDPOINT}}; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss: https:; font-src 'self' blob: vscode-remote:;">
|
content="default-src 'none'; img-src 'self' https: data: blob: vscode-remote:; media-src 'none'; child-src 'self' {{WEBVIEW_ENDPOINT}}; script-src 'self' https://az416426.vo.msecnd.net 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss: https:; font-src 'self' blob: vscode-remote:;">
|
||||||
|
|
||||||
<meta id="vscode-workbench-web-configuration" data-settings="{{WORKBENCH_WEB_CONGIGURATION}}">
|
<meta id="vscode-workbench-web-configuration" data-settings="{{WORKBENCH_WEB_CONGIGURATION}}">
|
||||||
|
|
||||||
@@ -27,6 +27,9 @@
|
|||||||
<body aria-label="">
|
<body aria-label="">
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<!-- Application insights telemetry library -->
|
||||||
|
<script src="https://az416426.vo.msecnd.net/scripts/a/ai.0.js"></script>
|
||||||
|
|
||||||
<!-- Require our AMD loader -->
|
<!-- Require our AMD loader -->
|
||||||
<script src="./out/vs/loader.js"></script>
|
<script src="./out/vs/loader.js"></script>
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
'xterm': `${window.location.origin}/node_modules/xterm/lib/xterm.js`,
|
'xterm': `${window.location.origin}/node_modules/xterm/lib/xterm.js`,
|
||||||
'xterm-addon-search': `${window.location.origin}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
|
'xterm-addon-search': `${window.location.origin}/node_modules/xterm-addon-search/lib/xterm-addon-search.js`,
|
||||||
'xterm-addon-web-links': `${window.location.origin}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
|
'xterm-addon-web-links': `${window.location.origin}/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js`,
|
||||||
|
'semver-umd': `${window.location.origin}/node_modules/semver-umd/lib/semver-umd.js`,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ export class IssueReporter extends Disposable {
|
|||||||
const channel = getDelayedChannel(sharedProcess.then(c => c.getChannel('telemetryAppender')));
|
const channel = getDelayedChannel(sharedProcess.then(c => c.getChannel('telemetryAppender')));
|
||||||
const appender = combinedAppender(new TelemetryAppenderClient(channel), new LogAppender(logService));
|
const appender = combinedAppender(new TelemetryAppenderClient(channel), new LogAppender(logService));
|
||||||
const commonProperties = resolveCommonProperties(product.commit || 'Commit unknown', pkg.version, configuration.machineId, this.environmentService.installSourcePath);
|
const commonProperties = resolveCommonProperties(product.commit || 'Commit unknown', pkg.version, configuration.machineId, this.environmentService.installSourcePath);
|
||||||
const piiPaths = [this.environmentService.appRoot, this.environmentService.extensionsPath];
|
const piiPaths = this.environmentService.extensionsPath ? [this.environmentService.appRoot, this.environmentService.extensionsPath] : [this.environmentService.appRoot];
|
||||||
const config: ITelemetryServiceConfig = { appender, commonProperties, piiPaths };
|
const config: ITelemetryServiceConfig = { appender, commonProperties, piiPaths };
|
||||||
|
|
||||||
const telemetryService = instantiationService.createInstance(TelemetryService, config);
|
const telemetryService = instantiationService.createInstance(TelemetryService, config);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
|||||||
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
|
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
|
||||||
import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment';
|
import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||||
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
|
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
|
||||||
import { ExtensionManagementChannel } from 'vs/platform/extensionManagement/node/extensionManagementIpc';
|
import { ExtensionManagementChannel } from 'vs/platform/extensionManagement/common/extensionManagementIpc';
|
||||||
import { IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
import { IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||||
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService';
|
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionGalleryService';
|
||||||
@@ -158,7 +158,7 @@ async function main(server: Server, initData: ISharedProcessInitData, configurat
|
|||||||
const config: ITelemetryServiceConfig = {
|
const config: ITelemetryServiceConfig = {
|
||||||
appender: combinedAppender(appInsightsAppender, new LogAppender(logService)),
|
appender: combinedAppender(appInsightsAppender, new LogAppender(logService)),
|
||||||
commonProperties: resolveCommonProperties(product.commit, pkg.version, configuration.machineId, installSourcePath),
|
commonProperties: resolveCommonProperties(product.commit, pkg.version, configuration.machineId, installSourcePath),
|
||||||
piiPaths: [appRoot, extensionsPath]
|
piiPaths: extensionsPath ? [appRoot, extensionsPath] : [appRoot]
|
||||||
};
|
};
|
||||||
|
|
||||||
telemetryService = new TelemetryService(config, configurationService);
|
telemetryService = new TelemetryService(config, configurationService);
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ import { DiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsIpc'
|
|||||||
import { FileService } from 'vs/platform/files/common/fileService';
|
import { FileService } from 'vs/platform/files/common/fileService';
|
||||||
import { IFileService } from 'vs/platform/files/common/files';
|
import { IFileService } from 'vs/platform/files/common/files';
|
||||||
import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider';
|
import { DiskFileSystemProvider } from 'vs/platform/files/node/diskFileSystemProvider';
|
||||||
|
import { ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc';
|
||||||
|
|
||||||
export class CodeApplication extends Disposable {
|
export class CodeApplication extends Disposable {
|
||||||
|
|
||||||
@@ -240,6 +241,7 @@ export class CodeApplication extends Disposable {
|
|||||||
context: OpenContext.DOCK /* can also be opening from finder while app is running */,
|
context: OpenContext.DOCK /* can also be opening from finder while app is running */,
|
||||||
cli: this.environmentService.args,
|
cli: this.environmentService.args,
|
||||||
urisToOpen: macOpenFileURIs,
|
urisToOpen: macOpenFileURIs,
|
||||||
|
gotoLineMode: false,
|
||||||
preferNewWindow: true /* dropping on the dock or opening from finder prefers to open in a new window */
|
preferNewWindow: true /* dropping on the dock or opening from finder prefers to open in a new window */
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -279,12 +281,6 @@ export class CodeApplication extends Disposable {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ipc.on('vscode:extensionHostDebug', (_: Event, windowId: number, broadcast: any) => {
|
|
||||||
if (this.windowsMainService) {
|
|
||||||
this.windowsMainService.sendToAll('vscode:extensionHostDebug', broadcast, [windowId]); // Send to all windows (except sender window)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ipc.on('vscode:toggleDevTools', (event: Event) => event.sender.toggleDevTools());
|
ipc.on('vscode:toggleDevTools', (event: Event) => event.sender.toggleDevTools());
|
||||||
ipc.on('vscode:openDevTools', (event: Event) => event.sender.openDevTools());
|
ipc.on('vscode:openDevTools', (event: Event) => event.sender.openDevTools());
|
||||||
|
|
||||||
@@ -484,7 +480,7 @@ export class CodeApplication extends Disposable {
|
|||||||
const channel = getDelayedChannel(sharedProcessClient.then(client => client.getChannel('telemetryAppender')));
|
const channel = getDelayedChannel(sharedProcessClient.then(client => client.getChannel('telemetryAppender')));
|
||||||
const appender = combinedAppender(new TelemetryAppenderClient(channel), new LogAppender(this.logService));
|
const appender = combinedAppender(new TelemetryAppenderClient(channel), new LogAppender(this.logService));
|
||||||
const commonProperties = resolveCommonProperties(product.commit, pkg.version, machineId, this.environmentService.installSourcePath);
|
const commonProperties = resolveCommonProperties(product.commit, pkg.version, machineId, this.environmentService.installSourcePath);
|
||||||
const piiPaths = [this.environmentService.appRoot, this.environmentService.extensionsPath];
|
const piiPaths = this.environmentService.extensionsPath ? [this.environmentService.appRoot, this.environmentService.extensionsPath] : [this.environmentService.appRoot];
|
||||||
const config: ITelemetryServiceConfig = { appender, commonProperties, piiPaths, trueMachineId };
|
const config: ITelemetryServiceConfig = { appender, commonProperties, piiPaths, trueMachineId };
|
||||||
|
|
||||||
services.set(ITelemetryService, new SyncDescriptor(TelemetryService, [config]));
|
services.set(ITelemetryService, new SyncDescriptor(TelemetryService, [config]));
|
||||||
@@ -577,6 +573,9 @@ export class CodeApplication extends Disposable {
|
|||||||
electronIpcServer.registerChannel('loglevel', logLevelChannel);
|
electronIpcServer.registerChannel('loglevel', logLevelChannel);
|
||||||
sharedProcessClient.then(client => client.registerChannel('loglevel', logLevelChannel));
|
sharedProcessClient.then(client => client.registerChannel('loglevel', logLevelChannel));
|
||||||
|
|
||||||
|
// ExtensionHost Debug broadcast service
|
||||||
|
electronIpcServer.registerChannel(ExtensionHostDebugBroadcastChannel.ChannelName, new ExtensionHostDebugBroadcastChannel());
|
||||||
|
|
||||||
// Signal phase: ready (services set)
|
// Signal phase: ready (services set)
|
||||||
this.lifecycleService.phase = LifecycleMainPhase.Ready;
|
this.lifecycleService.phase = LifecycleMainPhase.Ready;
|
||||||
|
|
||||||
@@ -597,8 +596,8 @@ export class CodeApplication extends Disposable {
|
|||||||
urlService.registerHandler({
|
urlService.registerHandler({
|
||||||
async handleURL(uri: URI): Promise<boolean> {
|
async handleURL(uri: URI): Promise<boolean> {
|
||||||
if (windowsMainService.getWindowCount() === 0) {
|
if (windowsMainService.getWindowCount() === 0) {
|
||||||
const cli = { ...environmentService.args, goto: true };
|
const cli = { ...environmentService.args };
|
||||||
const [window] = windowsMainService.open({ context: OpenContext.API, cli, forceEmpty: true });
|
const [window] = windowsMainService.open({ context: OpenContext.API, cli, forceEmpty: true, gotoLineMode: true });
|
||||||
|
|
||||||
await window.ready();
|
await window.ready();
|
||||||
|
|
||||||
@@ -649,6 +648,7 @@ export class CodeApplication extends Disposable {
|
|||||||
urisToOpen: macOpenFiles.map(file => this.getURIToOpenFromPathSync(file)),
|
urisToOpen: macOpenFiles.map(file => this.getURIToOpenFromPathSync(file)),
|
||||||
noRecentEntry,
|
noRecentEntry,
|
||||||
waitMarkerFileURI,
|
waitMarkerFileURI,
|
||||||
|
gotoLineMode: false,
|
||||||
initialStartup: true
|
initialStartup: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -661,6 +661,7 @@ export class CodeApplication extends Disposable {
|
|||||||
diffMode: args.diff,
|
diffMode: args.diff,
|
||||||
noRecentEntry,
|
noRecentEntry,
|
||||||
waitMarkerFileURI,
|
waitMarkerFileURI,
|
||||||
|
gotoLineMode: args.goto,
|
||||||
initialStartup: true
|
initialStartup: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,7 +334,9 @@ class CodeMain {
|
|||||||
if (error.code === 'EACCES' || error.code === 'EPERM') {
|
if (error.code === 'EACCES' || error.code === 'EPERM') {
|
||||||
this.showStartupWarningDialog(
|
this.showStartupWarningDialog(
|
||||||
localize('startupDataDirError', "Unable to write program user data."),
|
localize('startupDataDirError', "Unable to write program user data."),
|
||||||
localize('startupDataDirErrorDetail', "Please make sure the directories {0} and {1} are writeable.", environmentService.userDataPath, environmentService.extensionsPath)
|
environmentService.extensionsPath
|
||||||
|
? localize('startupUserDataAndExtensionsDirErrorDetail', "Please make sure the directories {0} and {1} are writeable.", environmentService.userDataPath, environmentService.extensionsPath)
|
||||||
|
: localize('startupUserDataDirErrorDetail', "Please make sure the directory {0} is writeable.", environmentService.userDataPath)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -844,8 +844,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
|
|||||||
|
|
||||||
private doExtractPathsFromAPI(openConfig: IOpenConfiguration): IPathToOpen[] {
|
private doExtractPathsFromAPI(openConfig: IOpenConfiguration): IPathToOpen[] {
|
||||||
const pathsToOpen: IPathToOpen[] = [];
|
const pathsToOpen: IPathToOpen[] = [];
|
||||||
const cli = openConfig.cli;
|
const parseOptions: IPathParseOptions = { gotoLineMode: openConfig.gotoLineMode };
|
||||||
const parseOptions: IPathParseOptions = { gotoLineMode: cli && cli.goto };
|
|
||||||
for (const pathToOpen of openConfig.urisToOpen || []) {
|
for (const pathToOpen of openConfig.urisToOpen || []) {
|
||||||
if (!pathToOpen) {
|
if (!pathToOpen) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { localize } from 'vs/nls';
|
|||||||
import product from 'vs/platform/product/node/product';
|
import product from 'vs/platform/product/node/product';
|
||||||
import pkg from 'vs/platform/product/node/package';
|
import pkg from 'vs/platform/product/node/package';
|
||||||
import * as path from 'vs/base/common/path';
|
import * as path from 'vs/base/common/path';
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver-umd';
|
||||||
|
|
||||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||||
@@ -102,7 +102,7 @@ export class Main {
|
|||||||
const ids: string[] = typeof arg === 'string' ? [arg] : arg;
|
const ids: string[] = typeof arg === 'string' ? [arg] : arg;
|
||||||
await this.locateExtension(ids);
|
await this.locateExtension(ids);
|
||||||
} else if (argv['telemetry']) {
|
} else if (argv['telemetry']) {
|
||||||
console.log(buildTelemetryMessage(this.environmentService.appRoot, this.environmentService.extensionsPath));
|
console.log(buildTelemetryMessage(this.environmentService.appRoot, this.environmentService.extensionsPath ? this.environmentService.extensionsPath : undefined));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +293,8 @@ export async function main(argv: ParsedArgs): Promise<void> {
|
|||||||
process.once('exit', () => logService.dispose());
|
process.once('exit', () => logService.dispose());
|
||||||
logService.info('main', argv);
|
logService.info('main', argv);
|
||||||
|
|
||||||
await Promise.all([environmentService.appSettingsHome.fsPath, environmentService.extensionsPath].map(p => mkdirp(p)));
|
await Promise.all<void | undefined>([environmentService.appSettingsHome.fsPath, environmentService.extensionsPath]
|
||||||
|
.map((path): undefined | Promise<void> => path ? mkdirp(path) : undefined));
|
||||||
|
|
||||||
const configurationService = new ConfigurationService(environmentService.settingsResource);
|
const configurationService = new ConfigurationService(environmentService.settingsResource);
|
||||||
disposables.add(configurationService);
|
disposables.add(configurationService);
|
||||||
@@ -339,7 +340,7 @@ export async function main(argv: ParsedArgs): Promise<void> {
|
|||||||
const config: ITelemetryServiceConfig = {
|
const config: ITelemetryServiceConfig = {
|
||||||
appender: combinedAppender(...appenders),
|
appender: combinedAppender(...appenders),
|
||||||
commonProperties: resolveCommonProperties(product.commit, pkg.version, stateService.getItem('telemetry.machineId'), installSourcePath),
|
commonProperties: resolveCommonProperties(product.commit, pkg.version, stateService.getItem('telemetry.machineId'), installSourcePath),
|
||||||
piiPaths: [appRoot, extensionsPath]
|
piiPaths: extensionsPath ? [appRoot, extensionsPath] : [appRoot]
|
||||||
};
|
};
|
||||||
|
|
||||||
services.set(ITelemetryService, new SyncDescriptor(TelemetryService, [config]));
|
services.set(ITelemetryService, new SyncDescriptor(TelemetryService, [config]));
|
||||||
|
|||||||
@@ -451,6 +451,7 @@ export class Minimap extends ViewPart {
|
|||||||
|
|
||||||
private _options: MinimapOptions;
|
private _options: MinimapOptions;
|
||||||
private _lastRenderData: RenderData | null;
|
private _lastRenderData: RenderData | null;
|
||||||
|
private _lastDecorations: ViewModelDecoration[] | undefined;
|
||||||
private _renderDecorations: boolean = false;
|
private _renderDecorations: boolean = false;
|
||||||
private _buffers: MinimapBuffers | null;
|
private _buffers: MinimapBuffers | null;
|
||||||
|
|
||||||
@@ -675,6 +676,13 @@ export class Minimap extends ViewPart {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean {
|
||||||
|
this._context.model.invalidateMinimapColorCache();
|
||||||
|
// Only bother calling render if decorations are currently shown
|
||||||
|
this._renderDecorations = !!this._lastDecorations;
|
||||||
|
return !!this._lastDecorations;
|
||||||
|
}
|
||||||
|
|
||||||
// --- end event handlers
|
// --- end event handlers
|
||||||
|
|
||||||
public prepareRender(ctx: RenderingContext): void {
|
public prepareRender(ctx: RenderingContext): void {
|
||||||
@@ -751,6 +759,8 @@ export class Minimap extends ViewPart {
|
|||||||
this.renderDecorationOnLine(canvasContext, lineOffsetMap, decoration, layout, line, height, lineHeight, tabSize, characterWidth);
|
this.renderDecorationOnLine(canvasContext, lineOffsetMap, decoration, layout, line, height, lineHeight, tabSize, characterWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._lastDecorations = decorations;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2703,6 +2703,10 @@ export class ModelDecorationMinimapOptions extends DecorationOptions {
|
|||||||
return this._resolvedColor;
|
return this._resolvedColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public invalidateCachedColor(): void {
|
||||||
|
this._resolvedColor = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
private _resolveColor(color: string | ThemeColor, theme: ITheme): Color | undefined {
|
private _resolveColor(color: string | ThemeColor, theme: ITheme): Color | undefined {
|
||||||
if (typeof color === 'string') {
|
if (typeof color === 'string') {
|
||||||
return Color.fromHex(color);
|
return Color.fromHex(color);
|
||||||
|
|||||||
@@ -1285,7 +1285,7 @@ export interface CommentThread {
|
|||||||
commentThreadHandle: number;
|
commentThreadHandle: number;
|
||||||
controllerHandle: number;
|
controllerHandle: number;
|
||||||
extensionId?: string;
|
extensionId?: string;
|
||||||
threadId: string | null;
|
threadId: string;
|
||||||
resource: string | null;
|
resource: string | null;
|
||||||
range: IRange;
|
range: IRange;
|
||||||
label: string;
|
label: string;
|
||||||
@@ -1333,8 +1333,7 @@ export enum CommentMode {
|
|||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
export interface Comment {
|
export interface Comment {
|
||||||
readonly commentId: string;
|
readonly uniqueIdInThread: number;
|
||||||
readonly uniqueIdInThread?: number;
|
|
||||||
readonly body: IMarkdownString;
|
readonly body: IMarkdownString;
|
||||||
readonly userName: string;
|
readonly userName: string;
|
||||||
readonly userIconPath?: string;
|
readonly userIconPath?: string;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import * as nls from 'vs/nls';
|
import * as nls from 'vs/nls';
|
||||||
import { Color, RGBA } from 'vs/base/common/color';
|
import { Color, RGBA } from 'vs/base/common/color';
|
||||||
import { activeContrastBorder, editorBackground, editorForeground, registerColor, editorWarningForeground, editorInfoForeground, editorWarningBorder, editorInfoBorder } from 'vs/platform/theme/common/colorRegistry';
|
import { activeContrastBorder, editorBackground, editorForeground, registerColor, editorWarningForeground, editorInfoForeground, editorWarningBorder, editorInfoBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||||
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
import { registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,7 +31,7 @@ export const editorRuler = registerColor('editorRuler.foreground', { dark: '#5A5
|
|||||||
export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLensForeground', 'Foreground color of editor code lenses'));
|
export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLensForeground', 'Foreground color of editor code lenses'));
|
||||||
|
|
||||||
export const editorBracketMatchBackground = registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, nls.localize('editorBracketMatchBackground', 'Background color behind matching brackets'));
|
export const editorBracketMatchBackground = registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, nls.localize('editorBracketMatchBackground', 'Background color behind matching brackets'));
|
||||||
export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: '#fff' }, nls.localize('editorBracketMatchBorder', 'Color for matching brackets boxes'));
|
export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: contrastBorder }, nls.localize('editorBracketMatchBorder', 'Color for matching brackets boxes'));
|
||||||
|
|
||||||
export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, nls.localize('editorOverviewRulerBorder', 'Color of the overview ruler border.'));
|
export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, nls.localize('editorOverviewRulerBorder', 'Color of the overview ruler border.'));
|
||||||
|
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ export interface IViewModel {
|
|||||||
getLineLastNonWhitespaceColumn(lineNumber: number): number;
|
getLineLastNonWhitespaceColumn(lineNumber: number): number;
|
||||||
getAllOverviewRulerDecorations(theme: ITheme): IOverviewRulerDecorations;
|
getAllOverviewRulerDecorations(theme: ITheme): IOverviewRulerDecorations;
|
||||||
invalidateOverviewRulerColorCache(): void;
|
invalidateOverviewRulerColorCache(): void;
|
||||||
|
invalidateMinimapColorCache(): void;
|
||||||
getValueInRange(range: Range, eol: EndOfLinePreference): string;
|
getValueInRange(range: Range, eol: EndOfLinePreference): string;
|
||||||
|
|
||||||
getModelLineMaxColumn(modelLineNumber: number): number;
|
getModelLineMaxColumn(modelLineNumber: number): number;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { IPosition, Position } from 'vs/editor/common/core/position';
|
|||||||
import { IRange, Range } from 'vs/editor/common/core/range';
|
import { IRange, Range } from 'vs/editor/common/core/range';
|
||||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||||
import { EndOfLinePreference, IActiveIndentGuideInfo, ITextModel, TrackedRangeStickiness, TextModelResolvedOptions } from 'vs/editor/common/model';
|
import { EndOfLinePreference, IActiveIndentGuideInfo, ITextModel, TrackedRangeStickiness, TextModelResolvedOptions } from 'vs/editor/common/model';
|
||||||
import { ModelDecorationOverviewRulerOptions } from 'vs/editor/common/model/textModel';
|
import { ModelDecorationOverviewRulerOptions, ModelDecorationMinimapOptions } from 'vs/editor/common/model/textModel';
|
||||||
import * as textModelEvents from 'vs/editor/common/model/textModelEvents';
|
import * as textModelEvents from 'vs/editor/common/model/textModelEvents';
|
||||||
import { ColorId, LanguageId, TokenizationRegistry } from 'vs/editor/common/modes';
|
import { ColorId, LanguageId, TokenizationRegistry } from 'vs/editor/common/modes';
|
||||||
import { tokenizeLineToHTML } from 'vs/editor/common/modes/textToHtmlTokenizer';
|
import { tokenizeLineToHTML } from 'vs/editor/common/modes/textToHtmlTokenizer';
|
||||||
@@ -565,6 +565,16 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public invalidateMinimapColorCache(): void {
|
||||||
|
const decorations = this.model.getAllDecorations();
|
||||||
|
for (const decoration of decorations) {
|
||||||
|
const opts = <ModelDecorationMinimapOptions>decoration.options.minimap;
|
||||||
|
if (opts) {
|
||||||
|
opts.invalidateCachedColor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public getValueInRange(range: Range, eol: EndOfLinePreference): string {
|
public getValueInRange(range: Range, eol: EndOfLinePreference): string {
|
||||||
const modelRange = this.coordinatesConverter.convertViewRangeToModelRange(range);
|
const modelRange = this.coordinatesConverter.convertViewRangeToModelRange(range);
|
||||||
return this.model.getValueInRange(modelRange, eol);
|
return this.model.getValueInRange(modelRange, eol);
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import { IServerChannel, IChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||||
|
import { IReloadSessionEvent, ICloseSessionEvent, IAttachSessionEvent, ILogToSessionEvent, ITerminateSessionEvent, IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||||
|
import { Event, Emitter } from 'vs/base/common/event';
|
||||||
|
import { IRemoteConsoleLog } from 'vs/base/common/console';
|
||||||
|
|
||||||
|
export class ExtensionHostDebugBroadcastChannel<TContext> implements IServerChannel<TContext> {
|
||||||
|
|
||||||
|
static readonly ChannelName = 'extensionhostdebugservice';
|
||||||
|
|
||||||
|
private _onCloseEmitter = new Emitter<ICloseSessionEvent>();
|
||||||
|
private _onReloadEmitter = new Emitter<IReloadSessionEvent>();
|
||||||
|
private _onTerminateEmitter = new Emitter<ITerminateSessionEvent>();
|
||||||
|
private _onLogToEmitter = new Emitter<ILogToSessionEvent>();
|
||||||
|
private _onAttachEmitter = new Emitter<IAttachSessionEvent>();
|
||||||
|
|
||||||
|
call(ctx: TContext, command: string, arg?: any): Promise<any> {
|
||||||
|
switch (command) {
|
||||||
|
case 'close':
|
||||||
|
return Promise.resolve(this._onCloseEmitter.fire({ sessionId: arg[0] }));
|
||||||
|
case 'reload':
|
||||||
|
return Promise.resolve(this._onReloadEmitter.fire({ sessionId: arg[0] }));
|
||||||
|
case 'terminate':
|
||||||
|
return Promise.resolve(this._onTerminateEmitter.fire({ sessionId: arg[0] }));
|
||||||
|
case 'log':
|
||||||
|
return Promise.resolve(this._onLogToEmitter.fire({ sessionId: arg[0], log: arg[1] }));
|
||||||
|
case 'attach':
|
||||||
|
return Promise.resolve(this._onAttachEmitter.fire({ sessionId: arg[0], port: arg[1], subId: arg[2] }));
|
||||||
|
}
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
|
||||||
|
listen(ctx: TContext, event: string, arg?: any): Event<any> {
|
||||||
|
switch (event) {
|
||||||
|
case 'close':
|
||||||
|
return this._onCloseEmitter.event;
|
||||||
|
case 'reload':
|
||||||
|
return this._onReloadEmitter.event;
|
||||||
|
case 'terminate':
|
||||||
|
return this._onTerminateEmitter.event;
|
||||||
|
case 'log':
|
||||||
|
return this._onLogToEmitter.event;
|
||||||
|
case 'attach':
|
||||||
|
return this._onAttachEmitter.event;
|
||||||
|
}
|
||||||
|
throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ExtensionHostDebugChannelClient implements IExtensionHostDebugService {
|
||||||
|
|
||||||
|
_serviceBrand: any;
|
||||||
|
|
||||||
|
constructor(private channel: IChannel) { }
|
||||||
|
|
||||||
|
reload(sessionId: string): void {
|
||||||
|
this.channel.call('reload', [sessionId]);
|
||||||
|
}
|
||||||
|
|
||||||
|
get onReload(): Event<IReloadSessionEvent> {
|
||||||
|
return this.channel.listen('reload');
|
||||||
|
}
|
||||||
|
|
||||||
|
close(sessionId: string): void {
|
||||||
|
this.channel.call('close', [sessionId]);
|
||||||
|
}
|
||||||
|
|
||||||
|
get onClose(): Event<ICloseSessionEvent> {
|
||||||
|
return this.channel.listen('close');
|
||||||
|
}
|
||||||
|
|
||||||
|
attachSession(sessionId: string, port: number, subId?: string): void {
|
||||||
|
this.channel.call('attach', [sessionId, port, subId]);
|
||||||
|
}
|
||||||
|
|
||||||
|
get onAttachSession(): Event<IAttachSessionEvent> {
|
||||||
|
return this.channel.listen('attach');
|
||||||
|
}
|
||||||
|
|
||||||
|
logToSession(sessionId: string, log: IRemoteConsoleLog): void {
|
||||||
|
this.channel.call('log', [sessionId, log]);
|
||||||
|
}
|
||||||
|
|
||||||
|
get onLogToSession(): Event<ILogToSessionEvent> {
|
||||||
|
return this.channel.listen('log');
|
||||||
|
}
|
||||||
|
|
||||||
|
terminateSession(sessionId: string, subId?: string): void {
|
||||||
|
this.channel.call('terminate', [sessionId, subId]);
|
||||||
|
}
|
||||||
|
|
||||||
|
get onTerminateSession(): Event<ITerminateSessionEvent> {
|
||||||
|
return this.channel.listen('terminate');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -520,14 +520,17 @@ export class DiagnosticsService implements IDiagnosticsService {
|
|||||||
if (folderUri.scheme === 'file') {
|
if (folderUri.scheme === 'file') {
|
||||||
const folder = folderUri.fsPath;
|
const folder = folderUri.fsPath;
|
||||||
collectWorkspaceStats(folder, ['node_modules', '.git']).then(stats => {
|
collectWorkspaceStats(folder, ['node_modules', '.git']).then(stats => {
|
||||||
/* __GDPR__
|
type WorkspaceStatsClassification = {
|
||||||
"workspace.stats" : {
|
fileTypes: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true };
|
||||||
"fileTypes" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
configTypes: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true };
|
||||||
"configTypes" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
|
launchConfigs: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true };
|
||||||
"launchConfigs" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
};
|
||||||
}
|
type WorkspaceStatsEvent = {
|
||||||
*/
|
fileTypes: WorkspaceStatItem[];
|
||||||
this.telemetryService.publicLog('workspace.stats', {
|
configTypes: WorkspaceStatItem[];
|
||||||
|
launchConfigs: WorkspaceStatItem[];
|
||||||
|
};
|
||||||
|
this.telemetryService.publicLog2<WorkspaceStatsEvent, WorkspaceStatsClassification>('workspace.stats', {
|
||||||
fileTypes: stats.fileTypes,
|
fileTypes: stats.fileTypes,
|
||||||
configTypes: stats.configFiles,
|
configTypes: stats.configFiles,
|
||||||
launchConfigs: stats.launchConfigFiles
|
launchConfigs: stats.launchConfigFiles
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export interface IEnvironmentService {
|
|||||||
isExtensionDevelopment: boolean;
|
isExtensionDevelopment: boolean;
|
||||||
disableExtensions: boolean | string[];
|
disableExtensions: boolean | string[];
|
||||||
builtinExtensionsPath: string;
|
builtinExtensionsPath: string;
|
||||||
extensionsPath: string;
|
extensionsPath?: string;
|
||||||
extensionDevelopmentLocationURI?: URI[];
|
extensionDevelopmentLocationURI?: URI[];
|
||||||
extensionTestsLocationURI?: URI;
|
extensionTestsLocationURI?: URI;
|
||||||
|
|
||||||
@@ -178,4 +178,6 @@ export interface IEnvironmentService {
|
|||||||
webviewEndpoint?: string;
|
webviewEndpoint?: string;
|
||||||
readonly webviewResourceRoot: string;
|
readonly webviewResourceRoot: string;
|
||||||
readonly webviewCspSource: string;
|
readonly webviewCspSource: string;
|
||||||
|
|
||||||
|
readonly galleryMachineIdResource?: URI;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,6 +266,9 @@ export class EnvironmentService implements IEnvironmentService {
|
|||||||
@memoize
|
@memoize
|
||||||
get nodeCachedDataDir(): string | undefined { return process.env['VSCODE_NODE_CACHED_DATA_DIR'] || undefined; }
|
get nodeCachedDataDir(): string | undefined { return process.env['VSCODE_NODE_CACHED_DATA_DIR'] || undefined; }
|
||||||
|
|
||||||
|
@memoize
|
||||||
|
get galleryMachineIdResource(): URI { return resources.joinPath(URI.file(this.userDataPath), 'machineid'); }
|
||||||
|
|
||||||
get disableUpdates(): boolean { return !!this._args['disable-updates']; }
|
get disableUpdates(): boolean { return !!this._args['disable-updates']; }
|
||||||
get disableCrashReporter(): boolean { return !!this._args['disable-crash-reporter']; }
|
get disableCrashReporter(): boolean { return !!this._args['disable-crash-reporter']; }
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { getGalleryExtensionId, getGalleryExtensionTelemetryData, adoptToGallery
|
|||||||
import { assign, getOrDefault } from 'vs/base/common/objects';
|
import { assign, getOrDefault } from 'vs/base/common/objects';
|
||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { IPager } from 'vs/base/common/paging';
|
import { IPager } from 'vs/base/common/paging';
|
||||||
import { IRequestService, IRequestOptions, IRequestContext, asJson, asText } from 'vs/platform/request/common/request';
|
import { IRequestService, IRequestOptions, IRequestContext, asJson, asText, IHeaders } from 'vs/platform/request/common/request';
|
||||||
import { isEngineValid } from 'vs/platform/extensions/common/extensionValidator';
|
import { isEngineValid } from 'vs/platform/extensions/common/extensionValidator';
|
||||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||||
import { generateUuid, isUUID } from 'vs/base/common/uuid';
|
import { generateUuid, isUUID } from 'vs/base/common/uuid';
|
||||||
@@ -467,13 +467,15 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
|
|||||||
let text = options.text || '';
|
let text = options.text || '';
|
||||||
const pageSize = getOrDefault(options, o => o.pageSize, 50);
|
const pageSize = getOrDefault(options, o => o.pageSize, 50);
|
||||||
|
|
||||||
/* __GDPR__
|
type GalleryServiceQueryClassification = {
|
||||||
"galleryService:query" : {
|
type: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
|
||||||
"type" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
text: { classification: 'CustomerContent', purpose: 'FeatureInsight' };
|
||||||
"text": { "classification": "CustomerContent", "purpose": "FeatureInsight" }
|
};
|
||||||
}
|
type GalleryServiceQueryEvent = {
|
||||||
*/
|
type: string;
|
||||||
this.telemetryService.publicLog('galleryService:query', { type, text });
|
text: string;
|
||||||
|
};
|
||||||
|
this.telemetryService.publicLog2<GalleryServiceQueryEvent, GalleryServiceQueryClassification>('galleryService:query', { type, text });
|
||||||
|
|
||||||
let query = new Query()
|
let query = new Query()
|
||||||
.withFlags(Flags.IncludeLatestVersionOnly, Flags.IncludeAssetUri, Flags.IncludeStatistics, Flags.IncludeFiles, Flags.IncludeVersionProperties)
|
.withFlags(Flags.IncludeLatestVersionOnly, Flags.IncludeAssetUri, Flags.IncludeStatistics, Flags.IncludeFiles, Flags.IncludeVersionProperties)
|
||||||
@@ -943,12 +945,14 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function resolveMarketplaceHeaders(version: string, environmentService: IEnvironmentService, fileService: IFileService): Promise<{ [key: string]: string; }> {
|
export async function resolveMarketplaceHeaders(version: string, environmentService: IEnvironmentService, fileService: IFileService): Promise<{ [key: string]: string; }> {
|
||||||
const marketplaceMachineIdFile = joinPath(URI.file(environmentService.userDataPath), 'machineid');
|
const headers: IHeaders = {
|
||||||
|
'X-Market-Client-Id': `VSCode ${version}`,
|
||||||
|
'User-Agent': `VSCode ${version}`
|
||||||
|
};
|
||||||
let uuid: string | null = null;
|
let uuid: string | null = null;
|
||||||
|
if (environmentService.galleryMachineIdResource) {
|
||||||
try {
|
try {
|
||||||
const contents = await fileService.readFile(marketplaceMachineIdFile);
|
const contents = await fileService.readFile(environmentService.galleryMachineIdResource);
|
||||||
const value = contents.value.toString();
|
const value = contents.value.toString();
|
||||||
uuid = isUUID(value) ? value : null;
|
uuid = isUUID(value) ? value : null;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -958,14 +962,13 @@ export async function resolveMarketplaceHeaders(version: string, environmentServ
|
|||||||
if (!uuid) {
|
if (!uuid) {
|
||||||
uuid = generateUuid();
|
uuid = generateUuid();
|
||||||
try {
|
try {
|
||||||
await fileService.writeFile(marketplaceMachineIdFile, VSBuffer.fromString(uuid));
|
await fileService.writeFile(environmentService.galleryMachineIdResource, VSBuffer.fromString(uuid));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
//noop
|
//noop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
headers['X-Market-User-Id'] = uuid;
|
||||||
'X-Market-Client-Id': `VSCode ${version}`,
|
}
|
||||||
'User-Agent': `VSCode ${version}`,
|
return headers;
|
||||||
'X-Market-User-Id': uuid
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,6 @@ import { Event } from 'vs/base/common/event';
|
|||||||
import { IPager } from 'vs/base/common/paging';
|
import { IPager } from 'vs/base/common/paging';
|
||||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { URI } from 'vs/base/common/uri';
|
import { URI } from 'vs/base/common/uri';
|
||||||
import { IWorkspaceFolder, IWorkspace } from 'vs/platform/workspace/common/workspace';
|
|
||||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||||
import { IExtensionManifest, IExtension, ExtensionType } from 'vs/platform/extensions/common/extensions';
|
import { IExtensionManifest, IExtension, ExtensionType } from 'vs/platform/extensions/common/extensions';
|
||||||
|
|
||||||
@@ -210,110 +209,6 @@ export interface IExtensionManagementService {
|
|||||||
updateMetadata(local: ILocalExtension, metadata: IGalleryMetadata): Promise<ILocalExtension>;
|
updateMetadata(local: ILocalExtension, metadata: IGalleryMetadata): Promise<ILocalExtension>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const IExtensionManagementServerService = createDecorator<IExtensionManagementServerService>('extensionManagementServerService');
|
|
||||||
|
|
||||||
export interface IExtensionManagementServer {
|
|
||||||
extensionManagementService: IExtensionManagementService;
|
|
||||||
authority: string;
|
|
||||||
label: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IExtensionManagementServerService {
|
|
||||||
_serviceBrand: any;
|
|
||||||
readonly localExtensionManagementServer: IExtensionManagementServer;
|
|
||||||
readonly remoteExtensionManagementServer: IExtensionManagementServer | null;
|
|
||||||
getExtensionManagementServer(location: URI): IExtensionManagementServer | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const enum EnablementState {
|
|
||||||
Disabled,
|
|
||||||
WorkspaceDisabled,
|
|
||||||
Enabled,
|
|
||||||
WorkspaceEnabled
|
|
||||||
}
|
|
||||||
|
|
||||||
export const IExtensionEnablementService = createDecorator<IExtensionEnablementService>('extensionEnablementService');
|
|
||||||
|
|
||||||
export interface IExtensionEnablementService {
|
|
||||||
_serviceBrand: any;
|
|
||||||
|
|
||||||
readonly allUserExtensionsDisabled: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event to listen on for extension enablement changes
|
|
||||||
*/
|
|
||||||
onEnablementChanged: Event<IExtension[]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the enablement state for the given extension
|
|
||||||
*/
|
|
||||||
getEnablementState(extension: IExtension): EnablementState;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns `true` if the enablement can be changed.
|
|
||||||
*/
|
|
||||||
canChangeEnablement(extension: IExtension): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns `true` if the given extension identifier is enabled.
|
|
||||||
*/
|
|
||||||
isEnabled(extension: IExtension): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable or disable the given extension.
|
|
||||||
* if `workspace` is `true` then enablement is done for workspace, otherwise globally.
|
|
||||||
*
|
|
||||||
* Returns a promise that resolves to boolean value.
|
|
||||||
* if resolves to `true` then requires restart for the change to take effect.
|
|
||||||
*
|
|
||||||
* Throws error if enablement is requested for workspace and there is no workspace
|
|
||||||
*/
|
|
||||||
setEnablement(extensions: IExtension[], state: EnablementState): Promise<boolean[]>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IExtensionsConfigContent {
|
|
||||||
recommendations: string[];
|
|
||||||
unwantedRecommendations: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export type RecommendationChangeNotification = {
|
|
||||||
extensionId: string,
|
|
||||||
isRecommended: boolean
|
|
||||||
};
|
|
||||||
|
|
||||||
export type DynamicRecommendation = 'dynamic';
|
|
||||||
export type ExecutableRecommendation = 'executable';
|
|
||||||
export type CachedRecommendation = 'cached';
|
|
||||||
export type ApplicationRecommendation = 'application';
|
|
||||||
export type ExtensionRecommendationSource = IWorkspace | IWorkspaceFolder | URI | DynamicRecommendation | ExecutableRecommendation | CachedRecommendation | ApplicationRecommendation;
|
|
||||||
|
|
||||||
export interface IExtensionRecommendation {
|
|
||||||
extensionId: string;
|
|
||||||
sources: ExtensionRecommendationSource[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export const IExtensionTipsService = createDecorator<IExtensionTipsService>('extensionTipsService');
|
|
||||||
|
|
||||||
export interface IExtensionTipsService {
|
|
||||||
_serviceBrand: any;
|
|
||||||
getAllRecommendationsWithReason(): { [id: string]: { reasonId: ExtensionRecommendationReason, reasonText: string }; };
|
|
||||||
getFileBasedRecommendations(): IExtensionRecommendation[];
|
|
||||||
getOtherRecommendations(): Promise<IExtensionRecommendation[]>;
|
|
||||||
getWorkspaceRecommendations(): Promise<IExtensionRecommendation[]>;
|
|
||||||
getKeymapRecommendations(): IExtensionRecommendation[];
|
|
||||||
toggleIgnoredRecommendation(extensionId: string, shouldIgnore: boolean): void;
|
|
||||||
getAllIgnoredRecommendations(): { global: string[], workspace: string[] };
|
|
||||||
onRecommendationChange: Event<RecommendationChangeNotification>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const enum ExtensionRecommendationReason {
|
|
||||||
Workspace,
|
|
||||||
File,
|
|
||||||
Executable,
|
|
||||||
DynamicWorkspace,
|
|
||||||
Experimental
|
|
||||||
}
|
|
||||||
|
|
||||||
export const ExtensionsLabel = localize('extensions', "Extensions");
|
export const ExtensionsLabel = localize('extensions', "Extensions");
|
||||||
export const ExtensionsChannelId = 'extensions';
|
export const ExtensionsChannelId = 'extensions';
|
||||||
export const PreferencesLabel = localize('preferences', "Preferences");
|
export const PreferencesLabel = localize('preferences', "Preferences");
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import { localizeManifest } from '../common/extensionNls';
|
|||||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||||
import { Limiter, createCancelablePromise, CancelablePromise, Queue } from 'vs/base/common/async';
|
import { Limiter, createCancelablePromise, CancelablePromise, Queue } from 'vs/base/common/async';
|
||||||
import { Event, Emitter } from 'vs/base/common/event';
|
import { Event, Emitter } from 'vs/base/common/event';
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver-umd';
|
||||||
import { URI } from 'vs/base/common/uri';
|
import { URI } from 'vs/base/common/uri';
|
||||||
import pkg from 'vs/platform/product/node/package';
|
import pkg from 'vs/platform/product/node/package';
|
||||||
import { isMacintosh, isWindows } from 'vs/base/common/platform';
|
import { isMacintosh, isWindows } from 'vs/base/common/platform';
|
||||||
@@ -138,7 +138,7 @@ export class ExtensionManagementService extends Disposable implements IExtension
|
|||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this.systemExtensionsPath = environmentService.builtinExtensionsPath;
|
this.systemExtensionsPath = environmentService.builtinExtensionsPath;
|
||||||
this.extensionsPath = environmentService.extensionsPath;
|
this.extensionsPath = environmentService.extensionsPath!;
|
||||||
this.uninstalledPath = path.join(this.extensionsPath, '.obsolete');
|
this.uninstalledPath = path.join(this.extensionsPath, '.obsolete');
|
||||||
this.uninstalledFileLimiter = new Queue();
|
this.uninstalledFileLimiter = new Queue();
|
||||||
this.manifestCache = this._register(new ExtensionsManifestCache(environmentService, this));
|
this.manifestCache = this._register(new ExtensionsManifestCache(environmentService, this));
|
||||||
|
|||||||
@@ -228,7 +228,8 @@ export class LaunchService implements ILaunchService {
|
|||||||
diffMode: args.diff,
|
diffMode: args.diff,
|
||||||
addMode: args.add,
|
addMode: args.add,
|
||||||
noRecentEntry: !!args['skip-add-to-recently-opened'],
|
noRecentEntry: !!args['skip-add-to-recently-opened'],
|
||||||
waitMarkerFileURI
|
waitMarkerFileURI,
|
||||||
|
gotoLineMode: args.goto
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -487,7 +487,8 @@ export class Menubar {
|
|||||||
context: OpenContext.MENU,
|
context: OpenContext.MENU,
|
||||||
cli: this.environmentService.args,
|
cli: this.environmentService.args,
|
||||||
urisToOpen: [uriToOpen],
|
urisToOpen: [uriToOpen],
|
||||||
forceNewWindow: openInNewWindow
|
forceNewWindow: openInNewWindow,
|
||||||
|
gotoLineMode: false
|
||||||
}).length > 0;
|
}).length > 0;
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export class ProductService implements IProductService {
|
|||||||
|
|
||||||
get vscodeVersion(): string { return '1.35.0'; } // {{SQL CARBON EDIT}} add vscodeversion
|
get vscodeVersion(): string { return '1.35.0'; } // {{SQL CARBON EDIT}} add vscodeversion
|
||||||
|
|
||||||
get commit(): string | undefined { return undefined; }
|
get commit(): string | undefined { return this.productConfiguration ? this.productConfiguration.commit : undefined; }
|
||||||
|
|
||||||
get nameLong(): string { return ''; }
|
get nameLong(): string { return ''; }
|
||||||
|
|
||||||
@@ -46,4 +46,6 @@ export class ProductService implements IProductService {
|
|||||||
get extensionKeywords(): { [extension: string]: readonly string[]; } | undefined { return this.productConfiguration ? this.productConfiguration.extensionKeywords : undefined; }
|
get extensionKeywords(): { [extension: string]: readonly string[]; } | undefined { return this.productConfiguration ? this.productConfiguration.extensionKeywords : undefined; }
|
||||||
|
|
||||||
get extensionAllowedBadgeProviders(): readonly string[] | undefined { return this.productConfiguration ? this.productConfiguration.extensionAllowedBadgeProviders : undefined; }
|
get extensionAllowedBadgeProviders(): readonly string[] | undefined { return this.productConfiguration ? this.productConfiguration.extensionAllowedBadgeProviders : undefined; }
|
||||||
|
|
||||||
|
get aiConfig() { return this.productConfiguration ? this.productConfiguration.aiConfig : undefined; }
|
||||||
}
|
}
|
||||||
@@ -38,6 +38,10 @@ export interface IProductService {
|
|||||||
readonly experimentsUrl?: string;
|
readonly experimentsUrl?: string;
|
||||||
readonly extensionKeywords?: { [extension: string]: readonly string[]; };
|
readonly extensionKeywords?: { [extension: string]: readonly string[]; };
|
||||||
readonly extensionAllowedBadgeProviders?: readonly string[];
|
readonly extensionAllowedBadgeProviders?: readonly string[];
|
||||||
|
|
||||||
|
readonly aiConfig?: {
|
||||||
|
readonly asimovKey: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IProductConfiguration {
|
export interface IProductConfiguration {
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||||
|
|
||||||
|
export const instanceStorageKey = 'telemetry.instanceId';
|
||||||
|
export const currentSessionDateStorageKey = 'telemetry.currentSessionDate';
|
||||||
|
export const firstSessionDateStorageKey = 'telemetry.firstSessionDate';
|
||||||
|
export const lastSessionDateStorageKey = 'telemetry.lastSessionDate';
|
||||||
|
|
||||||
|
import * as Platform from 'vs/base/common/platform';
|
||||||
|
import * as uuid from 'vs/base/common/uuid';
|
||||||
|
|
||||||
|
export async function resolveWorkbenchCommonProperties(storageService: IStorageService, commit: string | undefined, version: string | undefined, machineId: string, remoteAuthority?: string): Promise<{ [name: string]: string | undefined }> {
|
||||||
|
const result: { [name: string]: string | undefined; } = Object.create(null);
|
||||||
|
const instanceId = storageService.get(instanceStorageKey, StorageScope.GLOBAL)!;
|
||||||
|
const firstSessionDate = storageService.get(firstSessionDateStorageKey, StorageScope.GLOBAL)!;
|
||||||
|
const lastSessionDate = storageService.get(lastSessionDateStorageKey, StorageScope.GLOBAL)!;
|
||||||
|
|
||||||
|
// __GDPR__COMMON__ "common.firstSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||||
|
result['common.firstSessionDate'] = firstSessionDate;
|
||||||
|
// __GDPR__COMMON__ "common.lastSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||||
|
result['common.lastSessionDate'] = lastSessionDate || '';
|
||||||
|
// __GDPR__COMMON__ "common.isNewSession" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||||
|
result['common.isNewSession'] = !lastSessionDate ? '1' : '0';
|
||||||
|
// __GDPR__COMMON__ "common.instanceId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||||
|
result['common.instanceId'] = instanceId;
|
||||||
|
// __GDPR__COMMON__ "common.remoteAuthority" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
|
||||||
|
result['common.remoteAuthority'] = cleanRemoteAuthority(remoteAuthority);
|
||||||
|
|
||||||
|
// __GDPR__COMMON__ "common.machineId" : { "endPoint": "MacAddressHash", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" }
|
||||||
|
result['common.machineId'] = machineId;
|
||||||
|
// __GDPR__COMMON__ "sessionID" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||||
|
result['sessionID'] = uuid.generateUuid() + Date.now();
|
||||||
|
// __GDPR__COMMON__ "commitHash" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
|
||||||
|
result['commitHash'] = commit;
|
||||||
|
// __GDPR__COMMON__ "version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||||
|
result['version'] = version;
|
||||||
|
// __GDPR__COMMON__ "common.platform" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||||
|
result['common.platform'] = Platform.PlatformToString(Platform.platform);
|
||||||
|
// __GDPR__COMMON__ "common.product" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
|
||||||
|
result['common.product'] = 'web';
|
||||||
|
// __GDPR__COMMON__ "common.userAgent" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||||
|
result['common.userAgent'] = Platform.userAgent;
|
||||||
|
|
||||||
|
// dynamic properties which value differs on each call
|
||||||
|
let seq = 0;
|
||||||
|
const startTime = Date.now();
|
||||||
|
Object.defineProperties(result, {
|
||||||
|
// __GDPR__COMMON__ "timestamp" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||||
|
'timestamp': {
|
||||||
|
get: () => new Date(),
|
||||||
|
enumerable: true
|
||||||
|
},
|
||||||
|
// __GDPR__COMMON__ "common.timesincesessionstart" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
||||||
|
'common.timesincesessionstart': {
|
||||||
|
get: () => Date.now() - startTime,
|
||||||
|
enumerable: true
|
||||||
|
},
|
||||||
|
// __GDPR__COMMON__ "common.sequence" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
||||||
|
'common.sequence': {
|
||||||
|
get: () => seq++,
|
||||||
|
enumerable: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function cleanRemoteAuthority(remoteAuthority?: string): string {
|
||||||
|
if (!remoteAuthority) {
|
||||||
|
return 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
let ret = 'other';
|
||||||
|
// Whitelisted remote authorities
|
||||||
|
['ssh-remote', 'dev-container', 'wsl'].forEach((res: string) => {
|
||||||
|
if (remoteAuthority!.indexOf(`${res}+`) === 0) {
|
||||||
|
ret = res;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
@@ -9,6 +9,8 @@ import { IKeybindingService, KeybindingSource } from 'vs/platform/keybinding/com
|
|||||||
import { ITelemetryService, ITelemetryInfo, ITelemetryData } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService, ITelemetryInfo, ITelemetryData } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from 'vs/platform/log/common/log';
|
||||||
import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings';
|
import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings';
|
||||||
|
import { safeStringify } from 'vs/base/common/objects';
|
||||||
|
import { isObject } from 'vs/base/common/types';
|
||||||
|
|
||||||
export const NullTelemetryService = new class implements ITelemetryService {
|
export const NullTelemetryService = new class implements ITelemetryService {
|
||||||
_serviceBrand: undefined;
|
_serviceBrand: undefined;
|
||||||
@@ -243,6 +245,77 @@ export function keybindingsTelemetry(telemetryService: ITelemetryService, keybin
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface Properties {
|
||||||
|
[key: string]: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Measurements {
|
||||||
|
[key: string]: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateTelemetryData(data?: any): { properties: Properties, measurements: Measurements } {
|
||||||
|
|
||||||
|
const properties: Properties = Object.create(null);
|
||||||
|
const measurements: Measurements = Object.create(null);
|
||||||
|
|
||||||
|
const flat = Object.create(null);
|
||||||
|
flatten(data, flat);
|
||||||
|
|
||||||
|
for (let prop in flat) {
|
||||||
|
// enforce property names less than 150 char, take the last 150 char
|
||||||
|
prop = prop.length > 150 ? prop.substr(prop.length - 149) : prop;
|
||||||
|
const value = flat[prop];
|
||||||
|
|
||||||
|
if (typeof value === 'number') {
|
||||||
|
measurements[prop] = value;
|
||||||
|
|
||||||
|
} else if (typeof value === 'boolean') {
|
||||||
|
measurements[prop] = value ? 1 : 0;
|
||||||
|
|
||||||
|
} else if (typeof value === 'string') {
|
||||||
|
//enforce property value to be less than 1024 char, take the first 1024 char
|
||||||
|
properties[prop] = value.substring(0, 1023);
|
||||||
|
|
||||||
|
} else if (typeof value !== 'undefined' && value !== null) {
|
||||||
|
properties[prop] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
properties,
|
||||||
|
measurements
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function flatten(obj: any, result: { [key: string]: any }, order: number = 0, prefix?: string): void {
|
||||||
|
if (!obj) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let item of Object.getOwnPropertyNames(obj)) {
|
||||||
|
const value = obj[item];
|
||||||
|
const index = prefix ? prefix + item : item;
|
||||||
|
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
result[index] = safeStringify(value);
|
||||||
|
|
||||||
|
} else if (value instanceof Date) {
|
||||||
|
// TODO unsure why this is here and not in _getData
|
||||||
|
result[index] = value.toISOString();
|
||||||
|
|
||||||
|
} else if (isObject(value)) {
|
||||||
|
if (order < 2) {
|
||||||
|
flatten(value, result, order + 1, index + '.');
|
||||||
|
} else {
|
||||||
|
result[index] = safeStringify(value);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result[index] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function flattenKeys(value: Object | undefined): string[] {
|
function flattenKeys(value: Object | undefined): string[] {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as appInsights from 'applicationinsights';
|
import * as appInsights from 'applicationinsights';
|
||||||
import { isObject } from 'vs/base/common/types';
|
import { mixin } from 'vs/base/common/objects';
|
||||||
import { safeStringify, mixin } from 'vs/base/common/objects';
|
import { ITelemetryAppender, validateTelemetryData } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||||
import { ITelemetryAppender } from 'vs/platform/telemetry/common/telemetryUtils';
|
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from 'vs/platform/log/common/log';
|
||||||
|
|
||||||
function getClient(aiKey: string): appInsights.TelemetryClient {
|
function getClient(aiKey: string): appInsights.TelemetryClient {
|
||||||
@@ -35,13 +34,6 @@ function getClient(aiKey: string): appInsights.TelemetryClient {
|
|||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Properties {
|
|
||||||
[key: string]: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Measurements {
|
|
||||||
[key: string]: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class AppInsightsAppender implements ITelemetryAppender {
|
export class AppInsightsAppender implements ITelemetryAppender {
|
||||||
|
|
||||||
@@ -64,74 +56,12 @@ export class AppInsightsAppender implements ITelemetryAppender {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static _getData(data?: any): { properties: Properties, measurements: Measurements } {
|
|
||||||
|
|
||||||
const properties: Properties = Object.create(null);
|
|
||||||
const measurements: Measurements = Object.create(null);
|
|
||||||
|
|
||||||
const flat = Object.create(null);
|
|
||||||
AppInsightsAppender._flaten(data, flat);
|
|
||||||
|
|
||||||
for (let prop in flat) {
|
|
||||||
// enforce property names less than 150 char, take the last 150 char
|
|
||||||
prop = prop.length > 150 ? prop.substr(prop.length - 149) : prop;
|
|
||||||
const value = flat[prop];
|
|
||||||
|
|
||||||
if (typeof value === 'number') {
|
|
||||||
measurements[prop] = value;
|
|
||||||
|
|
||||||
} else if (typeof value === 'boolean') {
|
|
||||||
measurements[prop] = value ? 1 : 0;
|
|
||||||
|
|
||||||
} else if (typeof value === 'string') {
|
|
||||||
//enforce property value to be less than 1024 char, take the first 1024 char
|
|
||||||
properties[prop] = value.substring(0, 1023);
|
|
||||||
|
|
||||||
} else if (typeof value !== 'undefined' && value !== null) {
|
|
||||||
properties[prop] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
properties,
|
|
||||||
measurements
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static _flaten(obj: any, result: { [key: string]: any }, order: number = 0, prefix?: string): void {
|
|
||||||
if (!obj) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let item of Object.getOwnPropertyNames(obj)) {
|
|
||||||
const value = obj[item];
|
|
||||||
const index = prefix ? prefix + item : item;
|
|
||||||
|
|
||||||
if (Array.isArray(value)) {
|
|
||||||
result[index] = safeStringify(value);
|
|
||||||
|
|
||||||
} else if (value instanceof Date) {
|
|
||||||
// TODO unsure why this is here and not in _getData
|
|
||||||
result[index] = value.toISOString();
|
|
||||||
|
|
||||||
} else if (isObject(value)) {
|
|
||||||
if (order < 2) {
|
|
||||||
AppInsightsAppender._flaten(value, result, order + 1, index + '.');
|
|
||||||
} else {
|
|
||||||
result[index] = safeStringify(value);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
result[index] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
log(eventName: string, data?: any): void {
|
log(eventName: string, data?: any): void {
|
||||||
if (!this._aiClient) {
|
if (!this._aiClient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
data = mixin(data, this._defaultData);
|
data = mixin(data, this._defaultData);
|
||||||
data = AppInsightsAppender._getData(data);
|
data = validateTelemetryData(data);
|
||||||
|
|
||||||
if (this._logService) {
|
if (this._logService) {
|
||||||
this._logService.trace(`telemetry/${eventName}`, data);
|
this._logService.trace(`telemetry/${eventName}`, data);
|
||||||
|
|||||||
@@ -8,7 +8,14 @@ import { readdirSync } from 'vs/base/node/pfs';
|
|||||||
import { statSync, readFileSync } from 'fs';
|
import { statSync, readFileSync } from 'fs';
|
||||||
import { join } from 'vs/base/common/path';
|
import { join } from 'vs/base/common/path';
|
||||||
|
|
||||||
export function buildTelemetryMessage(appRoot: string, extensionsPath: string): string {
|
export function buildTelemetryMessage(appRoot: string, extensionsPath?: string): string {
|
||||||
|
const mergedTelemetry = Object.create(null);
|
||||||
|
// Simple function to merge the telemetry into one json object
|
||||||
|
const mergeTelemetry = (contents: string, dirName: string) => {
|
||||||
|
const telemetryData = JSON.parse(contents);
|
||||||
|
mergedTelemetry[dirName] = telemetryData;
|
||||||
|
};
|
||||||
|
if (extensionsPath) {
|
||||||
// Gets all the directories inside the extension directory
|
// Gets all the directories inside the extension directory
|
||||||
const dirs = readdirSync(extensionsPath).filter(files => {
|
const dirs = readdirSync(extensionsPath).filter(files => {
|
||||||
// This handles case where broken symbolic links can cause statSync to throw and error
|
// This handles case where broken symbolic links can cause statSync to throw and error
|
||||||
@@ -26,16 +33,11 @@ export function buildTelemetryMessage(appRoot: string, extensionsPath: string):
|
|||||||
telemetryJsonFolders.push(dir);
|
telemetryJsonFolders.push(dir);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const mergedTelemetry = Object.create(null);
|
|
||||||
// Simple function to merge the telemetry into one json object
|
|
||||||
const mergeTelemetry = (contents: string, dirName: string) => {
|
|
||||||
const telemetryData = JSON.parse(contents);
|
|
||||||
mergedTelemetry[dirName] = telemetryData;
|
|
||||||
};
|
|
||||||
telemetryJsonFolders.forEach((folder) => {
|
telemetryJsonFolders.forEach((folder) => {
|
||||||
const contents = readFileSync(join(extensionsPath, folder, 'telemetry.json')).toString();
|
const contents = readFileSync(join(extensionsPath, folder, 'telemetry.json')).toString();
|
||||||
mergeTelemetry(contents, folder);
|
mergeTelemetry(contents, folder);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
let contents = readFileSync(join(appRoot, 'telemetry-core.json')).toString();
|
let contents = readFileSync(join(appRoot, 'telemetry-core.json')).toString();
|
||||||
mergeTelemetry(contents, 'vscode-core');
|
mergeTelemetry(contents, 'vscode-core');
|
||||||
contents = readFileSync(join(appRoot, 'telemetry-extensions.json')).toString();
|
contents = readFileSync(join(appRoot, 'telemetry-extensions.json')).toString();
|
||||||
|
|||||||
@@ -273,8 +273,8 @@ export const editorErrorBorder = registerColor('editorError.border', { dark: nul
|
|||||||
export const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#E9A700', hc: null }, nls.localize('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.'));
|
export const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#CCA700', light: '#E9A700', hc: null }, nls.localize('editorWarning.foreground', 'Foreground color of warning squigglies in the editor.'));
|
||||||
export const editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hc: Color.fromHex('#FFCC00').transparent(0.8) }, nls.localize('warningBorder', 'Border color of warning boxes in the editor.'));
|
export const editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hc: Color.fromHex('#FFCC00').transparent(0.8) }, nls.localize('warningBorder', 'Border color of warning boxes in the editor.'));
|
||||||
|
|
||||||
export const editorInfoForeground = registerColor('editorInfo.foreground', { dark: '#008000', light: '#008000', hc: null }, nls.localize('editorInfo.foreground', 'Foreground color of info squigglies in the editor.'));
|
export const editorInfoForeground = registerColor('editorInfo.foreground', { dark: '#75BEFF', light: '#75BEFF', hc: null }, nls.localize('editorInfo.foreground', 'Foreground color of info squigglies in the editor.'));
|
||||||
export const editorInfoBorder = registerColor('editorInfo.border', { dark: null, light: null, hc: Color.fromHex('#71B771').transparent(0.8) }, nls.localize('infoBorder', 'Border color of info boxes in the editor.'));
|
export const editorInfoBorder = registerColor('editorInfo.border', { dark: null, light: null, hc: Color.fromHex('#75BEFF').transparent(0.8) }, nls.localize('infoBorder', 'Border color of info boxes in the editor.'));
|
||||||
|
|
||||||
export const editorHintForeground = registerColor('editorHint.foreground', { dark: Color.fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hc: null }, nls.localize('editorHint.foreground', 'Foreground color of hint squigglies in the editor.'));
|
export const editorHintForeground = registerColor('editorHint.foreground', { dark: Color.fromHex('#eeeeee').transparent(0.7), light: '#6c6c6c', hc: null }, nls.localize('editorHint.foreground', 'Foreground color of hint squigglies in the editor.'));
|
||||||
export const editorHintBorder = registerColor('editorHint.border', { dark: null, light: null, hc: Color.fromHex('#eeeeee').transparent(0.8) }, nls.localize('hintBorder', 'Border color of hint boxes in the editor.'));
|
export const editorHintBorder = registerColor('editorHint.border', { dark: null, light: null, hc: Color.fromHex('#eeeeee').transparent(0.8) }, nls.localize('hintBorder', 'Border color of hint boxes in the editor.'));
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ export function createUpdateURL(platform: string, quality: string): string {
|
|||||||
return `${product.updateUrl}/api/update/${platform}/${quality}/${product.commit}`;
|
return `${product.updateUrl}/api/update/${platform}/${quality}/${product.commit}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type UpdateNotAvailableClassification = {
|
||||||
|
explicit: { classification: 'SystemMetaData', purpose: 'FeatureInsight', isMeasurement: true };
|
||||||
|
};
|
||||||
|
|
||||||
export abstract class AbstractUpdateService implements IUpdateService {
|
export abstract class AbstractUpdateService implements IUpdateService {
|
||||||
|
|
||||||
_serviceBrand: any;
|
_serviceBrand: any;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { State, IUpdate, StateType, UpdateType } from 'vs/platform/update/common
|
|||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from 'vs/platform/log/common/log';
|
||||||
import { AbstractUpdateService, createUpdateURL } from 'vs/platform/update/electron-main/abstractUpdateService';
|
import { AbstractUpdateService, createUpdateURL, UpdateNotAvailableClassification } from 'vs/platform/update/electron-main/abstractUpdateService';
|
||||||
import { IRequestService } from 'vs/platform/request/common/request';
|
import { IRequestService } from 'vs/platform/request/common/request';
|
||||||
|
|
||||||
export class DarwinUpdateService extends AbstractUpdateService {
|
export class DarwinUpdateService extends AbstractUpdateService {
|
||||||
@@ -81,12 +81,10 @@ export class DarwinUpdateService extends AbstractUpdateService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* __GDPR__
|
type UpdateDownloadedClassification = {
|
||||||
"update:downloaded" : {
|
version: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
|
||||||
"version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
};
|
||||||
}
|
this.telemetryService.publicLog2<{ version: String }, UpdateDownloadedClassification>('update:downloaded', { version: update.version });
|
||||||
*/
|
|
||||||
this.telemetryService.publicLog('update:downloaded', { version: update.version });
|
|
||||||
|
|
||||||
this.setState(State.Ready(update));
|
this.setState(State.Ready(update));
|
||||||
}
|
}
|
||||||
@@ -95,13 +93,7 @@ export class DarwinUpdateService extends AbstractUpdateService {
|
|||||||
if (this.state.type !== StateType.CheckingForUpdates) {
|
if (this.state.type !== StateType.CheckingForUpdates) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!this.state.context });
|
||||||
/* __GDPR__
|
|
||||||
"update:notAvailable" : {
|
|
||||||
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
this.telemetryService.publicLog('update:notAvailable', { explicit: !!this.state.context });
|
|
||||||
|
|
||||||
this.setState(State.Idle(UpdateType.Archive));
|
this.setState(State.Idle(UpdateType.Archive));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { State, IUpdate, AvailableForDownload, UpdateType } from 'vs/platform/up
|
|||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from 'vs/platform/log/common/log';
|
||||||
import { createUpdateURL, AbstractUpdateService } from 'vs/platform/update/electron-main/abstractUpdateService';
|
import { createUpdateURL, AbstractUpdateService, UpdateNotAvailableClassification } from 'vs/platform/update/electron-main/abstractUpdateService';
|
||||||
import { IRequestService, asJson } from 'vs/platform/request/common/request';
|
import { IRequestService, asJson } from 'vs/platform/request/common/request';
|
||||||
import { shell } from 'electron';
|
import { shell } from 'electron';
|
||||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||||
@@ -40,17 +40,11 @@ export class LinuxUpdateService extends AbstractUpdateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setState(State.CheckingForUpdates(context));
|
this.setState(State.CheckingForUpdates(context));
|
||||||
|
|
||||||
this.requestService.request({ url: this.url }, CancellationToken.None)
|
this.requestService.request({ url: this.url }, CancellationToken.None)
|
||||||
.then<IUpdate>(asJson)
|
.then<IUpdate>(asJson)
|
||||||
.then(update => {
|
.then(update => {
|
||||||
if (!update || !update.url || !update.version || !update.productVersion) {
|
if (!update || !update.url || !update.version || !update.productVersion) {
|
||||||
/* __GDPR__
|
this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context });
|
||||||
"update:notAvailable" : {
|
|
||||||
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
this.telemetryService.publicLog('update:notAvailable', { explicit: !!context });
|
|
||||||
|
|
||||||
this.setState(State.Idle(UpdateType.Archive));
|
this.setState(State.Idle(UpdateType.Archive));
|
||||||
} else {
|
} else {
|
||||||
@@ -59,14 +53,7 @@ export class LinuxUpdateService extends AbstractUpdateService {
|
|||||||
})
|
})
|
||||||
.then(undefined, err => {
|
.then(undefined, err => {
|
||||||
this.logService.error(err);
|
this.logService.error(err);
|
||||||
|
this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context });
|
||||||
/* __GDPR__
|
|
||||||
"update:notAvailable" : {
|
|
||||||
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
this.telemetryService.publicLog('update:notAvailable', { explicit: !!context });
|
|
||||||
|
|
||||||
// only show message when explicitly checking for updates
|
// only show message when explicitly checking for updates
|
||||||
const message: string | undefined = !!context ? (err.message || err) : undefined;
|
const message: string | undefined = !!context ? (err.message || err) : undefined;
|
||||||
this.setState(State.Idle(UpdateType.Archive, message));
|
this.setState(State.Idle(UpdateType.Archive, message));
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import * as path from 'vs/base/common/path';
|
|||||||
import { realpath, watch } from 'fs';
|
import { realpath, watch } from 'fs';
|
||||||
import { spawn } from 'child_process';
|
import { spawn } from 'child_process';
|
||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
|
import { UpdateNotAvailableClassification } from 'vs/platform/update/electron-main/abstractUpdateService';
|
||||||
|
|
||||||
abstract class AbstractUpdateService2 implements IUpdateService {
|
abstract class AbstractUpdateService2 implements IUpdateService {
|
||||||
|
|
||||||
@@ -159,29 +160,17 @@ export class SnapUpdateService extends AbstractUpdateService2 {
|
|||||||
|
|
||||||
protected doCheckForUpdates(context: any): void {
|
protected doCheckForUpdates(context: any): void {
|
||||||
this.setState(State.CheckingForUpdates(context));
|
this.setState(State.CheckingForUpdates(context));
|
||||||
|
|
||||||
this.isUpdateAvailable().then(result => {
|
this.isUpdateAvailable().then(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
this.setState(State.Ready({ version: 'something', productVersion: 'something' }));
|
this.setState(State.Ready({ version: 'something', productVersion: 'something' }));
|
||||||
} else {
|
} else {
|
||||||
/* __GDPR__
|
this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context });
|
||||||
"update:notAvailable" : {
|
|
||||||
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
this.telemetryService.publicLog('update:notAvailable', { explicit: !!context });
|
|
||||||
|
|
||||||
this.setState(State.Idle(UpdateType.Snap));
|
this.setState(State.Idle(UpdateType.Snap));
|
||||||
}
|
}
|
||||||
}, err => {
|
}, err => {
|
||||||
this.logService.error(err);
|
this.logService.error(err);
|
||||||
|
this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context });
|
||||||
/* __GDPR__
|
|
||||||
"update:notAvailable" : {
|
|
||||||
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
this.telemetryService.publicLog('update:notAvailable', { explicit: !!context });
|
|
||||||
this.setState(State.Idle(UpdateType.Snap, err.message || err));
|
this.setState(State.Idle(UpdateType.Snap, err.message || err));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { State, IUpdate, StateType, AvailableForDownload, UpdateType } from 'vs/
|
|||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||||
import { ILogService } from 'vs/platform/log/common/log';
|
import { ILogService } from 'vs/platform/log/common/log';
|
||||||
import { createUpdateURL, AbstractUpdateService } from 'vs/platform/update/electron-main/abstractUpdateService';
|
import { createUpdateURL, AbstractUpdateService, UpdateNotAvailableClassification } from 'vs/platform/update/electron-main/abstractUpdateService';
|
||||||
import { IRequestService, asJson } from 'vs/platform/request/common/request';
|
import { IRequestService, asJson } from 'vs/platform/request/common/request';
|
||||||
import { checksum } from 'vs/base/node/crypto';
|
import { checksum } from 'vs/base/node/crypto';
|
||||||
import { tmpdir } from 'os';
|
import { tmpdir } from 'os';
|
||||||
@@ -169,12 +169,7 @@ export class Win32UpdateService extends AbstractUpdateService {
|
|||||||
})
|
})
|
||||||
.then(undefined, err => {
|
.then(undefined, err => {
|
||||||
this.logService.error(err);
|
this.logService.error(err);
|
||||||
/* __GDPR__
|
this.telemetryService.publicLog2<{ explicit: boolean }, UpdateNotAvailableClassification>('update:notAvailable', { explicit: !!context });
|
||||||
"update:notAvailable" : {
|
|
||||||
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
this.telemetryService.publicLog('update:notAvailable', { explicit: !!context });
|
|
||||||
|
|
||||||
// only show message when explicitly checking for updates
|
// only show message when explicitly checking for updates
|
||||||
const message: string | undefined = !!context ? (err.message || err) : undefined;
|
const message: string | undefined = !!context ? (err.message || err) : undefined;
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ export interface IOpenSettings {
|
|||||||
forceReuseWindow?: boolean;
|
forceReuseWindow?: boolean;
|
||||||
diffMode?: boolean;
|
diffMode?: boolean;
|
||||||
addMode?: boolean;
|
addMode?: boolean;
|
||||||
|
gotoLineMode?: boolean;
|
||||||
noRecentEntry?: boolean;
|
noRecentEntry?: boolean;
|
||||||
waitMarkerFileURI?: URI;
|
waitMarkerFileURI?: URI;
|
||||||
args?: ParsedArgs;
|
args?: ParsedArgs;
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ export interface IOpenConfiguration {
|
|||||||
readonly forceEmpty?: boolean;
|
readonly forceEmpty?: boolean;
|
||||||
readonly diffMode?: boolean;
|
readonly diffMode?: boolean;
|
||||||
addMode?: boolean;
|
addMode?: boolean;
|
||||||
|
readonly gotoLineMode?: boolean;
|
||||||
readonly initialStartup?: boolean;
|
readonly initialStartup?: boolean;
|
||||||
readonly noRecentEntry?: boolean;
|
readonly noRecentEntry?: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -295,6 +295,7 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH
|
|||||||
forceReuseWindow: options.forceReuseWindow,
|
forceReuseWindow: options.forceReuseWindow,
|
||||||
diffMode: options.diffMode,
|
diffMode: options.diffMode,
|
||||||
addMode: options.addMode,
|
addMode: options.addMode,
|
||||||
|
gotoLineMode: options.gotoLineMode,
|
||||||
noRecentEntry: options.noRecentEntry,
|
noRecentEntry: options.noRecentEntry,
|
||||||
waitMarkerFileURI: options.waitMarkerFileURI
|
waitMarkerFileURI: options.waitMarkerFileURI
|
||||||
});
|
});
|
||||||
@@ -461,10 +462,10 @@ export class WindowsService extends Disposable implements IWindowsService, IURLH
|
|||||||
}
|
}
|
||||||
|
|
||||||
private openFileForURI(uri: IURIToOpen): void {
|
private openFileForURI(uri: IURIToOpen): void {
|
||||||
const cli = assign(Object.create(null), this.environmentService.args, { goto: true });
|
const cli = assign(Object.create(null), this.environmentService.args);
|
||||||
const urisToOpen = [uri];
|
const urisToOpen = [uri];
|
||||||
|
|
||||||
this.windowsMainService.open({ context: OpenContext.API, cli, urisToOpen });
|
this.windowsMainService.open({ context: OpenContext.API, cli, urisToOpen, gotoLineMode: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
async resolveProxy(windowId: number, url: string): Promise<string | undefined> {
|
async resolveProxy(windowId: number, url: string): Promise<string | undefined> {
|
||||||
|
|||||||
Vendored
-48
@@ -713,54 +713,6 @@ declare module 'vscode' {
|
|||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
/**
|
|
||||||
* Comment Reactions
|
|
||||||
* Stay in proposed.
|
|
||||||
*/
|
|
||||||
interface CommentReaction {
|
|
||||||
readonly hasReacted?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stay in proposed
|
|
||||||
*/
|
|
||||||
export interface CommentReactionProvider {
|
|
||||||
availableReactions: CommentReaction[];
|
|
||||||
toggleReaction?(document: TextDocument, comment: Comment, reaction: CommentReaction): Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface CommentController {
|
|
||||||
/**
|
|
||||||
* Optional reaction provider
|
|
||||||
* Stay in proposed.
|
|
||||||
*/
|
|
||||||
reactionProvider?: CommentReactionProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A comment is displayed within the editor or the Comments Panel, depending on how it is provided.
|
|
||||||
*/
|
|
||||||
export interface Comment {
|
|
||||||
/**
|
|
||||||
* The id of the comment
|
|
||||||
*/
|
|
||||||
commentId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A comment controller is able to provide [comments](#CommentThread) support to the editor and
|
|
||||||
* provide users various ways to interact with comments.
|
|
||||||
*/
|
|
||||||
export interface CommentController {
|
|
||||||
/**
|
|
||||||
* Optional reaction provider
|
|
||||||
*/
|
|
||||||
reactionProvider?: CommentReactionProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//#region Terminal
|
//#region Terminal
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as modes from 'vs/editor/common/modes';
|
|||||||
import { MainContext, MainThreadEditorInsetsShape, IExtHostContext, ExtHostEditorInsetsShape, ExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
import { MainContext, MainThreadEditorInsetsShape, IExtHostContext, ExtHostEditorInsetsShape, ExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||||
import { extHostNamedCustomer } from '../common/extHostCustomers';
|
import { extHostNamedCustomer } from '../common/extHostCustomers';
|
||||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||||
import { IWebviewService, Webview } from 'vs/workbench/contrib/webview/common/webview';
|
import { IWebviewService, WebviewElement } from 'vs/workbench/contrib/webview/common/webview';
|
||||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||||
import { IActiveCodeEditor, IViewZone } from 'vs/editor/browser/editorBrowser';
|
import { IActiveCodeEditor, IViewZone } from 'vs/editor/browser/editorBrowser';
|
||||||
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
|
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
|
||||||
@@ -33,7 +33,7 @@ class EditorWebviewZone implements IViewZone {
|
|||||||
readonly editor: IActiveCodeEditor,
|
readonly editor: IActiveCodeEditor,
|
||||||
readonly line: number,
|
readonly line: number,
|
||||||
readonly height: number,
|
readonly height: number,
|
||||||
readonly webview: Webview,
|
readonly webview: WebviewElement,
|
||||||
) {
|
) {
|
||||||
this.domNode = document.createElement('div');
|
this.domNode = document.createElement('div');
|
||||||
this.domNode.style.zIndex = '10'; // without this, the webview is not interactive
|
this.domNode.style.zIndex = '10'; // without this, the webview is not interactive
|
||||||
@@ -124,12 +124,11 @@ export class MainThreadEditorInsets implements MainThreadEditorInsetsShape {
|
|||||||
$setHtml(handle: number, value: string): void {
|
$setHtml(handle: number, value: string): void {
|
||||||
const inset = this.getInset(handle);
|
const inset = this.getInset(handle);
|
||||||
inset.webview.html = value;
|
inset.webview.html = value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$setOptions(handle: number, options: modes.IWebviewOptions): void {
|
$setOptions(handle: number, options: modes.IWebviewOptions): void {
|
||||||
const inset = this.getInset(handle);
|
const inset = this.getInset(handle);
|
||||||
inset.webview.options = options;
|
inset.webview.contentOptions = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
async $postMessage(handle: number, value: any): Promise<boolean> {
|
async $postMessage(handle: number, value: any): Promise<boolean> {
|
||||||
|
|||||||
@@ -308,10 +308,6 @@ export class MainThreadCommentController {
|
|||||||
return commentingRanges || [];
|
return commentingRanges || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
getReactionGroup(): modes.CommentReaction[] | undefined {
|
|
||||||
return this._features.reactionGroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
async toggleReaction(uri: URI, thread: modes.CommentThread, comment: modes.Comment, reaction: modes.CommentReaction, token: CancellationToken): Promise<void> {
|
async toggleReaction(uri: URI, thread: modes.CommentThread, comment: modes.Comment, reaction: modes.CommentReaction, token: CancellationToken): Promise<void> {
|
||||||
return this._proxy.$toggleReaction(this._handle, thread.commentThreadHandle, uri, comment, reaction);
|
return this._proxy.$toggleReaction(this._handle, thread.commentThreadHandle, uri, comment, reaction);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
|
|||||||
import { IRemoteConsoleLog, log, parse } from 'vs/base/common/console';
|
import { IRemoteConsoleLog, log, parse } from 'vs/base/common/console';
|
||||||
import { parseExtensionDevOptions } from 'vs/workbench/services/extensions/common/extensionDevOptions';
|
import { parseExtensionDevOptions } from 'vs/workbench/services/extensions/common/extensionDevOptions';
|
||||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||||
import { IExtensionHostDebugService } from 'vs/workbench/services/extensions/common/extensionHostDebug';
|
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||||
|
|
||||||
@extHostNamedCustomer(MainContext.MainThreadConsole)
|
@extHostNamedCustomer(MainContext.MainThreadConsole)
|
||||||
export class MainThreadConsole implements MainThreadConsoleShape {
|
export class MainThreadConsole implements MainThreadConsoleShape {
|
||||||
|
|||||||
@@ -12,11 +12,12 @@ import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensio
|
|||||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import { Action } from 'vs/base/common/actions';
|
import { Action } from 'vs/base/common/actions';
|
||||||
import { EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement';
|
import { IExtensionEnablementService, EnablementState } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||||
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||||
import { IWindowService } from 'vs/platform/windows/common/windows';
|
import { IWindowService } from 'vs/platform/windows/common/windows';
|
||||||
import { IExtensionsWorkbenchService, IExtension } from 'vs/workbench/contrib/extensions/common/extensions';
|
import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||||
|
import { ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||||
|
|
||||||
@extHostNamedCustomer(MainContext.MainThreadExtensionService)
|
@extHostNamedCustomer(MainContext.MainThreadExtensionService)
|
||||||
export class MainThreadExtensionService implements MainThreadExtensionServiceShape {
|
export class MainThreadExtensionService implements MainThreadExtensionServiceShape {
|
||||||
@@ -25,18 +26,21 @@ export class MainThreadExtensionService implements MainThreadExtensionServiceSha
|
|||||||
private readonly _notificationService: INotificationService;
|
private readonly _notificationService: INotificationService;
|
||||||
private readonly _extensionsWorkbenchService: IExtensionsWorkbenchService;
|
private readonly _extensionsWorkbenchService: IExtensionsWorkbenchService;
|
||||||
private readonly _windowService: IWindowService;
|
private readonly _windowService: IWindowService;
|
||||||
|
private readonly _extensionEnablementService: IExtensionEnablementService;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
extHostContext: IExtHostContext,
|
extHostContext: IExtHostContext,
|
||||||
@IExtensionService extensionService: IExtensionService,
|
@IExtensionService extensionService: IExtensionService,
|
||||||
@INotificationService notificationService: INotificationService,
|
@INotificationService notificationService: INotificationService,
|
||||||
@IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService,
|
@IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||||
@IWindowService windowService: IWindowService
|
@IWindowService windowService: IWindowService,
|
||||||
|
@IExtensionEnablementService extensionEnablementService: IExtensionEnablementService
|
||||||
) {
|
) {
|
||||||
this._extensionService = extensionService;
|
this._extensionService = extensionService;
|
||||||
this._notificationService = notificationService;
|
this._notificationService = notificationService;
|
||||||
this._extensionsWorkbenchService = extensionsWorkbenchService;
|
this._extensionsWorkbenchService = extensionsWorkbenchService;
|
||||||
this._windowService = windowService;
|
this._windowService = windowService;
|
||||||
|
this._extensionEnablementService = extensionEnablementService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void {
|
public dispose(): void {
|
||||||
@@ -74,30 +78,31 @@ export class MainThreadExtensionService implements MainThreadExtensionServiceSha
|
|||||||
const local = await this._extensionsWorkbenchService.queryLocal();
|
const local = await this._extensionsWorkbenchService.queryLocal();
|
||||||
const installedDependency = local.filter(i => areSameExtensions(i.identifier, { id: missingDependency }))[0];
|
const installedDependency = local.filter(i => areSameExtensions(i.identifier, { id: missingDependency }))[0];
|
||||||
if (installedDependency) {
|
if (installedDependency) {
|
||||||
await this._handleMissingInstalledDependency(extension, installedDependency);
|
await this._handleMissingInstalledDependency(extension, installedDependency.local!);
|
||||||
} else {
|
} else {
|
||||||
await this._handleMissingNotInstalledDependency(extension, missingDependency);
|
await this._handleMissingNotInstalledDependency(extension, missingDependency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _handleMissingInstalledDependency(extension: IExtensionDescription, missingInstalledDependency: IExtension): Promise<void> {
|
private async _handleMissingInstalledDependency(extension: IExtensionDescription, missingInstalledDependency: ILocalExtension): Promise<void> {
|
||||||
const extName = extension.displayName || extension.name;
|
const extName = extension.displayName || extension.name;
|
||||||
if (missingInstalledDependency.enablementState === EnablementState.Enabled || missingInstalledDependency.enablementState === EnablementState.WorkspaceEnabled) {
|
if (this._extensionEnablementService.isEnabled(missingInstalledDependency)) {
|
||||||
this._notificationService.notify({
|
this._notificationService.notify({
|
||||||
severity: Severity.Error,
|
severity: Severity.Error,
|
||||||
message: localize('reload window', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not loaded. Would you like to reload the window to load the extension?", extName, missingInstalledDependency.displayName),
|
message: localize('reload window', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not loaded. Would you like to reload the window to load the extension?", extName, missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name),
|
||||||
actions: {
|
actions: {
|
||||||
primary: [new Action('reload', localize('reload', "Reload Window"), '', true, () => this._windowService.reloadWindow())]
|
primary: [new Action('reload', localize('reload', "Reload Window"), '', true, () => this._windowService.reloadWindow())]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
const enablementState = this._extensionEnablementService.getEnablementState(missingInstalledDependency);
|
||||||
this._notificationService.notify({
|
this._notificationService.notify({
|
||||||
severity: Severity.Error,
|
severity: Severity.Error,
|
||||||
message: localize('disabledDep', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is disabled. Would you like to enable the extension and reload the window?", extName, missingInstalledDependency.displayName),
|
message: localize('disabledDep', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is disabled. Would you like to enable the extension and reload the window?", extName, missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name),
|
||||||
actions: {
|
actions: {
|
||||||
primary: [new Action('enable', localize('enable dep', "Enable and Reload"), '', true,
|
primary: [new Action('enable', localize('enable dep', "Enable and Reload"), '', true,
|
||||||
() => this._extensionsWorkbenchService.setEnablement([missingInstalledDependency], missingInstalledDependency.enablementState === EnablementState.Disabled ? EnablementState.Enabled : EnablementState.WorkspaceEnabled)
|
() => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === EnablementState.DisabledGlobally ? EnablementState.EnabledGlobally : EnablementState.EnabledWorkspace)
|
||||||
.then(() => this._windowService.reloadWindow(), e => this._notificationService.error(e)))]
|
.then(() => this._windowService.reloadWindow(), e => this._notificationService.error(e)))]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { IOpenerService } from 'vs/platform/opener/common/opener';
|
|||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { ExtHostContext, ExtHostWebviewsShape, IExtHostContext, MainContext, MainThreadWebviewsShape, WebviewPanelHandle, WebviewPanelShowOptions } from 'vs/workbench/api/common/extHost.protocol';
|
import { ExtHostContext, ExtHostWebviewsShape, IExtHostContext, MainContext, MainThreadWebviewsShape, WebviewPanelHandle, WebviewPanelShowOptions } from 'vs/workbench/api/common/extHost.protocol';
|
||||||
import { editorGroupToViewColumn, EditorViewColumn, viewColumnToEditorGroup } from 'vs/workbench/api/common/shared/editor';
|
import { editorGroupToViewColumn, EditorViewColumn, viewColumnToEditorGroup } from 'vs/workbench/api/common/shared/editor';
|
||||||
import { WebviewEditor } from 'vs/workbench/contrib/webview/browser/webviewEditor';
|
|
||||||
import { WebviewEditorInput } from 'vs/workbench/contrib/webview/browser/webviewEditorInput';
|
import { WebviewEditorInput } from 'vs/workbench/contrib/webview/browser/webviewEditorInput';
|
||||||
import { ICreateWebViewShowOptions, IWebviewEditorService, WebviewInputOptions } from 'vs/workbench/contrib/webview/browser/webviewEditorService';
|
import { ICreateWebViewShowOptions, IWebviewEditorService, WebviewInputOptions } from 'vs/workbench/contrib/webview/browser/webviewEditorService';
|
||||||
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||||
@@ -22,8 +21,9 @@ import { ACTIVE_GROUP, IEditorService } from 'vs/workbench/services/editor/commo
|
|||||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||||
import { extHostNamedCustomer } from '../common/extHostCustomers';
|
import { extHostNamedCustomer } from '../common/extHostCustomers';
|
||||||
import { IProductService } from 'vs/platform/product/common/product';
|
import { IProductService } from 'vs/platform/product/common/product';
|
||||||
|
import { startsWith } from 'vs/base/common/strings';
|
||||||
|
|
||||||
interface MainThreadWebviewState {
|
interface OldMainThreadWebviewState {
|
||||||
readonly viewType: string;
|
readonly viewType: string;
|
||||||
state: any;
|
state: any;
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
|||||||
|
|
||||||
|
|
||||||
private readonly _proxy: ExtHostWebviewsShape;
|
private readonly _proxy: ExtHostWebviewsShape;
|
||||||
private readonly _webviews = new Map<WebviewPanelHandle, WebviewEditorInput<MainThreadWebviewState>>();
|
private readonly _webviews = new Map<WebviewPanelHandle, WebviewEditorInput>();
|
||||||
private readonly _revivers = new Map<string, IDisposable>();
|
private readonly _revivers = new Map<string, IDisposable>();
|
||||||
|
|
||||||
private _activeWebview: WebviewPanelHandle | undefined = undefined;
|
private _activeWebview: WebviewPanelHandle | undefined = undefined;
|
||||||
@@ -67,8 +67,12 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
|||||||
// This reviver's only job is to activate webview extensions
|
// This reviver's only job is to activate webview extensions
|
||||||
// This should trigger the real reviver to be registered from the extension host side.
|
// This should trigger the real reviver to be registered from the extension host side.
|
||||||
this._register(_webviewEditorService.registerReviver({
|
this._register(_webviewEditorService.registerReviver({
|
||||||
canRevive: (webview: WebviewEditorInput<any>) => {
|
canRevive: (webview: WebviewEditorInput) => {
|
||||||
const viewType = webview.state && webview.state.viewType;
|
if (!webview.webview.state) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const viewType = this.fromInternalWebviewViewType(webview.viewType);
|
||||||
if (typeof viewType === 'string') {
|
if (typeof viewType === 'string') {
|
||||||
extensionService.activateByEvent(`onWebviewPanel:${viewType}`);
|
extensionService.activateByEvent(`onWebviewPanel:${viewType}`);
|
||||||
}
|
}
|
||||||
@@ -96,11 +100,8 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
|||||||
const webview = this._webviewEditorService.createWebview(handle, this.getInternalWebviewViewType(viewType), title, mainThreadShowOptions, reviveWebviewOptions(options), {
|
const webview = this._webviewEditorService.createWebview(handle, this.getInternalWebviewViewType(viewType), title, mainThreadShowOptions, reviveWebviewOptions(options), {
|
||||||
location: URI.revive(extensionLocation),
|
location: URI.revive(extensionLocation),
|
||||||
id: extensionId
|
id: extensionId
|
||||||
}, this.createWebviewEventDelegate(handle)) as WebviewEditorInput<MainThreadWebviewState>;
|
});
|
||||||
webview.state = {
|
this.hookupWebviewEventDelegate(handle, webview);
|
||||||
viewType: viewType,
|
|
||||||
state: undefined
|
|
||||||
};
|
|
||||||
|
|
||||||
this._webviews.set(handle, webview);
|
this._webviews.set(handle, webview);
|
||||||
|
|
||||||
@@ -129,12 +130,12 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
|||||||
|
|
||||||
public $setHtml(handle: WebviewPanelHandle, value: string): void {
|
public $setHtml(handle: WebviewPanelHandle, value: string): void {
|
||||||
const webview = this.getWebview(handle);
|
const webview = this.getWebview(handle);
|
||||||
webview.html = value;
|
webview.webview.html = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public $setOptions(handle: WebviewPanelHandle, options: modes.IWebviewOptions): void {
|
public $setOptions(handle: WebviewPanelHandle, options: modes.IWebviewOptions): void {
|
||||||
const webview = this.getWebview(handle);
|
const webview = this.getWebview(handle);
|
||||||
webview.setOptions(reviveWebviewOptions(options as any /*todo@mat */));
|
webview.webview.contentOptions = reviveWebviewOptions(options as any /*todo@mat */);
|
||||||
}
|
}
|
||||||
|
|
||||||
public $reveal(handle: WebviewPanelHandle, showOptions: WebviewPanelShowOptions): void {
|
public $reveal(handle: WebviewPanelHandle, showOptions: WebviewPanelShowOptions): void {
|
||||||
@@ -151,52 +152,52 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
|||||||
|
|
||||||
public async $postMessage(handle: WebviewPanelHandle, message: any): Promise<boolean> {
|
public async $postMessage(handle: WebviewPanelHandle, message: any): Promise<boolean> {
|
||||||
const webview = this.getWebview(handle);
|
const webview = this.getWebview(handle);
|
||||||
const editors = this._editorService.visibleControls
|
|
||||||
.filter(e => e instanceof WebviewEditor)
|
|
||||||
.map(e => e as WebviewEditor)
|
|
||||||
.filter(e => e.input!.matches(webview));
|
|
||||||
|
|
||||||
if (editors.length > 0) {
|
|
||||||
editors[0].sendMessage(message);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (webview.webview) {
|
|
||||||
webview.webview.sendMessage(message);
|
webview.webview.sendMessage(message);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public $registerSerializer(viewType: string): void {
|
public $registerSerializer(viewType: string): void {
|
||||||
if (this._revivers.has(viewType)) {
|
if (this._revivers.has(viewType)) {
|
||||||
throw new Error(`Reviver for ${viewType} already registered`);
|
throw new Error(`Reviver for ${viewType} already registered`);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._revivers.set(viewType, this._webviewEditorService.registerReviver({
|
this._revivers.set(viewType, this._webviewEditorService.registerReviver({
|
||||||
canRevive: (webview) => {
|
canRevive: (webviewEditorInput) => {
|
||||||
return webview.state && webview.state.viewType === viewType;
|
return !!webviewEditorInput.webview.state && webviewEditorInput.viewType === this.getInternalWebviewViewType(viewType);
|
||||||
},
|
},
|
||||||
reviveWebview: async (webview): Promise<void> => {
|
reviveWebview: async (webviewEditorInput): Promise<void> => {
|
||||||
const viewType = webview.state.viewType;
|
const viewType = this.fromInternalWebviewViewType(webviewEditorInput.viewType);
|
||||||
const handle = 'revival-' + MainThreadWebviews.revivalPool++;
|
if (!viewType) {
|
||||||
this._webviews.set(handle, webview);
|
webviewEditorInput.webview.html = MainThreadWebviews.getDeserializationFailedContents(webviewEditorInput.viewType);
|
||||||
webview._events = this.createWebviewEventDelegate(handle);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const handle = `revival-${MainThreadWebviews.revivalPool++}`;
|
||||||
|
this._webviews.set(handle, webviewEditorInput);
|
||||||
|
this.hookupWebviewEventDelegate(handle, webviewEditorInput);
|
||||||
let state = undefined;
|
let state = undefined;
|
||||||
if (webview.state.state) {
|
if (webviewEditorInput.webview.state) {
|
||||||
try {
|
try {
|
||||||
state = JSON.parse(webview.state.state);
|
// Check for old-style webview state first which stored state inside another state object
|
||||||
|
// TODO: remove this after 1.37 ships.
|
||||||
|
if (
|
||||||
|
typeof (webviewEditorInput.webview.state as unknown as OldMainThreadWebviewState).viewType === 'string' &&
|
||||||
|
'state' in (webviewEditorInput.webview.state as unknown as OldMainThreadWebviewState)
|
||||||
|
) {
|
||||||
|
state = JSON.parse((webviewEditorInput.webview.state as any).state);
|
||||||
|
} else {
|
||||||
|
state = JSON.parse(webviewEditorInput.webview.state);
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// noop
|
// noop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this._proxy.$deserializeWebviewPanel(handle, viewType, webview.getTitle(), state, editorGroupToViewColumn(this._editorGroupService, webview.group || 0), webview.options);
|
await this._proxy.$deserializeWebviewPanel(handle, viewType, webviewEditorInput.getTitle(), state, editorGroupToViewColumn(this._editorGroupService, webviewEditorInput.group || 0), webviewEditorInput.webview.options);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
onUnexpectedError(error);
|
onUnexpectedError(error);
|
||||||
webview.html = MainThreadWebviews.getDeserializationFailedContents(viewType);
|
webviewEditorInput.webview.html = MainThreadWebviews.getDeserializationFailedContents(viewType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -216,23 +217,28 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
|||||||
return `mainThreadWebview-${viewType}`;
|
return `mainThreadWebview-${viewType}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private createWebviewEventDelegate(handle: WebviewPanelHandle) {
|
private fromInternalWebviewViewType(viewType: string): string | undefined {
|
||||||
return {
|
if (!startsWith(viewType, 'mainThreadWebview-')) {
|
||||||
onDidClickLink: (uri: URI) => this.onDidClickLink(handle, uri),
|
return undefined;
|
||||||
onMessage: (message: any) => this._proxy.$onMessage(handle, message),
|
}
|
||||||
onDispose: () => {
|
return viewType.replace(/^mainThreadWebview-/, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
private hookupWebviewEventDelegate(handle: WebviewPanelHandle, input: WebviewEditorInput) {
|
||||||
|
input.webview.onDidClickLink((uri: URI) => this.onDidClickLink(handle, uri));
|
||||||
|
input.webview.onMessage((message: any) => this._proxy.$onMessage(handle, message));
|
||||||
|
input.onDispose(() => {
|
||||||
this._proxy.$onDidDisposeWebviewPanel(handle).finally(() => {
|
this._proxy.$onDidDisposeWebviewPanel(handle).finally(() => {
|
||||||
this._webviews.delete(handle);
|
this._webviews.delete(handle);
|
||||||
});
|
});
|
||||||
},
|
});
|
||||||
onDidUpdateWebviewState: (newState: any) => {
|
input.webview.onDidUpdateState((newState: any) => {
|
||||||
const webview = this.tryGetWebview(handle);
|
const webview = this.tryGetWebview(handle);
|
||||||
if (!webview || webview.isDisposed()) {
|
if (!webview || webview.isDisposed()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(webview as WebviewEditorInput<MainThreadWebviewState>).state.state = newState;
|
webview.webview.state = newState;
|
||||||
}
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private onActiveEditorChanged() {
|
private onActiveEditorChanged() {
|
||||||
@@ -319,7 +325,7 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
|||||||
if (this._productService.urlProtocol === link.scheme) {
|
if (this._productService.urlProtocol === link.scheme) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !!webview.options.enableCommandUris && link.scheme === 'command';
|
return !!webview.webview.contentOptions.enableCommandUris && link.scheme === 'command';
|
||||||
}
|
}
|
||||||
|
|
||||||
private getWebview(handle: WebviewPanelHandle): WebviewEditorInput {
|
private getWebview(handle: WebviewPanelHandle): WebviewEditorInput {
|
||||||
@@ -347,13 +353,15 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reviveWebviewOptions(options: WebviewInputOptions): WebviewInputOptions {
|
function reviveWebviewOptions(options: modes.IWebviewOptions): WebviewInputOptions {
|
||||||
return {
|
return {
|
||||||
...options,
|
...options,
|
||||||
|
allowScripts: options.enableScripts,
|
||||||
localResourceRoots: Array.isArray(options.localResourceRoots) ? options.localResourceRoots.map(r => URI.revive(r)) : undefined,
|
localResourceRoots: Array.isArray(options.localResourceRoots) ? options.localResourceRoots.map(r => URI.revive(r)) : undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function reviveWebviewIcon(
|
function reviveWebviewIcon(
|
||||||
value: { light: UriComponents, dark: UriComponents } | undefined
|
value: { light: UriComponents, dark: UriComponents } | undefined
|
||||||
): { light: URI, dark: URI } | undefined {
|
): { light: URI, dark: URI } | undefined {
|
||||||
|
|||||||
@@ -1287,7 +1287,6 @@ export interface ExtHostCommentsShape {
|
|||||||
$updateCommentThreadTemplate(commentControllerHandle: number, threadHandle: number, range: IRange): Promise<void>;
|
$updateCommentThreadTemplate(commentControllerHandle: number, threadHandle: number, range: IRange): Promise<void>;
|
||||||
$deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number): void;
|
$deleteCommentThread(commentControllerHandle: number, commentThreadHandle: number): void;
|
||||||
$provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<IRange[] | undefined>;
|
$provideCommentingRanges(commentControllerHandle: number, uriComponents: UriComponents, token: CancellationToken): Promise<IRange[] | undefined>;
|
||||||
$provideReactionGroup(commentControllerHandle: number): Promise<modes.CommentReaction[] | undefined>;
|
|
||||||
$toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise<void>;
|
$toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -187,47 +187,28 @@ export class ExtHostComments implements ExtHostCommentsShape, IDisposable {
|
|||||||
}).then(ranges => ranges ? ranges.map(x => extHostTypeConverter.Range.from(x)) : undefined);
|
}).then(ranges => ranges ? ranges.map(x => extHostTypeConverter.Range.from(x)) : undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
$provideReactionGroup(commentControllerHandle: number): Promise<modes.CommentReaction[] | undefined> {
|
|
||||||
const commentController = this._commentControllers.get(commentControllerHandle);
|
|
||||||
|
|
||||||
if (!commentController || !commentController.reactionProvider) {
|
|
||||||
return Promise.resolve(undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
return asPromise(() => {
|
|
||||||
return commentController!.reactionProvider!.availableReactions;
|
|
||||||
}).then(reactions => reactions.map(reaction => convertToReaction(commentController.reactionProvider, reaction)));
|
|
||||||
}
|
|
||||||
|
|
||||||
$toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise<void> {
|
$toggleReaction(commentControllerHandle: number, threadHandle: number, uri: UriComponents, comment: modes.Comment, reaction: modes.CommentReaction): Promise<void> {
|
||||||
const document = this._documents.getDocument(URI.revive(uri));
|
|
||||||
const commentController = this._commentControllers.get(commentControllerHandle);
|
const commentController = this._commentControllers.get(commentControllerHandle);
|
||||||
|
|
||||||
if (!commentController || !((commentController.reactionProvider && commentController.reactionProvider.toggleReaction) || commentController.reactionHandler)) {
|
if (!commentController || !commentController.reactionHandler) {
|
||||||
return Promise.resolve(undefined);
|
return Promise.resolve(undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
return asPromise(() => {
|
return asPromise(() => {
|
||||||
const commentThread = commentController.getCommentThread(threadHandle);
|
const commentThread = commentController.getCommentThread(threadHandle);
|
||||||
if (commentThread) {
|
if (commentThread) {
|
||||||
const vscodeComment = commentThread.getComment(comment.commentId);
|
const vscodeComment = commentThread.getCommentByUniqueId(comment.uniqueIdInThread);
|
||||||
|
|
||||||
if (commentController !== undefined && vscodeComment) {
|
if (commentController !== undefined && vscodeComment) {
|
||||||
if (commentController.reactionHandler) {
|
if (commentController.reactionHandler) {
|
||||||
return commentController.reactionHandler(vscodeComment, convertFromReaction(reaction));
|
return commentController.reactionHandler(vscodeComment, convertFromReaction(reaction));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commentController.reactionProvider && commentController.reactionProvider.toggleReaction) {
|
|
||||||
return commentController.reactionProvider.toggleReaction(document, vscodeComment, convertFromReaction(reaction));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return Promise.resolve(undefined);
|
return Promise.resolve(undefined);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
dispose() {
|
dispose() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -391,16 +372,6 @@ export class ExtHostCommentThread implements vscode.CommentThread {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getComment(commentId: string): vscode.Comment | undefined {
|
|
||||||
const comments = this._comments.filter(comment => comment.commentId === commentId);
|
|
||||||
|
|
||||||
if (comments && comments.length) {
|
|
||||||
return comments[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
getCommentByUniqueId(uniqueId: number): vscode.Comment | undefined {
|
getCommentByUniqueId(uniqueId: number): vscode.Comment | undefined {
|
||||||
for (let key of this._commentsMap) {
|
for (let key of this._commentsMap) {
|
||||||
let comment = key[0];
|
let comment = key[0];
|
||||||
@@ -442,19 +413,6 @@ class ExtHostCommentController implements vscode.CommentController {
|
|||||||
private _threads: Map<number, ExtHostCommentThread> = new Map<number, ExtHostCommentThread>();
|
private _threads: Map<number, ExtHostCommentThread> = new Map<number, ExtHostCommentThread>();
|
||||||
commentingRangeProvider?: vscode.CommentingRangeProvider;
|
commentingRangeProvider?: vscode.CommentingRangeProvider;
|
||||||
|
|
||||||
private _commentReactionProvider?: vscode.CommentReactionProvider;
|
|
||||||
|
|
||||||
get reactionProvider(): vscode.CommentReactionProvider | undefined {
|
|
||||||
return this._commentReactionProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
set reactionProvider(provider: vscode.CommentReactionProvider | undefined) {
|
|
||||||
this._commentReactionProvider = provider;
|
|
||||||
if (provider) {
|
|
||||||
this._proxy.$updateCommentControllerFeatures(this.handle, { reactionGroup: provider.availableReactions.map(reaction => convertToReaction(provider, reaction)) });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private _reactionHandler?: ReactionHandler;
|
private _reactionHandler?: ReactionHandler;
|
||||||
|
|
||||||
get reactionHandler(): ReactionHandler | undefined {
|
get reactionHandler(): ReactionHandler | undefined {
|
||||||
@@ -537,7 +495,6 @@ function convertToModeComment(thread: ExtHostCommentThread, commentController: E
|
|||||||
const iconPath = vscodeComment.author && vscodeComment.author.iconPath ? vscodeComment.author.iconPath.toString() : undefined;
|
const iconPath = vscodeComment.author && vscodeComment.author.iconPath ? vscodeComment.author.iconPath.toString() : undefined;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
commentId: vscodeComment.commentId,
|
|
||||||
mode: vscodeComment.mode,
|
mode: vscodeComment.mode,
|
||||||
contextValue: vscodeComment.contextValue,
|
contextValue: vscodeComment.contextValue,
|
||||||
uniqueIdInThread: commentUniqueId,
|
uniqueIdInThread: commentUniqueId,
|
||||||
@@ -545,17 +502,16 @@ function convertToModeComment(thread: ExtHostCommentThread, commentController: E
|
|||||||
userName: vscodeComment.author.name,
|
userName: vscodeComment.author.name,
|
||||||
userIconPath: iconPath,
|
userIconPath: iconPath,
|
||||||
label: vscodeComment.label,
|
label: vscodeComment.label,
|
||||||
commentReactions: vscodeComment.reactions ? vscodeComment.reactions.map(reaction => convertToReaction(commentController.reactionProvider, reaction)) : undefined
|
commentReactions: vscodeComment.reactions ? vscodeComment.reactions.map(reaction => convertToReaction(reaction)) : undefined
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertToReaction(provider: vscode.CommentReactionProvider | undefined, reaction: vscode.CommentReaction): modes.CommentReaction {
|
function convertToReaction(reaction: vscode.CommentReaction): modes.CommentReaction {
|
||||||
return {
|
return {
|
||||||
label: reaction.label,
|
label: reaction.label,
|
||||||
iconPath: reaction.iconPath ? extHostTypeConverter.pathOrURIToURI(reaction.iconPath) : undefined,
|
iconPath: reaction.iconPath ? extHostTypeConverter.pathOrURIToURI(reaction.iconPath) : undefined,
|
||||||
count: reaction.count,
|
count: reaction.count,
|
||||||
hasReacted: reaction.hasReacted,
|
hasReacted: reaction.authorHasReacted,
|
||||||
canEdit: provider !== undefined ? !!provider.toggleReaction : false
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,7 +520,6 @@ function convertFromReaction(reaction: modes.CommentReaction): vscode.CommentRea
|
|||||||
label: reaction.label || '',
|
label: reaction.label || '',
|
||||||
count: reaction.count || 0,
|
count: reaction.count || 0,
|
||||||
iconPath: reaction.iconPath ? URI.revive(reaction.iconPath) : '',
|
iconPath: reaction.iconPath ? URI.revive(reaction.iconPath) : '',
|
||||||
hasReacted: reaction.hasReacted,
|
|
||||||
authorHasReacted: reaction.hasReacted || false
|
authorHasReacted: reaction.hasReacted || false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export interface OpenCommandPipeArgs {
|
|||||||
forceNewWindow?: boolean;
|
forceNewWindow?: boolean;
|
||||||
diffMode?: boolean;
|
diffMode?: boolean;
|
||||||
addMode?: boolean;
|
addMode?: boolean;
|
||||||
|
gotoLineMode?: boolean;
|
||||||
forceReuseWindow?: boolean;
|
forceReuseWindow?: boolean;
|
||||||
waitMarkerFilePath?: string;
|
waitMarkerFilePath?: string;
|
||||||
}
|
}
|
||||||
@@ -93,7 +94,7 @@ export class CLIServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private open(data: OpenCommandPipeArgs, res: http.ServerResponse) {
|
private open(data: OpenCommandPipeArgs, res: http.ServerResponse) {
|
||||||
let { fileURIs, folderURIs, forceNewWindow, diffMode, addMode, forceReuseWindow, waitMarkerFilePath } = data;
|
let { fileURIs, folderURIs, forceNewWindow, diffMode, addMode, forceReuseWindow, gotoLineMode, waitMarkerFilePath } = data;
|
||||||
const urisToOpen: IURIToOpen[] = [];
|
const urisToOpen: IURIToOpen[] = [];
|
||||||
if (Array.isArray(folderURIs)) {
|
if (Array.isArray(folderURIs)) {
|
||||||
for (const s of folderURIs) {
|
for (const s of folderURIs) {
|
||||||
@@ -125,7 +126,7 @@ export class CLIServer {
|
|||||||
}
|
}
|
||||||
if (urisToOpen.length) {
|
if (urisToOpen.length) {
|
||||||
const waitMarkerFileURI = waitMarkerFilePath ? URI.file(waitMarkerFilePath) : undefined;
|
const waitMarkerFileURI = waitMarkerFilePath ? URI.file(waitMarkerFilePath) : undefined;
|
||||||
const windowOpenArgs: IOpenSettings = { forceNewWindow, diffMode, addMode, forceReuseWindow, waitMarkerFileURI };
|
const windowOpenArgs: IOpenSettings = { forceNewWindow, diffMode, addMode, gotoLineMode, forceReuseWindow, waitMarkerFileURI };
|
||||||
this._commands.executeCommand('_files.windowOpen', urisToOpen, windowOpenArgs);
|
this._commands.executeCommand('_files.windowOpen', urisToOpen, windowOpenArgs);
|
||||||
}
|
}
|
||||||
res.writeHead(200);
|
res.writeHead(200);
|
||||||
|
|||||||
@@ -231,23 +231,19 @@ export class OpenNodeModuleFactory implements INodeModuleFactory {
|
|||||||
if (!this._extensionId) {
|
if (!this._extensionId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* __GDPR__
|
type ShimmingOpenClassification = {
|
||||||
"shimming.open" : {
|
extension: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
|
||||||
"extension": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
};
|
||||||
}
|
this._mainThreadTelemerty.$publicLog2<{ extension: string }, ShimmingOpenClassification>('shimming.open', { extension: this._extensionId });
|
||||||
*/
|
|
||||||
this._mainThreadTelemerty.$publicLog('shimming.open', { extension: this._extensionId });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private sendNoForwardTelemetry(): void {
|
private sendNoForwardTelemetry(): void {
|
||||||
if (!this._extensionId) {
|
if (!this._extensionId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* __GDPR__
|
type ShimmingOpenCallNoForwardClassification = {
|
||||||
"shimming.open.call.noForward" : {
|
extension: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
|
||||||
"extension": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
};
|
||||||
}
|
this._mainThreadTelemerty.$publicLog2<{ extension: string }, ShimmingOpenCallNoForwardClassification>('shimming.open.call.noForward', { extension: this._extensionId });
|
||||||
*/
|
|
||||||
this._mainThreadTelemerty.$publicLog('shimming.open.call.noForward', { extension: this._extensionId });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-beak:before {
|
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-beak:before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 11px;
|
left: calc(50% - 8px); /* 3px (margin) + 5px (padding) = 8px */
|
||||||
top: -5px;
|
top: -5px;
|
||||||
border-bottom-width: 5px;
|
border-bottom-width: 5px;
|
||||||
border-bottom-style: solid;
|
border-bottom-style: solid;
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
|
|||||||
// tslint:disable-next-line: import-patterns no-standalone-editor
|
// tslint:disable-next-line: import-patterns no-standalone-editor
|
||||||
import { IDownloadService } from 'vs/platform/download/common/download';
|
import { IDownloadService } from 'vs/platform/download/common/download';
|
||||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||||
import { IGalleryExtension, IExtensionIdentifier, IReportedExtension, IExtensionManagementService, ILocalExtension, IGalleryMetadata, IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation, IExtensionEnablementService, EnablementState } from 'vs/platform/extensionManagement/common/extensionManagement';
|
import { IGalleryExtension, IExtensionIdentifier, IReportedExtension, IExtensionManagementService, ILocalExtension, IGalleryMetadata } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||||
import { ExtensionType, ExtensionIdentifier, IExtension } from 'vs/platform/extensions/common/extensions';
|
import { IExtensionTipsService, ExtensionRecommendationReason, IExtensionRecommendation } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||||
|
import { ExtensionType, ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
|
||||||
import { IURLHandler, IURLService } from 'vs/platform/url/common/url';
|
import { IURLHandler, IURLService } from 'vs/platform/url/common/url';
|
||||||
import { ITelemetryService, ITelemetryData, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry';
|
|
||||||
import { ConsoleLogService, ILogService } from 'vs/platform/log/common/log';
|
import { ConsoleLogService, ILogService } from 'vs/platform/log/common/log';
|
||||||
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||||
@@ -25,10 +25,8 @@ import { IRecentlyOpened, IRecent, isRecentFile, isRecentFolder } from 'vs/platf
|
|||||||
import { ISerializableCommandAction } from 'vs/platform/actions/common/actions';
|
import { ISerializableCommandAction } from 'vs/platform/actions/common/actions';
|
||||||
import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing';
|
import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing';
|
||||||
import { ITunnelService } from 'vs/platform/remote/common/tunnel';
|
import { ITunnelService } from 'vs/platform/remote/common/tunnel';
|
||||||
import { IReloadSessionEvent, IExtensionHostDebugService, ICloseSessionEvent, IAttachSessionEvent, ILogToSessionEvent, ITerminateSessionEvent } from 'vs/workbench/services/extensions/common/extensionHostDebug';
|
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||||
import { IRemoteConsoleLog } from 'vs/base/common/console';
|
|
||||||
// tslint:disable-next-line: import-patterns
|
// tslint:disable-next-line: import-patterns
|
||||||
import { IExtensionsWorkbenchService, IExtension as IExtension2 } from 'vs/workbench/contrib/extensions/common/extensions';
|
|
||||||
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
|
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
|
||||||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||||
import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService';
|
import { IEditorService, IResourceEditor } from 'vs/workbench/services/editor/common/editorService';
|
||||||
@@ -36,11 +34,12 @@ import { pathsToEditors } from 'vs/workbench/common/editor';
|
|||||||
import { IFileService } from 'vs/platform/files/common/files';
|
import { IFileService } from 'vs/platform/files/common/files';
|
||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||||
import { ClassifiedEvent, StrictPropertyCheck, GDPRClassification } from 'vs/platform/telemetry/common/gdprTypings';
|
|
||||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||||
import { toStoreData, restoreRecentlyOpened } from 'vs/platform/history/common/historyStorage';
|
import { toStoreData, restoreRecentlyOpened } from 'vs/platform/history/common/historyStorage';
|
||||||
|
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
|
||||||
// tslint:disable-next-line: import-patterns
|
// tslint:disable-next-line: import-patterns
|
||||||
import { IExperimentService, IExperiment, ExperimentActionType, ExperimentState } from 'vs/workbench/contrib/experiments/common/experimentService';
|
import { IExperimentService, IExperiment, ExperimentActionType, ExperimentState } from 'vs/workbench/contrib/experiments/common/experimentService';
|
||||||
|
import { ExtensionHostDebugChannelClient, ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc';
|
||||||
|
|
||||||
//#region Download
|
//#region Download
|
||||||
|
|
||||||
@@ -58,62 +57,6 @@ registerSingleton(IDownloadService, SimpleDownloadService, true);
|
|||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#endregion IExtensionsWorkbenchService
|
|
||||||
export class SimpleExtensionsWorkbenchService implements IExtensionsWorkbenchService {
|
|
||||||
_serviceBrand: any;
|
|
||||||
onChange: Event<IExtension2 | undefined>;
|
|
||||||
local: IExtension2[];
|
|
||||||
installed: IExtension2[];
|
|
||||||
outdated: IExtension2[];
|
|
||||||
queryLocal: any;
|
|
||||||
queryGallery: any;
|
|
||||||
canInstall: any;
|
|
||||||
install: any;
|
|
||||||
uninstall: any;
|
|
||||||
installVersion: any;
|
|
||||||
reinstall: any;
|
|
||||||
setEnablement: any;
|
|
||||||
open: any;
|
|
||||||
checkForUpdates: any;
|
|
||||||
allowedBadgeProviders: string[];
|
|
||||||
}
|
|
||||||
registerSingleton(IExtensionsWorkbenchService, SimpleExtensionsWorkbenchService, true);
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//#region Extension Management
|
|
||||||
|
|
||||||
//#region Extension Enablement
|
|
||||||
|
|
||||||
export class SimpleExtensionEnablementService implements IExtensionEnablementService {
|
|
||||||
|
|
||||||
_serviceBrand: any;
|
|
||||||
|
|
||||||
readonly onEnablementChanged = Event.None;
|
|
||||||
|
|
||||||
readonly allUserExtensionsDisabled = false;
|
|
||||||
|
|
||||||
getEnablementState(extension: IExtension): EnablementState {
|
|
||||||
return EnablementState.Enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
canChangeEnablement(extension: IExtension): boolean {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
setEnablement(extensions: IExtension[], newState: EnablementState): Promise<boolean[]> {
|
|
||||||
throw new Error('not implemented');
|
|
||||||
}
|
|
||||||
|
|
||||||
isEnabled(extension: IExtension): boolean {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
registerSingleton(IExtensionEnablementService, SimpleExtensionEnablementService, true);
|
|
||||||
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//#region Extension Tips
|
//#region Extension Tips
|
||||||
|
|
||||||
export class SimpleExtensionTipsService implements IExtensionTipsService {
|
export class SimpleExtensionTipsService implements IExtensionTipsService {
|
||||||
@@ -145,7 +88,7 @@ export class SimpleExtensionTipsService implements IExtensionTipsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getAllIgnoredRecommendations(): { global: string[]; workspace: string[]; } {
|
getAllIgnoredRecommendations(): { global: string[]; workspace: string[]; } {
|
||||||
return Object.create(null);
|
return { global: [], workspace: [] };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,38 +239,6 @@ export class SimpleMultiExtensionsManagementService implements IExtensionManagem
|
|||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Telemetry
|
|
||||||
|
|
||||||
export class SimpleTelemetryService implements ITelemetryService {
|
|
||||||
|
|
||||||
_serviceBrand: undefined;
|
|
||||||
|
|
||||||
isOptedIn: true;
|
|
||||||
|
|
||||||
publicLog(eventName: string, data?: ITelemetryData) {
|
|
||||||
return Promise.resolve(undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
publicLog2<E extends ClassifiedEvent<T> = never, T extends GDPRClassification<T> = never>(eventName: string, data?: StrictPropertyCheck<T, E>) {
|
|
||||||
return this.publicLog(eventName, data as ITelemetryData);
|
|
||||||
}
|
|
||||||
|
|
||||||
setEnabled(value: boolean): void {
|
|
||||||
}
|
|
||||||
|
|
||||||
getTelemetryInfo(): Promise<ITelemetryInfo> {
|
|
||||||
return Promise.resolve({
|
|
||||||
instanceId: 'someValue.instanceId',
|
|
||||||
sessionId: 'someValue.sessionId',
|
|
||||||
machineId: 'someValue.machineId'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
registerSingleton(ITelemetryService, SimpleTelemetryService);
|
|
||||||
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//#region Update
|
//#region Update
|
||||||
|
|
||||||
export class SimpleUpdateService implements IUpdateService {
|
export class SimpleUpdateService implements IUpdateService {
|
||||||
@@ -669,23 +580,19 @@ registerSingleton(IWindowService, SimpleWindowService);
|
|||||||
|
|
||||||
//#region ExtensionHostDebugService
|
//#region ExtensionHostDebugService
|
||||||
|
|
||||||
export class SimpleExtensionHostDebugService implements IExtensionHostDebugService {
|
export class SimpleExtensionHostDebugService extends ExtensionHostDebugChannelClient {
|
||||||
_serviceBrand: any;
|
|
||||||
|
|
||||||
reload(sessionId: string): void { }
|
constructor(
|
||||||
onReload: Event<IReloadSessionEvent> = Event.None;
|
@IRemoteAgentService remoteAgentService: IRemoteAgentService
|
||||||
|
) {
|
||||||
|
const connection = remoteAgentService.getConnection();
|
||||||
|
|
||||||
close(sessionId: string): void { }
|
if (!connection) {
|
||||||
onClose: Event<ICloseSessionEvent> = Event.None;
|
throw new Error('Missing agent connection');
|
||||||
|
}
|
||||||
|
|
||||||
attachSession(sessionId: string, port: number, subId?: string): void { }
|
super(connection.getChannel(ExtensionHostDebugBroadcastChannel.ChannelName));
|
||||||
onAttachSession: Event<IAttachSessionEvent> = Event.None;
|
}
|
||||||
|
|
||||||
logToSession(sessionId: string, log: IRemoteConsoleLog): void { }
|
|
||||||
onLogToSession: Event<ILogToSessionEvent> = Event.None;
|
|
||||||
|
|
||||||
terminateSession(sessionId: string, subId?: string): void { }
|
|
||||||
onTerminateSession: Event<ITerminateSessionEvent> = Event.None;
|
|
||||||
}
|
}
|
||||||
registerSingleton(IExtensionHostDebugService, SimpleExtensionHostDebugService);
|
registerSingleton(IExtensionHostDebugService, SimpleExtensionHostDebugService);
|
||||||
|
|
||||||
@@ -830,6 +737,53 @@ export class SimpleWindowsService implements IWindowsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise<void> {
|
openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise<void> {
|
||||||
|
|
||||||
|
// we pass the "ParsedArgs" as query parameters of the URL
|
||||||
|
|
||||||
|
let newAddress = `${document.location.origin}/?`;
|
||||||
|
|
||||||
|
const f = args['folder-uri'];
|
||||||
|
if (f) {
|
||||||
|
let u: URI | undefined;
|
||||||
|
if (Array.isArray(f)) {
|
||||||
|
if (f.length > 0) {
|
||||||
|
u = URI.parse(f[0]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
u = URI.parse(f);
|
||||||
|
}
|
||||||
|
if (u) {
|
||||||
|
newAddress += `folder=${encodeURIComponent(u.path)}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const ep = args['extensionDevelopmentPath'];
|
||||||
|
if (ep) {
|
||||||
|
let u: string | undefined;
|
||||||
|
if (Array.isArray(ep)) {
|
||||||
|
if (ep.length > 0) {
|
||||||
|
u = ep[0];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
u = ep;
|
||||||
|
}
|
||||||
|
if (u) {
|
||||||
|
newAddress += `&edp=${encodeURIComponent(u)}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const di = args['debugId'];
|
||||||
|
if (di) {
|
||||||
|
newAddress += `&di=${encodeURIComponent(di)}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const ibe = args['inspect-brk-extensions'];
|
||||||
|
if (ibe) {
|
||||||
|
newAddress += `&ibe=${encodeURIComponent(ibe)}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.open(newAddress);
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ export class CommentNode extends Disposable {
|
|||||||
secondaryActions.push(...secondary);
|
secondaryActions.push(...secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actions.length) {
|
if (actions.length || secondaryActions.length) {
|
||||||
this.toolbar = new ToolBar(this._actionsToolbarContainer, this.contextMenuService, {
|
this.toolbar = new ToolBar(this._actionsToolbarContainer, this.contextMenuService, {
|
||||||
actionViewItemProvider: action => {
|
actionViewItemProvider: action => {
|
||||||
if (action.id === ToggleReactionsAction.ID) {
|
if (action.id === ToggleReactionsAction.ID) {
|
||||||
@@ -318,18 +318,18 @@ export class CommentNode extends Disposable {
|
|||||||
let toggleReactionAction = this.createReactionPicker2(this.comment.commentReactions || []);
|
let toggleReactionAction = this.createReactionPicker2(this.comment.commentReactions || []);
|
||||||
this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true });
|
this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true });
|
||||||
} else {
|
} else {
|
||||||
let reactionGroup = this.commentService.getReactionGroup(this.owner);
|
// let reactionGroup = this.commentService.getReactionGroup(this.owner);
|
||||||
if (reactionGroup && reactionGroup.length) {
|
// if (reactionGroup && reactionGroup.length) {
|
||||||
let toggleReactionAction = this.createReactionPicker2(reactionGroup || []);
|
// let toggleReactionAction = this.createReactionPicker2(reactionGroup || []);
|
||||||
this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true });
|
// this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private createCommentEditor(): void {
|
private createCommentEditor(): void {
|
||||||
const container = dom.append(this._commentEditContainer, dom.$('.edit-textarea'));
|
const container = dom.append(this._commentEditContainer, dom.$('.edit-textarea'));
|
||||||
this._commentEditor = this.instantiationService.createInstance(SimpleCommentEditor, container, SimpleCommentEditor.getEditorOptions(), this.parentEditor, this.parentThread);
|
this._commentEditor = this.instantiationService.createInstance(SimpleCommentEditor, container, SimpleCommentEditor.getEditorOptions(), this.parentEditor, this.parentThread);
|
||||||
const resource = URI.parse(`comment:commentinput-${this.comment.commentId}-${Date.now()}.md`);
|
const resource = URI.parse(`comment:commentinput-${this.comment.uniqueIdInThread}-${Date.now()}.md`);
|
||||||
this._commentEditorModel = this.modelService.createModel('', this.modeService.createByFilepathOrFirstLine(resource), resource, false);
|
this._commentEditorModel = this.modelService.createModel('', this.modeService.createByFilepathOrFirstLine(resource), resource, false);
|
||||||
|
|
||||||
this._commentEditor.setModel(this._commentEditorModel);
|
this._commentEditor.setModel(this._commentEditorModel);
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ export interface ICommentService {
|
|||||||
disposeCommentThread(ownerId: string, threadId: string): void;
|
disposeCommentThread(ownerId: string, threadId: string): void;
|
||||||
getComments(resource: URI): Promise<(ICommentInfo | null)[]>;
|
getComments(resource: URI): Promise<(ICommentInfo | null)[]>;
|
||||||
getCommentingRanges(resource: URI): Promise<IRange[]>;
|
getCommentingRanges(resource: URI): Promise<IRange[]>;
|
||||||
getReactionGroup(owner: string): CommentReaction[] | undefined;
|
|
||||||
hasReactionHandler(owner: string): boolean;
|
hasReactionHandler(owner: string): boolean;
|
||||||
toggleReaction(owner: string, resource: URI, thread: CommentThread, comment: Comment, reaction: CommentReaction): Promise<void>;
|
toggleReaction(owner: string, resource: URI, thread: CommentThread, comment: Comment, reaction: CommentReaction): Promise<void>;
|
||||||
setActiveCommentThread(commentThread: CommentThread | null): void;
|
setActiveCommentThread(commentThread: CommentThread | null): void;
|
||||||
@@ -183,22 +182,6 @@ export class CommentService extends Disposable implements ICommentService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getReactionGroup(owner: string): CommentReaction[] | undefined {
|
|
||||||
const commentProvider = this._commentControls.get(owner);
|
|
||||||
|
|
||||||
if (commentProvider) {
|
|
||||||
return commentProvider.getReactionGroup();
|
|
||||||
}
|
|
||||||
|
|
||||||
const commentController = this._commentControls.get(owner);
|
|
||||||
|
|
||||||
if (commentController) {
|
|
||||||
return commentController.getReactionGroup();
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
hasReactionHandler(owner: string): boolean {
|
hasReactionHandler(owner: string): boolean {
|
||||||
const commentProvider = this._commentControls.get(owner);
|
const commentProvider = this._commentControls.get(owner);
|
||||||
|
|
||||||
|
|||||||
@@ -161,14 +161,14 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
|
|||||||
// we don't do anything here as we always do the reveal ourselves.
|
// we don't do anything here as we always do the reveal ourselves.
|
||||||
}
|
}
|
||||||
|
|
||||||
public reveal(commentId?: string) {
|
public reveal(commentUniqueId?: number) {
|
||||||
if (!this._isExpanded) {
|
if (!this._isExpanded) {
|
||||||
this.show({ lineNumber: this._commentThread.range.startLineNumber, column: 1 }, 2);
|
this.show({ lineNumber: this._commentThread.range.startLineNumber, column: 1 }, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commentId) {
|
if (commentUniqueId !== undefined) {
|
||||||
let height = this.editor.getLayoutInfo().height;
|
let height = this.editor.getLayoutInfo().height;
|
||||||
let matchedNode = this._commentElements.filter(commentNode => commentNode.comment.commentId === commentId);
|
let matchedNode = this._commentElements.filter(commentNode => commentNode.comment.uniqueIdInThread === commentUniqueId);
|
||||||
if (matchedNode && matchedNode.length) {
|
if (matchedNode && matchedNode.length) {
|
||||||
const commentThreadCoords = dom.getDomNodePagePosition(this._commentElements[0].domNode);
|
const commentThreadCoords = dom.getDomNodePagePosition(this._commentElements[0].domNode);
|
||||||
const commentCoords = dom.getDomNodePagePosition(matchedNode[0].domNode);
|
const commentCoords = dom.getDomNodePagePosition(matchedNode[0].domNode);
|
||||||
@@ -247,9 +247,14 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
|
|||||||
this._actionbarWidget.push([...groups, this._collapseAction], { label: false, icon: true });
|
this._actionbarWidget.push([...groups, this._collapseAction], { label: false, icon: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private deleteCommentThread(): void {
|
||||||
|
this.dispose();
|
||||||
|
this.commentService.disposeCommentThread(this.owner, this._commentThread.threadId);
|
||||||
|
}
|
||||||
|
|
||||||
public collapse(): Promise<void> {
|
public collapse(): Promise<void> {
|
||||||
if (this._commentThread.comments && this._commentThread.comments.length === 0) {
|
if (this._commentThread.comments && this._commentThread.comments.length === 0) {
|
||||||
this.dispose();
|
this.deleteCommentThread();
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,7 +273,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
|
|||||||
if (this._isExpanded) {
|
if (this._isExpanded) {
|
||||||
this.hide();
|
this.hide();
|
||||||
if (!this._commentThread.comments || !this._commentThread.comments.length) {
|
if (!this._commentThread.comments || !this._commentThread.comments.length) {
|
||||||
this.dispose();
|
this.deleteCommentThread();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.show({ lineNumber: lineNumber, column: 1 }, 2);
|
this.show({ lineNumber: lineNumber, column: 1 }, 2);
|
||||||
@@ -284,7 +289,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
|
|||||||
let commentElementsToDelIndex: number[] = [];
|
let commentElementsToDelIndex: number[] = [];
|
||||||
for (let i = 0; i < oldCommentsLen; i++) {
|
for (let i = 0; i < oldCommentsLen; i++) {
|
||||||
let comment = this._commentElements[i].comment;
|
let comment = this._commentElements[i].comment;
|
||||||
let newComment = commentThread.comments ? commentThread.comments.filter(c => c.commentId === comment.commentId) : [];
|
let newComment = commentThread.comments ? commentThread.comments.filter(c => c.uniqueIdInThread === comment.uniqueIdInThread) : [];
|
||||||
|
|
||||||
if (newComment.length) {
|
if (newComment.length) {
|
||||||
this._commentElements[i].update(newComment[0]);
|
this._commentElements[i].update(newComment[0]);
|
||||||
@@ -304,7 +309,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
|
|||||||
let newCommentNodeList: CommentNode[] = [];
|
let newCommentNodeList: CommentNode[] = [];
|
||||||
for (let i = newCommentsLen - 1; i >= 0; i--) {
|
for (let i = newCommentsLen - 1; i >= 0; i--) {
|
||||||
let currentComment = commentThread.comments![i];
|
let currentComment = commentThread.comments![i];
|
||||||
let oldCommentNode = this._commentElements.filter(commentNode => commentNode.comment.commentId === currentComment.commentId);
|
let oldCommentNode = this._commentElements.filter(commentNode => commentNode.comment.uniqueIdInThread === currentComment.uniqueIdInThread);
|
||||||
if (oldCommentNode.length) {
|
if (oldCommentNode.length) {
|
||||||
oldCommentNode[0].update(currentComment);
|
oldCommentNode[0].update(currentComment);
|
||||||
lastCommentElement = oldCommentNode[0].domNode;
|
lastCommentElement = oldCommentNode[0].domNode;
|
||||||
@@ -601,13 +606,13 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
|
|||||||
|
|
||||||
this._disposables.add(newCommentNode);
|
this._disposables.add(newCommentNode);
|
||||||
this._disposables.add(newCommentNode.onDidDelete(deletedNode => {
|
this._disposables.add(newCommentNode.onDidDelete(deletedNode => {
|
||||||
const deletedNodeId = deletedNode.comment.commentId;
|
const deletedNodeId = deletedNode.comment.uniqueIdInThread;
|
||||||
const deletedElementIndex = arrays.firstIndex(this._commentElements, commentNode => commentNode.comment.commentId === deletedNodeId);
|
const deletedElementIndex = arrays.firstIndex(this._commentElements, commentNode => commentNode.comment.uniqueIdInThread === deletedNodeId);
|
||||||
if (deletedElementIndex > -1) {
|
if (deletedElementIndex > -1) {
|
||||||
this._commentElements.splice(deletedElementIndex, 1);
|
this._commentElements.splice(deletedElementIndex, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const deletedCommentIndex = arrays.firstIndex(this._commentThread.comments!, comment => comment.commentId === deletedNodeId);
|
const deletedCommentIndex = arrays.firstIndex(this._commentThread.comments!, comment => comment.uniqueIdInThread === deletedNodeId);
|
||||||
if (deletedCommentIndex > -1) {
|
if (deletedCommentIndex > -1) {
|
||||||
this._commentThread.comments!.splice(deletedCommentIndex, 1);
|
this._commentThread.comments!.splice(deletedCommentIndex, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -247,18 +247,18 @@ export class ReviewController implements IEditorContribution {
|
|||||||
return editor.getContribution<ReviewController>(ID);
|
return editor.getContribution<ReviewController>(ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public revealCommentThread(threadId: string, commentId: string, fetchOnceIfNotExist: boolean): void {
|
public revealCommentThread(threadId: string, commentUniqueId: number, fetchOnceIfNotExist: boolean): void {
|
||||||
const commentThreadWidget = this._commentWidgets.filter(widget => widget.commentThread.threadId === threadId);
|
const commentThreadWidget = this._commentWidgets.filter(widget => widget.commentThread.threadId === threadId);
|
||||||
if (commentThreadWidget.length === 1) {
|
if (commentThreadWidget.length === 1) {
|
||||||
commentThreadWidget[0].reveal(commentId);
|
commentThreadWidget[0].reveal(commentUniqueId);
|
||||||
} else if (fetchOnceIfNotExist) {
|
} else if (fetchOnceIfNotExist) {
|
||||||
if (this._computePromise) {
|
if (this._computePromise) {
|
||||||
this._computePromise.then(_ => {
|
this._computePromise.then(_ => {
|
||||||
this.revealCommentThread(threadId, commentId, false);
|
this.revealCommentThread(threadId, commentUniqueId, false);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.beginCompute().then(_ => {
|
this.beginCompute().then(_ => {
|
||||||
this.revealCommentThread(threadId, commentId, false);
|
this.revealCommentThread(threadId, commentUniqueId, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ export class CommentsPanel extends Panel {
|
|||||||
let currentActiveResource = activeEditor ? activeEditor.getResource() : undefined;
|
let currentActiveResource = activeEditor ? activeEditor.getResource() : undefined;
|
||||||
if (currentActiveResource && currentActiveResource.toString() === element.resource.toString()) {
|
if (currentActiveResource && currentActiveResource.toString() === element.resource.toString()) {
|
||||||
const threadToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].threadId : element.threadId;
|
const threadToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].threadId : element.threadId;
|
||||||
const commentToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].comment.commentId : element.comment.commentId;
|
const commentToReveal = element instanceof ResourceWithCommentThreads ? element.commentThreads[0].comment.uniqueIdInThread : element.comment.uniqueIdInThread;
|
||||||
const control = this.editorService.activeTextEditorWidget;
|
const control = this.editorService.activeTextEditorWidget;
|
||||||
if (threadToReveal && isCodeEditor(control)) {
|
if (threadToReveal && isCodeEditor(control)) {
|
||||||
const controller = ReviewController.get(control);
|
const controller = ReviewController.get(control);
|
||||||
@@ -200,7 +200,7 @@ export class CommentsPanel extends Panel {
|
|||||||
const control = editor.getControl();
|
const control = editor.getControl();
|
||||||
if (threadToReveal && isCodeEditor(control)) {
|
if (threadToReveal && isCodeEditor(control)) {
|
||||||
const controller = ReviewController.get(control);
|
const controller = ReviewController.get(control);
|
||||||
controller.revealCommentThread(threadToReveal, commentToReveal.commentId, true);
|
controller.revealCommentThread(threadToReveal, commentToReveal.uniqueIdInThread, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export class CommentsDataSource implements IDataSource {
|
|||||||
return element.id;
|
return element.id;
|
||||||
}
|
}
|
||||||
if (element instanceof CommentNode) {
|
if (element instanceof CommentNode) {
|
||||||
return `${element.resource.toString()}-${element.comment.commentId}`;
|
return `${element.resource.toString()}-${element.comment.uniqueIdInThread}`;
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 8.70714L11.6464 12.3536L12.3536 11.6465L8.70711 8.00004L12.3536 4.35359L11.6464 3.64648L8 7.29293L4.35355 3.64648L3.64645 4.35359L7.29289 8.00004L3.64645 11.6465L4.35355 12.3536L8 8.70714Z" fill="#C5C5C5"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 362 B |
@@ -1,3 +0,0 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 8.70714L11.6464 12.3536L12.3536 11.6465L8.70711 8.00004L12.3536 4.35359L11.6464 3.64648L8 7.29293L4.35355 3.64648L3.64645 4.35359L7.29289 8.00004L3.64645 11.6465L4.35355 12.3536L8 8.70714Z" fill="#C5C5C5"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 362 B |
@@ -1,3 +0,0 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 8.70714L11.6464 12.3536L12.3536 11.6465L8.70711 8.00004L12.3536 4.35359L11.6464 3.64648L8 7.29293L4.35355 3.64648L3.64645 4.35359L7.29289 8.00004L3.64645 11.6465L4.35355 12.3536L8 8.70714Z" fill="#424242"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 362 B |
@@ -1,4 +0,0 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.40706 15L1 13.5929L3.35721 9.46781L3.52339 9.25025L11.7736 1L13.2321 1L15 2.76791V4.22636L6.74975 12.4766L6.53219 12.6428L2.40706 15ZM2.40706 13.5929L6.02053 11.7474L14.2708 3.49714L12.5029 1.72923L4.25262 9.97947L2.40706 13.5929Z" fill="#C5C5C5"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.64645 12.3536L3.64645 10.3536L4.35355 9.64648L6.35355 11.6465L5.64645 12.3536Z" fill="#C5C5C5"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 553 B |
@@ -1,4 +0,0 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.40706 15L1 13.5929L3.35721 9.46781L3.52339 9.25025L11.7736 1L13.2321 1L15 2.76791V4.22636L6.74975 12.4766L6.53219 12.6428L2.40706 15ZM2.40706 13.5929L6.02053 11.7474L14.2708 3.49714L12.5029 1.72923L4.25262 9.97947L2.40706 13.5929Z" fill="white"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.64645 12.3536L3.64645 10.3536L4.35355 9.64648L6.35355 11.6465L5.64645 12.3536Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 549 B |
@@ -1,4 +0,0 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.40706 15L1 13.5929L3.35721 9.46781L3.52339 9.25025L11.7736 1L13.2321 1L15 2.76791V4.22636L6.74975 12.4766L6.53219 12.6428L2.40706 15ZM2.40706 13.5929L6.02053 11.7474L14.2708 3.49714L12.5029 1.72923L4.25262 9.97947L2.40706 13.5929Z" fill="#424242"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.64645 12.3536L3.64645 10.3536L4.35355 9.64648L6.35355 11.6465L5.64645 12.3536Z" fill="#424242"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 553 B |
@@ -29,10 +29,6 @@
|
|||||||
height: 21px;
|
height: 21px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.monaco-editor .review-widget .body .review-comment .comment-actions .action-item {
|
|
||||||
width: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.monaco-editor .review-widget .body .review-comment .comment-title {
|
.monaco-editor .review-widget .body .review-comment .comment-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -148,10 +144,6 @@
|
|||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.monaco-editor .review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.monaco-editor .review-widget .head .review-actions > .monaco-action-bar .icon.expand-review-action {
|
.monaco-editor .review-widget .head .review-actions > .monaco-action-bar .icon.expand-review-action {
|
||||||
background-image: url("./close-light.svg");
|
background-image: url("./close-light.svg");
|
||||||
background-size: 16px;
|
background-size: 16px;
|
||||||
@@ -165,32 +157,6 @@
|
|||||||
background-image: url("./close-hc.svg");
|
background-image: url("./close-hc.svg");
|
||||||
}
|
}
|
||||||
|
|
||||||
.monaco-editor .review-widget .body .review-comment .comment-title .icon.edit {
|
|
||||||
background-image: url("./edit-light.svg");
|
|
||||||
background-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.monaco-editor.vs-dark .review-widget .body .review-comment .comment-title .icon.edit {
|
|
||||||
background-image: url("./edit-dark.svg");
|
|
||||||
}
|
|
||||||
|
|
||||||
.monaco-editor.hc-black .review-widget .body .review-comment .comment-title .icon.edit {
|
|
||||||
background-image: url("./edit-hc.svg");
|
|
||||||
}
|
|
||||||
|
|
||||||
.monaco-editor .review-widget .body .review-comment .comment-title .icon.delete {
|
|
||||||
background-image: url("./delete-light.svg");
|
|
||||||
background-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.monaco-editor.vs-dark .review-widget .body .review-comment .comment-title .icon.delete {
|
|
||||||
background-image: url("./delete-dark.svg");
|
|
||||||
}
|
|
||||||
|
|
||||||
.monaco-editor.hc-black .review-widget .body .review-comment .comment-title .icon.delete {
|
|
||||||
background-image: url("./delete-hc.svg");
|
|
||||||
}
|
|
||||||
|
|
||||||
.monaco-editor .review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label.toolbar-toggle-pickReactions {
|
.monaco-editor .review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label.toolbar-toggle-pickReactions {
|
||||||
display: none;
|
display: none;
|
||||||
background-image: url("./reaction-light.svg");
|
background-image: url("./reaction-light.svg");
|
||||||
@@ -220,7 +186,6 @@
|
|||||||
display: block;
|
display: block;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
min-width: 28px;
|
|
||||||
background-size: 16px;
|
background-size: 16px;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
@@ -433,7 +398,8 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.monaco-editor .review-widget .head .review-actions > .monaco-action-bar .action-item {
|
.monaco-editor .review-widget .action-item {
|
||||||
|
min-width: 16px;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import { IDebugService, State, IDebugSession, CONTEXT_DEBUG_TYPE, CONTEXT_DEBUG_
|
|||||||
import { isExtensionHostDebugging } from 'vs/workbench/contrib/debug/common/debugUtils';
|
import { isExtensionHostDebugging } from 'vs/workbench/contrib/debug/common/debugUtils';
|
||||||
import { isErrorWithActions, createErrorWithActions } from 'vs/base/common/errorsWithActions';
|
import { isErrorWithActions, createErrorWithActions } from 'vs/base/common/errorsWithActions';
|
||||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||||
import { IExtensionHostDebugService } from 'vs/workbench/services/extensions/common/extensionHostDebug';
|
import { IExtensionHostDebugService } from 'vs/platform/debug/common/extensionHostDebug';
|
||||||
import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
|
import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||||
|
|
||||||
const DEBUG_BREAKPOINTS_KEY = 'debug.breakpoint';
|
const DEBUG_BREAKPOINTS_KEY = 'debug.breakpoint';
|
||||||
|
|||||||
@@ -220,12 +220,10 @@ export class ExperimentService extends Disposable implements IExperimentService
|
|||||||
|
|
||||||
});
|
});
|
||||||
return Promise.all(promises).then(() => {
|
return Promise.all(promises).then(() => {
|
||||||
/* __GDPR__
|
type ExperimentsClassification = {
|
||||||
"experiments" : {
|
experiments: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
|
||||||
"experiments" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
};
|
||||||
}
|
this.telemetryService.publicLog2<{ experiments: IExperiment[] }, ExperimentsClassification>('experiments', { experiments: this._experiments });
|
||||||
*/
|
|
||||||
this.telemetryService.publicLog('experiments', { experiments: this._experiments });
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -10,9 +10,9 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/
|
|||||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||||
import { TestLifecycleService } from 'vs/workbench/test/workbenchTestServices';
|
import { TestLifecycleService } from 'vs/workbench/test/workbenchTestServices';
|
||||||
import {
|
import {
|
||||||
IExtensionManagementService, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier,
|
IExtensionManagementService, DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, ILocalExtension
|
||||||
IExtensionEnablementService, ILocalExtension
|
|
||||||
} from 'vs/platform/extensionManagement/common/extensionManagement';
|
} from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||||
|
import { IExtensionEnablementService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||||
import { Emitter } from 'vs/base/common/event';
|
import { Emitter } from 'vs/base/common/event';
|
||||||
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
|
|||||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
import { IExtensionTipsService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||||
import { IExtensionManifest, IKeyBinding, IView, IViewContainer, ExtensionType } from 'vs/platform/extensions/common/extensions';
|
import { IExtensionManifest, IKeyBinding, IView, IViewContainer, ExtensionType } from 'vs/platform/extensions/common/extensions';
|
||||||
import { ResolvedKeybinding, KeyMod, KeyCode } from 'vs/base/common/keyCodes';
|
import { ResolvedKeybinding, KeyMod, KeyCode } from 'vs/base/common/keyCodes';
|
||||||
import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput';
|
import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput';
|
||||||
@@ -498,6 +498,13 @@ export class ExtensionEditor extends BaseEditor {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clearInput(): void {
|
||||||
|
this.contentDisposables.clear();
|
||||||
|
this.transientDisposables.clear();
|
||||||
|
|
||||||
|
super.clearInput();
|
||||||
|
}
|
||||||
|
|
||||||
focus(): void {
|
focus(): void {
|
||||||
if (this.activeElement) {
|
if (this.activeElement) {
|
||||||
this.activeElement.focus();
|
this.activeElement.focus();
|
||||||
@@ -621,8 +628,7 @@ export class ExtensionEditor extends BaseEditor {
|
|||||||
this.renderViewContainers(content, manifest, layout),
|
this.renderViewContainers(content, manifest, layout),
|
||||||
this.renderViews(content, manifest, layout),
|
this.renderViews(content, manifest, layout),
|
||||||
this.renderLocalizations(content, manifest, layout),
|
this.renderLocalizations(content, manifest, layout),
|
||||||
// {{SQL CARBON EDIT}}
|
renderDashboardContributions(content, manifest, layout) // {{SQL CARBON EDIT}}
|
||||||
renderDashboardContributions(content, manifest, layout)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
scrollableContent.scanDomNode();
|
scrollableContent.scanDomNode();
|
||||||
@@ -860,7 +866,7 @@ export class ExtensionEditor extends BaseEditor {
|
|||||||
const contributes = manifest.contributes;
|
const contributes = manifest.contributes;
|
||||||
const colors = contributes && contributes.colors;
|
const colors = contributes && contributes.colors;
|
||||||
|
|
||||||
if (!colors || !colors.length) {
|
if (!(colors && colors.length)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -943,12 +949,12 @@ export class ExtensionEditor extends BaseEditor {
|
|||||||
menus[context].forEach(menu => {
|
menus[context].forEach(menu => {
|
||||||
let command = byId[menu.command];
|
let command = byId[menu.command];
|
||||||
|
|
||||||
if (!command) {
|
if (command) {
|
||||||
|
command.menus.push(context);
|
||||||
|
} else {
|
||||||
command = { id: menu.command, title: '', keybindings: [], menus: [context] };
|
command = { id: menu.command, title: '', keybindings: [], menus: [context] };
|
||||||
byId[command.id] = command;
|
byId[command.id] = command;
|
||||||
commands.push(command);
|
commands.push(command);
|
||||||
} else {
|
|
||||||
command.menus.push(context);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -964,12 +970,12 @@ export class ExtensionEditor extends BaseEditor {
|
|||||||
|
|
||||||
let command = byId[rawKeybinding.command];
|
let command = byId[rawKeybinding.command];
|
||||||
|
|
||||||
if (!command) {
|
if (command) {
|
||||||
|
command.keybindings.push(keybinding);
|
||||||
|
} else {
|
||||||
command = { id: rawKeybinding.command, title: '', keybindings: [keybinding], menus: [] };
|
command = { id: rawKeybinding.command, title: '', keybindings: [keybinding], menus: [] };
|
||||||
byId[command.id] = command;
|
byId[command.id] = command;
|
||||||
commands.push(command);
|
commands.push(command);
|
||||||
} else {
|
|
||||||
command.keybindings.push(keybinding);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1023,12 +1029,12 @@ export class ExtensionEditor extends BaseEditor {
|
|||||||
grammars.forEach(grammar => {
|
grammars.forEach(grammar => {
|
||||||
let language = byId[grammar.language];
|
let language = byId[grammar.language];
|
||||||
|
|
||||||
if (!language) {
|
if (language) {
|
||||||
|
language.hasGrammar = true;
|
||||||
|
} else {
|
||||||
language = { id: grammar.language, name: grammar.language, extensions: [], hasGrammar: true, hasSnippets: false };
|
language = { id: grammar.language, name: grammar.language, extensions: [], hasGrammar: true, hasSnippets: false };
|
||||||
byId[language.id] = language;
|
byId[language.id] = language;
|
||||||
languages.push(language);
|
languages.push(language);
|
||||||
} else {
|
|
||||||
language.hasGrammar = true;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1037,12 +1043,12 @@ export class ExtensionEditor extends BaseEditor {
|
|||||||
snippets.forEach(snippet => {
|
snippets.forEach(snippet => {
|
||||||
let language = byId[snippet.language];
|
let language = byId[snippet.language];
|
||||||
|
|
||||||
if (!language) {
|
if (language) {
|
||||||
|
language.hasSnippets = true;
|
||||||
|
} else {
|
||||||
language = { id: snippet.language, name: snippet.language, extensions: [], hasGrammar: false, hasSnippets: true };
|
language = { id: snippet.language, name: snippet.language, extensions: [], hasGrammar: false, hasSnippets: true };
|
||||||
byId[language.id] = language;
|
byId[language.id] = language;
|
||||||
languages.push(language);
|
languages.push(language);
|
||||||
} else {
|
|
||||||
language.hasSnippets = true;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1084,11 +1090,11 @@ export class ExtensionEditor extends BaseEditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const keyBinding = KeybindingParser.parseKeybinding(key || rawKeyBinding.key, OS);
|
const keyBinding = KeybindingParser.parseKeybinding(key || rawKeyBinding.key, OS);
|
||||||
if (!keyBinding) {
|
if (keyBinding) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.keybindingService.resolveKeybinding(keyBinding)[0];
|
return this.keybindingService.resolveKeybinding(keyBinding)[0];
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private loadContents<T>(loadingTask: () => CacheResult<T>): Promise<T> {
|
private loadContents<T>(loadingTask: () => CacheResult<T>): Promise<T> {
|
||||||
|
|||||||
@@ -0,0 +1,373 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import 'vs/css!./media/extensions';
|
||||||
|
import { localize } from 'vs/nls';
|
||||||
|
import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes';
|
||||||
|
import { Registry } from 'vs/platform/registry/common/platform';
|
||||||
|
import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions';
|
||||||
|
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||||
|
import { ExtensionsLabel, ExtensionsChannelId, PreferencesLabel, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||||
|
import { IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||||
|
import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actions';
|
||||||
|
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||||
|
import { IOutputChannelRegistry, Extensions as OutputExtensions } from 'vs/workbench/contrib/output/common/output';
|
||||||
|
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||||
|
import { VIEWLET_ID, IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||||
|
import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService';
|
||||||
|
import {
|
||||||
|
OpenExtensionsViewletAction, InstallExtensionsAction, ShowOutdatedExtensionsAction, ShowRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowPopularExtensionsAction,
|
||||||
|
ShowEnabledExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, ShowBuiltInExtensionsAction, UpdateAllAction,
|
||||||
|
EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowLanguageExtensionsAction, ShowAzureExtensionsAction, EnableAutoUpdateAction, DisableAutoUpdateAction, ConfigureRecommendedExtensionsCommandsContributor, OpenExtensionsFolderAction, InstallVSIXAction, ReinstallAction, InstallSpecificVersionOfExtensionAction
|
||||||
|
} from 'vs/workbench/contrib/extensions/browser/extensionsActions';
|
||||||
|
import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput';
|
||||||
|
import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor } from 'vs/workbench/browser/viewlet';
|
||||||
|
import { ExtensionEditor } from 'vs/workbench/contrib/extensions/browser/extensionEditor';
|
||||||
|
import { StatusUpdater, ExtensionsViewlet, MaliciousExtensionChecker, ExtensionsViewletViewsContribution } from 'vs/workbench/contrib/extensions/browser/extensionsViewlet';
|
||||||
|
import { IQuickOpenRegistry, Extensions, QuickOpenHandlerDescriptor } from 'vs/workbench/browser/quickopen';
|
||||||
|
import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
|
||||||
|
import * as jsonContributionRegistry from 'vs/platform/jsonschemas/common/jsonContributionRegistry';
|
||||||
|
import { ExtensionsConfigurationSchema, ExtensionsConfigurationSchemaId } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate';
|
||||||
|
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||||
|
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||||
|
import { KeymapExtensions } from 'vs/workbench/contrib/extensions/common/extensionsUtils';
|
||||||
|
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||||
|
import { GalleryExtensionsHandler, ExtensionsHandler } from 'vs/workbench/contrib/extensions/browser/extensionsQuickOpen';
|
||||||
|
import { EditorDescriptor, IEditorRegistry, Extensions as EditorExtensions } from 'vs/workbench/browser/editor';
|
||||||
|
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||||
|
import { URI, UriComponents } from 'vs/base/common/uri';
|
||||||
|
import { ExtensionActivationProgress } from 'vs/workbench/contrib/extensions/browser/extensionsActivationProgress';
|
||||||
|
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||||
|
import { ExtensionDependencyChecker } from 'vs/workbench/contrib/extensions/browser/extensionsDependencyChecker';
|
||||||
|
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||||
|
import { ExtensionType } from 'vs/platform/extensions/common/extensions';
|
||||||
|
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||||
|
|
||||||
|
// Singletons
|
||||||
|
registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService);
|
||||||
|
|
||||||
|
Registry.as<IOutputChannelRegistry>(OutputExtensions.OutputChannels)
|
||||||
|
.registerChannel({ id: ExtensionsChannelId, label: ExtensionsLabel, log: false });
|
||||||
|
|
||||||
|
// Quickopen
|
||||||
|
Registry.as<IQuickOpenRegistry>(Extensions.Quickopen).registerQuickOpenHandler(
|
||||||
|
new QuickOpenHandlerDescriptor(
|
||||||
|
ExtensionsHandler,
|
||||||
|
ExtensionsHandler.ID,
|
||||||
|
'ext ',
|
||||||
|
undefined,
|
||||||
|
localize('extensionsCommands', "Manage Extensions"),
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Editor
|
||||||
|
const editorDescriptor = new EditorDescriptor(
|
||||||
|
ExtensionEditor,
|
||||||
|
ExtensionEditor.ID,
|
||||||
|
localize('extension', "Extension")
|
||||||
|
);
|
||||||
|
|
||||||
|
Registry.as<IEditorRegistry>(EditorExtensions.Editors)
|
||||||
|
.registerEditor(editorDescriptor, [new SyncDescriptor(ExtensionsInput)]);
|
||||||
|
|
||||||
|
// Viewlet
|
||||||
|
const viewletDescriptor = new ViewletDescriptor(
|
||||||
|
ExtensionsViewlet,
|
||||||
|
VIEWLET_ID,
|
||||||
|
localize('extensions', "Extensions"),
|
||||||
|
'extensions',
|
||||||
|
4
|
||||||
|
);
|
||||||
|
|
||||||
|
Registry.as<ViewletRegistry>(ViewletExtensions.Viewlets)
|
||||||
|
.registerViewlet(viewletDescriptor);
|
||||||
|
|
||||||
|
// Global actions
|
||||||
|
const actionRegistry = Registry.as<IWorkbenchActionRegistry>(WorkbenchActionExtensions.WorkbenchActions);
|
||||||
|
|
||||||
|
const openViewletActionDescriptor = new SyncActionDescriptor(OpenExtensionsViewletAction, OpenExtensionsViewletAction.ID, OpenExtensionsViewletAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_X });
|
||||||
|
actionRegistry.registerWorkbenchAction(openViewletActionDescriptor, 'View: Show Extensions', localize('view', "View"));
|
||||||
|
|
||||||
|
const installActionDescriptor = new SyncActionDescriptor(InstallExtensionsAction, InstallExtensionsAction.ID, InstallExtensionsAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(installActionDescriptor, 'Extensions: Install Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const listOutdatedActionDescriptor = new SyncActionDescriptor(ShowOutdatedExtensionsAction, ShowOutdatedExtensionsAction.ID, ShowOutdatedExtensionsAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(listOutdatedActionDescriptor, 'Extensions: Show Outdated Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const recommendationsActionDescriptor = new SyncActionDescriptor(ShowRecommendedExtensionsAction, ShowRecommendedExtensionsAction.ID, ShowRecommendedExtensionsAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(recommendationsActionDescriptor, 'Extensions: Show Recommended Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const keymapRecommendationsActionDescriptor = new SyncActionDescriptor(ShowRecommendedKeymapExtensionsAction, ShowRecommendedKeymapExtensionsAction.ID, ShowRecommendedKeymapExtensionsAction.SHORT_LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_M) });
|
||||||
|
actionRegistry.registerWorkbenchAction(keymapRecommendationsActionDescriptor, 'Preferences: Keymaps', PreferencesLabel);
|
||||||
|
|
||||||
|
const languageExtensionsActionDescriptor = new SyncActionDescriptor(ShowLanguageExtensionsAction, ShowLanguageExtensionsAction.ID, ShowLanguageExtensionsAction.SHORT_LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(languageExtensionsActionDescriptor, 'Preferences: Language Extensions', PreferencesLabel);
|
||||||
|
|
||||||
|
const azureExtensionsActionDescriptor = new SyncActionDescriptor(ShowAzureExtensionsAction, ShowAzureExtensionsAction.ID, ShowAzureExtensionsAction.SHORT_LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(azureExtensionsActionDescriptor, 'Preferences: Azure Extensions', PreferencesLabel);
|
||||||
|
|
||||||
|
const popularActionDescriptor = new SyncActionDescriptor(ShowPopularExtensionsAction, ShowPopularExtensionsAction.ID, ShowPopularExtensionsAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(popularActionDescriptor, 'Extensions: Show Popular Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const enabledActionDescriptor = new SyncActionDescriptor(ShowEnabledExtensionsAction, ShowEnabledExtensionsAction.ID, ShowEnabledExtensionsAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(enabledActionDescriptor, 'Extensions: Show Enabled Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const installedActionDescriptor = new SyncActionDescriptor(ShowInstalledExtensionsAction, ShowInstalledExtensionsAction.ID, ShowInstalledExtensionsAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(installedActionDescriptor, 'Extensions: Show Installed Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const disabledActionDescriptor = new SyncActionDescriptor(ShowDisabledExtensionsAction, ShowDisabledExtensionsAction.ID, ShowDisabledExtensionsAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(disabledActionDescriptor, 'Extensions: Show Disabled Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const builtinActionDescriptor = new SyncActionDescriptor(ShowBuiltInExtensionsAction, ShowBuiltInExtensionsAction.ID, ShowBuiltInExtensionsAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(builtinActionDescriptor, 'Extensions: Show Built-in Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const updateAllActionDescriptor = new SyncActionDescriptor(UpdateAllAction, UpdateAllAction.ID, UpdateAllAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(updateAllActionDescriptor, 'Extensions: Update All Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const installVSIXActionDescriptor = new SyncActionDescriptor(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(installVSIXActionDescriptor, 'Extensions: Install from VSIX...', ExtensionsLabel);
|
||||||
|
|
||||||
|
const disableAllAction = new SyncActionDescriptor(DisableAllAction, DisableAllAction.ID, DisableAllAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(disableAllAction, 'Extensions: Disable All Installed Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const disableAllWorkspaceAction = new SyncActionDescriptor(DisableAllWorkpsaceAction, DisableAllWorkpsaceAction.ID, DisableAllWorkpsaceAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(disableAllWorkspaceAction, 'Extensions: Disable All Installed Extensions for this Workspace', ExtensionsLabel);
|
||||||
|
|
||||||
|
const enableAllAction = new SyncActionDescriptor(EnableAllAction, EnableAllAction.ID, EnableAllAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(enableAllAction, 'Extensions: Enable All Extensions', ExtensionsLabel);
|
||||||
|
|
||||||
|
const enableAllWorkspaceAction = new SyncActionDescriptor(EnableAllWorkpsaceAction, EnableAllWorkpsaceAction.ID, EnableAllWorkpsaceAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(enableAllWorkspaceAction, 'Extensions: Enable All Extensions for this Workspace', ExtensionsLabel);
|
||||||
|
|
||||||
|
const checkForUpdatesAction = new SyncActionDescriptor(CheckForUpdatesAction, CheckForUpdatesAction.ID, CheckForUpdatesAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(checkForUpdatesAction, `Extensions: Check for Extension Updates`, ExtensionsLabel);
|
||||||
|
|
||||||
|
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(EnableAutoUpdateAction, EnableAutoUpdateAction.ID, EnableAutoUpdateAction.LABEL), `Extensions: Enable Auto Updating Extensions`, ExtensionsLabel);
|
||||||
|
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisableAutoUpdateAction, DisableAutoUpdateAction.ID, DisableAutoUpdateAction.LABEL), `Extensions: Disable Auto Updating Extensions`, ExtensionsLabel);
|
||||||
|
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(InstallSpecificVersionOfExtensionAction, InstallSpecificVersionOfExtensionAction.ID, InstallSpecificVersionOfExtensionAction.LABEL), 'Install Specific Version of Extension...', ExtensionsLabel);
|
||||||
|
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReinstallAction, ReinstallAction.ID, ReinstallAction.LABEL), 'Reinstall Extension...', localize('developer', "Developer"));
|
||||||
|
|
||||||
|
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
|
||||||
|
.registerConfiguration({
|
||||||
|
id: 'extensions',
|
||||||
|
order: 30,
|
||||||
|
title: localize('extensionsConfigurationTitle', "Extensions"),
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
'extensions.autoUpdate': {
|
||||||
|
type: 'boolean',
|
||||||
|
description: localize('extensionsAutoUpdate', "When enabled, automatically installs updates for extensions. The updates are fetched from a Microsoft online service."),
|
||||||
|
default: true,
|
||||||
|
scope: ConfigurationScope.APPLICATION,
|
||||||
|
tags: ['usesOnlineServices']
|
||||||
|
},
|
||||||
|
'extensions.autoCheckUpdates': {
|
||||||
|
type: 'boolean',
|
||||||
|
description: localize('extensionsCheckUpdates', "When enabled, automatically checks extensions for updates. If an extension has an update, it is marked as outdated in the Extensions view. The updates are fetched from a Microsoft online service."),
|
||||||
|
default: true,
|
||||||
|
scope: ConfigurationScope.APPLICATION,
|
||||||
|
tags: ['usesOnlineServices']
|
||||||
|
},
|
||||||
|
'extensions.ignoreRecommendations': {
|
||||||
|
type: 'boolean',
|
||||||
|
description: localize('extensionsIgnoreRecommendations', "When enabled, the notifications for extension recommendations will not be shown."),
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
'extensions.showRecommendationsOnlyOnDemand': {
|
||||||
|
type: 'boolean',
|
||||||
|
description: localize('extensionsShowRecommendationsOnlyOnDemand', "When enabled, recommendations will not be fetched or shown unless specifically requested by the user. Some recommendations are fetched from a Microsoft online service."),
|
||||||
|
default: false,
|
||||||
|
tags: ['usesOnlineServices']
|
||||||
|
},
|
||||||
|
'extensions.closeExtensionDetailsOnViewChange': {
|
||||||
|
type: 'boolean',
|
||||||
|
description: localize('extensionsCloseExtensionDetailsOnViewChange', "When enabled, editors with extension details will be automatically closed upon navigating away from the Extensions View."),
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const jsonRegistry = <jsonContributionRegistry.IJSONContributionRegistry>Registry.as(jsonContributionRegistry.Extensions.JSONContribution);
|
||||||
|
jsonRegistry.registerSchema(ExtensionsConfigurationSchemaId, ExtensionsConfigurationSchema);
|
||||||
|
|
||||||
|
// Register Commands
|
||||||
|
CommandsRegistry.registerCommand('_extensions.manage', (accessor: ServicesAccessor, extensionId: string) => {
|
||||||
|
const extensionService = accessor.get(IExtensionsWorkbenchService);
|
||||||
|
const extension = extensionService.local.filter(e => areSameExtensions(e.identifier, { id: extensionId }));
|
||||||
|
if (extension.length === 1) {
|
||||||
|
extensionService.open(extension[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
CommandsRegistry.registerCommand('extension.open', (accessor: ServicesAccessor, extensionId: string) => {
|
||||||
|
const extensionService = accessor.get(IExtensionsWorkbenchService);
|
||||||
|
|
||||||
|
return extensionService.queryGallery({ names: [extensionId], pageSize: 1 }, CancellationToken.None).then(pager => {
|
||||||
|
if (pager.total !== 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
extensionService.open(pager.firstPage[0]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
CommandsRegistry.registerCommand({
|
||||||
|
id: 'workbench.extensions.installExtension',
|
||||||
|
description: {
|
||||||
|
description: localize('workbench.extensions.installExtension.description', "Install the given extension"),
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
name: localize('workbench.extensions.installExtension.arg.name', "Extension id or VSIX resource uri"),
|
||||||
|
schema: {
|
||||||
|
'type': ['object', 'string']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
handler: async (accessor, arg: string | UriComponents) => {
|
||||||
|
const extensionManagementService = accessor.get(IExtensionManagementService);
|
||||||
|
const extensionGalleryService = accessor.get(IExtensionGalleryService);
|
||||||
|
try {
|
||||||
|
if (typeof arg === 'string') {
|
||||||
|
const extension = await extensionGalleryService.getCompatibleExtension({ id: arg });
|
||||||
|
if (extension) {
|
||||||
|
await extensionManagementService.installFromGallery(extension);
|
||||||
|
} else {
|
||||||
|
throw new Error(localize('notFound', "Extension '{0}' not found.", arg));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const vsix = URI.revive(arg);
|
||||||
|
await extensionManagementService.install(vsix);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
onUnexpectedError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
CommandsRegistry.registerCommand({
|
||||||
|
id: 'workbench.extensions.uninstallExtension',
|
||||||
|
description: {
|
||||||
|
description: localize('workbench.extensions.uninstallExtension.description', "Uninstall the given extension"),
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
name: localize('workbench.extensions.uninstallExtension.arg.name', "Id of the extension to uninstall"),
|
||||||
|
schema: {
|
||||||
|
'type': 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
handler: async (accessor, id: string) => {
|
||||||
|
if (!id) {
|
||||||
|
throw new Error(localize('id required', "Extension id required."));
|
||||||
|
}
|
||||||
|
const extensionManagementService = accessor.get(IExtensionManagementService);
|
||||||
|
try {
|
||||||
|
const installed = await extensionManagementService.getInstalled(ExtensionType.User);
|
||||||
|
const [extensionToUninstall] = installed.filter(e => areSameExtensions(e.identifier, { id }));
|
||||||
|
if (!extensionToUninstall) {
|
||||||
|
return Promise.reject(new Error(localize('notInstalled', "Extension '{0}' is not installed. Make sure you use the full extension ID, including the publisher, e.g.: ms-vscode.csharp.", id)));
|
||||||
|
}
|
||||||
|
await extensionManagementService.uninstall(extensionToUninstall, true);
|
||||||
|
} catch (e) {
|
||||||
|
onUnexpectedError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// File menu registration
|
||||||
|
|
||||||
|
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||||
|
group: '2_keybindings',
|
||||||
|
command: {
|
||||||
|
id: ShowRecommendedKeymapExtensionsAction.ID,
|
||||||
|
title: localize({ key: 'miOpenKeymapExtensions', comment: ['&& denotes a mnemonic'] }, "&&Keymaps")
|
||||||
|
},
|
||||||
|
order: 2
|
||||||
|
});
|
||||||
|
|
||||||
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||||
|
group: '2_keybindings',
|
||||||
|
command: {
|
||||||
|
id: ShowRecommendedKeymapExtensionsAction.ID,
|
||||||
|
title: localize('miOpenKeymapExtensions2', "Keymaps")
|
||||||
|
},
|
||||||
|
order: 2
|
||||||
|
});
|
||||||
|
|
||||||
|
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||||
|
group: '1_settings',
|
||||||
|
command: {
|
||||||
|
id: VIEWLET_ID,
|
||||||
|
title: localize({ key: 'miPreferencesExtensions', comment: ['&& denotes a mnemonic'] }, "&&Extensions")
|
||||||
|
},
|
||||||
|
order: 3
|
||||||
|
});
|
||||||
|
|
||||||
|
// View menu
|
||||||
|
|
||||||
|
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
|
||||||
|
group: '3_views',
|
||||||
|
command: {
|
||||||
|
id: VIEWLET_ID,
|
||||||
|
title: localize({ key: 'miViewExtensions', comment: ['&& denotes a mnemonic'] }, "E&&xtensions")
|
||||||
|
},
|
||||||
|
order: 5
|
||||||
|
});
|
||||||
|
|
||||||
|
// Global Activity Menu
|
||||||
|
|
||||||
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||||
|
group: '2_configuration',
|
||||||
|
command: {
|
||||||
|
id: VIEWLET_ID,
|
||||||
|
title: localize('showExtensions', "Extensions")
|
||||||
|
},
|
||||||
|
order: 3
|
||||||
|
});
|
||||||
|
|
||||||
|
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
|
||||||
|
|
||||||
|
class ExtensionsContributions implements IWorkbenchContribution {
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
@IWorkbenchEnvironmentService workbenchEnvironmentService: IWorkbenchEnvironmentService,
|
||||||
|
@IExtensionManagementServerService extensionManagementServerService: IExtensionManagementServerService
|
||||||
|
) {
|
||||||
|
|
||||||
|
const canManageExtensions = extensionManagementServerService.localExtensionManagementServer || extensionManagementServerService.remoteExtensionManagementServer;
|
||||||
|
|
||||||
|
if (canManageExtensions) {
|
||||||
|
Registry.as<IQuickOpenRegistry>(Extensions.Quickopen).registerQuickOpenHandler(
|
||||||
|
new QuickOpenHandlerDescriptor(
|
||||||
|
GalleryExtensionsHandler,
|
||||||
|
GalleryExtensionsHandler.ID,
|
||||||
|
'ext install ',
|
||||||
|
undefined,
|
||||||
|
localize('galleryExtensionsCommands', "Install Gallery Extensions"),
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (workbenchEnvironmentService.extensionsPath) {
|
||||||
|
const openExtensionsFolderActionDescriptor = new SyncActionDescriptor(OpenExtensionsFolderAction, OpenExtensionsFolderAction.ID, OpenExtensionsFolderAction.LABEL);
|
||||||
|
actionRegistry.registerWorkbenchAction(openExtensionsFolderActionDescriptor, 'Extensions: Open Extensions Folder', ExtensionsLabel);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
workbenchRegistry.registerWorkbenchContribution(ExtensionsContributions, LifecyclePhase.Starting);
|
||||||
|
workbenchRegistry.registerWorkbenchContribution(StatusUpdater, LifecyclePhase.Restored);
|
||||||
|
workbenchRegistry.registerWorkbenchContribution(MaliciousExtensionChecker, LifecyclePhase.Eventually);
|
||||||
|
workbenchRegistry.registerWorkbenchContribution(ConfigureRecommendedExtensionsCommandsContributor, LifecyclePhase.Eventually);
|
||||||
|
workbenchRegistry.registerWorkbenchContribution(KeymapExtensions, LifecyclePhase.Restored);
|
||||||
|
workbenchRegistry.registerWorkbenchContribution(ExtensionsViewletViewsContribution, LifecyclePhase.Starting);
|
||||||
|
workbenchRegistry.registerWorkbenchContribution(ExtensionActivationProgress, LifecyclePhase.Eventually);
|
||||||
|
workbenchRegistry.registerWorkbenchContribution(ExtensionDependencyChecker, LifecyclePhase.Eventually);
|
||||||
@@ -16,7 +16,8 @@ import { dispose, Disposable } from 'vs/base/common/lifecycle';
|
|||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
import { IExtension, ExtensionState, IExtensionsWorkbenchService, VIEWLET_ID, IExtensionsViewlet, AutoUpdateConfigurationKey, IExtensionContainer, EXTENSIONS_CONFIG, ExtensionsPolicy, ExtensionsPolicyKey } from 'vs/workbench/contrib/extensions/common/extensions';
|
import { IExtension, ExtensionState, IExtensionsWorkbenchService, VIEWLET_ID, IExtensionsViewlet, AutoUpdateConfigurationKey, IExtensionContainer, EXTENSIONS_CONFIG, ExtensionsPolicy, ExtensionsPolicyKey } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||||
import { ExtensionsConfigurationInitialContent } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate';
|
import { ExtensionsConfigurationInitialContent } from 'vs/workbench/contrib/extensions/common/extensionsFileTemplate';
|
||||||
import { IExtensionEnablementService, IExtensionTipsService, EnablementState, ExtensionsLabel, IExtensionRecommendation, IGalleryExtension, IExtensionsConfigContent, IExtensionGalleryService, INSTALL_ERROR_MALICIOUS, INSTALL_ERROR_INCOMPATIBLE, IGalleryExtensionVersion, ILocalExtension, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/platform/extensionManagement/common/extensionManagement';
|
import { ExtensionsLabel, IGalleryExtension, IExtensionGalleryService, INSTALL_ERROR_MALICIOUS, INSTALL_ERROR_INCOMPATIBLE, IGalleryExtensionVersion, ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||||
|
import { IExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionTipsService, IExtensionRecommendation, IExtensionsConfigContent } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||||
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||||
import { ExtensionType, ExtensionIdentifier, IExtensionDescription, IExtensionManifest, isLanguagePackExtension } from 'vs/platform/extensions/common/extensions';
|
import { ExtensionType, ExtensionIdentifier, IExtensionDescription, IExtensionManifest, isLanguagePackExtension } from 'vs/platform/extensions/common/extensions';
|
||||||
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||||
@@ -55,9 +56,7 @@ import { alert } from 'vs/base/browser/ui/aria/aria';
|
|||||||
import { coalesce } from 'vs/base/common/arrays';
|
import { coalesce } from 'vs/base/common/arrays';
|
||||||
import { IWorkbenchThemeService, COLOR_THEME_SETTING, ICON_THEME_SETTING, IFileIconTheme, IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
import { IWorkbenchThemeService, COLOR_THEME_SETTING, ICON_THEME_SETTING, IFileIconTheme, IColorTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||||
import { ILabelService } from 'vs/platform/label/common/label';
|
import { ILabelService } from 'vs/platform/label/common/label';
|
||||||
import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts';
|
|
||||||
import { isUIExtension } from 'vs/workbench/services/extensions/common/extensionsUtil';
|
import { isUIExtension } from 'vs/workbench/services/extensions/common/extensionsUtil';
|
||||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
|
||||||
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
|
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
|
||||||
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||||
import { IProductService } from 'vs/platform/product/common/product';
|
import { IProductService } from 'vs/platform/product/common/product';
|
||||||
@@ -166,10 +165,10 @@ export class InstallAction extends ExtensionAction {
|
|||||||
@IOpenerService private readonly openerService: IOpenerService,
|
@IOpenerService private readonly openerService: IOpenerService,
|
||||||
@IExtensionService private readonly runtimeExtensionService: IExtensionService,
|
@IExtensionService private readonly runtimeExtensionService: IExtensionService,
|
||||||
@IWorkbenchThemeService private readonly workbenchThemeService: IWorkbenchThemeService,
|
@IWorkbenchThemeService private readonly workbenchThemeService: IWorkbenchThemeService,
|
||||||
@IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService,
|
|
||||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||||
@IProductService private readonly productService: IProductService,
|
@IProductService private readonly productService: IProductService,
|
||||||
@ILabelService private readonly labelService: ILabelService
|
@ILabelService private readonly labelService: ILabelService,
|
||||||
|
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService
|
||||||
) {
|
) {
|
||||||
super(`extensions.install`, InstallAction.INSTALL_LABEL, InstallAction.Class, false);
|
super(`extensions.install`, InstallAction.INSTALL_LABEL, InstallAction.Class, false);
|
||||||
this.update();
|
this.update();
|
||||||
@@ -197,12 +196,12 @@ export class InstallAction extends ExtensionAction {
|
|||||||
this.label = InstallAction.INSTALLING_LABEL;
|
this.label = InstallAction.INSTALLING_LABEL;
|
||||||
this.tooltip = InstallAction.INSTALLING_LABEL;
|
this.tooltip = InstallAction.INSTALLING_LABEL;
|
||||||
} else {
|
} else {
|
||||||
if (this._manifest && this.workbenchEnvironmentService.configuration.remoteAuthority) {
|
if (this._manifest && this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) {
|
||||||
if (isUIExtension(this._manifest, this.productService, this.configurationService)) {
|
if (isUIExtension(this._manifest, this.productService, this.configurationService)) {
|
||||||
this.label = `${InstallAction.INSTALL_LABEL} ${localize('locally', "Locally")}`;
|
this.label = `${InstallAction.INSTALL_LABEL} ${localize('locally', "Locally")}`;
|
||||||
this.tooltip = `${InstallAction.INSTALL_LABEL} ${localize('locally', "Locally")}`;
|
this.tooltip = `${InstallAction.INSTALL_LABEL} ${localize('locally', "Locally")}`;
|
||||||
} else {
|
} else {
|
||||||
const host = this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.workbenchEnvironmentService.configuration.remoteAuthority) || localize('remote', "Remote");
|
const host = this.extensionManagementServerService.remoteExtensionManagementServer.label;
|
||||||
this.label = `${InstallAction.INSTALL_LABEL} on ${host}`;
|
this.label = `${InstallAction.INSTALL_LABEL} on ${host}`;
|
||||||
this.tooltip = `${InstallAction.INSTALL_LABEL} on ${host}`;
|
this.tooltip = `${InstallAction.INSTALL_LABEL} on ${host}`;
|
||||||
}
|
}
|
||||||
@@ -298,7 +297,6 @@ export class RemoteInstallAction extends ExtensionAction {
|
|||||||
constructor(
|
constructor(
|
||||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||||
@ILabelService private readonly labelService: ILabelService,
|
@ILabelService private readonly labelService: ILabelService,
|
||||||
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
|
|
||||||
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
|
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
|
||||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||||
@IProductService private readonly productService: IProductService,
|
@IProductService private readonly productService: IProductService,
|
||||||
@@ -315,10 +313,9 @@ export class RemoteInstallAction extends ExtensionAction {
|
|||||||
this.tooltip = this.label;
|
this.tooltip = this.label;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const remoteAuthority = this.environmentService.configuration.remoteAuthority;
|
const remoteServer = this.extensionManagementServerService.remoteExtensionManagementServer;
|
||||||
if (remoteAuthority) {
|
if (remoteServer) {
|
||||||
const host = this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.environmentService.configuration.remoteAuthority) || localize('remote', "Remote");
|
this.label = `${RemoteInstallAction.INSTALL_LABEL} on ${remoteServer.label}`;
|
||||||
this.label = `${RemoteInstallAction.INSTALL_LABEL} on ${host}`;
|
|
||||||
this.tooltip = this.label;
|
this.tooltip = this.label;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -333,7 +330,7 @@ export class RemoteInstallAction extends ExtensionAction {
|
|||||||
this.updateLabel();
|
this.updateLabel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.environmentService.configuration.remoteAuthority
|
if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer
|
||||||
// Installed User Extension
|
// Installed User Extension
|
||||||
&& this.extension && this.extension.local && this.extension.type === ExtensionType.User && this.extension.state === ExtensionState.Installed
|
&& this.extension && this.extension.local && this.extension.type === ExtensionType.User && this.extension.state === ExtensionState.Installed
|
||||||
// Local Workspace Extension
|
// Local Workspace Extension
|
||||||
@@ -377,7 +374,6 @@ export class LocalInstallAction extends ExtensionAction {
|
|||||||
constructor(
|
constructor(
|
||||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||||
@ILabelService private readonly labelService: ILabelService,
|
@ILabelService private readonly labelService: ILabelService,
|
||||||
@IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
|
|
||||||
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
|
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
|
||||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||||
@IProductService private readonly productService: IProductService,
|
@IProductService private readonly productService: IProductService,
|
||||||
@@ -407,7 +403,7 @@ export class LocalInstallAction extends ExtensionAction {
|
|||||||
this.updateLabel();
|
this.updateLabel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.environmentService.configuration.remoteAuthority
|
if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer
|
||||||
// Installed User Extension
|
// Installed User Extension
|
||||||
&& this.extension && this.extension.local && this.extension.type === ExtensionType.User && this.extension.state === ExtensionState.Installed
|
&& this.extension && this.extension.local && this.extension.type === ExtensionType.User && this.extension.state === ExtensionState.Installed
|
||||||
// Remote UI or Language pack Extension
|
// Remote UI or Language pack Extension
|
||||||
@@ -423,7 +419,7 @@ export class LocalInstallAction extends ExtensionAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(): Promise<void> {
|
async run(): Promise<void> {
|
||||||
if (!this.installing) {
|
if (this.extensionManagementServerService.localExtensionManagementServer && !this.installing) {
|
||||||
this.installing = true;
|
this.installing = true;
|
||||||
this.update();
|
this.update();
|
||||||
this.extensionsWorkbenchService.open(this.extension);
|
this.extensionsWorkbenchService.open(this.extension);
|
||||||
@@ -918,13 +914,15 @@ export class EnableForWorkspaceAction extends ExtensionAction {
|
|||||||
|
|
||||||
update(): void {
|
update(): void {
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
if (this.extension) {
|
if (this.extension && this.extension.local) {
|
||||||
this.enabled = this.extension.state === ExtensionState.Installed && (this.extension.enablementState === EnablementState.Disabled || this.extension.enablementState === EnablementState.WorkspaceDisabled) && !!this.extension.local && this.extensionEnablementService.canChangeEnablement(this.extension.local);
|
this.enabled = this.extension.state === ExtensionState.Installed
|
||||||
|
&& !this.extensionEnablementService.isEnabled(this.extension.local)
|
||||||
|
&& this.extensionEnablementService.canChangeEnablement(this.extension.local);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run(): Promise<any> {
|
run(): Promise<any> {
|
||||||
return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.WorkspaceEnabled);
|
return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.EnabledWorkspace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -944,12 +942,14 @@ export class EnableGloballyAction extends ExtensionAction {
|
|||||||
update(): void {
|
update(): void {
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
if (this.extension && this.extension.local) {
|
if (this.extension && this.extension.local) {
|
||||||
this.enabled = this.extension.state === ExtensionState.Installed && this.extension.enablementState === EnablementState.Disabled && this.extensionEnablementService.canChangeEnablement(this.extension.local);
|
this.enabled = this.extension.state === ExtensionState.Installed
|
||||||
|
&& this.extension.enablementState === EnablementState.DisabledGlobally
|
||||||
|
&& this.extensionEnablementService.canChangeEnablement(this.extension.local);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run(): Promise<any> {
|
run(): Promise<any> {
|
||||||
return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.Enabled);
|
return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.EnabledGlobally);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -969,13 +969,15 @@ export class DisableForWorkspaceAction extends ExtensionAction {
|
|||||||
|
|
||||||
update(): void {
|
update(): void {
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier) && this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY)) {
|
if (this.extension && this.extension.local && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier) && this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY)) {
|
||||||
this.enabled = this.extension.state === ExtensionState.Installed && (this.extension.enablementState === EnablementState.Enabled || this.extension.enablementState === EnablementState.WorkspaceEnabled) && !!this.extension.local && this.extensionEnablementService.canChangeEnablement(this.extension.local);
|
this.enabled = this.extension.state === ExtensionState.Installed
|
||||||
|
&& (this.extension.enablementState === EnablementState.EnabledGlobally || this.extension.enablementState === EnablementState.EnabledWorkspace)
|
||||||
|
&& this.extensionEnablementService.canChangeEnablement(this.extension.local);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run(): Promise<any> {
|
run(): Promise<any> {
|
||||||
return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.WorkspaceDisabled);
|
return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.DisabledWorkspace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -994,13 +996,15 @@ export class DisableGloballyAction extends ExtensionAction {
|
|||||||
|
|
||||||
update(): void {
|
update(): void {
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
if (this.extension && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier))) {
|
if (this.extension && this.extension.local && this.runningExtensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension.identifier))) {
|
||||||
this.enabled = this.extension.state === ExtensionState.Installed && (this.extension.enablementState === EnablementState.Enabled || this.extension.enablementState === EnablementState.WorkspaceEnabled) && !!this.extension.local && this.extensionEnablementService.canChangeEnablement(this.extension.local);
|
this.enabled = this.extension.state === ExtensionState.Installed
|
||||||
|
&& (this.extension.enablementState === EnablementState.EnabledGlobally || this.extension.enablementState === EnablementState.EnabledWorkspace)
|
||||||
|
&& this.extensionEnablementService.canChangeEnablement(this.extension.local);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run(): Promise<any> {
|
run(): Promise<any> {
|
||||||
return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.Disabled);
|
return this.extensionsWorkbenchService.setEnablement(this.extension, EnablementState.DisabledGlobally);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1082,6 +1086,7 @@ export class CheckForUpdatesAction extends Action {
|
|||||||
id = CheckForUpdatesAction.ID,
|
id = CheckForUpdatesAction.ID,
|
||||||
label = CheckForUpdatesAction.LABEL,
|
label = CheckForUpdatesAction.LABEL,
|
||||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||||
|
@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService,
|
||||||
@IViewletService private readonly viewletService: IViewletService,
|
@IViewletService private readonly viewletService: IViewletService,
|
||||||
@INotificationService private readonly notificationService: INotificationService
|
@INotificationService private readonly notificationService: INotificationService
|
||||||
) {
|
) {
|
||||||
@@ -1097,7 +1102,7 @@ export class CheckForUpdatesAction extends Action {
|
|||||||
|
|
||||||
let msgAvailableExtensions = outdated.length === 1 ? localize('singleUpdateAvailable', "An extension update is available.") : localize('updatesAvailable', "{0} extension updates are available.", outdated.length);
|
let msgAvailableExtensions = outdated.length === 1 ? localize('singleUpdateAvailable', "An extension update is available.") : localize('updatesAvailable', "{0} extension updates are available.", outdated.length);
|
||||||
|
|
||||||
const disabledExtensionsCount = outdated.filter(ext => ext.enablementState === EnablementState.Disabled || ext.enablementState === EnablementState.WorkspaceDisabled).length;
|
const disabledExtensionsCount = outdated.filter(ext => ext.local && !this.extensionEnablementService.isEnabled(ext.local)).length;
|
||||||
if (disabledExtensionsCount) {
|
if (disabledExtensionsCount) {
|
||||||
if (outdated.length === 1) {
|
if (outdated.length === 1) {
|
||||||
msgAvailableExtensions = localize('singleDisabledUpdateAvailable', "An update to an extension which is disabled is available.");
|
msgAvailableExtensions = localize('singleDisabledUpdateAvailable', "An update to an extension which is disabled is available.");
|
||||||
@@ -1227,7 +1232,6 @@ export class ReloadAction extends ExtensionAction {
|
|||||||
@IExtensionService private readonly extensionService: IExtensionService,
|
@IExtensionService private readonly extensionService: IExtensionService,
|
||||||
@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService,
|
@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService,
|
||||||
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
|
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
|
||||||
@IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService,
|
|
||||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||||
@IProductService private readonly productService: IProductService,
|
@IProductService private readonly productService: IProductService,
|
||||||
) {
|
) {
|
||||||
@@ -1312,7 +1316,7 @@ export class ReloadAction extends ExtensionAction {
|
|||||||
this.tooltip = localize('postEnableTooltip', "Please reload Azure Data Studio to enable this extension."); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
|
this.tooltip = localize('postEnableTooltip', "Please reload Azure Data Studio to enable this extension."); // {{SQL CARBON EDIT}} - replace Visual Studio Code with Azure Data Studio
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.workbenchEnvironmentService.configuration.remoteAuthority) {
|
if (this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) {
|
||||||
const uiExtension = isUIExtension(this.extension.local.manifest, this.productService, this.configurationService);
|
const uiExtension = isUIExtension(this.extension.local.manifest, this.productService, this.configurationService);
|
||||||
// Local Workspace Extension
|
// Local Workspace Extension
|
||||||
if (!uiExtension && this.extension.server === this.extensionManagementServerService.localExtensionManagementServer) {
|
if (!uiExtension && this.extension.server === this.extensionManagementServerService.localExtensionManagementServer) {
|
||||||
@@ -1741,8 +1745,10 @@ export class InstallWorkspaceRecommendedExtensionsAction extends Action {
|
|||||||
try {
|
try {
|
||||||
if (extension.local && extension.gallery) {
|
if (extension.local && extension.gallery) {
|
||||||
if (isUIExtension(extension.local.manifest, this.productService, this.configurationService)) {
|
if (isUIExtension(extension.local.manifest, this.productService, this.configurationService)) {
|
||||||
|
if (this.extensionManagementServerService.localExtensionManagementServer) {
|
||||||
await this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.installFromGallery(extension.gallery);
|
await this.extensionManagementServerService.localExtensionManagementServer.extensionManagementService.installFromGallery(extension.gallery);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
} else if (this.extensionManagementServerService.remoteExtensionManagementServer) {
|
} else if (this.extensionManagementServerService.remoteExtensionManagementServer) {
|
||||||
await this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.installFromGallery(extension.gallery);
|
await this.extensionManagementServerService.remoteExtensionManagementServer.extensionManagementService.installFromGallery(extension.gallery);
|
||||||
return;
|
return;
|
||||||
@@ -2547,8 +2553,8 @@ export class StatusLabelAction extends Action implements IExtensionContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentEnablementState !== null) {
|
if (currentEnablementState !== null) {
|
||||||
const currentlyEnabled = currentEnablementState === EnablementState.Enabled || currentEnablementState === EnablementState.WorkspaceEnabled;
|
const currentlyEnabled = currentEnablementState === EnablementState.EnabledGlobally || currentEnablementState === EnablementState.EnabledWorkspace;
|
||||||
const enabled = this.enablementState === EnablementState.Enabled || this.enablementState === EnablementState.WorkspaceEnabled;
|
const enabled = this.enablementState === EnablementState.EnabledGlobally || this.enablementState === EnablementState.EnabledWorkspace;
|
||||||
if (!currentlyEnabled && enabled) {
|
if (!currentlyEnabled && enabled) {
|
||||||
return canAddExtension() ? localize('enabled', "Enabled") : null;
|
return canAddExtension() ? localize('enabled', "Enabled") : null;
|
||||||
}
|
}
|
||||||
@@ -2654,7 +2660,6 @@ export class SystemDisabledWarningAction extends ExtensionAction {
|
|||||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||||
@IProductService private readonly productService: IProductService,
|
@IProductService private readonly productService: IProductService,
|
||||||
@ILabelService private readonly labelService: ILabelService,
|
@ILabelService private readonly labelService: ILabelService,
|
||||||
@IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService,
|
|
||||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||||
@IExtensionService private readonly extensionService: IExtensionService,
|
@IExtensionService private readonly extensionService: IExtensionService,
|
||||||
) {
|
) {
|
||||||
@@ -2677,8 +2682,7 @@ export class SystemDisabledWarningAction extends ExtensionAction {
|
|||||||
!this.extension.local ||
|
!this.extension.local ||
|
||||||
!this.extension.server ||
|
!this.extension.server ||
|
||||||
!this._runningExtensions ||
|
!this._runningExtensions ||
|
||||||
!this.workbenchEnvironmentService.configuration.remoteAuthority ||
|
!(this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) ||
|
||||||
!this.extensionManagementServerService.remoteExtensionManagementServer ||
|
|
||||||
this.extension.state !== ExtensionState.Installed
|
this.extension.state !== ExtensionState.Installed
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
@@ -2687,7 +2691,7 @@ export class SystemDisabledWarningAction extends ExtensionAction {
|
|||||||
if (!this.extensionsWorkbenchService.installed.some(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server !== this.extension.server)) {
|
if (!this.extensionsWorkbenchService.installed.some(e => areSameExtensions(e.identifier, this.extension.identifier) && e.server !== this.extension.server)) {
|
||||||
this.class = `${SystemDisabledWarningAction.INFO_CLASS}`;
|
this.class = `${SystemDisabledWarningAction.INFO_CLASS}`;
|
||||||
this.tooltip = this.extension.server === this.extensionManagementServerService.localExtensionManagementServer
|
this.tooltip = this.extension.server === this.extensionManagementServerService.localExtensionManagementServer
|
||||||
? localize('Install language pack also in remote server', "Install the language pack extension on '{0}' to enable it also there.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer))
|
? localize('Install language pack also in remote server', "Install the language pack extension on '{0}' to enable it also there.", this.extensionManagementServerService.remoteExtensionManagementServer.label)
|
||||||
: localize('Install language pack also locally', "Install the language pack extension locally to enable it also there.");
|
: localize('Install language pack also locally', "Install the language pack extension locally to enable it also there.");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -2699,19 +2703,19 @@ export class SystemDisabledWarningAction extends ExtensionAction {
|
|||||||
if (this.extension.server === this.extensionManagementServerService.localExtensionManagementServer && !isUIExtension(this.extension.local.manifest, this.productService, this.configurationService)) {
|
if (this.extension.server === this.extensionManagementServerService.localExtensionManagementServer && !isUIExtension(this.extension.local.manifest, this.productService, this.configurationService)) {
|
||||||
if (runningExtensionServer === this.extensionManagementServerService.remoteExtensionManagementServer) {
|
if (runningExtensionServer === this.extensionManagementServerService.remoteExtensionManagementServer) {
|
||||||
this.class = `${SystemDisabledWarningAction.INFO_CLASS}`;
|
this.class = `${SystemDisabledWarningAction.INFO_CLASS}`;
|
||||||
this.tooltip = localize('disabled locally', "Extension is enabled on '{0}' and disabled locally.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer));
|
this.tooltip = localize('disabled locally', "Extension is enabled on '{0}' and disabled locally.", this.extensionManagementServerService.remoteExtensionManagementServer.label);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (localExtensionServer !== this.extensionManagementServerService.remoteExtensionManagementServer) {
|
if (localExtensionServer !== this.extensionManagementServerService.remoteExtensionManagementServer) {
|
||||||
this.class = `${SystemDisabledWarningAction.WARNING_CLASS}`;
|
this.class = `${SystemDisabledWarningAction.WARNING_CLASS}`;
|
||||||
this.tooltip = localize('Install in remote server', "Install the extension on '{0}' to enable.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer));
|
this.tooltip = localize('Install in remote server', "Install the extension on '{0}' to enable.", this.extensionManagementServerService.remoteExtensionManagementServer.label);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer && isUIExtension(this.extension.local.manifest, this.productService, this.configurationService)) {
|
if (this.extension.server === this.extensionManagementServerService.remoteExtensionManagementServer && isUIExtension(this.extension.local.manifest, this.productService, this.configurationService)) {
|
||||||
if (runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer) {
|
if (runningExtensionServer === this.extensionManagementServerService.localExtensionManagementServer) {
|
||||||
this.class = `${SystemDisabledWarningAction.INFO_CLASS}`;
|
this.class = `${SystemDisabledWarningAction.INFO_CLASS}`;
|
||||||
this.tooltip = localize('disabled remotely', "Extension is enabled locally and disabled on '{0}'.", this.getServerLabel(this.extensionManagementServerService.remoteExtensionManagementServer));
|
this.tooltip = localize('disabled remotely', "Extension is enabled locally and disabled on '{0}'.", this.extensionManagementServerService.remoteExtensionManagementServer.label);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (localExtensionServer !== this.extensionManagementServerService.localExtensionManagementServer) {
|
if (localExtensionServer !== this.extensionManagementServerService.localExtensionManagementServer) {
|
||||||
@@ -2722,12 +2726,6 @@ export class SystemDisabledWarningAction extends ExtensionAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private getServerLabel(server: IExtensionManagementServer): string {
|
|
||||||
if (server === this.extensionManagementServerService.remoteExtensionManagementServer) {
|
|
||||||
return this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.workbenchEnvironmentService.configuration.remoteAuthority) || localize('remote', "Remote");
|
|
||||||
}
|
|
||||||
return server.label;
|
|
||||||
}
|
|
||||||
run(): Promise<any> {
|
run(): Promise<any> {
|
||||||
return Promise.resolve(null);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
@@ -2750,11 +2748,11 @@ export class DisableAllAction extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private update(): void {
|
private update(): void {
|
||||||
this.enabled = this.extensionsWorkbenchService.local.some(e => e.type === ExtensionType.User && (e.enablementState === EnablementState.Enabled || e.enablementState === EnablementState.WorkspaceEnabled) && !!e.local && this.extensionEnablementService.canChangeEnablement(e.local));
|
this.enabled = this.extensionsWorkbenchService.local.some(e => e.type === ExtensionType.User && !!e.local && this.extensionEnablementService.isEnabled(e.local) && this.extensionEnablementService.canChangeEnablement(e.local));
|
||||||
}
|
}
|
||||||
|
|
||||||
run(): Promise<any> {
|
run(): Promise<any> {
|
||||||
return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(e => e.type === ExtensionType.User), EnablementState.Disabled);
|
return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(e => e.type === ExtensionType.User), EnablementState.DisabledGlobally);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2767,7 +2765,8 @@ export class DisableAllWorkpsaceAction extends Action {
|
|||||||
constructor(
|
constructor(
|
||||||
id: string = DisableAllWorkpsaceAction.ID, label: string = DisableAllWorkpsaceAction.LABEL,
|
id: string = DisableAllWorkpsaceAction.ID, label: string = DisableAllWorkpsaceAction.LABEL,
|
||||||
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
|
||||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService
|
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||||
|
@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService
|
||||||
) {
|
) {
|
||||||
super(id, label);
|
super(id, label);
|
||||||
this.update();
|
this.update();
|
||||||
@@ -2776,11 +2775,11 @@ export class DisableAllWorkpsaceAction extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private update(): void {
|
private update(): void {
|
||||||
this.enabled = this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY && this.extensionsWorkbenchService.local.some(e => e.type === ExtensionType.User && (e.enablementState === EnablementState.Enabled || e.enablementState === EnablementState.WorkspaceEnabled));
|
this.enabled = this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY && this.extensionsWorkbenchService.local.some(e => e.type === ExtensionType.User && !!e.local && this.extensionEnablementService.isEnabled(e.local) && this.extensionEnablementService.canChangeEnablement(e.local));
|
||||||
}
|
}
|
||||||
|
|
||||||
run(): Promise<any> {
|
run(): Promise<any> {
|
||||||
return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(e => e.type === ExtensionType.User), EnablementState.WorkspaceDisabled);
|
return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local.filter(e => e.type === ExtensionType.User), EnablementState.DisabledWorkspace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2801,11 +2800,11 @@ export class EnableAllAction extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private update(): void {
|
private update(): void {
|
||||||
this.enabled = this.extensionsWorkbenchService.local.some(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && (e.enablementState === EnablementState.Disabled || e.enablementState === EnablementState.WorkspaceDisabled));
|
this.enabled = this.extensionsWorkbenchService.local.some(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && !this.extensionEnablementService.isEnabled(e.local));
|
||||||
}
|
}
|
||||||
|
|
||||||
run(): Promise<any> {
|
run(): Promise<any> {
|
||||||
return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local, EnablementState.Enabled);
|
return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local, EnablementState.EnabledGlobally);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2828,11 +2827,11 @@ export class EnableAllWorkpsaceAction extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private update(): void {
|
private update(): void {
|
||||||
this.enabled = this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY && this.extensionsWorkbenchService.local.some(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && (e.enablementState === EnablementState.Disabled || e.enablementState === EnablementState.WorkspaceDisabled));
|
this.enabled = this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY && this.extensionsWorkbenchService.local.some(e => !!e.local && this.extensionEnablementService.canChangeEnablement(e.local) && !this.extensionEnablementService.isEnabled(e.local));
|
||||||
}
|
}
|
||||||
|
|
||||||
run(): Promise<any> {
|
run(): Promise<any> {
|
||||||
return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local, EnablementState.WorkspaceEnabled);
|
return this.extensionsWorkbenchService.setEnablement(this.extensionsWorkbenchService.local, EnablementState.EnabledWorkspace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2852,6 +2851,8 @@ export class OpenExtensionsFolderAction extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run(): Promise<void> {
|
run(): Promise<void> {
|
||||||
|
if (this.environmentService.extensionsPath) {
|
||||||
|
|
||||||
const extensionsHome = URI.file(this.environmentService.extensionsPath);
|
const extensionsHome = URI.file(this.environmentService.extensionsPath);
|
||||||
|
|
||||||
return Promise.resolve(this.fileService.resolve(extensionsHome)).then(file => {
|
return Promise.resolve(this.fileService.resolve(extensionsHome)).then(file => {
|
||||||
@@ -2865,6 +2866,8 @@ export class OpenExtensionsFolderAction extends Action {
|
|||||||
return this.windowsService.showItemInFolder(itemToShow);
|
return this.windowsService.showItemInFolder(itemToShow);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class InstallVSIXAction extends Action {
|
export class InstallVSIXAction extends Action {
|
||||||
@@ -2909,7 +2912,7 @@ export class InstallVSIXAction extends Action {
|
|||||||
{
|
{
|
||||||
label: localize('thirdPartExt.yes', 'Yes'),
|
label: localize('thirdPartExt.yes', 'Yes'),
|
||||||
run: () => {
|
run: () => {
|
||||||
this.extensionsWorkbenchService.install(vsix).then(extension => {
|
this.extensionsWorkbenchService.install(URI.file(vsix)).then(extension => {
|
||||||
const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local)));
|
const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local)));
|
||||||
const message = requireReload ? localize('InstallVSIXAction.successReload', "Please reload Azure Data Studio to complete installing the extension {0}.", extension.identifier.id)
|
const message = requireReload ? localize('InstallVSIXAction.successReload', "Please reload Azure Data Studio to complete installing the extension {0}.", extension.identifier.id)
|
||||||
: localize('InstallVSIXAction.success', "Completed installing the extension {0}.", extension.identifier.id);
|
: localize('InstallVSIXAction.success', "Completed installing the extension {0}.", extension.identifier.id);
|
||||||
@@ -2942,7 +2945,7 @@ export class InstallVSIXAction extends Action {
|
|||||||
{ sticky: true }
|
{ sticky: true }
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.extensionsWorkbenchService.install(vsix).then(extension => {
|
this.extensionsWorkbenchService.install(URI.file(vsix)).then(extension => {
|
||||||
const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local)));
|
const requireReload = !(extension.local && this.extensionService.canAddExtension(toExtensionDescription(extension.local)));
|
||||||
const message = requireReload ? localize('InstallVSIXAction.successReload', "Please reload Azure Data Studio to complete installing the extension {0}.", extension.identifier.id)
|
const message = requireReload ? localize('InstallVSIXAction.successReload', "Please reload Azure Data Studio to complete installing the extension {0}.", extension.identifier.id)
|
||||||
: localize('InstallVSIXAction.success', "Completed installing the extension {0}.", extension.identifier.id);
|
: localize('InstallVSIXAction.success', "Completed installing the extension {0}.", extension.identifier.id);
|
||||||
@@ -3048,7 +3051,8 @@ export class InstallSpecificVersionOfExtensionAction extends Action {
|
|||||||
@INotificationService private readonly notificationService: INotificationService,
|
@INotificationService private readonly notificationService: INotificationService,
|
||||||
@IWindowService private readonly windowService: IWindowService,
|
@IWindowService private readonly windowService: IWindowService,
|
||||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||||
@IExtensionService private readonly extensionService: IExtensionService
|
@IExtensionService private readonly extensionService: IExtensionService,
|
||||||
|
@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService,
|
||||||
) {
|
) {
|
||||||
super(id, label);
|
super(id, label);
|
||||||
}
|
}
|
||||||
@@ -3070,7 +3074,7 @@ export class InstallSpecificVersionOfExtensionAction extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private isEnabled(extension: IExtension): boolean {
|
private isEnabled(extension: IExtension): boolean {
|
||||||
return !!extension.gallery && (extension.enablementState === EnablementState.Enabled || extension.enablementState === EnablementState.WorkspaceEnabled);
|
return !!extension.gallery && !!extension.local && this.extensionEnablementService.isEnabled(extension.local);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getExtensionEntries(): Promise<(IQuickPickItem & { extension: IExtension, versions: IGalleryExtensionVersion[] })[]> {
|
private async getExtensionEntries(): Promise<(IQuickPickItem & { extension: IExtension, versions: IGalleryExtensionVersion[] })[]> {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import { InstallAction, UpdateAction, ManageExtensionAction, ReloadAction, Malic
|
|||||||
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||||
import { Label, RatingsWidget, InstallCountWidget, RecommendationWidget, RemoteBadgeWidget, TooltipWidget } from 'vs/workbench/contrib/extensions/browser/extensionsWidgets';
|
import { Label, RatingsWidget, InstallCountWidget, RecommendationWidget, RemoteBadgeWidget, TooltipWidget } from 'vs/workbench/contrib/extensions/browser/extensionsWidgets';
|
||||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||||
import { IExtensionManagementServerService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
import { IExtensionManagementServerService } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||||
import { isLanguagePackExtension } from 'vs/platform/extensions/common/extensions';
|
import { isLanguagePackExtension } from 'vs/platform/extensions/common/extensions';
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ import {
|
|||||||
ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction, DisableAllAction, EnableAllAction,
|
ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction, DisableAllAction, EnableAllAction,
|
||||||
EnableAutoUpdateAction, DisableAutoUpdateAction, ShowBuiltInExtensionsAction, InstallVSIXAction
|
EnableAutoUpdateAction, DisableAutoUpdateAction, ShowBuiltInExtensionsAction, InstallVSIXAction
|
||||||
} from 'vs/workbench/contrib/extensions/browser/extensionsActions';
|
} from 'vs/workbench/contrib/extensions/browser/extensionsActions';
|
||||||
import { IExtensionManagementService, IExtensionManagementServerService, IExtensionManagementServer, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
import { IExtensionManagementService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||||
|
import { IExtensionEnablementService, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||||
import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput';
|
import { ExtensionsInput } from 'vs/workbench/contrib/extensions/common/extensionsInput';
|
||||||
import { ExtensionsListView, EnabledExtensionsView, DisabledExtensionsView, RecommendedExtensionsView, WorkspaceRecommendedExtensionsView, BuiltInExtensionsView, BuiltInThemesExtensionsView, BuiltInBasicsExtensionsView, ServerExtensionsView, DefaultRecommendedExtensionsView } from 'vs/workbench/contrib/extensions/browser/extensionsViews';
|
import { ExtensionsListView, EnabledExtensionsView, DisabledExtensionsView, RecommendedExtensionsView, WorkspaceRecommendedExtensionsView, BuiltInExtensionsView, BuiltInThemesExtensionsView, BuiltInBasicsExtensionsView, ServerExtensionsView, DefaultRecommendedExtensionsView } from 'vs/workbench/contrib/extensions/browser/extensionsViews';
|
||||||
import { OpenGlobalSettingsAction } from 'vs/workbench/contrib/preferences/browser/preferencesActions';
|
import { OpenGlobalSettingsAction } from 'vs/workbench/contrib/preferences/browser/preferencesActions';
|
||||||
@@ -55,8 +56,6 @@ import { ExtensionType } from 'vs/platform/extensions/common/extensions';
|
|||||||
import { Registry } from 'vs/platform/registry/common/platform';
|
import { Registry } from 'vs/platform/registry/common/platform';
|
||||||
import { ViewContainerViewlet } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
import { ViewContainerViewlet } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
||||||
import { RemoteAuthorityContext } from 'vs/workbench/browser/contextkeys';
|
import { RemoteAuthorityContext } from 'vs/workbench/browser/contextkeys';
|
||||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
|
||||||
import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts';
|
|
||||||
import { ILabelService } from 'vs/platform/label/common/label';
|
import { ILabelService } from 'vs/platform/label/common/label';
|
||||||
import { MementoObject } from 'vs/workbench/common/memento';
|
import { MementoObject } from 'vs/workbench/common/memento';
|
||||||
|
|
||||||
@@ -97,7 +96,6 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio
|
|||||||
constructor(
|
constructor(
|
||||||
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
|
@IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService,
|
||||||
@ILabelService private readonly labelService: ILabelService,
|
@ILabelService private readonly labelService: ILabelService,
|
||||||
@IWorkbenchEnvironmentService private readonly workbenchEnvironmentService: IWorkbenchEnvironmentService
|
|
||||||
) {
|
) {
|
||||||
this.registerViews();
|
this.registerViews();
|
||||||
}
|
}
|
||||||
@@ -118,7 +116,9 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio
|
|||||||
viewDescriptors.push(this.createOtherRecommendedExtensionsListViewDescriptor());
|
viewDescriptors.push(this.createOtherRecommendedExtensionsListViewDescriptor());
|
||||||
viewDescriptors.push(this.createWorkspaceRecommendedExtensionsListViewDescriptor());
|
viewDescriptors.push(this.createWorkspaceRecommendedExtensionsListViewDescriptor());
|
||||||
|
|
||||||
|
if (this.extensionManagementServerService.localExtensionManagementServer) {
|
||||||
viewDescriptors.push(...this.createExtensionsViewDescriptorsForServer(this.extensionManagementServerService.localExtensionManagementServer));
|
viewDescriptors.push(...this.createExtensionsViewDescriptorsForServer(this.extensionManagementServerService.localExtensionManagementServer));
|
||||||
|
}
|
||||||
if (this.extensionManagementServerService.remoteExtensionManagementServer) {
|
if (this.extensionManagementServerService.remoteExtensionManagementServer) {
|
||||||
viewDescriptors.push(...this.createExtensionsViewDescriptorsForServer(this.extensionManagementServerService.remoteExtensionManagementServer));
|
viewDescriptors.push(...this.createExtensionsViewDescriptorsForServer(this.extensionManagementServerService.remoteExtensionManagementServer));
|
||||||
}
|
}
|
||||||
@@ -187,15 +187,15 @@ export class ExtensionsViewletViewsContribution implements IWorkbenchContributio
|
|||||||
|
|
||||||
private createExtensionsViewDescriptorsForServer(server: IExtensionManagementServer): IViewDescriptor[] {
|
private createExtensionsViewDescriptorsForServer(server: IExtensionManagementServer): IViewDescriptor[] {
|
||||||
const getViewName = (viewTitle: string, server: IExtensionManagementServer): string => {
|
const getViewName = (viewTitle: string, server: IExtensionManagementServer): string => {
|
||||||
const serverLabel = this.workbenchEnvironmentService.configuration.remoteAuthority === server.authority ? this.labelService.getHostLabel(REMOTE_HOST_SCHEME, server.authority) || server.label : server.label;
|
const serverLabel = server.label;
|
||||||
if (viewTitle && this.workbenchEnvironmentService.configuration.remoteAuthority) {
|
if (viewTitle && this.extensionManagementServerService.localExtensionManagementServer && this.extensionManagementServerService.remoteExtensionManagementServer) {
|
||||||
return `${serverLabel} - ${viewTitle}`;
|
return `${serverLabel} - ${viewTitle}`;
|
||||||
}
|
}
|
||||||
return viewTitle ? viewTitle : serverLabel;
|
return viewTitle ? viewTitle : serverLabel;
|
||||||
};
|
};
|
||||||
const getInstalledViewName = (): string => getViewName(localize('installed', "Installed"), server);
|
const getInstalledViewName = (): string => getViewName(localize('installed', "Installed"), server);
|
||||||
const getOutdatedViewName = (): string => getViewName(localize('outdated', "Outdated"), server);
|
const getOutdatedViewName = (): string => getViewName(localize('outdated', "Outdated"), server);
|
||||||
const onDidChangeServerLabel: EventOf<void> = this.workbenchEnvironmentService.configuration.remoteAuthority ? EventOf.map(this.labelService.onDidChangeFormatters, () => undefined) : EventOf.None;
|
const onDidChangeServerLabel: EventOf<void> = EventOf.map(this.labelService.onDidChangeFormatters, () => undefined);
|
||||||
return [{
|
return [{
|
||||||
id: `extensions.${server.authority}.installed`,
|
id: `extensions.${server.authority}.installed`,
|
||||||
get name() { return getInstalledViewName(); },
|
get name() { return getInstalledViewName(); },
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user