mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Move protocol client out (#643)
* close * connection is working * formatting * adds all * formatting * formatting and changing how features are initialized * formatting * changed named of typings file * update * updated to use dataprotocol npm * formatting * removed unneeded logging * readd npm shrinkwrap * still not working * removed unnecessary codfe * addressed comments * readded azure resource provider * fix capabilities cacheing * added backwards capat for older protocol * update shrinkwrap * update shrinkwrap * updated shrinkwrap * fixed tests * removed dead code * remove dead code * fix compile * remove backcompat stuff * change location of npm * vbump sqltools * merge master * fix imports * fix build breaks * update for sqlops * update yarn dependencies
This commit is contained in:
@@ -21,7 +21,6 @@ function yarnInstall(location, opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
yarnInstall('dataprotocol-client');
|
|
||||||
yarnInstall('extensions-modules');
|
yarnInstall('extensions-modules');
|
||||||
yarnInstall('extensions'); // node modules shared by all extensions
|
yarnInstall('extensions'); // node modules shared by all extensions
|
||||||
|
|
||||||
|
|||||||
178
build/yarn.lock
178
build/yarn.lock
@@ -344,6 +344,12 @@ commander@2.11.0:
|
|||||||
version "2.11.0"
|
version "2.11.0"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
|
||||||
|
|
||||||
|
commander@2.9.0:
|
||||||
|
version "2.9.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
|
||||||
|
dependencies:
|
||||||
|
graceful-readlink ">= 1.0.0"
|
||||||
|
|
||||||
commander@^2.9.0:
|
commander@^2.9.0:
|
||||||
version "2.13.0"
|
version "2.13.0"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
|
||||||
@@ -384,10 +390,12 @@ dashdash@^1.12.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
assert-plus "^1.0.0"
|
assert-plus "^1.0.0"
|
||||||
|
|
||||||
"dataprotocol-client@file:../dataprotocol-client":
|
"dataprotocol-client@git://github.com/Microsoft/sqlops-dataprotocolclient.git#release":
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
|
resolved "git://github.com/Microsoft/sqlops-dataprotocolclient.git#739fdf93140c3cb1bc882076bf11765b187bf8a3"
|
||||||
dependencies:
|
dependencies:
|
||||||
typescript "2.6.2"
|
sqlops "git://github.com/anthonydresser/vscode-extension-vscode"
|
||||||
|
vscode "1.1.5"
|
||||||
vscode-languageclient "3.5.0"
|
vscode-languageclient "3.5.0"
|
||||||
|
|
||||||
dateformat@^2.0.0:
|
dateformat@^2.0.0:
|
||||||
@@ -400,6 +408,12 @@ debug@2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ms "2.0.0"
|
ms "2.0.0"
|
||||||
|
|
||||||
|
debug@2.6.8:
|
||||||
|
version "2.6.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
|
||||||
|
dependencies:
|
||||||
|
ms "2.0.0"
|
||||||
|
|
||||||
debug@3.1.0, debug@^3.1.0:
|
debug@3.1.0, debug@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||||
@@ -464,6 +478,10 @@ delayed-stream@~1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
||||||
|
|
||||||
|
diff@3.2.0:
|
||||||
|
version "3.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"
|
||||||
|
|
||||||
diff@3.3.1:
|
diff@3.3.1:
|
||||||
version "3.3.1"
|
version "3.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
|
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
|
||||||
@@ -569,7 +587,7 @@ extend@~1.2.1:
|
|||||||
"extensions-modules@file:../extensions-modules":
|
"extensions-modules@file:../extensions-modules":
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
dataprotocol-client "file:C:/Users/andresse/AppData/Local/Yarn/cache/v1/dataprotocol-client"
|
dataprotocol-client "git://github.com/Microsoft/sqlops-dataprotocolclient.git#release"
|
||||||
decompress "^4.2.0"
|
decompress "^4.2.0"
|
||||||
fs-extra-promise "^1.0.1"
|
fs-extra-promise "^1.0.1"
|
||||||
http-proxy-agent "^2.0.0"
|
http-proxy-agent "^2.0.0"
|
||||||
@@ -758,7 +776,18 @@ glob-stream@^5.3.2:
|
|||||||
to-absolute-glob "^0.1.1"
|
to-absolute-glob "^0.1.1"
|
||||||
unique-stream "^2.0.2"
|
unique-stream "^2.0.2"
|
||||||
|
|
||||||
glob@7.1.2, glob@^7.0.5, glob@^7.1.2:
|
glob@7.1.1:
|
||||||
|
version "7.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
||||||
|
dependencies:
|
||||||
|
fs.realpath "^1.0.0"
|
||||||
|
inflight "^1.0.4"
|
||||||
|
inherits "2"
|
||||||
|
minimatch "^3.0.2"
|
||||||
|
once "^1.3.0"
|
||||||
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
glob@7.1.2, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2:
|
||||||
version "7.1.2"
|
version "7.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -797,6 +826,10 @@ growl@1.10.3:
|
|||||||
version "1.10.3"
|
version "1.10.3"
|
||||||
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f"
|
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f"
|
||||||
|
|
||||||
|
growl@1.9.2:
|
||||||
|
version "1.9.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
|
||||||
|
|
||||||
gulp-chmod@^2.0.0:
|
gulp-chmod@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-chmod/-/gulp-chmod-2.0.0.tgz#00c390b928a0799b251accf631aa09e01cc6299c"
|
resolved "https://registry.yarnpkg.com/gulp-chmod/-/gulp-chmod-2.0.0.tgz#00c390b928a0799b251accf631aa09e01cc6299c"
|
||||||
@@ -805,7 +838,7 @@ gulp-chmod@^2.0.0:
|
|||||||
stat-mode "^0.2.0"
|
stat-mode "^0.2.0"
|
||||||
through2 "^2.0.0"
|
through2 "^2.0.0"
|
||||||
|
|
||||||
gulp-filter@^5.0.1:
|
gulp-filter@^5.0.0, gulp-filter@^5.0.1:
|
||||||
version "5.1.0"
|
version "5.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-5.1.0.tgz#a05e11affb07cf7dcf41a7de1cb7b63ac3783e73"
|
resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-5.1.0.tgz#a05e11affb07cf7dcf41a7de1cb7b63ac3783e73"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -813,6 +846,13 @@ gulp-filter@^5.0.1:
|
|||||||
plugin-error "^0.1.2"
|
plugin-error "^0.1.2"
|
||||||
streamfilter "^1.0.5"
|
streamfilter "^1.0.5"
|
||||||
|
|
||||||
|
gulp-gunzip@0.0.3:
|
||||||
|
version "0.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/gulp-gunzip/-/gulp-gunzip-0.0.3.tgz#7b6e07b0f58fd3d42515c48ead5a63df0572f62f"
|
||||||
|
dependencies:
|
||||||
|
through2 "~0.6.5"
|
||||||
|
vinyl "~0.4.6"
|
||||||
|
|
||||||
gulp-gunzip@1.0.0:
|
gulp-gunzip@1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-gunzip/-/gulp-gunzip-1.0.0.tgz#15b741145e83a9c6f50886241b57cc5871f151a9"
|
resolved "https://registry.yarnpkg.com/gulp-gunzip/-/gulp-gunzip-1.0.0.tgz#15b741145e83a9c6f50886241b57cc5871f151a9"
|
||||||
@@ -820,7 +860,7 @@ gulp-gunzip@1.0.0:
|
|||||||
through2 "~0.6.5"
|
through2 "~0.6.5"
|
||||||
vinyl "~0.4.6"
|
vinyl "~0.4.6"
|
||||||
|
|
||||||
gulp-remote-src@^0.4.3:
|
gulp-remote-src@^0.4.2, gulp-remote-src@^0.4.3:
|
||||||
version "0.4.3"
|
version "0.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-remote-src/-/gulp-remote-src-0.4.3.tgz#5728cfd643433dd4845ddef0969f0f971a2ab4a1"
|
resolved "https://registry.yarnpkg.com/gulp-remote-src/-/gulp-remote-src-0.4.3.tgz#5728cfd643433dd4845ddef0969f0f971a2ab4a1"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -882,6 +922,18 @@ gulp-util@~3.0.8:
|
|||||||
through2 "^2.0.0"
|
through2 "^2.0.0"
|
||||||
vinyl "^0.5.0"
|
vinyl "^0.5.0"
|
||||||
|
|
||||||
|
gulp-vinyl-zip@^1.4.0:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/gulp-vinyl-zip/-/gulp-vinyl-zip-1.4.0.tgz#56382f2ccb57231bb0478c78737ccd572973bee1"
|
||||||
|
dependencies:
|
||||||
|
event-stream "^3.3.1"
|
||||||
|
queue "^3.0.10"
|
||||||
|
through2 "^0.6.3"
|
||||||
|
vinyl "^0.4.6"
|
||||||
|
vinyl-fs "^2.0.0"
|
||||||
|
yauzl "^2.2.1"
|
||||||
|
yazl "^2.2.1"
|
||||||
|
|
||||||
gulp-vinyl-zip@^2.1.0:
|
gulp-vinyl-zip@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.0.tgz#24e40685dc05b7149995245099e0590263be8dad"
|
resolved "https://registry.yarnpkg.com/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.0.tgz#24e40685dc05b7149995245099e0590263be8dad"
|
||||||
@@ -937,6 +989,10 @@ has-ansi@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex "^2.0.0"
|
ansi-regex "^2.0.0"
|
||||||
|
|
||||||
|
has-flag@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
|
||||||
|
|
||||||
has-flag@^2.0.0:
|
has-flag@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
|
||||||
@@ -1174,6 +1230,10 @@ json-stringify-safe@~5.0.1:
|
|||||||
version "5.0.1"
|
version "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"
|
||||||
|
|
||||||
|
json3@3.3.2:
|
||||||
|
version "3.3.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1"
|
||||||
|
|
||||||
jsonfile@^2.1.0:
|
jsonfile@^2.1.0:
|
||||||
version "2.4.0"
|
version "2.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
|
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
|
||||||
@@ -1223,10 +1283,21 @@ lazystream@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
readable-stream "^2.0.5"
|
readable-stream "^2.0.5"
|
||||||
|
|
||||||
|
lodash._baseassign@^3.0.0:
|
||||||
|
version "3.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
|
||||||
|
dependencies:
|
||||||
|
lodash._basecopy "^3.0.0"
|
||||||
|
lodash.keys "^3.0.0"
|
||||||
|
|
||||||
lodash._basecopy@^3.0.0:
|
lodash._basecopy@^3.0.0:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
|
resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
|
||||||
|
|
||||||
|
lodash._basecreate@^3.0.0:
|
||||||
|
version "3.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821"
|
||||||
|
|
||||||
lodash._basetostring@^3.0.0:
|
lodash._basetostring@^3.0.0:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
|
resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
|
||||||
@@ -1259,6 +1330,14 @@ lodash._root@^3.0.0:
|
|||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
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"
|
||||||
|
|
||||||
|
lodash.create@3.1.1:
|
||||||
|
version "3.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7"
|
||||||
|
dependencies:
|
||||||
|
lodash._baseassign "^3.0.0"
|
||||||
|
lodash._basecreate "^3.0.0"
|
||||||
|
lodash._isiterateecall "^3.0.0"
|
||||||
|
|
||||||
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"
|
||||||
@@ -1365,7 +1444,7 @@ mime@^1.3.4:
|
|||||||
version "1.4.1"
|
version "1.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
|
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
|
||||||
|
|
||||||
"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.4:
|
"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4:
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1385,6 +1464,23 @@ mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
minimist "0.0.8"
|
minimist "0.0.8"
|
||||||
|
|
||||||
|
mocha@^3.2.0:
|
||||||
|
version "3.5.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d"
|
||||||
|
dependencies:
|
||||||
|
browser-stdout "1.3.0"
|
||||||
|
commander "2.9.0"
|
||||||
|
debug "2.6.8"
|
||||||
|
diff "3.2.0"
|
||||||
|
escape-string-regexp "1.0.5"
|
||||||
|
glob "7.1.1"
|
||||||
|
growl "1.9.2"
|
||||||
|
he "1.1.1"
|
||||||
|
json3 "3.3.2"
|
||||||
|
lodash.create "3.1.1"
|
||||||
|
mkdirp "0.5.1"
|
||||||
|
supports-color "3.1.2"
|
||||||
|
|
||||||
mocha@^4.0.1:
|
mocha@^4.0.1:
|
||||||
version "4.1.0"
|
version "4.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794"
|
resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794"
|
||||||
@@ -1566,7 +1662,7 @@ querystringify@~1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb"
|
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb"
|
||||||
|
|
||||||
queue@^3.1.0:
|
queue@^3.0.10, queue@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/queue/-/queue-3.1.0.tgz#6c49d01f009e2256788789f2bffac6b8b9990585"
|
resolved "https://registry.yarnpkg.com/queue/-/queue-3.1.0.tgz#6c49d01f009e2256788789f2bffac6b8b9990585"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1652,7 +1748,7 @@ replace-ext@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
|
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
|
||||||
|
|
||||||
request@^2.83.0:
|
request@^2.79.0, request@^2.83.0:
|
||||||
version "2.83.0"
|
version "2.83.0"
|
||||||
resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356"
|
resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1763,7 +1859,7 @@ semaphore@1.0.5:
|
|||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.0.5.tgz#b492576e66af193db95d65e25ec53f5f19798d60"
|
resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.0.5.tgz#b492576e66af193db95d65e25ec53f5f19798d60"
|
||||||
|
|
||||||
semver@^5.4.1:
|
semver@^5.3.0, semver@^5.4.1:
|
||||||
version "5.5.0"
|
version "5.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
|
||||||
|
|
||||||
@@ -1779,12 +1875,22 @@ sntp@2.x.x:
|
|||||||
dependencies:
|
dependencies:
|
||||||
hoek "4.x.x"
|
hoek "4.x.x"
|
||||||
|
|
||||||
|
source-map-support@^0.4.11:
|
||||||
|
version "0.4.18"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
|
||||||
|
dependencies:
|
||||||
|
source-map "^0.5.6"
|
||||||
|
|
||||||
source-map-support@^0.5.0:
|
source-map-support@^0.5.0:
|
||||||
version "0.5.2"
|
version "0.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.2.tgz#1a6297fd5b2e762b39688c7fc91233b60984f0a5"
|
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.2.tgz#1a6297fd5b2e762b39688c7fc91233b60984f0a5"
|
||||||
dependencies:
|
dependencies:
|
||||||
source-map "^0.6.0"
|
source-map "^0.6.0"
|
||||||
|
|
||||||
|
source-map@^0.5.6:
|
||||||
|
version "0.5.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
||||||
|
|
||||||
source-map@^0.6.0:
|
source-map@^0.6.0:
|
||||||
version "0.6.1"
|
version "0.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||||
@@ -1799,6 +1905,25 @@ split@0.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
through "2"
|
through "2"
|
||||||
|
|
||||||
|
"sqlops@git://github.com/anthonydresser/vscode-extension-vscode":
|
||||||
|
version "1.1.10"
|
||||||
|
resolved "git://github.com/anthonydresser/vscode-extension-vscode#96cc0758d2528a33a12d73894a6d40c8bfb15ca1"
|
||||||
|
dependencies:
|
||||||
|
glob "^7.1.2"
|
||||||
|
gulp-chmod "^2.0.0"
|
||||||
|
gulp-filter "^5.0.1"
|
||||||
|
gulp-gunzip "1.0.0"
|
||||||
|
gulp-remote-src "^0.4.3"
|
||||||
|
gulp-symdest "^1.1.0"
|
||||||
|
gulp-untar "^0.0.6"
|
||||||
|
gulp-vinyl-zip "^2.1.0"
|
||||||
|
mocha "^4.0.1"
|
||||||
|
request "^2.83.0"
|
||||||
|
semver "^5.4.1"
|
||||||
|
source-map-support "^0.5.0"
|
||||||
|
url-parse "^1.1.9"
|
||||||
|
vinyl-source-stream "^1.1.0"
|
||||||
|
|
||||||
sshpk@^1.7.0:
|
sshpk@^1.7.0:
|
||||||
version "1.13.1"
|
version "1.13.1"
|
||||||
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
|
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
|
||||||
@@ -1876,6 +2001,12 @@ strip-dirs@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-natural-number "^4.0.1"
|
is-natural-number "^4.0.1"
|
||||||
|
|
||||||
|
supports-color@3.1.2:
|
||||||
|
version "3.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"
|
||||||
|
dependencies:
|
||||||
|
has-flag "^1.0.0"
|
||||||
|
|
||||||
supports-color@4.4.0:
|
supports-color@4.4.0:
|
||||||
version "4.4.0"
|
version "4.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e"
|
||||||
@@ -1910,7 +2041,7 @@ through2-filter@^2.0.0:
|
|||||||
through2 "~2.0.0"
|
through2 "~2.0.0"
|
||||||
xtend "~4.0.0"
|
xtend "~4.0.0"
|
||||||
|
|
||||||
through2@^0.6.0, through2@~0.6.5:
|
through2@^0.6.0, through2@^0.6.3, through2@~0.6.5:
|
||||||
version "0.6.5"
|
version "0.6.5"
|
||||||
resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
|
resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1968,10 +2099,6 @@ typescript@2.6.1:
|
|||||||
version "2.6.1"
|
version "2.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.1.tgz#ef39cdea27abac0b500242d6726ab90e0c846631"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.1.tgz#ef39cdea27abac0b500242d6726ab90e0c846631"
|
||||||
|
|
||||||
typescript@2.6.2:
|
|
||||||
version "2.6.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
|
|
||||||
|
|
||||||
unbzip2-stream@^1.0.9:
|
unbzip2-stream@^1.0.9:
|
||||||
version "1.2.5"
|
version "1.2.5"
|
||||||
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.2.5.tgz#73a033a567bbbde59654b193c44d48a7e4f43c47"
|
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.2.5.tgz#73a033a567bbbde59654b193c44d48a7e4f43c47"
|
||||||
@@ -2054,7 +2181,7 @@ vinyl-source-stream@^1.1.0:
|
|||||||
through2 "^2.0.3"
|
through2 "^2.0.3"
|
||||||
vinyl "^0.4.3"
|
vinyl "^0.4.3"
|
||||||
|
|
||||||
vinyl@^0.4.3, vinyl@~0.4.6:
|
vinyl@^0.4.3, vinyl@^0.4.6, vinyl@~0.4.6:
|
||||||
version "0.4.6"
|
version "0.4.6"
|
||||||
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847"
|
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -2128,6 +2255,25 @@ vscode-languageserver-types@^3.5.0:
|
|||||||
version "3.5.0"
|
version "3.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374"
|
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374"
|
||||||
|
|
||||||
|
vscode@1.1.5:
|
||||||
|
version "1.1.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/vscode/-/vscode-1.1.5.tgz#10eb104001840c3dd0813815fd4a05f8fc882d14"
|
||||||
|
dependencies:
|
||||||
|
glob "^7.1.1"
|
||||||
|
gulp-chmod "^2.0.0"
|
||||||
|
gulp-filter "^5.0.0"
|
||||||
|
gulp-gunzip "0.0.3"
|
||||||
|
gulp-remote-src "^0.4.2"
|
||||||
|
gulp-symdest "^1.1.0"
|
||||||
|
gulp-untar "^0.0.6"
|
||||||
|
gulp-vinyl-zip "^1.4.0"
|
||||||
|
mocha "^3.2.0"
|
||||||
|
request "^2.79.0"
|
||||||
|
semver "^5.3.0"
|
||||||
|
source-map-support "^0.4.11"
|
||||||
|
url-parse "^1.1.9"
|
||||||
|
vinyl-source-stream "^1.1.0"
|
||||||
|
|
||||||
vscode@^1.0.1:
|
vscode@^1.0.1:
|
||||||
version "1.1.10"
|
version "1.1.10"
|
||||||
resolved "https://registry.yarnpkg.com/vscode/-/vscode-1.1.10.tgz#d1cba378ab24f1d3ddf9cd470d242ee1472dd35b"
|
resolved "https://registry.yarnpkg.com/vscode/-/vscode-1.1.10.tgz#d1cba378ab24f1d3ddf9cd470d242ee1472dd35b"
|
||||||
|
|||||||
3
dataprotocol-client/.gitignore
vendored
3
dataprotocol-client/.gitignore
vendored
@@ -1,3 +0,0 @@
|
|||||||
lib
|
|
||||||
node_modules
|
|
||||||
npm-debug.log
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
src
|
|
||||||
.gitignore
|
|
||||||
tsfmt.json
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "dataprotocol-client",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "SQL Operations Studio studio implementation of vscode-language-client",
|
|
||||||
"main": "lib/main.js",
|
|
||||||
"typings": "./lib/main",
|
|
||||||
"scripts": {
|
|
||||||
"prepare": "node ./node_modules/vscode/bin/install && tsc -p ./src",
|
|
||||||
"compile": "tsc -p ./src",
|
|
||||||
"watch": "tsc -w -p ./src",
|
|
||||||
"update-vscode": "node ./node_modules/vscode/bin/install"
|
|
||||||
},
|
|
||||||
"author": "Microsoft",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"typescript": "2.6.2",
|
|
||||||
"vscode-languageclient": "3.5.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"vscode": "1.1.5"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"vscode": "^1.15"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
import * as data from 'data';
|
|
||||||
import * as proto from './protocol';
|
|
||||||
import * as types from './types';
|
|
||||||
|
|
||||||
export interface Ic2p {
|
|
||||||
asConnectionParams(connectionUri: string, connectionInfo: data.ConnectionInfo): proto.ConnectParams;
|
|
||||||
asExecutionPlanOptions(planOptions: data.ExecutionPlanOptions): types.ExecutionPlanOptions;
|
|
||||||
asScriptingParams(connectionUri: string, operation: data.ScriptOperation, metadata: data.ObjectMetadata, paramDetails: data.ScriptingParamDetails): types.ScriptingParams;
|
|
||||||
}
|
|
||||||
|
|
||||||
function asConnectionParams(ownerUri: string, connInfo: data.ConnectionInfo): proto.ConnectParams {
|
|
||||||
return {
|
|
||||||
ownerUri,
|
|
||||||
connection: {
|
|
||||||
options: connInfo.options
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function asExecutionPlanOptions(planOptions: data.ExecutionPlanOptions): types.ExecutionPlanOptions {
|
|
||||||
return {
|
|
||||||
includeEstimatedExecutionPlanXml: planOptions ? planOptions.displayEstimatedQueryPlan : undefined,
|
|
||||||
includeActualExecutionPlanXml: planOptions ? planOptions.displayActualQueryPlan : undefined
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function asScriptingParams(ownerURI: string, operation: data.ScriptOperation, metadata: data.ObjectMetadata, paramDetails: data.ScriptingParamDetails): types.ScriptingParams {
|
|
||||||
let scriptingObject: types.ScriptingObject = {
|
|
||||||
type: metadata.metadataTypeName,
|
|
||||||
schema: metadata.schema,
|
|
||||||
name: metadata.name
|
|
||||||
};
|
|
||||||
let targetDatabaseEngineEdition = paramDetails.targetDatabaseEngineEdition;
|
|
||||||
let targetDatabaseEngineType = paramDetails.targetDatabaseEngineType;
|
|
||||||
let scriptCompatibilityOption = paramDetails.scriptCompatibilityOption;
|
|
||||||
let scriptOptions: types.ScriptOptions = {
|
|
||||||
scriptCreateDrop: (operation === types.ScriptOperation.Delete) ? 'ScriptDrop' :
|
|
||||||
(operation === types.ScriptOperation.Select) ? 'ScriptSelect' : 'ScriptCreate',
|
|
||||||
typeOfDataToScript: 'SchemaOnly',
|
|
||||||
scriptStatistics: 'ScriptStatsNone',
|
|
||||||
targetDatabaseEngineEdition: targetDatabaseEngineEdition ? targetDatabaseEngineEdition : 'SqlServerEnterpriseEdition',
|
|
||||||
targetDatabaseEngineType: targetDatabaseEngineType ? targetDatabaseEngineType : 'SingleInstance',
|
|
||||||
scriptCompatibilityOption: scriptCompatibilityOption ? scriptCompatibilityOption : 'Script140Compat'
|
|
||||||
};
|
|
||||||
return {
|
|
||||||
connectionString: null,
|
|
||||||
filePath: paramDetails.filePath,
|
|
||||||
scriptingObjects: [scriptingObject],
|
|
||||||
scriptDestination: 'ToEditor',
|
|
||||||
includeObjectCriteria: null,
|
|
||||||
excludeObjectCriteria: null,
|
|
||||||
includeSchemas: null,
|
|
||||||
excludeSchemas: null,
|
|
||||||
includeTypes: null,
|
|
||||||
excludeTypes: null,
|
|
||||||
scriptOptions,
|
|
||||||
connectionDetails: null,
|
|
||||||
selectScript: null,
|
|
||||||
ownerURI,
|
|
||||||
operation
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export const c2p: Ic2p = {
|
|
||||||
asConnectionParams,
|
|
||||||
asExecutionPlanOptions,
|
|
||||||
asScriptingParams
|
|
||||||
};
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,633 +0,0 @@
|
|||||||
import { ClientCapabilities as VSClientCapabilities, RequestType, NotificationType } from 'vscode-languageclient';
|
|
||||||
|
|
||||||
import * as types from './types';
|
|
||||||
import * as data from 'data';
|
|
||||||
|
|
||||||
export interface ConnectionClientCapabilities {
|
|
||||||
connection?: {
|
|
||||||
/**
|
|
||||||
* Whether the connection support dynamic registration
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
backup?: {
|
|
||||||
/**
|
|
||||||
* Whether the backup support dynamic registration
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
restore?: {
|
|
||||||
/**
|
|
||||||
* Whether the restore support dynamic registration
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
query?: {
|
|
||||||
/**
|
|
||||||
* Whether the query support dynamic registration
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
objectExplorer?: {
|
|
||||||
/**
|
|
||||||
* Whether the object explorer support dynamic registration
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
scripting?: {
|
|
||||||
/**
|
|
||||||
* Whether the scripting support dynamic registration
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
taskServices?: {
|
|
||||||
/**
|
|
||||||
* Whether the task services support dynamic registration
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
fileBrowser?: {
|
|
||||||
/**
|
|
||||||
* Whether the file browser support dynamic registration
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
profiler?: {
|
|
||||||
/**
|
|
||||||
* Whether the profiler support dynamic registration
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
capabilities?: {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
metadata?: {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
adminServices?: {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
dynamicRegistration?: boolean;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ClientCapabilities extends VSClientCapabilities {
|
|
||||||
connection?: ConnectionClientCapabilities;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---- Refresh IntelliSense ----------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Notification sent when the an IntelliSense cache invalidation is requested
|
|
||||||
*/
|
|
||||||
export namespace RebuildIntelliSenseNotification {
|
|
||||||
export const type = new NotificationType<RebuildIntelliSenseParams, void>('textDocument/rebuildIntelliSense');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rebuild IntelliSense notification parameters
|
|
||||||
*/
|
|
||||||
export class RebuildIntelliSenseParams {
|
|
||||||
/**
|
|
||||||
* URI identifying the text document
|
|
||||||
*/
|
|
||||||
public ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------- < Connect Request > ----------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Connection request message format
|
|
||||||
*/
|
|
||||||
export interface ConnectParams {
|
|
||||||
/**
|
|
||||||
* URI identifying the owner of the connection
|
|
||||||
*/
|
|
||||||
ownerUri: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Details for creating the connection
|
|
||||||
*/
|
|
||||||
connection: types.ConnectionDetails;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Connection request message callback declaration
|
|
||||||
export namespace ConnectionRequest {
|
|
||||||
export const type = new RequestType<ConnectParams, boolean, void, void>('connection/connect');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Connection Complete Event > ------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
export namespace ConnectionCompleteNotification {
|
|
||||||
export const type = new NotificationType<types.ConnectionCompleteParams, void>('connection/complete');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Connection Changed Event > -------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parameters for the ConnectionChanged notification.
|
|
||||||
*/
|
|
||||||
export class ConnectionChangedParams {
|
|
||||||
/**
|
|
||||||
* Owner URI of the connection that changed.
|
|
||||||
*/
|
|
||||||
public ownerUri: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Summary of details containing any connection changes.
|
|
||||||
*/
|
|
||||||
public connection: types.ConnectionSummary;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Connection changed event callback declaration.
|
|
||||||
*/
|
|
||||||
export namespace ConnectionChangedNotification {
|
|
||||||
export const type = new NotificationType<ConnectionChangedParams, void>('connection/connectionchanged');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Disconnect Request > -------------------------------------------
|
|
||||||
|
|
||||||
// Disconnect request message format
|
|
||||||
export class DisconnectParams {
|
|
||||||
// URI identifying the owner of the connection
|
|
||||||
public ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disconnect response format
|
|
||||||
export type DisconnectResult = boolean;
|
|
||||||
|
|
||||||
// Disconnect request message callback declaration
|
|
||||||
export namespace DisconnectRequest {
|
|
||||||
export const type = new RequestType<DisconnectParams, DisconnectResult, void, void>('connection/disconnect');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Cancel Connect Request > ---------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
// Cancel connect request message format
|
|
||||||
export class CancelConnectParams {
|
|
||||||
/**
|
|
||||||
* URI identifying the owner of the connection
|
|
||||||
*/
|
|
||||||
public ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cancel connect response format.
|
|
||||||
export type CancelConnectResult = boolean;
|
|
||||||
|
|
||||||
// Cancel connect request message callback declaration
|
|
||||||
export namespace CancelConnectRequest {
|
|
||||||
export const type = new RequestType<CancelConnectParams, CancelConnectResult, void, void>('connection/cancelconnect');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Change Database Request > -------------------------------------
|
|
||||||
|
|
||||||
export class ChangeDatabaseParams {
|
|
||||||
public ownerUri: string;
|
|
||||||
public newDatabase: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace ChangeDatabaseRequest {
|
|
||||||
export const type = new RequestType<ChangeDatabaseParams, boolean, void, void>('connection/changedatabase');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < List Databases Request > ---------------------------------------
|
|
||||||
|
|
||||||
// List databases request format
|
|
||||||
export class ListDatabasesParams {
|
|
||||||
// Connection information to use for querying master
|
|
||||||
public ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// List databases request callback declaration
|
|
||||||
export namespace ListDatabasesRequest {
|
|
||||||
export const type = new RequestType<ListDatabasesParams, data.ListDatabasesResult, void, void>('connection/listdatabases');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Language Flavor Changed ================================================================================
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parameters to provide when sending a language flavor changed notification
|
|
||||||
*/
|
|
||||||
export interface DidChangeLanguageFlavorParams {
|
|
||||||
uri: string;
|
|
||||||
language: string;
|
|
||||||
flavor: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Language Flavor Changed Notification > ---------------------------------------
|
|
||||||
export namespace LanguageFlavorChangedNotification {
|
|
||||||
export const type = new NotificationType<DidChangeLanguageFlavorParams, void>('connection/languageflavorchanged');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Table Metadata Request > ---------------------------------------
|
|
||||||
|
|
||||||
// Table metadata request format
|
|
||||||
export class TableMetadataParams {
|
|
||||||
// Connection information to use for querying master
|
|
||||||
public ownerUri: string;
|
|
||||||
|
|
||||||
public schema: string;
|
|
||||||
|
|
||||||
public objectName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Table metadata response format
|
|
||||||
export class TableMetadataResult {
|
|
||||||
public columns: data.ColumnMetadata[];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Table metadata request callback declaration
|
|
||||||
export namespace TableMetadataRequest {
|
|
||||||
export const type = new RequestType<TableMetadataParams, TableMetadataResult, void, void>('metadata/table');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < View Metadata Request > ---------------------------------------
|
|
||||||
|
|
||||||
// Table metadata request callback declaration
|
|
||||||
export namespace ViewMetadataRequest {
|
|
||||||
export const type = new RequestType<TableMetadataParams, TableMetadataResult, void, void>('metadata/view');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event sent when the language service is finished updating after a connection
|
|
||||||
*/
|
|
||||||
export namespace IntelliSenseReadyNotification {
|
|
||||||
export const type = new NotificationType<types.IntelliSenseReadyParams, void>('textDocument/intelliSenseReady');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Capabilties Discovery Event > ------------------------------------
|
|
||||||
|
|
||||||
export class CapabiltiesDiscoveryParams {
|
|
||||||
public hostName: string;
|
|
||||||
|
|
||||||
public hostVersion: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace CapabiltiesDiscoveryRequest {
|
|
||||||
export const type = new RequestType<CapabiltiesDiscoveryParams, types.CapabiltiesDiscoveryResult, void, void>('capabilities/list');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Query Execution ================================================================================
|
|
||||||
// ------------------------------- < Query Cancellation Request > ------------------------------------
|
|
||||||
export namespace QueryCancelRequest {
|
|
||||||
export const type = new RequestType<QueryCancelParams, data.QueryCancelResult, void, void>('query/cancel');
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface QueryCancelParams {
|
|
||||||
ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Query Dispose Request > ------------------------------------
|
|
||||||
|
|
||||||
export namespace QueryDisposeRequest {
|
|
||||||
export const type = new RequestType<QueryDisposeParams, QueryDisposeResult, void, void>('query/dispose');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parameters to provide when disposing of a query
|
|
||||||
*/
|
|
||||||
export interface QueryDisposeParams {
|
|
||||||
ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Result received upon successful disposal of a query
|
|
||||||
*/
|
|
||||||
export interface QueryDisposeResult {
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Query Execution Complete Notification > ------------------------------------
|
|
||||||
export namespace QueryExecuteCompleteNotification {
|
|
||||||
export const type = new NotificationType<data.QueryExecuteCompleteNotificationResult, void>('query/complete');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Query Batch Start Notification > ------------------------------------
|
|
||||||
export namespace QueryExecuteBatchStartNotification {
|
|
||||||
export const type = new NotificationType<data.QueryExecuteBatchNotificationParams, void>('query/batchStart');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Query Batch Complete Notification > ------------------------------------
|
|
||||||
export namespace QueryExecuteBatchCompleteNotification {
|
|
||||||
export const type = new NotificationType<data.QueryExecuteBatchNotificationParams, void>('query/batchComplete');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Query ResultSet Complete Notification > ------------------------------------
|
|
||||||
export namespace QueryExecuteResultSetCompleteNotification {
|
|
||||||
export const type = new NotificationType<data.QueryExecuteResultSetCompleteNotificationParams, void>('query/resultSetComplete');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Query Message Notification > ------------------------------------
|
|
||||||
export namespace QueryExecuteMessageNotification {
|
|
||||||
export const type = new NotificationType<data.QueryExecuteMessageParams, void>('query/message');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Query Execution Request > ------------------------------------
|
|
||||||
export namespace QueryExecuteRequest {
|
|
||||||
export const type = new RequestType<types.QueryExecuteParams, QueryExecuteResult, void, void>('query/executeDocumentSelection');
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface QueryExecuteResult { }
|
|
||||||
|
|
||||||
// ------------------------------- < Query Results Request > ------------------------------------
|
|
||||||
export namespace QueryExecuteSubsetRequest {
|
|
||||||
export const type = new RequestType<data.QueryExecuteSubsetParams, data.QueryExecuteSubsetResult, void, void>('query/subset');
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ResultSetSubset {
|
|
||||||
rowCount: number;
|
|
||||||
rows: data.DbCellValue[][];
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Execute Statement > ------------------------------------
|
|
||||||
export interface QueryExecuteStatementParams {
|
|
||||||
ownerUri: string;
|
|
||||||
line: number;
|
|
||||||
column: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace QueryExecuteStatementRequest {
|
|
||||||
export const type = new RequestType<QueryExecuteStatementParams, QueryExecuteResult, void, void>('query/executedocumentstatement');
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------- < Save Results as CSV Request > ------------------------------------------
|
|
||||||
|
|
||||||
// save results in csv format
|
|
||||||
export namespace SaveResultsAsCsvRequest {
|
|
||||||
export const type = new RequestType<data.SaveResultsRequestParams, data.SaveResultRequestResult, void, void>('query/saveCsv');
|
|
||||||
}
|
|
||||||
// --------------------------------- </ Save Results as CSV Request > ------------------------------------------
|
|
||||||
|
|
||||||
// --------------------------------- < Save Results as JSON Request > ------------------------------------------
|
|
||||||
// save results in json format
|
|
||||||
export namespace SaveResultsAsJsonRequest {
|
|
||||||
export const type = new RequestType<data.SaveResultsRequestParams, data.SaveResultRequestResult, void, void>('query/saveJson');
|
|
||||||
}
|
|
||||||
// --------------------------------- </ Save Results as JSON Request > ------------------------------------------
|
|
||||||
|
|
||||||
// --------------------------------- < Save Results as Excel Request > ------------------------------------------
|
|
||||||
// save results in Excel format
|
|
||||||
export namespace SaveResultsAsExcelRequest {
|
|
||||||
export const type = new RequestType<data.SaveResultsRequestParams, data.SaveResultRequestResult, void, void>('query/saveExcel');
|
|
||||||
}
|
|
||||||
// --------------------------------- </ Save Results as Excel Request > ------------------------------------------
|
|
||||||
|
|
||||||
// ------------------------------- < Execute and Return > -----------------------------------
|
|
||||||
|
|
||||||
export namespace SimpleExecuteRequest {
|
|
||||||
export const type = new RequestType<data.SimpleExecuteParams, data.SimpleExecuteResult, void, void>('query/simpleexecute');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Execute String > ------------------------------------
|
|
||||||
export interface QueryExecuteStringParams {
|
|
||||||
query: string;
|
|
||||||
ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace QueryExecuteStringRequest {
|
|
||||||
export const type = new RequestType<QueryExecuteStringParams, QueryExecuteResult, void, void>('query/executeString');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Metadata Events > ------------------------------------
|
|
||||||
|
|
||||||
export namespace MetadataQueryRequest {
|
|
||||||
export const type = new RequestType<types.MetadataQueryParams, types.MetadataQueryResult, void, void>('metadata/list');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Scripting Events > ------------------------------------
|
|
||||||
|
|
||||||
export namespace ScriptingRequest {
|
|
||||||
export const type = new RequestType<types.ScriptingParams, data.ScriptingResult, void, void>('scripting/script');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Scripting Complete Event > ------------------------------------
|
|
||||||
|
|
||||||
export namespace ScriptingCompleteNotification {
|
|
||||||
export const type = new NotificationType<types.ScriptingCompleteParams, void>('scripting/scriptComplete');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Edit Data ======================================================================================
|
|
||||||
// Shared Interfaces --------------------------------------------------------------------------
|
|
||||||
export interface EditSessionOperationParams {
|
|
||||||
ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EditRowOperationParams extends EditSessionOperationParams {
|
|
||||||
rowId: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EditCellResult {
|
|
||||||
cell: data.EditCell;
|
|
||||||
isRowDirty: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
// edit/commit --------------------------------------------------------------------------------
|
|
||||||
export namespace EditCommitRequest {
|
|
||||||
export const type = new RequestType<data.EditCommitParams, EditCommitResult, void, void>('edit/commit');
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EditCommitResult { }
|
|
||||||
|
|
||||||
// edit/createRow -----------------------------------------------------------------------------
|
|
||||||
export namespace EditCreateRowRequest {
|
|
||||||
export const type = new RequestType<data.EditCreateRowParams, data.EditCreateRowResult, void, void>('edit/createRow');
|
|
||||||
}
|
|
||||||
|
|
||||||
// edit/deleteRow -----------------------------------------------------------------------------
|
|
||||||
export namespace EditDeleteRowRequest {
|
|
||||||
export const type = new RequestType<data.EditDeleteRowParams, EditDeleteRowResult, void, void>('edit/deleteRow');
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EditDeleteRowResult { }
|
|
||||||
|
|
||||||
// edit/dispose -------------------------------------------------------------------------------
|
|
||||||
export namespace EditDisposeRequest {
|
|
||||||
export const type = new RequestType<data.EditDisposeParams, EditDisposeResult, void, void>('edit/dispose');
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EditDisposeResult { }
|
|
||||||
|
|
||||||
// edit/initialize ----------------------------------------------------------------------------
|
|
||||||
export namespace EditInitializeRequest {
|
|
||||||
export const type = new RequestType<data.EditInitializeParams, EditInitializeResult, void, void>('edit/initialize');
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EditInitializeResult { }
|
|
||||||
|
|
||||||
// edit/revertCell --------------------------------------------------------------------------------
|
|
||||||
export namespace EditRevertCellRequest {
|
|
||||||
export const type = new RequestType<data.EditRevertCellParams, data.EditRevertCellResult, void, void>('edit/revertCell');
|
|
||||||
}
|
|
||||||
|
|
||||||
// edit/revertRow -----------------------------------------------------------------------------
|
|
||||||
export namespace EditRevertRowRequest {
|
|
||||||
export const type = new RequestType<data.EditRevertRowParams, EditRevertRowResult, void, void>('edit/revertRow');
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EditRevertRowResult { }
|
|
||||||
|
|
||||||
// edit/sessionReady Event --------------------------------------------------------------------
|
|
||||||
export namespace EditSessionReadyNotification {
|
|
||||||
export const type = new NotificationType<data.EditSessionReadyParams, void>('edit/sessionReady');
|
|
||||||
}
|
|
||||||
|
|
||||||
// edit/updateCell ----------------------------------------------------------------------------
|
|
||||||
export namespace EditUpdateCellRequest {
|
|
||||||
export const type = new RequestType<data.EditUpdateCellParams, data.EditUpdateCellResult, void, void>('edit/updateCell');
|
|
||||||
}
|
|
||||||
|
|
||||||
// edit/subset ------------------------------------------------------------------------------------
|
|
||||||
export namespace EditSubsetRequest {
|
|
||||||
export const type = new RequestType<data.EditSubsetParams, data.EditSubsetResult, void, void>('edit/subset');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Object Explorer Events > ------------------------------------
|
|
||||||
|
|
||||||
export namespace ObjectExplorerCreateSessionRequest {
|
|
||||||
export const type = new RequestType<types.ConnectionDetails, types.CreateSessionResponse, void, void>('objectexplorer/createsession');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace ObjectExplorerExpandRequest {
|
|
||||||
export const type = new RequestType<types.ExpandParams, boolean, void, void>('objectexplorer/expand');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace ObjectExplorerRefreshRequest {
|
|
||||||
export const type = new RequestType<types.ExpandParams, boolean, void, void>('objectexplorer/refresh');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace ObjectExplorerCloseSessionRequest {
|
|
||||||
export const type = new RequestType<types.CloseSessionParams, types.CloseSessionResponse, void, void>('objectexplorer/closesession');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Object Explorer Events > ------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
export namespace ObjectExplorerCreateSessionCompleteNotification {
|
|
||||||
export const type = new NotificationType<types.SessionCreatedParameters, void>('objectexplorer/sessioncreated');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace ObjectExplorerExpandCompleteNotification {
|
|
||||||
export const type = new NotificationType<types.ExpandResponse, void>('objectexplorer/expandCompleted');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Task Service Events > ------------------------------------
|
|
||||||
|
|
||||||
export namespace ListTasksRequest {
|
|
||||||
export const type = new RequestType<data.ListTasksParams, data.ListTasksResponse, void, void>('tasks/listtasks');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace CancelTaskRequest {
|
|
||||||
export const type = new RequestType<data.CancelTaskParams, boolean, void, void>('tasks/canceltask');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Task Service Events > ------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
export namespace TaskStatusChangedNotification {
|
|
||||||
export const type = new NotificationType<data.TaskProgressInfo, void>('tasks/statuschanged');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace TaskCreatedNotification {
|
|
||||||
export const type = new NotificationType<data.TaskInfo, void>('tasks/newtaskcreated');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Admin Service Events > ------------------------------------
|
|
||||||
|
|
||||||
export namespace CreateDatabaseRequest {
|
|
||||||
export const type = new RequestType<types.CreateDatabaseParams, data.CreateDatabaseResponse, void, void>('admin/createdatabase');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace DefaultDatabaseInfoRequest {
|
|
||||||
export const type = new RequestType<types.DefaultDatabaseInfoParams, types.DefaultDatabaseInfoResponse, void, void>('admin/defaultdatabaseinfo');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace CreateLoginRequest {
|
|
||||||
export const type = new RequestType<types.CreateLoginParams, data.CreateLoginResponse, void, void>('admin/createlogin');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace GetDatabaseInfoRequest {
|
|
||||||
export const type = new RequestType<types.GetDatabaseInfoParams, types.GetDatabaseInfoResponse, void, void>('admin/getdatabaseinfo');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < Disaster Recovery Events > ------------------------------------
|
|
||||||
|
|
||||||
export namespace BackupRequest {
|
|
||||||
export const type = new RequestType<types.BackupParams, data.BackupResponse, void, void>('backup/backup');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace BackupConfigInfoRequest {
|
|
||||||
export const type = new RequestType<types.DefaultDatabaseInfoParams, types.BackupConfigInfoResponse, void, void>('backup/backupconfiginfo');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace RestoreRequest {
|
|
||||||
export const type = new RequestType<types.RestoreParams, data.RestoreResponse, void, void>('restore/restore');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace RestorePlanRequest {
|
|
||||||
export const type = new RequestType<types.RestoreParams, data.RestorePlanResponse, void, void>('restore/restoreplan');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace CancelRestorePlanRequest {
|
|
||||||
export const type = new RequestType<types.RestoreParams, boolean, void, void>('restore/cancelrestoreplan');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace RestoreConfigInfoRequest {
|
|
||||||
export const type = new RequestType<types.RestoreConfigInfoRequestParams, types.RestoreConfigInfoResponse, void, void>('restore/restoreconfiginfo');
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------- < File Browser Events > ------------------------------------
|
|
||||||
|
|
||||||
export namespace FileBrowserOpenRequest {
|
|
||||||
export const type = new RequestType<types.FileBrowserOpenParams, boolean, void, void>('filebrowser/open');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace FileBrowserOpenedNotification {
|
|
||||||
export const type = new NotificationType<data.FileBrowserOpenedParams, void>('filebrowser/opencomplete');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace FileBrowserExpandRequest {
|
|
||||||
export const type = new RequestType<types.FileBrowserExpandParams, boolean, void, void>('filebrowser/expand');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace FileBrowserExpandedNotification {
|
|
||||||
export const type = new NotificationType<data.FileBrowserExpandedParams, void>('filebrowser/expandcomplete');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace FileBrowserValidateRequest {
|
|
||||||
export const type = new RequestType<types.FileBrowserValidateParams, boolean, void, void>('filebrowser/validate');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace FileBrowserValidatedNotification {
|
|
||||||
export const type = new NotificationType<data.FileBrowserValidatedParams, void>('filebrowser/validatecomplete');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace FileBrowserCloseRequest {
|
|
||||||
export const type = new RequestType<types.FileBrowserCloseParams, data.FileBrowserCloseResponse, void, void>('filebrowser/close');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------- < Profiler Events > ------------------------------------
|
|
||||||
|
|
||||||
export namespace StartProfilingRequest {
|
|
||||||
export const type = new RequestType<types.StartProfilingParams, types.StartProfilingResponse, void, void>('profiler/start');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace StopProfilingRequest {
|
|
||||||
export const type = new RequestType<types.StopProfilingParams, types.StopProfilingResponse, void, void>('profiler/stop');
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace ProfilerEventsAvailableNotification {
|
|
||||||
export const type = new NotificationType<types.ProfilerEventsAvailableParams, void>('profiler/eventsavailable');
|
|
||||||
}
|
|
||||||
@@ -1,198 +0,0 @@
|
|||||||
import * as data from 'data';
|
|
||||||
import * as types from './types';
|
|
||||||
|
|
||||||
export interface Ip2c {
|
|
||||||
asProviderMetadata(params: types.MetadataQueryResult): data.ProviderMetadata;
|
|
||||||
|
|
||||||
asServerCapabilities(result: types.CapabiltiesDiscoveryResult): data.DataProtocolServerCapabilities;
|
|
||||||
}
|
|
||||||
|
|
||||||
function asProviderMetadata(params: types.MetadataQueryResult): data.ProviderMetadata {
|
|
||||||
let objectMetadata: data.ObjectMetadata[] = [];
|
|
||||||
|
|
||||||
if (!params.metadata || !params.metadata.length) {
|
|
||||||
return {
|
|
||||||
objectMetadata
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < params.metadata.length; ++i) {
|
|
||||||
let metadata: data.ObjectMetadata = params.metadata[i];
|
|
||||||
|
|
||||||
let metadataTypeName: string;
|
|
||||||
if (metadata.metadataTypeName) {
|
|
||||||
// Read from the provider since it's defined
|
|
||||||
metadataTypeName = metadata.metadataTypeName;
|
|
||||||
} else if (metadata.metadataType === types.MetadataType.View) {
|
|
||||||
metadataTypeName = 'View';
|
|
||||||
} else if (metadata.metadataType === types.MetadataType.SProc) {
|
|
||||||
metadataTypeName = 'StoredProcedure';
|
|
||||||
} else if (metadata.metadataType === types.MetadataType.Function) {
|
|
||||||
metadataTypeName = 'Function';
|
|
||||||
} else {
|
|
||||||
metadataTypeName = 'Table';
|
|
||||||
}
|
|
||||||
|
|
||||||
objectMetadata.push({
|
|
||||||
metadataTypeName,
|
|
||||||
metadataType: metadata.metadataType,
|
|
||||||
name: metadata.name,
|
|
||||||
schema: metadata.schema,
|
|
||||||
urn: metadata.urn
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return <data.ProviderMetadata>{
|
|
||||||
objectMetadata
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function asServiceOptionType(val: string): data.ServiceOptionType {
|
|
||||||
if (val === 'string') {
|
|
||||||
return data.ServiceOptionType.string;
|
|
||||||
} else if (val === 'multistring') {
|
|
||||||
return data.ServiceOptionType.multistring;
|
|
||||||
} else if (val === 'password') {
|
|
||||||
return data.ServiceOptionType.password;
|
|
||||||
} else if (val === 'number') {
|
|
||||||
return data.ServiceOptionType.number;
|
|
||||||
} else if (val === 'boolean') {
|
|
||||||
return data.ServiceOptionType.boolean;
|
|
||||||
} else if (val === 'category') {
|
|
||||||
return data.ServiceOptionType.category;
|
|
||||||
} else if (val === 'object') {
|
|
||||||
return data.ServiceOptionType.object;
|
|
||||||
}
|
|
||||||
|
|
||||||
// assume string for unknown value types
|
|
||||||
return data.ServiceOptionType.string;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function buildServiceOption(srcOption: types.ServiceOption): data.ServiceOption {
|
|
||||||
return {
|
|
||||||
name: srcOption.name,
|
|
||||||
displayName: srcOption.displayName ? srcOption.displayName : srcOption.name,
|
|
||||||
description: srcOption.description,
|
|
||||||
groupName: srcOption.groupName,
|
|
||||||
defaultValue: srcOption.defaultValue,
|
|
||||||
categoryValues: srcOption.categoryValues,
|
|
||||||
isRequired: srcOption.isRequired,
|
|
||||||
isArray: srcOption.isArray,
|
|
||||||
objectType: srcOption.objectType,
|
|
||||||
valueType: asServiceOptionType(srcOption.valueType),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function asServerCapabilities(result: types.CapabiltiesDiscoveryResult): data.DataProtocolServerCapabilities {
|
|
||||||
let capabilities: data.DataProtocolServerCapabilities = {
|
|
||||||
protocolVersion: result.capabilities.protocolVersion,
|
|
||||||
providerName: result.capabilities.providerName,
|
|
||||||
providerDisplayName: result.capabilities.providerDisplayName,
|
|
||||||
connectionProvider: undefined,
|
|
||||||
adminServicesProvider: undefined,
|
|
||||||
features: []
|
|
||||||
};
|
|
||||||
|
|
||||||
if (result.capabilities.adminServicesProvider) {
|
|
||||||
capabilities.adminServicesProvider = <data.AdminServicesOptions>{
|
|
||||||
databaseInfoOptions: new Array<data.ServiceOption>(),
|
|
||||||
databaseFileInfoOptions: new Array<data.ServiceOption>(),
|
|
||||||
fileGroupInfoOptions: new Array<data.ServiceOption>()
|
|
||||||
};
|
|
||||||
|
|
||||||
if (result.capabilities.adminServicesProvider.databaseInfoOptions
|
|
||||||
&& result.capabilities.adminServicesProvider.databaseInfoOptions.length > 0) {
|
|
||||||
for (let i = 0; i < result.capabilities.adminServicesProvider.databaseInfoOptions.length; ++i) {
|
|
||||||
let srcOption: any = result.capabilities.adminServicesProvider.databaseInfoOptions[i];
|
|
||||||
let descOption: data.ServiceOption = buildServiceOption(srcOption);
|
|
||||||
capabilities.adminServicesProvider.databaseInfoOptions.push(descOption);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.capabilities.adminServicesProvider.databaseFileInfoOptions
|
|
||||||
&& result.capabilities.adminServicesProvider.databaseFileInfoOptions.length > 0) {
|
|
||||||
for (let i = 0; i < result.capabilities.adminServicesProvider.databaseFileInfoOptions.length; ++i) {
|
|
||||||
//let srcOption: types.ServiceOption = result.capabilities.adminServicesProvider.databaseFileInfoOptions[i];
|
|
||||||
let srcOption: any = result.capabilities.adminServicesProvider.databaseFileInfoOptions[i];
|
|
||||||
let descOption: data.ServiceOption = buildServiceOption(srcOption);
|
|
||||||
capabilities.adminServicesProvider.databaseFileInfoOptions.push(descOption);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.capabilities.adminServicesProvider.fileGroupInfoOptions
|
|
||||||
&& result.capabilities.adminServicesProvider.fileGroupInfoOptions.length > 0) {
|
|
||||||
for (let i = 0; i < result.capabilities.adminServicesProvider.fileGroupInfoOptions.length; ++i) {
|
|
||||||
//let srcOption: types.ServiceOption = result.capabilities.adminServicesProvider.fileGroupInfoOptions[i];
|
|
||||||
let srcOption: any = result.capabilities.adminServicesProvider.fileGroupInfoOptions[i];
|
|
||||||
let descOption: data.ServiceOption = buildServiceOption(srcOption);
|
|
||||||
capabilities.adminServicesProvider.fileGroupInfoOptions.push(descOption);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.capabilities.connectionProvider
|
|
||||||
&& result.capabilities.connectionProvider.options
|
|
||||||
&& result.capabilities.connectionProvider.options.length > 0) {
|
|
||||||
capabilities.connectionProvider = <data.ConnectionProviderOptions>{
|
|
||||||
options: new Array<data.ConnectionOption>()
|
|
||||||
};
|
|
||||||
for (let i = 0; i < result.capabilities.connectionProvider.options.length; ++i) {
|
|
||||||
let srcOption: any = result.capabilities.connectionProvider.options[i];
|
|
||||||
let descOption: data.ConnectionOption = {
|
|
||||||
name: srcOption.name,
|
|
||||||
displayName: srcOption.displayName ? srcOption.displayName : srcOption.name,
|
|
||||||
description: srcOption.description,
|
|
||||||
groupName: srcOption.groupName,
|
|
||||||
defaultValue: srcOption.defaultValue,
|
|
||||||
categoryValues: srcOption.categoryValues,
|
|
||||||
isIdentity: srcOption.isIdentity,
|
|
||||||
isRequired: srcOption.isRequired,
|
|
||||||
valueType: asServiceOptionType(srcOption.valueType),
|
|
||||||
specialValueType: undefined
|
|
||||||
};
|
|
||||||
|
|
||||||
if (srcOption.specialValueType === 'serverName') {
|
|
||||||
descOption.specialValueType = data.ConnectionOptionSpecialType.serverName;
|
|
||||||
} else if (srcOption.specialValueType === 'databaseName') {
|
|
||||||
descOption.specialValueType = data.ConnectionOptionSpecialType.databaseName;
|
|
||||||
} else if (srcOption.specialValueType === 'authType') {
|
|
||||||
descOption.specialValueType = data.ConnectionOptionSpecialType.authType;
|
|
||||||
} else if (srcOption.specialValueType === 'userName') {
|
|
||||||
descOption.specialValueType = data.ConnectionOptionSpecialType.userName;
|
|
||||||
} else if (srcOption.specialValueType === 'password') {
|
|
||||||
descOption.specialValueType = data.ConnectionOptionSpecialType.password;
|
|
||||||
} else if (srcOption.specialValueType === 'appName') {
|
|
||||||
descOption.specialValueType = data.ConnectionOptionSpecialType.appName;
|
|
||||||
}
|
|
||||||
|
|
||||||
capabilities.connectionProvider.options.push(descOption);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.capabilities.features
|
|
||||||
&& result.capabilities.features.length > 0) {
|
|
||||||
result.capabilities.features.forEach(feature => {
|
|
||||||
let descFeature: data.FeatureMetadataProvider = {
|
|
||||||
enabled: feature.enabled,
|
|
||||||
featureName: feature.featureName,
|
|
||||||
optionsMetadata: []
|
|
||||||
};
|
|
||||||
capabilities.features.push(descFeature);
|
|
||||||
if (feature.optionsMetadata) {
|
|
||||||
feature.optionsMetadata.forEach(srcOption => {
|
|
||||||
descFeature.optionsMetadata.push(buildServiceOption(<any>srcOption));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return capabilities;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const p2c: Ip2c = {
|
|
||||||
asProviderMetadata,
|
|
||||||
asServerCapabilities
|
|
||||||
};
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "es6",
|
|
||||||
"module": "commonjs",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"sourceMap": false,
|
|
||||||
"inlineSources": false,
|
|
||||||
"declaration": true,
|
|
||||||
"stripInternal": true,
|
|
||||||
"outDir": "../lib"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,939 +0,0 @@
|
|||||||
import * as data from 'data';
|
|
||||||
|
|
||||||
export interface CreateSessionResponse {
|
|
||||||
sessionId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SessionCreatedParameters {
|
|
||||||
success: boolean;
|
|
||||||
sessionId: string;
|
|
||||||
rootNode: NodeInfo;
|
|
||||||
errorMessage: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExpandResponse {
|
|
||||||
nodePath: string;
|
|
||||||
sessionId: string;
|
|
||||||
nodes: NodeInfo[];
|
|
||||||
errorMessage: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NodeInfo {
|
|
||||||
nodePath: string;
|
|
||||||
nodeType: string;
|
|
||||||
nodeSubType: string;
|
|
||||||
nodeStatus: string;
|
|
||||||
label: string;
|
|
||||||
isLeaf: boolean;
|
|
||||||
metadata: data.ObjectMetadata;
|
|
||||||
errorMessage: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExpandParams {
|
|
||||||
sessionId: string;
|
|
||||||
nodePath: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CloseSessionParams {
|
|
||||||
sessionId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CloseSessionResponse {
|
|
||||||
success: boolean;
|
|
||||||
sessionId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CategoryValue {
|
|
||||||
displayName: string;
|
|
||||||
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ServiceOption {
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
displayName: string;
|
|
||||||
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
groupName: string;
|
|
||||||
|
|
||||||
valueType: string;
|
|
||||||
|
|
||||||
defaultValue: string;
|
|
||||||
|
|
||||||
objectType: string;
|
|
||||||
|
|
||||||
categoryValues: CategoryValue[];
|
|
||||||
|
|
||||||
isRequired: boolean;
|
|
||||||
|
|
||||||
isArray: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ConnectionOption {
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
displayName: string;
|
|
||||||
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
groupName: string;
|
|
||||||
|
|
||||||
valueType: string;
|
|
||||||
|
|
||||||
defaultValue: string;
|
|
||||||
|
|
||||||
objectType: string;
|
|
||||||
|
|
||||||
categoryValues: CategoryValue[];
|
|
||||||
|
|
||||||
specialValueType: string;
|
|
||||||
|
|
||||||
isIdentity: boolean;
|
|
||||||
|
|
||||||
isRequired: boolean;
|
|
||||||
|
|
||||||
isArray: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ConnectionProviderOptions {
|
|
||||||
options: ConnectionOption[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AdminServicesProviderOptions {
|
|
||||||
databaseInfoOptions: ServiceOption[];
|
|
||||||
|
|
||||||
databaseFileInfoOptions: ServiceOption[];
|
|
||||||
|
|
||||||
fileGroupInfoOptions: ServiceOption[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FeatureMetadataProvider {
|
|
||||||
enabled: boolean;
|
|
||||||
featureName: string;
|
|
||||||
optionsMetadata: ServiceOption[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parameters to initialize a connection to a database
|
|
||||||
*/
|
|
||||||
export interface ConnectionDetails {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* connection options
|
|
||||||
*/
|
|
||||||
options: {};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Summary that identifies a unique database connection.
|
|
||||||
*/
|
|
||||||
export class ConnectionSummary {
|
|
||||||
/**
|
|
||||||
* server name
|
|
||||||
*/
|
|
||||||
public serverName: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* database name
|
|
||||||
*/
|
|
||||||
public databaseName: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* user name
|
|
||||||
*/
|
|
||||||
public userName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Connection response format.
|
|
||||||
*/
|
|
||||||
export class ConnectionCompleteParams {
|
|
||||||
/**
|
|
||||||
* URI identifying the owner of the connection
|
|
||||||
*/
|
|
||||||
public ownerUri: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* connection id returned from service host.
|
|
||||||
*/
|
|
||||||
public connectionId: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* any diagnostic messages return from the service host.
|
|
||||||
*/
|
|
||||||
public messages: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Error message returned from the engine, if any.
|
|
||||||
*/
|
|
||||||
public errorMessage: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Error number returned from the engine, if any.
|
|
||||||
*/
|
|
||||||
public errorNumber: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Information about the connected server.
|
|
||||||
*/
|
|
||||||
public serverInfo: ServerInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* information about the actual connection established
|
|
||||||
*/
|
|
||||||
public connectionSummary: ConnectionSummary;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update event parameters
|
|
||||||
*/
|
|
||||||
export class IntelliSenseReadyParams {
|
|
||||||
/**
|
|
||||||
* URI identifying the text document
|
|
||||||
*/
|
|
||||||
public ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Information about a SQL Server instance.
|
|
||||||
*/
|
|
||||||
export class ServerInfo {
|
|
||||||
/**
|
|
||||||
* The major version of the SQL Server instance.
|
|
||||||
*/
|
|
||||||
public serverMajorVersion: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The minor version of the SQL Server instance.
|
|
||||||
*/
|
|
||||||
public serverMinorVersion: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The build of the SQL Server instance.
|
|
||||||
*/
|
|
||||||
public serverReleaseVersion: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The ID of the engine edition of the SQL Server instance.
|
|
||||||
*/
|
|
||||||
public engineEditionId: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* String containing the full server version text.
|
|
||||||
*/
|
|
||||||
public serverVersion: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* String describing the product level of the server.
|
|
||||||
*/
|
|
||||||
public serverLevel: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The edition of the SQL Server instance.
|
|
||||||
*/
|
|
||||||
public serverEdition: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether the SQL Server instance is running in the cloud (Azure) or not.
|
|
||||||
*/
|
|
||||||
public isCloud: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The version of Azure that the SQL Server instance is running on, if applicable.
|
|
||||||
*/
|
|
||||||
public azureVersion: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Operating System version string of the machine running the SQL Server instance.
|
|
||||||
*/
|
|
||||||
public osVersion: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class CapabiltiesDiscoveryResult {
|
|
||||||
public capabilities: data.DataProtocolServerCapabilities;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Task Services types
|
|
||||||
|
|
||||||
export enum TaskStatus {
|
|
||||||
notStarted = 0,
|
|
||||||
inProgress = 1,
|
|
||||||
succeeded = 2,
|
|
||||||
succeededWithWarning = 3,
|
|
||||||
failed = 4,
|
|
||||||
canceled = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
// Admin Services types
|
|
||||||
|
|
||||||
export interface CreateDatabaseParams {
|
|
||||||
ownerUri: string;
|
|
||||||
|
|
||||||
databaseInfo: data.DatabaseInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DefaultDatabaseInfoParams {
|
|
||||||
ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DefaultDatabaseInfoResponse {
|
|
||||||
defaultDatabaseInfo: data.DatabaseInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetDatabaseInfoResponse {
|
|
||||||
databaseInfo: data.DatabaseInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetDatabaseInfoParams {
|
|
||||||
ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface BackupConfigInfoResponse {
|
|
||||||
backupConfigInfo: data.BackupConfigInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateLoginParams {
|
|
||||||
ownerUri: string;
|
|
||||||
|
|
||||||
loginInfo: data.LoginInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disaster Recovery types
|
|
||||||
|
|
||||||
export interface BackupInfo {
|
|
||||||
ownerUri: string;
|
|
||||||
|
|
||||||
databaseName: string;
|
|
||||||
|
|
||||||
backupType: number;
|
|
||||||
|
|
||||||
backupComponent: number;
|
|
||||||
|
|
||||||
backupDeviceType: number;
|
|
||||||
|
|
||||||
selectedFiles: string;
|
|
||||||
|
|
||||||
backupsetName: string;
|
|
||||||
|
|
||||||
selectedFileGroup: { [path: string]: string };
|
|
||||||
|
|
||||||
// List of {key: backup path, value: device type}
|
|
||||||
backupPathDevices: { [path: string]: number };
|
|
||||||
|
|
||||||
backupPathList: [string];
|
|
||||||
|
|
||||||
isCopyOnly: boolean;
|
|
||||||
|
|
||||||
formatMedia: boolean;
|
|
||||||
|
|
||||||
initialize: boolean;
|
|
||||||
|
|
||||||
skipTapeHeader: boolean;
|
|
||||||
|
|
||||||
mediaName: string;
|
|
||||||
|
|
||||||
mediaDescription: string;
|
|
||||||
|
|
||||||
checksum: boolean;
|
|
||||||
|
|
||||||
continueAfterError: boolean;
|
|
||||||
|
|
||||||
logTruncation: boolean;
|
|
||||||
|
|
||||||
tailLogBackup: boolean;
|
|
||||||
|
|
||||||
retainDays: number;
|
|
||||||
|
|
||||||
compressionOption: number;
|
|
||||||
|
|
||||||
verifyBackupRequired: boolean;
|
|
||||||
|
|
||||||
encryptionAlgorithm: number;
|
|
||||||
|
|
||||||
encryptorType: number;
|
|
||||||
|
|
||||||
encryptorName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface BackupParams {
|
|
||||||
ownerUri: string;
|
|
||||||
|
|
||||||
backupInfo: BackupInfo;
|
|
||||||
|
|
||||||
taskExecutionMode: data.TaskExecutionMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RestoreParams {
|
|
||||||
ownerUri: string;
|
|
||||||
options: {};
|
|
||||||
taskExecutionMode: data.TaskExecutionMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RestoreConfigInfoRequestParams {
|
|
||||||
ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RestoreConfigInfoResponse {
|
|
||||||
configInfo: { [key: string]: any };
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RestoreDatabaseFileInfo {
|
|
||||||
fileType: string;
|
|
||||||
|
|
||||||
logicalFileName: string;
|
|
||||||
|
|
||||||
originalFileName: string;
|
|
||||||
|
|
||||||
restoreAsFileName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FileBrowserOpenParams {
|
|
||||||
ownerUri: string;
|
|
||||||
expandPath: string;
|
|
||||||
fileFilters: string[];
|
|
||||||
changeFilter: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FileTreeNode {
|
|
||||||
children: FileTreeNode[];
|
|
||||||
isExpanded: boolean;
|
|
||||||
isFile: boolean;
|
|
||||||
name: string;
|
|
||||||
fullPath: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FileTree {
|
|
||||||
rootNode: FileTreeNode;
|
|
||||||
selectedNode: FileTreeNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FileBrowserExpandParams {
|
|
||||||
ownerUri: string;
|
|
||||||
expandPath: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FileBrowserValidateParams {
|
|
||||||
ownerUri: string;
|
|
||||||
serviceType: string;
|
|
||||||
selectedFiles: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FileBrowserCloseParams {
|
|
||||||
ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DatabaseFileInfo {
|
|
||||||
properties: LocalizedPropertyInfo[];
|
|
||||||
id: string;
|
|
||||||
isSelected: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface LocalizedPropertyInfo {
|
|
||||||
propertyName: string;
|
|
||||||
propertyValue: string;
|
|
||||||
propertyDisplayName: string;
|
|
||||||
propertyValueDisplayName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RestorePlanDetailInfo {
|
|
||||||
name: string;
|
|
||||||
currentValue: any;
|
|
||||||
isReadOnly: boolean;
|
|
||||||
isVisible: boolean;
|
|
||||||
defaultValue: any;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Query Execution types
|
|
||||||
export interface ResultSetSummary {
|
|
||||||
id: number;
|
|
||||||
batchId: number;
|
|
||||||
rowCount: number;
|
|
||||||
columnInfo: IDbColumn[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface BatchSummary {
|
|
||||||
hasError: boolean;
|
|
||||||
id: number;
|
|
||||||
selection: data.ISelectionData;
|
|
||||||
resultSetSummaries: ResultSetSummary[];
|
|
||||||
executionElapsed: string;
|
|
||||||
executionEnd: string;
|
|
||||||
executionStart: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IDbColumn {
|
|
||||||
allowDBNull?: boolean;
|
|
||||||
baseCatalogName: string;
|
|
||||||
baseColumnName: string;
|
|
||||||
baseSchemaName: string;
|
|
||||||
baseServerName: string;
|
|
||||||
baseTableName: string;
|
|
||||||
columnName: string;
|
|
||||||
columnOrdinal?: number;
|
|
||||||
columnSize?: number;
|
|
||||||
isAliased?: boolean;
|
|
||||||
isAutoIncrement?: boolean;
|
|
||||||
isExpression?: boolean;
|
|
||||||
isHidden?: boolean;
|
|
||||||
isIdentity?: boolean;
|
|
||||||
isKey?: boolean;
|
|
||||||
isBytes?: boolean;
|
|
||||||
isChars?: boolean;
|
|
||||||
isSqlVariant?: boolean;
|
|
||||||
isUdt?: boolean;
|
|
||||||
dataType: string;
|
|
||||||
isXml?: boolean;
|
|
||||||
isJson?: boolean;
|
|
||||||
isLong?: boolean;
|
|
||||||
isReadOnly?: boolean;
|
|
||||||
isUnique?: boolean;
|
|
||||||
numericPrecision?: number;
|
|
||||||
numericScale?: number;
|
|
||||||
udtAssemblyQualifiedName: string;
|
|
||||||
dataTypeName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IGridResultSet {
|
|
||||||
columns: IDbColumn[];
|
|
||||||
rowsUri: string;
|
|
||||||
numberOfRows: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IResultMessage {
|
|
||||||
batchId?: number;
|
|
||||||
isError: boolean;
|
|
||||||
time: string;
|
|
||||||
message: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExecutionPlanOptions {
|
|
||||||
includeEstimatedExecutionPlanXml?: boolean;
|
|
||||||
includeActualExecutionPlanXml?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface QueryExecuteParams {
|
|
||||||
ownerUri: string;
|
|
||||||
querySelection: data.ISelectionData;
|
|
||||||
executionPlanOptions?: ExecutionPlanOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum EditRowState {
|
|
||||||
clean = 0,
|
|
||||||
dirtyInsert = 1,
|
|
||||||
dirtyDelete = 2,
|
|
||||||
dirtyUpdate = 3
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EditRow {
|
|
||||||
cells: data.DbCellValue[];
|
|
||||||
id: number;
|
|
||||||
isDirty: boolean;
|
|
||||||
state: EditRowState;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class MetadataQueryParams {
|
|
||||||
/**
|
|
||||||
* Owner URI of the connection that changed.
|
|
||||||
*/
|
|
||||||
public ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used as value version of data.MetadataType THESE SHOULD MIRROR
|
|
||||||
*/
|
|
||||||
export enum MetadataType {
|
|
||||||
Table = 0,
|
|
||||||
View = 1,
|
|
||||||
SProc = 2,
|
|
||||||
Function = 3
|
|
||||||
}
|
|
||||||
|
|
||||||
export class MetadataQueryResult {
|
|
||||||
public metadata: data.ObjectMetadata[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ScriptOptions {
|
|
||||||
/**
|
|
||||||
* Generate ANSI padding statements
|
|
||||||
*/
|
|
||||||
scriptANSIPadding?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Append the generated script to a file
|
|
||||||
*/
|
|
||||||
appendToFile?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Continue to script if an error occurs. Otherwise, stop.
|
|
||||||
*/
|
|
||||||
continueScriptingOnError?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert user-defined data types to base types.
|
|
||||||
*/
|
|
||||||
convertUDDTToBaseType?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate script for dependent objects for each object scripted.
|
|
||||||
*/
|
|
||||||
generateScriptForDependentObjects?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Include descriptive headers for each object generated.
|
|
||||||
*/
|
|
||||||
includeDescriptiveHeaders?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check that an object with the given name exists before dropping or altering or that an object with the given name does not exist before creating.
|
|
||||||
*/
|
|
||||||
includeIfNotExists?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script options to set vardecimal storage format.
|
|
||||||
*/
|
|
||||||
includeVarDecimal?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Include system generated constraint names to enforce declarative referential integrity.
|
|
||||||
*/
|
|
||||||
scriptDRIIncludeSystemNames?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Include statements in the script that are not supported on the specified SQL Server database engine type.
|
|
||||||
*/
|
|
||||||
includeUnsupportedStatements?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prefix object names with the object schema.
|
|
||||||
*/
|
|
||||||
schemaQualify?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script options to set bindings option.
|
|
||||||
*/
|
|
||||||
bindings?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the objects that use collation.
|
|
||||||
*/
|
|
||||||
collation?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the default values.
|
|
||||||
*/
|
|
||||||
default?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script Object CREATE/DROP statements.
|
|
||||||
*/
|
|
||||||
scriptCreateDrop: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the Extended Properties for each object scripted.
|
|
||||||
*/
|
|
||||||
scriptExtendedProperties?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script only features compatible with the specified version of SQL Server.
|
|
||||||
*/
|
|
||||||
scriptCompatibilityOption: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script only features compatible with the specified SQL Server database engine type.
|
|
||||||
*/
|
|
||||||
targetDatabaseEngineType: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script only features compatible with the specified SQL Server database engine edition.
|
|
||||||
*/
|
|
||||||
targetDatabaseEngineEdition: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script all logins available on the server. Passwords will not be scripted.
|
|
||||||
*/
|
|
||||||
scriptLogins?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate object-level permissions.
|
|
||||||
*/
|
|
||||||
scriptObjectLevelPermissions?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script owner for the objects.
|
|
||||||
*/
|
|
||||||
scriptOwner?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script statistics, and optionally include histograms, for each selected table or view.
|
|
||||||
*/
|
|
||||||
scriptStatistics: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate USE DATABASE statement.
|
|
||||||
*/
|
|
||||||
scripUseDatabase?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate script that contains schema only or schema and data.
|
|
||||||
*/
|
|
||||||
typeOfDataToScript: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scripts the change tracking information.
|
|
||||||
*/
|
|
||||||
scriptChangeTracking?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the check constraints for each table or view scripted.
|
|
||||||
*/
|
|
||||||
scriptCheckConstraints?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scripts the data compression information.
|
|
||||||
*/
|
|
||||||
scriptDataCompressionOptions?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the foreign keys for each table scripted.
|
|
||||||
*/
|
|
||||||
scriptForeignKeys?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the full-text indexes for each table or indexed view scripted.
|
|
||||||
*/
|
|
||||||
scriptFullTextIndexes?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the indexes (including XML and clustered indexes) for each table or indexed view scripted.
|
|
||||||
*/
|
|
||||||
scriptIndexes?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the primary keys for each table or view scripted
|
|
||||||
*/
|
|
||||||
scriptPrimaryKeys?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the triggers for each table or view scripted
|
|
||||||
*/
|
|
||||||
scriptTriggers?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Script the unique keys for each table or view scripted.
|
|
||||||
*/
|
|
||||||
uniqueKeys?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ScriptingObject {
|
|
||||||
/**
|
|
||||||
* The database object type
|
|
||||||
*/
|
|
||||||
type: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The schema of the database object
|
|
||||||
*/
|
|
||||||
schema: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The database object name
|
|
||||||
*/
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ScriptingParams {
|
|
||||||
/**
|
|
||||||
* File path used when writing out the script.
|
|
||||||
*/
|
|
||||||
filePath: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether scripting to a single file or file per object.
|
|
||||||
*/
|
|
||||||
scriptDestination: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Connection string of the target database the scripting operation will run against.
|
|
||||||
*/
|
|
||||||
connectionString: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of scripting objects to script
|
|
||||||
*/
|
|
||||||
scriptingObjects: ScriptingObject[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of scripting object which specify the include criteria of objects to script.
|
|
||||||
*/
|
|
||||||
includeObjectCriteria: ScriptingObject[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of scripting object which specify the exclude criteria of objects to not script.
|
|
||||||
*/
|
|
||||||
excludeObjectCriteria: ScriptingObject[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of schema name of objects to script.
|
|
||||||
*/
|
|
||||||
includeSchemas: string[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of schema name of objects to not script.
|
|
||||||
*/
|
|
||||||
excludeSchemas: string[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of type name of objects to script.
|
|
||||||
*/
|
|
||||||
includeTypes: string[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of type name of objects to not script.
|
|
||||||
*/
|
|
||||||
excludeTypes: string[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scripting options for the ScriptingParams
|
|
||||||
*/
|
|
||||||
scriptOptions: ScriptOptions;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Connection details for the ScriptingParams
|
|
||||||
*/
|
|
||||||
connectionDetails: ConnectionDetails;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Owner URI of the connection
|
|
||||||
*/
|
|
||||||
ownerURI: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether the scripting operation is for
|
|
||||||
* select script statements
|
|
||||||
*/
|
|
||||||
selectScript: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Operation associated with the script request
|
|
||||||
*/
|
|
||||||
operation: data.ScriptOperation;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ScriptingCompleteParams {
|
|
||||||
/**
|
|
||||||
* The error details for an error that occurred during the scripting operation.
|
|
||||||
*/
|
|
||||||
errorDetails: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The error message for an error that occurred during the scripting operation.
|
|
||||||
*/
|
|
||||||
errorMessage: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A value to indicate an error occurred during the scripting operation.
|
|
||||||
*/
|
|
||||||
hasError: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A value to indicate the scripting operation was canceled.
|
|
||||||
*/
|
|
||||||
canceled: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A value to indicate the scripting operation successfully completed.
|
|
||||||
*/
|
|
||||||
success: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class TableMetadata {
|
|
||||||
|
|
||||||
columns: data.ColumnMetadata[];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parameters to start a profiler session
|
|
||||||
*/
|
|
||||||
export interface StartProfilingParams {
|
|
||||||
/**
|
|
||||||
* Session Owner URI
|
|
||||||
*/
|
|
||||||
ownerUri: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Session options
|
|
||||||
*/
|
|
||||||
options: {};
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StartProfilingResponse {
|
|
||||||
succeeded: string;
|
|
||||||
errorMessage: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parameters to start a profiler session
|
|
||||||
*/
|
|
||||||
export interface StopProfilingParams {
|
|
||||||
/**
|
|
||||||
* Session Owner URI
|
|
||||||
*/
|
|
||||||
ownerUri: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StopProfilingResponse {
|
|
||||||
succeeded: string;
|
|
||||||
errorMessage: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Profiler Event
|
|
||||||
*/
|
|
||||||
export interface ProfilerEvent {
|
|
||||||
/**
|
|
||||||
* Event class name
|
|
||||||
*/
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event timestamp
|
|
||||||
*/
|
|
||||||
timestamp: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event values
|
|
||||||
*/
|
|
||||||
values: {};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Profiler events available notification parameters
|
|
||||||
*/
|
|
||||||
export interface ProfilerEventsAvailableParams {
|
|
||||||
/**
|
|
||||||
* Session owner URI
|
|
||||||
*/
|
|
||||||
ownerUri: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* New profiler events available
|
|
||||||
*/
|
|
||||||
events: ProfilerEvent[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used as value version of data.ScriptOperation THESE SHOULD BE THE SAME
|
|
||||||
*/
|
|
||||||
export enum ScriptOperation {
|
|
||||||
Select = 0,
|
|
||||||
Create = 1,
|
|
||||||
Insert = 2,
|
|
||||||
Update = 3,
|
|
||||||
Delete = 4,
|
|
||||||
Execute = 5,
|
|
||||||
Alter = 6
|
|
||||||
}
|
|
||||||
2
dataprotocol-client/src/typings/ref.d.ts
vendored
2
dataprotocol-client/src/typings/ref.d.ts
vendored
@@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
/// <reference path='../../../src/sql/data.d.ts'/>
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"tabSize": 4,
|
|
||||||
"indentSize": 4,
|
|
||||||
"newLineCharacter": "\n",
|
|
||||||
"convertTabsToSpaces": false,
|
|
||||||
"insertSpaceAfterCommaDelimiter": true,
|
|
||||||
"insertSpaceAfterSemicolonInForStatements": true,
|
|
||||||
"insertSpaceBeforeAndAfterBinaryOperators": true,
|
|
||||||
"insertSpaceAfterKeywordsInControlFlowStatements": true,
|
|
||||||
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
|
|
||||||
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
|
|
||||||
"insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
|
|
||||||
"insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
|
|
||||||
"insertSpaceBeforeFunctionParenthesis": false,
|
|
||||||
"placeOpenBraceOnNewLineForFunctions": false,
|
|
||||||
"placeOpenBraceOnNewLineForControlBlocks": false
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Shared modules for Carbon extensions",
|
"description": "Shared modules for Carbon extensions",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dataprotocol-client": "file:../dataprotocol-client",
|
"dataprotocol-client": "git://github.com/Microsoft/sqlops-dataprotocolclient.git#release",
|
||||||
"decompress": "^4.2.0",
|
"decompress": "^4.2.0",
|
||||||
"fs-extra-promise": "^1.0.1",
|
"fs-extra-promise": "^1.0.1",
|
||||||
"http-proxy-agent": "^2.0.0",
|
"http-proxy-agent": "^2.0.0",
|
||||||
|
|||||||
@@ -353,6 +353,7 @@ export class SqlToolsServiceClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this._serviceStatus.showServiceLoading();
|
this._serviceStatus.showServiceLoading();
|
||||||
// cache the client instance for later use
|
// cache the client instance for later use
|
||||||
client = new SqlOpsDataClient(SqlToolsServiceClient._constants.serviceName, serverOptions, clientOptions);
|
client = new SqlOpsDataClient(SqlToolsServiceClient._constants.serviceName, serverOptions, clientOptions);
|
||||||
|
|||||||
2
extensions-modules/src/typings/ref.d.ts
vendored
2
extensions-modules/src/typings/ref.d.ts
vendored
@@ -4,4 +4,4 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/// <reference path='../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../src/sql/data.d.ts'/>
|
/// <reference path='../../../src/sql/sqlops.d.ts'/>
|
||||||
@@ -25,12 +25,24 @@ amdefine@>=0.0.4:
|
|||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
|
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
|
||||||
|
|
||||||
|
ansi-cyan@^0.1.1:
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873"
|
||||||
|
dependencies:
|
||||||
|
ansi-wrap "0.1.0"
|
||||||
|
|
||||||
ansi-gray@^0.1.1:
|
ansi-gray@^0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251"
|
resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251"
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-wrap "0.1.0"
|
ansi-wrap "0.1.0"
|
||||||
|
|
||||||
|
ansi-red@^0.1.1:
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c"
|
||||||
|
dependencies:
|
||||||
|
ansi-wrap "0.1.0"
|
||||||
|
|
||||||
ansi-regex@^0.2.0, ansi-regex@^0.2.1:
|
ansi-regex@^0.2.0, ansi-regex@^0.2.1:
|
||||||
version "0.2.1"
|
version "0.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9"
|
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9"
|
||||||
@@ -55,6 +67,13 @@ applicationinsights@0.18.0:
|
|||||||
version "0.18.0"
|
version "0.18.0"
|
||||||
resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-0.18.0.tgz#162ebb48a383408bc4de44db32b417307f45bbc1"
|
resolved "https://registry.yarnpkg.com/applicationinsights/-/applicationinsights-0.18.0.tgz#162ebb48a383408bc4de44db32b417307f45bbc1"
|
||||||
|
|
||||||
|
arr-diff@^1.0.1:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a"
|
||||||
|
dependencies:
|
||||||
|
arr-flatten "^1.0.1"
|
||||||
|
array-slice "^0.2.3"
|
||||||
|
|
||||||
arr-diff@^2.0.0:
|
arr-diff@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
|
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
|
||||||
@@ -65,6 +84,10 @@ arr-flatten@^1.0.1:
|
|||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
|
resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
|
||||||
|
|
||||||
|
arr-union@^2.0.1:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d"
|
||||||
|
|
||||||
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"
|
||||||
@@ -73,6 +96,10 @@ array-find-index@^1.0.1:
|
|||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
|
resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
|
||||||
|
|
||||||
|
array-slice@^0.2.3:
|
||||||
|
version "0.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5"
|
||||||
|
|
||||||
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"
|
||||||
@@ -186,6 +213,10 @@ braces@^1.8.2:
|
|||||||
preserve "^0.2.0"
|
preserve "^0.2.0"
|
||||||
repeat-element "^1.1.2"
|
repeat-element "^1.1.2"
|
||||||
|
|
||||||
|
browser-stdout@1.3.0:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
|
||||||
|
|
||||||
buffer-crc32@~0.2.3:
|
buffer-crc32@~0.2.3:
|
||||||
version "0.2.13"
|
version "0.2.13"
|
||||||
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
|
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
|
||||||
@@ -261,6 +292,10 @@ clone@^1.0.0:
|
|||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f"
|
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f"
|
||||||
|
|
||||||
|
clone@^2.1.1:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb"
|
||||||
|
|
||||||
cloneable-readable@^1.0.0:
|
cloneable-readable@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117"
|
resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117"
|
||||||
@@ -287,10 +322,20 @@ commander@0.6.1:
|
|||||||
version "0.6.1"
|
version "0.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06"
|
||||||
|
|
||||||
|
commander@2.11.0:
|
||||||
|
version "2.11.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
|
||||||
|
|
||||||
commander@2.3.0:
|
commander@2.3.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873"
|
||||||
|
|
||||||
|
commander@2.9.0:
|
||||||
|
version "2.9.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
|
||||||
|
dependencies:
|
||||||
|
graceful-readlink ">= 1.0.0"
|
||||||
|
|
||||||
commander@^2.9.0:
|
commander@^2.9.0:
|
||||||
version "2.13.0"
|
version "2.13.0"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
|
||||||
@@ -337,10 +382,12 @@ dashdash@^1.12.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
assert-plus "^1.0.0"
|
assert-plus "^1.0.0"
|
||||||
|
|
||||||
"dataprotocol-client@file:../dataprotocol-client":
|
"dataprotocol-client@git://github.com/Microsoft/sqlops-dataprotocolclient.git#release":
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
|
resolved "git://github.com/Microsoft/sqlops-dataprotocolclient.git#739fdf93140c3cb1bc882076bf11765b187bf8a3"
|
||||||
dependencies:
|
dependencies:
|
||||||
typescript "2.6.2"
|
sqlops "git://github.com/anthonydresser/vscode-extension-vscode"
|
||||||
|
vscode "1.1.5"
|
||||||
vscode-languageclient "3.5.0"
|
vscode-languageclient "3.5.0"
|
||||||
|
|
||||||
dateformat@^1.0.7-1.2.3:
|
dateformat@^1.0.7-1.2.3:
|
||||||
@@ -366,7 +413,13 @@ debug@2.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ms "0.7.1"
|
ms "0.7.1"
|
||||||
|
|
||||||
debug@^3.1.0:
|
debug@2.6.8:
|
||||||
|
version "2.6.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
|
||||||
|
dependencies:
|
||||||
|
ms "2.0.0"
|
||||||
|
|
||||||
|
debug@3.1.0, debug@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -438,6 +491,14 @@ diff@1.4.0:
|
|||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf"
|
resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf"
|
||||||
|
|
||||||
|
diff@3.2.0:
|
||||||
|
version "3.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9"
|
||||||
|
|
||||||
|
diff@3.3.1:
|
||||||
|
version "3.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
|
||||||
|
|
||||||
duplexer2@0.0.2:
|
duplexer2@0.0.2:
|
||||||
version "0.0.2"
|
version "0.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
|
resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
|
||||||
@@ -489,7 +550,7 @@ escape-string-regexp@1.0.2:
|
|||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1"
|
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1"
|
||||||
|
|
||||||
escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2:
|
escape-string-regexp@1.0.5, escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||||
|
|
||||||
@@ -529,6 +590,12 @@ expand-range@^1.8.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
fill-range "^2.1.0"
|
fill-range "^2.1.0"
|
||||||
|
|
||||||
|
extend-shallow@^1.1.2:
|
||||||
|
version "1.1.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071"
|
||||||
|
dependencies:
|
||||||
|
kind-of "^1.1.0"
|
||||||
|
|
||||||
extend-shallow@^2.0.1:
|
extend-shallow@^2.0.1:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
|
resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
|
||||||
@@ -664,6 +731,15 @@ fs.realpath@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
|
|
||||||
|
fstream@^1.0.2:
|
||||||
|
version "1.0.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171"
|
||||||
|
dependencies:
|
||||||
|
graceful-fs "^4.1.2"
|
||||||
|
inherits "~2.0.0"
|
||||||
|
mkdirp ">=0.5 0"
|
||||||
|
rimraf "2"
|
||||||
|
|
||||||
fstream@~0.1.28:
|
fstream@~0.1.28:
|
||||||
version "0.1.31"
|
version "0.1.31"
|
||||||
resolved "https://registry.yarnpkg.com/fstream/-/fstream-0.1.31.tgz#7337f058fbbbbefa8c9f561a28cab0849202c988"
|
resolved "https://registry.yarnpkg.com/fstream/-/fstream-0.1.31.tgz#7337f058fbbbbefa8c9f561a28cab0849202c988"
|
||||||
@@ -740,17 +816,18 @@ glob@3.2.11:
|
|||||||
inherits "2"
|
inherits "2"
|
||||||
minimatch "0.3"
|
minimatch "0.3"
|
||||||
|
|
||||||
glob@^5.0.15, glob@^5.0.3:
|
glob@7.1.1:
|
||||||
version "5.0.15"
|
version "7.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
fs.realpath "^1.0.0"
|
||||||
inflight "^1.0.4"
|
inflight "^1.0.4"
|
||||||
inherits "2"
|
inherits "2"
|
||||||
minimatch "2 || 3"
|
minimatch "^3.0.2"
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
glob@^7.0.5:
|
glob@7.1.2, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2:
|
||||||
version "7.1.2"
|
version "7.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -761,6 +838,16 @@ glob@^7.0.5:
|
|||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
glob@^5.0.15, glob@^5.0.3:
|
||||||
|
version "5.0.15"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
|
||||||
|
dependencies:
|
||||||
|
inflight "^1.0.4"
|
||||||
|
inherits "2"
|
||||||
|
minimatch "2 || 3"
|
||||||
|
once "^1.3.0"
|
||||||
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
glogg@^1.0.0:
|
glogg@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810"
|
resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810"
|
||||||
@@ -781,6 +868,10 @@ graceful-fs@~3.0.2:
|
|||||||
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"
|
||||||
|
|
||||||
|
growl@1.10.3:
|
||||||
|
version "1.10.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f"
|
||||||
|
|
||||||
growl@1.9.2:
|
growl@1.9.2:
|
||||||
version "1.9.2"
|
version "1.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
|
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
|
||||||
@@ -793,6 +884,14 @@ gulp-chmod@^1.3.0:
|
|||||||
stat-mode "^0.2.0"
|
stat-mode "^0.2.0"
|
||||||
through2 "^2.0.0"
|
through2 "^2.0.0"
|
||||||
|
|
||||||
|
gulp-chmod@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/gulp-chmod/-/gulp-chmod-2.0.0.tgz#00c390b928a0799b251accf631aa09e01cc6299c"
|
||||||
|
dependencies:
|
||||||
|
deep-assign "^1.0.0"
|
||||||
|
stat-mode "^0.2.0"
|
||||||
|
through2 "^2.0.0"
|
||||||
|
|
||||||
gulp-filter@^4.0.0:
|
gulp-filter@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-4.0.0.tgz#395f58a256c559cdb9e0d157f1caaf5248a38dcb"
|
resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-4.0.0.tgz#395f58a256c559cdb9e0d157f1caaf5248a38dcb"
|
||||||
@@ -801,6 +900,14 @@ gulp-filter@^4.0.0:
|
|||||||
multimatch "^2.0.0"
|
multimatch "^2.0.0"
|
||||||
streamfilter "^1.0.5"
|
streamfilter "^1.0.5"
|
||||||
|
|
||||||
|
gulp-filter@^5.0.0, gulp-filter@^5.0.1:
|
||||||
|
version "5.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-5.1.0.tgz#a05e11affb07cf7dcf41a7de1cb7b63ac3783e73"
|
||||||
|
dependencies:
|
||||||
|
multimatch "^2.0.0"
|
||||||
|
plugin-error "^0.1.2"
|
||||||
|
streamfilter "^1.0.5"
|
||||||
|
|
||||||
gulp-gunzip@0.0.3:
|
gulp-gunzip@0.0.3:
|
||||||
version "0.0.3"
|
version "0.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-gunzip/-/gulp-gunzip-0.0.3.tgz#7b6e07b0f58fd3d42515c48ead5a63df0572f62f"
|
resolved "https://registry.yarnpkg.com/gulp-gunzip/-/gulp-gunzip-0.0.3.tgz#7b6e07b0f58fd3d42515c48ead5a63df0572f62f"
|
||||||
@@ -808,7 +915,14 @@ gulp-gunzip@0.0.3:
|
|||||||
through2 "~0.6.5"
|
through2 "~0.6.5"
|
||||||
vinyl "~0.4.6"
|
vinyl "~0.4.6"
|
||||||
|
|
||||||
gulp-remote-src@^0.4.0:
|
gulp-gunzip@1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/gulp-gunzip/-/gulp-gunzip-1.0.0.tgz#15b741145e83a9c6f50886241b57cc5871f151a9"
|
||||||
|
dependencies:
|
||||||
|
through2 "~0.6.5"
|
||||||
|
vinyl "~0.4.6"
|
||||||
|
|
||||||
|
gulp-remote-src@^0.4.0, gulp-remote-src@^0.4.2, gulp-remote-src@^0.4.3:
|
||||||
version "0.4.3"
|
version "0.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-remote-src/-/gulp-remote-src-0.4.3.tgz#5728cfd643433dd4845ddef0969f0f971a2ab4a1"
|
resolved "https://registry.yarnpkg.com/gulp-remote-src/-/gulp-remote-src-0.4.3.tgz#5728cfd643433dd4845ddef0969f0f971a2ab4a1"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -828,7 +942,7 @@ gulp-sourcemaps@1.6.0:
|
|||||||
through2 "^2.0.0"
|
through2 "^2.0.0"
|
||||||
vinyl "^1.0.0"
|
vinyl "^1.0.0"
|
||||||
|
|
||||||
gulp-symdest@^1.0.0:
|
gulp-symdest@^1.0.0, gulp-symdest@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-symdest/-/gulp-symdest-1.1.0.tgz#c165320732d192ce56fd94271ffa123234bf2ae0"
|
resolved "https://registry.yarnpkg.com/gulp-symdest/-/gulp-symdest-1.1.0.tgz#c165320732d192ce56fd94271ffa123234bf2ae0"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -847,7 +961,17 @@ gulp-untar@0.0.4:
|
|||||||
tar "~0.1.19"
|
tar "~0.1.19"
|
||||||
through2 "~0.4.1"
|
through2 "~0.4.1"
|
||||||
|
|
||||||
gulp-util@^3.0.6:
|
gulp-untar@^0.0.6:
|
||||||
|
version "0.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/gulp-untar/-/gulp-untar-0.0.6.tgz#d6bdefde7e9a8e054c9f162385a0782c4be74000"
|
||||||
|
dependencies:
|
||||||
|
event-stream "~3.3.4"
|
||||||
|
gulp-util "~3.0.8"
|
||||||
|
streamifier "~0.1.1"
|
||||||
|
tar "^2.2.1"
|
||||||
|
through2 "~2.0.3"
|
||||||
|
|
||||||
|
gulp-util@^3.0.6, gulp-util@~3.0.8:
|
||||||
version "3.0.8"
|
version "3.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
|
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -883,7 +1007,7 @@ gulp-util@~2.2.14:
|
|||||||
through2 "^0.5.0"
|
through2 "^0.5.0"
|
||||||
vinyl "^0.2.1"
|
vinyl "^0.2.1"
|
||||||
|
|
||||||
gulp-vinyl-zip@^1.1.2:
|
gulp-vinyl-zip@^1.1.2, gulp-vinyl-zip@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-vinyl-zip/-/gulp-vinyl-zip-1.4.0.tgz#56382f2ccb57231bb0478c78737ccd572973bee1"
|
resolved "https://registry.yarnpkg.com/gulp-vinyl-zip/-/gulp-vinyl-zip-1.4.0.tgz#56382f2ccb57231bb0478c78737ccd572973bee1"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -895,6 +1019,18 @@ gulp-vinyl-zip@^1.1.2:
|
|||||||
yauzl "^2.2.1"
|
yauzl "^2.2.1"
|
||||||
yazl "^2.2.1"
|
yazl "^2.2.1"
|
||||||
|
|
||||||
|
gulp-vinyl-zip@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.0.tgz#24e40685dc05b7149995245099e0590263be8dad"
|
||||||
|
dependencies:
|
||||||
|
event-stream "^3.3.1"
|
||||||
|
queue "^4.2.1"
|
||||||
|
through2 "^2.0.3"
|
||||||
|
vinyl "^2.0.2"
|
||||||
|
vinyl-fs "^2.0.0"
|
||||||
|
yauzl "^2.2.1"
|
||||||
|
yazl "^2.2.1"
|
||||||
|
|
||||||
gulplog@^1.0.0:
|
gulplog@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5"
|
resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5"
|
||||||
@@ -933,6 +1069,14 @@ has-ansi@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex "^2.0.0"
|
ansi-regex "^2.0.0"
|
||||||
|
|
||||||
|
has-flag@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
|
||||||
|
|
||||||
|
has-flag@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
|
||||||
|
|
||||||
has-gulplog@^0.1.0:
|
has-gulplog@^0.1.0:
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
|
resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
|
||||||
@@ -957,6 +1101,10 @@ hawk@~6.0.2:
|
|||||||
hoek "4.x.x"
|
hoek "4.x.x"
|
||||||
sntp "2.x.x"
|
sntp "2.x.x"
|
||||||
|
|
||||||
|
he@1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
|
||||||
|
|
||||||
hoek@2.x.x:
|
hoek@2.x.x:
|
||||||
version "2.16.3"
|
version "2.16.3"
|
||||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
|
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
|
||||||
@@ -1182,6 +1330,10 @@ json-stringify-safe@~5.0.1:
|
|||||||
version "5.0.1"
|
version "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"
|
||||||
|
|
||||||
|
json3@3.3.2:
|
||||||
|
version "3.3.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1"
|
||||||
|
|
||||||
jsonfile@^2.1.0:
|
jsonfile@^2.1.0:
|
||||||
version "2.4.0"
|
version "2.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
|
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
|
||||||
@@ -1205,6 +1357,10 @@ jsprim@^1.2.2:
|
|||||||
json-schema "0.2.3"
|
json-schema "0.2.3"
|
||||||
verror "1.10.0"
|
verror "1.10.0"
|
||||||
|
|
||||||
|
kind-of@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44"
|
||||||
|
|
||||||
kind-of@^3.0.2:
|
kind-of@^3.0.2:
|
||||||
version "3.2.2"
|
version "3.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
|
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
|
||||||
@@ -1233,10 +1389,21 @@ load-json-file@^1.0.0:
|
|||||||
pinkie-promise "^2.0.0"
|
pinkie-promise "^2.0.0"
|
||||||
strip-bom "^2.0.0"
|
strip-bom "^2.0.0"
|
||||||
|
|
||||||
|
lodash._baseassign@^3.0.0:
|
||||||
|
version "3.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
|
||||||
|
dependencies:
|
||||||
|
lodash._basecopy "^3.0.0"
|
||||||
|
lodash.keys "^3.0.0"
|
||||||
|
|
||||||
lodash._basecopy@^3.0.0:
|
lodash._basecopy@^3.0.0:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
|
resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
|
||||||
|
|
||||||
|
lodash._basecreate@^3.0.0:
|
||||||
|
version "3.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821"
|
||||||
|
|
||||||
lodash._basetostring@^3.0.0:
|
lodash._basetostring@^3.0.0:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
|
resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
|
||||||
@@ -1308,6 +1475,14 @@ lodash._shimkeys@~2.4.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
lodash._objecttypes "~2.4.1"
|
lodash._objecttypes "~2.4.1"
|
||||||
|
|
||||||
|
lodash.create@3.1.1:
|
||||||
|
version "3.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7"
|
||||||
|
dependencies:
|
||||||
|
lodash._baseassign "^3.0.0"
|
||||||
|
lodash._basecreate "^3.0.0"
|
||||||
|
lodash._isiterateecall "^3.0.0"
|
||||||
|
|
||||||
lodash.defaults@~2.4.1:
|
lodash.defaults@~2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-2.4.1.tgz#a7e8885f05e68851144b6e12a8f3678026bc4c54"
|
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-2.4.1.tgz#a7e8885f05e68851144b6e12a8f3678026bc4c54"
|
||||||
@@ -1494,7 +1669,7 @@ minimatch@0.3:
|
|||||||
lru-cache "2"
|
lru-cache "2"
|
||||||
sigmund "~1.0.0"
|
sigmund "~1.0.0"
|
||||||
|
|
||||||
"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.4:
|
"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4:
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1516,7 +1691,7 @@ mkdirp@0.3.0:
|
|||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e"
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e"
|
||||||
|
|
||||||
mkdirp@0.5, mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1:
|
mkdirp@0.5, mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1:
|
||||||
version "0.5.1"
|
version "0.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1537,6 +1712,38 @@ mocha@^2.3.3:
|
|||||||
supports-color "1.2.0"
|
supports-color "1.2.0"
|
||||||
to-iso-string "0.0.2"
|
to-iso-string "0.0.2"
|
||||||
|
|
||||||
|
mocha@^3.2.0:
|
||||||
|
version "3.5.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d"
|
||||||
|
dependencies:
|
||||||
|
browser-stdout "1.3.0"
|
||||||
|
commander "2.9.0"
|
||||||
|
debug "2.6.8"
|
||||||
|
diff "3.2.0"
|
||||||
|
escape-string-regexp "1.0.5"
|
||||||
|
glob "7.1.1"
|
||||||
|
growl "1.9.2"
|
||||||
|
he "1.1.1"
|
||||||
|
json3 "3.3.2"
|
||||||
|
lodash.create "3.1.1"
|
||||||
|
mkdirp "0.5.1"
|
||||||
|
supports-color "3.1.2"
|
||||||
|
|
||||||
|
mocha@^4.0.1:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794"
|
||||||
|
dependencies:
|
||||||
|
browser-stdout "1.3.0"
|
||||||
|
commander "2.11.0"
|
||||||
|
debug "3.1.0"
|
||||||
|
diff "3.3.1"
|
||||||
|
escape-string-regexp "1.0.5"
|
||||||
|
glob "7.1.2"
|
||||||
|
growl "1.10.3"
|
||||||
|
he "1.1.1"
|
||||||
|
mkdirp "0.5.1"
|
||||||
|
supports-color "4.4.0"
|
||||||
|
|
||||||
ms@0.7.1:
|
ms@0.7.1:
|
||||||
version "0.7.1"
|
version "0.7.1"
|
||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
|
||||||
@@ -1702,6 +1909,16 @@ pinkie@^2.0.0:
|
|||||||
version "2.0.4"
|
version "2.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
|
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
|
||||||
|
|
||||||
|
plugin-error@^0.1.2:
|
||||||
|
version "0.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace"
|
||||||
|
dependencies:
|
||||||
|
ansi-cyan "^0.1.1"
|
||||||
|
ansi-red "^0.1.1"
|
||||||
|
arr-diff "^1.0.1"
|
||||||
|
arr-union "^2.0.1"
|
||||||
|
extend-shallow "^1.1.2"
|
||||||
|
|
||||||
preserve@^0.2.0:
|
preserve@^0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||||
@@ -1722,12 +1939,22 @@ qs@~6.5.1:
|
|||||||
version "6.5.1"
|
version "6.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
|
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
|
||||||
|
|
||||||
|
querystringify@~1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb"
|
||||||
|
|
||||||
queue@^3.0.10, queue@^3.1.0:
|
queue@^3.0.10, queue@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/queue/-/queue-3.1.0.tgz#6c49d01f009e2256788789f2bffac6b8b9990585"
|
resolved "https://registry.yarnpkg.com/queue/-/queue-3.1.0.tgz#6c49d01f009e2256788789f2bffac6b8b9990585"
|
||||||
dependencies:
|
dependencies:
|
||||||
inherits "~2.0.0"
|
inherits "~2.0.0"
|
||||||
|
|
||||||
|
queue@^4.2.1:
|
||||||
|
version "4.4.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/queue/-/queue-4.4.2.tgz#5a9733d9a8b8bd1b36e934bc9c55ab89b28e29c7"
|
||||||
|
dependencies:
|
||||||
|
inherits "~2.0.0"
|
||||||
|
|
||||||
randomatic@^1.1.3:
|
randomatic@^1.1.3:
|
||||||
version "1.1.7"
|
version "1.1.7"
|
||||||
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
|
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
|
||||||
@@ -1819,7 +2046,7 @@ replace-ext@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
|
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
|
||||||
|
|
||||||
request@^2.67.0:
|
request@^2.67.0, request@^2.79.0, request@^2.83.0:
|
||||||
version "2.83.0"
|
version "2.83.0"
|
||||||
resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356"
|
resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1871,6 +2098,10 @@ request@~2.79.0:
|
|||||||
tunnel-agent "~0.4.1"
|
tunnel-agent "~0.4.1"
|
||||||
uuid "^3.0.0"
|
uuid "^3.0.0"
|
||||||
|
|
||||||
|
requires-port@~1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
|
||||||
|
|
||||||
rimraf@2:
|
rimraf@2:
|
||||||
version "2.6.2"
|
version "2.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
|
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
|
||||||
@@ -1887,7 +2118,7 @@ seek-bzip@^1.0.5:
|
|||||||
dependencies:
|
dependencies:
|
||||||
commander "~2.8.1"
|
commander "~2.8.1"
|
||||||
|
|
||||||
"semver@2 || 3 || 4 || 5", semver@^5.1.0:
|
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1:
|
||||||
version "5.5.0"
|
version "5.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
|
||||||
|
|
||||||
@@ -1917,12 +2148,32 @@ source-map-support@^0.3.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
source-map "0.1.32"
|
source-map "0.1.32"
|
||||||
|
|
||||||
|
source-map-support@^0.4.11:
|
||||||
|
version "0.4.18"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
|
||||||
|
dependencies:
|
||||||
|
source-map "^0.5.6"
|
||||||
|
|
||||||
|
source-map-support@^0.5.0:
|
||||||
|
version "0.5.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.3.tgz#2b3d5fff298cfa4d1afd7d4352d569e9a0158e76"
|
||||||
|
dependencies:
|
||||||
|
source-map "^0.6.0"
|
||||||
|
|
||||||
source-map@0.1.32:
|
source-map@0.1.32:
|
||||||
version "0.1.32"
|
version "0.1.32"
|
||||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.32.tgz#c8b6c167797ba4740a8ea33252162ff08591b266"
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.32.tgz#c8b6c167797ba4740a8ea33252162ff08591b266"
|
||||||
dependencies:
|
dependencies:
|
||||||
amdefine ">=0.0.4"
|
amdefine ">=0.0.4"
|
||||||
|
|
||||||
|
source-map@^0.5.6:
|
||||||
|
version "0.5.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
||||||
|
|
||||||
|
source-map@^0.6.0:
|
||||||
|
version "0.6.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||||
|
|
||||||
sparkles@^1.0.0:
|
sparkles@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3"
|
resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3"
|
||||||
@@ -1953,6 +2204,25 @@ split@0.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
through "2"
|
through "2"
|
||||||
|
|
||||||
|
"sqlops@git://github.com/anthonydresser/vscode-extension-vscode":
|
||||||
|
version "1.1.10"
|
||||||
|
resolved "git://github.com/anthonydresser/vscode-extension-vscode#96cc0758d2528a33a12d73894a6d40c8bfb15ca1"
|
||||||
|
dependencies:
|
||||||
|
glob "^7.1.2"
|
||||||
|
gulp-chmod "^2.0.0"
|
||||||
|
gulp-filter "^5.0.1"
|
||||||
|
gulp-gunzip "1.0.0"
|
||||||
|
gulp-remote-src "^0.4.3"
|
||||||
|
gulp-symdest "^1.1.0"
|
||||||
|
gulp-untar "^0.0.6"
|
||||||
|
gulp-vinyl-zip "^2.1.0"
|
||||||
|
mocha "^4.0.1"
|
||||||
|
request "^2.83.0"
|
||||||
|
semver "^5.4.1"
|
||||||
|
source-map-support "^0.5.0"
|
||||||
|
url-parse "^1.1.9"
|
||||||
|
vinyl-source-stream "^1.1.0"
|
||||||
|
|
||||||
sshpk@^1.7.0:
|
sshpk@^1.7.0:
|
||||||
version "1.13.1"
|
version "1.13.1"
|
||||||
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
|
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
|
||||||
@@ -1987,7 +2257,7 @@ streamfilter@^1.0.5:
|
|||||||
dependencies:
|
dependencies:
|
||||||
readable-stream "^2.0.2"
|
readable-stream "^2.0.2"
|
||||||
|
|
||||||
streamifier@~0.1.0:
|
streamifier@~0.1.0, streamifier@~0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/streamifier/-/streamifier-0.1.1.tgz#97e98d8fa4d105d62a2691d1dc07e820db8dfc4f"
|
resolved "https://registry.yarnpkg.com/streamifier/-/streamifier-0.1.1.tgz#97e98d8fa4d105d62a2691d1dc07e820db8dfc4f"
|
||||||
|
|
||||||
@@ -2046,6 +2316,18 @@ supports-color@1.2.0:
|
|||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e"
|
||||||
|
|
||||||
|
supports-color@3.1.2:
|
||||||
|
version "3.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"
|
||||||
|
dependencies:
|
||||||
|
has-flag "^1.0.0"
|
||||||
|
|
||||||
|
supports-color@4.4.0:
|
||||||
|
version "4.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e"
|
||||||
|
dependencies:
|
||||||
|
has-flag "^2.0.0"
|
||||||
|
|
||||||
supports-color@^0.2.0:
|
supports-color@^0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a"
|
||||||
@@ -2063,6 +2345,14 @@ tar-stream@^1.5.2:
|
|||||||
readable-stream "^2.0.0"
|
readable-stream "^2.0.0"
|
||||||
xtend "^4.0.0"
|
xtend "^4.0.0"
|
||||||
|
|
||||||
|
tar@^2.2.1:
|
||||||
|
version "2.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1"
|
||||||
|
dependencies:
|
||||||
|
block-stream "*"
|
||||||
|
fstream "^1.0.2"
|
||||||
|
inherits "2"
|
||||||
|
|
||||||
tar@~0.1.19:
|
tar@~0.1.19:
|
||||||
version "0.1.20"
|
version "0.1.20"
|
||||||
resolved "https://registry.yarnpkg.com/tar/-/tar-0.1.20.tgz#42940bae5b5f22c74483699126f9f3f27449cb13"
|
resolved "https://registry.yarnpkg.com/tar/-/tar-0.1.20.tgz#42940bae5b5f22c74483699126f9f3f27449cb13"
|
||||||
@@ -2154,10 +2444,6 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
|||||||
version "0.14.5"
|
version "0.14.5"
|
||||||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
||||||
|
|
||||||
typescript@2.6.2:
|
|
||||||
version "2.6.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
|
|
||||||
|
|
||||||
unbzip2-stream@^1.0.9:
|
unbzip2-stream@^1.0.9:
|
||||||
version "1.2.5"
|
version "1.2.5"
|
||||||
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.2.5.tgz#73a033a567bbbde59654b193c44d48a7e4f43c47"
|
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.2.5.tgz#73a033a567bbbde59654b193c44d48a7e4f43c47"
|
||||||
@@ -2172,6 +2458,13 @@ unique-stream@^2.0.2:
|
|||||||
json-stable-stringify "^1.0.0"
|
json-stable-stringify "^1.0.0"
|
||||||
through2-filter "^2.0.0"
|
through2-filter "^2.0.0"
|
||||||
|
|
||||||
|
url-parse@^1.1.9:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.2.0.tgz#3a19e8aaa6d023ddd27dcc44cb4fc8f7fec23986"
|
||||||
|
dependencies:
|
||||||
|
querystringify "~1.0.0"
|
||||||
|
requires-port "~1.0.0"
|
||||||
|
|
||||||
util-deprecate@~1.0.1:
|
util-deprecate@~1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
@@ -2257,6 +2550,17 @@ vinyl@^1.0.0:
|
|||||||
clone-stats "^0.0.1"
|
clone-stats "^0.0.1"
|
||||||
replace-ext "0.0.1"
|
replace-ext "0.0.1"
|
||||||
|
|
||||||
|
vinyl@^2.0.2:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c"
|
||||||
|
dependencies:
|
||||||
|
clone "^2.1.1"
|
||||||
|
clone-buffer "^1.0.0"
|
||||||
|
clone-stats "^1.0.0"
|
||||||
|
cloneable-readable "^1.0.0"
|
||||||
|
remove-trailing-separator "^1.0.1"
|
||||||
|
replace-ext "^1.0.0"
|
||||||
|
|
||||||
vinyl@~2.0.1:
|
vinyl@~2.0.1:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.0.2.tgz#0a3713d8d4e9221c58f10ca16c0116c9e25eda7c"
|
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.0.2.tgz#0a3713d8d4e9221c58f10ca16c0116c9e25eda7c"
|
||||||
@@ -2315,6 +2619,25 @@ vscode@1.0.1:
|
|||||||
source-map-support "^0.3.2"
|
source-map-support "^0.3.2"
|
||||||
vinyl-source-stream "^1.1.0"
|
vinyl-source-stream "^1.1.0"
|
||||||
|
|
||||||
|
vscode@1.1.5:
|
||||||
|
version "1.1.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/vscode/-/vscode-1.1.5.tgz#10eb104001840c3dd0813815fd4a05f8fc882d14"
|
||||||
|
dependencies:
|
||||||
|
glob "^7.1.1"
|
||||||
|
gulp-chmod "^2.0.0"
|
||||||
|
gulp-filter "^5.0.0"
|
||||||
|
gulp-gunzip "0.0.3"
|
||||||
|
gulp-remote-src "^0.4.2"
|
||||||
|
gulp-symdest "^1.1.0"
|
||||||
|
gulp-untar "^0.0.6"
|
||||||
|
gulp-vinyl-zip "^1.4.0"
|
||||||
|
mocha "^3.2.0"
|
||||||
|
request "^2.79.0"
|
||||||
|
semver "^5.3.0"
|
||||||
|
source-map-support "^0.4.11"
|
||||||
|
url-parse "^1.1.9"
|
||||||
|
vinyl-source-stream "^1.1.0"
|
||||||
|
|
||||||
winreg@1.2.3:
|
winreg@1.2.3:
|
||||||
version "1.2.3"
|
version "1.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/winreg/-/winreg-1.2.3.tgz#93ad116b2696da87d58f7265a8fcea5254a965d5"
|
resolved "https://registry.yarnpkg.com/winreg/-/winreg-1.2.3.tgz#93ad116b2696da87d58f7265a8fcea5254a965d5"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as adal from 'adal-node';
|
import * as adal from 'adal-node';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as request from 'request';
|
import * as request from 'request';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
@@ -22,7 +22,7 @@ import TokenCache from './tokenCache';
|
|||||||
|
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
export class AzureAccountProvider implements data.AccountProvider {
|
export class AzureAccountProvider implements sqlops.AccountProvider {
|
||||||
// CONSTANTS ///////////////////////////////////////////////////////////
|
// CONSTANTS ///////////////////////////////////////////////////////////
|
||||||
private static WorkSchoolAccountType: string = 'work_school';
|
private static WorkSchoolAccountType: string = 'work_school';
|
||||||
private static MicrosoftAccountType: string = 'microsoft';
|
private static MicrosoftAccountType: string = 'microsoft';
|
||||||
@@ -57,7 +57,7 @@ export class AzureAccountProvider implements data.AccountProvider {
|
|||||||
* @param {"data".AccountKey} accountKey Key identifying the account to delete tokens for
|
* @param {"data".AccountKey} accountKey Key identifying the account to delete tokens for
|
||||||
* @returns {Thenable<void>} Promise to clear requested tokens from the token cache
|
* @returns {Thenable<void>} Promise to clear requested tokens from the token cache
|
||||||
*/
|
*/
|
||||||
public clear(accountKey: data.AccountKey): Thenable<void> {
|
public clear(accountKey: sqlops.AccountKey): Thenable<void> {
|
||||||
return this.doIfInitialized(() => this.clearAccountTokens(accountKey));
|
return this.doIfInitialized(() => this.clearAccountTokens(accountKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,10 +73,10 @@ export class AzureAccountProvider implements data.AccountProvider {
|
|||||||
return this.doIfInitialized(() => this.getAccessTokens(account));
|
return this.doIfInitialized(() => this.getAccessTokens(account));
|
||||||
}
|
}
|
||||||
|
|
||||||
public initialize(restoredAccounts: data.Account[]): Thenable<data.Account[]> {
|
public initialize(restoredAccounts: sqlops.Account[]): Thenable<sqlops.Account[]> {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
let rehydrationTasks: Thenable<data.Account>[] = [];
|
let rehydrationTasks: Thenable<sqlops.Account>[] = [];
|
||||||
for (let account of restoredAccounts) {
|
for (let account of restoredAccounts) {
|
||||||
// Purge any invalid accounts
|
// Purge any invalid accounts
|
||||||
if (!account) {
|
if (!account) {
|
||||||
@@ -145,7 +145,7 @@ export class AzureAccountProvider implements data.AccountProvider {
|
|||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
private clearAccountTokens(accountKey: data.AccountKey): Thenable<void> {
|
private clearAccountTokens(accountKey: sqlops.AccountKey): Thenable<void> {
|
||||||
// Put together a query to look up any tokens associated with the account key
|
// Put together a query to look up any tokens associated with the account key
|
||||||
let query = <adal.TokenResponse>{ userId: accountKey.accountId };
|
let query = <adal.TokenResponse>{ userId: accountKey.accountId };
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ export class AzureAccountProvider implements data.AccountProvider {
|
|||||||
if (error) {
|
if (error) {
|
||||||
// TODO: We'll assume for now that the account is stale, though that might not be accurate
|
// TODO: We'll assume for now that the account is stale, though that might not be accurate
|
||||||
account.isStale = true;
|
account.isStale = true;
|
||||||
data.accounts.accountUpdated(account);
|
sqlops.accounts.accountUpdated(account);
|
||||||
|
|
||||||
reject(error);
|
reject(error);
|
||||||
return;
|
return;
|
||||||
@@ -240,7 +240,7 @@ export class AzureAccountProvider implements data.AccountProvider {
|
|||||||
let title = isAddAccount ?
|
let title = isAddAccount ?
|
||||||
localize('addAccount', 'Add {0} account', self._metadata.displayName) :
|
localize('addAccount', 'Add {0} account', self._metadata.displayName) :
|
||||||
localize('refreshAccount', 'Refresh {0} account', self._metadata.displayName);
|
localize('refreshAccount', 'Refresh {0} account', self._metadata.displayName);
|
||||||
return data.accounts.beginAutoOAuthDeviceCode(self._metadata.id, title, oAuth.userCodeInfo.message, oAuth.userCodeInfo.userCode, oAuth.userCodeInfo.verificationUrl)
|
return sqlops.accounts.beginAutoOAuthDeviceCode(self._metadata.id, title, oAuth.userCodeInfo.message, oAuth.userCodeInfo.userCode, oAuth.userCodeInfo.verificationUrl)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return new Promise<adal.TokenResponse>((resolve, reject) => {
|
return new Promise<adal.TokenResponse>((resolve, reject) => {
|
||||||
let context = oAuth.context;
|
let context = oAuth.context;
|
||||||
@@ -249,14 +249,14 @@ export class AzureAccountProvider implements data.AccountProvider {
|
|||||||
if (err) {
|
if (err) {
|
||||||
if (self._autoOAuthCancelled) {
|
if (self._autoOAuthCancelled) {
|
||||||
// Auto OAuth was cancelled by the user, indicate this with the error we return
|
// Auto OAuth was cancelled by the user, indicate this with the error we return
|
||||||
reject(<data.UserCancelledSignInError>{ userCancelledSignIn: true });
|
reject(<sqlops.UserCancelledSignInError>{ userCancelledSignIn: true });
|
||||||
} else {
|
} else {
|
||||||
// Auto OAuth failed for some other reason
|
// Auto OAuth failed for some other reason
|
||||||
data.accounts.endAutoOAuthDeviceCode();
|
sqlops.accounts.endAutoOAuthDeviceCode();
|
||||||
reject(err);
|
reject(err);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data.accounts.endAutoOAuthDeviceCode();
|
sqlops.accounts.endAutoOAuthDeviceCode();
|
||||||
resolve(<adal.TokenResponse>response);
|
resolve(<adal.TokenResponse>response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as constants from '../constants';
|
import * as constants from '../constants';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as events from 'events';
|
import * as events from 'events';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
@@ -27,7 +27,7 @@ export class AzureAccountProviderService implements vscode.Disposable {
|
|||||||
// MEMBER VARIABLES ////////////////////////////////////////////////////////
|
// MEMBER VARIABLES ////////////////////////////////////////////////////////
|
||||||
private _accountDisposals: { [accountProviderId: string]: vscode.Disposable };
|
private _accountDisposals: { [accountProviderId: string]: vscode.Disposable };
|
||||||
private _accountProviders: { [accountProviderId: string]: AzureAccountProvider };
|
private _accountProviders: { [accountProviderId: string]: AzureAccountProvider };
|
||||||
private _credentialProvider: data.CredentialProvider;
|
private _credentialProvider: sqlops.CredentialProvider;
|
||||||
private _configChangePromiseChain: Thenable<void>;
|
private _configChangePromiseChain: Thenable<void>;
|
||||||
private _currentConfig: vscode.WorkspaceConfiguration;
|
private _currentConfig: vscode.WorkspaceConfiguration;
|
||||||
private _event: events.EventEmitter;
|
private _event: events.EventEmitter;
|
||||||
@@ -55,7 +55,7 @@ export class AzureAccountProviderService implements vscode.Disposable {
|
|||||||
// 2a) Store the credential provider for use later
|
// 2a) Store the credential provider for use later
|
||||||
// 2b) Register the configuration change handler
|
// 2b) Register the configuration change handler
|
||||||
// 2c) Perform an initial config change handling
|
// 2c) Perform an initial config change handling
|
||||||
return data.credentials.getProvider(AzureAccountProviderService.CredentialNamespace)
|
return sqlops.credentials.getProvider(AzureAccountProviderService.CredentialNamespace)
|
||||||
.then(credProvider => {
|
.then(credProvider => {
|
||||||
self._credentialProvider = credProvider;
|
self._credentialProvider = credProvider;
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ export class AzureAccountProviderService implements vscode.Disposable {
|
|||||||
let tokenCache = new CredentialServiceTokenCache(self._credentialProvider, tokenCacheKey, tokenCachePath);
|
let tokenCache = new CredentialServiceTokenCache(self._credentialProvider, tokenCacheKey, tokenCachePath);
|
||||||
let accountProvider = new AzureAccountProvider(<AzureAccountProviderMetadata>provider.metadata, tokenCache);
|
let accountProvider = new AzureAccountProvider(<AzureAccountProviderMetadata>provider.metadata, tokenCache);
|
||||||
self._accountProviders[provider.metadata.id] = accountProvider;
|
self._accountProviders[provider.metadata.id] = accountProvider;
|
||||||
self._accountDisposals[provider.metadata.id] = data.accounts.registerAccountProvider(provider.metadata, accountProvider);
|
self._accountDisposals[provider.metadata.id] = sqlops.accounts.registerAccountProvider(provider.metadata, accountProvider);
|
||||||
resolve();
|
resolve();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`Failed to register account provider: ${e}`);
|
console.error(`Failed to register account provider: ${e}`);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a tenant (an Azure Active Directory instance) to which a user has access
|
* Represents a tenant (an Azure Active Directory instance) to which a user has access
|
||||||
@@ -118,7 +118,7 @@ export interface ProviderSettings {
|
|||||||
/**
|
/**
|
||||||
* Extension of account provider metadata to override settings type for Azure account providers
|
* Extension of account provider metadata to override settings type for Azure account providers
|
||||||
*/
|
*/
|
||||||
export interface AzureAccountProviderMetadata extends data.AccountProviderMetadata {
|
export interface AzureAccountProviderMetadata extends sqlops.AccountProviderMetadata {
|
||||||
/**
|
/**
|
||||||
* Azure specific account provider settings.
|
* Azure specific account provider settings.
|
||||||
*/
|
*/
|
||||||
@@ -143,7 +143,7 @@ export interface AzureAccountProperties {
|
|||||||
/**
|
/**
|
||||||
* Override of the Account type to enforce properties that are AzureAccountProperties
|
* Override of the Account type to enforce properties that are AzureAccountProperties
|
||||||
*/
|
*/
|
||||||
export interface AzureAccount extends data.Account {
|
export interface AzureAccount extends sqlops.Account {
|
||||||
/**
|
/**
|
||||||
* AzureAccountProperties specifically used for Azure accounts
|
* AzureAccountProperties specifically used for Azure accounts
|
||||||
*/
|
*/
|
||||||
@@ -179,4 +179,4 @@ export interface AzureAccountSecurityToken {
|
|||||||
* Azure account security token maps a tenant ID to the information returned from a request to get
|
* Azure account security token maps a tenant ID to the information returned from a request to get
|
||||||
* an access token. The list of tenants correspond to the tenants in the account properties.
|
* an access token. The list of tenants correspond to the tenants in the account properties.
|
||||||
*/
|
*/
|
||||||
export type AzureAccountSecurityTokenCollection = {[tenantId: string]: AzureAccountSecurityToken};
|
export type AzureAccountSecurityTokenCollection = { [tenantId: string]: AzureAccountSecurityToken };
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as adal from 'adal-node';
|
import * as adal from 'adal-node';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as crypto from 'crypto';
|
import * as crypto from 'crypto';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ export default class TokenCache implements adal.TokenCache {
|
|||||||
private _activeOperation: Thenable<any>;
|
private _activeOperation: Thenable<any>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _credentialProvider: data.CredentialProvider,
|
private _credentialProvider: sqlops.CredentialProvider,
|
||||||
private _credentialServiceKey: string,
|
private _credentialServiceKey: string,
|
||||||
private _cacheSerializationPath: string
|
private _cacheSerializationPath: string
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -4,4 +4,4 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/data.d.ts'/>
|
/// <reference path='../../../../src/sql/sqlops.d.ts'/>
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import vscode = require('vscode');
|
import * as vscode from 'vscode';
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
import { Constants } from '../models/constants';
|
import { Constants } from '../models/constants';
|
||||||
import { Serialization } from '../serialize/serialization';
|
import { Serialization } from '../serialize/serialization';
|
||||||
import { AzureResourceProvider } from '../resourceProvider/resourceProvider';
|
|
||||||
import { CredentialStore } from '../credentialstore/credentialstore';
|
import { CredentialStore } from '../credentialstore/credentialstore';
|
||||||
|
import { AzureResourceProvider } from '../resourceProvider/resourceProvider';
|
||||||
import { IExtensionConstants, Telemetry, Constants as SharedConstants, SqlToolsServiceClient, VscodeWrapper, Utils, PlatformInformation } from 'extensions-modules';
|
import { IExtensionConstants, Telemetry, Constants as SharedConstants, SqlToolsServiceClient, VscodeWrapper, Utils, PlatformInformation } from 'extensions-modules';
|
||||||
import { SqlOpsDataClient } from 'dataprotocol-client';
|
import { SqlOpsDataClient } from 'dataprotocol-client';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
@@ -101,7 +101,7 @@ export default class MainController implements vscode.Disposable {
|
|||||||
|
|
||||||
self.createResourceProviderClient().then(rpClient => {
|
self.createResourceProviderClient().then(rpClient => {
|
||||||
let resourceProvider = new AzureResourceProvider(self._client, rpClient);
|
let resourceProvider = new AzureResourceProvider(self._client, rpClient);
|
||||||
data.resources.registerResourceProvider({
|
sqlops.resources.registerResourceProvider({
|
||||||
displayName: 'Azure SQL Resource Provider', // TODO Localize
|
displayName: 'Azure SQL Resource Provider', // TODO Localize
|
||||||
id: 'Microsoft.Azure.SQL.ResourceProvider',
|
id: 'Microsoft.Azure.SQL.ResourceProvider',
|
||||||
settings: {
|
settings: {
|
||||||
@@ -116,19 +116,19 @@ export default class MainController implements vscode.Disposable {
|
|||||||
self.createCredentialClient().then(credentialClient => {
|
self.createCredentialClient().then(credentialClient => {
|
||||||
self._credentialStore.languageClient = credentialClient;
|
self._credentialStore.languageClient = credentialClient;
|
||||||
credentialClient.onReady().then(() => {
|
credentialClient.onReady().then(() => {
|
||||||
let credentialProvider: data.CredentialProvider = {
|
let credentialProvider: sqlops.CredentialProvider = {
|
||||||
handle: 0,
|
handle: 0,
|
||||||
saveCredential(credentialId: string, password: string): Thenable<boolean> {
|
saveCredential(credentialId: string, password: string): Thenable<boolean> {
|
||||||
return self._credentialStore.saveCredential(credentialId, password);
|
return self._credentialStore.saveCredential(credentialId, password);
|
||||||
},
|
},
|
||||||
readCredential(credentialId: string): Thenable<data.Credential> {
|
readCredential(credentialId: string): Thenable<sqlops.Credential> {
|
||||||
return self._credentialStore.readCredential(credentialId);
|
return self._credentialStore.readCredential(credentialId);
|
||||||
},
|
},
|
||||||
deleteCredential(credentialId: string): Thenable<boolean> {
|
deleteCredential(credentialId: string): Thenable<boolean> {
|
||||||
return self._credentialStore.deleteCredential(credentialId);
|
return self._credentialStore.deleteCredential(credentialId);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
data.credentials.registerProvider(credentialProvider);
|
sqlops.credentials.registerProvider(credentialProvider);
|
||||||
Utils.logDebug('credentialProvider registered', MainController._extensionConstants.extensionConfigSectionName);
|
Utils.logDebug('credentialProvider registered', MainController._extensionConstants.extensionConfigSectionName);
|
||||||
});
|
});
|
||||||
}, error => {
|
}, error => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { RequestType } from 'vscode-languageclient';
|
import { RequestType } from 'vscode-languageclient';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
// DEV-NOTE: Still finalizing what we'll need as part of this interface
|
// DEV-NOTE: Still finalizing what we'll need as part of this interface
|
||||||
/**
|
/**
|
||||||
@@ -22,7 +22,7 @@ export class SaveResultsInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export namespace SaveAsRequest {
|
export namespace SaveAsRequest {
|
||||||
export const type = new RequestType<SaveResultsInfo, data.SaveResultRequestResult, void, void>('query/saveAs');
|
export const type = new RequestType<SaveResultsInfo, sqlops.SaveResultRequestResult, void, void>('query/saveAs');
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------- < Read Credential Request > -------------------------------------------------
|
// --------------------------------- < Read Credential Request > -------------------------------------------------
|
||||||
@@ -77,7 +77,7 @@ export namespace HandleFirewallRuleRequest {
|
|||||||
|
|
||||||
// Firewall rule interfaces
|
// Firewall rule interfaces
|
||||||
export interface CreateFirewallRuleParams {
|
export interface CreateFirewallRuleParams {
|
||||||
account: data.Account;
|
account: sqlops.Account;
|
||||||
serverName: string;
|
serverName: string;
|
||||||
startIpAddress: string;
|
startIpAddress: string;
|
||||||
endIpAddress: string;
|
endIpAddress: string;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
import * as Contracts from '../models/contracts';
|
import * as Contracts from '../models/contracts';
|
||||||
import { SqlToolsServiceClient } from 'extensions-modules';
|
import { SqlToolsServiceClient } from 'extensions-modules';
|
||||||
import { SqlOpsDataClient } from 'dataprotocol-client';
|
import { SqlOpsDataClient } from 'dataprotocol-client';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ import * as path from 'path';
|
|||||||
*
|
*
|
||||||
* Allows a single credential to be stored per service (that is, one username per service);
|
* Allows a single credential to be stored per service (that is, one username per service);
|
||||||
*/
|
*/
|
||||||
export class AzureResourceProvider implements data.ResourceProvider {
|
export class AzureResourceProvider implements sqlops.ResourceProvider {
|
||||||
|
|
||||||
public languageClient: SqlOpsDataClient;
|
public languageClient: SqlOpsDataClient;
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@ export class AzureResourceProvider implements data.ResourceProvider {
|
|||||||
this.languageClient = langClient;
|
this.languageClient = langClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
public createFirewallRule(account: data.Account, firewallruleInfo: data.FirewallRuleInfo): Thenable<data.CreateFirewallRuleResponse> {
|
public createFirewallRule(account: sqlops.Account, firewallruleInfo: sqlops.FirewallRuleInfo): Thenable<sqlops.CreateFirewallRuleResponse> {
|
||||||
let self = this;
|
let self = this;
|
||||||
return new Promise<data.CreateFirewallRuleResponse>((resolve, reject) => {
|
return new Promise<sqlops.CreateFirewallRuleResponse>((resolve, reject) => {
|
||||||
self._client.
|
self._client.
|
||||||
sendRequest(Contracts.CreateFirewallRuleRequest.type, self.asCreateFirewallRuleParams(account, firewallruleInfo), self.languageClient)
|
sendRequest(Contracts.CreateFirewallRuleRequest.type, self.asCreateFirewallRuleParams(account, firewallruleInfo), self.languageClient)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
@@ -38,9 +38,9 @@ export class AzureResourceProvider implements data.ResourceProvider {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public handleFirewallRule(errorCode: number, errorMessage: string, connectionTypeId: string): Thenable<data.HandleFirewallRuleResponse> {
|
public handleFirewallRule(errorCode: number, errorMessage: string, connectionTypeId: string): Thenable<sqlops.HandleFirewallRuleResponse> {
|
||||||
let self = this;
|
let self = this;
|
||||||
return new Promise<data.HandleFirewallRuleResponse>((resolve, reject) => {
|
return new Promise<sqlops.HandleFirewallRuleResponse>((resolve, reject) => {
|
||||||
let params: Contracts.HandleFirewallRuleParams = { errorCode: errorCode, errorMessage: errorMessage, connectionTypeId: connectionTypeId };
|
let params: Contracts.HandleFirewallRuleParams = { errorCode: errorCode, errorMessage: errorMessage, connectionTypeId: connectionTypeId };
|
||||||
|
|
||||||
self._client.
|
self._client.
|
||||||
@@ -51,7 +51,7 @@ export class AzureResourceProvider implements data.ResourceProvider {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private asCreateFirewallRuleParams(account: data.Account, params: data.FirewallRuleInfo): Contracts.CreateFirewallRuleParams {
|
private asCreateFirewallRuleParams(account: sqlops.Account, params: sqlops.FirewallRuleInfo): Contracts.CreateFirewallRuleParams {
|
||||||
return {
|
return {
|
||||||
account: account,
|
account: account,
|
||||||
serverName: params.serverName,
|
serverName: params.serverName,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serializer for saving results into a different format
|
* Serializer for saving results into a different format
|
||||||
@@ -13,5 +13,5 @@ import * as data from 'data';
|
|||||||
* @interface ISerialization
|
* @interface ISerialization
|
||||||
*/
|
*/
|
||||||
export interface ISerialization {
|
export interface ISerialization {
|
||||||
saveAs(saveFormat: string, savePath: string, results: string, appendToFile: boolean): Promise<data.SaveResultRequestResult>;
|
saveAs(saveFormat: string, savePath: string, results: string, appendToFile: boolean): Promise<sqlops.SaveResultRequestResult>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
import * as Contracts from '../models/contracts';
|
import * as Contracts from '../models/contracts';
|
||||||
import { ISerialization } from './iserialization';
|
import { ISerialization } from './iserialization';
|
||||||
import { SqlToolsServiceClient } from 'extensions-modules';
|
import { SqlToolsServiceClient } from 'extensions-modules';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { SqlOpsDataClient } from 'dataprotocol-client';
|
import { SqlOpsDataClient } from 'dataprotocol-client';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
@@ -28,14 +28,14 @@ export class Serialization implements ISerialization {
|
|||||||
* @param {string} credentialId the ID uniquely identifying this credential
|
* @param {string} credentialId the ID uniquely identifying this credential
|
||||||
* @returns {Promise<ISaveResultsInfo>} Promise that resolved to the credential, or undefined if not found
|
* @returns {Promise<ISaveResultsInfo>} Promise that resolved to the credential, or undefined if not found
|
||||||
*/
|
*/
|
||||||
public saveAs(saveFormat: string, savePath: string, results: string, appendToFile: boolean): Promise<data.SaveResultRequestResult> {
|
public saveAs(saveFormat: string, savePath: string, results: string, appendToFile: boolean): Promise<sqlops.SaveResultRequestResult> {
|
||||||
let self = this;
|
let self = this;
|
||||||
let resultsInfo: Contracts.SaveResultsInfo = new Contracts.SaveResultsInfo(saveFormat, savePath, results, appendToFile);
|
let resultsInfo: Contracts.SaveResultsInfo = new Contracts.SaveResultsInfo(saveFormat, savePath, results, appendToFile);
|
||||||
return new Promise<data.SaveResultRequestResult>((resolve, reject) => {
|
return new Promise<sqlops.SaveResultRequestResult>((resolve, reject) => {
|
||||||
self._client
|
self._client
|
||||||
.sendRequest(Contracts.SaveAsRequest.type, resultsInfo, this._languageClient)
|
.sendRequest(Contracts.SaveAsRequest.type, resultsInfo, this._languageClient)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
resolve(<data.SaveResultRequestResult>result);
|
resolve(<sqlops.SaveResultRequestResult>result);
|
||||||
}, err => reject(err));
|
}, err => reject(err));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
2
extensions/mssql/client/src/typings/ref.d.ts
vendored
2
extensions/mssql/client/src/typings/ref.d.ts
vendored
@@ -4,5 +4,5 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/// <reference path='../../../../../src/vs/vscode.d.ts'/>
|
/// <reference path='../../../../../src/vs/vscode.d.ts'/>
|
||||||
/// <reference path='../../../../../src/sql/data.d.ts'/>
|
/// <reference path='../../../../../src/sql/sqlops.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
1766
extensions/yarn.lock
1766
extensions/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@ import { Button } from 'sql/base/browser/ui/button/button';
|
|||||||
import { Builder } from 'vs/base/browser/builder';
|
import { Builder } from 'vs/base/browser/builder';
|
||||||
import * as types from 'vs/base/common/types';
|
import * as types from 'vs/base/common/types';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
export function appendRow(container: Builder, label: string, labelClass: string, cellContainerClass: string): Builder {
|
export function appendRow(container: Builder, label: string, labelClass: string, cellContainerClass: string): Builder {
|
||||||
let cellContainer: Builder;
|
let cellContainer: Builder;
|
||||||
@@ -61,7 +61,7 @@ export function getBooleanValueFromStringOrBoolean(value: any): boolean {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCategoryDisplayName(categories: data.CategoryValue[], categoryName: string) {
|
export function getCategoryDisplayName(categories: sqlops.CategoryValue[], categoryName: string) {
|
||||||
var displayName: string;
|
var displayName: string;
|
||||||
categories.forEach(c => {
|
categories.forEach(c => {
|
||||||
if (c.name === categoryName) {
|
if (c.name === categoryName) {
|
||||||
@@ -71,7 +71,7 @@ export function getCategoryDisplayName(categories: data.CategoryValue[], categor
|
|||||||
return displayName;
|
return displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCategoryName(categories: data.CategoryValue[], categoryDisplayName: string) {
|
export function getCategoryName(categories: sqlops.CategoryValue[], categoryDisplayName: string) {
|
||||||
var categoryName: string;
|
var categoryName: string;
|
||||||
categories.forEach(c => {
|
categories.forEach(c => {
|
||||||
if (c.displayName === categoryDisplayName) {
|
if (c.displayName === categoryDisplayName) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { IModalOptions, Modal } from './modal';
|
|||||||
import * as OptionsDialogHelper from './optionsDialogHelper';
|
import * as OptionsDialogHelper from './optionsDialogHelper';
|
||||||
import { attachButtonStyler, attachModalDialogStyler } from 'sql/common/theme/styler';
|
import { attachButtonStyler, attachModalDialogStyler } from 'sql/common/theme/styler';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||||
@@ -154,9 +154,9 @@ export class OptionsDialog extends Modal {
|
|||||||
this._optionDescription.innerHtml(option.description);
|
this._optionDescription.innerHtml(option.description);
|
||||||
}
|
}
|
||||||
|
|
||||||
private fillInOptions(container: Builder, options: data.ServiceOption[]): void {
|
private fillInOptions(container: Builder, options: sqlops.ServiceOption[]): void {
|
||||||
for (var i = 0; i < options.length; i++) {
|
for (var i = 0; i < options.length; i++) {
|
||||||
var option: data.ServiceOption = options[i];
|
var option: sqlops.ServiceOption = options[i];
|
||||||
var rowContainer = DialogHelper.appendRow(container, option.displayName, 'optionsDialog-label', 'optionsDialog-input');
|
var rowContainer = DialogHelper.appendRow(container, option.displayName, 'optionsDialog-label', 'optionsDialog-input');
|
||||||
OptionsDialogHelper.createOptionElement(option, rowContainer, this._optionValues, this._optionElements, this._contextViewService, (name) => this.onOptionLinkClicked(name));
|
OptionsDialogHelper.createOptionElement(option, rowContainer, this._optionValues, this._optionElements, this._contextViewService, (name) => this.onOptionLinkClicked(name));
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ export class OptionsDialog extends Modal {
|
|||||||
this._onCloseEvent.fire();
|
this._onCloseEvent.fire();
|
||||||
}
|
}
|
||||||
|
|
||||||
public open(options: data.ServiceOption[], optionValues: { [name: string]: any }) {
|
public open(options: sqlops.ServiceOption[], optionValues: { [name: string]: any }) {
|
||||||
this._optionValues = optionValues;
|
this._optionValues = optionValues;
|
||||||
var firstOption: string;
|
var firstOption: string;
|
||||||
var containerGroup: Builder;
|
var containerGroup: Builder;
|
||||||
@@ -233,7 +233,7 @@ export class OptionsDialog extends Modal {
|
|||||||
var splitview = new SplitView(containerGroup.getHTMLElement());
|
var splitview = new SplitView(containerGroup.getHTMLElement());
|
||||||
let categoryMap = OptionsDialogHelper.groupOptionsByCategory(options);
|
let categoryMap = OptionsDialogHelper.groupOptionsByCategory(options);
|
||||||
for (var category in categoryMap) {
|
for (var category in categoryMap) {
|
||||||
var serviceOptions: data.ServiceOption[] = categoryMap[category];
|
var serviceOptions: sqlops.ServiceOption[] = categoryMap[category];
|
||||||
var bodyContainer = $().element('table', { class: 'optionsDialog-table' }, (tableContainer: Builder) => {
|
var bodyContainer = $().element('table', { class: 'optionsDialog-table' }, (tableContainer: Builder) => {
|
||||||
this.fillInOptions(tableContainer, serviceOptions);
|
this.fillInOptions(tableContainer, serviceOptions);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ import { MessageType } from 'vs/base/browser/ui/inputbox/inputBox';
|
|||||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||||
import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox';
|
import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox';
|
||||||
import * as types from 'vs/base/common/types';
|
import * as types from 'vs/base/common/types';
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
|
|
||||||
export interface IOptionElement {
|
export interface IOptionElement {
|
||||||
optionWidget: any;
|
optionWidget: any;
|
||||||
option: data.ServiceOption;
|
option: sqlops.ServiceOption;
|
||||||
optionValue: any;
|
optionValue: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createOptionElement(option: data.ServiceOption, rowContainer: Builder, options: { [name: string]: any },
|
export function createOptionElement(option: sqlops.ServiceOption, rowContainer: Builder, options: { [name: string]: any },
|
||||||
optionsMap: { [optionName: string]: IOptionElement }, contextViewService: IContextViewService, onFocus: (name) => void): void {
|
optionsMap: { [optionName: string]: IOptionElement }, contextViewService: IContextViewService, onFocus: (name) => void): void {
|
||||||
let possibleInputs: string[] = [];
|
let possibleInputs: string[] = [];
|
||||||
let optionValue = this.getOptionValueAndCategoryValues(option, options, possibleInputs);
|
let optionValue = this.getOptionValueAndCategoryValues(option, options, possibleInputs);
|
||||||
@@ -67,8 +67,7 @@ export function createOptionElement(option: data.ServiceOption, rowContainer: Bu
|
|||||||
inputElement.onfocus = () => onFocus(option.name);
|
inputElement.onfocus = () => onFocus(option.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getOptionValueAndCategoryValues(option: data.ServiceOption, options: { [optionName: string]: any }, possibleInputs: string[]): any {
|
export function getOptionValueAndCategoryValues(option: sqlops.ServiceOption, options: { [optionName: string]: any }, possibleInputs: string[]): any {
|
||||||
|
|
||||||
var optionValue = option.defaultValue;
|
var optionValue = option.defaultValue;
|
||||||
if (options[option.name]) {
|
if (options[option.name]) {
|
||||||
// if the value type is boolean, the option value can be either boolean or string
|
// if the value type is boolean, the option value can be either boolean or string
|
||||||
@@ -160,8 +159,8 @@ export function findElement(container: Builder, className: string): HTMLElement
|
|||||||
return elementBuilder.getHTMLElement();
|
return elementBuilder.getHTMLElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function groupOptionsByCategory(options: data.ServiceOption[]): { [category: string]: data.ServiceOption[] } {
|
export function groupOptionsByCategory(options: sqlops.ServiceOption[]): { [category: string]: sqlops.ServiceOption[] } {
|
||||||
var connectionOptionsMap: { [category: string]: data.ServiceOption[] } = {};
|
var connectionOptionsMap: { [category: string]: sqlops.ServiceOption[] } = {};
|
||||||
options.forEach(option => {
|
options.forEach(option => {
|
||||||
var groupName = option.groupName;
|
var groupName = option.groupName;
|
||||||
if (groupName === null || groupName === undefined) {
|
if (groupName === null || groupName === undefined) {
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import WebView from 'vs/workbench/parts/html/browser/webview';
|
|||||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||||
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||||
import data = require('data');
|
|
||||||
|
|
||||||
export class WebViewDialog extends Modal {
|
export class WebViewDialog extends Modal {
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
|||||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { Button } from 'sql/base/browser/ui/button/button';
|
import { Button } from 'sql/base/browser/ui/button/button';
|
||||||
import { Modal } from 'sql/base/browser/ui/modal/modal';
|
import { Modal } from 'sql/base/browser/ui/modal/modal';
|
||||||
import { attachModalDialogStyler, attachButtonStyler } from 'sql/common/theme/styler';
|
import { attachModalDialogStyler, attachButtonStyler } from 'sql/common/theme/styler';
|
||||||
@@ -40,7 +40,7 @@ export class AccountDialog extends Modal {
|
|||||||
public viewModel: AccountViewModel;
|
public viewModel: AccountViewModel;
|
||||||
|
|
||||||
// MEMBER VARIABLES ////////////////////////////////////////////////////
|
// MEMBER VARIABLES ////////////////////////////////////////////////////
|
||||||
private _providerViews: { [providerId: string]: FixedListView<data.Account> } = {};
|
private _providerViews: { [providerId: string]: FixedListView<sqlops.Account> } = {};
|
||||||
|
|
||||||
private _closeButton: Button;
|
private _closeButton: Button;
|
||||||
private _delegate: AccountListDelegate;
|
private _delegate: AccountListDelegate;
|
||||||
@@ -174,8 +174,8 @@ export class AccountDialog extends Modal {
|
|||||||
|
|
||||||
// Create a fixed list view for the account provider
|
// Create a fixed list view for the account provider
|
||||||
let providerViewContainer = DOM.$('.provider-view');
|
let providerViewContainer = DOM.$('.provider-view');
|
||||||
let accountList = new List<data.Account>(providerViewContainer, this._delegate, [this._accountRenderer]);
|
let accountList = new List<sqlops.Account>(providerViewContainer, this._delegate, [this._accountRenderer]);
|
||||||
let providerView = new FixedListView<data.Account>(
|
let providerView = new FixedListView<sqlops.Account>(
|
||||||
undefined,
|
undefined,
|
||||||
false,
|
false,
|
||||||
newProvider.addedProvider.displayName,
|
newProvider.addedProvider.displayName,
|
||||||
@@ -205,7 +205,7 @@ export class AccountDialog extends Modal {
|
|||||||
this._providerViews[newProvider.addedProvider.id] = providerView;
|
this._providerViews[newProvider.addedProvider.id] = providerView;
|
||||||
}
|
}
|
||||||
|
|
||||||
private removeProvider(removedProvider: data.AccountProviderMetadata) {
|
private removeProvider(removedProvider: sqlops.AccountProviderMetadata) {
|
||||||
// Skip removing the provider if it doesn't exist
|
// Skip removing the provider if it doesn't exist
|
||||||
let providerView = this._providerViews[removedProvider.id];
|
let providerView = this._providerViews[removedProvider.id];
|
||||||
if (!providerView) {
|
if (!providerView) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
import { IAccountManagementService } from 'sql/services/accountManagement/interfaces';
|
import { IAccountManagementService } from 'sql/services/accountManagement/interfaces';
|
||||||
import { AccountProviderAddedEventParams, UpdateAccountListEventParams } from 'sql/services/accountManagement/eventTypes';
|
import { AccountProviderAddedEventParams, UpdateAccountListEventParams } from 'sql/services/accountManagement/eventTypes';
|
||||||
@@ -18,18 +18,18 @@ export class AccountViewModel {
|
|||||||
private _addProviderEmitter: Emitter<AccountProviderAddedEventParams>;
|
private _addProviderEmitter: Emitter<AccountProviderAddedEventParams>;
|
||||||
public get addProviderEvent(): Event<AccountProviderAddedEventParams> { return this._addProviderEmitter.event; }
|
public get addProviderEvent(): Event<AccountProviderAddedEventParams> { return this._addProviderEmitter.event; }
|
||||||
|
|
||||||
private _removeProviderEmitter: Emitter<data.AccountProviderMetadata>;
|
private _removeProviderEmitter: Emitter<sqlops.AccountProviderMetadata>;
|
||||||
public get removeProviderEvent(): Event<data.AccountProviderMetadata> { return this._removeProviderEmitter.event; }
|
public get removeProviderEvent(): Event<sqlops.AccountProviderMetadata> { return this._removeProviderEmitter.event; }
|
||||||
|
|
||||||
private _updateAccountListEmitter: Emitter<UpdateAccountListEventParams>;
|
private _updateAccountListEmitter: Emitter<UpdateAccountListEventParams>;
|
||||||
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return this._updateAccountListEmitter.event; }
|
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return this._updateAccountListEmitter.event; }
|
||||||
|
|
||||||
constructor(@IAccountManagementService private _accountManagementService: IAccountManagementService) {
|
constructor( @IAccountManagementService private _accountManagementService: IAccountManagementService) {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
// Create our event emitters
|
// Create our event emitters
|
||||||
this._addProviderEmitter = new Emitter<AccountProviderAddedEventParams>();
|
this._addProviderEmitter = new Emitter<AccountProviderAddedEventParams>();
|
||||||
this._removeProviderEmitter = new Emitter<data.AccountProviderMetadata>();
|
this._removeProviderEmitter = new Emitter<sqlops.AccountProviderMetadata>();
|
||||||
this._updateAccountListEmitter = new Emitter<UpdateAccountListEventParams>();
|
this._updateAccountListEmitter = new Emitter<UpdateAccountListEventParams>();
|
||||||
|
|
||||||
// Register handlers for any changes to the providers or accounts
|
// Register handlers for any changes to the providers or accounts
|
||||||
@@ -53,22 +53,22 @@ export class AccountViewModel {
|
|||||||
// 3) Build parameters to add a provider and return it
|
// 3) Build parameters to add a provider and return it
|
||||||
return this._accountManagementService.getAccountProviderMetadata()
|
return this._accountManagementService.getAccountProviderMetadata()
|
||||||
.then(
|
.then(
|
||||||
(providers: data.AccountProviderMetadata[]) => {
|
(providers: sqlops.AccountProviderMetadata[]) => {
|
||||||
let promises = providers.map(provider => {
|
let promises = providers.map(provider => {
|
||||||
return self._accountManagementService.getAccountsForProvider(provider.id)
|
return self._accountManagementService.getAccountsForProvider(provider.id)
|
||||||
.then(
|
.then(
|
||||||
accounts => <AccountProviderAddedEventParams> {
|
accounts => <AccountProviderAddedEventParams>{
|
||||||
addedProvider: provider,
|
addedProvider: provider,
|
||||||
initialAccounts: accounts
|
initialAccounts: accounts
|
||||||
},
|
},
|
||||||
() => { /* Swallow failures at getting accounts, we'll just hide that provider */ });
|
() => { /* Swallow failures at getting accounts, we'll just hide that provider */ });
|
||||||
});
|
});
|
||||||
return Promise.all(promises);
|
return Promise.all(promises);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
/* Swallow failures and just pretend we don't have any providers */
|
/* Swallow failures and just pretend we don't have any providers */
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
|||||||
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||||
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { DropdownList } from 'sql/base/browser/ui/dropdownList/dropdownList';
|
import { DropdownList } from 'sql/base/browser/ui/dropdownList/dropdownList';
|
||||||
import { attachDropdownStyler } from 'sql/common/theme/styler';
|
import { attachDropdownStyler } from 'sql/common/theme/styler';
|
||||||
import { AddAccountAction, RefreshAccountAction } from 'sql/parts/accountManagement/common/accountActions';
|
import { AddAccountAction, RefreshAccountAction } from 'sql/parts/accountManagement/common/accountActions';
|
||||||
@@ -29,7 +29,7 @@ import { AccountPickerViewModel } from 'sql/parts/accountManagement/accountPicke
|
|||||||
export class AccountPicker extends Disposable {
|
export class AccountPicker extends Disposable {
|
||||||
public static ACCOUNTPICKERLIST_HEIGHT = 47;
|
public static ACCOUNTPICKERLIST_HEIGHT = 47;
|
||||||
public viewModel: AccountPickerViewModel;
|
public viewModel: AccountPickerViewModel;
|
||||||
private _accountList: List<data.Account>;
|
private _accountList: List<sqlops.Account>;
|
||||||
private _rootElement: HTMLElement;
|
private _rootElement: HTMLElement;
|
||||||
private _refreshContainer: HTMLElement;
|
private _refreshContainer: HTMLElement;
|
||||||
private _listContainer: HTMLElement;
|
private _listContainer: HTMLElement;
|
||||||
@@ -46,8 +46,8 @@ export class AccountPicker extends Disposable {
|
|||||||
private _addAccountStartEmitter: Emitter<void>;
|
private _addAccountStartEmitter: Emitter<void>;
|
||||||
public get addAccountStartEvent(): Event<void> { return this._addAccountStartEmitter.event; }
|
public get addAccountStartEvent(): Event<void> { return this._addAccountStartEmitter.event; }
|
||||||
|
|
||||||
private _onAccountSelectionChangeEvent: Emitter<data.Account>;
|
private _onAccountSelectionChangeEvent: Emitter<sqlops.Account>;
|
||||||
public get onAccountSelectionChangeEvent(): Event<data.Account> { return this._onAccountSelectionChangeEvent.event; }
|
public get onAccountSelectionChangeEvent(): Event<sqlops.Account> { return this._onAccountSelectionChangeEvent.event; }
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _providerId: string,
|
private _providerId: string,
|
||||||
@@ -61,7 +61,7 @@ export class AccountPicker extends Disposable {
|
|||||||
this._addAccountCompleteEmitter = new Emitter<void>();
|
this._addAccountCompleteEmitter = new Emitter<void>();
|
||||||
this._addAccountErrorEmitter = new Emitter<string>();
|
this._addAccountErrorEmitter = new Emitter<string>();
|
||||||
this._addAccountStartEmitter = new Emitter<void>();
|
this._addAccountStartEmitter = new Emitter<void>();
|
||||||
this._onAccountSelectionChangeEvent = new Emitter<data.Account>();
|
this._onAccountSelectionChangeEvent = new Emitter<sqlops.Account>();
|
||||||
|
|
||||||
// Create the view model, wire up the events, and initialize with baseline data
|
// Create the view model, wire up the events, and initialize with baseline data
|
||||||
this.viewModel = this._instantiationService.createInstance(AccountPickerViewModel, this._providerId);
|
this.viewModel = this._instantiationService.createInstance(AccountPickerViewModel, this._providerId);
|
||||||
@@ -89,7 +89,7 @@ export class AccountPicker extends Disposable {
|
|||||||
let delegate = new AccountListDelegate(AccountPicker.ACCOUNTPICKERLIST_HEIGHT);
|
let delegate = new AccountListDelegate(AccountPicker.ACCOUNTPICKERLIST_HEIGHT);
|
||||||
let accountRenderer = new AccountPickerListRenderer();
|
let accountRenderer = new AccountPickerListRenderer();
|
||||||
this._listContainer = DOM.$('div.account-list-container');
|
this._listContainer = DOM.$('div.account-list-container');
|
||||||
this._accountList = new List<data.Account>(this._listContainer, delegate, [accountRenderer]);
|
this._accountList = new List<sqlops.Account>(this._listContainer, delegate, [accountRenderer]);
|
||||||
this._register(attachListStyler(this._accountList, this._themeService));
|
this._register(attachListStyler(this._accountList, this._themeService));
|
||||||
|
|
||||||
this._rootElement = DOM.$('div.account-picker-container');
|
this._rootElement = DOM.$('div.account-picker-container');
|
||||||
@@ -108,7 +108,7 @@ export class AccountPicker extends Disposable {
|
|||||||
|
|
||||||
this._dropdown = this._register(new DropdownList(this._rootElement, option, this._listContainer, this._accountList, this._themeService, addAccountAction));
|
this._dropdown = this._register(new DropdownList(this._rootElement, option, this._listContainer, this._accountList, this._themeService, addAccountAction));
|
||||||
this._register(attachDropdownStyler(this._dropdown, this._themeService));
|
this._register(attachDropdownStyler(this._dropdown, this._themeService));
|
||||||
this._register(this._accountList.onSelectionChange((e: IListEvent<data.Account>) => {
|
this._register(this._accountList.onSelectionChange((e: IListEvent<sqlops.Account>) => {
|
||||||
if (e.elements.length === 1) {
|
if (e.elements.length === 1) {
|
||||||
this._dropdown.renderLabel();
|
this._dropdown.renderLabel();
|
||||||
this.onAccountSelectionChange(e.elements[0]);
|
this.onAccountSelectionChange(e.elements[0]);
|
||||||
@@ -134,7 +134,7 @@ export class AccountPicker extends Disposable {
|
|||||||
|
|
||||||
// Load the initial contents of the view model
|
// Load the initial contents of the view model
|
||||||
this.viewModel.initialize()
|
this.viewModel.initialize()
|
||||||
.then((accounts: data.Account[]) => {
|
.then((accounts: sqlops.Account[]) => {
|
||||||
this.updateAccountList(accounts);
|
this.updateAccountList(accounts);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -147,7 +147,7 @@ export class AccountPicker extends Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PRIVATE HELPERS /////////////////////////////////////////////////////
|
// PRIVATE HELPERS /////////////////////////////////////////////////////
|
||||||
private onAccountSelectionChange(account: data.Account) {
|
private onAccountSelectionChange(account: sqlops.Account) {
|
||||||
this.viewModel.selectedAccount = account;
|
this.viewModel.selectedAccount = account;
|
||||||
if (account && account.isStale) {
|
if (account && account.isStale) {
|
||||||
this._refreshAccountAction.account = account;
|
this._refreshAccountAction.account = account;
|
||||||
@@ -194,7 +194,7 @@ export class AccountPicker extends Disposable {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateAccountList(accounts: data.Account[]): void {
|
private updateAccountList(accounts: sqlops.Account[]): void {
|
||||||
// keep the selection to the current one
|
// keep the selection to the current one
|
||||||
let selectedElements = this._accountList.getSelectedElements();
|
let selectedElements = this._accountList.getSelectedElements();
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import { IAccountPickerService } from 'sql/parts/accountManagement/common/interfaces';
|
import { IAccountPickerService } from 'sql/parts/accountManagement/common/interfaces';
|
||||||
import { AccountPicker } from 'sql/parts/accountManagement/accountPicker/accountPicker';
|
import { AccountPicker } from 'sql/parts/accountManagement/accountPicker/accountPicker';
|
||||||
@@ -26,8 +26,8 @@ export class AccountPickerService implements IAccountPickerService {
|
|||||||
private _addAccountStartEmitter: Emitter<void>;
|
private _addAccountStartEmitter: Emitter<void>;
|
||||||
public get addAccountStartEvent(): Event<void> { return this._addAccountStartEmitter.event; }
|
public get addAccountStartEvent(): Event<void> { return this._addAccountStartEmitter.event; }
|
||||||
|
|
||||||
private _onAccountSelectionChangeEvent: Emitter<data.Account>;
|
private _onAccountSelectionChangeEvent: Emitter<sqlops.Account>;
|
||||||
public get onAccountSelectionChangeEvent(): Event<data.Account> { return this._onAccountSelectionChangeEvent.event; }
|
public get onAccountSelectionChangeEvent(): Event<sqlops.Account> { return this._onAccountSelectionChangeEvent.event; }
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@IInstantiationService private _instantiationService: IInstantiationService
|
@IInstantiationService private _instantiationService: IInstantiationService
|
||||||
@@ -36,13 +36,13 @@ export class AccountPickerService implements IAccountPickerService {
|
|||||||
this._addAccountCompleteEmitter = new Emitter<void>();
|
this._addAccountCompleteEmitter = new Emitter<void>();
|
||||||
this._addAccountErrorEmitter = new Emitter<string>();
|
this._addAccountErrorEmitter = new Emitter<string>();
|
||||||
this._addAccountStartEmitter = new Emitter<void>();
|
this._addAccountStartEmitter = new Emitter<void>();
|
||||||
this._onAccountSelectionChangeEvent = new Emitter<data.Account>();
|
this._onAccountSelectionChangeEvent = new Emitter<sqlops.Account>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get selected account
|
* Get selected account
|
||||||
*/
|
*/
|
||||||
public get selectedAccount(): data.Account {
|
public get selectedAccount(): sqlops.Account {
|
||||||
return this._accountPicker.viewModel.selectedAccount;
|
return this._accountPicker.viewModel.selectedAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
|
|
||||||
import { IAccountManagementService } from 'sql/services/accountManagement/interfaces';
|
import { IAccountManagementService } from 'sql/services/accountManagement/interfaces';
|
||||||
@@ -18,7 +18,7 @@ export class AccountPickerViewModel {
|
|||||||
private _updateAccountListEmitter: Emitter<UpdateAccountListEventParams>;
|
private _updateAccountListEmitter: Emitter<UpdateAccountListEventParams>;
|
||||||
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return this._updateAccountListEmitter.event; }
|
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return this._updateAccountListEmitter.event; }
|
||||||
|
|
||||||
public selectedAccount: data.Account;
|
public selectedAccount: sqlops.Account;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _providerId: string,
|
private _providerId: string,
|
||||||
@@ -38,7 +38,7 @@ export class AccountPickerViewModel {
|
|||||||
* Loads an initial list of accounts from the account management service
|
* Loads an initial list of accounts from the account management service
|
||||||
* @return {Thenable<Account[]>} Promise to return the list of accounts
|
* @return {Thenable<Account[]>} Promise to return the list of accounts
|
||||||
*/
|
*/
|
||||||
public initialize(): Thenable<data.Account[]> {
|
public initialize(): Thenable<sqlops.Account[]> {
|
||||||
// Load a baseline of the accounts for the provider
|
// Load a baseline of the accounts for the provider
|
||||||
return this._accountManagementService.getAccountsForProvider(this._providerId)
|
return this._accountManagementService.getAccountsForProvider(this._providerId)
|
||||||
.then(null, () => {
|
.then(null, () => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import { TPromise } from 'vs/base/common/winjs.base';
|
import { TPromise } from 'vs/base/common/winjs.base';
|
||||||
@@ -55,16 +55,16 @@ export class AddAccountAction extends Action {
|
|||||||
return new TPromise((resolve, reject) => {
|
return new TPromise((resolve, reject) => {
|
||||||
self._accountManagementService.addAccount(self._providerId)
|
self._accountManagementService.addAccount(self._providerId)
|
||||||
.then(
|
.then(
|
||||||
() => {
|
() => {
|
||||||
self._addAccountCompleteEmitter.fire();
|
self._addAccountCompleteEmitter.fire();
|
||||||
resolve(true);
|
resolve(true);
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
error(`Error while adding account: ${err}`);
|
error(`Error while adding account: ${err}`);
|
||||||
self._addAccountErrorEmitter.fire(err);
|
self._addAccountErrorEmitter.fire(err);
|
||||||
self._addAccountCompleteEmitter.fire();
|
self._addAccountCompleteEmitter.fire();
|
||||||
reject(err);
|
reject(err);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ export class RemoveAccountAction extends Action {
|
|||||||
public static LABEL = localize('removeAccount', 'Remove account');
|
public static LABEL = localize('removeAccount', 'Remove account');
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _account: data.Account,
|
private _account: sqlops.Account,
|
||||||
@IMessageService private _messageService: IMessageService,
|
@IMessageService private _messageService: IMessageService,
|
||||||
@IErrorMessageService private _errorMessageService: IErrorMessageService,
|
@IErrorMessageService private _errorMessageService: IErrorMessageService,
|
||||||
@IAccountManagementService private _accountManagementService: IAccountManagementService
|
@IAccountManagementService private _accountManagementService: IAccountManagementService
|
||||||
@@ -143,7 +143,7 @@ export class ApplyFilterAction extends Action {
|
|||||||
export class RefreshAccountAction extends Action {
|
export class RefreshAccountAction extends Action {
|
||||||
public static ID = 'account.refresh';
|
public static ID = 'account.refresh';
|
||||||
public static LABEL = localize('refreshAccount', 'Reenter your credentials');
|
public static LABEL = localize('refreshAccount', 'Reenter your credentials');
|
||||||
public account: data.Account;
|
public account: sqlops.Account;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@IAccountManagementService private _accountManagementService: IAccountManagementService
|
@IAccountManagementService private _accountManagementService: IAccountManagementService
|
||||||
@@ -156,14 +156,14 @@ export class RefreshAccountAction extends Action {
|
|||||||
if (self.account) {
|
if (self.account) {
|
||||||
self._accountManagementService.refreshAccount(self.account)
|
self._accountManagementService.refreshAccount(self.account)
|
||||||
.then(
|
.then(
|
||||||
() => {
|
() => {
|
||||||
resolve(true);
|
resolve(true);
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
error(`Error while refreshing account: ${err}`);
|
error(`Error while refreshing account: ${err}`);
|
||||||
reject(err);
|
reject(err);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
let errorMessage = localize('NoAccountToRefresh', 'There is no account to refresh');
|
let errorMessage = localize('NoAccountToRefresh', 'There is no account to refresh');
|
||||||
reject(errorMessage);
|
reject(errorMessage);
|
||||||
|
|||||||
@@ -15,20 +15,20 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
|||||||
|
|
||||||
import { RemoveAccountAction, RefreshAccountAction } from 'sql/parts/accountManagement/common/accountActions';
|
import { RemoveAccountAction, RefreshAccountAction } from 'sql/parts/accountManagement/common/accountActions';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
export class AccountListDelegate implements IDelegate<data.Account> {
|
export class AccountListDelegate implements IDelegate<sqlops.Account> {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _height: number
|
private _height: number
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getHeight(element: data.Account): number {
|
public getHeight(element: sqlops.Account): number {
|
||||||
return this._height;
|
return this._height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTemplateId(element: data.Account): string {
|
public getTemplateId(element: sqlops.Account): string {
|
||||||
return 'accountListRenderer';
|
return 'accountListRenderer';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ export interface AccountListTemplate {
|
|||||||
actions?: ActionBar;
|
actions?: ActionBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AccountPickerListRenderer implements IRenderer<data.Account, AccountListTemplate> {
|
export class AccountPickerListRenderer implements IRenderer<sqlops.Account, AccountListTemplate> {
|
||||||
public static TEMPLATE_ID = 'accountListRenderer';
|
public static TEMPLATE_ID = 'accountListRenderer';
|
||||||
|
|
||||||
public get templateId(): string {
|
public get templateId(): string {
|
||||||
@@ -64,7 +64,7 @@ export class AccountPickerListRenderer implements IRenderer<data.Account, Accoun
|
|||||||
return tableTemplate;
|
return tableTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public renderElement(account: data.Account, index: number, templateData: AccountListTemplate): void {
|
public renderElement(account: sqlops.Account, index: number, templateData: AccountListTemplate): void {
|
||||||
// Set the account icon
|
// Set the account icon
|
||||||
templateData.icon.classList.add('account-logo', account.displayInfo.accountType);
|
templateData.icon.classList.add('account-logo', account.displayInfo.accountType);
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ export class AccountListRenderer extends AccountPickerListRenderer {
|
|||||||
return tableTemplate;
|
return tableTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public renderElement(account: data.Account, index: number, templateData: AccountListTemplate): void {
|
public renderElement(account: sqlops.Account, index: number, templateData: AccountListTemplate): void {
|
||||||
super.renderElement(account, index, templateData);
|
super.renderElement(account, index, templateData);
|
||||||
if (account.isStale) {
|
if (account.isStale) {
|
||||||
templateData.content.innerText = localize('refreshCredentials', 'You need to refresh the credentials for this account.');
|
templateData.content.innerText = localize('refreshCredentials', 'You need to refresh the credentials for this account.');
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import Event from 'vs/base/common/event';
|
import Event from 'vs/base/common/event';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ export interface IResourceProviderService {
|
|||||||
/**
|
/**
|
||||||
* Register a resource provider
|
* Register a resource provider
|
||||||
*/
|
*/
|
||||||
registerProvider(providerId: string, provider: data.ResourceProvider): void;
|
registerProvider(providerId: string, provider: sqlops.ResourceProvider): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unregister a resource provider
|
* Unregister a resource provider
|
||||||
@@ -36,7 +36,7 @@ export interface IResourceProviderService {
|
|||||||
/**
|
/**
|
||||||
* Create a firewall rule
|
* Create a firewall rule
|
||||||
*/
|
*/
|
||||||
createFirewallRule(selectedAccount: data.Account, firewallruleInfo: data.FirewallRuleInfo, resourceProviderId: string): Promise<data.CreateFirewallRuleResponse>;
|
createFirewallRule(selectedAccount: sqlops.Account, firewallruleInfo: sqlops.FirewallRuleInfo, resourceProviderId: string): Promise<sqlops.CreateFirewallRuleResponse>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* handle a firewall rule
|
* handle a firewall rule
|
||||||
@@ -56,6 +56,6 @@ export interface IAccountPickerService {
|
|||||||
addAccountCompleteEvent: Event<void>;
|
addAccountCompleteEvent: Event<void>;
|
||||||
addAccountErrorEvent: Event<string>;
|
addAccountErrorEvent: Event<string>;
|
||||||
addAccountStartEvent: Event<void>;
|
addAccountStartEvent: Event<void>;
|
||||||
onAccountSelectionChangeEvent: Event<data.Account>;
|
onAccountSelectionChangeEvent: Event<sqlops.Account>;
|
||||||
selectedAccount: data.Account;
|
selectedAccount: sqlops.Account;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
|||||||
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
||||||
import { FirewallRuleDialogController } from 'sql/parts/accountManagement/firewallRuleDialog/firewallRuleDialogController';
|
import { FirewallRuleDialogController } from 'sql/parts/accountManagement/firewallRuleDialog/firewallRuleDialogController';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
export class ResourceProviderService implements IResourceProviderService {
|
export class ResourceProviderService implements IResourceProviderService {
|
||||||
|
|
||||||
public _serviceBrand: any;
|
public _serviceBrand: any;
|
||||||
private _providers: { [handle: string]: data.ResourceProvider; } = Object.create(null);
|
private _providers: { [handle: string]: sqlops.ResourceProvider; } = Object.create(null);
|
||||||
private _firewallRuleDialogController: FirewallRuleDialogController;
|
private _firewallRuleDialogController: FirewallRuleDialogController;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -44,8 +44,8 @@ export class ResourceProviderService implements IResourceProviderService {
|
|||||||
/**
|
/**
|
||||||
* Create a firewall rule
|
* Create a firewall rule
|
||||||
*/
|
*/
|
||||||
public createFirewallRule(selectedAccount: data.Account, firewallruleInfo: data.FirewallRuleInfo, resourceProviderId: string): Promise<data.CreateFirewallRuleResponse> {
|
public createFirewallRule(selectedAccount: sqlops.Account, firewallruleInfo: sqlops.FirewallRuleInfo, resourceProviderId: string): Promise<sqlops.CreateFirewallRuleResponse> {
|
||||||
return new Promise<data.CreateFirewallRuleResponse>((resolve, reject) => {
|
return new Promise<sqlops.CreateFirewallRuleResponse>((resolve, reject) => {
|
||||||
let provider = this._providers[resourceProviderId];
|
let provider = this._providers[resourceProviderId];
|
||||||
if (provider) {
|
if (provider) {
|
||||||
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.FirewallRuleRequested, { provider: resourceProviderId });
|
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.FirewallRuleRequested, { provider: resourceProviderId });
|
||||||
@@ -96,7 +96,7 @@ export class ResourceProviderService implements IResourceProviderService {
|
|||||||
/**
|
/**
|
||||||
* Register a resource provider
|
* Register a resource provider
|
||||||
*/
|
*/
|
||||||
public registerProvider(providerId: string, provider: data.ResourceProvider): void {
|
public registerProvider(providerId: string, provider: sqlops.ResourceProvider): void {
|
||||||
this._providers[providerId] = provider;
|
this._providers[providerId] = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
|||||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { Button } from 'sql/base/browser/ui/button/button';
|
import { Button } from 'sql/base/browser/ui/button/button';
|
||||||
import { Modal } from 'sql/base/browser/ui/modal/modal';
|
import { Modal } from 'sql/base/browser/ui/modal/modal';
|
||||||
import { FirewallRuleViewModel } from 'sql/parts/accountManagement/firewallRuleDialog/firewallRuleViewModel';
|
import { FirewallRuleViewModel } from 'sql/parts/accountManagement/firewallRuleDialog/firewallRuleViewModel';
|
||||||
@@ -291,7 +291,7 @@ export class FirewallRuleDialog extends Modal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public onAccountSelectionChange(account: data.Account): void {
|
public onAccountSelectionChange(account: sqlops.Account): void {
|
||||||
this.viewModel.selectedAccount = account;
|
this.viewModel.selectedAccount = account;
|
||||||
if (account && !account.isStale) {
|
if (account && !account.isStale) {
|
||||||
this._createButton.enabled = true;
|
this._createButton.enabled = true;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import Severity from 'vs/base/common/severity';
|
import Severity from 'vs/base/common/severity';
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
import { IErrorMessageService } from 'sql/parts/connection/common/connectionManagement';
|
import { IErrorMessageService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
@@ -62,7 +62,7 @@ export class FirewallRuleDialogController {
|
|||||||
let resourceProviderId = this._resourceProviderId;
|
let resourceProviderId = this._resourceProviderId;
|
||||||
|
|
||||||
this._accountManagementService.getSecurityToken(this._firewallRuleDialog.viewModel.selectedAccount).then(tokenMappings => {
|
this._accountManagementService.getSecurityToken(this._firewallRuleDialog.viewModel.selectedAccount).then(tokenMappings => {
|
||||||
let firewallRuleInfo: data.FirewallRuleInfo = {
|
let firewallRuleInfo: sqlops.FirewallRuleInfo = {
|
||||||
startIpAddress: this._firewallRuleDialog.viewModel.isIPAddressSelected ? this._firewallRuleDialog.viewModel.defaultIPAddress : this._firewallRuleDialog.viewModel.fromSubnetIPRange,
|
startIpAddress: this._firewallRuleDialog.viewModel.isIPAddressSelected ? this._firewallRuleDialog.viewModel.defaultIPAddress : this._firewallRuleDialog.viewModel.fromSubnetIPRange,
|
||||||
endIpAddress: this._firewallRuleDialog.viewModel.isIPAddressSelected ? this._firewallRuleDialog.viewModel.defaultIPAddress : this._firewallRuleDialog.viewModel.toSubnetIPRange,
|
endIpAddress: this._firewallRuleDialog.viewModel.isIPAddressSelected ? this._firewallRuleDialog.viewModel.defaultIPAddress : this._firewallRuleDialog.viewModel.toSubnetIPRange,
|
||||||
serverName: this._connection.serverName,
|
serverName: this._connection.serverName,
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* View model for firewall rule dialog
|
* View model for firewall rule dialog
|
||||||
*/
|
*/
|
||||||
export class FirewallRuleViewModel {
|
export class FirewallRuleViewModel {
|
||||||
public isIPAddressSelected: boolean;
|
public isIPAddressSelected: boolean;
|
||||||
public selectedAccount: data.Account;
|
public selectedAccount: sqlops.Account;
|
||||||
|
|
||||||
private _defaultIPAddress: string;
|
private _defaultIPAddress: string;
|
||||||
private _defaultFromSubnetIPRange: string;
|
private _defaultFromSubnetIPRange: string;
|
||||||
|
|||||||
@@ -18,32 +18,32 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
|||||||
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
|
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
|
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
export const IAdminService = createDecorator<IAdminService>(SERVICE_ID);
|
export const IAdminService = createDecorator<IAdminService>(SERVICE_ID);
|
||||||
|
|
||||||
export interface IAdminService {
|
export interface IAdminService {
|
||||||
_serviceBrand: any;
|
_serviceBrand: any;
|
||||||
|
|
||||||
registerProvider(providerId: string, provider: data.AdminServicesProvider): void;
|
registerProvider(providerId: string, provider: sqlops.AdminServicesProvider): void;
|
||||||
|
|
||||||
showCreateDatabaseWizard(uri: string, connection: IConnectionProfile): Promise<any>;
|
showCreateDatabaseWizard(uri: string, connection: IConnectionProfile): Promise<any>;
|
||||||
|
|
||||||
showCreateLoginWizard(uri: string, connection: IConnectionProfile): Promise<any>;
|
showCreateLoginWizard(uri: string, connection: IConnectionProfile): Promise<any>;
|
||||||
|
|
||||||
createDatabase(connectionUri: string, database: data.DatabaseInfo): Thenable<data.CreateDatabaseResponse>;
|
createDatabase(connectionUri: string, database: sqlops.DatabaseInfo): Thenable<sqlops.CreateDatabaseResponse>;
|
||||||
|
|
||||||
getDefaultDatabaseInfo(connectionUri: string): Thenable<data.DatabaseInfo>;
|
getDefaultDatabaseInfo(connectionUri: string): Thenable<sqlops.DatabaseInfo>;
|
||||||
|
|
||||||
getDatabaseInfo(connectionUri: string): Thenable<data.DatabaseInfo>;
|
getDatabaseInfo(connectionUri: string): Thenable<sqlops.DatabaseInfo>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AdminService implements IAdminService {
|
export class AdminService implements IAdminService {
|
||||||
_serviceBrand: any;
|
_serviceBrand: any;
|
||||||
|
|
||||||
private _providers: { [handle: string]: data.AdminServicesProvider; } = Object.create(null);
|
private _providers: { [handle: string]: sqlops.AdminServicesProvider; } = Object.create(null);
|
||||||
|
|
||||||
private _providerOptions: { [handle: string]: data.AdminServicesOptions; } = Object.create(null);
|
private _providerOptions: { [handle: string]: sqlops.AdminServicesOptions; } = Object.create(null);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@IInstantiationService private _instantiationService: IInstantiationService,
|
@IInstantiationService private _instantiationService: IInstantiationService,
|
||||||
@@ -58,7 +58,7 @@ export class AdminService implements IAdminService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _runAction<T>(uri: string, action: (handler: data.AdminServicesProvider) => Thenable<T>): Thenable<T> {
|
private _runAction<T>(uri: string, action: (handler: sqlops.AdminServicesProvider) => Thenable<T>): Thenable<T> {
|
||||||
let providerId: string = this._connectionService.getProviderIdFromUri(uri);
|
let providerId: string = this._connectionService.getProviderIdFromUri(uri);
|
||||||
|
|
||||||
if (!providerId) {
|
if (!providerId) {
|
||||||
@@ -81,7 +81,7 @@ export class AdminService implements IAdminService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public createDatabase(connectionUri: string, database: data.DatabaseInfo): Thenable<data.CreateDatabaseResponse> {
|
public createDatabase(connectionUri: string, database: sqlops.DatabaseInfo): Thenable<sqlops.CreateDatabaseResponse> {
|
||||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||||
if (providerId) {
|
if (providerId) {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
@@ -104,7 +104,7 @@ export class AdminService implements IAdminService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public createLogin(connectionUri: string, login: data.LoginInfo): Thenable<data.CreateLoginResponse> {
|
public createLogin(connectionUri: string, login: sqlops.LoginInfo): Thenable<sqlops.CreateLoginResponse> {
|
||||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||||
if (providerId) {
|
if (providerId) {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
@@ -115,7 +115,7 @@ export class AdminService implements IAdminService {
|
|||||||
return Promise.resolve(undefined);
|
return Promise.resolve(undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getDefaultDatabaseInfo(connectionUri: string): Thenable<data.DatabaseInfo> {
|
public getDefaultDatabaseInfo(connectionUri: string): Thenable<sqlops.DatabaseInfo> {
|
||||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||||
if (providerId) {
|
if (providerId) {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
@@ -126,13 +126,13 @@ export class AdminService implements IAdminService {
|
|||||||
return Promise.resolve(undefined);
|
return Promise.resolve(undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getDatabaseInfo(connectionUri: string): Thenable<data.DatabaseInfo> {
|
public getDatabaseInfo(connectionUri: string): Thenable<sqlops.DatabaseInfo> {
|
||||||
return this._runAction(connectionUri, (runner) => {
|
return this._runAction(connectionUri, (runner) => {
|
||||||
return runner.getDatabaseInfo(connectionUri);
|
return runner.getDatabaseInfo(connectionUri);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public registerProvider(providerId: string, provider: data.AdminServicesProvider): void {
|
public registerProvider(providerId: string, provider: sqlops.AdminServicesProvider): void {
|
||||||
this._providers[providerId] = provider;
|
this._providers[providerId] = provider;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,18 +11,18 @@ import { ConnectionManagementInfo } from 'sql/parts/connection/common/connection
|
|||||||
import { IAdminService } from 'sql/parts/admin/common/adminService';
|
import { IAdminService } from 'sql/parts/admin/common/adminService';
|
||||||
import { ITaskDialogComponent } from 'sql/parts/tasks/common/tasks';
|
import { ITaskDialogComponent } from 'sql/parts/tasks/common/tasks';
|
||||||
|
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
import * as nls from 'vs/nls';
|
import * as nls from 'vs/nls';
|
||||||
|
|
||||||
export const CREATEDATABASE_SELECTOR: string = 'createdatabase-component';
|
export const CREATEDATABASE_SELECTOR: string = 'createdatabase-component';
|
||||||
|
|
||||||
export interface DatabaseFile {
|
export interface DatabaseFile {
|
||||||
logicalName: string;
|
logicalName: string;
|
||||||
fileType: string;
|
fileType: string;
|
||||||
filegroup: string;
|
filegroup: string;
|
||||||
initialSize: string;
|
initialSize: string;
|
||||||
autogrow: string;
|
autogrow: string;
|
||||||
path: string;
|
path: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -31,43 +31,43 @@ export interface DatabaseFile {
|
|||||||
})
|
})
|
||||||
export class CreateDatabaseComponent implements ITaskDialogComponent {
|
export class CreateDatabaseComponent implements ITaskDialogComponent {
|
||||||
|
|
||||||
private _adminService: IAdminService;
|
private _adminService: IAdminService;
|
||||||
|
|
||||||
public formSubmitted: boolean = false;
|
public formSubmitted: boolean = false;
|
||||||
|
|
||||||
public ownerUri: string;
|
public ownerUri: string;
|
||||||
|
|
||||||
public connection: ConnectionManagementInfo;
|
public connection: ConnectionManagementInfo;
|
||||||
|
|
||||||
public databaseFiles: DatabaseFile[] = [];
|
public databaseFiles: DatabaseFile[] = [];
|
||||||
|
|
||||||
// tslint:disable:no-unused-variable
|
// tslint:disable:no-unused-variable
|
||||||
private readonly databaseFilesLabel: string = nls.localize('createDatabase.databaseFiles', 'Database files:');
|
private readonly databaseFilesLabel: string = nls.localize('createDatabase.databaseFiles', 'Database files:');
|
||||||
private readonly noRecordsFoundLabel: string = nls.localize('createDatabase.noRecordsFound', 'No records found');
|
private readonly noRecordsFoundLabel: string = nls.localize('createDatabase.noRecordsFound', 'No records found');
|
||||||
// tslint:enable:no-unused-variable
|
// tslint:enable:no-unused-variable
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
||||||
@Inject(forwardRef(() => ChangeDetectorRef)) private _changeDetectorRef: ChangeDetectorRef,
|
@Inject(forwardRef(() => ChangeDetectorRef)) private _changeDetectorRef: ChangeDetectorRef,
|
||||||
@Inject(BOOTSTRAP_SERVICE_ID) private _bootstrapService: IBootstrapService
|
@Inject(BOOTSTRAP_SERVICE_ID) private _bootstrapService: IBootstrapService
|
||||||
) {
|
) {
|
||||||
this._adminService = this._bootstrapService.adminService;
|
this._adminService = this._bootstrapService.adminService;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getDatabaseInfo(form: NgForm): data.DatabaseInfo {
|
private getDatabaseInfo(form: NgForm): sqlops.DatabaseInfo {
|
||||||
return <data.DatabaseInfo>{
|
return <sqlops.DatabaseInfo>{
|
||||||
options: {
|
options: {
|
||||||
name: form.value.databaseName,
|
name: form.value.databaseName,
|
||||||
owner: form.value.databaseOwner
|
owner: form.value.databaseOwner
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public onSubmit(form: NgForm): void {
|
public onSubmit(form: NgForm): void {
|
||||||
this._adminService.createDatabase(this.ownerUri, this.getDatabaseInfo(form));
|
this._adminService.createDatabase(this.ownerUri, this.getDatabaseInfo(form));
|
||||||
this.formSubmitted = true;
|
this.formSubmitted = true;
|
||||||
this._changeDetectorRef.detectChanges();
|
this._changeDetectorRef.detectChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
public onOk(): void { }
|
public onOk(): void { }
|
||||||
|
|
||||||
@@ -75,24 +75,24 @@ export class CreateDatabaseComponent implements ITaskDialogComponent {
|
|||||||
|
|
||||||
public onCancel(): void { }
|
public onCancel(): void { }
|
||||||
|
|
||||||
public onSelectOwner(): void { }
|
public onSelectOwner(): void { }
|
||||||
|
|
||||||
public injectBootstapper(parameters: TaskDialogComponentParams ): void {
|
public injectBootstapper(parameters: TaskDialogComponentParams): void {
|
||||||
let self = this;
|
let self = this;
|
||||||
this.ownerUri = parameters.ownerUri;
|
this.ownerUri = parameters.ownerUri;
|
||||||
this._adminService.getDefaultDatabaseInfo(this.ownerUri).then(dbInfo => {
|
this._adminService.getDefaultDatabaseInfo(this.ownerUri).then(dbInfo => {
|
||||||
let databaseFilesCount = dbInfo.options['databaseFilesCount'];
|
let databaseFilesCount = dbInfo.options['databaseFilesCount'];
|
||||||
for (let i = 0; i < databaseFilesCount; ++i) {
|
for (let i = 0; i < databaseFilesCount; ++i) {
|
||||||
self.databaseFiles[i] = {
|
self.databaseFiles[i] = {
|
||||||
logicalName: dbInfo.options['databaseFiles.' + i + '.name'],
|
logicalName: dbInfo.options['databaseFiles.' + i + '.name'],
|
||||||
fileType: dbInfo.options['databaseFiles.' + i + '.databaseFileType'],
|
fileType: dbInfo.options['databaseFiles.' + i + '.databaseFileType'],
|
||||||
filegroup: dbInfo.options['databaseFiles.' + i + '.fileGroup'],
|
filegroup: dbInfo.options['databaseFiles.' + i + '.fileGroup'],
|
||||||
initialSize: dbInfo.options['databaseFiles.' + i + '.initialSize'],
|
initialSize: dbInfo.options['databaseFiles.' + i + '.initialSize'],
|
||||||
autogrow: dbInfo.options['databaseFiles.' + i + '.autogrowth'],
|
autogrow: dbInfo.options['databaseFiles.' + i + '.autogrowth'],
|
||||||
path: dbInfo.options['databaseFiles.' + i + '.folder']
|
path: dbInfo.options['databaseFiles.' + i + '.folder']
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
self._changeDetectorRef.detectChanges();
|
self._changeDetectorRef.detectChanges();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import * as Utils from './utils';
|
|||||||
import { IConnectionProfile, IConnectionProfileStore } from './interfaces';
|
import { IConnectionProfile, IConnectionProfileStore } from './interfaces';
|
||||||
import { IConnectionConfig } from './iconnectionConfig';
|
import { IConnectionConfig } from './iconnectionConfig';
|
||||||
import { ConnectionProfileGroup, IConnectionProfileGroup } from './connectionProfileGroup';
|
import { ConnectionProfileGroup, IConnectionProfileGroup } from './connectionProfileGroup';
|
||||||
import { ConfigurationEditingService, IConfigurationValue, IConfigurationValue as TConfigurationValue } from 'vs/workbench/services/configuration/node/configurationEditingService';
|
import { ConfigurationEditingService, IConfigurationValue } from 'vs/workbench/services/configuration/node/configurationEditingService';
|
||||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||||
import { ConnectionProfile } from './connectionProfile';
|
import { ConnectionProfile } from './connectionProfile';
|
||||||
import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesService';
|
import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesService';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as nls from 'vs/nls';
|
import * as nls from 'vs/nls';
|
||||||
|
|
||||||
import { generateUuid } from 'vs/base/common/uuid';
|
import { generateUuid } from 'vs/base/common/uuid';
|
||||||
@@ -29,7 +29,7 @@ export interface ISaveGroupResult {
|
|||||||
*/
|
*/
|
||||||
export class ConnectionConfig implements IConnectionConfig {
|
export class ConnectionConfig implements IConnectionConfig {
|
||||||
|
|
||||||
private _providerCapabilitiesMap: { [providerName: string]: data.DataProtocolServerCapabilities };
|
private _providerCapabilitiesMap: { [providerName: string]: sqlops.DataProtocolServerCapabilities };
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,7 @@ export class ConnectionConfig implements IConnectionConfig {
|
|||||||
private _configurationEditService: ConfigurationEditingService,
|
private _configurationEditService: ConfigurationEditingService,
|
||||||
private _workspaceConfigurationService: IWorkspaceConfigurationService,
|
private _workspaceConfigurationService: IWorkspaceConfigurationService,
|
||||||
private _capabilitiesService: ICapabilitiesService,
|
private _capabilitiesService: ICapabilitiesService,
|
||||||
cachedMetadata?: data.DataProtocolServerCapabilities[]
|
cachedMetadata?: sqlops.DataProtocolServerCapabilities[]
|
||||||
) {
|
) {
|
||||||
this._providerCapabilitiesMap = {};
|
this._providerCapabilitiesMap = {};
|
||||||
this.setCachedMetadata(cachedMetadata);
|
this.setCachedMetadata(cachedMetadata);
|
||||||
@@ -48,7 +48,7 @@ export class ConnectionConfig implements IConnectionConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public setCachedMetadata(cachedMetadata: data.DataProtocolServerCapabilities[]): void {
|
public setCachedMetadata(cachedMetadata: sqlops.DataProtocolServerCapabilities[]): void {
|
||||||
if (cachedMetadata) {
|
if (cachedMetadata) {
|
||||||
cachedMetadata.forEach(item => {
|
cachedMetadata.forEach(item => {
|
||||||
this.updateCapabilitiesCache(item.providerName, item);
|
this.updateCapabilitiesCache(item.providerName, item);
|
||||||
@@ -81,13 +81,13 @@ export class ConnectionConfig implements IConnectionConfig {
|
|||||||
return allGroups;
|
return allGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateCapabilitiesCache(providerName: string, providerCapabilities: data.DataProtocolServerCapabilities): void {
|
private updateCapabilitiesCache(providerName: string, providerCapabilities: sqlops.DataProtocolServerCapabilities): void {
|
||||||
if (providerName && providerCapabilities) {
|
if (providerName && providerCapabilities) {
|
||||||
this._providerCapabilitiesMap[providerName] = providerCapabilities;
|
this._providerCapabilitiesMap[providerName] = providerCapabilities;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private getCapabilitiesFromCache(providerName: string): data.DataProtocolServerCapabilities {
|
private getCapabilitiesFromCache(providerName: string): sqlops.DataProtocolServerCapabilities {
|
||||||
if (providerName in this._providerCapabilitiesMap) {
|
if (providerName in this._providerCapabilitiesMap) {
|
||||||
return this._providerCapabilitiesMap[providerName];
|
return this._providerCapabilitiesMap[providerName];
|
||||||
}
|
}
|
||||||
@@ -99,8 +99,8 @@ export class ConnectionConfig implements IConnectionConfig {
|
|||||||
* Gets the data from the metadata stored in the config
|
* Gets the data from the metadata stored in the config
|
||||||
* @param providerName Provider Name
|
* @param providerName Provider Name
|
||||||
*/
|
*/
|
||||||
public getCapabilities(providerName: string): data.DataProtocolServerCapabilities {
|
public getCapabilities(providerName: string): sqlops.DataProtocolServerCapabilities {
|
||||||
let result: data.DataProtocolServerCapabilities = this.getCapabilitiesFromCache(providerName);
|
let result: sqlops.DataProtocolServerCapabilities = this.getCapabilitiesFromCache(providerName);
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
@@ -159,7 +159,7 @@ export class ConnectionConfig implements IConnectionConfig {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private getConnectionProfileInstance(profile: IConnectionProfile, groupId: string, providerCapabilities: data.DataProtocolServerCapabilities): ConnectionProfile {
|
private getConnectionProfileInstance(profile: IConnectionProfile, groupId: string, providerCapabilities: sqlops.DataProtocolServerCapabilities): ConnectionProfile {
|
||||||
let connectionProfile = profile as ConnectionProfile;
|
let connectionProfile = profile as ConnectionProfile;
|
||||||
if (connectionProfile === undefined) {
|
if (connectionProfile === undefined) {
|
||||||
connectionProfile = new ConnectionProfile(providerCapabilities, profile);
|
connectionProfile = new ConnectionProfile(providerCapabilities, profile);
|
||||||
@@ -519,7 +519,7 @@ export class ConnectionConfig implements IConnectionConfig {
|
|||||||
*/
|
*/
|
||||||
private getConfiguration(key: string): any {
|
private getConfiguration(key: string): any {
|
||||||
let configs: any;
|
let configs: any;
|
||||||
configs = this._workspaceConfigurationService.inspect<IConnectionProfileStore[] | IConnectionProfileGroup[] | data.DataProtocolServerCapabilities[]>(key);
|
configs = this._workspaceConfigurationService.inspect<IConnectionProfileStore[] | IConnectionProfileGroup[] | sqlops.DataProtocolServerCapabilities[]>(key);
|
||||||
return configs;
|
return configs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -530,7 +530,7 @@ export class ConnectionConfig implements IConnectionConfig {
|
|||||||
*/
|
*/
|
||||||
private writeConfiguration(
|
private writeConfiguration(
|
||||||
key: string,
|
key: string,
|
||||||
profiles: IConnectionProfileStore[] | IConnectionProfileGroup[] | data.DataProtocolServerCapabilities[],
|
profiles: IConnectionProfileStore[] | IConnectionProfileGroup[] | sqlops.DataProtocolServerCapabilities[],
|
||||||
target: ConfigurationTarget = ConfigurationTarget.USER): Promise<void> {
|
target: ConfigurationTarget = ConfigurationTarget.USER): Promise<void> {
|
||||||
return new Promise<void>((resolve, reject) => {
|
return new Promise<void>((resolve, reject) => {
|
||||||
let configValue: IConfigurationValue = {
|
let configValue: IConfigurationValue = {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
import { ConnectionSummary } from 'data';
|
import { ConnectionSummary } from 'sqlops';
|
||||||
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
|
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
|
||||||
import * as LocalizedConstants from 'sql/parts/connection/common/localizedConstants';
|
import * as LocalizedConstants from 'sql/parts/connection/common/localizedConstants';
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
|||||||
import Event from 'vs/base/common/event';
|
import Event from 'vs/base/common/event';
|
||||||
import { IAction } from 'vs/base/common/actions';
|
import { IAction } from 'vs/base/common/actions';
|
||||||
import Severity from 'vs/base/common/severity';
|
import Severity from 'vs/base/common/severity';
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
import { IConnectionProfileGroup, ConnectionProfileGroup } from 'sql/parts/connection/common/connectionProfileGroup';
|
import { IConnectionProfileGroup, ConnectionProfileGroup } from 'sql/parts/connection/common/connectionProfileGroup';
|
||||||
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
@@ -81,7 +81,7 @@ export interface IConnectionManagementService {
|
|||||||
onConnect: Event<IConnectionParams>;
|
onConnect: Event<IConnectionParams>;
|
||||||
onDisconnect: Event<IConnectionParams>;
|
onDisconnect: Event<IConnectionParams>;
|
||||||
onConnectionChanged: Event<IConnectionParams>;
|
onConnectionChanged: Event<IConnectionParams>;
|
||||||
onLanguageFlavorChanged: Event<data.DidChangeLanguageFlavorParams>;
|
onLanguageFlavorChanged: Event<sqlops.DidChangeLanguageFlavorParams>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens the connection dialog to create new connection
|
* Opens the connection dialog to create new connection
|
||||||
@@ -124,11 +124,11 @@ export interface IConnectionManagementService {
|
|||||||
/**
|
/**
|
||||||
* Adds the successful connection to MRU and send the connection error back to the connection handler for failed connections
|
* Adds the successful connection to MRU and send the connection error back to the connection handler for failed connections
|
||||||
*/
|
*/
|
||||||
onConnectionComplete(handle: number, connectionInfoSummary: data.ConnectionInfoSummary): void;
|
onConnectionComplete(handle: number, connectionInfoSummary: sqlops.ConnectionInfoSummary): void;
|
||||||
|
|
||||||
onIntelliSenseCacheComplete(handle: number, connectionUri: string): void;
|
onIntelliSenseCacheComplete(handle: number, connectionUri: string): void;
|
||||||
|
|
||||||
onConnectionChangedNotification(handle: number, changedConnInfo: data.ChangedConnectionInfo);
|
onConnectionChangedNotification(handle: number, changedConnInfo: sqlops.ChangedConnectionInfo);
|
||||||
|
|
||||||
getConnectionGroups(): ConnectionProfileGroup[];
|
getConnectionGroups(): ConnectionProfileGroup[];
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ export interface IConnectionManagementService {
|
|||||||
|
|
||||||
deleteConnectionGroup(group: ConnectionProfileGroup): Promise<boolean>;
|
deleteConnectionGroup(group: ConnectionProfileGroup): Promise<boolean>;
|
||||||
|
|
||||||
getAdvancedProperties(): data.ConnectionOption[];
|
getAdvancedProperties(): sqlops.ConnectionOption[];
|
||||||
|
|
||||||
getConnectionId(connectionProfile: IConnectionProfile): string;
|
getConnectionId(connectionProfile: IConnectionProfile): string;
|
||||||
|
|
||||||
@@ -180,12 +180,12 @@ export interface IConnectionManagementService {
|
|||||||
|
|
||||||
addSavedPassword(connectionProfile: IConnectionProfile): Promise<IConnectionProfile>;
|
addSavedPassword(connectionProfile: IConnectionProfile): Promise<IConnectionProfile>;
|
||||||
|
|
||||||
listDatabases(connectionUri: string): Thenable<data.ListDatabasesResult>;
|
listDatabases(connectionUri: string): Thenable<sqlops.ListDatabasesResult>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a connection provider
|
* Register a connection provider
|
||||||
*/
|
*/
|
||||||
registerProvider(providerId: string, provider: data.ConnectionProvider): void;
|
registerProvider(providerId: string, provider: sqlops.ConnectionProvider): void;
|
||||||
|
|
||||||
editGroup(group: ConnectionProfileGroup): Promise<void>;
|
editGroup(group: ConnectionProfileGroup): Promise<void>;
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ export interface IConnectionManagementService {
|
|||||||
|
|
||||||
hasRegisteredServers(): boolean;
|
hasRegisteredServers(): boolean;
|
||||||
|
|
||||||
getCapabilities(providerName: string): data.DataProtocolServerCapabilities;
|
getCapabilities(providerName: string): sqlops.DataProtocolServerCapabilities;
|
||||||
|
|
||||||
canChangeConnectionConfig(profile: ConnectionProfile, newGroupID: string): boolean;
|
canChangeConnectionConfig(profile: ConnectionProfile, newGroupID: string): boolean;
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ export interface INewConnectionParams {
|
|||||||
connectionType: ConnectionType;
|
connectionType: ConnectionType;
|
||||||
input?: IConnectableInput;
|
input?: IConnectableInput;
|
||||||
runQueryOnCompletion?: RunQueryOnConnectionMode;
|
runQueryOnCompletion?: RunQueryOnConnectionMode;
|
||||||
querySelection?: data.ISelectionData;
|
querySelection?: sqlops.ISelectionData;
|
||||||
showDashboard?: boolean;
|
showDashboard?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { StopWatch } from 'vs/base/common/stopwatch';
|
import { StopWatch } from 'vs/base/common/stopwatch';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,7 +64,7 @@ export class ConnectionManagementInfo {
|
|||||||
/**
|
/**
|
||||||
* Information about the connected server.
|
* Information about the connected server.
|
||||||
*/
|
*/
|
||||||
serverInfo: data.ServerInfo;
|
serverInfo: sqlops.ServerInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Owner uri assigned to the connection
|
* Owner uri assigned to the connection
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import { IResourceProviderService } from 'sql/parts/accountManagement/common/int
|
|||||||
import { IAngularEventingService, AngularEventType } from 'sql/services/angularEventing/angularEventingService';
|
import { IAngularEventingService, AngularEventType } from 'sql/services/angularEventing/angularEventingService';
|
||||||
import * as QueryConstants from 'sql/parts/query/common/constants';
|
import * as QueryConstants from 'sql/parts/query/common/constants';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import * as nls from 'vs/nls';
|
import * as nls from 'vs/nls';
|
||||||
import * as errors from 'vs/base/common/errors';
|
import * as errors from 'vs/base/common/errors';
|
||||||
@@ -64,7 +64,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
|
|
||||||
private disposables: IDisposable[] = [];
|
private disposables: IDisposable[] = [];
|
||||||
|
|
||||||
private _providers: { [handle: string]: data.ConnectionProvider; } = Object.create(null);
|
private _providers: { [handle: string]: sqlops.ConnectionProvider; } = Object.create(null);
|
||||||
|
|
||||||
private _uriToProvider: { [uri: string]: string; } = Object.create(null);
|
private _uriToProvider: { [uri: string]: string; } = Object.create(null);
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
private _onDisconnect: Emitter<IConnectionParams>;
|
private _onDisconnect: Emitter<IConnectionParams>;
|
||||||
private _onConnectRequestSent: Emitter<void>;
|
private _onConnectRequestSent: Emitter<void>;
|
||||||
private _onConnectionChanged: Emitter<IConnectionParams>;
|
private _onConnectionChanged: Emitter<IConnectionParams>;
|
||||||
private _onLanguageFlavorChanged: Emitter<data.DidChangeLanguageFlavorParams>;
|
private _onLanguageFlavorChanged: Emitter<sqlops.DidChangeLanguageFlavorParams>;
|
||||||
|
|
||||||
private _connectionGlobalStatus: ConnectionGlobalStatus;
|
private _connectionGlobalStatus: ConnectionGlobalStatus;
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
this._onDisconnect = new Emitter<IConnectionParams>();
|
this._onDisconnect = new Emitter<IConnectionParams>();
|
||||||
this._onConnectionChanged = new Emitter<IConnectionParams>();
|
this._onConnectionChanged = new Emitter<IConnectionParams>();
|
||||||
this._onConnectRequestSent = new Emitter<void>();
|
this._onConnectRequestSent = new Emitter<void>();
|
||||||
this._onLanguageFlavorChanged = new Emitter<data.DidChangeLanguageFlavorParams>();
|
this._onLanguageFlavorChanged = new Emitter<sqlops.DidChangeLanguageFlavorParams>();
|
||||||
|
|
||||||
this._onProvidersReady = new Deferred();
|
this._onProvidersReady = new Deferred();
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
return this._onConnectRequestSent.event;
|
return this._onConnectRequestSent.event;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get onLanguageFlavorChanged(): Event<data.DidChangeLanguageFlavorParams> {
|
public get onLanguageFlavorChanged(): Event<sqlops.DidChangeLanguageFlavorParams> {
|
||||||
return this._onLanguageFlavorChanged.event;
|
return this._onLanguageFlavorChanged.event;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
private _providerCount: number = 0;
|
private _providerCount: number = 0;
|
||||||
|
|
||||||
// Connection Provider Registration
|
// Connection Provider Registration
|
||||||
public registerProvider(providerId: string, provider: data.ConnectionProvider): void {
|
public registerProvider(providerId: string, provider: sqlops.ConnectionProvider): void {
|
||||||
this._providers[providerId] = provider;
|
this._providers[providerId] = provider;
|
||||||
|
|
||||||
// temporarily close splash screen when a connection provider has been registered
|
// temporarily close splash screen when a connection provider has been registered
|
||||||
@@ -655,7 +655,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
return this._connectionStore.clearRecentlyUsed();
|
return this._connectionStore.clearRecentlyUsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public clearRecentConnection(connectionProfile: IConnectionProfile) : void {
|
public clearRecentConnection(connectionProfile: IConnectionProfile): void {
|
||||||
this._connectionStore.removeConnectionToMemento(connectionProfile, Constants.recentConnections);
|
this._connectionStore.removeConnectionToMemento(connectionProfile, Constants.recentConnections);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -679,7 +679,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
return Object.keys(this._providers);
|
return Object.keys(this._providers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCapabilities(providerName: string): data.DataProtocolServerCapabilities {
|
public getCapabilities(providerName: string): sqlops.DataProtocolServerCapabilities {
|
||||||
let capabilities = this._capabilitiesService.getCapabilities();
|
let capabilities = this._capabilitiesService.getCapabilities();
|
||||||
if (capabilities !== undefined && capabilities.length > 0) {
|
if (capabilities !== undefined && capabilities.length > 0) {
|
||||||
return capabilities.find(c => c.providerName === providerName);
|
return capabilities.find(c => c.providerName === providerName);
|
||||||
@@ -687,7 +687,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAdvancedProperties(): data.ConnectionOption[] {
|
public getAdvancedProperties(): sqlops.ConnectionOption[] {
|
||||||
|
|
||||||
let capabilities = this._capabilitiesService.getCapabilities();
|
let capabilities = this._capabilitiesService.getCapabilities();
|
||||||
if (capabilities !== undefined && capabilities.length > 0) {
|
if (capabilities !== undefined && capabilities.length > 0) {
|
||||||
@@ -832,13 +832,13 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private sendListDatabasesRequest(uri: string): Thenable<data.ListDatabasesResult> {
|
private sendListDatabasesRequest(uri: string): Thenable<sqlops.ListDatabasesResult> {
|
||||||
let providerId: string = this.getProviderIdFromUri(uri);
|
let providerId: string = this.getProviderIdFromUri(uri);
|
||||||
if (!providerId) {
|
if (!providerId) {
|
||||||
return Promise.resolve(undefined);
|
return Promise.resolve(undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise<data.ListDatabasesResult>((resolve, reject) => {
|
return new Promise<sqlops.ListDatabasesResult>((resolve, reject) => {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
provider.listDatabases(uri).then(result => {
|
provider.listDatabases(uri).then(result => {
|
||||||
if (result && result.databaseNames) {
|
if (result && result.databaseNames) {
|
||||||
@@ -895,7 +895,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onConnectionComplete(handle: number, info: data.ConnectionInfoSummary): void {
|
public onConnectionComplete(handle: number, info: sqlops.ConnectionInfoSummary): void {
|
||||||
const self = this;
|
const self = this;
|
||||||
let connection = this._connectionStatusManager.onConnectionComplete(info);
|
let connection = this._connectionStatusManager.onConnectionComplete(info);
|
||||||
|
|
||||||
@@ -923,7 +923,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public onConnectionChangedNotification(handle: number, changedConnInfo: data.ChangedConnectionInfo): void {
|
public onConnectionChangedNotification(handle: number, changedConnInfo: sqlops.ChangedConnectionInfo): void {
|
||||||
let profile: IConnectionProfile = this._connectionStatusManager.onConnectionChanged(changedConnInfo);
|
let profile: IConnectionProfile = this._connectionStatusManager.onConnectionChanged(changedConnInfo);
|
||||||
this._notifyConnectionChanged(profile, changedConnInfo.connectionUri);
|
this._notifyConnectionChanged(profile, changedConnInfo.connectionUri);
|
||||||
}
|
}
|
||||||
@@ -1023,28 +1023,26 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
return new Promise<IConnectionResult>((resolve, reject) => {
|
return new Promise<IConnectionResult>((resolve, reject) => {
|
||||||
this._capabilitiesService.onCapabilitiesReady().then(() => {
|
let connectionInfo = this._connectionStatusManager.addConnection(connection, uri);
|
||||||
let connectionInfo = this._connectionStatusManager.addConnection(connection, uri);
|
// Setup the handler for the connection complete notification to call
|
||||||
// Setup the handler for the connection complete notification to call
|
connectionInfo.connectHandler = ((connectResult, errorMessage, errorCode, callStack) => {
|
||||||
connectionInfo.connectHandler = ((connectResult, errorMessage, errorCode, callStack) => {
|
let connectionMngInfo = this._connectionStatusManager.findConnection(uri);
|
||||||
let connectionMngInfo = this._connectionStatusManager.findConnection(uri);
|
if (connectionMngInfo && connectionMngInfo.deleted) {
|
||||||
if (connectionMngInfo && connectionMngInfo.deleted) {
|
this._connectionStatusManager.deleteConnection(uri);
|
||||||
|
resolve({ connected: connectResult, errorMessage: undefined, errorCode: undefined, callStack: undefined, errorHandled: true });
|
||||||
|
} else {
|
||||||
|
if (errorMessage) {
|
||||||
|
// Connection to the server failed
|
||||||
this._connectionStatusManager.deleteConnection(uri);
|
this._connectionStatusManager.deleteConnection(uri);
|
||||||
resolve({ connected: connectResult, errorMessage: undefined, errorCode: undefined, callStack: undefined, errorHandled: true });
|
resolve({ connected: connectResult, errorMessage: errorMessage, errorCode: errorCode, callStack: callStack });
|
||||||
} else {
|
} else {
|
||||||
if (errorMessage) {
|
resolve({ connected: connectResult, errorMessage: errorMessage, errorCode: errorCode, callStack: callStack });
|
||||||
// Connection to the server failed
|
|
||||||
this._connectionStatusManager.deleteConnection(uri);
|
|
||||||
resolve({ connected: connectResult, errorMessage: errorMessage, errorCode: errorCode, callStack: callStack });
|
|
||||||
} else {
|
|
||||||
resolve({ connected: connectResult, errorMessage: errorMessage, errorCode: errorCode, callStack: callStack });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
// send connection request
|
|
||||||
self.sendConnectRequest(connection, uri);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// send connection request
|
||||||
|
self.sendConnectRequest(connection, uri);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1197,7 +1195,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
|||||||
return this._connectionStatusManager.isConnected(fileUri) ? this._connectionStatusManager.findConnection(fileUri) : undefined;
|
return this._connectionStatusManager.isConnected(fileUri) ? this._connectionStatusManager.findConnection(fileUri) : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public listDatabases(connectionUri: string): Thenable<data.ListDatabasesResult> {
|
public listDatabases(connectionUri: string): Thenable<sqlops.ListDatabasesResult> {
|
||||||
const self = this;
|
const self = this;
|
||||||
if (self.isConnected(connectionUri)) {
|
if (self.isConnected(connectionUri)) {
|
||||||
return self.sendListDatabasesRequest(connectionUri);
|
return self.sendListDatabasesRequest(connectionUri);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { ConnectionProfileGroup } from './connectionProfileGroup';
|
import { ConnectionProfileGroup } from './connectionProfileGroup';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { ProviderConnectionInfo } from 'sql/parts/connection/common/providerConnectionInfo';
|
import { ProviderConnectionInfo } from 'sql/parts/connection/common/providerConnectionInfo';
|
||||||
import * as interfaces from 'sql/parts/connection/common/interfaces';
|
import * as interfaces from 'sql/parts/connection/common/interfaces';
|
||||||
import { equalsIgnoreCase } from 'vs/base/common/strings';
|
import { equalsIgnoreCase } from 'vs/base/common/strings';
|
||||||
@@ -28,7 +28,7 @@ export class ConnectionProfile extends ProviderConnectionInfo implements interfa
|
|||||||
public saveProfile: boolean;
|
public saveProfile: boolean;
|
||||||
|
|
||||||
public isDisconnecting: boolean = false;
|
public isDisconnecting: boolean = false;
|
||||||
public constructor(serverCapabilities?: data.DataProtocolServerCapabilities, model?: interfaces.IConnectionProfile) {
|
public constructor(serverCapabilities?: sqlops.DataProtocolServerCapabilities, model?: interfaces.IConnectionProfile) {
|
||||||
super(serverCapabilities, model);
|
super(serverCapabilities, model);
|
||||||
if (model) {
|
if (model) {
|
||||||
this.groupId = model.groupId;
|
this.groupId = model.groupId;
|
||||||
@@ -137,7 +137,7 @@ export class ConnectionProfile extends ProviderConnectionInfo implements interfa
|
|||||||
return super.getOptionsKey();
|
return super.getOptionsKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
public onProviderRegistered(serverCapabilities: data.DataProtocolServerCapabilities): void {
|
public onProviderRegistered(serverCapabilities: sqlops.DataProtocolServerCapabilities): void {
|
||||||
if (serverCapabilities.providerName === this.providerName) {
|
if (serverCapabilities.providerName === this.providerName) {
|
||||||
this.setServerCapabilities(serverCapabilities);
|
this.setServerCapabilities(serverCapabilities);
|
||||||
}
|
}
|
||||||
@@ -164,13 +164,13 @@ export class ConnectionProfile extends ProviderConnectionInfo implements interfa
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public toConnectionInfo(): data.ConnectionInfo {
|
public toConnectionInfo(): sqlops.ConnectionInfo {
|
||||||
return {
|
return {
|
||||||
options: this.options
|
options: this.options
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static createFromStoredProfile(profile: interfaces.IConnectionProfileStore, serverCapabilities: data.DataProtocolServerCapabilities): ConnectionProfile {
|
public static createFromStoredProfile(profile: interfaces.IConnectionProfileStore, serverCapabilities: sqlops.DataProtocolServerCapabilities): ConnectionProfile {
|
||||||
let connectionInfo = new ConnectionProfile(serverCapabilities, undefined);
|
let connectionInfo = new ConnectionProfile(serverCapabilities, undefined);
|
||||||
connectionInfo.options = profile.options;
|
connectionInfo.options = profile.options;
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ export class ConnectionProfile extends ProviderConnectionInfo implements interfa
|
|||||||
return connectionInfo;
|
return connectionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static convertToConnectionProfile(serverCapabilities: data.DataProtocolServerCapabilities, conn: interfaces.IConnectionProfile): ConnectionProfile {
|
public static convertToConnectionProfile(serverCapabilities: sqlops.DataProtocolServerCapabilities, conn: interfaces.IConnectionProfile): ConnectionProfile {
|
||||||
if (conn) {
|
if (conn) {
|
||||||
let connectionProfile: ConnectionProfile = undefined;
|
let connectionProfile: ConnectionProfile = undefined;
|
||||||
let connectionProfileInstance = conn as ConnectionProfile;
|
let connectionProfileInstance = conn as ConnectionProfile;
|
||||||
@@ -205,7 +205,7 @@ export class ConnectionProfile extends ProviderConnectionInfo implements interfa
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static convertToProfileStore(
|
public static convertToProfileStore(
|
||||||
serverCapabilities: data.DataProtocolServerCapabilities,
|
serverCapabilities: sqlops.DataProtocolServerCapabilities,
|
||||||
connectionProfile: interfaces.IConnectionProfile): interfaces.IConnectionProfileStore {
|
connectionProfile: interfaces.IConnectionProfile): interfaces.IConnectionProfileStore {
|
||||||
if (connectionProfile) {
|
if (connectionProfile) {
|
||||||
let connectionInfo = ConnectionProfile.convertToConnectionProfile(serverCapabilities, connectionProfile);
|
let connectionInfo = ConnectionProfile.convertToConnectionProfile(serverCapabilities, connectionProfile);
|
||||||
|
|||||||
@@ -9,21 +9,21 @@ import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesServ
|
|||||||
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
||||||
import { IConnectionProfile } from './interfaces';
|
import { IConnectionProfile } from './interfaces';
|
||||||
import * as Utils from './utils';
|
import * as Utils from './utils';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { StopWatch } from 'vs/base/common/stopwatch';
|
import { StopWatch } from 'vs/base/common/stopwatch';
|
||||||
|
|
||||||
export class ConnectionStatusManager {
|
export class ConnectionStatusManager {
|
||||||
|
|
||||||
private _connections: { [id: string]: ConnectionManagementInfo };
|
private _connections: { [id: string]: ConnectionManagementInfo };
|
||||||
private _providerCapabilitiesMap: { [providerName: string]: data.DataProtocolServerCapabilities };
|
private _providerCapabilitiesMap: { [providerName: string]: sqlops.DataProtocolServerCapabilities };
|
||||||
|
|
||||||
constructor( @ICapabilitiesService private _capabilitiesService: ICapabilitiesService) {
|
constructor( @ICapabilitiesService private _capabilitiesService: ICapabilitiesService) {
|
||||||
this._connections = {};
|
this._connections = {};
|
||||||
this._providerCapabilitiesMap = {};
|
this._providerCapabilitiesMap = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCapabilities(providerName: string): data.DataProtocolServerCapabilities {
|
public getCapabilities(providerName: string): sqlops.DataProtocolServerCapabilities {
|
||||||
let result: data.DataProtocolServerCapabilities;
|
let result: sqlops.DataProtocolServerCapabilities;
|
||||||
|
|
||||||
if (providerName in this._providerCapabilitiesMap) {
|
if (providerName in this._providerCapabilitiesMap) {
|
||||||
result = this._providerCapabilitiesMap[providerName];
|
result = this._providerCapabilitiesMap[providerName];
|
||||||
@@ -126,7 +126,7 @@ export class ConnectionStatusManager {
|
|||||||
return newId;
|
return newId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public onConnectionComplete(summary: data.ConnectionInfoSummary): ConnectionManagementInfo {
|
public onConnectionComplete(summary: sqlops.ConnectionInfoSummary): ConnectionManagementInfo {
|
||||||
let connection = this._connections[summary.ownerUri];
|
let connection = this._connections[summary.ownerUri];
|
||||||
connection.serviceTimer.stop();
|
connection.serviceTimer.stop();
|
||||||
connection.connecting = false;
|
connection.connecting = false;
|
||||||
@@ -139,7 +139,7 @@ export class ConnectionStatusManager {
|
|||||||
* Updates database name after connection is complete
|
* Updates database name after connection is complete
|
||||||
* @param summary connection summary
|
* @param summary connection summary
|
||||||
*/
|
*/
|
||||||
public updateDatabaseName(summary: data.ConnectionInfoSummary): void {
|
public updateDatabaseName(summary: sqlops.ConnectionInfoSummary): void {
|
||||||
let connection = this._connections[summary.ownerUri];
|
let connection = this._connections[summary.ownerUri];
|
||||||
|
|
||||||
//Check if the existing connection database name is different the one in the summary
|
//Check if the existing connection database name is different the one in the summary
|
||||||
@@ -174,7 +174,7 @@ export class ConnectionStatusManager {
|
|||||||
return ownerUriToReturn;
|
return ownerUriToReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public onConnectionChanged(changedConnInfo: data.ChangedConnectionInfo): IConnectionProfile {
|
public onConnectionChanged(changedConnInfo: sqlops.ChangedConnectionInfo): IConnectionProfile {
|
||||||
let connection = this._connections[changedConnInfo.connectionUri];
|
let connection = this._connections[changedConnInfo.connectionUri];
|
||||||
if (connection && connection.connectionProfile) {
|
if (connection && connection.connectionProfile) {
|
||||||
connection.connectionProfile.serverName = changedConnInfo.connection.serverName;
|
connection.connectionProfile.serverName = changedConnInfo.connection.serverName;
|
||||||
|
|||||||
@@ -18,9 +18,10 @@ import { ConnectionProfileGroup, IConnectionProfileGroup } from './connectionPro
|
|||||||
import { ConfigurationEditingService } from 'vs/workbench/services/configuration/node/configurationEditingService';
|
import { ConfigurationEditingService } from 'vs/workbench/services/configuration/node/configurationEditingService';
|
||||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||||
import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesService';
|
import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesService';
|
||||||
import * as data from 'data';
|
|
||||||
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
|
|
||||||
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
const MAX_CONNECTIONS_DEFAULT = 25;
|
const MAX_CONNECTIONS_DEFAULT = 25;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -213,9 +214,9 @@ export class ConnectionStore {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private getCachedServerCapabilities(): data.DataProtocolServerCapabilities[] {
|
private getCachedServerCapabilities(): sqlops.DataProtocolServerCapabilities[] {
|
||||||
if (this._memento) {
|
if (this._memento) {
|
||||||
let metadata: data.DataProtocolServerCapabilities[] = this._memento[Constants.capabilitiesOptions];
|
let metadata: sqlops.DataProtocolServerCapabilities[] = this._memento[Constants.capabilitiesOptions];
|
||||||
return metadata;
|
return metadata;
|
||||||
} else {
|
} else {
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -234,7 +235,7 @@ export class ConnectionStore {
|
|||||||
* Gets the list of recently used connections. These will not include the password - a separate call to
|
* Gets the list of recently used connections. These will not include the password - a separate call to
|
||||||
* {addSavedPassword} is needed to fill that before connecting
|
* {addSavedPassword} is needed to fill that before connecting
|
||||||
*
|
*
|
||||||
* @returns {data.ConnectionInfo} the array of connections, empty if none are found
|
* @returns {sqlops.ConnectionInfo} the array of connections, empty if none are found
|
||||||
*/
|
*/
|
||||||
public getRecentlyUsedConnections(): ConnectionProfile[] {
|
public getRecentlyUsedConnections(): ConnectionProfile[] {
|
||||||
let configValues: IConnectionProfile[] = this._memento[Constants.recentConnections];
|
let configValues: IConnectionProfile[] = this._memento[Constants.recentConnections];
|
||||||
@@ -275,7 +276,7 @@ export class ConnectionStore {
|
|||||||
* Gets the list of active connections. These will not include the password - a separate call to
|
* Gets the list of active connections. These will not include the password - a separate call to
|
||||||
* {addSavedPassword} is needed to fill that before connecting
|
* {addSavedPassword} is needed to fill that before connecting
|
||||||
*
|
*
|
||||||
* @returns {data.ConnectionInfo} the array of connections, empty if none are found
|
* @returns {sqlops.ConnectionInfo} the array of connections, empty if none are found
|
||||||
*/
|
*/
|
||||||
public getActiveConnections(): ConnectionProfile[] {
|
public getActiveConnections(): ConnectionProfile[] {
|
||||||
let configValues: IConnectionProfile[] = this._memento[Constants.activeConnections];
|
let configValues: IConnectionProfile[] = this._memento[Constants.activeConnections];
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import { IConnectionProfile } from './interfaces';
|
import { IConnectionProfile } from './interfaces';
|
||||||
import { IConnectionProfileGroup, ConnectionProfileGroup } from './connectionProfileGroup';
|
import { IConnectionProfileGroup, ConnectionProfileGroup } from './connectionProfileGroup';
|
||||||
import { ConnectionProfile } from './connectionProfile';
|
import { ConnectionProfile } from './connectionProfile';
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for a configuration file that stores connection profiles.
|
* Interface for a configuration file that stores connection profiles.
|
||||||
@@ -23,8 +23,8 @@ export interface IConnectionConfig {
|
|||||||
getAllGroups(): IConnectionProfileGroup[];
|
getAllGroups(): IConnectionProfileGroup[];
|
||||||
changeGroupIdForConnectionGroup(source: ConnectionProfileGroup, target: ConnectionProfileGroup): Promise<void>;
|
changeGroupIdForConnectionGroup(source: ConnectionProfileGroup, target: ConnectionProfileGroup): Promise<void>;
|
||||||
changeGroupIdForConnection(source: ConnectionProfile, targetGroupId: string): Promise<void>;
|
changeGroupIdForConnection(source: ConnectionProfile, targetGroupId: string): Promise<void>;
|
||||||
setCachedMetadata(cachedMetaData: data.DataProtocolServerCapabilities[]): void;
|
setCachedMetadata(cachedMetaData: sqlops.DataProtocolServerCapabilities[]): void;
|
||||||
getCapabilities(providerName: string): data.DataProtocolServerCapabilities;
|
getCapabilities(providerName: string): sqlops.DataProtocolServerCapabilities;
|
||||||
editGroup(group: ConnectionProfileGroup): Promise<void>;
|
editGroup(group: ConnectionProfileGroup): Promise<void>;
|
||||||
deleteConnection(profile: ConnectionProfile): Promise<void>;
|
deleteConnection(profile: ConnectionProfile): Promise<void>;
|
||||||
deleteGroup(group: ConnectionProfileGroup): Promise<void>;
|
deleteGroup(group: ConnectionProfileGroup): Promise<void>;
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
// A Connection Profile contains all the properties of connection credentials, with additional
|
// A Connection Profile contains all the properties of connection credentials, with additional
|
||||||
// optional name and details on whether password should be saved
|
// optional name and details on whether password should be saved
|
||||||
export interface IConnectionProfile extends data.ConnectionInfo {
|
export interface IConnectionProfile extends sqlops.ConnectionInfo {
|
||||||
serverName: string;
|
serverName: string;
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
userName: string;
|
userName: string;
|
||||||
|
|||||||
@@ -5,21 +5,21 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
import * as interfaces from 'sql/parts/connection/common/interfaces';
|
import * as interfaces from 'sql/parts/connection/common/interfaces';
|
||||||
import { ConnectionOptionSpecialType, ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
import { ConnectionOptionSpecialType, ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
import * as Constants from 'sql/parts/connection/common/constants';
|
import * as Constants from 'sql/parts/connection/common/constants';
|
||||||
|
|
||||||
export class ProviderConnectionInfo implements data.ConnectionInfo {
|
export class ProviderConnectionInfo implements sqlops.ConnectionInfo {
|
||||||
|
|
||||||
options: { [name: string]: any };
|
options: { [name: string]: any };
|
||||||
|
|
||||||
public providerName: string;
|
public providerName: string;
|
||||||
protected _serverCapabilities: data.DataProtocolServerCapabilities;
|
protected _serverCapabilities: sqlops.DataProtocolServerCapabilities;
|
||||||
private static readonly SqlAuthentication = 'SqlLogin';
|
private static readonly SqlAuthentication = 'SqlLogin';
|
||||||
public static readonly ProviderPropertyName = 'providerName';
|
public static readonly ProviderPropertyName = 'providerName';
|
||||||
|
|
||||||
public constructor(serverCapabilities?: data.DataProtocolServerCapabilities, model?: interfaces.IConnectionProfile) {
|
public constructor(serverCapabilities?: sqlops.DataProtocolServerCapabilities, model?: interfaces.IConnectionProfile) {
|
||||||
this.options = {};
|
this.options = {};
|
||||||
if (serverCapabilities) {
|
if (serverCapabilities) {
|
||||||
this._serverCapabilities = serverCapabilities;
|
this._serverCapabilities = serverCapabilities;
|
||||||
@@ -47,11 +47,11 @@ export class ProviderConnectionInfo implements data.ConnectionInfo {
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get serverCapabilities(): data.DataProtocolServerCapabilities {
|
public get serverCapabilities(): sqlops.DataProtocolServerCapabilities {
|
||||||
return this._serverCapabilities;
|
return this._serverCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setServerCapabilities(value: data.DataProtocolServerCapabilities) {
|
public setServerCapabilities(value: sqlops.DataProtocolServerCapabilities) {
|
||||||
this._serverCapabilities = value;
|
this._serverCapabilities = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ export class ProviderConnectionInfo implements data.ConnectionInfo {
|
|||||||
return displayName;
|
return displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getProviderOptions(): data.ConnectionOption[] {
|
public getProviderOptions(): sqlops.ConnectionOption[] {
|
||||||
return this._serverCapabilities.connectionProvider.options;
|
return this._serverCapabilities.connectionProvider.options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
// // import { AdvancedPropertiesDialog } from 'sql/parts/connection/connectionDialog/advancedPropertiesDialog';
|
// // import { AdvancedPropertiesDialog } from 'sql/parts/connection/connectionDialog/advancedPropertiesDialog';
|
||||||
import { OptionsDialog } from 'sql/base/browser/ui/modal/optionsDialog';
|
import { OptionsDialog } from 'sql/base/browser/ui/modal/optionsDialog';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ export class AdvancedPropertiesController {
|
|||||||
this._options = this._advancedDialog.optionValues;
|
this._options = this._advancedDialog.optionValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
public showDialog(providerOptions: data.ConnectionOption[], container: HTMLElement, options: { [name: string]: any }): void {
|
public showDialog(providerOptions: sqlops.ConnectionOption[], container: HTMLElement, options: { [name: string]: any }): void {
|
||||||
this._options = options;
|
this._options = options;
|
||||||
this._container = container;
|
this._container = container;
|
||||||
var serviceOptions = providerOptions.map(option => AdvancedPropertiesController.connectionOptionToServiceOption(option));
|
var serviceOptions = providerOptions.map(option => AdvancedPropertiesController.connectionOptionToServiceOption(option));
|
||||||
@@ -51,7 +51,7 @@ export class AdvancedPropertiesController {
|
|||||||
this._advancedDialog = dialog;
|
this._advancedDialog = dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static connectionOptionToServiceOption(connectionOption: data.ConnectionOption): data.ServiceOption {
|
public static connectionOptionToServiceOption(connectionOption: sqlops.ConnectionOption): sqlops.ServiceOption {
|
||||||
return {
|
return {
|
||||||
name: connectionOption.name,
|
name: connectionOption.name,
|
||||||
displayName: connectionOption.displayName,
|
displayName: connectionOption.displayName,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { AdvancedPropertiesController } from 'sql/parts/connection/connectionDia
|
|||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
import { ConnectionProfileGroup, IConnectionProfileGroup } from 'sql/parts/connection/common/connectionProfileGroup';
|
import { ConnectionProfileGroup, IConnectionProfileGroup } from 'sql/parts/connection/common/connectionProfileGroup';
|
||||||
import * as Constants from 'sql/parts/connection/common/constants';
|
import * as Constants from 'sql/parts/connection/common/constants';
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
import * as Utils from 'sql/parts/connection/common/utils';
|
import * as Utils from 'sql/parts/connection/common/utils';
|
||||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
import { ConnectionOptionSpecialType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
@@ -24,14 +24,14 @@ export class ConnectionController implements IConnectionComponentController {
|
|||||||
private _connectionWidget: ConnectionWidget;
|
private _connectionWidget: ConnectionWidget;
|
||||||
private _advancedController: AdvancedPropertiesController;
|
private _advancedController: AdvancedPropertiesController;
|
||||||
private _model: IConnectionProfile;
|
private _model: IConnectionProfile;
|
||||||
private _providerOptions: data.ConnectionOption[];
|
private _providerOptions: sqlops.ConnectionOption[];
|
||||||
private _providerName: string;
|
private _providerName: string;
|
||||||
/* key: uri, value : list of databases */
|
/* key: uri, value : list of databases */
|
||||||
private _databaseCache = new Map<string, string[]>();
|
private _databaseCache = new Map<string, string[]>();
|
||||||
|
|
||||||
constructor(container: HTMLElement,
|
constructor(container: HTMLElement,
|
||||||
connectionManagementService: IConnectionManagementService,
|
connectionManagementService: IConnectionManagementService,
|
||||||
sqlCapabilities: data.DataProtocolServerCapabilities,
|
sqlCapabilities: sqlops.DataProtocolServerCapabilities,
|
||||||
callback: IConnectionComponentCallbacks,
|
callback: IConnectionComponentCallbacks,
|
||||||
providerName: string,
|
providerName: string,
|
||||||
@IInstantiationService private _instantiationService: IInstantiationService ) {
|
@IInstantiationService private _instantiationService: IInstantiationService ) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesServ
|
|||||||
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
import { IPartService } from 'vs/workbench/services/part/common/partService';
|
||||||
import { withElementById } from 'vs/base/browser/builder';
|
import { withElementById } from 'vs/base/browser/builder';
|
||||||
@@ -69,7 +69,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
|||||||
private _model: ConnectionProfile;
|
private _model: ConnectionProfile;
|
||||||
private _params: INewConnectionParams;
|
private _params: INewConnectionParams;
|
||||||
private _inputModel: IConnectionProfile;
|
private _inputModel: IConnectionProfile;
|
||||||
private _capabilitiesMaps: { [providerDisplayName: string]: data.DataProtocolServerCapabilities };
|
private _capabilitiesMaps: { [providerDisplayName: string]: sqlops.DataProtocolServerCapabilities };
|
||||||
private _providerNameToDisplayNameMap: { [providerDisplayName: string]: string };
|
private _providerNameToDisplayNameMap: { [providerDisplayName: string]: string };
|
||||||
private _providerTypes: string[];
|
private _providerTypes: string[];
|
||||||
private _currentProviderType: string = 'Microsoft SQL Server';
|
private _currentProviderType: string = 'Microsoft SQL Server';
|
||||||
@@ -270,7 +270,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
|
|||||||
return newProfile;
|
return newProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
private cacheCapabilities(capabilities: data.DataProtocolServerCapabilities) {
|
private cacheCapabilities(capabilities: sqlops.DataProtocolServerCapabilities) {
|
||||||
if (capabilities) {
|
if (capabilities) {
|
||||||
this._providerTypes.push(capabilities.providerDisplayName);
|
this._providerTypes.push(capabilities.providerDisplayName);
|
||||||
this._capabilitiesMaps[capabilities.providerName] = capabilities;
|
this._capabilitiesMaps[capabilities.providerName] = capabilities;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { IThemeService } from 'vs/platform/theme/common/themeService';
|
|||||||
import * as styler from 'vs/platform/theme/common/styler';
|
import * as styler from 'vs/platform/theme/common/styler';
|
||||||
import { attachInputBoxStyler, attachButtonStyler, attachEditableDropdownStyler } from 'sql/common/theme/styler';
|
import { attachInputBoxStyler, attachButtonStyler, attachEditableDropdownStyler } from 'sql/common/theme/styler';
|
||||||
import * as DOM from 'vs/base/browser/dom';
|
import * as DOM from 'vs/base/browser/dom';
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import { OS, OperatingSystem } from 'vs/base/common/platform';
|
import { OS, OperatingSystem } from 'vs/base/common/platform';
|
||||||
@@ -44,7 +44,7 @@ export class ConnectionWidget {
|
|||||||
private _callbacks: IConnectionComponentCallbacks;
|
private _callbacks: IConnectionComponentCallbacks;
|
||||||
private _authTypeSelectBox: SelectBox;
|
private _authTypeSelectBox: SelectBox;
|
||||||
private _toDispose: lifecycle.IDisposable[];
|
private _toDispose: lifecycle.IDisposable[];
|
||||||
private _optionsMaps: { [optionType: number]: data.ConnectionOption };
|
private _optionsMaps: { [optionType: number]: sqlops.ConnectionOption };
|
||||||
private _tableContainer: Builder;
|
private _tableContainer: Builder;
|
||||||
private _focusedBeforeHandleOnConnection: HTMLElement;
|
private _focusedBeforeHandleOnConnection: HTMLElement;
|
||||||
private _providerName: string;
|
private _providerName: string;
|
||||||
@@ -77,7 +77,7 @@ export class ConnectionWidget {
|
|||||||
color: undefined,
|
color: undefined,
|
||||||
description: undefined,
|
description: undefined,
|
||||||
};
|
};
|
||||||
constructor(options: data.ConnectionOption[],
|
constructor(options: sqlops.ConnectionOption[],
|
||||||
callbacks: IConnectionComponentCallbacks,
|
callbacks: IConnectionComponentCallbacks,
|
||||||
providerName: string,
|
providerName: string,
|
||||||
@IThemeService private _themeService: IThemeService,
|
@IThemeService private _themeService: IThemeService,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { TabConfig } from 'sql/parts/dashboard/common/dashboardWidget';
|
|||||||
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
||||||
import { IDashboardWebview } from 'sql/services/dashboardWebview/common/dashboardWebviewService';
|
import { IDashboardWebview } from 'sql/services/dashboardWebview/common/dashboardWebviewService';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { memoize } from 'vs/base/common/decorators';
|
import { memoize } from 'vs/base/common/decorators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -55,9 +55,9 @@ export class WebviewContent implements OnInit, IDashboardWebview {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
public get connection(): data.connection.Connection {
|
public get connection(): sqlops.connection.Connection {
|
||||||
let currentConnection = this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;
|
let currentConnection = this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;
|
||||||
let connection: data.connection.Connection = {
|
let connection: sqlops.connection.Connection = {
|
||||||
providerName: currentConnection.providerName,
|
providerName: currentConnection.providerName,
|
||||||
connectionId: currentConnection.id,
|
connectionId: currentConnection.id,
|
||||||
options: currentConnection.options
|
options: currentConnection.options
|
||||||
@@ -66,7 +66,7 @@ export class WebviewContent implements OnInit, IDashboardWebview {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
public get serverInfo(): data.ServerInfo {
|
public get serverInfo(): sqlops.ServerInfo {
|
||||||
return this._dashboardService.connectionManagementService.connectionInfo.serverInfo;
|
return this._dashboardService.connectionManagementService.connectionInfo.serverInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import * as data from 'data';
|
|
||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
|
|
||||||
import { IDashboardTab } from 'sql/platform/dashboard/common/dashboardRegistry';
|
import { IDashboardTab } from 'sql/platform/dashboard/common/dashboardRegistry';
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import { AngularEventType, IAngularEvent } from 'sql/services/angularEventing/an
|
|||||||
import { IDashboardTab } from 'sql/platform/dashboard/common/dashboardRegistry';
|
import { IDashboardTab } from 'sql/platform/dashboard/common/dashboardRegistry';
|
||||||
import { PinConfig } from 'sql/parts/dashboard/common/dashboardWidget';
|
import { PinConfig } from 'sql/parts/dashboard/common/dashboardWidget';
|
||||||
|
|
||||||
import { ProviderMetadata, DatabaseInfo, SimpleExecuteResult } from 'data';
|
import { ProviderMetadata, DatabaseInfo, SimpleExecuteResult } from 'sqlops';
|
||||||
|
|
||||||
/* VS imports */
|
/* VS imports */
|
||||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { ICapabilitiesService } from 'sql/services/capabilities/capabilitiesServ
|
|||||||
import { ConnectionManagementInfo } from 'sql/parts/connection/common/connectionManagementInfo';
|
import { ConnectionManagementInfo } from 'sql/parts/connection/common/connectionManagementInfo';
|
||||||
import * as Constants from 'sql/parts/connection/common/constants';
|
import * as Constants from 'sql/parts/connection/common/constants';
|
||||||
|
|
||||||
import { ObjectMetadata } from 'data';
|
import { ObjectMetadata } from 'sqlops';
|
||||||
|
|
||||||
import * as tree from 'vs/base/parts/tree/browser/tree';
|
import * as tree from 'vs/base/parts/tree/browser/tree';
|
||||||
import * as TreeDefaults from 'vs/base/parts/tree/browser/treeDefaults';
|
import * as TreeDefaults from 'vs/base/parts/tree/browser/treeDefaults';
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import { Extensions, IInsightRegistry } from 'sql/platform/dashboard/common/insi
|
|||||||
import { insertValueRegex } from 'sql/parts/insights/common/interfaces';
|
import { insertValueRegex } from 'sql/parts/insights/common/interfaces';
|
||||||
import { RunInsightQueryAction } from './actions';
|
import { RunInsightQueryAction } from './actions';
|
||||||
|
|
||||||
import { SimpleExecuteResult } from 'data';
|
import { SimpleExecuteResult } from 'sqlops';
|
||||||
|
|
||||||
import { Action } from 'vs/base/common/actions';
|
import { Action } from 'vs/base/common/actions';
|
||||||
import * as types from 'vs/base/common/types';
|
import * as types from 'vs/base/common/types';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { toDisposableSubscription } from 'sql/parts/common/rxjsUtils';
|
|||||||
import { error } from 'sql/base/common/log';
|
import { error } from 'sql/base/common/log';
|
||||||
import { IDashboardRegistry, Extensions as DashboardExtensions } from 'sql/platform/dashboard/common/dashboardRegistry';
|
import { IDashboardRegistry, Extensions as DashboardExtensions } from 'sql/platform/dashboard/common/dashboardRegistry';
|
||||||
|
|
||||||
import { DatabaseInfo, ServerInfo } from 'data';
|
import { DatabaseInfo, ServerInfo } from 'sqlops';
|
||||||
|
|
||||||
import { EventType, addDisposableListener } from 'vs/base/browser/dom';
|
import { EventType, addDisposableListener } from 'vs/base/browser/dom';
|
||||||
import * as types from 'vs/base/common/types';
|
import * as types from 'vs/base/common/types';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { DashboardWidget, IDashboardWidget, WidgetConfig, WIDGET_CONFIG } from '
|
|||||||
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
import { DashboardServiceInterface } from 'sql/parts/dashboard/services/dashboardServiceInterface.service';
|
||||||
import { IDashboardWebview } from 'sql/services/dashboardWebview/common/dashboardWebviewService';
|
import { IDashboardWebview } from 'sql/services/dashboardWebview/common/dashboardWebviewService';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
interface IWebviewWidgetConfig {
|
interface IWebviewWidgetConfig {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -64,9 +64,9 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
public get connection(): data.connection.Connection {
|
public get connection(): sqlops.connection.Connection {
|
||||||
let currentConnection = this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;
|
let currentConnection = this._dashboardService.connectionManagementService.connectionInfo.connectionProfile;
|
||||||
let connection: data.connection.Connection = {
|
let connection: sqlops.connection.Connection = {
|
||||||
providerName: currentConnection.providerName,
|
providerName: currentConnection.providerName,
|
||||||
connectionId: currentConnection.id,
|
connectionId: currentConnection.id,
|
||||||
options: currentConnection.options
|
options: currentConnection.options
|
||||||
@@ -75,7 +75,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
public get serverInfo(): data.ServerInfo {
|
public get serverInfo(): sqlops.ServerInfo {
|
||||||
return this._dashboardService.connectionManagementService.connectionInfo.serverInfo;
|
return this._dashboardService.connectionManagementService.connectionInfo.serverInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import Event from 'vs/base/common/event';
|
import Event from 'vs/base/common/event';
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import { DashboardComponentParams } from 'sql/services/bootstrap/bootstrapParams';
|
import { DashboardComponentParams } from 'sql/services/bootstrap/bootstrapParams';
|
||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
@@ -53,15 +53,15 @@ export const IBackupService = createDecorator<IBackupService>(SERVICE_ID);
|
|||||||
export interface IBackupService {
|
export interface IBackupService {
|
||||||
_serviceBrand: any;
|
_serviceBrand: any;
|
||||||
|
|
||||||
getBackupConfigInfo(connectionUri: string): Thenable<data.BackupConfigInfo>;
|
getBackupConfigInfo(connectionUri: string): Thenable<sqlops.BackupConfigInfo>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Backup a data source using the provided connection
|
* Backup a data source using the provided connection
|
||||||
*/
|
*/
|
||||||
backup(connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: data.TaskExecutionMode): Thenable<data.BackupResponse>;
|
backup(connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: sqlops.TaskExecutionMode): Thenable<sqlops.BackupResponse>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a disaster recovery provider
|
* Register a disaster recovery provider
|
||||||
*/
|
*/
|
||||||
registerProvider(providerId: string, provider: data.BackupProvider): void;
|
registerProvider(providerId: string, provider: sqlops.BackupProvider): void;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as Constants from 'sql/common/constants';
|
import * as Constants from 'sql/common/constants';
|
||||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||||
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
||||||
@@ -26,7 +26,7 @@ import { ProviderConnectionInfo } from 'sql/parts/connection/common/providerConn
|
|||||||
export class BackupService implements IBackupService {
|
export class BackupService implements IBackupService {
|
||||||
|
|
||||||
public _serviceBrand: any;
|
public _serviceBrand: any;
|
||||||
private _providers: { [handle: string]: data.BackupProvider; } = Object.create(null);
|
private _providers: { [handle: string]: sqlops.BackupProvider; } = Object.create(null);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@IConnectionManagementService private _connectionService: IConnectionManagementService,
|
@IConnectionManagementService private _connectionService: IConnectionManagementService,
|
||||||
@@ -37,7 +37,7 @@ export class BackupService implements IBackupService {
|
|||||||
/**
|
/**
|
||||||
* Get database metadata needed to populate backup UI
|
* Get database metadata needed to populate backup UI
|
||||||
*/
|
*/
|
||||||
public getBackupConfigInfo(connectionUri: string): Thenable<data.BackupConfigInfo> {
|
public getBackupConfigInfo(connectionUri: string): Thenable<sqlops.BackupConfigInfo> {
|
||||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||||
if (providerId) {
|
if (providerId) {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
@@ -51,8 +51,8 @@ export class BackupService implements IBackupService {
|
|||||||
/**
|
/**
|
||||||
* Backup a data source using the provided connection
|
* Backup a data source using the provided connection
|
||||||
*/
|
*/
|
||||||
public backup(connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: TaskExecutionMode): Thenable<data.BackupResponse> {
|
public backup(connectionUri: string, backupInfo: { [key: string]: any }, taskExecutionMode: TaskExecutionMode): Thenable<sqlops.BackupResponse> {
|
||||||
return new Promise<data.BackupResponse>((resolve, reject) => {
|
return new Promise<sqlops.BackupResponse>((resolve, reject) => {
|
||||||
let providerResult = this.getProvider(connectionUri);
|
let providerResult = this.getProvider(connectionUri);
|
||||||
if (providerResult) {
|
if (providerResult) {
|
||||||
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.BackupCreated, { provider: providerResult.providerName });
|
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.BackupCreated, { provider: providerResult.providerName });
|
||||||
@@ -67,7 +67,7 @@ export class BackupService implements IBackupService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private getProvider(connectionUri: string): { provider: data.BackupProvider, providerName: string } {
|
private getProvider(connectionUri: string): { provider: sqlops.BackupProvider, providerName: string } {
|
||||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||||
if (providerId) {
|
if (providerId) {
|
||||||
return { provider: this._providers[providerId], providerName: providerId };
|
return { provider: this._providers[providerId], providerName: providerId };
|
||||||
@@ -79,7 +79,7 @@ export class BackupService implements IBackupService {
|
|||||||
/**
|
/**
|
||||||
* Register a disaster recovery provider
|
* Register a disaster recovery provider
|
||||||
*/
|
*/
|
||||||
public registerProvider(providerId: string, provider: data.BackupProvider): void {
|
public registerProvider(providerId: string, provider: sqlops.BackupProvider): void {
|
||||||
this._providers[providerId] = provider;
|
this._providers[providerId] = provider;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ export class BackupUiService implements IBackupUiService {
|
|||||||
public _serviceBrand: any;
|
public _serviceBrand: any;
|
||||||
private _backupDialogs: { [providerName: string]: BackupDialog | OptionsDialog } = {};
|
private _backupDialogs: { [providerName: string]: BackupDialog | OptionsDialog } = {};
|
||||||
private _currentProvider: string;
|
private _currentProvider: string;
|
||||||
private _optionsMap: { [providerName: string]: data.ServiceOption[] } = {};
|
private _optionsMap: { [providerName: string]: sqlops.ServiceOption[] } = {};
|
||||||
private _optionValues: { [optionName: string]: any } = {};
|
private _optionValues: { [optionName: string]: any } = {};
|
||||||
private _connectionUri: string;
|
private _connectionUri: string;
|
||||||
private static _connectionUniqueId: number = 0;
|
private static _connectionUniqueId: number = 0;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import { TPromise } from 'vs/base/common/winjs.base';
|
import { TPromise } from 'vs/base/common/winjs.base';
|
||||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
|
|
||||||
@@ -21,27 +21,27 @@ export interface IRestoreService {
|
|||||||
/**
|
/**
|
||||||
* Register a disaster recovery provider
|
* Register a disaster recovery provider
|
||||||
*/
|
*/
|
||||||
registerProvider(providerId: string, provider: data.RestoreProvider): void;
|
registerProvider(providerId: string, provider: sqlops.RestoreProvider): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore a data source using a backup file or database
|
* Restore a data source using a backup file or database
|
||||||
*/
|
*/
|
||||||
restore(connectionUri: string, restoreInfo: data.RestoreInfo): Thenable<data.RestoreResponse>;
|
restore(connectionUri: string, restoreInfo: sqlops.RestoreInfo): Thenable<sqlops.RestoreResponse>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets restore plan to do the restore operation on a database
|
* Gets restore plan to do the restore operation on a database
|
||||||
*/
|
*/
|
||||||
getRestorePlan(connectionUri: string, restoreInfo: data.RestoreInfo): Thenable<data.RestorePlanResponse>;
|
getRestorePlan(connectionUri: string, restoreInfo: sqlops.RestoreInfo): Thenable<sqlops.RestorePlanResponse>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets restore config Info
|
* Gets restore config Info
|
||||||
*/
|
*/
|
||||||
getRestoreConfigInfo(connectionUri: string): Thenable<data.RestoreConfigInfo>;
|
getRestoreConfigInfo(connectionUri: string): Thenable<sqlops.RestoreConfigInfo>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancel restore plan
|
* Cancel restore plan
|
||||||
*/
|
*/
|
||||||
cancelRestorePlan(connectionUri: string, restoreInfo: data.RestoreInfo): Thenable<boolean>;
|
cancelRestorePlan(connectionUri: string, restoreInfo: sqlops.RestoreInfo): Thenable<boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const IRestoreDialogController = createDecorator<IRestoreDialogController>('restoreDialogService');
|
export const IRestoreDialogController = createDecorator<IRestoreDialogController>('restoreDialogService');
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { TPromise } from 'vs/base/common/winjs.base';
|
import { TPromise } from 'vs/base/common/winjs.base';
|
||||||
import * as Constants from 'sql/common/constants';
|
import * as Constants from 'sql/common/constants';
|
||||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||||
@@ -29,7 +29,7 @@ import { TaskStatus, TaskNode } from 'sql/parts/taskHistory/common/taskNode';
|
|||||||
export class RestoreService implements IRestoreService {
|
export class RestoreService implements IRestoreService {
|
||||||
|
|
||||||
public _serviceBrand: any;
|
public _serviceBrand: any;
|
||||||
private _providers: { [handle: string]: data.RestoreProvider; } = Object.create(null);
|
private _providers: { [handle: string]: sqlops.RestoreProvider; } = Object.create(null);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@IConnectionManagementService private _connectionService: IConnectionManagementService,
|
@IConnectionManagementService private _connectionService: IConnectionManagementService,
|
||||||
@@ -40,8 +40,8 @@ export class RestoreService implements IRestoreService {
|
|||||||
/**
|
/**
|
||||||
* Gets restore config Info
|
* Gets restore config Info
|
||||||
*/
|
*/
|
||||||
getRestoreConfigInfo(connectionUri: string): Thenable<data.RestoreConfigInfo> {
|
getRestoreConfigInfo(connectionUri: string): Thenable<sqlops.RestoreConfigInfo> {
|
||||||
return new Promise<data.RestoreConfigInfo>((resolve, reject) => {
|
return new Promise<sqlops.RestoreConfigInfo>((resolve, reject) => {
|
||||||
let providerResult = this.getProvider(connectionUri);
|
let providerResult = this.getProvider(connectionUri);
|
||||||
if (providerResult) {
|
if (providerResult) {
|
||||||
providerResult.provider.getRestoreConfigInfo(connectionUri).then(result => {
|
providerResult.provider.getRestoreConfigInfo(connectionUri).then(result => {
|
||||||
@@ -58,8 +58,8 @@ export class RestoreService implements IRestoreService {
|
|||||||
/**
|
/**
|
||||||
* Restore a data source using a backup file or database
|
* Restore a data source using a backup file or database
|
||||||
*/
|
*/
|
||||||
restore(connectionUri: string, restoreInfo: data.RestoreInfo): Thenable<data.RestoreResponse> {
|
restore(connectionUri: string, restoreInfo: sqlops.RestoreInfo): Thenable<sqlops.RestoreResponse> {
|
||||||
return new Promise<data.RestoreResponse>((resolve, reject) => {
|
return new Promise<sqlops.RestoreResponse>((resolve, reject) => {
|
||||||
let providerResult = this.getProvider(connectionUri);
|
let providerResult = this.getProvider(connectionUri);
|
||||||
if (providerResult) {
|
if (providerResult) {
|
||||||
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.RestoreRequested, { provider: providerResult.providerName });
|
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.RestoreRequested, { provider: providerResult.providerName });
|
||||||
@@ -74,7 +74,7 @@ export class RestoreService implements IRestoreService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private getProvider(connectionUri: string): { provider: data.RestoreProvider, providerName: string } {
|
private getProvider(connectionUri: string): { provider: sqlops.RestoreProvider, providerName: string } {
|
||||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||||
if (providerId) {
|
if (providerId) {
|
||||||
return { provider: this._providers[providerId], providerName: providerId };
|
return { provider: this._providers[providerId], providerName: providerId };
|
||||||
@@ -86,8 +86,8 @@ export class RestoreService implements IRestoreService {
|
|||||||
/**
|
/**
|
||||||
* Gets restore plan to do the restore operation on a database
|
* Gets restore plan to do the restore operation on a database
|
||||||
*/
|
*/
|
||||||
getRestorePlan(connectionUri: string, restoreInfo: data.RestoreInfo): Thenable<data.RestorePlanResponse> {
|
getRestorePlan(connectionUri: string, restoreInfo: sqlops.RestoreInfo): Thenable<sqlops.RestorePlanResponse> {
|
||||||
return new Promise<data.RestorePlanResponse>((resolve, reject) => {
|
return new Promise<sqlops.RestorePlanResponse>((resolve, reject) => {
|
||||||
let providerResult = this.getProvider(connectionUri);
|
let providerResult = this.getProvider(connectionUri);
|
||||||
if (providerResult) {
|
if (providerResult) {
|
||||||
providerResult.provider.getRestorePlan(connectionUri, restoreInfo).then(result => {
|
providerResult.provider.getRestorePlan(connectionUri, restoreInfo).then(result => {
|
||||||
@@ -105,7 +105,7 @@ export class RestoreService implements IRestoreService {
|
|||||||
/**
|
/**
|
||||||
* Cancels a restore plan
|
* Cancels a restore plan
|
||||||
*/
|
*/
|
||||||
cancelRestorePlan(connectionUri: string, restoreInfo: data.RestoreInfo): Thenable<boolean> {
|
cancelRestorePlan(connectionUri: string, restoreInfo: sqlops.RestoreInfo): Thenable<boolean> {
|
||||||
return new Promise<boolean>((resolve, reject) => {
|
return new Promise<boolean>((resolve, reject) => {
|
||||||
let providerResult = this.getProvider(connectionUri);
|
let providerResult = this.getProvider(connectionUri);
|
||||||
if (providerResult) {
|
if (providerResult) {
|
||||||
@@ -124,7 +124,7 @@ export class RestoreService implements IRestoreService {
|
|||||||
/**
|
/**
|
||||||
* Register a disaster recovery provider
|
* Register a disaster recovery provider
|
||||||
*/
|
*/
|
||||||
public registerProvider(providerId: string, provider: data.RestoreProvider): void {
|
public registerProvider(providerId: string, provider: sqlops.RestoreProvider): void {
|
||||||
this._providers[providerId] = provider;
|
this._providers[providerId] = provider;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -232,7 +232,7 @@ export class RestoreDialogController implements IRestoreDialogController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private setRestoreOption(overwriteTargetDatabase: boolean = false): data.RestoreInfo {
|
private setRestoreOption(overwriteTargetDatabase: boolean = false): sqlops.RestoreInfo {
|
||||||
let restoreInfo = undefined;
|
let restoreInfo = undefined;
|
||||||
|
|
||||||
let providerId: string = this.getCurrentProviderId();
|
let providerId: string = this.getCurrentProviderId();
|
||||||
@@ -263,8 +263,8 @@ export class RestoreDialogController implements IRestoreDialogController {
|
|||||||
return restoreInfo;
|
return restoreInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getRestoreOption(): data.ServiceOption[] {
|
private getRestoreOption(): sqlops.ServiceOption[] {
|
||||||
let options: data.ServiceOption[] = [];
|
let options: sqlops.ServiceOption[] = [];
|
||||||
let providerId: string = this.getCurrentProviderId();
|
let providerId: string = this.getCurrentProviderId();
|
||||||
let providerCapabilities = this._capabilitiesService.getCapabilities().find(c => c.providerName === providerId);
|
let providerCapabilities = this._capabilitiesService.getCapabilities().find(c => c.providerName === providerId);
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
export class MssqlRestoreInfo implements data.RestoreInfo {
|
export class MssqlRestoreInfo implements sqlops.RestoreInfo {
|
||||||
|
|
||||||
options: { [name: string]: any };
|
options: { [name: string]: any };
|
||||||
taskExecutionMode: data.TaskExecutionMode;
|
taskExecutionMode: sqlops.TaskExecutionMode;
|
||||||
|
|
||||||
public constructor() {
|
public constructor() {
|
||||||
this.options = {};
|
this.options = {};
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import { IBootstrapService } from 'sql/services/bootstrap/bootstrapService';
|
|||||||
import { Dropdown } from 'sql/base/browser/ui/editableDropdown/dropdown';
|
import { Dropdown } from 'sql/base/browser/ui/editableDropdown/dropdown';
|
||||||
import { TabbedPanel, PanelTabIdentifier } from 'sql/base/browser/ui/panel/panel';
|
import { TabbedPanel, PanelTabIdentifier } from 'sql/base/browser/ui/panel/panel';
|
||||||
import * as DOM from 'vs/base/browser/dom';
|
import * as DOM from 'vs/base/browser/dom';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as strings from 'vs/base/common/strings';
|
import * as strings from 'vs/base/common/strings';
|
||||||
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ export class RestoreDialog extends Modal {
|
|||||||
public onDatabaseListFocused: Event<void> = this._onDatabaseListFocused.event;
|
public onDatabaseListFocused: Event<void> = this._onDatabaseListFocused.event;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
optionsMetadata: data.ServiceOption[],
|
optionsMetadata: sqlops.ServiceOption[],
|
||||||
@IPartService partService: IPartService,
|
@IPartService partService: IPartService,
|
||||||
@IThemeService private _themeService: IThemeService,
|
@IThemeService private _themeService: IThemeService,
|
||||||
@IContextViewService private _contextViewService: IContextViewService,
|
@IContextViewService private _contextViewService: IContextViewService,
|
||||||
@@ -802,7 +802,7 @@ export class RestoreDialog extends Modal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateRestoreDatabaseFiles(dbFiles: data.RestoreDatabaseFileInfo[]) {
|
private updateRestoreDatabaseFiles(dbFiles: sqlops.RestoreDatabaseFileInfo[]) {
|
||||||
this._fileListData.clear();
|
this._fileListData.clear();
|
||||||
if (dbFiles) {
|
if (dbFiles) {
|
||||||
let data = [];
|
let data = [];
|
||||||
@@ -823,7 +823,7 @@ export class RestoreDialog extends Modal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateBackupSetsToRestore(backupSetsToRestore: data.DatabaseFileInfo[]) {
|
private updateBackupSetsToRestore(backupSetsToRestore: sqlops.DatabaseFileInfo[]) {
|
||||||
if (this._isBackupFileCheckboxChanged) {
|
if (this._isBackupFileCheckboxChanged) {
|
||||||
let selectedRow = [];
|
let selectedRow = [];
|
||||||
for (let i = 0; i < backupSetsToRestore.length; i++) {
|
for (let i = 0; i < backupSetsToRestore.length; i++) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as DialogHelper from 'sql/base/browser/ui/modal/dialogHelper';
|
import * as DialogHelper from 'sql/base/browser/ui/modal/dialogHelper';
|
||||||
import * as types from 'vs/base/common/types';
|
import * as types from 'vs/base/common/types';
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ import Event, { Emitter } from 'vs/base/common/event';
|
|||||||
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||||
|
|
||||||
export interface RestoreOptionsElement {
|
export interface RestoreOptionsElement {
|
||||||
optionMetadata: data.ServiceOption;
|
optionMetadata: sqlops.ServiceOption;
|
||||||
defaultValue: any;
|
defaultValue: any;
|
||||||
currentValue: any;
|
currentValue: any;
|
||||||
}
|
}
|
||||||
@@ -62,15 +62,15 @@ export class RestoreViewModel {
|
|||||||
private _onSetRestoreOption = new Emitter<RestoreOptionParam>();
|
private _onSetRestoreOption = new Emitter<RestoreOptionParam>();
|
||||||
public onSetRestoreOption: Event<RestoreOptionParam> = this._onSetRestoreOption.event;
|
public onSetRestoreOption: Event<RestoreOptionParam> = this._onSetRestoreOption.event;
|
||||||
|
|
||||||
private _onUpdateBackupSetsToRestore = new Emitter<data.DatabaseFileInfo[]>();
|
private _onUpdateBackupSetsToRestore = new Emitter<sqlops.DatabaseFileInfo[]>();
|
||||||
public onUpdateBackupSetsToRestore: Event<data.DatabaseFileInfo[]> = this._onUpdateBackupSetsToRestore.event;
|
public onUpdateBackupSetsToRestore: Event<sqlops.DatabaseFileInfo[]> = this._onUpdateBackupSetsToRestore.event;
|
||||||
|
|
||||||
private _onUpdateRestoreDatabaseFiles = new Emitter<data.RestoreDatabaseFileInfo[]>();
|
private _onUpdateRestoreDatabaseFiles = new Emitter<sqlops.RestoreDatabaseFileInfo[]>();
|
||||||
public onUpdateRestoreDatabaseFiles: Event<data.RestoreDatabaseFileInfo[]> = this._onUpdateRestoreDatabaseFiles.event;
|
public onUpdateRestoreDatabaseFiles: Event<sqlops.RestoreDatabaseFileInfo[]> = this._onUpdateRestoreDatabaseFiles.event;
|
||||||
|
|
||||||
private _optionsMap: { [name: string]: RestoreOptionsElement } = {};
|
private _optionsMap: { [name: string]: RestoreOptionsElement } = {};
|
||||||
|
|
||||||
constructor(optionsMetadata: data.ServiceOption[]) {
|
constructor(optionsMetadata: sqlops.ServiceOption[]) {
|
||||||
optionsMetadata.forEach(optionMetadata => {
|
optionsMetadata.forEach(optionMetadata => {
|
||||||
let defaultValue = this.getDisplayValue(optionMetadata, optionMetadata.defaultValue);
|
let defaultValue = this.getDisplayValue(optionMetadata, optionMetadata.defaultValue);
|
||||||
this._optionsMap[optionMetadata.name] = {
|
this._optionsMap[optionMetadata.name] = {
|
||||||
@@ -84,7 +84,7 @@ export class RestoreViewModel {
|
|||||||
/**
|
/**
|
||||||
* Get option display value
|
* Get option display value
|
||||||
*/
|
*/
|
||||||
public getDisplayValue(optionMetadata: data.ServiceOption, optionValue: any): any {
|
public getDisplayValue(optionMetadata: sqlops.ServiceOption, optionValue: any): any {
|
||||||
let displayValue: any;
|
let displayValue: any;
|
||||||
switch (optionMetadata.valueType) {
|
switch (optionMetadata.valueType) {
|
||||||
case ServiceOptionType.boolean:
|
case ServiceOptionType.boolean:
|
||||||
@@ -119,7 +119,7 @@ export class RestoreViewModel {
|
|||||||
/**
|
/**
|
||||||
* Get option metadata from the option map
|
* Get option metadata from the option map
|
||||||
*/
|
*/
|
||||||
public getOptionMetadata(optionName: string): data.ServiceOption {
|
public getOptionMetadata(optionName: string): sqlops.ServiceOption {
|
||||||
return this._optionsMap[optionName] ? this._optionsMap[optionName].optionMetadata : undefined;
|
return this._optionsMap[optionName] ? this._optionsMap[optionName].optionMetadata : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ export class RestoreViewModel {
|
|||||||
/**
|
/**
|
||||||
* On restore plan response will update all the information from restore plan response
|
* On restore plan response will update all the information from restore plan response
|
||||||
*/
|
*/
|
||||||
public onRestorePlanResponse(restorePlanResponse: data.RestorePlanResponse): void {
|
public onRestorePlanResponse(restorePlanResponse: sqlops.RestorePlanResponse): void {
|
||||||
if (restorePlanResponse.planDetails && restorePlanResponse.planDetails['lastBackupTaken']) {
|
if (restorePlanResponse.planDetails && restorePlanResponse.planDetails['lastBackupTaken']) {
|
||||||
this.updateLastBackupTaken(restorePlanResponse.planDetails['lastBackupTaken'].currentValue);
|
this.updateLastBackupTaken(restorePlanResponse.planDetails['lastBackupTaken'].currentValue);
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@ export class RestoreViewModel {
|
|||||||
/**
|
/**
|
||||||
* Update options with plan details
|
* Update options with plan details
|
||||||
*/
|
*/
|
||||||
public updateOptionWithPlanDetail(planDetails: { [key: string]: data.RestorePlanDetailInfo }): void {
|
public updateOptionWithPlanDetail(planDetails: { [key: string]: sqlops.RestorePlanDetailInfo }): void {
|
||||||
if (planDetails) {
|
if (planDetails) {
|
||||||
for (var key in planDetails) {
|
for (var key in planDetails) {
|
||||||
let optionElement = this._optionsMap[key];
|
let optionElement = this._optionsMap[key];
|
||||||
@@ -234,7 +234,7 @@ export class RestoreViewModel {
|
|||||||
/**
|
/**
|
||||||
* Update backup sets to restore
|
* Update backup sets to restore
|
||||||
*/
|
*/
|
||||||
public updateBackupSetsToRestore(backupSetsToRestore: data.DatabaseFileInfo[]): void {
|
public updateBackupSetsToRestore(backupSetsToRestore: sqlops.DatabaseFileInfo[]): void {
|
||||||
this.selectedBackupSets = null;
|
this.selectedBackupSets = null;
|
||||||
if (backupSetsToRestore) {
|
if (backupSetsToRestore) {
|
||||||
this.selectedBackupSets = [];
|
this.selectedBackupSets = [];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message';
|
|||||||
import { IQueryModelService } from 'sql/parts/query/execution/queryModel';
|
import { IQueryModelService } from 'sql/parts/query/execution/queryModel';
|
||||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
import { EditSessionReadyParams } from 'data';
|
import { EditSessionReadyParams } from 'sqlops';
|
||||||
import URI from 'vs/base/common/uri';
|
import URI from 'vs/base/common/uri';
|
||||||
import nls = require('vs/nls');
|
import nls = require('vs/nls');
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { IConnectionManagementService, IErrorMessageService } from 'sql/parts/connection/common/connectionManagement';
|
import { IConnectionManagementService, IErrorMessageService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
import { FileBrowserTree } from 'sql/parts/fileBrowser/common/fileBrowserTree';
|
import { FileBrowserTree } from 'sql/parts/fileBrowser/common/fileBrowserTree';
|
||||||
import { FileNode } from 'sql/parts/fileBrowser/common/fileNode';
|
import { FileNode } from 'sql/parts/fileBrowser/common/fileNode';
|
||||||
@@ -20,10 +20,10 @@ import * as strings from 'vs/base/common/strings';
|
|||||||
|
|
||||||
export class FileBrowserService implements IFileBrowserService {
|
export class FileBrowserService implements IFileBrowserService {
|
||||||
public _serviceBrand: any;
|
public _serviceBrand: any;
|
||||||
private _providers: { [handle: string]: data.FileBrowserProvider; } = Object.create(null);
|
private _providers: { [handle: string]: sqlops.FileBrowserProvider; } = Object.create(null);
|
||||||
private _onAddFileTree = new Emitter<FileBrowserTree>();
|
private _onAddFileTree = new Emitter<FileBrowserTree>();
|
||||||
private _onExpandFolder = new Emitter<FileNode>();
|
private _onExpandFolder = new Emitter<FileNode>();
|
||||||
private _onPathValidate = new Emitter<data.FileBrowserValidatedParams>();
|
private _onPathValidate = new Emitter<sqlops.FileBrowserValidatedParams>();
|
||||||
private _pathToFileNodeMap: { [path: string]: FileNode } = {};
|
private _pathToFileNodeMap: { [path: string]: FileNode } = {};
|
||||||
private _expandResolveMap: { [key: string]: any } = {};
|
private _expandResolveMap: { [key: string]: any } = {};
|
||||||
static fileNodeId: number = 0;
|
static fileNodeId: number = 0;
|
||||||
@@ -33,7 +33,7 @@ export class FileBrowserService implements IFileBrowserService {
|
|||||||
@IErrorMessageService private _errorMessageService: IErrorMessageService) {
|
@IErrorMessageService private _errorMessageService: IErrorMessageService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public registerProvider(providerId: string, provider: data.FileBrowserProvider): void {
|
public registerProvider(providerId: string, provider: sqlops.FileBrowserProvider): void {
|
||||||
this._providers[providerId] = provider;
|
this._providers[providerId] = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ export class FileBrowserService implements IFileBrowserService {
|
|||||||
return this._onExpandFolder.event;
|
return this._onExpandFolder.event;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get onPathValidate(): Event<data.FileBrowserValidatedParams> {
|
public get onPathValidate(): Event<sqlops.FileBrowserValidatedParams> {
|
||||||
return this._onPathValidate.event;
|
return this._onPathValidate.event;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ export class FileBrowserService implements IFileBrowserService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onFileBrowserOpened(handle: number, fileBrowserOpenedParams: data.FileBrowserOpenedParams) {
|
public onFileBrowserOpened(handle: number, fileBrowserOpenedParams: sqlops.FileBrowserOpenedParams) {
|
||||||
if (fileBrowserOpenedParams.succeeded === true
|
if (fileBrowserOpenedParams.succeeded === true
|
||||||
&& fileBrowserOpenedParams.fileTree
|
&& fileBrowserOpenedParams.fileTree
|
||||||
&& fileBrowserOpenedParams.fileTree.rootNode
|
&& fileBrowserOpenedParams.fileTree.rootNode
|
||||||
@@ -98,7 +98,7 @@ export class FileBrowserService implements IFileBrowserService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onFolderNodeExpanded(handle: number, fileBrowserExpandedParams: data.FileBrowserExpandedParams) {
|
public onFolderNodeExpanded(handle: number, fileBrowserExpandedParams: sqlops.FileBrowserExpandedParams) {
|
||||||
var mapKey = this.generateResolveMapKey(fileBrowserExpandedParams.ownerUri, fileBrowserExpandedParams.expandPath);
|
var mapKey = this.generateResolveMapKey(fileBrowserExpandedParams.ownerUri, fileBrowserExpandedParams.expandPath);
|
||||||
var expandResolve = this._expandResolveMap[mapKey];
|
var expandResolve = this._expandResolveMap[mapKey];
|
||||||
if (expandResolve) {
|
if (expandResolve) {
|
||||||
@@ -135,11 +135,11 @@ export class FileBrowserService implements IFileBrowserService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onFilePathsValidated(handle: number, fileBrowserValidatedParams: data.FileBrowserValidatedParams) {
|
public onFilePathsValidated(handle: number, fileBrowserValidatedParams: sqlops.FileBrowserValidatedParams) {
|
||||||
this._onPathValidate.fire(fileBrowserValidatedParams);
|
this._onPathValidate.fire(fileBrowserValidatedParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeFileBrowser(ownerUri: string): Thenable<data.FileBrowserCloseResponse> {
|
public closeFileBrowser(ownerUri: string): Thenable<sqlops.FileBrowserCloseResponse> {
|
||||||
let provider = this.getProvider(ownerUri);
|
let provider = this.getProvider(ownerUri);
|
||||||
if (provider) {
|
if (provider) {
|
||||||
return provider.closeFileBrowser(ownerUri);
|
return provider.closeFileBrowser(ownerUri);
|
||||||
@@ -150,7 +150,7 @@ export class FileBrowserService implements IFileBrowserService {
|
|||||||
private generateResolveMapKey(ownerUri: string, expandPath: string): string {
|
private generateResolveMapKey(ownerUri: string, expandPath: string): string {
|
||||||
return ownerUri + ':' + expandPath;
|
return ownerUri + ':' + expandPath;
|
||||||
}
|
}
|
||||||
private getProvider(connectionUri: string): data.FileBrowserProvider {
|
private getProvider(connectionUri: string): sqlops.FileBrowserProvider {
|
||||||
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
let providerId: string = this._connectionService.getProviderIdFromUri(connectionUri);
|
||||||
if (providerId) {
|
if (providerId) {
|
||||||
return this._providers[providerId];
|
return this._providers[providerId];
|
||||||
@@ -159,7 +159,7 @@ export class FileBrowserService implements IFileBrowserService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private convertFileTree(parentNode: FileNode, fileTreeNode: data.FileTreeNode, expandPath: string, ownerUri: string): FileBrowserTree {
|
private convertFileTree(parentNode: FileNode, fileTreeNode: sqlops.FileTreeNode, expandPath: string, ownerUri: string): FileBrowserTree {
|
||||||
FileBrowserService.fileNodeId += 1;
|
FileBrowserService.fileNodeId += 1;
|
||||||
var expandedNodes: FileNode[] = [];
|
var expandedNodes: FileNode[] = [];
|
||||||
var selectedNode: FileNode;
|
var selectedNode: FileNode;
|
||||||
@@ -208,7 +208,7 @@ export class FileBrowserService implements IFileBrowserService {
|
|||||||
return { rootNode: fileNode, selectedNode: selectedNode, expandedNodes: expandedNodes };
|
return { rootNode: fileNode, selectedNode: selectedNode, expandedNodes: expandedNodes };
|
||||||
}
|
}
|
||||||
|
|
||||||
private convertChildren(expandedNode: FileNode, childrenToConvert: data.FileTreeNode[], ownerUri: string): FileNode[] {
|
private convertChildren(expandedNode: FileNode, childrenToConvert: sqlops.FileTreeNode[], ownerUri: string): FileNode[] {
|
||||||
var childrenNodes = [];
|
var childrenNodes = [];
|
||||||
|
|
||||||
for (var i = 0; i < childrenToConvert.length; i++) {
|
for (var i = 0; i < childrenToConvert.length; i++) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { FileBrowserTree } from 'sql/parts/fileBrowser/common/fileBrowserTree';
|
import { FileBrowserTree } from 'sql/parts/fileBrowser/common/fileBrowserTree';
|
||||||
import { FileNode } from 'sql/parts/fileBrowser/common/fileNode';
|
import { FileNode } from 'sql/parts/fileBrowser/common/fileNode';
|
||||||
import Event from 'vs/base/common/event';
|
import Event from 'vs/base/common/event';
|
||||||
@@ -19,7 +19,7 @@ export interface IFileBrowserDialogController {
|
|||||||
*/
|
*/
|
||||||
showDialog(ownerUri: string,
|
showDialog(ownerUri: string,
|
||||||
expandPath: string,
|
expandPath: string,
|
||||||
fileFilters: [{label: string, filters: string[]}],
|
fileFilters: [{ label: string, filters: string[] }],
|
||||||
fileValidationServiceType: string,
|
fileValidationServiceType: string,
|
||||||
isWide: boolean,
|
isWide: boolean,
|
||||||
handleOnOk: (path: string) => void): void;
|
handleOnOk: (path: string) => void): void;
|
||||||
@@ -30,12 +30,12 @@ export interface IFileBrowserService {
|
|||||||
_serviceBrand: any;
|
_serviceBrand: any;
|
||||||
onAddFileTree: Event<FileBrowserTree>;
|
onAddFileTree: Event<FileBrowserTree>;
|
||||||
onExpandFolder: Event<FileNode>;
|
onExpandFolder: Event<FileNode>;
|
||||||
onPathValidate: Event<data.FileBrowserValidatedParams>;
|
onPathValidate: Event<sqlops.FileBrowserValidatedParams>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register file browser provider
|
* Register file browser provider
|
||||||
*/
|
*/
|
||||||
registerProvider(providerId: string, provider: data.FileBrowserProvider): void;
|
registerProvider(providerId: string, provider: sqlops.FileBrowserProvider): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open file browser
|
* Open file browser
|
||||||
@@ -45,7 +45,7 @@ export interface IFileBrowserService {
|
|||||||
/**
|
/**
|
||||||
* Event called when file browser is opened
|
* Event called when file browser is opened
|
||||||
*/
|
*/
|
||||||
onFileBrowserOpened(handle: number, fileBrowserOpenedParams: data.FileBrowserOpenedParams);
|
onFileBrowserOpened(handle: number, fileBrowserOpenedParams: sqlops.FileBrowserOpenedParams);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expand folder node
|
* Expand folder node
|
||||||
@@ -55,7 +55,7 @@ export interface IFileBrowserService {
|
|||||||
/**
|
/**
|
||||||
* Event called when children nodes are retrieved
|
* Event called when children nodes are retrieved
|
||||||
*/
|
*/
|
||||||
onFolderNodeExpanded(handle: number, fileBrowserExpandedParams: data.FileBrowserExpandedParams);
|
onFolderNodeExpanded(handle: number, fileBrowserExpandedParams: sqlops.FileBrowserExpandedParams);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate selected file paths
|
* Validate selected file paths
|
||||||
@@ -65,10 +65,10 @@ export interface IFileBrowserService {
|
|||||||
/**
|
/**
|
||||||
* Event called when the validation is complete
|
* Event called when the validation is complete
|
||||||
*/
|
*/
|
||||||
onFilePathsValidated(handle: number, fileBrowserValidatedParams: data.FileBrowserValidatedParams);
|
onFilePathsValidated(handle: number, fileBrowserValidatedParams: sqlops.FileBrowserValidatedParams);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close file browser
|
* Close file browser
|
||||||
*/
|
*/
|
||||||
closeFileBrowser(ownerUri: string): Thenable<data.FileBrowserCloseResponse>;
|
closeFileBrowser(ownerUri: string): Thenable<sqlops.FileBrowserCloseResponse>;
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs/Observable';
|
|||||||
import { Subject } from 'rxjs/Subject';
|
import { Subject } from 'rxjs/Subject';
|
||||||
import { Observer } from 'rxjs/Observer';
|
import { Observer } from 'rxjs/Observer';
|
||||||
|
|
||||||
import { ResultSetSubset, EditUpdateCellResult, EditSubsetResult, EditCreateRowResult } from 'data';
|
import { ResultSetSubset, EditUpdateCellResult, EditSubsetResult, EditCreateRowResult } from 'sqlops';
|
||||||
import { IQueryModelService } from 'sql/parts/query/execution/queryModel';
|
import { IQueryModelService } from 'sql/parts/query/execution/queryModel';
|
||||||
import { ResultSerializer } from 'sql/parts/query/common/resultSerializer';
|
import { ResultSerializer } from 'sql/parts/query/common/resultSerializer';
|
||||||
import { ISaveRequest } from 'sql/parts/grid/common/interfaces';
|
import { ISaveRequest } from 'sql/parts/grid/common/interfaces';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import * as Utils from 'sql/parts/connection/common/utils';
|
|||||||
import { IInsightsDialogModel, insertValueRegex } from 'sql/parts/insights/common/interfaces';
|
import { IInsightsDialogModel, insertValueRegex } from 'sql/parts/insights/common/interfaces';
|
||||||
import { error } from 'sql/base/common/log';
|
import { error } from 'sql/base/common/log';
|
||||||
|
|
||||||
import { DbCellValue, IDbColumn, QueryExecuteSubsetResult } from 'data';
|
import { DbCellValue, IDbColumn, QueryExecuteSubsetResult } from 'sqlops';
|
||||||
|
|
||||||
import Severity from 'vs/base/common/severity';
|
import Severity from 'vs/base/common/severity';
|
||||||
import * as types from 'vs/base/common/types';
|
import * as types from 'vs/base/common/types';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { IProfilerSession, IProfilerService, ProfilerSessionID, IProfilerSession
|
|||||||
import { ProfilerState } from './profilerState';
|
import { ProfilerState } from './profilerState';
|
||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import { TPromise } from 'vs/base/common/winjs.base';
|
import { TPromise } from 'vs/base/common/winjs.base';
|
||||||
import { EditorInput } from 'vs/workbench/common/editor';
|
import { EditorInput } from 'vs/workbench/common/editor';
|
||||||
@@ -123,9 +123,9 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
|||||||
return this._state;
|
return this._state;
|
||||||
}
|
}
|
||||||
|
|
||||||
public onMoreRows(eventMessage: data.ProfilerSessionEvents) {
|
public onMoreRows(eventMessage: sqlops.ProfilerSessionEvents) {
|
||||||
for (let i: number = 0; i < eventMessage.events.length && i < 500; ++i) {
|
for (let i: number = 0; i < eventMessage.events.length && i < 500; ++i) {
|
||||||
let e: data.ProfilerEvent = eventMessage.events[i];
|
let e: sqlops.ProfilerEvent = eventMessage.events[i];
|
||||||
let data = {};
|
let data = {};
|
||||||
data['EventClass'] = e.name;
|
data['EventClass'] = e.name;
|
||||||
data['StartTime'] = e.timestamp;
|
data['StartTime'] = e.timestamp;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
|||||||
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
|
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
|
||||||
|
|
||||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
const PROFILER_SERVICE_ID = 'profilerService';
|
const PROFILER_SERVICE_ID = 'profilerService';
|
||||||
export const IProfilerService = createDecorator<IProfilerService>(PROFILER_SERVICE_ID);
|
export const IProfilerService = createDecorator<IProfilerService>(PROFILER_SERVICE_ID);
|
||||||
@@ -24,7 +24,7 @@ export interface IProfilerSession {
|
|||||||
/**
|
/**
|
||||||
* Called by the service when more rows are available to render
|
* Called by the service when more rows are available to render
|
||||||
*/
|
*/
|
||||||
onMoreRows(events: data.ProfilerSessionEvents);
|
onMoreRows(events: sqlops.ProfilerSessionEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,7 +35,7 @@ export interface IProfilerService {
|
|||||||
/**
|
/**
|
||||||
* Registers a backend provider for profiler session. ex: mssql
|
* Registers a backend provider for profiler session. ex: mssql
|
||||||
*/
|
*/
|
||||||
registerProvider(providerId: string, provider: data.ProfilerProvider): void;
|
registerProvider(providerId: string, provider: sqlops.ProfilerProvider): void;
|
||||||
/**
|
/**
|
||||||
* Registers a session with the service that acts as the UI for a profiler session
|
* Registers a session with the service that acts as the UI for a profiler session
|
||||||
* @returns An unique id that should be used to make subsequent calls to this service
|
* @returns An unique id that should be used to make subsequent calls to this service
|
||||||
@@ -64,7 +64,7 @@ export interface IProfilerService {
|
|||||||
/**
|
/**
|
||||||
* The method called by the service provider for when more rows are available to render
|
* The method called by the service provider for when more rows are available to render
|
||||||
*/
|
*/
|
||||||
onMoreRows(params: data.ProfilerSessionEvents): void;
|
onMoreRows(params: sqlops.ProfilerSessionEvents): void;
|
||||||
/**
|
/**
|
||||||
* Gets a list of the session templates that are specified in the settings
|
* Gets a list of the session templates that are specified in the settings
|
||||||
* @param provider An optional string to limit the session template to a specific
|
* @param provider An optional string to limit the session template to a specific
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
|||||||
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
|
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
|
||||||
import { ProfilerColumnEditorDialog } from 'sql/parts/profiler/dialog/profilerColumnEditorDialog';
|
import { ProfilerColumnEditorDialog } from 'sql/parts/profiler/dialog/profilerColumnEditorDialog';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import { TPromise } from 'vs/base/common/winjs.base';
|
import { TPromise } from 'vs/base/common/winjs.base';
|
||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
@@ -44,7 +44,7 @@ class TwoWayMap<T, K> {
|
|||||||
|
|
||||||
export class ProfilerService implements IProfilerService {
|
export class ProfilerService implements IProfilerService {
|
||||||
public _serviceBrand: any;
|
public _serviceBrand: any;
|
||||||
private _providers = new Map<string, data.ProfilerProvider>();
|
private _providers = new Map<string, sqlops.ProfilerProvider>();
|
||||||
private _idMap = new TwoWayMap<ProfilerSessionID, string>();
|
private _idMap = new TwoWayMap<ProfilerSessionID, string>();
|
||||||
private _sessionMap = new Map<ProfilerSessionID, IProfilerSession>();
|
private _sessionMap = new Map<ProfilerSessionID, IProfilerSession>();
|
||||||
private _dialog: ProfilerColumnEditorDialog;
|
private _dialog: ProfilerColumnEditorDialog;
|
||||||
@@ -55,7 +55,7 @@ export class ProfilerService implements IProfilerService {
|
|||||||
@IInstantiationService private _instantiationService: IInstantiationService
|
@IInstantiationService private _instantiationService: IInstantiationService
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
public registerProvider(providerId: string, provider: data.ProfilerProvider): void {
|
public registerProvider(providerId: string, provider: sqlops.ProfilerProvider): void {
|
||||||
this._providers.set(providerId, provider);
|
this._providers.set(providerId, provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ export class ProfilerService implements IProfilerService {
|
|||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public onMoreRows(params: data.ProfilerSessionEvents): void {
|
public onMoreRows(params: sqlops.ProfilerSessionEvents): void {
|
||||||
|
|
||||||
this._sessionMap.get(this._idMap.reverseGet(params.sessionId)).onMoreRows(params);
|
this._sessionMap.get(this._idMap.reverseGet(params.sessionId)).onMoreRows(params);
|
||||||
}
|
}
|
||||||
@@ -102,7 +102,7 @@ export class ProfilerService implements IProfilerService {
|
|||||||
return this._runAction(id, provider => provider.stopSession(this._idMap.get(id)));
|
return this._runAction(id, provider => provider.stopSession(this._idMap.get(id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private _runAction<T>(id: ProfilerSessionID, action: (handler: data.ProfilerProvider) => Thenable<T>): Thenable<T> {
|
private _runAction<T>(id: ProfilerSessionID, action: (handler: sqlops.ProfilerProvider) => Thenable<T>): Thenable<T> {
|
||||||
// let providerId = this._connectionService.getProviderIdFromUri(this._idMap.get(id));
|
// let providerId = this._connectionService.getProviderIdFromUri(this._idMap.get(id));
|
||||||
let providerId = 'MSSQL';
|
let providerId = 'MSSQL';
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
|
|||||||
import * as pfs from 'vs/base/node/pfs';
|
import * as pfs from 'vs/base/node/pfs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
declare var __dirname;
|
declare var __dirname;
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ const columns = [
|
|||||||
'BinaryData'
|
'BinaryData'
|
||||||
];
|
];
|
||||||
|
|
||||||
export class ProfilerTestBackend implements data.ProfilerProvider {
|
export class ProfilerTestBackend implements sqlops.ProfilerProvider {
|
||||||
public readonly providerId = 'MSSQL';
|
public readonly providerId = 'MSSQL';
|
||||||
private index = 0;
|
private index = 0;
|
||||||
private timeOutMap = new Map<string, number>();
|
private timeOutMap = new Map<string, number>();
|
||||||
@@ -44,7 +44,7 @@ export class ProfilerTestBackend implements data.ProfilerProvider {
|
|||||||
return TPromise.as(true);
|
return TPromise.as(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
registerOnSessionEventsAvailable(handler: (response: data.ProfilerSessionEvents) => any) {
|
registerOnSessionEventsAvailable(handler: (response: sqlops.ProfilerSessionEvents) => any) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import nls = require('vs/nls');
|
|||||||
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
import * as WorkbenchUtils from 'sql/workbench/common/sqlWorkbenchUtils';
|
import * as WorkbenchUtils from 'sql/workbench/common/sqlWorkbenchUtils';
|
||||||
|
|
||||||
import { DidChangeLanguageFlavorParams } from 'data';
|
import { DidChangeLanguageFlavorParams } from 'sqlops';
|
||||||
|
|
||||||
export interface ISqlProviderEntry extends IPickOpenEntry {
|
export interface ISqlProviderEntry extends IPickOpenEntry {
|
||||||
providerId: string;
|
providerId: string;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { IQueryModelService } from 'sql/parts/query/execution/queryModel';
|
|||||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
import URI from 'vs/base/common/uri';
|
import URI from 'vs/base/common/uri';
|
||||||
import { ISelectionData, ExecutionPlanOptions } from 'data';
|
import { ISelectionData, ExecutionPlanOptions } from 'sqlops';
|
||||||
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import QueryRunner from 'sql/parts/query/execution/queryRunner';
|
|||||||
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||||
import data = require('data');
|
import * as sqlops from 'sqlops';
|
||||||
import { TPromise } from 'vs/base/common/winjs.base';
|
import { TPromise } from 'vs/base/common/winjs.base';
|
||||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||||
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
||||||
@@ -23,21 +23,21 @@ export interface IQueryManagementService {
|
|||||||
addQueryRequestHandler(queryType: string, runner: IQueryRequestHandler): IDisposable;
|
addQueryRequestHandler(queryType: string, runner: IQueryRequestHandler): IDisposable;
|
||||||
registerRunner(runner: QueryRunner, uri: string): void;
|
registerRunner(runner: QueryRunner, uri: string): void;
|
||||||
|
|
||||||
cancelQuery(ownerUri: string): Thenable<data.QueryCancelResult>;
|
cancelQuery(ownerUri: string): Thenable<sqlops.QueryCancelResult>;
|
||||||
runQuery(ownerUri: string, selection: data.ISelectionData, runOptions?: data.ExecutionPlanOptions): Thenable<void>;
|
runQuery(ownerUri: string, selection: sqlops.ISelectionData, runOptions?: sqlops.ExecutionPlanOptions): Thenable<void>;
|
||||||
runQueryStatement(ownerUri: string, line: number, column: number): Thenable<void>;
|
runQueryStatement(ownerUri: string, line: number, column: number): Thenable<void>;
|
||||||
runQueryString(ownerUri: string, queryString: string): Thenable<void>;
|
runQueryString(ownerUri: string, queryString: string): Thenable<void>;
|
||||||
runQueryAndReturn(ownerUri: string, queryString: string): Thenable<data.SimpleExecuteResult>;
|
runQueryAndReturn(ownerUri: string, queryString: string): Thenable<sqlops.SimpleExecuteResult>;
|
||||||
getQueryRows(rowData: data.QueryExecuteSubsetParams): Thenable<data.QueryExecuteSubsetResult>;
|
getQueryRows(rowData: sqlops.QueryExecuteSubsetParams): Thenable<sqlops.QueryExecuteSubsetResult>;
|
||||||
disposeQuery(ownerUri: string): Thenable<void>;
|
disposeQuery(ownerUri: string): Thenable<void>;
|
||||||
saveResults(requestParams: data.SaveResultsRequestParams): Thenable<data.SaveResultRequestResult>;
|
saveResults(requestParams: sqlops.SaveResultsRequestParams): Thenable<sqlops.SaveResultRequestResult>;
|
||||||
|
|
||||||
// Callbacks
|
// Callbacks
|
||||||
onQueryComplete(result: data.QueryExecuteCompleteNotificationResult): void;
|
onQueryComplete(result: sqlops.QueryExecuteCompleteNotificationResult): void;
|
||||||
onBatchStart(batchInfo: data.QueryExecuteBatchNotificationParams): void;
|
onBatchStart(batchInfo: sqlops.QueryExecuteBatchNotificationParams): void;
|
||||||
onBatchComplete(batchInfo: data.QueryExecuteBatchNotificationParams): void;
|
onBatchComplete(batchInfo: sqlops.QueryExecuteBatchNotificationParams): void;
|
||||||
onResultSetComplete(resultSetInfo: data.QueryExecuteResultSetCompleteNotificationParams): void;
|
onResultSetComplete(resultSetInfo: sqlops.QueryExecuteResultSetCompleteNotificationParams): void;
|
||||||
onMessage(message: data.QueryExecuteMessageParams): void;
|
onMessage(message: sqlops.QueryExecuteMessageParams): void;
|
||||||
|
|
||||||
// Edit Data Callbacks
|
// Edit Data Callbacks
|
||||||
onEditSessionReady(ownerUri: string, success: boolean, message: string): void;
|
onEditSessionReady(ownerUri: string, success: boolean, message: string): void;
|
||||||
@@ -45,38 +45,38 @@ export interface IQueryManagementService {
|
|||||||
// Edit Data Functions
|
// Edit Data Functions
|
||||||
initializeEdit(ownerUri: string, schemaName: string, objectName: string, objectType: string, rowLimit: number): Thenable<void>;
|
initializeEdit(ownerUri: string, schemaName: string, objectName: string, objectType: string, rowLimit: number): Thenable<void>;
|
||||||
disposeEdit(ownerUri: string): Thenable<void>;
|
disposeEdit(ownerUri: string): Thenable<void>;
|
||||||
updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<data.EditUpdateCellResult>;
|
updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<sqlops.EditUpdateCellResult>;
|
||||||
commitEdit(ownerUri): Thenable<void>;
|
commitEdit(ownerUri): Thenable<void>;
|
||||||
createRow(ownerUri: string): Thenable<data.EditCreateRowResult>;
|
createRow(ownerUri: string): Thenable<sqlops.EditCreateRowResult>;
|
||||||
deleteRow(ownerUri: string, rowId: number): Thenable<void>;
|
deleteRow(ownerUri: string, rowId: number): Thenable<void>;
|
||||||
revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<data.EditRevertCellResult>;
|
revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<sqlops.EditRevertCellResult>;
|
||||||
revertRow(ownerUri: string, rowId: number): Thenable<void>;
|
revertRow(ownerUri: string, rowId: number): Thenable<void>;
|
||||||
getEditRows(rowData: data.EditSubsetParams): Thenable<data.EditSubsetResult>;
|
getEditRows(rowData: sqlops.EditSubsetParams): Thenable<sqlops.EditSubsetResult>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* An object that can handle basic request-response actions related to queries
|
* An object that can handle basic request-response actions related to queries
|
||||||
*/
|
*/
|
||||||
export interface IQueryRequestHandler {
|
export interface IQueryRequestHandler {
|
||||||
cancelQuery(ownerUri: string): Thenable<data.QueryCancelResult>;
|
cancelQuery(ownerUri: string): Thenable<sqlops.QueryCancelResult>;
|
||||||
runQuery(ownerUri: string, selection: data.ISelectionData, runOptions?: data.ExecutionPlanOptions): Thenable<void>;
|
runQuery(ownerUri: string, selection: sqlops.ISelectionData, runOptions?: sqlops.ExecutionPlanOptions): Thenable<void>;
|
||||||
runQueryStatement(ownerUri: string, line: number, column: number): Thenable<void>;
|
runQueryStatement(ownerUri: string, line: number, column: number): Thenable<void>;
|
||||||
runQueryString(ownerUri: string, queryString: string): Thenable<void>;
|
runQueryString(ownerUri: string, queryString: string): Thenable<void>;
|
||||||
runQueryAndReturn(ownerUri: string, queryString: string): Thenable<data.SimpleExecuteResult>;
|
runQueryAndReturn(ownerUri: string, queryString: string): Thenable<sqlops.SimpleExecuteResult>;
|
||||||
getQueryRows(rowData: data.QueryExecuteSubsetParams): Thenable<data.QueryExecuteSubsetResult>;
|
getQueryRows(rowData: sqlops.QueryExecuteSubsetParams): Thenable<sqlops.QueryExecuteSubsetResult>;
|
||||||
disposeQuery(ownerUri: string): Thenable<void>;
|
disposeQuery(ownerUri: string): Thenable<void>;
|
||||||
saveResults(requestParams: data.SaveResultsRequestParams): Thenable<data.SaveResultRequestResult>;
|
saveResults(requestParams: sqlops.SaveResultsRequestParams): Thenable<sqlops.SaveResultRequestResult>;
|
||||||
|
|
||||||
// Edit Data actions
|
// Edit Data actions
|
||||||
initializeEdit(ownerUri: string, schemaName: string, objectName: string, objectType: string, rowLimit: number): Thenable<void>;
|
initializeEdit(ownerUri: string, schemaName: string, objectName: string, objectType: string, rowLimit: number): Thenable<void>;
|
||||||
disposeEdit(ownerUri: string): Thenable<void>;
|
disposeEdit(ownerUri: string): Thenable<void>;
|
||||||
updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<data.EditUpdateCellResult>;
|
updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<sqlops.EditUpdateCellResult>;
|
||||||
commitEdit(ownerUri): Thenable<void>;
|
commitEdit(ownerUri): Thenable<void>;
|
||||||
createRow(ownerUri: string): Thenable<data.EditCreateRowResult>;
|
createRow(ownerUri: string): Thenable<sqlops.EditCreateRowResult>;
|
||||||
deleteRow(ownerUri: string, rowId: number): Thenable<void>;
|
deleteRow(ownerUri: string, rowId: number): Thenable<void>;
|
||||||
revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<data.EditRevertCellResult>;
|
revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<sqlops.EditRevertCellResult>;
|
||||||
revertRow(ownerUri: string, rowId: number): Thenable<void>;
|
revertRow(ownerUri: string, rowId: number): Thenable<void>;
|
||||||
getEditRows(rowData: data.EditSubsetParams): Thenable<data.EditSubsetResult>;
|
getEditRows(rowData: sqlops.EditSubsetParams): Thenable<sqlops.EditSubsetResult>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class QueryManagementService implements IQueryManagementService {
|
export class QueryManagementService implements IQueryManagementService {
|
||||||
@@ -141,7 +141,7 @@ export class QueryManagementService implements IQueryManagementService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private addTelemetry(eventName: string, ownerUri: string, runOptions?: data.ExecutionPlanOptions): void {
|
private addTelemetry(eventName: string, ownerUri: string, runOptions?: sqlops.ExecutionPlanOptions): void {
|
||||||
let providerId: string = this._connectionService.getProviderIdFromUri(ownerUri);
|
let providerId: string = this._connectionService.getProviderIdFromUri(ownerUri);
|
||||||
let data: TelemetryUtils.IConnectionTelemetryData = {
|
let data: TelemetryUtils.IConnectionTelemetryData = {
|
||||||
provider: providerId,
|
provider: providerId,
|
||||||
@@ -169,13 +169,13 @@ export class QueryManagementService implements IQueryManagementService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public cancelQuery(ownerUri: string): Thenable<data.QueryCancelResult> {
|
public cancelQuery(ownerUri: string): Thenable<sqlops.QueryCancelResult> {
|
||||||
this.addTelemetry(TelemetryKeys.CancelQuery, ownerUri);
|
this.addTelemetry(TelemetryKeys.CancelQuery, ownerUri);
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.cancelQuery(ownerUri);
|
return runner.cancelQuery(ownerUri);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public runQuery(ownerUri: string, selection: data.ISelectionData, runOptions?: data.ExecutionPlanOptions): Thenable<void> {
|
public runQuery(ownerUri: string, selection: sqlops.ISelectionData, runOptions?: sqlops.ExecutionPlanOptions): Thenable<void> {
|
||||||
this.addTelemetry(TelemetryKeys.RunQuery, ownerUri, runOptions);
|
this.addTelemetry(TelemetryKeys.RunQuery, ownerUri, runOptions);
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.runQuery(ownerUri, selection, runOptions);
|
return runner.runQuery(ownerUri, selection, runOptions);
|
||||||
@@ -192,12 +192,12 @@ export class QueryManagementService implements IQueryManagementService {
|
|||||||
return runner.runQueryString(ownerUri, queryString);
|
return runner.runQueryString(ownerUri, queryString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public runQueryAndReturn(ownerUri: string, queryString: string): Thenable<data.SimpleExecuteResult> {
|
public runQueryAndReturn(ownerUri: string, queryString: string): Thenable<sqlops.SimpleExecuteResult> {
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.runQueryAndReturn(ownerUri, queryString);
|
return runner.runQueryAndReturn(ownerUri, queryString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public getQueryRows(rowData: data.QueryExecuteSubsetParams): Thenable<data.QueryExecuteSubsetResult> {
|
public getQueryRows(rowData: sqlops.QueryExecuteSubsetParams): Thenable<sqlops.QueryExecuteSubsetResult> {
|
||||||
return this._runAction(rowData.ownerUri, (runner) => {
|
return this._runAction(rowData.ownerUri, (runner) => {
|
||||||
return runner.getQueryRows(rowData);
|
return runner.getQueryRows(rowData);
|
||||||
});
|
});
|
||||||
@@ -208,36 +208,36 @@ export class QueryManagementService implements IQueryManagementService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public saveResults(requestParams: data.SaveResultsRequestParams): Thenable<data.SaveResultRequestResult> {
|
public saveResults(requestParams: sqlops.SaveResultsRequestParams): Thenable<sqlops.SaveResultRequestResult> {
|
||||||
return this._runAction(requestParams.ownerUri, (runner) => {
|
return this._runAction(requestParams.ownerUri, (runner) => {
|
||||||
return runner.saveResults(requestParams);
|
return runner.saveResults(requestParams);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onQueryComplete(result: data.QueryExecuteCompleteNotificationResult): void {
|
public onQueryComplete(result: sqlops.QueryExecuteCompleteNotificationResult): void {
|
||||||
this._notify(result.ownerUri, (runner: QueryRunner) => {
|
this._notify(result.ownerUri, (runner: QueryRunner) => {
|
||||||
runner.handleQueryComplete(result);
|
runner.handleQueryComplete(result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public onBatchStart(batchInfo: data.QueryExecuteBatchNotificationParams): void {
|
public onBatchStart(batchInfo: sqlops.QueryExecuteBatchNotificationParams): void {
|
||||||
this._notify(batchInfo.ownerUri, (runner: QueryRunner) => {
|
this._notify(batchInfo.ownerUri, (runner: QueryRunner) => {
|
||||||
runner.handleBatchStart(batchInfo);
|
runner.handleBatchStart(batchInfo);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onBatchComplete(batchInfo: data.QueryExecuteBatchNotificationParams): void {
|
public onBatchComplete(batchInfo: sqlops.QueryExecuteBatchNotificationParams): void {
|
||||||
this._notify(batchInfo.ownerUri, (runner: QueryRunner) => {
|
this._notify(batchInfo.ownerUri, (runner: QueryRunner) => {
|
||||||
runner.handleBatchComplete(batchInfo);
|
runner.handleBatchComplete(batchInfo);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onResultSetComplete(resultSetInfo: data.QueryExecuteResultSetCompleteNotificationParams): void {
|
public onResultSetComplete(resultSetInfo: sqlops.QueryExecuteResultSetCompleteNotificationParams): void {
|
||||||
this._notify(resultSetInfo.ownerUri, (runner: QueryRunner) => {
|
this._notify(resultSetInfo.ownerUri, (runner: QueryRunner) => {
|
||||||
runner.handleResultSetComplete(resultSetInfo);
|
runner.handleResultSetComplete(resultSetInfo);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public onMessage(message: data.QueryExecuteMessageParams): void {
|
public onMessage(message: sqlops.QueryExecuteMessageParams): void {
|
||||||
this._notify(message.ownerUri, (runner: QueryRunner) => {
|
this._notify(message.ownerUri, (runner: QueryRunner) => {
|
||||||
runner.handleMessage(message);
|
runner.handleMessage(message);
|
||||||
});
|
});
|
||||||
@@ -256,7 +256,7 @@ export class QueryManagementService implements IQueryManagementService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<data.EditUpdateCellResult> {
|
public updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<sqlops.EditUpdateCellResult> {
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.updateCell(ownerUri, rowId, columnId, newValue);
|
return runner.updateCell(ownerUri, rowId, columnId, newValue);
|
||||||
});
|
});
|
||||||
@@ -268,7 +268,7 @@ export class QueryManagementService implements IQueryManagementService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public createRow(ownerUri: string): Thenable<data.EditCreateRowResult> {
|
public createRow(ownerUri: string): Thenable<sqlops.EditCreateRowResult> {
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.createRow(ownerUri);
|
return runner.createRow(ownerUri);
|
||||||
});
|
});
|
||||||
@@ -286,7 +286,7 @@ export class QueryManagementService implements IQueryManagementService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<data.EditRevertCellResult> {
|
public revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<sqlops.EditRevertCellResult> {
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.revertCell(ownerUri, rowId, columnId);
|
return runner.revertCell(ownerUri, rowId, columnId);
|
||||||
});
|
});
|
||||||
@@ -298,7 +298,7 @@ export class QueryManagementService implements IQueryManagementService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public getEditRows(rowData: data.EditSubsetParams): Thenable<data.EditSubsetResult> {
|
public getEditRows(rowData: sqlops.EditSubsetParams): Thenable<sqlops.EditSubsetResult> {
|
||||||
return this._runAction(rowData.ownerUri, (runner) => {
|
return this._runAction(rowData.ownerUri, (runner) => {
|
||||||
return runner.getEditRows(rowData);
|
return runner.getEditRows(rowData);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as ConnectionConstants from 'sql/parts/connection/common/constants';
|
|||||||
import * as Constants from 'sql/parts/query/common/constants';
|
import * as Constants from 'sql/parts/query/common/constants';
|
||||||
import * as LocalizedConstants from 'sql/parts/query/common/localizedConstants';
|
import * as LocalizedConstants from 'sql/parts/query/common/localizedConstants';
|
||||||
import * as WorkbenchUtils from 'sql/workbench/common/sqlWorkbenchUtils';
|
import * as WorkbenchUtils from 'sql/workbench/common/sqlWorkbenchUtils';
|
||||||
import { SaveResultsRequestParams } from 'data';
|
import { SaveResultsRequestParams } from 'sqlops';
|
||||||
import { IQueryManagementService } from 'sql/parts/query/common/queryManagement';
|
import { IQueryManagementService } from 'sql/parts/query/common/queryManagement';
|
||||||
import { ISaveRequest, SaveFormat } from 'sql/parts/grid/common/interfaces';
|
import { ISaveRequest, SaveFormat } from 'sql/parts/grid/common/interfaces';
|
||||||
import * as PathUtilities from 'sql/common/pathUtilities';
|
import * as PathUtilities from 'sql/common/pathUtilities';
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c
|
|||||||
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||||
import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||||
import { Action } from 'vs/base/common/actions';
|
import { Action } from 'vs/base/common/actions';
|
||||||
import { ISelectionData } from 'data';
|
import { ISelectionData } from 'sqlops';
|
||||||
import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService';
|
import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService';
|
||||||
import { CodeEditor } from 'vs/editor/browser/codeEditor';
|
import { CodeEditor } from 'vs/editor/browser/codeEditor';
|
||||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||||
@@ -737,7 +737,7 @@ export class QueryEditor extends BaseEditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _doLayoutSql() {
|
private _doLayoutSql() {
|
||||||
if ( this._resultsEditorContainer) {
|
if (this._resultsEditorContainer) {
|
||||||
this._resultsEditorContainer.style.width = '0px';
|
this._resultsEditorContainer.style.width = '0px';
|
||||||
this._resultsEditorContainer.style.height = '0px';
|
this._resultsEditorContainer.style.height = '0px';
|
||||||
this._resultsEditorContainer.style.left = '0px';
|
this._resultsEditorContainer.style.left = '0px';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi
|
|||||||
import { TPromise } from 'vs/base/common/winjs.base';
|
import { TPromise } from 'vs/base/common/winjs.base';
|
||||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import { IQueryManagementService } from 'sql/parts/query/common/queryManagement';
|
import { IQueryManagementService } from 'sql/parts/query/common/queryManagement';
|
||||||
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
@@ -281,37 +281,37 @@ export class RunQueryShortcutAction extends Action {
|
|||||||
let dbName = this.getDatabaseName(editor);
|
let dbName = this.getDatabaseName(editor);
|
||||||
let query = `exec dbo.sp_sproc_columns @procedure_name = N'${escapeSqlString(shortcutText, singleQuote)}', @procedure_owner = null, @procedure_qualifier = N'${escapeSqlString(dbName, singleQuote)}'`;
|
let query = `exec dbo.sp_sproc_columns @procedure_name = N'${escapeSqlString(shortcutText, singleQuote)}', @procedure_owner = null, @procedure_qualifier = N'${escapeSqlString(dbName, singleQuote)}'`;
|
||||||
return this._queryManagementService.runQueryAndReturn(editor.uri, query)
|
return this._queryManagementService.runQueryAndReturn(editor.uri, query)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
switch(this.isProcWithSingleArgument(result)) {
|
switch (this.isProcWithSingleArgument(result)) {
|
||||||
case 1:
|
case 1:
|
||||||
// sproc was found and it meets criteria of having 1 string param
|
// sproc was found and it meets criteria of having 1 string param
|
||||||
// if selection is quoted, leave as-is. Else quote
|
// if selection is quoted, leave as-is. Else quote
|
||||||
let trimmedText = parameterText.trim();
|
let trimmedText = parameterText.trim();
|
||||||
if (trimmedText.length > 0) {
|
if (trimmedText.length > 0) {
|
||||||
if (trimmedText.charAt(0) !== singleQuote || trimmedText.charAt(trimmedText.length - 1) !== singleQuote) {
|
if (trimmedText.charAt(0) !== singleQuote || trimmedText.charAt(trimmedText.length - 1) !== singleQuote) {
|
||||||
// Note: SSMS uses the original text, but this causes issues if you have spaces. We intentionally use
|
// Note: SSMS uses the original text, but this causes issues if you have spaces. We intentionally use
|
||||||
// trimmed text since it's likely to be more accurate in this case. For non-quoted cases it shouldn't matter
|
// trimmed text since it's likely to be more accurate in this case. For non-quoted cases it shouldn't matter
|
||||||
return `'${trimmedText}'`;
|
return `'${trimmedText}'`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case -1:
|
||||||
case -1:
|
|
||||||
// sproc was found but didn't meet criteria, so append as-is
|
// sproc was found but didn't meet criteria, so append as-is
|
||||||
case 0:
|
case 0:
|
||||||
// sproc wasn't found, just append as-is and hope it works
|
// sproc wasn't found, just append as-is and hope it works
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return parameterText;
|
return parameterText;
|
||||||
}, err => {
|
}, err => {
|
||||||
return parameterText;
|
return parameterText;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return TPromise.as(parameterText);
|
return TPromise.as(parameterText);
|
||||||
}
|
}
|
||||||
return TPromise.as('');
|
return TPromise.as('');
|
||||||
}
|
}
|
||||||
|
|
||||||
private isProcWithSingleArgument(result: data.SimpleExecuteResult): number {
|
private isProcWithSingleArgument(result: sqlops.SimpleExecuteResult): number {
|
||||||
let columnTypeOrdinal = this.getColumnIndex(result.columnInfo, 'COLUMN_TYPE');
|
let columnTypeOrdinal = this.getColumnIndex(result.columnInfo, 'COLUMN_TYPE');
|
||||||
let dataTypeOrdinal = this.getColumnIndex(result.columnInfo, 'DATA_TYPE');
|
let dataTypeOrdinal = this.getColumnIndex(result.columnInfo, 'DATA_TYPE');
|
||||||
if (columnTypeOrdinal && dataTypeOrdinal) {
|
if (columnTypeOrdinal && dataTypeOrdinal) {
|
||||||
@@ -345,7 +345,7 @@ export class RunQueryShortcutAction extends Action {
|
|||||||
return -1; // Couldn't process so return default value
|
return -1; // Couldn't process so return default value
|
||||||
}
|
}
|
||||||
|
|
||||||
private getColumnIndex(columnInfo: data.IDbColumn[], columnName: string): number {
|
private getColumnIndex(columnInfo: sqlops.IDbColumn[], columnName: string): number {
|
||||||
return columnInfo ? columnInfo.findIndex(c => c.columnName === columnName) : undefined;
|
return columnInfo ? columnInfo.findIndex(c => c.columnName === columnName) : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
|
|||||||
import { IMessageService, Severity } from 'vs/platform/message/common/message';
|
import { IMessageService, Severity } from 'vs/platform/message/common/message';
|
||||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||||
|
|
||||||
import { ISelectionData } from 'data';
|
import { ISelectionData } from 'sqlops';
|
||||||
import {
|
import {
|
||||||
IConnectionManagementService,
|
IConnectionManagementService,
|
||||||
IConnectionParams,
|
IConnectionParams,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import {
|
|||||||
EditCreateRowResult,
|
EditCreateRowResult,
|
||||||
EditRevertCellResult,
|
EditRevertCellResult,
|
||||||
ExecutionPlanOptions
|
ExecutionPlanOptions
|
||||||
} from 'data';
|
} from 'sqlops';
|
||||||
|
|
||||||
export const SERVICE_ID = 'queryModelService';
|
export const SERVICE_ID = 'queryModelService';
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { QueryInput } from 'sql/parts/query/common/queryInput';
|
|||||||
import { QueryStatusbarItem } from 'sql/parts/query/execution/queryStatus';
|
import { QueryStatusbarItem } from 'sql/parts/query/execution/queryStatus';
|
||||||
import { SqlFlavorStatusbarItem } from 'sql/parts/query/common/flavorStatus';
|
import { SqlFlavorStatusbarItem } from 'sql/parts/query/common/flavorStatus';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { ISlickRange } from 'angular2-slickgrid';
|
import { ISlickRange } from 'angular2-slickgrid';
|
||||||
|
|
||||||
import * as nls from 'vs/nls';
|
import * as nls from 'vs/nls';
|
||||||
@@ -41,7 +41,7 @@ class QueryInfo {
|
|||||||
public queryRunner: QueryRunner;
|
public queryRunner: QueryRunner;
|
||||||
public dataService: DataService;
|
public dataService: DataService;
|
||||||
public queryEventQueue: QueryEvent[];
|
public queryEventQueue: QueryEvent[];
|
||||||
public selection: Array<data.ISelectionData>;
|
public selection: Array<sqlops.ISelectionData>;
|
||||||
public queryInput: QueryInput;
|
public queryInput: QueryInput;
|
||||||
public selectionSnippet: string;
|
public selectionSnippet: string;
|
||||||
|
|
||||||
@@ -66,12 +66,12 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
private _queryInfoMap: Map<string, QueryInfo>;
|
private _queryInfoMap: Map<string, QueryInfo>;
|
||||||
private _onRunQueryStart: Emitter<string>;
|
private _onRunQueryStart: Emitter<string>;
|
||||||
private _onRunQueryComplete: Emitter<string>;
|
private _onRunQueryComplete: Emitter<string>;
|
||||||
private _onEditSessionReady: Emitter<data.EditSessionReadyParams>;
|
private _onEditSessionReady: Emitter<sqlops.EditSessionReadyParams>;
|
||||||
|
|
||||||
// EVENTS /////////////////////////////////////////////////////////////
|
// EVENTS /////////////////////////////////////////////////////////////
|
||||||
public get onRunQueryStart(): Event<string> { return this._onRunQueryStart.event; }
|
public get onRunQueryStart(): Event<string> { return this._onRunQueryStart.event; }
|
||||||
public get onRunQueryComplete(): Event<string> { return this._onRunQueryComplete.event; }
|
public get onRunQueryComplete(): Event<string> { return this._onRunQueryComplete.event; }
|
||||||
public get onEditSessionReady(): Event<data.EditSessionReadyParams> { return this._onEditSessionReady.event; }
|
public get onEditSessionReady(): Event<sqlops.EditSessionReadyParams> { return this._onEditSessionReady.event; }
|
||||||
|
|
||||||
// CONSTRUCTOR /////////////////////////////////////////////////////////
|
// CONSTRUCTOR /////////////////////////////////////////////////////////
|
||||||
constructor(
|
constructor(
|
||||||
@@ -81,7 +81,7 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
this._queryInfoMap = new Map<string, QueryInfo>();
|
this._queryInfoMap = new Map<string, QueryInfo>();
|
||||||
this._onRunQueryStart = new Emitter<string>();
|
this._onRunQueryStart = new Emitter<string>();
|
||||||
this._onRunQueryComplete = new Emitter<string>();
|
this._onRunQueryComplete = new Emitter<string>();
|
||||||
this._onEditSessionReady = new Emitter<data.EditSessionReadyParams>();
|
this._onEditSessionReady = new Emitter<sqlops.EditSessionReadyParams>();
|
||||||
|
|
||||||
// Register Statusbar items
|
// Register Statusbar items
|
||||||
(<statusbar.IStatusbarRegistry>platform.Registry.as(statusbar.Extensions.Statusbar)).registerStatusbarItem(new statusbar.StatusbarItemDescriptor(
|
(<statusbar.IStatusbarRegistry>platform.Registry.as(statusbar.Extensions.Statusbar)).registerStatusbarItem(new statusbar.StatusbarItemDescriptor(
|
||||||
@@ -141,13 +141,13 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
/**
|
/**
|
||||||
* Get more data rows from the current resultSets from the service layer
|
* Get more data rows from the current resultSets from the service layer
|
||||||
*/
|
*/
|
||||||
public getQueryRows(uri: string, rowStart: number, numberOfRows: number, batchId: number, resultId: number): Thenable<data.ResultSetSubset> {
|
public getQueryRows(uri: string, rowStart: number, numberOfRows: number, batchId: number, resultId: number): Thenable<sqlops.ResultSetSubset> {
|
||||||
return this._getQueryInfo(uri).queryRunner.getQueryRows(rowStart, numberOfRows, batchId, resultId).then(results => {
|
return this._getQueryInfo(uri).queryRunner.getQueryRows(rowStart, numberOfRows, batchId, resultId).then(results => {
|
||||||
return results.resultSubset;
|
return results.resultSubset;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public getEditRows(uri: string, rowStart: number, numberOfRows: number): Thenable<data.EditSubsetResult> {
|
public getEditRows(uri: string, rowStart: number, numberOfRows: number): Thenable<sqlops.EditSubsetResult> {
|
||||||
return this._queryInfoMap.get(uri).queryRunner.getEditRows(rowStart, numberOfRows).then(results => {
|
return this._queryInfoMap.get(uri).queryRunner.getEditRows(rowStart, numberOfRows).then(results => {
|
||||||
return results;
|
return results;
|
||||||
});
|
});
|
||||||
@@ -191,15 +191,15 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
/**
|
/**
|
||||||
* Run a query for the given URI with the given text selection
|
* Run a query for the given URI with the given text selection
|
||||||
*/
|
*/
|
||||||
public runQuery(uri: string, selection: data.ISelectionData,
|
public runQuery(uri: string, selection: sqlops.ISelectionData,
|
||||||
title: string, queryInput: QueryInput, runOptions?: data.ExecutionPlanOptions): void {
|
title: string, queryInput: QueryInput, runOptions?: sqlops.ExecutionPlanOptions): void {
|
||||||
this.doRunQuery(uri, selection, title, queryInput, false, runOptions);
|
this.doRunQuery(uri, selection, title, queryInput, false, runOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the current SQL statement for the given URI
|
* Run the current SQL statement for the given URI
|
||||||
*/
|
*/
|
||||||
public runQueryStatement(uri: string, selection: data.ISelectionData,
|
public runQueryStatement(uri: string, selection: sqlops.ISelectionData,
|
||||||
title: string, queryInput: QueryInput): void {
|
title: string, queryInput: QueryInput): void {
|
||||||
this.doRunQuery(uri, selection, title, queryInput, true);
|
this.doRunQuery(uri, selection, title, queryInput, true);
|
||||||
}
|
}
|
||||||
@@ -215,9 +215,9 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
/**
|
/**
|
||||||
* Run Query implementation
|
* Run Query implementation
|
||||||
*/
|
*/
|
||||||
private doRunQuery(uri: string, selection: data.ISelectionData | string,
|
private doRunQuery(uri: string, selection: sqlops.ISelectionData | string,
|
||||||
title: string, queryInput: QueryInput,
|
title: string, queryInput: QueryInput,
|
||||||
runCurrentStatement: boolean, runOptions?: data.ExecutionPlanOptions): void {
|
runCurrentStatement: boolean, runOptions?: sqlops.ExecutionPlanOptions): void {
|
||||||
// Reuse existing query runner if it exists
|
// Reuse existing query runner if it exists
|
||||||
let queryRunner: QueryRunner;
|
let queryRunner: QueryRunner;
|
||||||
let info: QueryInfo;
|
let info: QueryInfo;
|
||||||
@@ -422,7 +422,7 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
return TPromise.as(null);
|
return TPromise.as(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<data.EditUpdateCellResult> {
|
public updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<sqlops.EditUpdateCellResult> {
|
||||||
// Get existing query runner
|
// Get existing query runner
|
||||||
let queryRunner = this._getQueryRunner(ownerUri);
|
let queryRunner = this._getQueryRunner(ownerUri);
|
||||||
if (queryRunner) {
|
if (queryRunner) {
|
||||||
@@ -446,7 +446,7 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
return TPromise.as(null);
|
return TPromise.as(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public createRow(ownerUri: string): Thenable<data.EditCreateRowResult> {
|
public createRow(ownerUri: string): Thenable<sqlops.EditCreateRowResult> {
|
||||||
// Get existing query runner
|
// Get existing query runner
|
||||||
let queryRunner = this._getQueryRunner(ownerUri);
|
let queryRunner = this._getQueryRunner(ownerUri);
|
||||||
if (queryRunner) {
|
if (queryRunner) {
|
||||||
@@ -464,7 +464,7 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
return TPromise.as(null);
|
return TPromise.as(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<data.EditRevertCellResult> {
|
public revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<sqlops.EditRevertCellResult> {
|
||||||
// Get existing query runner
|
// Get existing query runner
|
||||||
let queryRunner = this._getQueryRunner(ownerUri);
|
let queryRunner = this._getQueryRunner(ownerUri);
|
||||||
if (queryRunner) {
|
if (queryRunner) {
|
||||||
@@ -539,9 +539,9 @@ export class QueryModelService implements IQueryModelService {
|
|||||||
|
|
||||||
// TODO remove this funciton and its usages when #821 in vscode-mssql is fixed and
|
// TODO remove this funciton and its usages when #821 in vscode-mssql is fixed and
|
||||||
// the SqlToolsService version is updated in this repo - coquagli 4/19/2017
|
// the SqlToolsService version is updated in this repo - coquagli 4/19/2017
|
||||||
private _validateSelection(selection: data.ISelectionData): data.ISelectionData {
|
private _validateSelection(selection: sqlops.ISelectionData): sqlops.ISelectionData {
|
||||||
if (!selection) {
|
if (!selection) {
|
||||||
selection = <data.ISelectionData>{};
|
selection = <sqlops.ISelectionData>{};
|
||||||
}
|
}
|
||||||
selection.endColumn = selection ? Math.max(0, selection.endColumn) : 0;
|
selection.endColumn = selection ? Math.max(0, selection.endColumn) : 0;
|
||||||
selection.endLine = selection ? Math.max(0, selection.endLine) : 0;
|
selection.endLine = selection ? Math.max(0, selection.endLine) : 0;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import * as Constants from 'sql/parts/query/common/constants';
|
import * as Constants from 'sql/parts/query/common/constants';
|
||||||
import * as WorkbenchUtils from 'sql/workbench/common/sqlWorkbenchUtils';
|
import * as WorkbenchUtils from 'sql/workbench/common/sqlWorkbenchUtils';
|
||||||
@@ -41,10 +41,10 @@ export const enum EventType {
|
|||||||
export interface IEventType {
|
export interface IEventType {
|
||||||
start: void;
|
start: void;
|
||||||
complete: string;
|
complete: string;
|
||||||
message: data.IResultMessage;
|
message: sqlops.IResultMessage;
|
||||||
batchStart: data.BatchSummary;
|
batchStart: sqlops.BatchSummary;
|
||||||
batchComplete: data.BatchSummary;
|
batchComplete: sqlops.BatchSummary;
|
||||||
resultSet: data.ResultSetSummary;
|
resultSet: sqlops.ResultSetSummary;
|
||||||
editSessionReady: IEditSessionReadyEvent;
|
editSessionReady: IEditSessionReadyEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ export default class QueryRunner {
|
|||||||
private _totalElapsedMilliseconds: number = 0;
|
private _totalElapsedMilliseconds: number = 0;
|
||||||
private _isExecuting: boolean = false;
|
private _isExecuting: boolean = false;
|
||||||
private _hasCompleted: boolean = false;
|
private _hasCompleted: boolean = false;
|
||||||
private _batchSets: data.BatchSummary[] = [];
|
private _batchSets: sqlops.BatchSummary[] = [];
|
||||||
private _eventEmitter = new EventEmitter();
|
private _eventEmitter = new EventEmitter();
|
||||||
|
|
||||||
// CONSTRUCTOR /////////////////////////////////////////////////////////
|
// CONSTRUCTOR /////////////////////////////////////////////////////////
|
||||||
@@ -79,7 +79,7 @@ export default class QueryRunner {
|
|||||||
return this._hasCompleted;
|
return this._hasCompleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
get batchSets(): data.BatchSummary[] {
|
get batchSets(): sqlops.BatchSummary[] {
|
||||||
return this._batchSets;
|
return this._batchSets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ export default class QueryRunner {
|
|||||||
/**
|
/**
|
||||||
* Cancels the running query, if there is one
|
* Cancels the running query, if there is one
|
||||||
*/
|
*/
|
||||||
public cancelQuery(): Thenable<data.QueryCancelResult> {
|
public cancelQuery(): Thenable<sqlops.QueryCancelResult> {
|
||||||
return this._queryManagementService.cancelQuery(this.uri);
|
return this._queryManagementService.cancelQuery(this.uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,13 +100,13 @@ export default class QueryRunner {
|
|||||||
* Runs the query with the provided query
|
* Runs the query with the provided query
|
||||||
* @param input Query string to execute
|
* @param input Query string to execute
|
||||||
*/
|
*/
|
||||||
public runQuery(input: string, runOptions?: data.ExecutionPlanOptions): Thenable<void>;
|
public runQuery(input: string, runOptions?: sqlops.ExecutionPlanOptions): Thenable<void>;
|
||||||
/**
|
/**
|
||||||
* Runs the query by pulling the query from the document using the provided selection data
|
* Runs the query by pulling the query from the document using the provided selection data
|
||||||
* @param input selection data
|
* @param input selection data
|
||||||
*/
|
*/
|
||||||
public runQuery(input: data.ISelectionData, runOptions?: data.ExecutionPlanOptions): Thenable<void>;
|
public runQuery(input: sqlops.ISelectionData, runOptions?: sqlops.ExecutionPlanOptions): Thenable<void>;
|
||||||
public runQuery(input, runOptions?: data.ExecutionPlanOptions): Thenable<void> {
|
public runQuery(input, runOptions?: sqlops.ExecutionPlanOptions): Thenable<void> {
|
||||||
return this.doRunQuery(input, false, runOptions);
|
return this.doRunQuery(input, false, runOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ export default class QueryRunner {
|
|||||||
* Runs the current SQL statement by pulling the query from the document using the provided selection data
|
* Runs the current SQL statement by pulling the query from the document using the provided selection data
|
||||||
* @param input selection data
|
* @param input selection data
|
||||||
*/
|
*/
|
||||||
public runQueryStatement(input: data.ISelectionData): Thenable<void> {
|
public runQueryStatement(input: sqlops.ISelectionData): Thenable<void> {
|
||||||
return this.doRunQuery(input, true);
|
return this.doRunQuery(input, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,9 +122,9 @@ export default class QueryRunner {
|
|||||||
* Implementation that runs the query with the provided query
|
* Implementation that runs the query with the provided query
|
||||||
* @param input Query string to execute
|
* @param input Query string to execute
|
||||||
*/
|
*/
|
||||||
private doRunQuery(input: string, runCurrentStatement: boolean, runOptions?: data.ExecutionPlanOptions): Thenable<void>;
|
private doRunQuery(input: string, runCurrentStatement: boolean, runOptions?: sqlops.ExecutionPlanOptions): Thenable<void>;
|
||||||
private doRunQuery(input: data.ISelectionData, runCurrentStatement: boolean, runOptions?: data.ExecutionPlanOptions): Thenable<void>;
|
private doRunQuery(input: sqlops.ISelectionData, runCurrentStatement: boolean, runOptions?: sqlops.ExecutionPlanOptions): Thenable<void>;
|
||||||
private doRunQuery(input, runCurrentStatement: boolean, runOptions?: data.ExecutionPlanOptions): Thenable<void> {
|
private doRunQuery(input, runCurrentStatement: boolean, runOptions?: sqlops.ExecutionPlanOptions): Thenable<void> {
|
||||||
let ownerUri = this.uri;
|
let ownerUri = this.uri;
|
||||||
this._batchSets = [];
|
this._batchSets = [];
|
||||||
this._hasCompleted = false;
|
this._hasCompleted = false;
|
||||||
@@ -160,20 +160,20 @@ export default class QueryRunner {
|
|||||||
// Attempting to launch the query failed, show the error message
|
// Attempting to launch the query failed, show the error message
|
||||||
const eol = this.getEolString();
|
const eol = this.getEolString();
|
||||||
let message = nls.localize('query.ExecutionFailedError', 'Execution failed due to an unexpected error: {0}\t{1}', eol, error);
|
let message = nls.localize('query.ExecutionFailedError', 'Execution failed due to an unexpected error: {0}\t{1}', eol, error);
|
||||||
this.handleMessage(<data.QueryExecuteMessageParams> {
|
this.handleMessage(<sqlops.QueryExecuteMessageParams>{
|
||||||
ownerUri: this.uri,
|
ownerUri: this.uri,
|
||||||
message: {
|
message: {
|
||||||
isError: true,
|
isError: true,
|
||||||
message: message
|
message: message
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.handleQueryComplete(<data.QueryExecuteCompleteNotificationResult> { ownerUri: this.uri });
|
this.handleQueryComplete(<sqlops.QueryExecuteCompleteNotificationResult>{ ownerUri: this.uri });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle a QueryComplete from the service layer
|
* Handle a QueryComplete from the service layer
|
||||||
*/
|
*/
|
||||||
public handleQueryComplete(result: data.QueryExecuteCompleteNotificationResult): void {
|
public handleQueryComplete(result: sqlops.QueryExecuteCompleteNotificationResult): void {
|
||||||
|
|
||||||
// Store the batch sets we got back as a source of "truth"
|
// Store the batch sets we got back as a source of "truth"
|
||||||
this._isExecuting = false;
|
this._isExecuting = false;
|
||||||
@@ -194,7 +194,7 @@ export default class QueryRunner {
|
|||||||
/**
|
/**
|
||||||
* Handle a BatchStart from the service layer
|
* Handle a BatchStart from the service layer
|
||||||
*/
|
*/
|
||||||
public handleBatchStart(result: data.QueryExecuteBatchNotificationParams): void {
|
public handleBatchStart(result: sqlops.QueryExecuteBatchNotificationParams): void {
|
||||||
let batch = result.batchSummary;
|
let batch = result.batchSummary;
|
||||||
|
|
||||||
// Recalculate the start and end lines, relative to the result line offset
|
// Recalculate the start and end lines, relative to the result line offset
|
||||||
@@ -214,8 +214,8 @@ export default class QueryRunner {
|
|||||||
/**
|
/**
|
||||||
* Handle a BatchComplete from the service layer
|
* Handle a BatchComplete from the service layer
|
||||||
*/
|
*/
|
||||||
public handleBatchComplete(result: data.QueryExecuteBatchNotificationParams): void {
|
public handleBatchComplete(result: sqlops.QueryExecuteBatchNotificationParams): void {
|
||||||
let batch: data.BatchSummary = result.batchSummary;
|
let batch: sqlops.BatchSummary = result.batchSummary;
|
||||||
|
|
||||||
// Store the batch again to get the rest of the data
|
// Store the batch again to get the rest of the data
|
||||||
this.batchSets[batch.id] = batch;
|
this.batchSets[batch.id] = batch;
|
||||||
@@ -231,17 +231,17 @@ export default class QueryRunner {
|
|||||||
/**
|
/**
|
||||||
* Handle a ResultSetComplete from the service layer
|
* Handle a ResultSetComplete from the service layer
|
||||||
*/
|
*/
|
||||||
public handleResultSetComplete(result: data.QueryExecuteResultSetCompleteNotificationParams): void {
|
public handleResultSetComplete(result: sqlops.QueryExecuteResultSetCompleteNotificationParams): void {
|
||||||
if (result && result.resultSetSummary) {
|
if (result && result.resultSetSummary) {
|
||||||
let resultSet = result.resultSetSummary;
|
let resultSet = result.resultSetSummary;
|
||||||
let batchSet: data.BatchSummary;
|
let batchSet: sqlops.BatchSummary;
|
||||||
if (!resultSet.batchId) {
|
if (!resultSet.batchId) {
|
||||||
// Missing the batchId. In this case, default to always using the first batch in the list
|
// Missing the batchId. In this case, default to always using the first batch in the list
|
||||||
// or create one in the case the DMP extension didn't obey the contract perfectly
|
// or create one in the case the DMP extension didn't obey the contract perfectly
|
||||||
if (this.batchSets.length > 0) {
|
if (this.batchSets.length > 0) {
|
||||||
batchSet = this.batchSets[0];
|
batchSet = this.batchSets[0];
|
||||||
} else {
|
} else {
|
||||||
batchSet = <data.BatchSummary>{
|
batchSet = <sqlops.BatchSummary>{
|
||||||
id: 0,
|
id: 0,
|
||||||
selection: undefined,
|
selection: undefined,
|
||||||
hasError: false,
|
hasError: false,
|
||||||
@@ -263,7 +263,7 @@ export default class QueryRunner {
|
|||||||
/**
|
/**
|
||||||
* Handle a Mssage from the service layer
|
* Handle a Mssage from the service layer
|
||||||
*/
|
*/
|
||||||
public handleMessage(obj: data.QueryExecuteMessageParams): void {
|
public handleMessage(obj: sqlops.QueryExecuteMessageParams): void {
|
||||||
let message = obj.message;
|
let message = obj.message;
|
||||||
message.time = new Date(message.time).toLocaleTimeString();
|
message.time = new Date(message.time).toLocaleTimeString();
|
||||||
|
|
||||||
@@ -274,9 +274,9 @@ export default class QueryRunner {
|
|||||||
/**
|
/**
|
||||||
* Get more data rows from the current resultSets from the service layer
|
* Get more data rows from the current resultSets from the service layer
|
||||||
*/
|
*/
|
||||||
public getQueryRows(rowStart: number, numberOfRows: number, batchIndex: number, resultSetIndex: number): Thenable<data.QueryExecuteSubsetResult> {
|
public getQueryRows(rowStart: number, numberOfRows: number, batchIndex: number, resultSetIndex: number): Thenable<sqlops.QueryExecuteSubsetResult> {
|
||||||
const self = this;
|
const self = this;
|
||||||
let rowData: data.QueryExecuteSubsetParams = <data.QueryExecuteSubsetParams>{
|
let rowData: sqlops.QueryExecuteSubsetParams = <sqlops.QueryExecuteSubsetParams>{
|
||||||
ownerUri: this.uri,
|
ownerUri: this.uri,
|
||||||
resultSetIndex: resultSetIndex,
|
resultSetIndex: resultSetIndex,
|
||||||
rowsCount: numberOfRows,
|
rowsCount: numberOfRows,
|
||||||
@@ -284,7 +284,7 @@ export default class QueryRunner {
|
|||||||
batchIndex: batchIndex
|
batchIndex: batchIndex
|
||||||
};
|
};
|
||||||
|
|
||||||
return new Promise<data.QueryExecuteSubsetResult>((resolve, reject) => {
|
return new Promise<sqlops.QueryExecuteSubsetResult>((resolve, reject) => {
|
||||||
self._queryManagementService.getQueryRows(rowData).then(result => {
|
self._queryManagementService.getQueryRows(rowData).then(result => {
|
||||||
resolve(result);
|
resolve(result);
|
||||||
}, error => {
|
}, error => {
|
||||||
@@ -322,15 +322,15 @@ export default class QueryRunner {
|
|||||||
* @param rowStart The index of the row to start returning (inclusive)
|
* @param rowStart The index of the row to start returning (inclusive)
|
||||||
* @param numberOfRows The number of rows to return
|
* @param numberOfRows The number of rows to return
|
||||||
*/
|
*/
|
||||||
public getEditRows(rowStart: number, numberOfRows: number): Thenable<data.EditSubsetResult> {
|
public getEditRows(rowStart: number, numberOfRows: number): Thenable<sqlops.EditSubsetResult> {
|
||||||
const self = this;
|
const self = this;
|
||||||
let rowData: data.EditSubsetParams = {
|
let rowData: sqlops.EditSubsetParams = {
|
||||||
ownerUri: this.uri,
|
ownerUri: this.uri,
|
||||||
rowCount: numberOfRows,
|
rowCount: numberOfRows,
|
||||||
rowStartIndex: rowStart
|
rowStartIndex: rowStart
|
||||||
};
|
};
|
||||||
|
|
||||||
return new Promise<data.EditSubsetResult>((resolve, reject) => {
|
return new Promise<sqlops.EditSubsetResult>((resolve, reject) => {
|
||||||
self._queryManagementService.getEditRows(rowData).then(result => {
|
self._queryManagementService.getEditRows(rowData).then(result => {
|
||||||
if (!result.hasOwnProperty('rowCount')) {
|
if (!result.hasOwnProperty('rowCount')) {
|
||||||
let error = `Nothing returned from subset query`;
|
let error = `Nothing returned from subset query`;
|
||||||
@@ -350,7 +350,7 @@ export default class QueryRunner {
|
|||||||
this._eventEmitter.emit(EventType.EDIT_SESSION_READY, { ownerUri, success, message });
|
this._eventEmitter.emit(EventType.EDIT_SESSION_READY, { ownerUri, success, message });
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<data.EditUpdateCellResult> {
|
public updateCell(ownerUri: string, rowId: number, columnId: number, newValue: string): Thenable<sqlops.EditUpdateCellResult> {
|
||||||
return this._queryManagementService.updateCell(ownerUri, rowId, columnId, newValue);
|
return this._queryManagementService.updateCell(ownerUri, rowId, columnId, newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +358,7 @@ export default class QueryRunner {
|
|||||||
return this._queryManagementService.commitEdit(ownerUri);
|
return this._queryManagementService.commitEdit(ownerUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
public createRow(ownerUri: string): Thenable<data.EditCreateRowResult> {
|
public createRow(ownerUri: string): Thenable<sqlops.EditCreateRowResult> {
|
||||||
return this._queryManagementService.createRow(ownerUri).then(result => {
|
return this._queryManagementService.createRow(ownerUri).then(result => {
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
@@ -368,7 +368,7 @@ export default class QueryRunner {
|
|||||||
return this._queryManagementService.deleteRow(ownerUri, rowId);
|
return this._queryManagementService.deleteRow(ownerUri, rowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<data.EditRevertCellResult> {
|
public revertCell(ownerUri: string, rowId: number, columnId: number): Thenable<sqlops.EditRevertCellResult> {
|
||||||
return this._queryManagementService.revertCell(ownerUri, rowId, columnId).then(result => {
|
return this._queryManagementService.revertCell(ownerUri, rowId, columnId).then(result => {
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
@@ -468,7 +468,7 @@ export default class QueryRunner {
|
|||||||
|
|
||||||
private getColumnHeaders(batchId: number, resultId: number, range: ISlickRange): string[] {
|
private getColumnHeaders(batchId: number, resultId: number, range: ISlickRange): string[] {
|
||||||
let headers: string[] = undefined;
|
let headers: string[] = undefined;
|
||||||
let batchSummary: data.BatchSummary = this.batchSets[batchId];
|
let batchSummary: sqlops.BatchSummary = this.batchSets[batchId];
|
||||||
if (batchSummary !== undefined) {
|
if (batchSummary !== undefined) {
|
||||||
let resultSetSummary = batchSummary.resultSetSummaries[resultId];
|
let resultSetSummary = batchSummary.resultSetSummaries[resultId];
|
||||||
headers = resultSetSummary.columnInfo.slice(range.fromCell, range.toCell + 1).map((info, i) => {
|
headers = resultSetSummary.columnInfo.slice(range.fromCell, range.toCell + 1).map((info, i) => {
|
||||||
@@ -495,7 +495,7 @@ export default class QueryRunner {
|
|||||||
// get config copyRemoveNewLine option from vscode config
|
// get config copyRemoveNewLine option from vscode config
|
||||||
let showBatchTime: boolean = WorkbenchUtils.getSqlConfigValue<boolean>(this._workspaceConfigurationService, Constants.configShowBatchTime);
|
let showBatchTime: boolean = WorkbenchUtils.getSqlConfigValue<boolean>(this._workspaceConfigurationService, Constants.configShowBatchTime);
|
||||||
if (showBatchTime) {
|
if (showBatchTime) {
|
||||||
let message: data.IResultMessage = {
|
let message: sqlops.IResultMessage = {
|
||||||
batchId: batchId,
|
batchId: batchId,
|
||||||
message: nls.localize('elapsedBatchTime', 'Batch execution time: {0}', executionTime),
|
message: nls.localize('elapsedBatchTime', 'Batch execution time: {0}', executionTime),
|
||||||
time: undefined,
|
time: undefined,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
|
|||||||
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
|
||||||
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
|
||||||
import Event, { Emitter } from 'vs/base/common/event';
|
import Event, { Emitter } from 'vs/base/common/event';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as nls from 'vs/nls';
|
import * as nls from 'vs/nls';
|
||||||
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
import * as TelemetryKeys from 'sql/common/telemetryKeys';
|
||||||
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
||||||
@@ -27,26 +27,26 @@ export const IObjectExplorerService = createDecorator<IObjectExplorerService>(SE
|
|||||||
export interface IObjectExplorerService {
|
export interface IObjectExplorerService {
|
||||||
_serviceBrand: any;
|
_serviceBrand: any;
|
||||||
|
|
||||||
createNewSession(providerId: string, connection: ConnectionProfile): Thenable<data.ObjectExplorerSessionResponse>;
|
createNewSession(providerId: string, connection: ConnectionProfile): Thenable<sqlops.ObjectExplorerSessionResponse>;
|
||||||
|
|
||||||
closeSession(providerId: string, session: data.ObjectExplorerSession): Thenable<data.ObjectExplorerCloseSessionResponse>;
|
closeSession(providerId: string, session: sqlops.ObjectExplorerSession): Thenable<sqlops.ObjectExplorerCloseSessionResponse>;
|
||||||
|
|
||||||
expandNode(providerId: string, session: data.ObjectExplorerSession, nodePath: string): Thenable<data.ObjectExplorerExpandInfo>;
|
expandNode(providerId: string, session: sqlops.ObjectExplorerSession, nodePath: string): Thenable<sqlops.ObjectExplorerExpandInfo>;
|
||||||
|
|
||||||
refreshNode(providerId: string, session: data.ObjectExplorerSession, nodePath: string): Thenable<data.ObjectExplorerExpandInfo>;
|
refreshNode(providerId: string, session: sqlops.ObjectExplorerSession, nodePath: string): Thenable<sqlops.ObjectExplorerExpandInfo>;
|
||||||
|
|
||||||
expandTreeNode(session: data.ObjectExplorerSession, parentTree: TreeNode): Thenable<TreeNode[]>;
|
expandTreeNode(session: sqlops.ObjectExplorerSession, parentTree: TreeNode): Thenable<TreeNode[]>;
|
||||||
|
|
||||||
refreshTreeNode(session: data.ObjectExplorerSession, parentTree: TreeNode): Thenable<TreeNode[]>;
|
refreshTreeNode(session: sqlops.ObjectExplorerSession, parentTree: TreeNode): Thenable<TreeNode[]>;
|
||||||
|
|
||||||
onSessionCreated(handle: number, sessionResponse: data.ObjectExplorerSession);
|
onSessionCreated(handle: number, sessionResponse: sqlops.ObjectExplorerSession);
|
||||||
|
|
||||||
onNodeExpanded(handle: number, sessionResponse: data.ObjectExplorerExpandInfo);
|
onNodeExpanded(handle: number, sessionResponse: sqlops.ObjectExplorerExpandInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a ObjectExplorer provider
|
* Register a ObjectExplorer provider
|
||||||
*/
|
*/
|
||||||
registerProvider(providerId: string, provider: data.ObjectExplorerProvider): void;
|
registerProvider(providerId: string, provider: sqlops.ObjectExplorerProvider): void;
|
||||||
|
|
||||||
getObjectExplorerNode(connection: IConnectionProfile): TreeNode;
|
getObjectExplorerNode(connection: IConnectionProfile): TreeNode;
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ interface SessionStatus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface NodeStatus {
|
interface NodeStatus {
|
||||||
expandHandler: (result: data.ObjectExplorerExpandInfo) => void;
|
expandHandler: (result: sqlops.ObjectExplorerExpandInfo) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ObjectExplorerNodeEventArgs {
|
export interface ObjectExplorerNodeEventArgs {
|
||||||
@@ -89,7 +89,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
|
|
||||||
private _disposables: IDisposable[] = [];
|
private _disposables: IDisposable[] = [];
|
||||||
|
|
||||||
private _providers: { [handle: string]: data.ObjectExplorerProvider; } = Object.create(null);
|
private _providers: { [handle: string]: sqlops.ObjectExplorerProvider; } = Object.create(null);
|
||||||
|
|
||||||
private _activeObjectExplorerNodes: { [id: string]: TreeNode };
|
private _activeObjectExplorerNodes: { [id: string]: TreeNode };
|
||||||
private _sessions: { [sessionId: string]: SessionStatus };
|
private _sessions: { [sessionId: string]: SessionStatus };
|
||||||
@@ -145,7 +145,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
/**
|
/**
|
||||||
* Gets called when expanded node response is ready
|
* Gets called when expanded node response is ready
|
||||||
*/
|
*/
|
||||||
public onNodeExpanded(handle: number, expandResponse: data.ObjectExplorerExpandInfo) {
|
public onNodeExpanded(handle: number, expandResponse: sqlops.ObjectExplorerExpandInfo) {
|
||||||
|
|
||||||
if (expandResponse.errorMessage) {
|
if (expandResponse.errorMessage) {
|
||||||
error(expandResponse.errorMessage);
|
error(expandResponse.errorMessage);
|
||||||
@@ -162,7 +162,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
/**
|
/**
|
||||||
* Gets called when session is created
|
* Gets called when session is created
|
||||||
*/
|
*/
|
||||||
public onSessionCreated(handle: number, session: data.ObjectExplorerSession) {
|
public onSessionCreated(handle: number, session: sqlops.ObjectExplorerSession) {
|
||||||
let connection: ConnectionProfile = undefined;
|
let connection: ConnectionProfile = undefined;
|
||||||
let errorMessage: string = undefined;
|
let errorMessage: string = undefined;
|
||||||
if (this._sessions[session.sessionId]) {
|
if (this._sessions[session.sessionId]) {
|
||||||
@@ -216,9 +216,9 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
return this._activeObjectExplorerNodes[connection.id];
|
return this._activeObjectExplorerNodes[connection.id];
|
||||||
}
|
}
|
||||||
|
|
||||||
public createNewSession(providerId: string, connection: ConnectionProfile): Thenable<data.ObjectExplorerSessionResponse> {
|
public createNewSession(providerId: string, connection: ConnectionProfile): Thenable<sqlops.ObjectExplorerSessionResponse> {
|
||||||
let self = this;
|
let self = this;
|
||||||
return new Promise<data.ObjectExplorerSessionResponse>((resolve, reject) => {
|
return new Promise<sqlops.ObjectExplorerSessionResponse>((resolve, reject) => {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
if (provider) {
|
if (provider) {
|
||||||
provider.createNewSession(connection.toConnectionInfo()).then(result => {
|
provider.createNewSession(connection.toConnectionInfo()).then(result => {
|
||||||
@@ -236,8 +236,8 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public expandNode(providerId: string, session: data.ObjectExplorerSession, nodePath: string): Thenable<data.ObjectExplorerExpandInfo> {
|
public expandNode(providerId: string, session: sqlops.ObjectExplorerSession, nodePath: string): Thenable<sqlops.ObjectExplorerExpandInfo> {
|
||||||
return new Promise<data.ObjectExplorerExpandInfo>((resolve, reject) => {
|
return new Promise<sqlops.ObjectExplorerExpandInfo>((resolve, reject) => {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
if (provider) {
|
if (provider) {
|
||||||
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.ObjectExplorerExpand, { refresh: 0, provider: providerId });
|
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.ObjectExplorerExpand, { refresh: 0, provider: providerId });
|
||||||
@@ -251,7 +251,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
private callExpandOrRefreshFromProvider(provider: data.ObjectExplorerProvider, nodeInfo: data.ExpandNodeInfo, refresh: boolean = false) {
|
private callExpandOrRefreshFromProvider(provider: sqlops.ObjectExplorerProvider, nodeInfo: sqlops.ExpandNodeInfo, refresh: boolean = false) {
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
return provider.refreshNode(nodeInfo);
|
return provider.refreshNode(nodeInfo);
|
||||||
} else {
|
} else {
|
||||||
@@ -260,12 +260,12 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private expandOrRefreshNode(
|
private expandOrRefreshNode(
|
||||||
provider: data.ObjectExplorerProvider,
|
provider: sqlops.ObjectExplorerProvider,
|
||||||
session: data.ObjectExplorerSession,
|
session: sqlops.ObjectExplorerSession,
|
||||||
nodePath: string,
|
nodePath: string,
|
||||||
refresh: boolean = false): Thenable<data.ObjectExplorerExpandInfo> {
|
refresh: boolean = false): Thenable<sqlops.ObjectExplorerExpandInfo> {
|
||||||
let self = this;
|
let self = this;
|
||||||
return new Promise<data.ObjectExplorerExpandInfo>((resolve, reject) => {
|
return new Promise<sqlops.ObjectExplorerExpandInfo>((resolve, reject) => {
|
||||||
if (session.sessionId in self._sessions && self._sessions[session.sessionId]) {
|
if (session.sessionId in self._sessions && self._sessions[session.sessionId]) {
|
||||||
self._sessions[session.sessionId].nodes[nodePath] = {
|
self._sessions[session.sessionId].nodes[nodePath] = {
|
||||||
expandHandler: ((expandResult) => {
|
expandHandler: ((expandResult) => {
|
||||||
@@ -291,7 +291,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public refreshNode(providerId: string, session: data.ObjectExplorerSession, nodePath: string): Thenable<data.ObjectExplorerExpandInfo> {
|
public refreshNode(providerId: string, session: sqlops.ObjectExplorerSession, nodePath: string): Thenable<sqlops.ObjectExplorerExpandInfo> {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
if (provider) {
|
if (provider) {
|
||||||
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.ObjectExplorerExpand, { refresh: 1, provider: providerId });
|
TelemetryUtils.addTelemetry(this._telemetryService, TelemetryKeys.ObjectExplorerExpand, { refresh: 1, provider: providerId });
|
||||||
@@ -300,7 +300,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
return Promise.resolve(undefined);
|
return Promise.resolve(undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeSession(providerId: string, session: data.ObjectExplorerSession): Thenable<data.ObjectExplorerCloseSessionResponse> {
|
public closeSession(providerId: string, session: sqlops.ObjectExplorerSession): Thenable<sqlops.ObjectExplorerCloseSessionResponse> {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
if (provider) {
|
if (provider) {
|
||||||
return provider.closeSession({
|
return provider.closeSession({
|
||||||
@@ -314,7 +314,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
/**
|
/**
|
||||||
* Register a ObjectExplorer provider
|
* Register a ObjectExplorer provider
|
||||||
*/
|
*/
|
||||||
public registerProvider(providerId: string, provider: data.ObjectExplorerProvider): void {
|
public registerProvider(providerId: string, provider: sqlops.ObjectExplorerProvider): void {
|
||||||
this._providers[providerId] = provider;
|
this._providers[providerId] = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,15 +322,15 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
this._disposables = dispose(this._disposables);
|
this._disposables = dispose(this._disposables);
|
||||||
}
|
}
|
||||||
|
|
||||||
public expandTreeNode(session: data.ObjectExplorerSession, parentTree: TreeNode): Thenable<TreeNode[]> {
|
public expandTreeNode(session: sqlops.ObjectExplorerSession, parentTree: TreeNode): Thenable<TreeNode[]> {
|
||||||
return this.expandOrRefreshTreeNode(session, parentTree);
|
return this.expandOrRefreshTreeNode(session, parentTree);
|
||||||
}
|
}
|
||||||
|
|
||||||
public refreshTreeNode(session: data.ObjectExplorerSession, parentTree: TreeNode): Thenable<TreeNode[]> {
|
public refreshTreeNode(session: sqlops.ObjectExplorerSession, parentTree: TreeNode): Thenable<TreeNode[]> {
|
||||||
return this.expandOrRefreshTreeNode(session, parentTree, true);
|
return this.expandOrRefreshTreeNode(session, parentTree, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private callExpandOrRefreshFromService(providerId: string, session: data.ObjectExplorerSession, nodePath: string, refresh: boolean = false): Thenable<data.ObjectExplorerExpandInfo> {
|
private callExpandOrRefreshFromService(providerId: string, session: sqlops.ObjectExplorerSession, nodePath: string, refresh: boolean = false): Thenable<sqlops.ObjectExplorerExpandInfo> {
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
return this.refreshNode(providerId, session, nodePath);
|
return this.refreshNode(providerId, session, nodePath);
|
||||||
} else {
|
} else {
|
||||||
@@ -339,7 +339,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private expandOrRefreshTreeNode(
|
private expandOrRefreshTreeNode(
|
||||||
session: data.ObjectExplorerSession,
|
session: sqlops.ObjectExplorerSession,
|
||||||
parentTree: TreeNode,
|
parentTree: TreeNode,
|
||||||
refresh: boolean = false): Thenable<TreeNode[]> {
|
refresh: boolean = false): Thenable<TreeNode[]> {
|
||||||
return new Promise<TreeNode[]>((resolve, reject) => {
|
return new Promise<TreeNode[]>((resolve, reject) => {
|
||||||
@@ -360,7 +360,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private toTreeNode(nodeInfo: data.NodeInfo, parent: TreeNode): TreeNode {
|
private toTreeNode(nodeInfo: sqlops.NodeInfo, parent: TreeNode): TreeNode {
|
||||||
// Show the status for database nodes with a status field
|
// Show the status for database nodes with a status field
|
||||||
let isLeaf: boolean = nodeInfo.isLeaf;
|
let isLeaf: boolean = nodeInfo.isLeaf;
|
||||||
if (nodeInfo.nodeType === NodeType.Database) {
|
if (nodeInfo.nodeType === NodeType.Database) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
|
||||||
import { NodeType } from 'sql/parts/registeredServer/common/nodeType';
|
import { NodeType } from 'sql/parts/registeredServer/common/nodeType';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
|
|
||||||
import * as UUID from 'vs/base/common/uuid';
|
import * as UUID from 'vs/base/common/uuid';
|
||||||
|
|
||||||
@@ -66,9 +66,9 @@ export class TreeNode {
|
|||||||
|
|
||||||
public connection: ConnectionProfile;
|
public connection: ConnectionProfile;
|
||||||
|
|
||||||
public session: data.ObjectExplorerSession;
|
public session: sqlops.ObjectExplorerSession;
|
||||||
|
|
||||||
public metadata: data.ObjectMetadata;
|
public metadata: sqlops.ObjectMetadata;
|
||||||
|
|
||||||
public getConnectionProfile(): ConnectionProfile {
|
public getConnectionProfile(): ConnectionProfile {
|
||||||
var currentNode: TreeNode = this;
|
var currentNode: TreeNode = this;
|
||||||
@@ -93,7 +93,7 @@ export class TreeNode {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getSession(): data.ObjectExplorerSession {
|
public getSession(): sqlops.ObjectExplorerSession {
|
||||||
var currentNode: TreeNode = this;
|
var currentNode: TreeNode = this;
|
||||||
while (!currentNode.session && currentNode.parent) {
|
while (!currentNode.session && currentNode.parent) {
|
||||||
currentNode = currentNode.parent;
|
currentNode = currentNode.parent;
|
||||||
@@ -109,7 +109,7 @@ export class TreeNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(nodeTypeId: string, label: string, isAlwaysLeaf: boolean, nodePath: string,
|
constructor(nodeTypeId: string, label: string, isAlwaysLeaf: boolean, nodePath: string,
|
||||||
nodeSubType: string, nodeStatus: string, parent: TreeNode, metadata: data.ObjectMetadata) {
|
nodeSubType: string, nodeStatus: string, parent: TreeNode, metadata: sqlops.ObjectMetadata) {
|
||||||
this.nodeTypeId = nodeTypeId;
|
this.nodeTypeId = nodeTypeId;
|
||||||
this.label = label;
|
this.label = label;
|
||||||
this.isAlwaysLeaf = isAlwaysLeaf;
|
this.isAlwaysLeaf = isAlwaysLeaf;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import { TaskNode, TaskStatus, TaskExecutionMode } from 'sql/parts/taskHistory/common/taskNode';
|
import { TaskNode, TaskStatus, TaskExecutionMode } from 'sql/parts/taskHistory/common/taskNode';
|
||||||
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
import { IQueryEditorService } from 'sql/parts/query/common/queryEditorService';
|
||||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||||
@@ -26,18 +26,18 @@ export interface ITaskService {
|
|||||||
handleTaskComplete(eventArgs: TaskStatusChangeArgs): void;
|
handleTaskComplete(eventArgs: TaskStatusChangeArgs): void;
|
||||||
getAllTasks(): TaskNode;
|
getAllTasks(): TaskNode;
|
||||||
getNumberOfInProgressTasks(): number;
|
getNumberOfInProgressTasks(): number;
|
||||||
onNewTaskCreated(handle: number, taskInfo: data.TaskInfo);
|
onNewTaskCreated(handle: number, taskInfo: sqlops.TaskInfo);
|
||||||
onTaskStatusChanged(handle: number, taskProgressInfo: data.TaskProgressInfo);
|
onTaskStatusChanged(handle: number, taskProgressInfo: sqlops.TaskProgressInfo);
|
||||||
cancelTask(providerId: string, taskId: string): Thenable<boolean>;
|
cancelTask(providerId: string, taskId: string): Thenable<boolean>;
|
||||||
/**
|
/**
|
||||||
* Register a ObjectExplorer provider
|
* Register a ObjectExplorer provider
|
||||||
*/
|
*/
|
||||||
registerProvider(providerId: string, provider: data.TaskServicesProvider): void;
|
registerProvider(providerId: string, provider: sqlops.TaskServicesProvider): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TaskStatusChangeArgs {
|
export interface TaskStatusChangeArgs {
|
||||||
taskId: string;
|
taskId: string;
|
||||||
status: data.TaskStatus;
|
status: sqlops.TaskStatus;
|
||||||
message?: string;
|
message?: string;
|
||||||
script?: string;
|
script?: string;
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ export class TaskService implements ITaskService {
|
|||||||
private _taskQueue: TaskNode;
|
private _taskQueue: TaskNode;
|
||||||
private _onTaskComplete = new Emitter<TaskNode>();
|
private _onTaskComplete = new Emitter<TaskNode>();
|
||||||
private _onAddNewTask = new Emitter<TaskNode>();
|
private _onAddNewTask = new Emitter<TaskNode>();
|
||||||
private _providers: { [handle: string]: data.TaskServicesProvider; } = Object.create(null);
|
private _providers: { [handle: string]: sqlops.TaskServicesProvider; } = Object.create(null);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@ILifecycleService lifecycleService: ILifecycleService,
|
@ILifecycleService lifecycleService: ILifecycleService,
|
||||||
@@ -65,17 +65,17 @@ export class TaskService implements ITaskService {
|
|||||||
/**
|
/**
|
||||||
* Register a ObjectExplorer provider
|
* Register a ObjectExplorer provider
|
||||||
*/
|
*/
|
||||||
public registerProvider(providerId: string, provider: data.TaskServicesProvider): void {
|
public registerProvider(providerId: string, provider: sqlops.TaskServicesProvider): void {
|
||||||
this._providers[providerId] = provider;
|
this._providers[providerId] = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public onNewTaskCreated(handle: number, taskInfo: data.TaskInfo) {
|
public onNewTaskCreated(handle: number, taskInfo: sqlops.TaskInfo) {
|
||||||
let node: TaskNode = new TaskNode(taskInfo.name, taskInfo.serverName, taskInfo.databaseName, taskInfo.taskId, taskInfo.taskExecutionMode, taskInfo.isCancelable);
|
let node: TaskNode = new TaskNode(taskInfo.name, taskInfo.serverName, taskInfo.databaseName, taskInfo.taskId, taskInfo.taskExecutionMode, taskInfo.isCancelable);
|
||||||
node.providerName = taskInfo.providerName;
|
node.providerName = taskInfo.providerName;
|
||||||
this.handleNewTask(node);
|
this.handleNewTask(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public onTaskStatusChanged(handle: number, taskProgressInfo: data.TaskProgressInfo) {
|
public onTaskStatusChanged(handle: number, taskProgressInfo: sqlops.TaskProgressInfo) {
|
||||||
this.handleTaskComplete({
|
this.handleTaskComplete({
|
||||||
taskId: taskProgressInfo.taskId,
|
taskId: taskProgressInfo.taskId,
|
||||||
status: taskProgressInfo.status,
|
status: taskProgressInfo.status,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as data from 'data';
|
import * as sqlops from 'sqlops';
|
||||||
import * as nls from 'vs/nls';
|
import * as nls from 'vs/nls';
|
||||||
import * as platform from 'vs/platform/registry/common/platform';
|
import * as platform from 'vs/platform/registry/common/platform';
|
||||||
import * as statusbar from 'vs/workbench/browser/parts/statusbar/statusbar';
|
import * as statusbar from 'vs/workbench/browser/parts/statusbar/statusbar';
|
||||||
@@ -39,8 +39,8 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
private _addAccountProviderEmitter: Emitter<AccountProviderAddedEventParams>;
|
private _addAccountProviderEmitter: Emitter<AccountProviderAddedEventParams>;
|
||||||
public get addAccountProviderEvent(): Event<AccountProviderAddedEventParams> { return this._addAccountProviderEmitter.event; }
|
public get addAccountProviderEvent(): Event<AccountProviderAddedEventParams> { return this._addAccountProviderEmitter.event; }
|
||||||
|
|
||||||
private _removeAccountProviderEmitter: Emitter<data.AccountProviderMetadata>;
|
private _removeAccountProviderEmitter: Emitter<sqlops.AccountProviderMetadata>;
|
||||||
public get removeAccountProviderEvent(): Event<data.AccountProviderMetadata> { return this._removeAccountProviderEmitter.event; }
|
public get removeAccountProviderEvent(): Event<sqlops.AccountProviderMetadata> { return this._removeAccountProviderEmitter.event; }
|
||||||
|
|
||||||
private _updateAccountListEmitter: Emitter<UpdateAccountListEventParams>;
|
private _updateAccountListEmitter: Emitter<UpdateAccountListEventParams>;
|
||||||
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return this._updateAccountListEmitter.event; }
|
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return this._updateAccountListEmitter.event; }
|
||||||
@@ -61,7 +61,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
|
|
||||||
// Setup the event emitters
|
// Setup the event emitters
|
||||||
this._addAccountProviderEmitter = new Emitter<AccountProviderAddedEventParams>();
|
this._addAccountProviderEmitter = new Emitter<AccountProviderAddedEventParams>();
|
||||||
this._removeAccountProviderEmitter = new Emitter<data.AccountProviderMetadata>();
|
this._removeAccountProviderEmitter = new Emitter<sqlops.AccountProviderMetadata>();
|
||||||
this._updateAccountListEmitter = new Emitter<UpdateAccountListEventParams>();
|
this._updateAccountListEmitter = new Emitter<UpdateAccountListEventParams>();
|
||||||
|
|
||||||
// Register status bar item
|
// Register status bar item
|
||||||
@@ -87,7 +87,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
* account's properties have been updated (usually when the account goes stale).
|
* account's properties have been updated (usually when the account goes stale).
|
||||||
* @param {Account} updatedAccount Account with the updated properties
|
* @param {Account} updatedAccount Account with the updated properties
|
||||||
*/
|
*/
|
||||||
public accountUpdated(updatedAccount: data.Account): Thenable<void> {
|
public accountUpdated(updatedAccount: sqlops.Account): Thenable<void> {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
// 1) Update the account in the store
|
// 1) Update the account in the store
|
||||||
@@ -155,7 +155,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
* @param {Account} account account to refresh
|
* @param {Account} account account to refresh
|
||||||
* @return {Thenable<Account>} Promise to return an account
|
* @return {Thenable<Account>} Promise to return an account
|
||||||
*/
|
*/
|
||||||
public refreshAccount(account: data.Account): Thenable<data.Account> {
|
public refreshAccount(account: sqlops.Account): Thenable<sqlops.Account> {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
return this.doWithProvider(account.key.providerId, (provider) => {
|
return this.doWithProvider(account.key.providerId, (provider) => {
|
||||||
@@ -186,7 +186,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
* Retrieves metadata of all providers that have been registered
|
* Retrieves metadata of all providers that have been registered
|
||||||
* @returns {Thenable<AccountProviderMetadata[]>} Registered account providers
|
* @returns {Thenable<AccountProviderMetadata[]>} Registered account providers
|
||||||
*/
|
*/
|
||||||
public getAccountProviderMetadata(): Thenable<data.AccountProviderMetadata[]> {
|
public getAccountProviderMetadata(): Thenable<sqlops.AccountProviderMetadata[]> {
|
||||||
return Promise.resolve(Object.values(this._providers).map(provider => provider.metadata));
|
return Promise.resolve(Object.values(this._providers).map(provider => provider.metadata));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
* @param {string} providerId ID of the provider the returned accounts belong to
|
* @param {string} providerId ID of the provider the returned accounts belong to
|
||||||
* @returns {Thenable<Account[]>} Promise to return a list of accounts
|
* @returns {Thenable<Account[]>} Promise to return a list of accounts
|
||||||
*/
|
*/
|
||||||
public getAccountsForProvider(providerId: string): Thenable<data.Account[]> {
|
public getAccountsForProvider(providerId: string): Thenable<sqlops.Account[]> {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
// Make sure the provider exists before attempting to retrieve accounts
|
// Make sure the provider exists before attempting to retrieve accounts
|
||||||
@@ -219,7 +219,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
* @param {Account} account Account to generate security token for
|
* @param {Account} account Account to generate security token for
|
||||||
* @return {Thenable<{}>} Promise to return the security token
|
* @return {Thenable<{}>} Promise to return the security token
|
||||||
*/
|
*/
|
||||||
public getSecurityToken(account: data.Account): Thenable<{}> {
|
public getSecurityToken(account: sqlops.Account): Thenable<{}> {
|
||||||
return this.doWithProvider(account.key.providerId, provider => {
|
return this.doWithProvider(account.key.providerId, provider => {
|
||||||
return provider.provider.getSecurityToken(account);
|
return provider.provider.getSecurityToken(account);
|
||||||
});
|
});
|
||||||
@@ -231,7 +231,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
* @returns {Thenable<void>} Promise with result of account removal, true if account was
|
* @returns {Thenable<void>} Promise with result of account removal, true if account was
|
||||||
* removed, false otherwise.
|
* removed, false otherwise.
|
||||||
*/
|
*/
|
||||||
public removeAccount(accountKey: data.AccountKey): Thenable<boolean> {
|
public removeAccount(accountKey: sqlops.AccountKey): Thenable<boolean> {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
// Step 1) Remove the account
|
// Step 1) Remove the account
|
||||||
@@ -309,8 +309,8 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
public cancelAutoOAuthDeviceCode(providerId: string): void {
|
public cancelAutoOAuthDeviceCode(providerId: string): void {
|
||||||
this.doWithProvider(providerId, provider => provider.provider.autoOAuthCancelled())
|
this.doWithProvider(providerId, provider => provider.provider.autoOAuthCancelled())
|
||||||
.then( // Swallow errors
|
.then( // Swallow errors
|
||||||
null,
|
null,
|
||||||
err => { console.warn(`Error when cancelling auto OAuth: ${err}`); }
|
err => { console.warn(`Error when cancelling auto OAuth: ${err}`); }
|
||||||
)
|
)
|
||||||
.then(() => this.autoOAuthDialogController.closeAutoOAuthDialog());
|
.then(() => this.autoOAuthDialogController.closeAutoOAuthDialog());
|
||||||
}
|
}
|
||||||
@@ -326,10 +326,10 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
// SERVICE MANAGEMENT METHODS //////////////////////////////////////////
|
// SERVICE MANAGEMENT METHODS //////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
* Called by main thread to register an account provider from extension
|
* Called by main thread to register an account provider from extension
|
||||||
* @param {data.AccountProviderMetadata} providerMetadata Metadata of the provider that is being registered
|
* @param {sqlops.AccountProviderMetadata} providerMetadata Metadata of the provider that is being registered
|
||||||
* @param {data.AccountProvider} provider References to the methods of the provider
|
* @param {sqlops.AccountProvider} provider References to the methods of the provider
|
||||||
*/
|
*/
|
||||||
public registerProvider(providerMetadata: data.AccountProviderMetadata, provider: data.AccountProvider): Thenable<void> {
|
public registerProvider(providerMetadata: sqlops.AccountProviderMetadata, provider: sqlops.AccountProvider): Thenable<void> {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
// Store the account provider
|
// Store the account provider
|
||||||
@@ -346,10 +346,10 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
// 4) Write the accounts back to the store
|
// 4) Write the accounts back to the store
|
||||||
// 5) Fire the event to let folks know we have another account provider now
|
// 5) Fire the event to let folks know we have another account provider now
|
||||||
return this._accountStore.getAccountsByProvider(providerMetadata.id)
|
return this._accountStore.getAccountsByProvider(providerMetadata.id)
|
||||||
.then((accounts: data.Account[]) => {
|
.then((accounts: sqlops.Account[]) => {
|
||||||
return provider.initialize(accounts);
|
return provider.initialize(accounts);
|
||||||
})
|
})
|
||||||
.then((accounts: data.Account[]) => {
|
.then((accounts: sqlops.Account[]) => {
|
||||||
self._providers[providerMetadata.id].accounts = accounts;
|
self._providers[providerMetadata.id].accounts = accounts;
|
||||||
let writePromises = accounts.map(account => {
|
let writePromises = accounts.map(account => {
|
||||||
return self._accountStore.addOrUpdate(account);
|
return self._accountStore.addOrUpdate(account);
|
||||||
@@ -376,7 +376,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public unregisterProvider(providerMetadata: data.AccountProviderMetadata): void {
|
public unregisterProvider(providerMetadata: sqlops.AccountProviderMetadata): void {
|
||||||
// Delete this account provider
|
// Delete this account provider
|
||||||
delete this._providers[providerMetadata.id];
|
delete this._providers[providerMetadata.id];
|
||||||
|
|
||||||
@@ -400,7 +400,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
private fireAccountListUpdate(provider: AccountProviderWithMetadata, sort: boolean) {
|
private fireAccountListUpdate(provider: AccountProviderWithMetadata, sort: boolean) {
|
||||||
// Step 1) Get and sort the list
|
// Step 1) Get and sort the list
|
||||||
if (sort) {
|
if (sort) {
|
||||||
provider.accounts.sort((a: data.Account, b: data.Account) => {
|
provider.accounts.sort((a: sqlops.Account, b: sqlops.Account) => {
|
||||||
if (a.displayInfo.displayName < b.displayInfo.displayName) {
|
if (a.displayInfo.displayName < b.displayInfo.displayName) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -419,7 +419,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
this._updateAccountListEmitter.fire(eventArg);
|
this._updateAccountListEmitter.fire(eventArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
private spliceModifiedAccount(provider: AccountProviderWithMetadata, modifiedAccount: data.Account) {
|
private spliceModifiedAccount(provider: AccountProviderWithMetadata, modifiedAccount: sqlops.Account) {
|
||||||
// Find the updated account and splice the updated one in
|
// Find the updated account and splice the updated one in
|
||||||
let indexToRemove: number = provider.accounts.findIndex(account => {
|
let indexToRemove: number = provider.accounts.findIndex(account => {
|
||||||
return account.key.accountId === modifiedAccount.key.accountId;
|
return account.key.accountId === modifiedAccount.key.accountId;
|
||||||
@@ -434,7 +434,7 @@ export class AccountManagementService implements IAccountManagementService {
|
|||||||
* Joins together an account provider, its metadata, and its accounts, used in the provider list
|
* Joins together an account provider, its metadata, and its accounts, used in the provider list
|
||||||
*/
|
*/
|
||||||
export interface AccountProviderWithMetadata {
|
export interface AccountProviderWithMetadata {
|
||||||
metadata: data.AccountProviderMetadata;
|
metadata: sqlops.AccountProviderMetadata;
|
||||||
provider: data.AccountProvider;
|
provider: sqlops.AccountProvider;
|
||||||
accounts: data.Account[];
|
accounts: sqlops.Account[];
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user