mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-21 11:01:38 -05:00
Compare commits
368 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96e2145931 | ||
|
|
5845135366 | ||
|
|
4b05fa9075 | ||
|
|
bd1f133ca5 | ||
|
|
944a8f9c72 | ||
|
|
441b57f3ca | ||
|
|
803b02be81 | ||
|
|
d76bba1458 | ||
|
|
9b40838ea3 | ||
|
|
6c98603979 | ||
|
|
0e2d1e515e | ||
|
|
bfb03d160e | ||
|
|
ff21a93e00 | ||
|
|
763080aea0 | ||
|
|
fb713e0762 | ||
|
|
a8d41a6717 | ||
|
|
34bc0efc1c | ||
|
|
23e4a30cd1 | ||
|
|
ba58b0f429 | ||
|
|
89e6e062ab | ||
|
|
33ff8ec5a3 | ||
|
|
9f4053d051 | ||
|
|
1bb9d142f1 | ||
|
|
b10bd70d67 | ||
|
|
dc2ff2295e | ||
|
|
f231d6945f | ||
|
|
8786caf630 | ||
|
|
5c520bc82e | ||
|
|
1ccf408654 | ||
|
|
76ebfe38a1 | ||
|
|
364206010b | ||
|
|
559c675164 | ||
|
|
1773dede25 | ||
|
|
fa52478ffa | ||
|
|
ae0603c041 | ||
|
|
a364af5c4c | ||
|
|
6b76611c93 | ||
|
|
d7df71c8ba | ||
|
|
ea464abaaf | ||
|
|
a026b682c4 | ||
|
|
8e3fa660fd | ||
|
|
c9257822ec | ||
|
|
783bb8bd92 | ||
|
|
bf19ab6ad9 | ||
|
|
c4e59027fc | ||
|
|
f9b7bc26c0 | ||
|
|
a197cd6158 | ||
|
|
ae5b506848 | ||
|
|
f8ab5fef78 | ||
|
|
0893ba33fc | ||
|
|
75ce8d6c20 | ||
|
|
6d56701b5b | ||
|
|
ea8aa92dd5 | ||
|
|
9fc634dfe0 | ||
|
|
4b1088edbc | ||
|
|
8e355a14e9 | ||
|
|
ef2b6f91f1 | ||
|
|
9cae7a0a49 | ||
|
|
9a55ca3021 | ||
|
|
e8b20c86c1 | ||
|
|
dc78a4af88 | ||
|
|
34273907f7 | ||
|
|
ca1c5899a1 | ||
|
|
0064f17ad4 | ||
|
|
f8ccafd2af | ||
|
|
d386311e54 | ||
|
|
0e2475aa72 | ||
|
|
b4cce9f147 | ||
|
|
3e8f25d864 | ||
|
|
4c68580e82 | ||
|
|
3bc82c10b1 | ||
|
|
c7d94055a4 | ||
|
|
34316b0ffd | ||
|
|
3d494dcd73 | ||
|
|
85b2c4de4a | ||
|
|
d0ce6bb066 | ||
|
|
38c6495fd8 | ||
|
|
bcc449b524 | ||
|
|
361ada4963 | ||
|
|
2e8d62d0ca | ||
|
|
fb97bf6041 | ||
|
|
6d9c95720d | ||
|
|
db5a0a892a | ||
|
|
7b01a6ca61 | ||
|
|
fbbf767700 | ||
|
|
776e2cf6e7 | ||
|
|
34ca0e8671 | ||
|
|
0d37047c37 | ||
|
|
25c8f60e6e | ||
|
|
aae1480e4f | ||
|
|
5e8a52bcc0 | ||
|
|
cf8f8907ee | ||
|
|
ca36f20c6b | ||
|
|
bdae02e51e | ||
|
|
2d7eb0dcb5 | ||
|
|
2e0756ad8d | ||
|
|
ef2bbce34b | ||
|
|
65e59dc57d | ||
|
|
2ca39b571a | ||
|
|
48a6157efb | ||
|
|
ab3a64604a | ||
|
|
e9ddf43c6c | ||
|
|
2549d91ddf | ||
|
|
81ae86ff79 | ||
|
|
7670104e4d | ||
|
|
3fc2ad5bc9 | ||
|
|
c84367e2ee | ||
|
|
77413ad25c | ||
|
|
c1f73255b5 | ||
|
|
fe7ec76cd5 | ||
|
|
0bc9849ad8 | ||
|
|
c9a4f8f664 | ||
|
|
1315b8e42a | ||
|
|
7a03da42ec | ||
|
|
8b9bb2a8fc | ||
|
|
162dfbaab0 | ||
|
|
71b6e35231 | ||
|
|
9268513128 | ||
|
|
5d44b6a6a7 | ||
|
|
586fe10525 | ||
|
|
a59d1d3c05 | ||
|
|
1fce604a11 | ||
|
|
8ea831c845 | ||
|
|
94061fa634 | ||
|
|
fe17955fa1 | ||
|
|
3158e9f63a | ||
|
|
fcb2b53bf8 | ||
|
|
5470702c16 | ||
|
|
8c05c6e122 | ||
|
|
cc397a012f | ||
|
|
e12827de3f | ||
|
|
02a646c7ea | ||
|
|
86986efb15 | ||
|
|
a718fb3cae | ||
|
|
48ba9ce175 | ||
|
|
be60ad6766 | ||
|
|
b1b58f2550 | ||
|
|
99d00e2057 | ||
|
|
7da0dddaa9 | ||
|
|
3ea45e4ef5 | ||
|
|
dbac187b44 | ||
|
|
43293b98c0 | ||
|
|
34eef8e97d | ||
|
|
5a48fd80cd | ||
|
|
5260afc15d | ||
|
|
66b4e08026 | ||
|
|
2b8e0cc6c4 | ||
|
|
a501214bfa | ||
|
|
2b9a8b9136 | ||
|
|
1cc3cb5408 | ||
|
|
7df793f208 | ||
|
|
ca2b7cc4bc | ||
|
|
9e0a74da3d | ||
|
|
da5076a4dc | ||
|
|
005808f003 | ||
|
|
1dd1919200 | ||
|
|
0a9db55dc4 | ||
|
|
4551ba5b7c | ||
|
|
0f25ad5676 | ||
|
|
c6564c0d84 | ||
|
|
a7e94d433f | ||
|
|
64480a35ac | ||
|
|
4f96d5caf2 | ||
|
|
7cca1b9f48 | ||
|
|
56ebbedbfd | ||
|
|
4e5b8ce875 | ||
|
|
5c5ee50983 | ||
|
|
0a67488447 | ||
|
|
022761aa4b | ||
|
|
b9d985b663 | ||
|
|
08ed9d285e | ||
|
|
ab0cd71d10 | ||
|
|
df7645e4e5 | ||
|
|
39f9c72390 | ||
|
|
0023714884 | ||
|
|
ec9fdc517f | ||
|
|
db387eb770 | ||
|
|
354ed22706 | ||
|
|
a69f194d8b | ||
|
|
f5d13319a2 | ||
|
|
9a0e691635 | ||
|
|
6c7cb185a1 | ||
|
|
ab22b93ce0 | ||
|
|
c7f5278430 | ||
|
|
56ad0dbaf2 | ||
|
|
74c92cd460 | ||
|
|
16ebb4322a | ||
|
|
fccd026812 | ||
|
|
b6e49f2bc0 | ||
|
|
188ccf849d | ||
|
|
1bfdce9642 | ||
|
|
495254b0be | ||
|
|
d209ff7b9a | ||
|
|
98eeb50060 | ||
|
|
8a68f0aaf9 | ||
|
|
039859213c | ||
|
|
a3c022aebf | ||
|
|
3a9b32b6e8 | ||
|
|
c1cb9000a9 | ||
|
|
104b99ffa0 | ||
|
|
a89d7f327a | ||
|
|
91bc4bde3c | ||
|
|
80da7ad496 | ||
|
|
64bf211a45 | ||
|
|
2558a66a48 | ||
|
|
df22eab4ec | ||
|
|
c2678cf818 | ||
|
|
f9af34b103 | ||
|
|
97cab22e00 | ||
|
|
64416e05c1 | ||
|
|
b21125ff2d | ||
|
|
e72d0d03ed | ||
|
|
0f12d15020 | ||
|
|
44a2d009c0 | ||
|
|
48682bacde | ||
|
|
f70369c2a6 | ||
|
|
f7fc94520a | ||
|
|
77c6f5c9a2 | ||
|
|
dffa47301b | ||
|
|
08f47e7e14 | ||
|
|
56342af140 | ||
|
|
aacc0eca67 | ||
|
|
02916aeffa | ||
|
|
e42bfada9d | ||
|
|
72fb114dec | ||
|
|
9ba1561386 | ||
|
|
39772c2dbe | ||
|
|
cbf3ca726f | ||
|
|
f1e21ebe9d | ||
|
|
49c36cc040 | ||
|
|
9b90400abd | ||
|
|
8cda364210 | ||
|
|
ca98ef879d | ||
|
|
bb9c85cd8f | ||
|
|
91b946bf3d | ||
|
|
64377000c6 | ||
|
|
23f4931a1d | ||
|
|
3625834028 | ||
|
|
705e7b30bc | ||
|
|
6528c0817d | ||
|
|
f3d7392af3 | ||
|
|
5d5f44ba11 | ||
|
|
34457880c7 | ||
|
|
d63f07d29a | ||
|
|
5c2cbc9d29 | ||
|
|
8dbfa10646 | ||
|
|
9e804089e0 | ||
|
|
51145903aa | ||
|
|
036c49f398 | ||
|
|
46b85ebc6b | ||
|
|
07bc5e2de9 | ||
|
|
e822091907 | ||
|
|
7d46e77922 | ||
|
|
ad528ad3d5 | ||
|
|
e8b4c03770 | ||
|
|
33aacc1798 | ||
|
|
58959ef35e | ||
|
|
c66b349cec | ||
|
|
5c90df092b | ||
|
|
32374f264f | ||
|
|
5e62229f25 | ||
|
|
1b24dff738 | ||
|
|
161135cd90 | ||
|
|
5fb583da06 | ||
|
|
8b40d20eab | ||
|
|
432034d2cb | ||
|
|
0e168e36fc | ||
|
|
f248260584 | ||
|
|
880e3e10da | ||
|
|
f33b95ee82 | ||
|
|
4a71eb9b90 | ||
|
|
3372a5ad4b | ||
|
|
8326f05f66 | ||
|
|
7ce921d449 | ||
|
|
31f7364f08 | ||
|
|
5119d28b9d | ||
|
|
a2a5fe3bee | ||
|
|
6222d8c977 | ||
|
|
d3699a261a | ||
|
|
9c0e56d640 | ||
|
|
ddd89fc52a | ||
|
|
b852f032d3 | ||
|
|
1fec26c6b3 | ||
|
|
d3483afaed | ||
|
|
910e4815fa | ||
|
|
ef118e3351 | ||
|
|
2beedb10d4 | ||
|
|
41bf10d989 | ||
|
|
ac3b6aef27 | ||
|
|
8956b591f7 | ||
|
|
2f8519cb6b | ||
|
|
15a19c044d | ||
|
|
ec47ff7479 | ||
|
|
82f707ee89 | ||
|
|
dfcab8db6a | ||
|
|
5c10127758 | ||
|
|
b376f36733 | ||
|
|
96c0f62cf5 | ||
|
|
a96f996b59 | ||
|
|
b75d0b6cb5 | ||
|
|
a5bc65fbfb | ||
|
|
dcdbc95ae7 | ||
|
|
72e7e5e025 | ||
|
|
57242a2e13 | ||
|
|
6dbf757385 | ||
|
|
c5a32d8373 | ||
|
|
34288435ec | ||
|
|
177b48c3f2 | ||
|
|
642f5d4405 | ||
|
|
92b1c59e48 | ||
|
|
cb1682542b | ||
|
|
9e56187c16 | ||
|
|
51851efda5 | ||
|
|
11e4b743e0 | ||
|
|
3349151d4c | ||
|
|
c8f6937166 | ||
|
|
ad36c1df3d | ||
|
|
a5b8924e2d | ||
|
|
bc898cc2c2 | ||
|
|
1247b6e8eb | ||
|
|
2111c3de1a | ||
|
|
bcea1b66be | ||
|
|
4f8d14ed3e | ||
|
|
442adfbbc3 | ||
|
|
fe12233954 | ||
|
|
c725f6f572 | ||
|
|
1870d83081 | ||
|
|
8315dacda4 | ||
|
|
18c54f41bd | ||
|
|
293f9c22c4 | ||
|
|
a74510544f | ||
|
|
9b053c50c2 | ||
|
|
88712f46bf | ||
|
|
d6df20b0e8 | ||
|
|
5dc37f7557 | ||
|
|
445d306586 | ||
|
|
d332ae1132 | ||
|
|
37f45b10a3 | ||
|
|
d9b6ec0654 | ||
|
|
f98428aea5 | ||
|
|
b3be1d79cd | ||
|
|
ea8f885f05 | ||
|
|
2de47c2a50 | ||
|
|
30b8e105f9 | ||
|
|
2a44fab8ba | ||
|
|
6a06a99e46 | ||
|
|
3670dfbebd | ||
|
|
daf929ecc7 | ||
|
|
f96a17c930 | ||
|
|
2fb06e7f4f | ||
|
|
4ece9b0085 | ||
|
|
a4bd31e96a | ||
|
|
8bdcc3267a | ||
|
|
9e9164c4ee | ||
|
|
5dc6a39652 | ||
|
|
ada0966832 | ||
|
|
e6faef27ab | ||
|
|
acc27d0829 | ||
|
|
ab54f7bb45 | ||
|
|
88161cc37d | ||
|
|
0975e6834e | ||
|
|
22ec1d5f0a | ||
|
|
01784dd186 | ||
|
|
02cf91c158 | ||
|
|
0532346f4f | ||
|
|
657adafb7d | ||
|
|
818c0789ea | ||
|
|
cb5bcf2248 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
.cache
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
node_modules/
|
node_modules/
|
||||||
@@ -14,7 +15,10 @@ out-editor-min/
|
|||||||
out-monaco-editor-core/
|
out-monaco-editor-core/
|
||||||
out-vscode/
|
out-vscode/
|
||||||
out-vscode-min/
|
out-vscode-min/
|
||||||
build/node_modules
|
out-vscode-reh/
|
||||||
|
out-vscode-reh-min/
|
||||||
|
out-vscode-reh-pkg/
|
||||||
|
**/node_modules
|
||||||
coverage/
|
coverage/
|
||||||
test_data/
|
test_data/
|
||||||
test-results/
|
test-results/
|
||||||
|
|||||||
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
@@ -70,10 +70,12 @@
|
|||||||
"timeout": 20000
|
"timeout": 20000
|
||||||
},
|
},
|
||||||
"osx": {
|
"osx": {
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
|
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh",
|
||||||
|
"timeout": 20000
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
|
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh",
|
||||||
|
"timeout": 20000
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null
|
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null
|
||||||
|
|||||||
14
.vscode/tasks.json
vendored
14
.vscode/tasks.json
vendored
@@ -28,6 +28,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "strict-initialization-watch",
|
||||||
|
"label": "TS - Strict Initialization",
|
||||||
|
"isBackground": true,
|
||||||
|
"presentation": {
|
||||||
|
"reveal": "never"
|
||||||
|
},
|
||||||
|
"problemMatcher": {
|
||||||
|
"base": "$tsc-watch",
|
||||||
|
"owner": "typescript-strict-initialization",
|
||||||
|
"applyTo": "allDocuments"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "gulp",
|
"type": "gulp",
|
||||||
"task": "tslint",
|
"task": "tslint",
|
||||||
|
|||||||
2
.yarnrc
2
.yarnrc
@@ -1,3 +1,3 @@
|
|||||||
disturl "https://atom.io/download/electron"
|
disturl "https://atom.io/download/electron"
|
||||||
target "3.1.6"
|
target "3.1.8"
|
||||||
runtime "electron"
|
runtime "electron"
|
||||||
|
|||||||
26
CHANGELOG.md
26
CHANGELOG.md
@@ -1,5 +1,31 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## Version 1.7.0
|
||||||
|
* Release date: May 8, 2019
|
||||||
|
* Release status: General Availability
|
||||||
|
|
||||||
|
## What's new in this version
|
||||||
|
* Announcing Schema Compare *Preview* extension
|
||||||
|
* Tasks Panel UX improvement
|
||||||
|
* Announcing new Welcome page
|
||||||
|
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/31?closed=1).
|
||||||
|
|
||||||
|
## Contributions and "thank you"
|
||||||
|
We would like to thank all our users who raised issues.
|
||||||
|
|
||||||
|
## Version 1.6.0
|
||||||
|
* Release date: April 18, 2019
|
||||||
|
* Release status: General Availability
|
||||||
|
|
||||||
|
## What's new in this version
|
||||||
|
* Align with latest VS Code editor platform (currently 1.33.1)
|
||||||
|
* Resolved [bugs and issues](https://github.com/Microsoft/azuredatastudio/milestone/26?closed=1).
|
||||||
|
|
||||||
|
## Contributions and "thank you"
|
||||||
|
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
||||||
|
|
||||||
|
* yamatoya for `fix the format (#4899)`
|
||||||
|
|
||||||
## Version 1.5.1
|
## Version 1.5.1
|
||||||
* Release date: March 18, 2019
|
* Release date: March 18, 2019
|
||||||
* Release status: General Availability
|
* Release status: General Availability
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -9,13 +9,13 @@ Azure Data Studio is a data management tool that enables you to work with SQL Se
|
|||||||
|
|
||||||
Platform | Link
|
Platform | Link
|
||||||
-- | --
|
-- | --
|
||||||
Windows User Installer | https://go.microsoft.com/fwlink/?linkid=2083322
|
Windows User Installer | https://go.microsoft.com/fwlink/?linkid=2091882
|
||||||
Windows System Installer | https://go.microsoft.com/fwlink/?linkid=2083323
|
Windows System Installer | https://go.microsoft.com/fwlink/?linkid=2091491
|
||||||
Windows ZIP | https://go.microsoft.com/fwlink/?linkid=2083324
|
Windows ZIP | https://go.microsoft.com/fwlink/?linkid=2091490
|
||||||
macOS ZIP | https://go.microsoft.com/fwlink/?linkid=2083325
|
macOS ZIP | https://go.microsoft.com/fwlink/?linkid=2091489
|
||||||
Linux TAR.GZ | https://go.microsoft.com/fwlink/?linkid=2083424
|
Linux TAR.GZ | https://go.microsoft.com/fwlink/?linkid=2091488
|
||||||
Linux RPM | https://go.microsoft.com/fwlink/?linkid=2083326
|
Linux RPM | https://go.microsoft.com/fwlink/?linkid=2091487
|
||||||
Linux DEB | https://go.microsoft.com/fwlink/?linkid=2083327
|
Linux DEB | https://go.microsoft.com/fwlink/?linkid=2092022
|
||||||
|
|
||||||
Go to our [download page](https://aka.ms/azuredatastudio) for more specific instructions.
|
Go to our [download page](https://aka.ms/azuredatastudio) for more specific instructions.
|
||||||
|
|
||||||
@@ -68,6 +68,7 @@ The [Microsoft Enterprise and Developer Privacy Statement](https://privacy.micro
|
|||||||
## Contributions and "Thank You"
|
## Contributions and "Thank You"
|
||||||
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
||||||
|
|
||||||
|
* yamatoya for `fix the format (#4899)`
|
||||||
* GeoffYoung for `Fix sqlDropColumn description #4422`
|
* GeoffYoung for `Fix sqlDropColumn description #4422`
|
||||||
* AlexFsmn for `Added context menu for DBs in explorer view to backup & restore db. #2277`
|
* AlexFsmn for `Added context menu for DBs in explorer view to backup & restore db. #2277`
|
||||||
* sadedil for `Missing feature request: Save as XML #3729`
|
* sadedil for `Missing feature request: Save as XML #3729`
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '8.x'
|
versionSpec: '10.15.1'
|
||||||
displayName: 'Install Node.js'
|
displayName: 'Install Node.js'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
git submodule update --init --recursive
|
|
||||||
nvm install 10.15.1
|
|
||||||
nvm use 10.15.1
|
|
||||||
npm i -g yarn
|
npm i -g yarn
|
||||||
displayName: 'preinstall'
|
displayName: 'preinstall'
|
||||||
|
|
||||||
@@ -24,21 +21,15 @@ steps:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
yarn
|
yarn
|
||||||
displayName: 'Install'
|
displayName: 'Install'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
node_modules/.bin/gulp electron
|
yarn gulp electron-x64
|
||||||
node_modules/.bin/gulp compile --max_old_space_size=4096
|
displayName: Download Electron
|
||||||
displayName: 'Scripts'
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
DISPLAY=:10 ./scripts/test.sh --reporter mocha-junit-reporter
|
yarn gulp hygiene
|
||||||
displayName: 'Tests'
|
displayName: Run Hygiene Checks
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: '**/test-results.xml'
|
|
||||||
condition: succeededOrFailed()
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
yarn tslint
|
yarn tslint
|
||||||
@@ -47,3 +38,29 @@ steps:
|
|||||||
- script: |
|
- script: |
|
||||||
yarn strict-null-check
|
yarn strict-null-check
|
||||||
displayName: 'Run Strict Null Check'
|
displayName: 'Run Strict Null Check'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn compile
|
||||||
|
displayName: 'Compile'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
DISPLAY=:10 ./scripts/test.sh --reporter mocha-junit-reporter
|
||||||
|
displayName: 'Tests'
|
||||||
|
condition: eq(variables['Agent.OS'], 'Linux')
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
DISPLAY=:10 ./scripts/test.sh --reporter mocha-junit-reporter --coverage
|
||||||
|
displayName: 'Tests'
|
||||||
|
condition: ne(variables['Agent.OS'], 'Linux')
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: '**/test-results.xml'
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
|
- task: PublishCodeCoverageResults@1
|
||||||
|
inputs:
|
||||||
|
codeCoverageTool: 'cobertura'
|
||||||
|
summaryFileLocation: $(System.DefaultWorkingDirectory)/.build/coverage/cobertura-coverage.xml
|
||||||
|
reportDirectory: $(System.DefaultWorkingDirectory)/.build/coverage/lcov-reports
|
||||||
|
condition: ne(variables['Agent.OS'], 'Linux')
|
||||||
|
|||||||
@@ -9,21 +9,12 @@ steps:
|
|||||||
displayName: 'Yarn Install'
|
displayName: 'Yarn Install'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
.\node_modules\.bin\gulp electron
|
yarn gulp electron-x64
|
||||||
displayName: 'Electron'
|
displayName: 'Electron'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
npm run compile
|
yarn gulp hygiene
|
||||||
displayName: 'Compile'
|
displayName: Run Hygiene Checks
|
||||||
|
|
||||||
- script: |
|
|
||||||
.\scripts\test.bat --reporter mocha-junit-reporter
|
|
||||||
displayName: 'Test'
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: 'test-results.xml'
|
|
||||||
condition: succeededOrFailed()
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
yarn tslint
|
yarn tslint
|
||||||
@@ -32,3 +23,22 @@ steps:
|
|||||||
- script: |
|
- script: |
|
||||||
yarn strict-null-check
|
yarn strict-null-check
|
||||||
displayName: 'Run Strict Null Check'
|
displayName: 'Run Strict Null Check'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn compile
|
||||||
|
displayName: 'Compile'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
.\scripts\test.bat --reporter mocha-junit-reporter --coverage
|
||||||
|
displayName: 'Test'
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: 'test-results.xml'
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
|
- task: PublishCodeCoverageResults@1
|
||||||
|
inputs:
|
||||||
|
codeCoverageTool: 'cobertura'
|
||||||
|
summaryFileLocation: $(System.DefaultWorkingDirectory)\.build\coverage\cobertura-coverage.xml
|
||||||
|
reportDirectory: $(System.DefaultWorkingDirectory)\.build\coverage\lcov-report
|
||||||
|
|||||||
126
build/.nativeignore
Normal file
126
build/.nativeignore
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
# cleanup rules for native node modules, .gitignore style
|
||||||
|
|
||||||
|
fsevents/binding.gyp
|
||||||
|
fsevents/fsevents.cc
|
||||||
|
fsevents/build/**
|
||||||
|
fsevents/src/**
|
||||||
|
fsevents/test/**
|
||||||
|
!fsevents/**/*.node
|
||||||
|
|
||||||
|
vscode-sqlite3/binding.gyp
|
||||||
|
vscode-sqlite3/benchmark/**
|
||||||
|
vscode-sqlite3/cloudformation/**
|
||||||
|
vscode-sqlite3/deps/**
|
||||||
|
vscode-sqlite3/test/**
|
||||||
|
vscode-sqlite3/build/**
|
||||||
|
vscode-sqlite3/src/**
|
||||||
|
!vscode-sqlite3/build/Release/*.node
|
||||||
|
|
||||||
|
oniguruma/binding.gyp
|
||||||
|
oniguruma/build/**
|
||||||
|
oniguruma/src/**
|
||||||
|
oniguruma/deps/**
|
||||||
|
!oniguruma/build/Release/*.node
|
||||||
|
!oniguruma/src/*.js
|
||||||
|
|
||||||
|
windows-mutex/binding.gyp
|
||||||
|
windows-mutex/build/**
|
||||||
|
windows-mutex/src/**
|
||||||
|
!windows-mutex/**/*.node
|
||||||
|
|
||||||
|
native-keymap/binding.gyp
|
||||||
|
native-keymap/build/**
|
||||||
|
native-keymap/src/**
|
||||||
|
native-keymap/deps/**
|
||||||
|
!native-keymap/build/Release/*.node
|
||||||
|
|
||||||
|
native-is-elevated/binding.gyp
|
||||||
|
native-is-elevated/build/**
|
||||||
|
native-is-elevated/src/**
|
||||||
|
native-is-elevated/deps/**
|
||||||
|
!native-is-elevated/build/Release/*.node
|
||||||
|
|
||||||
|
native-watchdog/binding.gyp
|
||||||
|
native-watchdog/build/**
|
||||||
|
native-watchdog/src/**
|
||||||
|
!native-watchdog/build/Release/*.node
|
||||||
|
|
||||||
|
spdlog/binding.gyp
|
||||||
|
spdlog/build/**
|
||||||
|
spdlog/deps/**
|
||||||
|
spdlog/src/**
|
||||||
|
spdlog/test/**
|
||||||
|
!spdlog/build/Release/*.node
|
||||||
|
|
||||||
|
jschardet/dist/**
|
||||||
|
|
||||||
|
windows-foreground-love/binding.gyp
|
||||||
|
windows-foreground-love/build/**
|
||||||
|
windows-foreground-love/src/**
|
||||||
|
!windows-foreground-love/**/*.node
|
||||||
|
|
||||||
|
windows-process-tree/binding.gyp
|
||||||
|
windows-process-tree/build/**
|
||||||
|
windows-process-tree/src/**
|
||||||
|
!windows-process-tree/**/*.node
|
||||||
|
|
||||||
|
gc-signals/binding.gyp
|
||||||
|
gc-signals/build/**
|
||||||
|
gc-signals/src/**
|
||||||
|
gc-signals/deps/**
|
||||||
|
|
||||||
|
!gc-signals/build/Release/*.node
|
||||||
|
!gc-signals/src/index.js
|
||||||
|
|
||||||
|
keytar/binding.gyp
|
||||||
|
keytar/build/**
|
||||||
|
keytar/src/**
|
||||||
|
keytar/script/**
|
||||||
|
keytar/node_modules/**
|
||||||
|
!keytar/**/*.node
|
||||||
|
|
||||||
|
node-pty/binding.gyp
|
||||||
|
node-pty/build/**
|
||||||
|
node-pty/src/**
|
||||||
|
node-pty/tools/**
|
||||||
|
!node-pty/build/Release/*.exe
|
||||||
|
!node-pty/build/Release/*.dll
|
||||||
|
!node-pty/build/Release/*.node
|
||||||
|
|
||||||
|
chart.js/node_modules/**
|
||||||
|
|
||||||
|
emmet/node_modules/**
|
||||||
|
|
||||||
|
pty.js/build/**
|
||||||
|
!pty.js/build/Release/**
|
||||||
|
|
||||||
|
jquery-ui/external/**
|
||||||
|
jquery-ui/demos/**
|
||||||
|
|
||||||
|
core-js/**/**
|
||||||
|
|
||||||
|
slickgrid/node_modules/**
|
||||||
|
slickgrid/examples/**
|
||||||
|
|
||||||
|
vscode-nsfw/binding.gyp
|
||||||
|
vscode-nsfw/build/**
|
||||||
|
vscode-nsfw/src/**
|
||||||
|
vscode-nsfw/openpa/**
|
||||||
|
vscode-nsfw/includes/**
|
||||||
|
!vscode-nsfw/build/Release/*.node
|
||||||
|
!vscode-nsfw/**/*.a
|
||||||
|
|
||||||
|
vsda/binding.gyp
|
||||||
|
vsda/README.md
|
||||||
|
vsda/build/**
|
||||||
|
vsda/*.bat
|
||||||
|
vsda/*.sh
|
||||||
|
vsda/*.cpp
|
||||||
|
vsda/*.h
|
||||||
|
!vsda/build/Release/vsda.node
|
||||||
|
|
||||||
|
vscode-windows-ca-certs/**/*
|
||||||
|
!vscode-windows-ca-certs/package.json
|
||||||
|
!vscode-windows-ca-certs/**/*.node
|
||||||
|
|
||||||
|
node-addon-api/**/*
|
||||||
@@ -3,10 +3,12 @@
|
|||||||
* 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 * as cp from 'child_process';
|
import * as cp from 'child_process';
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
function yarnInstall(packageName: string): void {
|
function yarnInstall(packageName: string): void {
|
||||||
cp.execSync(`yarn add --no-lockfile ${packageName}`);
|
cp.execSync(`yarn add --no-lockfile ${packageName}`);
|
||||||
|
cp.execSync(`yarn add --no-lockfile ${packageName}`, { cwd: path.join( process.cwd(), 'remote') });
|
||||||
}
|
}
|
||||||
|
|
||||||
const product = require('../../../product.json');
|
const product = require('../../../product.json');
|
||||||
|
|||||||
@@ -65,8 +65,7 @@ interface Asset {
|
|||||||
platform: string;
|
platform: string;
|
||||||
type: string;
|
type: string;
|
||||||
url: string;
|
url: string;
|
||||||
// {{SQL CARBON EDIT}}
|
mooncakeUrl?: string;
|
||||||
mooncakeUrl: string | undefined;
|
|
||||||
hash: string;
|
hash: string;
|
||||||
sha256hash: string;
|
sha256hash: string;
|
||||||
size: number;
|
size: number;
|
||||||
@@ -189,56 +188,18 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||||||
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
|
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
|
||||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
await assertContainer(blobService, quality);
|
await assertContainer(blobService, quality);
|
||||||
|
|
||||||
const blobExists = await doesAssetExist(blobService, quality, blobName);
|
const blobExists = await doesAssetExist(blobService, quality, blobName);
|
||||||
|
|
||||||
const promises = [];
|
if (blobExists) {
|
||||||
|
|
||||||
if (!blobExists) {
|
|
||||||
promises.push(uploadBlob(blobService, quality, blobName, file));
|
|
||||||
}
|
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
if (process.env['MOONCAKE_STORAGE_ACCESS_KEY']) {
|
|
||||||
const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY']!, `${storageAccount}.blob.core.chinacloudapi.cn`)
|
|
||||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
|
||||||
|
|
||||||
// mooncake is fussy and far away, this is needed!
|
|
||||||
mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000;
|
|
||||||
|
|
||||||
await Promise.all([
|
|
||||||
assertContainer(blobService, quality),
|
|
||||||
assertContainer(mooncakeBlobService, quality)
|
|
||||||
]);
|
|
||||||
|
|
||||||
const [blobExists, moooncakeBlobExists] = await Promise.all([
|
|
||||||
doesAssetExist(blobService, quality, blobName),
|
|
||||||
doesAssetExist(mooncakeBlobService, quality, blobName)
|
|
||||||
]);
|
|
||||||
|
|
||||||
const promises: Array<Promise<void>> = [];
|
|
||||||
|
|
||||||
if (!blobExists) {
|
|
||||||
promises.push(uploadBlob(blobService, quality, blobName, file));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!moooncakeBlobExists) {
|
|
||||||
promises.push(uploadBlob(mooncakeBlobService, quality, blobName, file));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log('Skipping Mooncake publishing.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (promises.length === 0) {
|
|
||||||
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
|
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Uploading blobs to Azure storage...');
|
console.log('Uploading blobs to Azure storage...');
|
||||||
|
|
||||||
await Promise.all(promises);
|
await uploadBlob(blobService, quality, blobName, file);
|
||||||
|
|
||||||
console.log('Blobs successfully uploaded.');
|
console.log('Blobs successfully uploaded.');
|
||||||
|
|
||||||
@@ -250,8 +211,6 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||||||
platform: platform,
|
platform: platform,
|
||||||
type: type,
|
type: type,
|
||||||
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
|
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
mooncakeUrl: process.env['MOONCAKE_CDN_URL'] ? `${process.env['MOONCAKE_CDN_URL']}/${quality}/${blobName}` : undefined,
|
|
||||||
hash: sha1hash,
|
hash: sha1hash,
|
||||||
sha256hash,
|
sha256hash,
|
||||||
size
|
size
|
||||||
|
|||||||
176
build/azure-pipelines/common/sync-mooncake.ts
Normal file
176
build/azure-pipelines/common/sync-mooncake.ts
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import * as url from 'url';
|
||||||
|
import * as azure from 'azure-storage';
|
||||||
|
import * as mime from 'mime';
|
||||||
|
import { DocumentClient, RetrievedDocument } from 'documentdb';
|
||||||
|
|
||||||
|
function log(...args: any[]) {
|
||||||
|
console.log(...[`[${new Date().toISOString()}]`, ...args]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function error(...args: any[]) {
|
||||||
|
console.error(...[`[${new Date().toISOString()}]`, ...args]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process.argv.length < 3) {
|
||||||
|
error('Usage: node sync-mooncake.js <quality>');
|
||||||
|
process.exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Build extends RetrievedDocument {
|
||||||
|
assets: Asset[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Asset {
|
||||||
|
platform: string;
|
||||||
|
type: string;
|
||||||
|
url: string;
|
||||||
|
mooncakeUrl: string;
|
||||||
|
hash: string;
|
||||||
|
sha256hash: string;
|
||||||
|
size: number;
|
||||||
|
supportsFastUpdate?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateBuild(commit: string, quality: string, platform: string, type: string, asset: Asset): Promise<void> {
|
||||||
|
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||||
|
const collection = 'dbs/builds/colls/' + quality;
|
||||||
|
const updateQuery = {
|
||||||
|
query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
|
||||||
|
parameters: [{ name: '@id', value: commit }]
|
||||||
|
};
|
||||||
|
|
||||||
|
let updateTries = 0;
|
||||||
|
|
||||||
|
function _update(): Promise<void> {
|
||||||
|
updateTries++;
|
||||||
|
|
||||||
|
return new Promise<void>((c, e) => {
|
||||||
|
client.queryDocuments(collection, updateQuery).toArray((err, results) => {
|
||||||
|
if (err) { return e(err); }
|
||||||
|
if (results.length !== 1) { return e(new Error('No documents')); }
|
||||||
|
|
||||||
|
const release = results[0];
|
||||||
|
|
||||||
|
release.assets = [
|
||||||
|
...release.assets.filter((a: any) => !(a.platform === platform && a.type === type)),
|
||||||
|
asset
|
||||||
|
];
|
||||||
|
|
||||||
|
client.replaceDocument(release._self, release, err => {
|
||||||
|
if (err && err.code === 409 && updateTries < 5) { return c(_update()); }
|
||||||
|
if (err) { return e(err); }
|
||||||
|
|
||||||
|
log('Build successfully updated.');
|
||||||
|
c();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return _update();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function sync(commit: string, quality: string): Promise<void> {
|
||||||
|
log(`Synchronizing Mooncake assets for ${quality}, ${commit}...`);
|
||||||
|
|
||||||
|
const cosmosdb = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||||
|
const collection = `dbs/builds/colls/${quality}`;
|
||||||
|
const query = {
|
||||||
|
query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
|
||||||
|
parameters: [{ name: '@id', value: commit }]
|
||||||
|
};
|
||||||
|
|
||||||
|
const build = await new Promise<Build>((c, e) => {
|
||||||
|
cosmosdb.queryDocuments(collection, query).toArray((err, results) => {
|
||||||
|
if (err) { return e(err); }
|
||||||
|
if (results.length !== 1) { return e(new Error('No documents')); }
|
||||||
|
c(results[0] as Build);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
log(`Found build for ${commit}, with ${build.assets.length} assets`);
|
||||||
|
|
||||||
|
const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!;
|
||||||
|
|
||||||
|
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
|
||||||
|
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
||||||
|
|
||||||
|
const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY']!, `${storageAccount}.blob.core.chinacloudapi.cn`)
|
||||||
|
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
||||||
|
|
||||||
|
// mooncake is fussy and far away, this is needed!
|
||||||
|
blobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000;
|
||||||
|
mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000;
|
||||||
|
|
||||||
|
for (const asset of build.assets) {
|
||||||
|
try {
|
||||||
|
const blobPath = url.parse(asset.url).path;
|
||||||
|
|
||||||
|
if (!blobPath) {
|
||||||
|
throw new Error(`Failed to parse URL: ${asset.url}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const blobName = blobPath.replace(/^\/\w+\//, '');
|
||||||
|
|
||||||
|
log(`Found ${blobName}`);
|
||||||
|
|
||||||
|
if (asset.mooncakeUrl) {
|
||||||
|
log(` Already in Mooncake ✔️`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const readStream = blobService.createReadStream(quality, blobName, undefined!);
|
||||||
|
const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = {
|
||||||
|
contentSettings: {
|
||||||
|
contentType: mime.lookup(blobPath),
|
||||||
|
cacheControl: 'max-age=31536000, public'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const writeStream = mooncakeBlobService.createWriteStreamToBlockBlob(quality, blobName, blobOptions, undefined);
|
||||||
|
|
||||||
|
log(` Uploading to Mooncake...`);
|
||||||
|
await new Promise((c, e) => readStream.pipe(writeStream).on('finish', c).on('error', e));
|
||||||
|
|
||||||
|
log(` Updating build in DB...`);
|
||||||
|
asset.mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`;
|
||||||
|
await updateBuild(commit, quality, asset.platform, asset.type, asset);
|
||||||
|
|
||||||
|
log(` Done ✔️`);
|
||||||
|
} catch (err) {
|
||||||
|
error(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log(`All done ✔️`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function main(): void {
|
||||||
|
if (process.env['VSCODE_BUILD_SKIP_PUBLISH']) {
|
||||||
|
error('Skipping publish due to VSCODE_BUILD_SKIP_PUBLISH');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const commit = process.env['BUILD_SOURCEVERSION'];
|
||||||
|
|
||||||
|
if (!commit) {
|
||||||
|
error('Skipping publish due to missing BUILD_SOURCEVERSION');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const quality = process.argv[2];
|
||||||
|
|
||||||
|
sync(commit, quality).catch(err => {
|
||||||
|
error(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
5
build/azure-pipelines/darwin/build.sh
Executable file
5
build/azure-pipelines/darwin/build.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
yarn gulp vscode-darwin-min
|
||||||
|
yarn gulp vscode-reh-darwin-min
|
||||||
|
yarn gulp upload-vscode-sourcemaps
|
||||||
@@ -7,20 +7,32 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
versionSpec: "1.10.1"
|
versionSpec: "1.10.1"
|
||||||
|
|
||||||
|
- task: AzureKeyVault@1
|
||||||
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
|
inputs:
|
||||||
|
azureSubscription: 'vscode-builds-subscription'
|
||||||
|
KeyVaultName: vscode
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cat << EOF > ~/.netrc
|
cat << EOF > ~/.netrc
|
||||||
machine monacotools.visualstudio.com
|
machine monacotools.visualstudio.com
|
||||||
password $(VSO_PAT)
|
password $(devops-pat)
|
||||||
machine github.com
|
machine github.com
|
||||||
login vscode
|
login vscode
|
||||||
password $(VSCODE_MIXIN_PASSWORD)
|
password $(github-distro-mixin-password)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
git config user.email "vscode@microsoft.com"
|
||||||
|
git config user.name "VSCode"
|
||||||
|
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
||||||
|
git fetch distro
|
||||||
|
git merge $(node -p "require('./package.json').distro")
|
||||||
|
|
||||||
yarn
|
yarn
|
||||||
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" yarn gulp -- mixin
|
yarn gulp mixin
|
||||||
yarn gulp -- hygiene
|
yarn gulp hygiene
|
||||||
yarn monaco-compile-check
|
yarn monaco-compile-check
|
||||||
node build/azure-pipelines/common/installDistro.js
|
node build/azure-pipelines/common/installDistro.js
|
||||||
node build/lib/builtInExtensions.js
|
node build/lib/builtInExtensions.js
|
||||||
@@ -28,12 +40,9 @@ steps:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" \
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(AZURE_STORAGE_ACCESS_KEY)" \
|
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
|
||||||
yarn gulp -- vscode-darwin-min
|
./build/azure-pipelines/darwin/build.sh
|
||||||
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(AZURE_STORAGE_ACCESS_KEY)" \
|
|
||||||
yarn gulp -- upload-vscode-sourcemaps
|
|
||||||
displayName: Build
|
displayName: Build
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
@@ -43,6 +52,11 @@ steps:
|
|||||||
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-darwin/$APP_NAME"
|
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-darwin/$APP_NAME"
|
||||||
displayName: Run unit tests
|
displayName: Run unit tests
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
./scripts/test-integration.sh --build --tfs "Integration Tests"
|
||||||
|
displayName: Run integration tests
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
pushd ../VSCode-darwin && zip -r -X -y ../VSCode-darwin.zip * && popd
|
pushd ../VSCode-darwin && zip -r -X -y ../VSCode-darwin.zip * && popd
|
||||||
@@ -69,31 +83,12 @@ steps:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
# remove pkg from archive
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
zip -d ../VSCode-darwin.zip "*.pkg"
|
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
|
||||||
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
# publish the build
|
VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
|
||||||
PACKAGEJSON=`ls ../VSCode-darwin/*.app/Contents/Resources/app/package.json`
|
./build/azure-pipelines/darwin/publish.sh
|
||||||
VERSION=`node -p "require(\"$PACKAGEJSON\").version"`
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
|
||||||
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
|
||||||
node build/azure-pipelines/common/publish.js \
|
|
||||||
"$(VSCODE_QUALITY)" \
|
|
||||||
darwin \
|
|
||||||
archive \
|
|
||||||
"VSCode-darwin-$(VSCODE_QUALITY).zip" \
|
|
||||||
$VERSION \
|
|
||||||
true \
|
|
||||||
../VSCode-darwin.zip
|
|
||||||
|
|
||||||
# publish hockeyapp symbols
|
|
||||||
node build/azure-pipelines/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" "$(VSCODE_HOCKEYAPP_ID_MACOS)"
|
|
||||||
|
|
||||||
# upload configuration
|
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(AZURE_STORAGE_ACCESS_KEY)" \
|
|
||||||
yarn gulp -- upload-vscode-configuration
|
|
||||||
displayName: Publish
|
displayName: Publish
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||||
|
|||||||
36
build/azure-pipelines/darwin/publish.sh
Executable file
36
build/azure-pipelines/darwin/publish.sh
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# remove pkg from archive
|
||||||
|
zip -d ../VSCode-darwin.zip "*.pkg"
|
||||||
|
|
||||||
|
# publish the build
|
||||||
|
PACKAGEJSON=`ls ../VSCode-darwin/*.app/Contents/Resources/app/package.json`
|
||||||
|
VERSION=`node -p "require(\"$PACKAGEJSON\").version"`
|
||||||
|
node build/azure-pipelines/common/publish.js \
|
||||||
|
"$VSCODE_QUALITY" \
|
||||||
|
darwin \
|
||||||
|
archive \
|
||||||
|
"VSCode-darwin-$VSCODE_QUALITY.zip" \
|
||||||
|
$VERSION \
|
||||||
|
true \
|
||||||
|
../VSCode-darwin.zip
|
||||||
|
|
||||||
|
# package Remote Extension Host
|
||||||
|
pushd .. && mv vscode-reh-darwin vscode-server-darwin && zip -Xry vscode-server-darwin.zip vscode-server-darwin && popd
|
||||||
|
|
||||||
|
# publish Remote Extension Host
|
||||||
|
node build/azure-pipelines/common/publish.js \
|
||||||
|
"$VSCODE_QUALITY" \
|
||||||
|
server-darwin \
|
||||||
|
archive-unsigned \
|
||||||
|
"vscode-server-darwin.zip" \
|
||||||
|
$VERSION \
|
||||||
|
true \
|
||||||
|
../vscode-server-darwin.zip
|
||||||
|
|
||||||
|
# publish hockeyapp symbols
|
||||||
|
node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" "$VSCODE_ARCH" "$VSCODE_HOCKEYAPP_ID_MACOS"
|
||||||
|
|
||||||
|
# upload configuration
|
||||||
|
yarn gulp upload-vscode-configuration
|
||||||
36
build/azure-pipelines/distro-build.yml
Normal file
36
build/azure-pipelines/distro-build.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include: ['master', 'release/*']
|
||||||
|
pr:
|
||||||
|
branches:
|
||||||
|
include: ['master', 'release/*']
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: "10.15.1"
|
||||||
|
|
||||||
|
- task: AzureKeyVault@1
|
||||||
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
|
inputs:
|
||||||
|
azureSubscription: 'vscode-builds-subscription'
|
||||||
|
KeyVaultName: vscode
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cat << EOF > ~/.netrc
|
||||||
|
machine github.com
|
||||||
|
login vscode
|
||||||
|
password $(github-distro-mixin-password)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
git config user.email "vscode@microsoft.com"
|
||||||
|
git config user.name "VSCode"
|
||||||
|
|
||||||
|
git remote add distro "https://github.com/$VSCODE_MIXIN_REPO.git"
|
||||||
|
git fetch distro
|
||||||
|
git push distro origin/master:refs/heads/master
|
||||||
|
git merge $(node -p "require('./package.json').distro")
|
||||||
|
|
||||||
|
displayName: Sync & Merge Distro
|
||||||
7
build/azure-pipelines/linux/build.sh
Executable file
7
build/azure-pipelines/linux/build.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
yarn gulp "vscode-linux-$VSCODE_ARCH-min"
|
||||||
|
|
||||||
|
if [[ "$VSCODE_ARCH" != "ia32" ]]; then
|
||||||
|
yarn gulp vscode-reh-linux-$VSCODE_ARCH-min
|
||||||
|
fi
|
||||||
@@ -7,6 +7,12 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
versionSpec: "1.10.1"
|
versionSpec: "1.10.1"
|
||||||
|
|
||||||
|
- task: AzureKeyVault@1
|
||||||
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
|
inputs:
|
||||||
|
azureSubscription: 'vscode-builds-subscription'
|
||||||
|
KeyVaultName: vscode
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
export npm_config_arch="$(VSCODE_ARCH)"
|
export npm_config_arch="$(VSCODE_ARCH)"
|
||||||
@@ -16,96 +22,51 @@ steps:
|
|||||||
|
|
||||||
cat << EOF > ~/.netrc
|
cat << EOF > ~/.netrc
|
||||||
machine monacotools.visualstudio.com
|
machine monacotools.visualstudio.com
|
||||||
password $(VSO_PAT)
|
password $(devops-pat)
|
||||||
machine github.com
|
machine github.com
|
||||||
login vscode
|
login vscode
|
||||||
password $(VSCODE_MIXIN_PASSWORD)
|
password $(github-distro-mixin-password)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
git config user.email "vscode@microsoft.com"
|
||||||
|
git config user.name "VSCode"
|
||||||
|
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
||||||
|
git fetch distro
|
||||||
|
git merge $(node -p "require('./package.json').distro")
|
||||||
|
|
||||||
CHILD_CONCURRENCY=1 yarn
|
CHILD_CONCURRENCY=1 yarn
|
||||||
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
|
yarn gulp mixin
|
||||||
npm run gulp -- hygiene
|
yarn gulp hygiene
|
||||||
npm run monaco-compile-check
|
yarn monaco-compile-check
|
||||||
node build/azure-pipelines/common/installDistro.js
|
node build/azure-pipelines/common/installDistro.js
|
||||||
node build/lib/builtInExtensions.js
|
node build/lib/builtInExtensions.js
|
||||||
|
displayName: Prepare build
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- vscode-linux-$(VSCODE_ARCH)-min
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
name: build
|
./build/azure-pipelines/linux/build.sh
|
||||||
|
displayName: Build
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
npm run gulp -- "electron-$(VSCODE_ARCH)"
|
yarn gulp "electron-$(VSCODE_ARCH)"
|
||||||
|
|
||||||
# xvfb seems to be crashing often, let's make sure it's always up
|
# xvfb seems to be crashing often, let's make sure it's always up
|
||||||
service xvfb start
|
service xvfb start
|
||||||
|
|
||||||
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
|
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
|
||||||
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
|
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
|
||||||
name: test
|
displayName: Run unit tests
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
REPO="$(pwd)"
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
ROOT="$REPO/.."
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
ARCH="$(VSCODE_ARCH)"
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
|
VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
|
||||||
# Publish tarball
|
./build/azure-pipelines/linux/publish.sh
|
||||||
PLATFORM_LINUX="linux-$(VSCODE_ARCH)"
|
displayName: Publish
|
||||||
[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
|
|
||||||
[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
|
|
||||||
BUILDNAME="VSCode-$PLATFORM_LINUX"
|
|
||||||
BUILD="$ROOT/$BUILDNAME"
|
|
||||||
BUILD_VERSION="$(date +%s)"
|
|
||||||
[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz"
|
|
||||||
TARBALL_PATH="$ROOT/$TARBALL_FILENAME"
|
|
||||||
PACKAGEJSON="$BUILD/resources/app/package.json"
|
|
||||||
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
|
|
||||||
|
|
||||||
rm -rf $ROOT/code-*.tar.*
|
|
||||||
(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME)
|
|
||||||
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
|
||||||
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
|
||||||
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_LINUX" archive-unsigned "$TARBALL_FILENAME" "$VERSION" true "$TARBALL_PATH"
|
|
||||||
|
|
||||||
# Publish hockeyapp symbols
|
|
||||||
node build/azure-pipelines/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" "$(VSCODE_HOCKEYAPP_ID_LINUX64)"
|
|
||||||
|
|
||||||
# Publish DEB
|
|
||||||
npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-build-deb"
|
|
||||||
PLATFORM_DEB="linux-deb-$ARCH"
|
|
||||||
[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
|
|
||||||
DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)"
|
|
||||||
DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME"
|
|
||||||
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
|
||||||
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
|
||||||
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_DEB" package "$DEB_FILENAME" "$VERSION" true "$DEB_PATH"
|
|
||||||
|
|
||||||
# Publish RPM
|
|
||||||
npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-build-rpm"
|
|
||||||
PLATFORM_RPM="linux-rpm-$ARCH"
|
|
||||||
[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
|
|
||||||
RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)"
|
|
||||||
RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
|
|
||||||
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
|
||||||
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
|
||||||
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_RPM" package "$RPM_FILENAME" "$VERSION" true "$RPM_PATH"
|
|
||||||
|
|
||||||
# Publish Snap
|
|
||||||
npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-prepare-snap"
|
|
||||||
|
|
||||||
# Pack snap tarball artifact, in order to preserve file perms
|
|
||||||
mkdir -p $REPO/.build/linux/snap-tarball
|
|
||||||
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$(VSCODE_ARCH).tar.gz"
|
|
||||||
rm -rf $SNAP_TARBALL_PATH
|
|
||||||
(cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap)
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||||
displayName: 'Component Detection'
|
displayName: 'Component Detection'
|
||||||
|
|||||||
64
build/azure-pipelines/linux/publish.sh
Executable file
64
build/azure-pipelines/linux/publish.sh
Executable file
@@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
REPO="$(pwd)"
|
||||||
|
ROOT="$REPO/.."
|
||||||
|
|
||||||
|
# Publish tarball
|
||||||
|
PLATFORM_LINUX="linux-$VSCODE_ARCH"
|
||||||
|
[[ "$VSCODE_ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
|
||||||
|
[[ "$VSCODE_ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
|
||||||
|
BUILDNAME="VSCode-$PLATFORM_LINUX"
|
||||||
|
BUILD="$ROOT/$BUILDNAME"
|
||||||
|
BUILD_VERSION="$(date +%s)"
|
||||||
|
[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz"
|
||||||
|
TARBALL_PATH="$ROOT/$TARBALL_FILENAME"
|
||||||
|
PACKAGEJSON="$BUILD/resources/app/package.json"
|
||||||
|
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
|
||||||
|
|
||||||
|
rm -rf $ROOT/code-*.tar.*
|
||||||
|
(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME)
|
||||||
|
|
||||||
|
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_LINUX" archive-unsigned "$TARBALL_FILENAME" "$VERSION" true "$TARBALL_PATH"
|
||||||
|
|
||||||
|
# Publish Remote Extension Host
|
||||||
|
if [[ "$VSCODE_ARCH" != "ia32" ]]; then
|
||||||
|
LEGACY_SERVER_BUILD_NAME="vscode-reh-$PLATFORM_LINUX"
|
||||||
|
SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX"
|
||||||
|
SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX.tar.gz"
|
||||||
|
SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME"
|
||||||
|
|
||||||
|
rm -rf $ROOT/vscode-server-*.tar.*
|
||||||
|
(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME)
|
||||||
|
|
||||||
|
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "server-$PLATFORM_LINUX" archive-unsigned "$SERVER_TARBALL_FILENAME" "$VERSION" true "$SERVER_TARBALL_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Publish hockeyapp symbols
|
||||||
|
node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" "$VSCODE_ARCH" "$VSCODE_HOCKEYAPP_ID_LINUX64"
|
||||||
|
|
||||||
|
# Publish DEB
|
||||||
|
yarn gulp "vscode-linux-$VSCODE_ARCH-build-deb"
|
||||||
|
PLATFORM_DEB="linux-deb-$VSCODE_ARCH"
|
||||||
|
[[ "$VSCODE_ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
|
||||||
|
DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)"
|
||||||
|
DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME"
|
||||||
|
|
||||||
|
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_DEB" package "$DEB_FILENAME" "$VERSION" true "$DEB_PATH"
|
||||||
|
|
||||||
|
# Publish RPM
|
||||||
|
yarn gulp "vscode-linux-$VSCODE_ARCH-build-rpm"
|
||||||
|
PLATFORM_RPM="linux-rpm-$VSCODE_ARCH"
|
||||||
|
[[ "$VSCODE_ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
|
||||||
|
RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)"
|
||||||
|
RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
|
||||||
|
|
||||||
|
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_RPM" package "$RPM_FILENAME" "$VERSION" true "$RPM_PATH"
|
||||||
|
|
||||||
|
# Publish Snap
|
||||||
|
yarn gulp "vscode-linux-$VSCODE_ARCH-prepare-snap"
|
||||||
|
|
||||||
|
# Pack snap tarball artifact, in order to preserve file perms
|
||||||
|
mkdir -p $REPO/.build/linux/snap-tarball
|
||||||
|
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$VSCODE_ARCH.tar.gz"
|
||||||
|
rm -rf $SNAP_TARBALL_PATH
|
||||||
|
(cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap)
|
||||||
@@ -7,6 +7,12 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
versionSpec: "1.10.1"
|
versionSpec: "1.10.1"
|
||||||
|
|
||||||
|
- task: AzureKeyVault@1
|
||||||
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
|
inputs:
|
||||||
|
azureSubscription: 'vscode-builds-subscription'
|
||||||
|
KeyVaultName: vscode
|
||||||
|
|
||||||
- task: DownloadPipelineArtifact@0
|
- task: DownloadPipelineArtifact@0
|
||||||
displayName: 'Download Pipeline Artifact'
|
displayName: 'Download Pipeline Artifact'
|
||||||
inputs:
|
inputs:
|
||||||
@@ -44,7 +50,6 @@ steps:
|
|||||||
(cd $SNAP_ROOT/code-* && sudo snapcraft snap --output "$SNAP_PATH")
|
(cd $SNAP_ROOT/code-* && sudo snapcraft snap --output "$SNAP_PATH")
|
||||||
|
|
||||||
# Publish snap package
|
# Publish snap package
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
|
||||||
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "linux-snap-$ARCH" package "$SNAP_FILENAME" "$VERSION" true "$SNAP_PATH"
|
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "linux-snap-$ARCH" package "$SNAP_FILENAME" "$VERSION" true "$SNAP_PATH"
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
resources:
|
resources:
|
||||||
containers:
|
containers:
|
||||||
- container: vscode-x64
|
- container: vscode-x64
|
||||||
image: joaomoreno/vscode-linux-build-agent:x64
|
endpoint: VSCodeHub
|
||||||
|
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
|
||||||
- container: vscode-ia32
|
- container: vscode-ia32
|
||||||
image: joaomoreno/vscode-linux-build-agent:ia32
|
endpoint: VSCodeHub
|
||||||
|
image: vscodehub.azurecr.io/vscode-linux-build-agent:ia32
|
||||||
- container: snapcraft
|
- container: snapcraft
|
||||||
image: snapcore/snapcraft
|
image: snapcore/snapcraft
|
||||||
|
|
||||||
@@ -62,4 +64,18 @@ jobs:
|
|||||||
pool:
|
pool:
|
||||||
vmImage: macOS 10.13
|
vmImage: macOS 10.13
|
||||||
steps:
|
steps:
|
||||||
- template: darwin/product-build-darwin.yml
|
- template: darwin/product-build-darwin.yml
|
||||||
|
|
||||||
|
- job: Mooncake
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
condition: true
|
||||||
|
dependsOn:
|
||||||
|
- Windows
|
||||||
|
- Windows32
|
||||||
|
- Linux
|
||||||
|
- LinuxSnap
|
||||||
|
- Linux32
|
||||||
|
- macOS
|
||||||
|
steps:
|
||||||
|
- template: sync-mooncake.yml
|
||||||
2
build/azure-pipelines/publish-types/.gitignore
vendored
Normal file
2
build/azure-pipelines/publish-types/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
node_modules/
|
||||||
|
*.js
|
||||||
36
build/azure-pipelines/publish-types/check-version.js
Normal file
36
build/azure-pipelines/publish-types/check-version.js
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const cp = require("child_process");
|
||||||
|
let tag = '';
|
||||||
|
try {
|
||||||
|
tag = cp
|
||||||
|
.execSync('git describe --tags `git rev-list --tags --max-count=1`')
|
||||||
|
.toString()
|
||||||
|
.trim();
|
||||||
|
if (!isValidTag(tag)) {
|
||||||
|
throw Error(`Invalid tag ${tag}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
console.error('Failed to update types');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
function isValidTag(t) {
|
||||||
|
if (t.split('.').length !== 3) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const [major, minor, bug] = t.split('.');
|
||||||
|
// Only release for tags like 1.34.0
|
||||||
|
if (bug !== '0') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (parseInt(major, 10) === NaN || parseInt(minor, 10) === NaN) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
43
build/azure-pipelines/publish-types/check-version.ts
Normal file
43
build/azure-pipelines/publish-types/check-version.ts
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import * as cp from 'child_process';
|
||||||
|
|
||||||
|
let tag = '';
|
||||||
|
try {
|
||||||
|
tag = cp
|
||||||
|
.execSync('git describe --tags `git rev-list --tags --max-count=1`')
|
||||||
|
.toString()
|
||||||
|
.trim();
|
||||||
|
|
||||||
|
if (!isValidTag(tag)) {
|
||||||
|
throw Error(`Invalid tag ${tag}`);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
console.error('Failed to update types');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isValidTag(t: string) {
|
||||||
|
if (t.split('.').length !== 3) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const [major, minor, bug] = t.split('.');
|
||||||
|
|
||||||
|
// Only release for tags like 1.34.0
|
||||||
|
if (bug !== '0') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parseInt(major, 10) === NaN || parseInt(minor, 10) === NaN) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
67
build/azure-pipelines/publish-types/publish-types.yml
Normal file
67
build/azure-pipelines/publish-types/publish-types.yml
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
# Publish @types/vscode for each release
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include: ['refs/tags/*']
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: "10.15.1"
|
||||||
|
|
||||||
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
|
inputs:
|
||||||
|
versionSpec: "1.10.1"
|
||||||
|
|
||||||
|
- bash: |
|
||||||
|
# Install build dependencies
|
||||||
|
(cd build && yarn)
|
||||||
|
node build/azure-pipelines/publish-types/check-version.js
|
||||||
|
displayName: Check version
|
||||||
|
|
||||||
|
- bash: |
|
||||||
|
git config --global user.email "vscode@microsoft.com"
|
||||||
|
git config --global user.name "VSCode"
|
||||||
|
|
||||||
|
git clone https://$(GITHUB_TOKEN)@github.com/DefinitelyTyped/DefinitelyTyped.git --depth=1
|
||||||
|
node build/azure-pipelines/publish-types/update-types.js
|
||||||
|
|
||||||
|
TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||||
|
|
||||||
|
cd DefinitelyTyped
|
||||||
|
|
||||||
|
git diff --color | cat
|
||||||
|
git add -A
|
||||||
|
git status
|
||||||
|
git checkout -b "vscode-types-$TAG_VERSION"
|
||||||
|
git commit -m "VS Code $TAG_VERSION Extension API"
|
||||||
|
git push origin "vscode-types-$TAG_VERSION"
|
||||||
|
|
||||||
|
displayName: Push update to DefinitelyTyped
|
||||||
|
|
||||||
|
- bash: |
|
||||||
|
TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||||
|
CHANNEL="G1C14HJ2F"
|
||||||
|
|
||||||
|
MESSAGE="DefinitelyTyped/DefinitelyTyped#vscode-types-$TAG_VERSION created. Endgame master, please open this link, examine changes and create a PR:"
|
||||||
|
LINK="https://github.com/DefinitelyTyped/DefinitelyTyped/compare/vscode-types-$TAG_VERSION?quick_pull=1&body=Updating%20VS%20Code%20Extension%20API.%20See%20https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode%2Fissues%2F70175%20for%20details."
|
||||||
|
MESSAGE2="[@octref, @jrieken, @kmaetzel, @egamma]. Please review and merge PR to publish @types/vscode."
|
||||||
|
|
||||||
|
curl -X POST -H "Authorization: Bearer $(SLACK_TOKEN)" \
|
||||||
|
-H 'Content-type: application/json; charset=utf-8' \
|
||||||
|
--data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$MESSAGE"'"}' \
|
||||||
|
https://slack.com/api/chat.postMessage
|
||||||
|
|
||||||
|
curl -X POST -H "Authorization: Bearer $(SLACK_TOKEN)" \
|
||||||
|
-H 'Content-type: application/json; charset=utf-8' \
|
||||||
|
--data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$LINK"'"}' \
|
||||||
|
https://slack.com/api/chat.postMessage
|
||||||
|
|
||||||
|
curl -X POST -H "Authorization: Bearer $(SLACK_TOKEN)" \
|
||||||
|
-H 'Content-type: application/json; charset=utf-8' \
|
||||||
|
--data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$MESSAGE2"'"}' \
|
||||||
|
https://slack.com/api/chat.postMessage
|
||||||
|
|
||||||
|
displayName: Send message on Slack
|
||||||
62
build/azure-pipelines/publish-types/update-types.js
Normal file
62
build/azure-pipelines/publish-types/update-types.js
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const fs = require("fs");
|
||||||
|
const cp = require("child_process");
|
||||||
|
const path = require("path");
|
||||||
|
let tag = '';
|
||||||
|
try {
|
||||||
|
tag = cp
|
||||||
|
.execSync('git describe --tags `git rev-list --tags --max-count=1`')
|
||||||
|
.toString()
|
||||||
|
.trim();
|
||||||
|
const dtsUri = `https://raw.githubusercontent.com/microsoft/vscode/${tag}/src/vs/vscode.d.ts`;
|
||||||
|
const outPath = path.resolve(process.cwd(), 'DefinitelyTyped/types/vscode/index.d.ts');
|
||||||
|
cp.execSync(`curl ${dtsUri} --output ${outPath}`);
|
||||||
|
updateDTSFile(outPath, tag);
|
||||||
|
console.log(`Done updating vscode.d.ts at ${outPath}`);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
console.error('Failed to update types');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
function updateDTSFile(outPath, tag) {
|
||||||
|
const oldContent = fs.readFileSync(outPath, 'utf-8');
|
||||||
|
const newContent = getNewFileContent(oldContent, tag);
|
||||||
|
fs.writeFileSync(outPath, newContent);
|
||||||
|
}
|
||||||
|
function getNewFileContent(content, tag) {
|
||||||
|
const oldheader = [
|
||||||
|
`/*---------------------------------------------------------------------------------------------`,
|
||||||
|
` * Copyright (c) Microsoft Corporation. All rights reserved.`,
|
||||||
|
` * Licensed under the Source EULA. See License.txt in the project root for license information.`,
|
||||||
|
` *--------------------------------------------------------------------------------------------*/`
|
||||||
|
].join('\n');
|
||||||
|
return getNewFileHeader(tag) + content.slice(oldheader.length);
|
||||||
|
}
|
||||||
|
function getNewFileHeader(tag) {
|
||||||
|
const [major, minor] = tag.split('.');
|
||||||
|
const shorttag = `${major}.${minor}`;
|
||||||
|
const header = [
|
||||||
|
`// Type definitions for Visual Studio Code ${shorttag}`,
|
||||||
|
`// Project: https://github.com/microsoft/vscode`,
|
||||||
|
`// Definitions by: Visual Studio Code Team, Microsoft <https://github.com/Microsoft>`,
|
||||||
|
`// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped`,
|
||||||
|
``,
|
||||||
|
`/*---------------------------------------------------------------------------------------------`,
|
||||||
|
` * Copyright (c) Microsoft Corporation. All rights reserved.`,
|
||||||
|
` * Licensed under the Source EULA.`,
|
||||||
|
` * See https://github.com/Microsoft/vscode/blob/master/LICENSE.txt for license information.`,
|
||||||
|
` *--------------------------------------------------------------------------------------------*/`,
|
||||||
|
``,
|
||||||
|
`/**`,
|
||||||
|
` * Type Definition for Visual Studio Code ${shorttag} Extension API`,
|
||||||
|
` * See https://code.visualstudio.com/api for more information`,
|
||||||
|
` */`
|
||||||
|
].join('\n');
|
||||||
|
return header;
|
||||||
|
}
|
||||||
73
build/azure-pipelines/publish-types/update-types.ts
Normal file
73
build/azure-pipelines/publish-types/update-types.ts
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import * as fs from 'fs';
|
||||||
|
import * as cp from 'child_process';
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
|
let tag = '';
|
||||||
|
try {
|
||||||
|
tag = cp
|
||||||
|
.execSync('git describe --tags `git rev-list --tags --max-count=1`')
|
||||||
|
.toString()
|
||||||
|
.trim();
|
||||||
|
|
||||||
|
const dtsUri = `https://raw.githubusercontent.com/microsoft/vscode/${tag}/src/vs/vscode.d.ts`;
|
||||||
|
const outPath = path.resolve(process.cwd(), 'DefinitelyTyped/types/vscode/index.d.ts');
|
||||||
|
cp.execSync(`curl ${dtsUri} --output ${outPath}`);
|
||||||
|
|
||||||
|
updateDTSFile(outPath, tag);
|
||||||
|
|
||||||
|
console.log(`Done updating vscode.d.ts at ${outPath}`);
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
console.error('Failed to update types');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateDTSFile(outPath: string, tag: string) {
|
||||||
|
const oldContent = fs.readFileSync(outPath, 'utf-8');
|
||||||
|
const newContent = getNewFileContent(oldContent, tag);
|
||||||
|
|
||||||
|
fs.writeFileSync(outPath, newContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getNewFileContent(content: string, tag: string) {
|
||||||
|
const oldheader = [
|
||||||
|
`/*---------------------------------------------------------------------------------------------`,
|
||||||
|
` * Copyright (c) Microsoft Corporation. All rights reserved.`,
|
||||||
|
` * Licensed under the Source EULA. See License.txt in the project root for license information.`,
|
||||||
|
` *--------------------------------------------------------------------------------------------*/`
|
||||||
|
].join('\n');
|
||||||
|
|
||||||
|
return getNewFileHeader(tag) + content.slice(oldheader.length);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getNewFileHeader(tag: string) {
|
||||||
|
const [major, minor] = tag.split('.');
|
||||||
|
const shorttag = `${major}.${minor}`;
|
||||||
|
|
||||||
|
const header = [
|
||||||
|
`// Type definitions for Visual Studio Code ${shorttag}`,
|
||||||
|
`// Project: https://github.com/microsoft/vscode`,
|
||||||
|
`// Definitions by: Visual Studio Code Team, Microsoft <https://github.com/Microsoft>`,
|
||||||
|
`// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped`,
|
||||||
|
``,
|
||||||
|
`/*---------------------------------------------------------------------------------------------`,
|
||||||
|
` * Copyright (c) Microsoft Corporation. All rights reserved.`,
|
||||||
|
` * Licensed under the Source EULA.`,
|
||||||
|
` * See https://github.com/Microsoft/vscode/blob/master/LICENSE.txt for license information.`,
|
||||||
|
` *--------------------------------------------------------------------------------------------*/`,
|
||||||
|
``,
|
||||||
|
`/**`,
|
||||||
|
` * Type Definition for Visual Studio Code ${shorttag} Extension API`,
|
||||||
|
` * See https://code.visualstudio.com/api for more information`,
|
||||||
|
` */`
|
||||||
|
].join('\n');
|
||||||
|
|
||||||
|
return header;
|
||||||
|
}
|
||||||
24
build/azure-pipelines/sync-mooncake.yml
Normal file
24
build/azure-pipelines/sync-mooncake.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: "10.15.1"
|
||||||
|
|
||||||
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
|
inputs:
|
||||||
|
versionSpec: "1.10.1"
|
||||||
|
|
||||||
|
- task: AzureKeyVault@1
|
||||||
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
|
inputs:
|
||||||
|
azureSubscription: 'vscode-builds-subscription'
|
||||||
|
KeyVaultName: vscode
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
|
||||||
|
(cd build ; yarn)
|
||||||
|
|
||||||
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
|
MOONCAKE_STORAGE_ACCESS_KEY="$(vscode-mooncake-storage-key)" \
|
||||||
|
node build/azure-pipelines/common/sync-mooncake.js "$VSCODE_QUALITY"
|
||||||
5
build/azure-pipelines/win32/build.ps1
Normal file
5
build/azure-pipelines/win32/build.ps1
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-min" }
|
||||||
|
exec { yarn gulp "vscode-reh-win32-$env:VSCODE_ARCH-min" }
|
||||||
|
exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-inno-updater" }
|
||||||
@@ -12,40 +12,59 @@ steps:
|
|||||||
versionSpec: '2.x'
|
versionSpec: '2.x'
|
||||||
addToPath: true
|
addToPath: true
|
||||||
|
|
||||||
|
- task: AzureKeyVault@1
|
||||||
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
|
inputs:
|
||||||
|
azureSubscription: 'vscode-builds-subscription'
|
||||||
|
KeyVaultName: vscode
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
"machine monacotools.visualstudio.com`npassword $(VSO_PAT)`nmachine github.com`nlogin vscode`npassword $(VSCODE_MIXIN_PASSWORD)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
|
"machine monacotools.visualstudio.com`npassword $(devops-pat)`nmachine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
|
||||||
$env:npm_config_arch="$(VSCODE_ARCH)"
|
$env:npm_config_arch="$(VSCODE_ARCH)"
|
||||||
$env:CHILD_CONCURRENCY="1"
|
$env:CHILD_CONCURRENCY="1"
|
||||||
$env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
|
|
||||||
|
exec { git config user.email "vscode@microsoft.com" }
|
||||||
|
exec { git config user.name "VSCode" }
|
||||||
|
exec { git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git" }
|
||||||
|
exec { git fetch distro }
|
||||||
|
exec { git merge $(node -p "require('./package.json').distro") }
|
||||||
|
|
||||||
exec { yarn }
|
exec { yarn }
|
||||||
exec { npm run gulp -- mixin }
|
exec { yarn gulp mixin }
|
||||||
exec { npm run gulp -- hygiene }
|
exec { yarn gulp hygiene }
|
||||||
exec { npm run monaco-compile-check }
|
exec { yarn monaco-compile-check }
|
||||||
exec { node build/azure-pipelines/common/installDistro.js }
|
exec { node build/azure-pipelines/common/installDistro.js }
|
||||||
exec { node build/lib/builtInExtensions.js }
|
exec { node build/lib/builtInExtensions.js }
|
||||||
|
displayName: Prepare build
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
$env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
|
$env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
|
||||||
exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-min" }
|
.\build\azure-pipelines\win32\build.ps1
|
||||||
exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
|
displayName: Build
|
||||||
name: build
|
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
exec { npm run gulp -- "electron-$(VSCODE_ARCH)" }
|
exec { yarn gulp "electron-$(VSCODE_ARCH)" }
|
||||||
exec { .\scripts\test.bat --build --tfs "Unit Tests" }
|
exec { .\scripts\test.bat --build --tfs "Unit Tests" }
|
||||||
# yarn smoketest -- --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
# yarn smoketest -- --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||||
name: test
|
displayName: Run unit tests
|
||||||
|
|
||||||
|
- powershell: |
|
||||||
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
exec { yarn gulp "electron-$(VSCODE_ARCH)" }
|
||||||
|
exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }
|
||||||
|
displayName: Run integration tests
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
inputs:
|
inputs:
|
||||||
ConnectedServiceName: 'ESRP CodeSign'
|
ConnectedServiceName: 'ESRP CodeSign'
|
||||||
FolderPath: '$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)'
|
FolderPath: '$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH),$(agent.builddirectory)/vscode-reh-win32-$(VSCODE_ARCH)'
|
||||||
Pattern: '*.dll,*.exe,*.node'
|
Pattern: '*.dll,*.exe,*.node'
|
||||||
signConfigType: inlineSignParams
|
signConfigType: inlineSignParams
|
||||||
inlineOperation: |
|
inlineOperation: |
|
||||||
@@ -113,38 +132,17 @@ steps:
|
|||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
.\build\azure-pipelines\win32\import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(ESRP_AUTH_CERTIFICATE) -AuthCertificateKey $(ESRP_AUTH_CERTIFICATE_KEY)
|
.\build\azure-pipelines\win32\import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(esrp-auth-certificate) -AuthCertificateKey $(esrp-auth-certificate-key)
|
||||||
displayName: Import ESRP Auth Certificate
|
displayName: Import ESRP Auth Certificate
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-system-setup" "vscode-win32-$(VSCODE_ARCH)-user-setup" --sign }
|
$env:AZURE_STORAGE_ACCESS_KEY_2 = "$(vscode-storage-key)"
|
||||||
|
$env:AZURE_DOCUMENTDB_MASTERKEY = "$(builds-docdb-key-readwrite)"
|
||||||
$Repo = "$(pwd)"
|
$env:VSCODE_HOCKEYAPP_TOKEN = "$(vscode-hockeyapp-token)"
|
||||||
$Root = "$Repo\.."
|
.\build\azure-pipelines\win32\publish.ps1
|
||||||
$SystemExe = "$Repo\.build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe"
|
displayName: Publish
|
||||||
$UserExe = "$Repo\.build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe"
|
|
||||||
$Zip = "$Repo\.build\win32-$(VSCODE_ARCH)\archive\VSCode-win32-$(VSCODE_ARCH).zip"
|
|
||||||
$Build = "$Root\VSCode-win32-$(VSCODE_ARCH)"
|
|
||||||
|
|
||||||
# get version
|
|
||||||
$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
|
|
||||||
$Version = $PackageJson.version
|
|
||||||
$Quality = "$env:VSCODE_QUALITY"
|
|
||||||
$env:AZURE_STORAGE_ACCESS_KEY_2 = "$(AZURE_STORAGE_ACCESS_KEY_2)"
|
|
||||||
$env:MOONCAKE_STORAGE_ACCESS_KEY = "$(MOONCAKE_STORAGE_ACCESS_KEY)"
|
|
||||||
$env:AZURE_DOCUMENTDB_MASTERKEY = "$(AZURE_DOCUMENTDB_MASTERKEY)"
|
|
||||||
|
|
||||||
$assetPlatform = if ("$(VSCODE_ARCH)" -eq "ia32") { "win32" } else { "win32-x64" }
|
|
||||||
|
|
||||||
exec { node build/azure-pipelines/common/publish.js $Quality "$global:assetPlatform-archive" archive "VSCode-win32-$(VSCODE_ARCH)-$Version.zip" $Version true $Zip }
|
|
||||||
exec { node build/azure-pipelines/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $SystemExe }
|
|
||||||
exec { node build/azure-pipelines/common/publish.js $Quality "$global:assetPlatform-user" setup "VSCodeUserSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $UserExe }
|
|
||||||
|
|
||||||
# publish hockeyapp symbols
|
|
||||||
$hockeyAppId = if ("$(VSCODE_ARCH)" -eq "ia32") { "$(VSCODE_HOCKEYAPP_ID_WIN32)" } else { "$(VSCODE_HOCKEYAPP_ID_WIN64)" }
|
|
||||||
exec { node build/azure-pipelines/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" $hockeyAppId }
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||||
displayName: 'Component Detection'
|
displayName: 'Component Detection'
|
||||||
|
|||||||
37
build/azure-pipelines/win32/publish.ps1
Normal file
37
build/azure-pipelines/win32/publish.ps1
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
$Arch = "$env:VSCODE_ARCH"
|
||||||
|
|
||||||
|
exec { yarn gulp "vscode-win32-$Arch-archive" "vscode-win32-$Arch-system-setup" "vscode-win32-$Arch-user-setup" --sign }
|
||||||
|
|
||||||
|
$Repo = "$(pwd)"
|
||||||
|
$Root = "$Repo\.."
|
||||||
|
$SystemExe = "$Repo\.build\win32-$Arch\system-setup\VSCodeSetup.exe"
|
||||||
|
$UserExe = "$Repo\.build\win32-$Arch\user-setup\VSCodeSetup.exe"
|
||||||
|
$Zip = "$Repo\.build\win32-$Arch\archive\VSCode-win32-$Arch.zip"
|
||||||
|
$LegacyServer = "$Root\vscode-reh-win32-$Arch"
|
||||||
|
$ServerName = "vscode-server-win32-$Arch"
|
||||||
|
$Server = "$Root\$ServerName"
|
||||||
|
$ServerZip = "$Repo\.build\vscode-server-win32-$Arch.zip"
|
||||||
|
$Build = "$Root\VSCode-win32-$Arch"
|
||||||
|
|
||||||
|
# Create server archive
|
||||||
|
exec { Rename-Item -Path $LegacyServer -NewName $ServerName }
|
||||||
|
exec { .\node_modules\7zip\7zip-lite\7z.exe a -tzip $ServerZip $Server -r }
|
||||||
|
|
||||||
|
# get version
|
||||||
|
$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
|
||||||
|
$Version = $PackageJson.version
|
||||||
|
$Quality = "$env:VSCODE_QUALITY"
|
||||||
|
|
||||||
|
$AssetPlatform = if ("$Arch" -eq "ia32") { "win32" } else { "win32-x64" }
|
||||||
|
|
||||||
|
exec { node build/azure-pipelines/common/publish.js $Quality "$AssetPlatform-archive" archive "VSCode-win32-$Arch-$Version.zip" $Version true $Zip }
|
||||||
|
exec { node build/azure-pipelines/common/publish.js $Quality "$AssetPlatform" setup "VSCodeSetup-$Arch-$Version.exe" $Version true $SystemExe }
|
||||||
|
exec { node build/azure-pipelines/common/publish.js $Quality "$AssetPlatform-user" setup "VSCodeUserSetup-$Arch-$Version.exe" $Version true $UserExe }
|
||||||
|
exec { node build/azure-pipelines/common/publish.js $Quality "server-$AssetPlatform" archive "vscode-server-win32-$Arch.zip" $Version true $ServerZip }
|
||||||
|
|
||||||
|
# publish hockeyapp symbols
|
||||||
|
$hockeyAppId = if ("$Arch" -eq "ia32") { "$env:VSCODE_HOCKEYAPP_ID_WIN32" } else { "$env:VSCODE_HOCKEYAPP_ID_WIN64" }
|
||||||
|
exec { node build/azure-pipelines/common/symbols.js "$env:VSCODE_MIXIN_PASSWORD" "$env:VSCODE_HOCKEYAPP_TOKEN" "$Arch" $hockeyAppId }
|
||||||
@@ -87,9 +87,16 @@ const indentationFilter = [
|
|||||||
'!build/azure-pipelines/**/*.js',
|
'!build/azure-pipelines/**/*.js',
|
||||||
'!build/azure-pipelines/**/*.config',
|
'!build/azure-pipelines/**/*.config',
|
||||||
'!**/Dockerfile',
|
'!**/Dockerfile',
|
||||||
|
'!**/Dockerfile.*',
|
||||||
'!**/*.Dockerfile',
|
'!**/*.Dockerfile',
|
||||||
'!**/*.dockerfile',
|
'!**/*.dockerfile',
|
||||||
'!extensions/markdown-language-features/media/*.js'
|
'!extensions/markdown-language-features/media/*.js',
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
'!**/*.{xlf,docx,sql,vsix}',
|
||||||
|
'!extensions/mssql/sqltoolsservice/**',
|
||||||
|
'!extensions/import/flatfileimportservice/**',
|
||||||
|
'!extensions/admin-tool-ext-win/ssmsmin/**',
|
||||||
|
'!extensions/resource-deployment/notebooks/**'
|
||||||
];
|
];
|
||||||
|
|
||||||
const copyrightFilter = [
|
const copyrightFilter = [
|
||||||
@@ -118,7 +125,38 @@ const copyrightFilter = [
|
|||||||
'!resources/completions/**',
|
'!resources/completions/**',
|
||||||
'!extensions/markdown-language-features/media/highlight.css',
|
'!extensions/markdown-language-features/media/highlight.css',
|
||||||
'!extensions/html-language-features/server/src/modes/typescript/*',
|
'!extensions/html-language-features/server/src/modes/typescript/*',
|
||||||
'!extensions/*/server/bin/*'
|
'!extensions/*/server/bin/*',
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
'!extensions/notebook/src/intellisense/text.ts',
|
||||||
|
'!extensions/mssql/src/objectExplorerNodeProvider/webhdfs.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/outputs/tableRenderers.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/outputs/common/url.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/outputs/common/renderMimeInterfaces.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/outputs/common/outputProcessor.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/outputs/common/mimemodel.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/cellViews/media/*.css',
|
||||||
|
'!src/sql/base/browser/ui/table/plugins/rowSelectionModel.plugin.ts',
|
||||||
|
'!src/sql/base/browser/ui/table/plugins/rowDetailView.ts',
|
||||||
|
'!src/sql/base/browser/ui/table/plugins/headerFilter.plugin.ts',
|
||||||
|
'!src/sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin.ts',
|
||||||
|
'!src/sql/base/browser/ui/table/plugins/cellSelectionModel.plugin.ts',
|
||||||
|
'!src/sql/base/browser/ui/table/plugins/autoSizeColumns.plugin.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/outputs/sanitizer.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/outputs/renderers.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/outputs/registry.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/outputs/factories.ts',
|
||||||
|
'!src/sql/workbench/parts/notebook/models/nbformat.ts',
|
||||||
|
'!extensions/markdown-language-features/media/tomorrow.css',
|
||||||
|
'!src/sql/workbench/electron-browser/modelComponents/media/highlight.css',
|
||||||
|
'!src/sql/parts/modelComponents/highlight.css',
|
||||||
|
'!extensions/mssql/sqltoolsservice/**',
|
||||||
|
'!extensions/import/flatfileimportservice/**',
|
||||||
|
'!extensions/notebook/src/prompts/**',
|
||||||
|
'!extensions/mssql/src/prompts/**',
|
||||||
|
'!extensions/notebook/resources/jupyter_config/**',
|
||||||
|
'!**/*.gif',
|
||||||
|
'!**/*.xlf',
|
||||||
|
'!**/*.dacpac'
|
||||||
];
|
];
|
||||||
|
|
||||||
const eslintFilter = [
|
const eslintFilter = [
|
||||||
@@ -147,6 +185,11 @@ const tslintFilter = [
|
|||||||
'!extensions/html-language-features/server/lib/jquery.d.ts'
|
'!extensions/html-language-features/server/lib/jquery.d.ts'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
const useStrictFilter = [
|
||||||
|
'src/**'
|
||||||
|
];
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
const copyrightHeaderLines = [
|
const copyrightHeaderLines = [
|
||||||
'/*---------------------------------------------------------------------------------------------',
|
'/*---------------------------------------------------------------------------------------------',
|
||||||
@@ -164,8 +207,7 @@ gulp.task('eslint', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('tslint', () => {
|
gulp.task('tslint', () => {
|
||||||
// {{SQL CARBON EDIT}}
|
const options = { emitError: true };
|
||||||
const options = { emitError: false };
|
|
||||||
|
|
||||||
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
||||||
.pipe(filter(tslintFilter))
|
.pipe(filter(tslintFilter))
|
||||||
@@ -198,8 +240,8 @@ function hygiene(some) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const copyrights = es.through(function (file) {
|
const copyrights = es.through(function (file) {
|
||||||
const lines = file.__lines;
|
|
||||||
|
|
||||||
|
const lines = file.__lines;
|
||||||
for (let i = 0; i < copyrightHeaderLines.length; i++) {
|
for (let i = 0; i < copyrightHeaderLines.length; i++) {
|
||||||
if (lines[i] !== copyrightHeaderLines[i]) {
|
if (lines[i] !== copyrightHeaderLines[i]) {
|
||||||
console.error(file.relative + ': Missing or bad copyright statement');
|
console.error(file.relative + ': Missing or bad copyright statement');
|
||||||
@@ -211,6 +253,23 @@ function hygiene(some) {
|
|||||||
this.emit('data', file);
|
this.emit('data', file);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
// Check for unnecessary 'use strict' lines. These are automatically added by the alwaysStrict compiler option so don't need to be added manually
|
||||||
|
const useStrict = es.through(function (file) {
|
||||||
|
const lines = file.__lines;
|
||||||
|
// Only take the first 10 lines to reduce false positives- the compiler will throw an error if it's not the first non-comment line in a file
|
||||||
|
// (10 is used to account for copyright and extraneous newlines)
|
||||||
|
lines.slice(0, 10).forEach((line, i) => {
|
||||||
|
if (/\s*'use\s*strict\s*'/.test(line)) {
|
||||||
|
console.error(file.relative + '(' + (i + 1) + ',1): Unnecessary \'use strict\' - this is already added by the compiler');
|
||||||
|
errorCount++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.emit('data', file);
|
||||||
|
});
|
||||||
|
// {{SQL CARBON EDIT}} END
|
||||||
|
|
||||||
const formatting = es.map(function (file, cb) {
|
const formatting = es.map(function (file, cb) {
|
||||||
tsfmt.processString(file.path, file.contents.toString('utf8'), {
|
tsfmt.processString(file.path, file.contents.toString('utf8'), {
|
||||||
verify: false,
|
verify: false,
|
||||||
@@ -263,27 +322,52 @@ function hygiene(some) {
|
|||||||
.pipe(filter(f => !f.stat.isDirectory()))
|
.pipe(filter(f => !f.stat.isDirectory()))
|
||||||
.pipe(filter(indentationFilter))
|
.pipe(filter(indentationFilter))
|
||||||
.pipe(indentation)
|
.pipe(indentation)
|
||||||
.pipe(filter(copyrightFilter));
|
.pipe(filter(copyrightFilter))
|
||||||
// {{SQL CARBON EDIT}}
|
.pipe(copyrights);
|
||||||
// .pipe(copyrights);
|
|
||||||
|
|
||||||
const typescript = result
|
const typescript = result
|
||||||
.pipe(filter(tslintFilter))
|
.pipe(filter(tslintFilter))
|
||||||
.pipe(formatting)
|
.pipe(formatting)
|
||||||
.pipe(tsl);
|
.pipe(tsl)
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
.pipe(filter(useStrictFilter))
|
||||||
|
.pipe(useStrict);
|
||||||
|
|
||||||
const javascript = result
|
const javascript = result
|
||||||
.pipe(filter(eslintFilter))
|
.pipe(filter(eslintFilter))
|
||||||
.pipe(gulpeslint('src/.eslintrc'))
|
.pipe(gulpeslint('src/.eslintrc'))
|
||||||
.pipe(gulpeslint.formatEach('compact'));
|
.pipe(gulpeslint.formatEach('compact'))
|
||||||
// {{SQL CARBON EDIT}}
|
.pipe(gulpeslint.failAfterError());
|
||||||
// .pipe(gulpeslint.failAfterError());
|
|
||||||
|
|
||||||
let count = 0;
|
let count = 0;
|
||||||
return es.merge(typescript, javascript)
|
return es.merge(typescript, javascript)
|
||||||
.pipe(es.through(function (data) {
|
.pipe(es.through(function (data) {
|
||||||
// {{SQL CARBON EDIT}}
|
count++;
|
||||||
this.emit('end');
|
if (process.env['TRAVIS'] && count % 10 === 0) {
|
||||||
|
process.stdout.write('.');
|
||||||
|
}
|
||||||
|
this.emit('data', data);
|
||||||
|
}, function () {
|
||||||
|
process.stdout.write('\n');
|
||||||
|
|
||||||
|
const tslintResult = tsLinter.getResult();
|
||||||
|
if (tslintResult.failures.length > 0) {
|
||||||
|
for (const failure of tslintResult.failures) {
|
||||||
|
const name = failure.getFileName();
|
||||||
|
const position = failure.getStartPosition();
|
||||||
|
const line = position.getLineAndCharacter().line;
|
||||||
|
const character = position.getLineAndCharacter().character;
|
||||||
|
|
||||||
|
console.error(`${name}:${line + 1}:${character + 1}:${failure.getFailure()}`);
|
||||||
|
}
|
||||||
|
errorCount += tslintResult.failures.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (errorCount > 0) {
|
||||||
|
this.emit('error', 'Hygiene failed with ' + errorCount + ' errors. Check \'build/gulpfile.hygiene.js\'.');
|
||||||
|
} else {
|
||||||
|
this.emit('end');
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,7 +385,7 @@ function createGitIndexVinyls(paths) {
|
|||||||
return e(err);
|
return e(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
cp.exec(`git show :${relativePath}`, { maxBuffer: 2000 * 1024, encoding: 'buffer' }, (err, out) => {
|
cp.exec(`git show ":${relativePath}"`, { maxBuffer: 2000 * 1024, encoding: 'buffer' }, (err, out) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return e(err);
|
return e(err);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,21 +6,13 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const json = require('gulp-json-editor');
|
|
||||||
const buffer = require('gulp-buffer');
|
|
||||||
const filter = require('gulp-filter');
|
|
||||||
const es = require('event-stream');
|
|
||||||
const vfs = require('vinyl-fs');
|
|
||||||
const pkg = require('../package.json');
|
|
||||||
const cp = require('child_process');
|
|
||||||
const fancyLog = require('fancy-log');
|
|
||||||
const ansiColors = require('ansi-colors');
|
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
const jeditor = require('gulp-json-editor');
|
const jeditor = require('gulp-json-editor');
|
||||||
|
const product = require('../product.json');
|
||||||
|
|
||||||
gulp.task('mixin', function () {
|
gulp.task('mixin', function () {
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
const updateUrl = process.env['SQLOPS_UPDATEURL'];
|
const updateUrl = process.env['SQLOPS_UPDATEURL'];
|
||||||
if (!updateUrl) {
|
if (!updateUrl) {
|
||||||
console.log('Missing SQLOPS_UPDATEURL, skipping mixin');
|
console.log('Missing SQLOPS_UPDATEURL, skipping mixin');
|
||||||
@@ -34,19 +26,53 @@ gulp.task('mixin', function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}} - apply ADS insiders values if needed
|
||||||
let serviceUrl = 'https://sqlopsextensions.blob.core.windows.net/marketplace/v1/extensionsGallery.json';
|
|
||||||
if (quality === 'insider') {
|
|
||||||
serviceUrl = `https://sqlopsextensions.blob.core.windows.net/marketplace/v1/extensionsGallery-${quality}.json`;
|
|
||||||
}
|
|
||||||
let newValues = {
|
let newValues = {
|
||||||
|
"nameShort": product.nameShort,
|
||||||
|
"nameLong": product.nameLong,
|
||||||
|
"applicationName": product.applicationName,
|
||||||
|
"dataFolderName": product.dataFolderName,
|
||||||
|
"win32MutexName": product.win32MutexName,
|
||||||
|
"win32DirName": product.win32DirName,
|
||||||
|
"win32NameVersion": product.win32NameVersion,
|
||||||
|
"win32RegValueName": product.win32RegValueName,
|
||||||
|
"win32AppId": product.win32AppId,
|
||||||
|
"win32x64AppId": product.win32x64AppId,
|
||||||
|
"win32UserAppId": product.win32UserAppId,
|
||||||
|
"win32x64UserAppId": product.win32x64UserAppId,
|
||||||
|
"win32AppUserModelId": product.win32AppUserModelId,
|
||||||
|
"win32ShellNameShort": product.win32ShellNameShort,
|
||||||
|
"darwinBundleIdentifier": product.darwinBundleIdentifier,
|
||||||
"updateUrl": updateUrl,
|
"updateUrl": updateUrl,
|
||||||
"quality": quality,
|
"quality": quality,
|
||||||
"extensionsGallery": {
|
"extensionsGallery": {
|
||||||
"serviceUrl": serviceUrl
|
"serviceUrl": 'https://sqlopsextensions.blob.core.windows.net/marketplace/v1/extensionsGallery.json'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (quality === 'insider') {
|
||||||
|
let dashSuffix = '-insiders';
|
||||||
|
let dotSuffix = '.insiders';
|
||||||
|
let displaySuffix = ' - Insiders';
|
||||||
|
|
||||||
|
newValues.extensionsGallery.serviceUrl = `https://sqlopsextensions.blob.core.windows.net/marketplace/v1/extensionsGallery-${quality}.json`;
|
||||||
|
newValues.nameShort += dashSuffix;
|
||||||
|
newValues.nameLong += displaySuffix;
|
||||||
|
newValues.applicationName += dashSuffix;
|
||||||
|
newValues.dataFolderName += dashSuffix;
|
||||||
|
newValues.win32MutexName += dashSuffix;
|
||||||
|
newValues.win32DirName += displaySuffix;
|
||||||
|
newValues.win32NameVersion += displaySuffix;
|
||||||
|
newValues.win32RegValueName += dashSuffix;
|
||||||
|
newValues.win32AppId = "{{9F0801B2-DEE3-4272-A2C6-FBDF25BAAF0F}";
|
||||||
|
newValues.win32x64AppId = "{{6748A5FD-29EB-4BA6-B3C6-E7B981B8D6B0}";
|
||||||
|
newValues.win32UserAppId = "{{0F8CD1ED-483C-40EB-8AD2-8ED784651AA1}";
|
||||||
|
newValues.win32x64UserAppId += dashSuffix;
|
||||||
|
newValues.win32AppUserModelId += dotSuffix;
|
||||||
|
newValues.win32ShellNameShort += displaySuffix;
|
||||||
|
newValues.darwinBundleIdentifier += dotSuffix;
|
||||||
|
}
|
||||||
|
|
||||||
return gulp.src('./product.json')
|
return gulp.src('./product.json')
|
||||||
.pipe(jeditor(newValues))
|
.pipe(jeditor(newValues))
|
||||||
.pipe(gulp.dest('.'));
|
.pipe(gulp.dest('.'));
|
||||||
|
|||||||
@@ -3,18 +3,14 @@
|
|||||||
* 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 { IFileStat } from 'vs/platform/files/common/files';
|
'use strict';
|
||||||
|
|
||||||
export function getByName(root: IFileStat, name: string): IFileStat | null {
|
const gulp = require('gulp');
|
||||||
if (root.children === undefined) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const child of root.children) {
|
const noop = () => { return Promise.resolve(); };
|
||||||
if (child.name === name) {
|
|
||||||
return child;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
gulp.task('vscode-reh-win32-ia32-min', noop);
|
||||||
}
|
gulp.task('vscode-reh-win32-x64-min', noop);
|
||||||
|
gulp.task('vscode-reh-darwin-min', noop);
|
||||||
|
gulp.task('vscode-reh-linux-x64-min', noop);
|
||||||
|
gulp.task('vscode-reh-linux-arm-min', noop);
|
||||||
@@ -28,7 +28,6 @@ const formatFiles = (some) => {
|
|||||||
console.info('ran formatting on file ' + file.path + ' result: ' + result.message);
|
console.info('ran formatting on file ' + file.path + ' result: ' + result.message);
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
console.error(result.message);
|
console.error(result.message);
|
||||||
errorCount++;
|
|
||||||
}
|
}
|
||||||
cb(null, file);
|
cb(null, file);
|
||||||
|
|
||||||
@@ -40,7 +39,7 @@ const formatFiles = (some) => {
|
|||||||
.pipe(filter(f => !f.stat.isDirectory()))
|
.pipe(filter(f => !f.stat.isDirectory()))
|
||||||
.pipe(formatting);
|
.pipe(formatting);
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
const formatStagedFiles = () => {
|
const formatStagedFiles = () => {
|
||||||
const cp = require('child_process');
|
const cp = require('child_process');
|
||||||
@@ -81,4 +80,4 @@ const formatStagedFiles = () => {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
@@ -33,12 +33,10 @@ const i18n = require('./lib/i18n');
|
|||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
const serviceDownloader = require('service-downloader').ServiceDownloadProvider;
|
const serviceDownloader = require('service-downloader').ServiceDownloadProvider;
|
||||||
const platformInfo = require('service-downloader/out/platform').PlatformInformation;
|
const platformInfo = require('service-downloader/out/platform').PlatformInformation;
|
||||||
const glob = require('glob');
|
|
||||||
// {{SQL CARBON EDIT}} - End
|
// {{SQL CARBON EDIT}} - End
|
||||||
const deps = require('./dependencies');
|
const deps = require('./dependencies');
|
||||||
const getElectronVersion = require('./lib/electron').getElectronVersion;
|
const getElectronVersion = require('./lib/electron').getElectronVersion;
|
||||||
const createAsar = require('./lib/asar').createAsar;
|
const createAsar = require('./lib/asar').createAsar;
|
||||||
const minimist = require('minimist');
|
|
||||||
const { compileBuildTask } = require('./gulpfile.compile');
|
const { compileBuildTask } = require('./gulpfile.compile');
|
||||||
|
|
||||||
const productionDependencies = deps.getProductionDependencies(path.dirname(__dirname));
|
const productionDependencies = deps.getProductionDependencies(path.dirname(__dirname));
|
||||||
@@ -54,7 +52,7 @@ const nodeModules = [
|
|||||||
'rxjs/Observable',
|
'rxjs/Observable',
|
||||||
'rxjs/Subject',
|
'rxjs/Subject',
|
||||||
'rxjs/Observer',
|
'rxjs/Observer',
|
||||||
'ng2-charts/ng2-charts']
|
'ng2-charts']
|
||||||
.concat(Object.keys(product.dependencies || {}))
|
.concat(Object.keys(product.dependencies || {}))
|
||||||
.concat(_.uniq(productionDependencies.map(d => d.name)))
|
.concat(_.uniq(productionDependencies.map(d => d.name)))
|
||||||
.concat(baseModules);
|
.concat(baseModules);
|
||||||
@@ -77,14 +75,16 @@ const vscodeResources = [
|
|||||||
'out-build/bootstrap-window.js',
|
'out-build/bootstrap-window.js',
|
||||||
'out-build/paths.js',
|
'out-build/paths.js',
|
||||||
'out-build/vs/**/*.{svg,png,cur,html}',
|
'out-build/vs/**/*.{svg,png,cur,html}',
|
||||||
|
'!out-build/vs/code/browser/**/*.html',
|
||||||
'out-build/vs/base/common/performance.js',
|
'out-build/vs/base/common/performance.js',
|
||||||
'out-build/vs/base/node/languagePacks.js',
|
'out-build/vs/base/node/languagePacks.js',
|
||||||
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh}',
|
'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh,cpuUsage.sh,ps.sh}',
|
||||||
'out-build/vs/base/browser/ui/octiconLabel/octicons/**',
|
'out-build/vs/base/browser/ui/octiconLabel/octicons/**',
|
||||||
'out-build/vs/workbench/browser/media/*-theme.css',
|
'out-build/vs/workbench/browser/media/*-theme.css',
|
||||||
'out-build/vs/workbench/contrib/debug/**/*.json',
|
'out-build/vs/workbench/contrib/debug/**/*.json',
|
||||||
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
|
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
|
||||||
'out-build/vs/workbench/contrib/webview/electron-browser/webview-pre.js',
|
'out-build/vs/workbench/contrib/webview/browser/pre/*.js',
|
||||||
|
'out-build/vs/workbench/contrib/webview/electron-browser/pre/*.js',
|
||||||
'out-build/vs/**/markdown.css',
|
'out-build/vs/**/markdown.css',
|
||||||
'out-build/vs/workbench/contrib/tasks/**/*.json',
|
'out-build/vs/workbench/contrib/tasks/**/*.json',
|
||||||
'out-build/vs/workbench/contrib/welcome/walkThrough/**/*.md',
|
'out-build/vs/workbench/contrib/welcome/walkThrough/**/*.md',
|
||||||
@@ -102,19 +102,17 @@ const vscodeResources = [
|
|||||||
'out-build/sql/parts/admin/**/*.html',
|
'out-build/sql/parts/admin/**/*.html',
|
||||||
'out-build/sql/parts/connection/connectionDialog/media/*.{gif,png,svg}',
|
'out-build/sql/parts/connection/connectionDialog/media/*.{gif,png,svg}',
|
||||||
'out-build/sql/parts/common/dblist/**/*.html',
|
'out-build/sql/parts/common/dblist/**/*.html',
|
||||||
'out-build/sql/parts/dashboard/**/*.html',
|
'out-build/sql/workbench/parts/dashboard/**/*.html',
|
||||||
'out-build/sql/parts/disasterRecovery/**/*.html',
|
'out-build/sql/parts/disasterRecovery/**/*.html',
|
||||||
'out-build/sql/parts/common/modal/media/**',
|
'out-build/sql/parts/common/modal/media/**',
|
||||||
'out-build/sql/parts/grid/load/lib/**',
|
'out-build/sql/workbench/parts/grid/media/**',
|
||||||
'out-build/sql/parts/grid/load/loadJquery.js',
|
'out-build/sql/workbench/parts/grid/views/**/*.html',
|
||||||
'out-build/sql/parts/grid/media/**',
|
|
||||||
'out-build/sql/parts/grid/views/**/*.html',
|
|
||||||
'out-build/sql/parts/tasks/**/*.html',
|
'out-build/sql/parts/tasks/**/*.html',
|
||||||
'out-build/sql/parts/taskHistory/viewlet/media/**',
|
'out-build/sql/parts/taskHistory/viewlet/media/**',
|
||||||
'out-build/sql/parts/jobManagement/common/media/*.svg',
|
'out-build/sql/parts/jobManagement/common/media/*.svg',
|
||||||
'out-build/sql/media/objectTypes/*.svg',
|
'out-build/sql/media/objectTypes/*.svg',
|
||||||
'out-build/sql/media/icons/*.svg',
|
'out-build/sql/media/icons/*.svg',
|
||||||
'out-build/sql/parts/notebook/media/**/*.svg',
|
'out-build/sql/workbench/parts/notebook/media/**/*.svg',
|
||||||
'!**/test/**'
|
'!**/test/**'
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -337,33 +335,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
|||||||
|
|
||||||
const deps = gulp.src(depsSrc, { base: '.', dot: true })
|
const deps = gulp.src(depsSrc, { base: '.', dot: true })
|
||||||
.pipe(filter(['**', '!**/package-lock.json']))
|
.pipe(filter(['**', '!**/package-lock.json']))
|
||||||
.pipe(util.cleanNodeModule('fsevents', ['binding.gyp', 'fsevents.cc', 'build/**', 'src/**', 'test/**'], ['**/*.node']))
|
.pipe(util.cleanNodeModules(path.join(__dirname, '.nativeignore')))
|
||||||
.pipe(util.cleanNodeModule('vscode-sqlite3', ['binding.gyp', 'benchmark/**', 'cloudformation/**', 'deps/**', 'test/**', 'build/**', 'src/**'], ['build/Release/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('oniguruma', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/*.node', 'src/*.js']))
|
|
||||||
.pipe(util.cleanNodeModule('windows-mutex', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('native-keymap', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('native-is-elevated', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('native-watchdog', ['binding.gyp', 'build/**', 'src/**'], ['build/Release/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('spdlog', ['binding.gyp', 'build/**', 'deps/**', 'src/**', 'test/**'], ['build/Release/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('jschardet', ['dist/**']))
|
|
||||||
.pipe(util.cleanNodeModule('windows-foreground-love', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('windows-process-tree', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/*.node', 'src/index.js']))
|
|
||||||
.pipe(util.cleanNodeModule('keytar', ['binding.gyp', 'build/**', 'src/**', 'script/**', 'node_modules/**'], ['**/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/*.exe', 'build/Release/*.dll', 'build/Release/*.node']))
|
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
.pipe(util.cleanNodeModule('chart.js', ['node_modules/**'], undefined))
|
|
||||||
.pipe(util.cleanNodeModule('emmet', ['node_modules/**'], undefined))
|
|
||||||
.pipe(util.cleanNodeModule('pty.js', ['build/**'], ['build/Release/**']))
|
|
||||||
.pipe(util.cleanNodeModule('jquery-ui', ['external/**', 'demos/**'], undefined))
|
|
||||||
.pipe(util.cleanNodeModule('core-js', ['**/**'], undefined))
|
|
||||||
.pipe(util.cleanNodeModule('slickgrid', ['node_modules/**', 'examples/**'], undefined))
|
|
||||||
.pipe(util.cleanNodeModule('nsfw', ['binding.gyp', 'build/**', 'src/**', 'openpa/**', 'includes/**'], ['**/*.node', '**/*.a']))
|
|
||||||
.pipe(util.cleanNodeModule('vscode-nsfw', ['binding.gyp', 'build/**', 'src/**', 'openpa/**', 'includes/**'], ['**/*.node', '**/*.a']))
|
|
||||||
// {{SQL CARBON EDIT}} - End
|
|
||||||
.pipe(util.cleanNodeModule('vsda', ['binding.gyp', 'README.md', 'build/**', '*.bat', '*.sh', '*.cpp', '*.h'], ['build/Release/vsda.node']))
|
|
||||||
.pipe(util.cleanNodeModule('vscode-windows-ca-certs', ['**/*'], ['package.json', '**/*.node']))
|
|
||||||
.pipe(util.cleanNodeModule('node-addon-api', ['**/*']))
|
|
||||||
.pipe(createAsar(path.join(process.cwd(), 'node_modules'), ['**/*.node', '**/vscode-ripgrep/bin/*', '**/node-pty/build/Release/*'], 'app/node_modules.asar'));
|
.pipe(createAsar(path.join(process.cwd(), 'node_modules'), ['**/*.node', '**/vscode-ripgrep/bin/*', '**/node-pty/build/Release/*'], 'app/node_modules.asar'));
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
@@ -382,7 +354,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
|||||||
], { base: '.', dot: true });
|
], { base: '.', dot: true });
|
||||||
|
|
||||||
let all = es.merge(
|
let all = es.merge(
|
||||||
packageJsonStream,
|
packageJsonStream,
|
||||||
productJsonStream,
|
productJsonStream,
|
||||||
license,
|
license,
|
||||||
api,
|
api,
|
||||||
@@ -426,14 +398,18 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
|||||||
|
|
||||||
result = es.merge(result, gulp.src('resources/win32/bin/code.sh', { base: 'resources/win32' })
|
result = es.merge(result, gulp.src('resources/win32/bin/code.sh', { base: 'resources/win32' })
|
||||||
.pipe(replace('@@NAME@@', product.nameShort))
|
.pipe(replace('@@NAME@@', product.nameShort))
|
||||||
|
.pipe(replace('@@PRODNAME@@', product.nameLong))
|
||||||
|
.pipe(replace('@@VERSION@@', version))
|
||||||
.pipe(replace('@@COMMIT@@', commit))
|
.pipe(replace('@@COMMIT@@', commit))
|
||||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||||
|
.pipe(replace('@@QUALITY@@', quality))
|
||||||
.pipe(rename(function (f) { f.basename = product.applicationName; f.extname = ''; })));
|
.pipe(rename(function (f) { f.basename = product.applicationName; f.extname = ''; })));
|
||||||
|
|
||||||
result = es.merge(result, gulp.src('resources/win32/VisualElementsManifest.xml', { base: 'resources/win32' })
|
result = es.merge(result, gulp.src('resources/win32/VisualElementsManifest.xml', { base: 'resources/win32' })
|
||||||
.pipe(rename(product.nameShort + '.VisualElementsManifest.xml')));
|
.pipe(rename(product.nameShort + '.VisualElementsManifest.xml')));
|
||||||
} else if (platform === 'linux') {
|
} else if (platform === 'linux') {
|
||||||
result = es.merge(result, gulp.src('resources/linux/bin/code.sh', { base: '.' })
|
result = es.merge(result, gulp.src('resources/linux/bin/code.sh', { base: '.' })
|
||||||
|
.pipe(replace('@@PRODNAME@@', product.nameLong))
|
||||||
.pipe(replace('@@NAME@@', product.applicationName))
|
.pipe(replace('@@NAME@@', product.applicationName))
|
||||||
.pipe(rename('bin/' + product.applicationName)));
|
.pipe(rename('bin/' + product.applicationName)));
|
||||||
}
|
}
|
||||||
@@ -477,8 +453,6 @@ BUILD_TARGETS.forEach(buildTarget => {
|
|||||||
minified ? minifyVSCodeTask : optimizeVSCodeTask,
|
minified ? minifyVSCodeTask : optimizeVSCodeTask,
|
||||||
util.rimraf(path.join(buildRoot, destinationFolderName))
|
util.rimraf(path.join(buildRoot, destinationFolderName))
|
||||||
),
|
),
|
||||||
ext.packageExtensionTask('mssql', platform, arch),
|
|
||||||
ext.packageExtensionTask('azurecore', platform, arch),
|
|
||||||
packageTask(platform, arch, sourceFolderName, destinationFolderName, opts)
|
packageTask(platform, arch, sourceFolderName, destinationFolderName, opts)
|
||||||
));
|
));
|
||||||
gulp.task(vscodeTask);
|
gulp.task(vscodeTask);
|
||||||
@@ -703,3 +677,26 @@ function installService() {
|
|||||||
gulp.task('install-sqltoolsservice', () => {
|
gulp.task('install-sqltoolsservice', () => {
|
||||||
return installService();
|
return installService();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function installSsmsMin() {
|
||||||
|
const config = require('../extensions/admin-tool-ext-win/src/config.json');
|
||||||
|
return platformInfo.getCurrent().then(p => {
|
||||||
|
const runtime = p.runtimeId;
|
||||||
|
// fix path since it won't be correct
|
||||||
|
config.installDirectory = path.join(__dirname, '..', 'extensions', 'admin-tool-ext-win', config.installDirectory);
|
||||||
|
var installer = new serviceDownloader(config);
|
||||||
|
const serviceInstallFolder = installer.getInstallDirectory(runtime);
|
||||||
|
const serviceCleanupFolder = path.join(serviceInstallFolder, '..');
|
||||||
|
console.log('Cleaning up the install folder: ' + serviceCleanupFolder);
|
||||||
|
return del(serviceCleanupFolder + '/*').then(() => {
|
||||||
|
console.log('Installing the service. Install folder: ' + serviceInstallFolder);
|
||||||
|
return installer.installService(runtime);
|
||||||
|
}, delError => {
|
||||||
|
console.log('failed to delete the install folder error: ' + delError);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
gulp.task('install-ssmsmin', () => {
|
||||||
|
return installSsmsMin();
|
||||||
|
});
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ function getDebPackageArch(arch) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function prepareDebPackage(arch) {
|
function prepareDebPackage(arch) {
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
const binaryDir = '../azuredatastudio-linux-' + arch;
|
const binaryDir = '../azuredatastudio-linux-' + arch;
|
||||||
const debArch = getDebPackageArch(arch);
|
const debArch = getDebPackageArch(arch);
|
||||||
const destination = '.build/linux/deb/' + debArch + '/' + product.applicationName + '-' + debArch;
|
const destination = '.build/linux/deb/' + debArch + '/' + product.applicationName + '-' + debArch;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const zipPath = arch => path.join(zipDir(arch), `VSCode-win32-${arch}.zip`);
|
|||||||
const setupDir = (arch, target) => path.join(repoPath, '.build', `win32-${arch}`, `${target}-setup`);
|
const setupDir = (arch, target) => path.join(repoPath, '.build', `win32-${arch}`, `${target}-setup`);
|
||||||
const issPath = path.join(__dirname, 'win32', 'code.iss');
|
const issPath = path.join(__dirname, 'win32', 'code.iss');
|
||||||
const innoSetupPath = path.join(path.dirname(path.dirname(require.resolve('innosetup-compiler'))), 'bin', 'ISCC.exe');
|
const innoSetupPath = path.join(path.dirname(path.dirname(require.resolve('innosetup-compiler'))), 'bin', 'ISCC.exe');
|
||||||
const signPS1 = path.join(repoPath, 'build', 'azure-pipelines', 'win32', 'sign.ps1');
|
// const signPS1 = path.join(repoPath, 'build', 'azure-pipelines', 'win32', 'sign.ps1');
|
||||||
|
|
||||||
function packageInnoSetup(iss, options, cb) {
|
function packageInnoSetup(iss, options, cb) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|||||||
@@ -40,8 +40,19 @@ function packageBuiltInExtensions() {
|
|||||||
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) >= 0);
|
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) >= 0);
|
||||||
|
const visxDirectory = path.join(path.dirname(root), 'vsix');
|
||||||
|
try {
|
||||||
|
if (!fs.existsSync(visxDirectory)) {
|
||||||
|
fs.mkdirSync(visxDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
// don't fail the build if the output directory already exists
|
||||||
|
console.warn(err);
|
||||||
|
}
|
||||||
sqlBuiltInLocalExtensionDescriptions.forEach(element => {
|
sqlBuiltInLocalExtensionDescriptions.forEach(element => {
|
||||||
const packagePath = path.join(path.dirname(root), element.name + '.vsix');
|
let pkgJson = JSON.parse(fs.readFileSync(path.join(element.path, 'package.json'), { encoding: 'utf8' }));
|
||||||
|
const packagePath = path.join(visxDirectory, `${pkgJson.name}-${pkgJson.version}.vsix`);
|
||||||
console.info('Creating vsix for ' + element.path + ' result:' + packagePath);
|
console.info('Creating vsix for ' + element.path + ' result:' + packagePath);
|
||||||
vsce.createVSIX({
|
vsce.createVSIX({
|
||||||
cwd: element.path,
|
cwd: element.path,
|
||||||
@@ -237,6 +248,7 @@ exports.fromMarketplace = fromMarketplace;
|
|||||||
const excludedExtensions = [
|
const excludedExtensions = [
|
||||||
'vscode-api-tests',
|
'vscode-api-tests',
|
||||||
'vscode-colorize-tests',
|
'vscode-colorize-tests',
|
||||||
|
'vscode-test-resolver',
|
||||||
'ms-vscode.node-debug',
|
'ms-vscode.node-debug',
|
||||||
'ms-vscode.node-debug2',
|
'ms-vscode.node-debug2',
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
@@ -252,9 +264,11 @@ const sqlBuiltInExtensions = [
|
|||||||
'profiler',
|
'profiler',
|
||||||
'admin-pack',
|
'admin-pack',
|
||||||
'big-data-cluster',
|
'big-data-cluster',
|
||||||
'dacpac'
|
'dacpac',
|
||||||
|
'schema-compare',
|
||||||
|
'resource-deployment',
|
||||||
|
'cms'
|
||||||
];
|
];
|
||||||
var azureExtensions = ['azurecore', 'mssql'];
|
|
||||||
const builtInExtensions = require('../builtInExtensions.json');
|
const builtInExtensions = require('../builtInExtensions.json');
|
||||||
/**
|
/**
|
||||||
* We're doing way too much stuff at once, with webpack et al. So much stuff
|
* We're doing way too much stuff at once, with webpack et al. So much stuff
|
||||||
@@ -290,8 +304,7 @@ function packageExtensionsStream(optsIn) {
|
|||||||
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) === -1)
|
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) === -1);
|
||||||
.filter(({ name }) => azureExtensions.indexOf(name) === -1);
|
|
||||||
const localExtensions = () => sequence([...localExtensionDescriptions.map(extension => () => {
|
const localExtensions = () => sequence([...localExtensionDescriptions.map(extension => () => {
|
||||||
return fromLocal(extension.path, opts.sourceMappingURLBase)
|
return fromLocal(extension.path, opts.sourceMappingURLBase)
|
||||||
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
.pipe(rename(p => p.dirname = `extensions/${extension.name}/${p.dirname}`));
|
||||||
@@ -301,9 +314,7 @@ function packageExtensionsStream(optsIn) {
|
|||||||
..._.flatten(extensionsProductionDependencies.map((d) => path.relative(root, d.path)).map((d) => [`${d}/**`, `!${d}/**/{test,tests}/**`])),
|
..._.flatten(extensionsProductionDependencies.map((d) => path.relative(root, d.path)).map((d) => [`${d}/**`, `!${d}/**/{test,tests}/**`])),
|
||||||
];
|
];
|
||||||
const localExtensionDependencies = () => gulp.src(extensionDepsSrc, { base: '.', dot: true })
|
const localExtensionDependencies = () => gulp.src(extensionDepsSrc, { base: '.', dot: true })
|
||||||
.pipe(filter(['**', '!**/package-lock.json']))
|
.pipe(filter(['**', '!**/package-lock.json']));
|
||||||
.pipe(util2.cleanNodeModule('account-provider-azure', ['node_modules/date-utils/doc/**', 'node_modules/adal_node/node_modules/**'], undefined))
|
|
||||||
.pipe(util2.cleanNodeModule('typescript', ['**/**'], undefined));
|
|
||||||
// Original code commented out here
|
// Original code commented out here
|
||||||
// const localExtensionDependencies = () => gulp.src('extensions/node_modules/**', { base: '.' });
|
// const localExtensionDependencies = () => gulp.src('extensions/node_modules/**', { base: '.' });
|
||||||
// const marketplaceExtensions = () => es.merge(
|
// const marketplaceExtensions = () => es.merge(
|
||||||
|
|||||||
@@ -43,8 +43,18 @@ export function packageBuiltInExtensions() {
|
|||||||
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) >= 0);
|
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) >= 0);
|
||||||
|
const visxDirectory = path.join(path.dirname(root), 'vsix');
|
||||||
|
try {
|
||||||
|
if (!fs.existsSync(visxDirectory)) {
|
||||||
|
fs.mkdirSync(visxDirectory);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
// don't fail the build if the output directory already exists
|
||||||
|
console.warn(err);
|
||||||
|
}
|
||||||
sqlBuiltInLocalExtensionDescriptions.forEach(element => {
|
sqlBuiltInLocalExtensionDescriptions.forEach(element => {
|
||||||
const packagePath = path.join(path.dirname(root), element.name + '.vsix');
|
let pkgJson = JSON.parse(fs.readFileSync(path.join(element.path, 'package.json'), { encoding: 'utf8' }));
|
||||||
|
const packagePath = path.join(visxDirectory, `${pkgJson.name}-${pkgJson.version}.vsix`);
|
||||||
console.info('Creating vsix for ' + element.path + ' result:' + packagePath);
|
console.info('Creating vsix for ' + element.path + ' result:' + packagePath);
|
||||||
vsce.createVSIX({
|
vsce.createVSIX({
|
||||||
cwd: element.path,
|
cwd: element.path,
|
||||||
@@ -283,6 +293,7 @@ interface IPackageExtensionsOptions {
|
|||||||
const excludedExtensions = [
|
const excludedExtensions = [
|
||||||
'vscode-api-tests',
|
'vscode-api-tests',
|
||||||
'vscode-colorize-tests',
|
'vscode-colorize-tests',
|
||||||
|
'vscode-test-resolver',
|
||||||
'ms-vscode.node-debug',
|
'ms-vscode.node-debug',
|
||||||
'ms-vscode.node-debug2',
|
'ms-vscode.node-debug2',
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
@@ -299,9 +310,11 @@ const sqlBuiltInExtensions = [
|
|||||||
'profiler',
|
'profiler',
|
||||||
'admin-pack',
|
'admin-pack',
|
||||||
'big-data-cluster',
|
'big-data-cluster',
|
||||||
'dacpac'
|
'dacpac',
|
||||||
|
'schema-compare',
|
||||||
|
'resource-deployment',
|
||||||
|
'cms'
|
||||||
];
|
];
|
||||||
var azureExtensions = ['azurecore', 'mssql'];
|
|
||||||
// {{SQL CARBON EDIT}} - End
|
// {{SQL CARBON EDIT}} - End
|
||||||
|
|
||||||
interface IBuiltInExtension {
|
interface IBuiltInExtension {
|
||||||
@@ -350,8 +363,7 @@ export function packageExtensionsStream(optsIn?: IPackageExtensionsOptions): Nod
|
|||||||
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
.filter(({ name }) => opts.desiredExtensions ? opts.desiredExtensions.indexOf(name) >= 0 : true)
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) === -1)
|
.filter(({ name }) => sqlBuiltInExtensions.indexOf(name) === -1);
|
||||||
.filter(({ name }) => azureExtensions.indexOf(name) === -1);
|
|
||||||
|
|
||||||
const localExtensions = () => sequence([...localExtensionDescriptions.map(extension => () => {
|
const localExtensions = () => sequence([...localExtensionDescriptions.map(extension => () => {
|
||||||
return fromLocal(extension.path, opts.sourceMappingURLBase)
|
return fromLocal(extension.path, opts.sourceMappingURLBase)
|
||||||
@@ -364,9 +376,7 @@ export function packageExtensionsStream(optsIn?: IPackageExtensionsOptions): Nod
|
|||||||
];
|
];
|
||||||
|
|
||||||
const localExtensionDependencies = () => gulp.src(extensionDepsSrc, { base: '.', dot: true })
|
const localExtensionDependencies = () => gulp.src(extensionDepsSrc, { base: '.', dot: true })
|
||||||
.pipe(filter(['**', '!**/package-lock.json']))
|
.pipe(filter(['**', '!**/package-lock.json']))
|
||||||
.pipe(util2.cleanNodeModule('account-provider-azure', ['node_modules/date-utils/doc/**', 'node_modules/adal_node/node_modules/**'], undefined))
|
|
||||||
.pipe(util2.cleanNodeModule('typescript', ['**/**'], undefined));
|
|
||||||
|
|
||||||
// Original code commented out here
|
// Original code commented out here
|
||||||
// const localExtensionDependencies = () => gulp.src('extensions/node_modules/**', { base: '.' });
|
// const localExtensionDependencies = () => gulp.src('extensions/node_modules/**', { base: '.' });
|
||||||
|
|||||||
@@ -110,6 +110,10 @@
|
|||||||
"name": "vs/workbench/contrib/quickopen",
|
"name": "vs/workbench/contrib/quickopen",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "vs/workbench/contrib/remote",
|
||||||
|
"project": "vscode-workbench"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "vs/workbench/contrib/relauncher",
|
"name": "vs/workbench/contrib/relauncher",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
@@ -222,10 +226,6 @@
|
|||||||
"name": "vs/workbench/services/files",
|
"name": "vs/workbench/services/files",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "vs/workbench/services/files2",
|
|
||||||
"project": "vscode-workbench"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vs/workbench/services/integrity",
|
"name": "vs/workbench/services/integrity",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function log(message: any, ...rest: any[]): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface Language {
|
export interface Language {
|
||||||
id: string; // laguage id, e.g. zh-tw, de
|
id: string; // language id, e.g. zh-tw, de
|
||||||
translationId?: string; // language id used in translation tools, e.g zh-hant, de (optional, if not set, the id is used)
|
translationId?: string; // language id used in translation tools, e.g zh-hant, de (optional, if not set, the id is used)
|
||||||
folderName?: string; // language specific folder name, e.g. cht, deu (optional, if not set, the id is used)
|
folderName?: string; // language specific folder name, e.g. cht, deu (optional, if not set, the id is used)
|
||||||
}
|
}
|
||||||
@@ -1378,4 +1378,4 @@ function decodeEntities(value: string): string {
|
|||||||
|
|
||||||
function pseudify(message: string) {
|
function pseudify(message: string) {
|
||||||
return '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';
|
return '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ function extractEditor(options) {
|
|||||||
compilerOptions.noUnusedLocals = false;
|
compilerOptions.noUnusedLocals = false;
|
||||||
compilerOptions.preserveConstEnums = false;
|
compilerOptions.preserveConstEnums = false;
|
||||||
compilerOptions.declaration = false;
|
compilerOptions.declaration = false;
|
||||||
|
compilerOptions.noImplicitAny = false;
|
||||||
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
|
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
|
||||||
options.compilerOptions = compilerOptions;
|
options.compilerOptions = compilerOptions;
|
||||||
let result = tss.shake(options);
|
let result = tss.shake(options);
|
||||||
@@ -90,6 +91,8 @@ function extractEditor(options) {
|
|||||||
}
|
}
|
||||||
delete tsConfig.compilerOptions.moduleResolution;
|
delete tsConfig.compilerOptions.moduleResolution;
|
||||||
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
|
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
|
||||||
|
const tsConfigBase = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.base.json')).toString());
|
||||||
|
writeOutputFile('tsconfig.base.json', JSON.stringify(tsConfigBase, null, '\t'));
|
||||||
[
|
[
|
||||||
'vs/css.build.js',
|
'vs/css.build.js',
|
||||||
'vs/css.d.ts',
|
'vs/css.d.ts',
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
|
|||||||
compilerOptions.noUnusedLocals = false;
|
compilerOptions.noUnusedLocals = false;
|
||||||
compilerOptions.preserveConstEnums = false;
|
compilerOptions.preserveConstEnums = false;
|
||||||
compilerOptions.declaration = false;
|
compilerOptions.declaration = false;
|
||||||
|
compilerOptions.noImplicitAny = false;
|
||||||
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
|
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Classic;
|
||||||
|
|
||||||
|
|
||||||
@@ -99,6 +100,8 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
|
|||||||
|
|
||||||
delete tsConfig.compilerOptions.moduleResolution;
|
delete tsConfig.compilerOptions.moduleResolution;
|
||||||
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
|
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
|
||||||
|
const tsConfigBase = JSON.parse(fs.readFileSync(path.join(options.sourcesRoot, 'tsconfig.base.json')).toString());
|
||||||
|
writeOutputFile('tsconfig.base.json', JSON.stringify(tsConfigBase, null, '\t'));
|
||||||
|
|
||||||
[
|
[
|
||||||
'vs/css.build.js',
|
'vs/css.build.js',
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ async function _doExecute(task) {
|
|||||||
// Always invoke as if it were a callback task
|
// Always invoke as if it were a callback task
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (task.length === 1) {
|
if (task.length === 1) {
|
||||||
// this is a calback task
|
// this is a callback task
|
||||||
task((err) => {
|
task((err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return reject(err);
|
return reject(err);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ async function _doExecute(task: Task): Promise<void> {
|
|||||||
// Always invoke as if it were a callback task
|
// Always invoke as if it were a callback task
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (task.length === 1) {
|
if (task.length === 1) {
|
||||||
// this is a calback task
|
// this is a callback task
|
||||||
task((err) => {
|
task((err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return reject(err);
|
return reject(err);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/*---------------------------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the MIT License. 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.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const ts = require("typescript");
|
const ts = require("typescript");
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the MIT License. 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 * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ const es = require("event-stream");
|
|||||||
const debounce = require("debounce");
|
const debounce = require("debounce");
|
||||||
const _filter = require("gulp-filter");
|
const _filter = require("gulp-filter");
|
||||||
const rename = require("gulp-rename");
|
const rename = require("gulp-rename");
|
||||||
const _ = require("underscore");
|
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const _rimraf = require("rimraf");
|
const _rimraf = require("rimraf");
|
||||||
@@ -100,22 +99,18 @@ function skipDirectories() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.skipDirectories = skipDirectories;
|
exports.skipDirectories = skipDirectories;
|
||||||
function cleanNodeModule(name, excludes, includes) {
|
function cleanNodeModules(rulePath) {
|
||||||
const toGlob = (path) => '**/node_modules/' + name + (path ? '/' + path : '');
|
const rules = fs.readFileSync(rulePath, 'utf8')
|
||||||
const negate = (str) => '!' + str;
|
.split(/\r?\n/g)
|
||||||
const allFilter = _filter(toGlob('**'), { restore: true });
|
.map(line => line.trim())
|
||||||
const globs = [toGlob('**')].concat(excludes.map(_.compose(negate, toGlob)));
|
.filter(line => line && !/^#/.test(line));
|
||||||
|
const excludes = rules.filter(line => !/^!/.test(line)).map(line => `!**/node_modules/${line}`);
|
||||||
|
const includes = rules.filter(line => /^!/.test(line)).map(line => `**/node_modules/${line.substr(1)}`);
|
||||||
const input = es.through();
|
const input = es.through();
|
||||||
const nodeModuleInput = input.pipe(allFilter);
|
const output = es.merge(input.pipe(_filter(['**', ...excludes])), input.pipe(_filter(includes)));
|
||||||
let output = nodeModuleInput.pipe(_filter(globs));
|
|
||||||
if (includes) {
|
|
||||||
const includeGlobs = includes.map(toGlob);
|
|
||||||
output = es.merge(output, nodeModuleInput.pipe(_filter(includeGlobs)));
|
|
||||||
}
|
|
||||||
output = output.pipe(allFilter.restore);
|
|
||||||
return es.duplex(input, output);
|
return es.duplex(input, output);
|
||||||
}
|
}
|
||||||
exports.cleanNodeModule = cleanNodeModule;
|
exports.cleanNodeModules = cleanNodeModules;
|
||||||
function loadSourcemaps() {
|
function loadSourcemaps() {
|
||||||
const input = es.through();
|
const input = es.through();
|
||||||
const output = input
|
const output = input
|
||||||
|
|||||||
@@ -132,23 +132,21 @@ export function skipDirectories(): NodeJS.ReadWriteStream {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function cleanNodeModule(name: string, excludes: string[], includes?: string[]): NodeJS.ReadWriteStream {
|
export function cleanNodeModules(rulePath: string): NodeJS.ReadWriteStream {
|
||||||
const toGlob = (path: string) => '**/node_modules/' + name + (path ? '/' + path : '');
|
const rules = fs.readFileSync(rulePath, 'utf8')
|
||||||
const negate = (str: string) => '!' + str;
|
.split(/\r?\n/g)
|
||||||
|
.map(line => line.trim())
|
||||||
|
.filter(line => line && !/^#/.test(line));
|
||||||
|
|
||||||
const allFilter = _filter(toGlob('**'), { restore: true });
|
const excludes = rules.filter(line => !/^!/.test(line)).map(line => `!**/node_modules/${line}`);
|
||||||
const globs = [toGlob('**')].concat(excludes.map(_.compose(negate, toGlob) as (x: string) => string));
|
const includes = rules.filter(line => /^!/.test(line)).map(line => `**/node_modules/${line.substr(1)}`);
|
||||||
|
|
||||||
const input = es.through();
|
const input = es.through();
|
||||||
const nodeModuleInput = input.pipe(allFilter);
|
const output = es.merge(
|
||||||
let output: NodeJS.ReadWriteStream = nodeModuleInput.pipe(_filter(globs));
|
input.pipe(_filter(['**', ...excludes])),
|
||||||
|
input.pipe(_filter(includes))
|
||||||
|
);
|
||||||
|
|
||||||
if (includes) {
|
|
||||||
const includeGlobs = includes.map(toGlob);
|
|
||||||
output = es.merge(output, nodeModuleInput.pipe(_filter(includeGlobs)));
|
|
||||||
}
|
|
||||||
|
|
||||||
output = output.pipe(allFilter.restore);
|
|
||||||
return es.duplex(input, output);
|
return es.duplex(input, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ function yarnInstall(location, opts) {
|
|||||||
|
|
||||||
yarnInstall('extensions'); // node modules shared by all extensions
|
yarnInstall('extensions'); // node modules shared by all extensions
|
||||||
|
|
||||||
|
yarnInstall('remote'); // node modules used by vscode server
|
||||||
|
|
||||||
const allExtensionFolders = fs.readdirSync('extensions');
|
const allExtensionFolders = fs.readdirSync('extensions');
|
||||||
const extensions = allExtensionFolders.filter(e => {
|
const extensions = allExtensionFolders.filter(e => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ function update(options) {
|
|||||||
let translationPaths = [];
|
let translationPaths = [];
|
||||||
i18n.pullI18nPackFiles(server, userName, apiToken, { id: languageId }, translationPaths)
|
i18n.pullI18nPackFiles(server, userName, apiToken, { id: languageId }, translationPaths)
|
||||||
.on('error', (error) => {
|
.on('error', (error) => {
|
||||||
console.log(`Error occured while importing translations:`);
|
console.log(`Error occurred while importing translations:`);
|
||||||
translationPaths = undefined;
|
translationPaths = undefined;
|
||||||
if (Array.isArray(error)) {
|
if (Array.isArray(error)) {
|
||||||
error.forEach(console.log);
|
error.forEach(console.log);
|
||||||
@@ -100,7 +100,7 @@ function update(options) {
|
|||||||
gulp.src(path.join(location, languageId, '**', '*.xlf'))
|
gulp.src(path.join(location, languageId, '**', '*.xlf'))
|
||||||
.pipe(i18n.prepareI18nPackFiles(i18n.externalExtensionsWithTranslations, translationPaths, languageId === 'ps'))
|
.pipe(i18n.prepareI18nPackFiles(i18n.externalExtensionsWithTranslations, translationPaths, languageId === 'ps'))
|
||||||
.on('error', (error) => {
|
.on('error', (error) => {
|
||||||
console.log(`Error occured while importing translations:`);
|
console.log(`Error occurred while importing translations:`);
|
||||||
translationPaths = undefined;
|
translationPaths = undefined;
|
||||||
if (Array.isArray(error)) {
|
if (Array.isArray(error)) {
|
||||||
error.forEach(console.log);
|
error.forEach(console.log);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
"request": "^2.85.0",
|
"request": "^2.85.0",
|
||||||
"tslint": "^5.9.1",
|
"tslint": "^5.9.1",
|
||||||
"service-downloader": "github:anthonydresser/service-downloader#0.1.5",
|
"service-downloader": "github:anthonydresser/service-downloader#0.1.5",
|
||||||
"typescript": "3.3.1",
|
"typescript": "3.4.5",
|
||||||
"vsce": "1.48.0",
|
"vsce": "1.48.0",
|
||||||
"xml2js": "^0.4.17"
|
"xml2js": "^0.4.17"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
// enable JavaScript type checking for the language service
|
// enable JavaScript type checking for the language service
|
||||||
// use the tsconfig.build.json for compiling wich disable JavaScript
|
// use the tsconfig.build.json for compiling which disable JavaScript
|
||||||
// type checking so that JavaScript file are not transpiled
|
// type checking so that JavaScript file are not transpiled
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"checkJs": true,
|
"checkJs": true,
|
||||||
@@ -22,4 +22,4 @@
|
|||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules/**"
|
"node_modules/**"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ Type: files; Name: "{app}\resources\app\Credits_45.0.2454.85.html"; Check: IsNot
|
|||||||
Type: filesandordirs; Name: "{app}\_"
|
Type: filesandordirs; Name: "{app}\_"
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce; Check: IsNotUpdate
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked;
|
||||||
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
|
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
|
||||||
Name: "associatewithfiles"; Description: "{cm:AssociateWithFiles,{#NameLong}}"; GroupDescription: "{cm:Other}"; Flags: unchecked
|
Name: "associatewithfiles"; Description: "{cm:AssociateWithFiles,{#NameLong}}"; GroupDescription: "{cm:Other}"; Flags: unchecked
|
||||||
Name: "addtopath"; Description: "{cm:AddToPath}"; GroupDescription: "{cm:Other}"
|
Name: "addtopath"; Description: "{cm:AddToPath}"; GroupDescription: "{cm:Other}"
|
||||||
@@ -133,7 +133,7 @@ begin
|
|||||||
|
|
||||||
#if "user" == InstallTarget
|
#if "user" == InstallTarget
|
||||||
if not WizardSilent() and IsAdminLoggedOn() then begin
|
if not WizardSilent() and IsAdminLoggedOn() then begin
|
||||||
if MsgBox('This User Installer is not meant to be run as an Administrator. If you would like to install VS Code for all users in this system, download the System Installer instead from https://code.visualstudio.com. Are you sure you want to continue?', mbError, MB_OKCANCEL) = IDCANCEL then begin
|
if MsgBox('This User Installer is not meant to be run as an Administrator. If you would like to install Azure Data Studio for all users in this system, download the System Installer instead from https://docs.microsoft.com/sql/azure-data-studio/download. Are you sure you want to continue?', mbError, MB_OKCANCEL) = IDCANCEL then begin
|
||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@@ -3201,10 +3201,10 @@ typed-rest-client@^0.9.0:
|
|||||||
tunnel "0.0.4"
|
tunnel "0.0.4"
|
||||||
underscore "1.8.3"
|
underscore "1.8.3"
|
||||||
|
|
||||||
typescript@3.3.1:
|
typescript@3.4.5:
|
||||||
version "3.3.1"
|
version "3.4.5"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.1.tgz#6de14e1db4b8a006ac535e482c8ba018c55f750b"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"
|
||||||
integrity sha512-cTmIDFW7O0IHbn1DPYjkiebHxwtCMU+eTy30ZtJNBPF9j2O1ITu5XH2YnBeVRKWHqF+3JQwWJv0Q0aUgX8W7IA==
|
integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==
|
||||||
|
|
||||||
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
|
|||||||
@@ -73,12 +73,12 @@
|
|||||||
"git": {
|
"git": {
|
||||||
"name": "electron",
|
"name": "electron",
|
||||||
"repositoryUrl": "https://github.com/electron/electron",
|
"repositoryUrl": "https://github.com/electron/electron",
|
||||||
"commitHash": "73158a6419a3e2da9e4d523e1131052abd28fbbb"
|
"commitHash": "e84a6860e35e14b4031b88bb9b49841cdb89a305"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"isOnlyProductionDependency": true,
|
"isOnlyProductionDependency": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "3.1.6"
|
"version": "3.1.8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"component": {
|
"component": {
|
||||||
@@ -111,11 +111,11 @@
|
|||||||
"git": {
|
"git": {
|
||||||
"name": "vscode-octicons-font",
|
"name": "vscode-octicons-font",
|
||||||
"repositoryUrl": "https://github.com/Microsoft/vscode-octicons-font",
|
"repositoryUrl": "https://github.com/Microsoft/vscode-octicons-font",
|
||||||
"commitHash": "5095860bb929919670646e2dfa0ee47d9b93bcb9"
|
"commitHash": "4f69de3a233ed501c2098e33047e116ac2fbbf42"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "1.0.0"
|
"version": "1.1.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"component": {
|
"component": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
out/test/**
|
out/test/**
|
||||||
src/**
|
src/**
|
||||||
ssmsmin/**
|
|
||||||
.gitignore
|
.gitignore
|
||||||
tsconfig.json
|
tsconfig.json
|
||||||
|
InstallSsmsMin.bat
|
||||||
4
extensions/admin-tool-ext-win/InstallSsmsMin.bat
Normal file
4
extensions/admin-tool-ext-win/InstallSsmsMin.bat
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
REM Run this command to install SsmsMin for local development testing
|
||||||
|
gulp install-ssmsmin
|
||||||
@@ -1,9 +1,26 @@
|
|||||||
# Database Admin Tool Extensions for Windows
|
# Database Admin Tool Extensions for Windows *(preview)*
|
||||||
|
|
||||||
This adds Windows-specific functionality into Azure Data Studio.
|
The Database Admin Tool Extensions for Windows adds Windows-specific functionality into Azure Data Studio. Currently this
|
||||||
|
functionality includes the ability to launch a set of SQL Server Management Studio experiences directly from Azure Data Studio.
|
||||||
|
|
||||||
|
These experiences include:
|
||||||
|
|
||||||
|
* SSMS Property dialogs for select object types, such as Databases, Views, Stored Procedures and more
|
||||||
|
* The [Generate Scripts Wizard](https://docs.microsoft.com/en-us/sql/ssms/scripting/generate-and-publish-scripts-wizard)
|
||||||
|
|
||||||
|
### How do I launch these experiences?
|
||||||
|
|
||||||
|
Both of these are available as menu items on the context menu for nodes in the Object Explorer tree. Right click on a node that supports one of the experiences and select the appropriate item.
|
||||||
|
|
||||||
|
**Properties** for the property dialogs of supported object types
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**Generate Scripts...** for the Generate Scripts Wizard (only available on Database nodes)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Code of Conduct
|
## Code of Conduct
|
||||||
|
|
||||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||||
|
|
||||||
## Privacy Statement
|
## Privacy Statement
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
MICROSOFT SOFTWARE LICENSE TERMS
|
||||||
|
MICROSOFT AZURE DATA STUDIO EXTENSION
|
||||||
|
________________________________________
|
||||||
|
These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the software named above and any Microsoft services or software updates (except to the extent such services or updates are accompanied by new or additional terms, in which case those different terms apply prospectively and do not alter your or Microsoft’s rights relating to pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.
|
||||||
|
|
||||||
|
1. INSTALLATION AND USE RIGHTS.
|
||||||
|
|
||||||
|
a) General. You may install and use one copy of the software on your device.
|
||||||
|
|
||||||
|
b) Third Party Software. The software may include third party applications that are licensed to you under this agreement or under their own terms. License terms, notices, and acknowledgements, if any, for the third party applications may be accessible online at http://aka.ms/thirdpartynotices or in an accompanying notices file. Even if such applications are governed by other agreements, the disclaimer, limitations on, and exclusions of damages below also apply to the extent allowed by applicable law.
|
||||||
|
|
||||||
|
2. DISTRIBUTABLE CODE. The software may contain code you are permitted to distribute (i.e. make available for third parties) in applications you develop, as described in this Section.
|
||||||
|
|
||||||
|
a) Distribution Rights. The code and files described below are distributable if included with the software.
|
||||||
|
|
||||||
|
i. Sample Code, Templates, and Styles. You may copy, modify, and distribute the source and object code form of code marked as “sample”, “template”, “simple styles”, and “sketch styles”.
|
||||||
|
|
||||||
|
ii. Third Party Distribution. You may permit distributors of your applications to copy and distribute any of this distributable code you elect to distribute with your applications.
|
||||||
|
|
||||||
|
b) Distribution Requirements. For any code you distribute, you must:
|
||||||
|
|
||||||
|
i. add significant primary functionality to it in your applications;
|
||||||
|
|
||||||
|
ii. require distributors and external end users to agree to terms that protect it and Microsoft at least as much as this agreement; and
|
||||||
|
|
||||||
|
iii. indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your applications, except to the extent that any claim is based solely on the unmodified distributable code.
|
||||||
|
|
||||||
|
c) Distribution Restrictions. You may not:
|
||||||
|
|
||||||
|
i. use Microsoft’s trademarks or trade dress in your application in any way that suggests your application comes from or is endorsed by Microsoft; or
|
||||||
|
|
||||||
|
ii. modify or distribute the source code of any distributable code so that any part of it becomes subject to any license that requires that the distributable code, any other part of the software, or any of Microsoft’s other intellectual property be disclosed or distributed in source code form, or that others have the right to modify it.
|
||||||
|
|
||||||
|
3. DATA COLLECTION. The software may collect information about you and your use of the software and send that to Microsoft. Microsoft may use this information to provide services and improve Microsoft’s products and services. Your opt-out rights, if any, are described in the product documentation. Some features in the software may enable collection of data from users of your applications that access or use the software. If you use these features to enable data collection in your applications, you must comply with applicable law, including getting any required user consent, and maintain a prominent privacy policy that accurately informs users about how you use, collect, and share their data. You can learn more about Microsoft’s data collection and use in the product documentation and the Microsoft Privacy Statement at https://go.microsoft.com/fwlink/?LinkId=512132. You agree to comply with all applicable provisions of the Microsoft Privacy Statement.
|
||||||
|
|
||||||
|
4. SCOPE OF LICENSE. The software is licensed, not sold. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you will not (and have no right to):
|
||||||
|
|
||||||
|
a) work around any technical limitations in the software that only allow you to use it in certain ways;
|
||||||
|
|
||||||
|
b) reverse engineer, decompile or disassemble the software;
|
||||||
|
|
||||||
|
c) remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software;
|
||||||
|
|
||||||
|
d) use the software in any way that is against the law or to create or propagate malware; or
|
||||||
|
|
||||||
|
e) share, publish, distribute, or lend the software (except for any distributable code, subject to the terms above), provide the software as a stand-alone hosted solution for others to use, or transfer the software or this agreement to any third party.
|
||||||
|
|
||||||
|
5. EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit http://aka.ms/exporting.
|
||||||
|
|
||||||
|
6. SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any support services for the software. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
|
||||||
|
|
||||||
|
7. ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for supplements, updates, or third-party applications, is the entire agreement for the software.
|
||||||
|
|
||||||
|
8. APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the software in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this agreement, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles. If you acquired the software in any other country, its laws apply. If U.S. federal jurisdiction exists, you and Microsoft consent to exclusive jurisdiction and venue in the federal court in King County, Washington for all disputes heard in court. If not, you and Microsoft consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington for all disputes heard in court.
|
||||||
|
|
||||||
|
9. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
|
||||||
|
|
||||||
|
a) Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.
|
||||||
|
|
||||||
|
b) Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
|
||||||
|
|
||||||
|
c) Germany and Austria.
|
||||||
|
|
||||||
|
i. Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software.
|
||||||
|
|
||||||
|
ii. Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.
|
||||||
|
|
||||||
|
Subject to the foregoing clause ii., Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.
|
||||||
|
|
||||||
|
10. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||||
|
|
||||||
|
11. LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT, OR INCIDENTAL DAMAGES.
|
||||||
|
|
||||||
|
This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law.
|
||||||
|
|
||||||
|
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages.
|
||||||
|
|
||||||
|
Please note: As this software is distributed in Canada, some of the clauses in this agreement are provided below in French.
|
||||||
|
|
||||||
|
Remarque: Ce logiciel étant distribué au Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.
|
||||||
|
|
||||||
|
EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
|
||||||
|
|
||||||
|
LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
|
||||||
|
|
||||||
|
Cette limitation concerne:
|
||||||
|
|
||||||
|
• tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers; et
|
||||||
|
|
||||||
|
• les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
|
||||||
|
|
||||||
|
Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.
|
||||||
|
|
||||||
|
EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
|
||||||
|
|
||||||
@@ -1,61 +1,79 @@
|
|||||||
{
|
{
|
||||||
"name": "admin-tool-ext-win",
|
"name": "admin-tool-ext-win",
|
||||||
"displayName": "Database Admin Tool Extensions for Windows",
|
"displayName": "%adminToolExtWin.displayName%",
|
||||||
"description": "Adds additional Windows-specific functionality to Azure Data Studio",
|
"description": "%adminToolExtWin.description%",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"publisher": "Microsoft",
|
"publisher": "Microsoft",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/master/LICENSE.txt",
|
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/master/extensions/admin-tool-ext-win/license/Azure%20Data%20Studio%20Extension%20-%20Standalone%20(free)%20Use%20Terms.txt",
|
||||||
"icon": "images/sqlserver.png",
|
"icon": "images/sqlserver.png",
|
||||||
"aiKey": "AIF-5574968e-856d-40d2-af67-c89a14e76412",
|
"aiKey": "AIF-5574968e-856d-40d2-af67-c89a14e76412",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.30.1",
|
"vscode": "^1.30.1",
|
||||||
"sqlops": "*"
|
"azdata": ">=1.8.0"
|
||||||
},
|
},
|
||||||
"activationEvents": [
|
"activationEvents": [
|
||||||
"*"
|
"*"
|
||||||
],
|
],
|
||||||
"main": "./out/main",
|
"main": "./out/main",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Microsoft/azuredatastudio.git"
|
"url": "https://github.com/Microsoft/azuredatastudio.git"
|
||||||
},
|
},
|
||||||
"extensionDependencies": [
|
"extensionDependencies": [
|
||||||
"Microsoft.mssql"
|
"Microsoft.mssql"
|
||||||
],
|
],
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"commands": [
|
"commands": [
|
||||||
{
|
{
|
||||||
"command": "adminToolExtWin.launchSsmsServerPropertiesDialog",
|
"command": "adminToolExtWin.launchSsmsMinPropertiesDialog",
|
||||||
"title": "%adminToolExtWin.launchSsmsServerPropertiesDialog%",
|
"title": "%adminToolExtWin.propertiesMenuItem%",
|
||||||
"category": "AdminToolExtWin"
|
"category": "AdminToolExtWin"
|
||||||
}
|
},
|
||||||
],
|
{
|
||||||
"menus": {
|
"command": "adminToolExtWin.launchSsmsMinGswDialog",
|
||||||
"commandPalette": [
|
"title": "%adminToolExtWin.launchGswMenuItem%",
|
||||||
{
|
"category": "AdminToolExtWin"
|
||||||
"command": "adminToolExtWin.launchSsmsServerPropertiesDialog",
|
}
|
||||||
"when": "false"
|
],
|
||||||
}
|
"menus": {
|
||||||
],
|
"commandPalette": [
|
||||||
"objectExplorer/item/context": [
|
{
|
||||||
{
|
"command": "adminToolExtWin.launchSsmsMinPropertiesDialog",
|
||||||
"command": "adminToolExtWin.launchSsmsServerPropertiesDialog",
|
"when": "false"
|
||||||
"when": "isWindows && connectionProvider == MSSQL && nodeType && nodeType == Server",
|
},
|
||||||
"group": "AdminToolExtWin"
|
{
|
||||||
}
|
"command": "adminToolExtWin.launchSsmsMinGswDialog",
|
||||||
]
|
"when": "false"
|
||||||
},
|
}
|
||||||
"outputChannels": [
|
],
|
||||||
"admin-tool-ext-win"
|
"objectExplorer/item/context": [
|
||||||
]
|
{
|
||||||
},
|
"command": "adminToolExtWin.launchSsmsMinGswDialog",
|
||||||
"dependencies": {
|
"when": "isWindows && connectionProvider == MSSQL && nodeType && nodeType == Database",
|
||||||
"service-downloader": "github:anthonydresser/service-downloader#0.1.5",
|
"group": "z-AdminToolExt@1"
|
||||||
"vscode-extension-telemetry": "^0.0.15",
|
},
|
||||||
"vscode-nls": "^3.2.1"
|
{
|
||||||
},
|
"command": "adminToolExtWin.launchSsmsMinPropertiesDialog",
|
||||||
"devDependencies": {
|
"when": "isWindows && connectionProvider == MSSQL && serverInfo && !isCloud && nodeType && nodeType == Server",
|
||||||
"vscode": "1.0.1"
|
"group": "z-AdminToolExt@2"
|
||||||
}
|
},
|
||||||
}
|
{
|
||||||
|
"command": "adminToolExtWin.launchSsmsMinPropertiesDialog",
|
||||||
|
"when": "isWindows && connectionProvider == MSSQL && serverInfo && nodeType && nodeType =~ /^(Database|Table|Column|Index|Statistic|View|ServerLevelLogin|ServerLevelServerRole|ServerLevelCredential|ServerLevelServerAudit|ServerLevelServerAuditSpecification|StoredProcedure|ScalarValuedFunction|TableValuedFunction|AggregateFunction|Synonym|Assembly|UserDefinedDataType|UserDefinedType|UserDefinedTableType|Sequence|User|DatabaseRole|ApplicationRole|Schema|SecurityPolicy|ServerLevelLinkedServer)$/",
|
||||||
|
"group": "z-AdminToolExt@2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"outputChannels": [
|
||||||
|
"admin-tool-ext-win"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"vscode-extension-telemetry": "^0.0.15",
|
||||||
|
"vscode-nls": "^3.2.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"vscode": "1.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
{
|
{
|
||||||
"adminToolExtWin.launchSsmsServerPropertiesDialog": "Properties"
|
"adminToolExtWin.displayName": "Database Administration Tool Extensions for Windows",
|
||||||
|
"adminToolExtWin.description": "Adds additional Windows-specific functionality to Azure Data Studio",
|
||||||
|
"adminToolExtWin.propertiesMenuItem": "Properties",
|
||||||
|
"adminToolExtWin.launchGswMenuItem": "Generate Scripts..."
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"downloadUrl": "https://sqlopsextensions.blob.core.windows.net/tools/ssmsmin/{#version#}/{#fileName#}",
|
"downloadUrl": "https://sqlopsextensions.blob.core.windows.net/tools/ssmsmin/{#version#}/{#fileName#}",
|
||||||
"version": "15.0.18092.0",
|
"version": "15.0.18124.0",
|
||||||
"downloadFileNames": {
|
"downloadFileNames": {
|
||||||
"Windows_64": "SsmsMin-15.0.18092.0-win-x64.zip",
|
"Windows_64": "SsmsMin-15.0.18124.0-win-x64.zip",
|
||||||
"Windows_86": "SsmsMin-15.0.18092.0-win-x86.zip"
|
"Windows_86": "SsmsMin-15.0.18124.0-win-x86.zip"
|
||||||
},
|
},
|
||||||
"installDirectory": "ssmsmin/{#platform#}/{#version#}",
|
"installDirectory": "ssmsmin/{#platform#}/{#version#}",
|
||||||
"executableFiles": [
|
"executableFiles": [
|
||||||
"SsmsMin.exe"
|
"SsmsMin.exe"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -2,23 +2,55 @@
|
|||||||
* 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.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
///
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { IConfig, ServerProvider } from 'service-downloader';
|
|
||||||
import { Telemetry } from './telemetry';
|
import { Telemetry } from './telemetry';
|
||||||
import * as utils from './utils';
|
import { doubleEscapeSingleQuotes, backEscapeDoubleQuotes, getTelemetryErrorType } from './utils';
|
||||||
import { ChildProcess, exec, ExecException } from 'child_process';
|
import { ChildProcess, exec } from 'child_process';
|
||||||
import { stringify } from 'querystring';
|
|
||||||
|
|
||||||
const baseConfig = require('./config.json');
|
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
const ssmsMinVer = JSON.parse(JSON.stringify(require('./config.json'))).version;
|
||||||
|
|
||||||
let exePath: string;
|
let exePath: string;
|
||||||
let runningProcesses: Map<number, ChildProcess> = new Map<number, ChildProcess>();
|
const runningProcesses: Map<number, ChildProcess> = new Map<number, ChildProcess>();
|
||||||
|
|
||||||
|
interface SmoMapping {
|
||||||
|
action: string;
|
||||||
|
urnName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const nodeTypeToUrnNameMapping: { [oeNodeType: string]: SmoMapping } = {
|
||||||
|
'Database': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.Database', urnName: 'Database' },
|
||||||
|
'Server': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.Server', urnName: 'Server' },
|
||||||
|
'ServerLevelServerAudit': { action: 'sqla:AuditProperties', urnName: 'Audit' },
|
||||||
|
'ServerLevelCredential': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.Credential', urnName: 'Credential' },
|
||||||
|
'ServerLevelServerRole': { action: 'sqla:ManageServerRole', urnName: 'Role' },
|
||||||
|
'ServerLevelServerAuditSpecification': { action: 'sqla:ServerAuditSpecificationProperties', urnName: 'ServerAuditSpecification' },
|
||||||
|
'ServerLevelLinkedServer': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.LinkedServer', urnName: 'LinkedServer' },
|
||||||
|
'Table': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.Table', urnName: 'Table' },
|
||||||
|
'View': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.View', urnName: 'View' },
|
||||||
|
'Column': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.Column', urnName: 'Column' },
|
||||||
|
'Index': { action: 'sqla:IndexProperties', urnName: 'Index' },
|
||||||
|
'Statistic': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.Statistic', urnName: 'Statistic' },
|
||||||
|
'StoredProcedure': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.StoredProcedure', urnName: 'StoredProcedure' },
|
||||||
|
'ScalarValuedFunction': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.UserDefinedFunction', urnName: 'UserDefinedFunction' },
|
||||||
|
'TableValuedFunction': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.UserDefinedFunction', urnName: 'UserDefinedFunction' },
|
||||||
|
'AggregateFunction': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.UserDefinedFunction', urnName: 'UserDefinedFunction' },
|
||||||
|
'Synonym': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.Synonym', urnName: 'Synonym' },
|
||||||
|
'Assembly': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.SqlAssembly', urnName: 'SqlAssembly' },
|
||||||
|
'UserDefinedDataType': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.UserDefinedDataType', urnName: 'UserDefinedDataType' },
|
||||||
|
'UserDefinedType': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.UserDefinedType', urnName: 'UserDefinedType' },
|
||||||
|
'UserDefinedTableType': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.UserDefinedTableType', urnName: 'UserDefinedTableType' },
|
||||||
|
'Sequence': { action: 'sqla:SequenceProperties', urnName: 'Sequence' },
|
||||||
|
'User': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.User', urnName: 'User' },
|
||||||
|
'DatabaseRole': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.DatabaseRole', urnName: 'Role' },
|
||||||
|
'ApplicationRole': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.ApplicationRole', urnName: 'ApplicationRole' },
|
||||||
|
'Schema': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.Schema', urnName: 'Schema' },
|
||||||
|
'SecurityPolicy': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.SecurityPolicy', urnName: 'SecurityPolicy' },
|
||||||
|
'ServerLevelLogin': { action: 'sqla:Properties@Microsoft.SqlServer.Management.Smo.Login', urnName: 'Login' },
|
||||||
|
};
|
||||||
|
|
||||||
// Params to pass to SsmsMin.exe, only an action and server are required - the rest are optional based on the
|
// Params to pass to SsmsMin.exe, only an action and server are required - the rest are optional based on the
|
||||||
// action used. Exported for use in testing.
|
// action used. Exported for use in testing.
|
||||||
@@ -27,7 +59,6 @@ export interface LaunchSsmsDialogParams {
|
|||||||
server: string;
|
server: string;
|
||||||
database?: string;
|
database?: string;
|
||||||
user?: string;
|
user?: string;
|
||||||
password?: string;
|
|
||||||
useAad?: boolean;
|
useAad?: boolean;
|
||||||
urn?: string;
|
urn?: string;
|
||||||
}
|
}
|
||||||
@@ -35,39 +66,8 @@ export interface LaunchSsmsDialogParams {
|
|||||||
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
||||||
// This is for Windows-specific support so do nothing on other platforms
|
// This is for Windows-specific support so do nothing on other platforms
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
Telemetry.sendTelemetryEvent('startup/ExtensionActivated');
|
exePath = path.join(context.extensionPath, 'ssmsmin', 'Windows', ssmsMinVer, 'ssmsmin.exe');
|
||||||
|
registerCommands(context);
|
||||||
let config: IConfig = JSON.parse(JSON.stringify(baseConfig));
|
|
||||||
config.installDirectory = path.join(context.extensionPath, config.installDirectory);
|
|
||||||
config.proxy = utils.getConfiguration('http').get('proxy');
|
|
||||||
config.strictSSL = utils.getConfiguration('http').get('proxyStrictSSL') || true;
|
|
||||||
|
|
||||||
const serverdownloader = new ServerProvider(config);
|
|
||||||
const installationStart = Date.now();
|
|
||||||
|
|
||||||
try {
|
|
||||||
let downloadedExePath = await serverdownloader.getOrDownloadServer();
|
|
||||||
const installationComplete = Date.now();
|
|
||||||
|
|
||||||
// Don't register the command if we couldn't find the EXE since it won't be able to do anything
|
|
||||||
if (downloadedExePath) {
|
|
||||||
exePath = downloadedExePath;
|
|
||||||
} else {
|
|
||||||
throw new Error('Could not find SsmsMin.exe after downloading');
|
|
||||||
}
|
|
||||||
// Add the command now that we have the exePath to run the tool with
|
|
||||||
context.subscriptions.push(
|
|
||||||
vscode.commands.registerCommand('adminToolExtWin.launchSsmsServerPropertiesDialog', handleLaunchSsmsServerPropertiesDialogCommand));
|
|
||||||
|
|
||||||
Telemetry.sendTelemetryEvent('startup/ExtensionStarted', {
|
|
||||||
installationTime: String(installationComplete - installationStart),
|
|
||||||
beginningTimestamp: String(installationStart)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
Telemetry.sendTelemetryEvent('startup/ExtensionInitializationFailed');
|
|
||||||
console.error(`Error Initializing Admin Tool Extension for Windows - ${err}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,19 +75,62 @@ export async function deactivate(): Promise<void> {
|
|||||||
// If the extension is being deactivated we want to kill all processes that are still currently
|
// If the extension is being deactivated we want to kill all processes that are still currently
|
||||||
// running otherwise they will continue to run as orphan processes. We use taskkill here in case
|
// running otherwise they will continue to run as orphan processes. We use taskkill here in case
|
||||||
// they started off child processes of their own
|
// they started off child processes of their own
|
||||||
runningProcesses.forEach(p => exec('taskkill /pid ' + p.pid + ' /T /F'));
|
runningProcesses.forEach(p => exec(`taskkill /pid ${p.pid} /T /F`));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers extension commands with command subsystem
|
||||||
|
* @param context The context used to register the commands
|
||||||
|
*/
|
||||||
|
function registerCommands(context: vscode.ExtensionContext): void {
|
||||||
|
context.subscriptions.push(
|
||||||
|
vscode.commands.registerCommand('adminToolExtWin.launchSsmsMinPropertiesDialog', handleLaunchSsmsMinPropertiesDialogCommand));
|
||||||
|
context.subscriptions.push(
|
||||||
|
vscode.commands.registerCommand('adminToolExtWin.launchSsmsMinGswDialog', handleLaunchSsmsMinGswDialogCommand));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for command to launch SSMS Server Properties dialog
|
* Handler for command to launch SSMS Server Properties dialog
|
||||||
* @param connectionId The connection context from the command
|
* @param connectionId The connection context from the command
|
||||||
*/
|
*/
|
||||||
function handleLaunchSsmsServerPropertiesDialogCommand(connectionContext?: azdata.ObjectExplorerContext) {
|
async function handleLaunchSsmsMinPropertiesDialogCommand(connectionContext?: azdata.ObjectExplorerContext): Promise<void> {
|
||||||
if (connectionContext && connectionContext.connectionProfile) {
|
if (!connectionContext) {
|
||||||
launchSsmsDialog(
|
Telemetry.sendTelemetryEventForError('NoConnectionContext', { action: 'Properties' });
|
||||||
/*action*/'sqla:Properties@Microsoft.SqlServer.Management.Smo.Server',
|
vscode.window.showErrorMessage(localize('adminToolExtWin.noConnectionContextForProp', 'No ConnectionContext provided for handleLaunchSsmsMinPropertiesDialogCommand'));
|
||||||
/*connectionProfile*/connectionContext.connectionProfile);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let nodeType: string;
|
||||||
|
if (connectionContext.isConnectionNode) {
|
||||||
|
nodeType = 'Server';
|
||||||
|
}
|
||||||
|
else if (connectionContext.nodeInfo) {
|
||||||
|
nodeType = connectionContext.nodeInfo.nodeType;
|
||||||
|
} else {
|
||||||
|
Telemetry.sendTelemetryEventForError('NoOENode', { action: 'Properties' });
|
||||||
|
vscode.window.showErrorMessage(localize('adminToolExtWin.noOENode', 'Could not determine Object Explorer node from connectionContext : {0}', JSON.stringify(connectionContext)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
launchSsmsDialog(
|
||||||
|
nodeTypeToUrnNameMapping[nodeType].action,
|
||||||
|
connectionContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for command to launch SSMS "Generate Script Wizard" dialog
|
||||||
|
* @param connectionId The connection context from the command
|
||||||
|
*/
|
||||||
|
async function handleLaunchSsmsMinGswDialogCommand(connectionContext?: azdata.ObjectExplorerContext): Promise<void> {
|
||||||
|
const action = 'GenerateScripts';
|
||||||
|
if (!connectionContext) {
|
||||||
|
Telemetry.sendTelemetryEventForError('NoConnectionContext', { action: action });
|
||||||
|
vscode.window.showErrorMessage(localize('adminToolExtWin.noConnectionContextForGsw', 'No ConnectionContext provided for handleLaunchSsmsMinPropertiesDialogCommand'));
|
||||||
|
}
|
||||||
|
|
||||||
|
launchSsmsDialog(
|
||||||
|
action,
|
||||||
|
connectionContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -96,45 +139,78 @@ function handleLaunchSsmsServerPropertiesDialogCommand(connectionContext?: azdat
|
|||||||
* @param params The params used to construct the command
|
* @param params The params used to construct the command
|
||||||
* @param urn The URN to pass to SsmsMin
|
* @param urn The URN to pass to SsmsMin
|
||||||
*/
|
*/
|
||||||
function launchSsmsDialog(action: string, connectionProfile: azdata.IConnectionProfile, urn?: string) {
|
async function launchSsmsDialog(action: string, connectionContext: azdata.ObjectExplorerContext): Promise<void> {
|
||||||
if (!exePath) {
|
if (!connectionContext.connectionProfile) {
|
||||||
vscode.window.showErrorMessage(localize('adminToolExtWin.noExeError', 'Unable to find SsmsMin.exe.'));
|
Telemetry.sendTelemetryEventForError('NoConnectionProfile', { action: action });
|
||||||
|
vscode.window.showErrorMessage(localize('adminToolExtWin.noConnectionProfile', 'No connectionProfile provided from connectionContext : {0}', JSON.stringify(connectionContext)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Telemetry.sendTelemetryEvent('LaunchSsmsDialog', { 'action': action });
|
let oeNode: azdata.objectexplorer.ObjectExplorerNode;
|
||||||
|
// Server node is a Connection node and so doesn't have the NodeInfo
|
||||||
|
if (connectionContext.isConnectionNode) {
|
||||||
|
oeNode = undefined;
|
||||||
|
}
|
||||||
|
else if (connectionContext.nodeInfo && connectionContext.nodeInfo.nodeType && connectionContext.connectionProfile) {
|
||||||
|
oeNode = await azdata.objectexplorer.getNode(connectionContext.connectionProfile.id, connectionContext.nodeInfo.nodePath);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Telemetry.sendTelemetryEventForError('NoOENode', { action: action });
|
||||||
|
vscode.window.showErrorMessage(localize('adminToolExtWin.noOENode', 'Could not determine Object Explorer node from connectionContext : {0}', JSON.stringify(connectionContext)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let params: LaunchSsmsDialogParams = {
|
const urn: string = await buildUrn(oeNode);
|
||||||
|
let password: string = connectionContext.connectionProfile.password;
|
||||||
|
|
||||||
|
if (!password || password === '') {
|
||||||
|
const creds = await azdata.connection.getCredentials(connectionContext.connectionProfile.id);
|
||||||
|
password = creds[azdata.ConnectionOptionSpecialType.password];
|
||||||
|
}
|
||||||
|
|
||||||
|
const params: LaunchSsmsDialogParams = {
|
||||||
action: action,
|
action: action,
|
||||||
server: connectionProfile.serverName,
|
server: connectionContext.connectionProfile.serverName,
|
||||||
database: connectionProfile.databaseName,
|
database: connectionContext.connectionProfile.databaseName,
|
||||||
password: connectionProfile.password,
|
user: connectionContext.connectionProfile.userName,
|
||||||
user: connectionProfile.userName,
|
useAad: connectionContext.connectionProfile.authenticationType === 'AzureMFA',
|
||||||
useAad: connectionProfile.authenticationType === 'AzureMFA',
|
|
||||||
urn: urn
|
urn: urn
|
||||||
};
|
};
|
||||||
let args = buildSsmsMinCommandArgs(params);
|
|
||||||
|
const args = buildSsmsMinCommandArgs(params);
|
||||||
|
|
||||||
|
Telemetry.sendTelemetryEvent('LaunchSsmsDialog',
|
||||||
|
{
|
||||||
|
action: action,
|
||||||
|
nodeType: oeNode ? oeNode.nodeType : 'Server',
|
||||||
|
authType: connectionContext.connectionProfile.authenticationType
|
||||||
|
});
|
||||||
|
|
||||||
|
vscode.window.setStatusBarMessage(localize('adminToolExtWin.launchingDialogStatus', 'Launching dialog...'), 3000);
|
||||||
|
|
||||||
// This will be an async call since we pass in the callback
|
// This will be an async call since we pass in the callback
|
||||||
var proc: ChildProcess = exec(
|
const proc: ChildProcess = exec(
|
||||||
/*command*/`"${exePath}" ${args}`,
|
/*command*/ `"${exePath}" ${args}`,
|
||||||
/*options*/undefined,
|
/*options*/ undefined,
|
||||||
(execException, stdout, stderr) => {
|
(execException, stdout, stderr) => {
|
||||||
// Process has exited so remove from map of running processes
|
// Process has exited so remove from map of running processes
|
||||||
runningProcesses.delete(proc.pid);
|
runningProcesses.delete(proc.pid);
|
||||||
|
const err = stderr.toString();
|
||||||
Telemetry.sendTelemetryEvent('LaunchSsmsDialogResult', {
|
Telemetry.sendTelemetryEvent('LaunchSsmsDialogResult', {
|
||||||
'action': params.action,
|
action: params.action,
|
||||||
'returnCode': execException && execException.code ? execException.code.toString() : '0'
|
returnCode: execException && execException.code ? execException.code.toString() : '0',
|
||||||
|
errorType: getTelemetryErrorType(err)
|
||||||
});
|
});
|
||||||
let err = stderr.toString();
|
|
||||||
if (err !== '') {
|
if (err !== '') {
|
||||||
console.warn(`Error calling SsmsMin with args '${args}' - ${err}`);
|
vscode.window.showErrorMessage(localize(
|
||||||
|
'adminToolExtWin.ssmsMinError',
|
||||||
|
'Error calling SsmsMin with args \'{0}\' - {1}', args, err));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// If we're not using AAD the tool prompts for a password on stdin
|
// If we're not using AAD the tool prompts for a password on stdin
|
||||||
if (params.useAad !== true) {
|
if (params.useAad !== true) {
|
||||||
proc.stdin.end(params.password ? params.password : '');
|
proc.stdin.end(password ? password : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the process into our map so we can make sure to stop them if we exit before shutting down
|
// Save the process into our map so we can make sure to stop them if we exit before shutting down
|
||||||
@@ -148,10 +224,34 @@ function launchSsmsDialog(action: string, connectionProfile: azdata.IConnectionP
|
|||||||
* @param params The params used to build up the command parameter string
|
* @param params The params used to build up the command parameter string
|
||||||
*/
|
*/
|
||||||
export function buildSsmsMinCommandArgs(params: LaunchSsmsDialogParams): string {
|
export function buildSsmsMinCommandArgs(params: LaunchSsmsDialogParams): string {
|
||||||
return `${params.action ? '-a "' + params.action.replace(/"/g, '\\"') + '"' : ''}\
|
return `${params.action ? '-a "' + backEscapeDoubleQuotes(params.action) + '"' : ''}\
|
||||||
${params.server ? ' -S "' + params.server.replace(/"/g, '\\"') + '"' : ''}\
|
${params.server ? ' -S "' + backEscapeDoubleQuotes(params.server) + '"' : ''}\
|
||||||
${params.database ? ' -D "' + params.database.replace(/"/g, '\\"') + '"' : ''}\
|
${params.database ? ' -D "' + backEscapeDoubleQuotes(params.database) + '"' : ''}\
|
||||||
${params.useAad !== true && params.user ? ' -U "' + params.user.replace(/"/g, '\\"') + '"' : ''}\
|
${params.user ? ' -U "' + backEscapeDoubleQuotes(params.user) + '"' : ''}\
|
||||||
${params.useAad === true ? ' -G' : ''}\
|
${params.useAad === true ? ' -G' : ''}\
|
||||||
${params.urn ? ' -u "' + params.urn.replace(/"/g, '\\"') + '"' : ''}`;
|
${params.urn ? ' -u "' + backEscapeDoubleQuotes(params.urn) + '"' : ''}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the URN string for a given ObjectExplorerNode in the form understood by SsmsMin
|
||||||
|
* @param node The node to get the URN of
|
||||||
|
*/
|
||||||
|
export async function buildUrn(node: azdata.objectexplorer.ObjectExplorerNode): Promise<string> {
|
||||||
|
let urnNodes: string[] = [];
|
||||||
|
while (node) {
|
||||||
|
// Server is special since it's a connection node - always add it as the root
|
||||||
|
if (node.nodeType === 'Server') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (node.metadata && node.nodeType !== 'Folder') {
|
||||||
|
// SFC URN expects Name and Schema to be separate properties
|
||||||
|
const urnSegment = node.metadata.schema && node.metadata.schema !== '' ?
|
||||||
|
`${nodeTypeToUrnNameMapping[node.nodeType].urnName}[@Name='${doubleEscapeSingleQuotes(node.metadata.name)}' and @Schema='${doubleEscapeSingleQuotes(node.metadata.schema)}']` :
|
||||||
|
`${nodeTypeToUrnNameMapping[node.nodeType].urnName}[@Name='${doubleEscapeSingleQuotes(node.metadata.name)}']`;
|
||||||
|
urnNodes = [urnSegment].concat(urnNodes);
|
||||||
|
}
|
||||||
|
node = await node.getParent();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ['Server'].concat(urnNodes).join('/');
|
||||||
|
}
|
||||||
@@ -6,130 +6,97 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import TelemetryReporter from 'vscode-extension-telemetry';
|
import TelemetryReporter from 'vscode-extension-telemetry';
|
||||||
import { PlatformInformation } from 'service-downloader/out/platform';
|
|
||||||
|
|
||||||
import * as Utils from './utils';
|
import * as Utils from './utils';
|
||||||
|
|
||||||
const packageJson = require('../package.json');
|
const packageJson = require('../package.json');
|
||||||
|
|
||||||
export interface ITelemetryEventProperties {
|
export interface ITelemetryEventProperties {
|
||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ITelemetryEventMeasures {
|
export interface ITelemetryEventMeasures {
|
||||||
[key: string]: number;
|
[key: string]: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters error paths to only include source files. Exported to support testing
|
* Filters error paths to only include source files. Exported to support testing
|
||||||
*/
|
*/
|
||||||
export function filterErrorPath(line: string): string {
|
export function filterErrorPath(line: string): string {
|
||||||
if (line) {
|
if (line) {
|
||||||
let values: string[] = line.split('/out/');
|
let values: string[] = line.split('/out/');
|
||||||
if (values.length <= 1) {
|
if (values.length <= 1) {
|
||||||
// Didn't match expected format
|
// Didn't match expected format
|
||||||
return line;
|
return line;
|
||||||
} else {
|
} else {
|
||||||
return values[1];
|
return values[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Telemetry {
|
export class Telemetry {
|
||||||
private static reporter: TelemetryReporter;
|
private static reporter: TelemetryReporter;
|
||||||
private static userId: string;
|
private static disabled: boolean;
|
||||||
private static platformInformation: PlatformInformation;
|
|
||||||
private static disabled: boolean;
|
|
||||||
|
|
||||||
public static getPlatformInformation(): Promise<PlatformInformation> {
|
/**
|
||||||
if (this.platformInformation) {
|
* Disable telemetry reporting
|
||||||
return Promise.resolve(this.platformInformation);
|
*/
|
||||||
} else {
|
public static disable(): void {
|
||||||
return new Promise<PlatformInformation>(resolve => {
|
this.disabled = true;
|
||||||
PlatformInformation.getCurrent().then(info => {
|
}
|
||||||
this.platformInformation = info;
|
|
||||||
resolve(this.platformInformation);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disable telemetry reporting
|
* Initialize the telemetry reporter for use.
|
||||||
*/
|
*/
|
||||||
public static disable(): void {
|
public static initialize(): void {
|
||||||
this.disabled = true;
|
if (typeof this.reporter === 'undefined') {
|
||||||
}
|
// Check if the user has opted out of telemetry
|
||||||
|
if (!vscode.workspace.getConfiguration('telemetry').get<boolean>('enableTelemetry', true)) {
|
||||||
|
this.disable();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
let packageInfo = Utils.getPackageInfo(packageJson);
|
||||||
* Initialize the telemetry reporter for use.
|
this.reporter = new TelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey);
|
||||||
*/
|
}
|
||||||
public static initialize(): void {
|
}
|
||||||
if (typeof this.reporter === 'undefined') {
|
|
||||||
// Check if the user has opted out of telemetry
|
|
||||||
if (!vscode.workspace.getConfiguration('telemetry').get<boolean>('enableTelemetry', true)) {
|
|
||||||
this.disable();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let packageInfo = Utils.getPackageInfo(packageJson);
|
/**
|
||||||
this.reporter = new TelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey);
|
* Send a telemetry event for a general error
|
||||||
}
|
* @param err The error to log
|
||||||
}
|
*/
|
||||||
|
public static sendTelemetryEventForError(err: string, properties?: ITelemetryEventProperties): void {
|
||||||
|
this.sendTelemetryEvent('Error', { error: err, ...properties });
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a telemetry event for an exception
|
* Send a telemetry event using application insights
|
||||||
*/
|
*/
|
||||||
public static sendTelemetryEventForException(
|
public static sendTelemetryEvent(
|
||||||
err: any, methodName: string, extensionConfigName: string): void {
|
eventName: string,
|
||||||
try {
|
properties?: ITelemetryEventProperties,
|
||||||
let stackArray: string[];
|
measures?: ITelemetryEventMeasures): void {
|
||||||
let firstLine: string = '';
|
|
||||||
if (err !== undefined && err.stack !== undefined) {
|
|
||||||
stackArray = err.stack.split('\n');
|
|
||||||
if (stackArray !== undefined && stackArray.length >= 2) {
|
|
||||||
firstLine = stackArray[1]; // The first line is the error message and we don't want to send that telemetry event
|
|
||||||
firstLine = filterErrorPath(firstLine);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only adding the method name and the fist line of the stack trace. We don't add the error message because it might have PII
|
if (typeof this.disabled === 'undefined') {
|
||||||
this.sendTelemetryEvent('Exception', { methodName: methodName, errorLine: firstLine });
|
this.disabled = false;
|
||||||
} catch (telemetryErr) {
|
}
|
||||||
// If sending telemetry event fails ignore it so it won't break the extension
|
|
||||||
console.error('Failed to send telemetry event. error: ' + telemetryErr, extensionConfigName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
if (this.disabled || typeof (this.reporter) === 'undefined') {
|
||||||
* Send a telemetry event using application insights
|
// Don't do anything if telemetry is disabled
|
||||||
*/
|
return;
|
||||||
public static sendTelemetryEvent(
|
}
|
||||||
eventName: string,
|
|
||||||
properties?: ITelemetryEventProperties,
|
|
||||||
measures?: ITelemetryEventMeasures): void {
|
|
||||||
|
|
||||||
if (typeof this.disabled === 'undefined') {
|
if (!properties || typeof properties === 'undefined') {
|
||||||
this.disabled = false;
|
properties = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.disabled || typeof (this.reporter) === 'undefined') {
|
try {
|
||||||
// Don't do anything if telemetry is disabled
|
this.reporter.sendTelemetryEvent(eventName, properties, measures);
|
||||||
return;
|
} catch (telemetryErr) {
|
||||||
}
|
// If sending telemetry event fails ignore it so it won't break the extension
|
||||||
|
console.error('Failed to send telemetry event. error: ' + telemetryErr);
|
||||||
if (!properties || typeof properties === 'undefined') {
|
}
|
||||||
properties = {};
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Augment the properties structure with additional common properties before sending
|
|
||||||
Promise.all([this.getPlatformInformation()]).then(() => {
|
|
||||||
properties['distribution'] = (this.platformInformation && this.platformInformation.distribution) ?
|
|
||||||
`${this.platformInformation.distribution.name}, ${this.platformInformation.distribution.version}` : '';
|
|
||||||
|
|
||||||
this.reporter.sendTelemetryEvent(eventName, properties, measures);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Telemetry.initialize();
|
Telemetry.initialize();
|
||||||
|
|||||||
@@ -9,20 +9,20 @@ const testRunner = require('vscode/lib/testrunner');
|
|||||||
const suite = 'Database Admin Tool Extensions for Windows';
|
const suite = 'Database Admin Tool Extensions for Windows';
|
||||||
|
|
||||||
const options: any = {
|
const options: any = {
|
||||||
ui: 'bdd',
|
ui: 'bdd',
|
||||||
useColors: true,
|
useColors: true,
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
options.reporter = 'mocha-multi-reporters';
|
options.reporter = 'mocha-multi-reporters';
|
||||||
options.reporterOptions = {
|
options.reporterOptions = {
|
||||||
reporterEnabled: 'spec, mocha-junit-reporter',
|
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||||
mochaJunitReporterReporterOptions: {
|
mochaJunitReporterReporterOptions: {
|
||||||
testsuitesTitle: `${suite} ${process.platform}`,
|
testsuitesTitle: `${suite} ${process.platform}`,
|
||||||
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
testRunner.configure(options);
|
testRunner.configure(options);
|
||||||
|
|||||||
68
extensions/admin-tool-ext-win/src/test/stubs.ts
Normal file
68
extensions/admin-tool-ext-win/src/test/stubs.ts
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import * as azdata from 'azdata';
|
||||||
|
import * as vscode from 'vscode';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper stub class for mocking ExtHostObjectExplorerNode
|
||||||
|
*/
|
||||||
|
export class ExtHostObjectExplorerNodeStub implements azdata.objectexplorer.ObjectExplorerNode {
|
||||||
|
// Stub properties
|
||||||
|
private parent: azdata.objectexplorer.ObjectExplorerNode;
|
||||||
|
|
||||||
|
// Base properties
|
||||||
|
public connectionId: string;
|
||||||
|
public nodePath: string;
|
||||||
|
public nodeType: string;
|
||||||
|
public nodeSubType: string;
|
||||||
|
public nodeStatus: string;
|
||||||
|
public label: string;
|
||||||
|
public isLeaf: boolean;
|
||||||
|
public metadata: azdata.ObjectMetadata;
|
||||||
|
public errorMessage: string;
|
||||||
|
|
||||||
|
constructor(nodeName: string, nodeSchema: string, nodeType, parent: azdata.objectexplorer.ObjectExplorerNode) {
|
||||||
|
this.parent = parent;
|
||||||
|
this.nodeType = nodeType;
|
||||||
|
this.metadata = { metadataType: undefined, metadataTypeName: undefined, name: nodeName, schema: nodeSchema, urn: undefined };
|
||||||
|
}
|
||||||
|
|
||||||
|
isExpanded(): Thenable<boolean> {
|
||||||
|
throw new Error('Method not implemented');
|
||||||
|
}
|
||||||
|
|
||||||
|
setExpandedState(expandedState: vscode.TreeItemCollapsibleState): Thenable<void> {
|
||||||
|
throw new Error('Method not implemented');
|
||||||
|
}
|
||||||
|
|
||||||
|
setSelected(selected: boolean, clearOtherSelections: boolean = undefined): Thenable<void> {
|
||||||
|
throw new Error('Method not implemented');
|
||||||
|
}
|
||||||
|
|
||||||
|
getChildren(): Thenable<azdata.objectexplorer.ObjectExplorerNode[]> {
|
||||||
|
throw new Error('Method not implemented');
|
||||||
|
}
|
||||||
|
|
||||||
|
getParent(): Thenable<azdata.objectexplorer.ObjectExplorerNode> {
|
||||||
|
return Promise.resolve(this.parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
refresh(): Thenable<void> {
|
||||||
|
throw new Error('Method not implemented');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param nodeName Helperfunction to create a node that is a child of this one
|
||||||
|
* @param nodeSchema The schema to give the child node
|
||||||
|
* @param nodeType The type of node this should be
|
||||||
|
*/
|
||||||
|
createChild(nodeName: string, nodeSchema: string, nodeType: string): ExtHostObjectExplorerNodeStub {
|
||||||
|
return new ExtHostObjectExplorerNodeStub(nodeName, nodeSchema, nodeType, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,60 +8,126 @@
|
|||||||
import * as should from 'should';
|
import * as should from 'should';
|
||||||
import 'mocha';
|
import 'mocha';
|
||||||
|
|
||||||
import * as extensionMain from '../main';
|
import { buildSsmsMinCommandArgs, buildUrn, LaunchSsmsDialogParams } from '../main';
|
||||||
|
import { doubleEscapeSingleQuotes, backEscapeDoubleQuotes } from '../utils';
|
||||||
|
import { ExtHostObjectExplorerNodeStub } from './stubs';
|
||||||
|
|
||||||
describe('buildSsmsMinCommandArgs Method Tests', () => {
|
describe('buildSsmsMinCommandArgs Method Tests', () => {
|
||||||
it('Should be built correctly with all params and UseAAD as false', function (): void {
|
it('Should be built correctly with all params and UseAAD as false', function (): void {
|
||||||
let params: extensionMain.LaunchSsmsDialogParams = {
|
const params: LaunchSsmsDialogParams = {
|
||||||
action: 'myAction',
|
action: 'myAction',
|
||||||
server: 'myServer',
|
server: 'myServer',
|
||||||
database: 'myDatabase',
|
database: 'myDatabase',
|
||||||
user: 'user',
|
user: 'user',
|
||||||
password: 'password',
|
useAad: false,
|
||||||
useAad: false,
|
urn: 'Server\\Database\\Table'
|
||||||
urn: 'Server\\Database\\Table'
|
};
|
||||||
};
|
const args = buildSsmsMinCommandArgs(params);
|
||||||
let args = extensionMain.buildSsmsMinCommandArgs(params);
|
should(args).equal('-a "myAction" -S "myServer" -D "myDatabase" -U "user" -u "Server\\Database\\Table"');
|
||||||
should(args).equal('-a "myAction" -S "myServer" -D "myDatabase" -U "user" -u "Server\\Database\\Table"');
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it('Should be built correctly with all params and UseAAD as true', function (): void {
|
it('Should be built correctly with all params and UseAAD as true', function (): void {
|
||||||
let params: extensionMain.LaunchSsmsDialogParams = {
|
const params: LaunchSsmsDialogParams = {
|
||||||
action: 'myAction',
|
action: 'myAction',
|
||||||
server: 'myServer',
|
server: 'myServer',
|
||||||
database: 'myDatabase',
|
database: 'myDatabase',
|
||||||
user: 'user',
|
user: 'user',
|
||||||
password: 'password',
|
useAad: true,
|
||||||
useAad: true,
|
urn: 'Server\\Database\\Table'
|
||||||
urn: 'Server\\Database\\Table'
|
};
|
||||||
};
|
const args = buildSsmsMinCommandArgs(params);
|
||||||
let args = extensionMain.buildSsmsMinCommandArgs(params);
|
|
||||||
// User is omitted since UseAAD is true
|
|
||||||
should(args).equal('-a "myAction" -S "myServer" -D "myDatabase" -G -u "Server\\Database\\Table"');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('Should be built correctly and names escaped correctly', function (): void {
|
should(args).equal('-a "myAction" -S "myServer" -D "myDatabase" -U "user" -G -u "Server\\Database\\Table"');
|
||||||
let params: extensionMain.LaunchSsmsDialogParams = {
|
});
|
||||||
action: 'myAction\'"/\\[]tricky',
|
|
||||||
server: 'myServer\'"/\\[]tricky',
|
|
||||||
database: 'myDatabase\'"/\\[]tricky',
|
|
||||||
user: 'user\'"/\\[]tricky',
|
|
||||||
password: 'password',
|
|
||||||
useAad: true,
|
|
||||||
urn: 'Server\\Database[\'myDatabase\'\'"/\\[]tricky\']\\Table["myTable\'""/\\[]tricky"]'
|
|
||||||
};
|
|
||||||
let args = extensionMain.buildSsmsMinCommandArgs(params);
|
|
||||||
// User is omitted since UseAAD is true
|
|
||||||
should(args).equal('-a "myAction\'\\"/\\[]tricky" -S "myServer\'\\"/\\[]tricky" -D "myDatabase\'\\"/\\[]tricky" -G -u "Server\\Database[\'myDatabase\'\'\\"/\\[]tricky\']\\Table[\\"myTable\'\\"\\"/\\[]tricky\\"]"');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('Should be built correctly with only action and server', function (): void {
|
it('Should be built correctly and names escaped correctly', function (): void {
|
||||||
|
const params: LaunchSsmsDialogParams = {
|
||||||
|
action: 'myAction\'"/\\[]tricky',
|
||||||
|
server: 'myServer\'"/\\[]tricky',
|
||||||
|
database: 'myDatabase\'"/\\[]tricky',
|
||||||
|
user: 'user\'"/\\[]tricky',
|
||||||
|
useAad: true,
|
||||||
|
urn: 'Server\\Database[\'myDatabase\'\'"/\\[]tricky\']\\Table["myTable\'""/\\[]tricky"]'
|
||||||
|
};
|
||||||
|
const args = buildSsmsMinCommandArgs(params);
|
||||||
|
|
||||||
let params: extensionMain.LaunchSsmsDialogParams = {
|
should(args).equal('-a "myAction\'\\"/\\[]tricky" -S "myServer\'\\"/\\[]tricky" -D "myDatabase\'\\"/\\[]tricky" -U "user\'\\"/\\[]tricky" -G -u "Server\\Database[\'myDatabase\'\'\\"/\\[]tricky\']\\Table[\\"myTable\'\\"\\"/\\[]tricky\\"]"');
|
||||||
action: 'myAction',
|
});
|
||||||
server: 'myServer'
|
|
||||||
};
|
it('Should be built correctly with only action and server', function (): void {
|
||||||
let args = extensionMain.buildSsmsMinCommandArgs(params);
|
|
||||||
should(args).equal('-a "myAction" -S "myServer"');
|
const params: LaunchSsmsDialogParams = {
|
||||||
});
|
action: 'myAction',
|
||||||
|
server: 'myServer'
|
||||||
|
};
|
||||||
|
const args = buildSsmsMinCommandArgs(params);
|
||||||
|
should(args).equal('-a "myAction" -S "myServer"');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const dbName = 'My\'Db';
|
||||||
|
const escapedDbName = doubleEscapeSingleQuotes(dbName);
|
||||||
|
const dbSchema = 'db\'sch';
|
||||||
|
const escapedDbSchema = doubleEscapeSingleQuotes(dbSchema);
|
||||||
|
const tableName = 'My\'Table';
|
||||||
|
const escapedTableName = doubleEscapeSingleQuotes(tableName);
|
||||||
|
const tableSchema = 'tbl\'sch';
|
||||||
|
const escapedTableSchema = doubleEscapeSingleQuotes(tableSchema);
|
||||||
|
|
||||||
|
describe('buildUrn Method Tests', () => {
|
||||||
|
it('Urn should be correct with just server', async function (): Promise<void> {
|
||||||
|
should(await buildUrn(undefined)).equal('Server');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Urn should be correct with Server and only Databases folder', async function (): Promise<void> {
|
||||||
|
const leafNode: ExtHostObjectExplorerNodeStub =
|
||||||
|
new ExtHostObjectExplorerNodeStub('Databases', undefined, 'Folder', undefined);
|
||||||
|
should(await buildUrn(leafNode)).equal('Server');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Urn should be correct with Server and Database node', async function (): Promise<void> {
|
||||||
|
const leafNode: ExtHostObjectExplorerNodeStub =
|
||||||
|
new ExtHostObjectExplorerNodeStub('Databases', undefined, 'Folder', undefined)
|
||||||
|
.createChild(dbName, dbSchema, 'Database');
|
||||||
|
should(await buildUrn(leafNode)).equal(
|
||||||
|
`Server/Database[@Name='${escapedDbName}' and @Schema='${escapedDbSchema}']`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Urn should be correct with Multiple levels of Nodes', async function (): Promise<void> {
|
||||||
|
const rootNode: ExtHostObjectExplorerNodeStub =
|
||||||
|
new ExtHostObjectExplorerNodeStub('Databases', undefined, 'Folder', undefined)
|
||||||
|
.createChild(dbName, dbSchema, 'Database')
|
||||||
|
.createChild('Tables', undefined, 'Folder')
|
||||||
|
.createChild(tableName, tableSchema, 'Table');
|
||||||
|
should(await buildUrn(rootNode)).equal(
|
||||||
|
`Server/Database[@Name='${escapedDbName}' and @Schema='${escapedDbSchema}']/Table[@Name='${escapedTableName}' and @Schema='${escapedTableSchema}']`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('doubleEscapeSingleQuotes Method Tests', () => {
|
||||||
|
it('Should return original string if no single quotes', function (): void {
|
||||||
|
const testString: string = 'MyTestString';
|
||||||
|
const ret = doubleEscapeSingleQuotes(testString);
|
||||||
|
should(ret).equal(testString);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should return escaped original string if it contains single quotes', function (): void {
|
||||||
|
const testString: string = 'MyTestString\'\'WithQuotes';
|
||||||
|
const ret = doubleEscapeSingleQuotes(testString);
|
||||||
|
should(ret).equal('MyTestString\'\'\'\'WithQuotes');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('backEscapeDoubleQuotes Method Tests', () => {
|
||||||
|
it('Should return original string if no double quotes', function (): void {
|
||||||
|
const testString: string = 'MyTestString';
|
||||||
|
const ret = backEscapeDoubleQuotes(testString);
|
||||||
|
should(ret).equal(testString);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should return escaped original string if it contains double quotes', function (): void {
|
||||||
|
const testString: string = 'MyTestString\"\"WithQuotes';
|
||||||
|
const ret = backEscapeDoubleQuotes(testString);
|
||||||
|
should(ret).equal('MyTestString\\"\\"WithQuotes');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,39 +4,58 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
|
||||||
|
|
||||||
export interface IPackageInfo {
|
export interface IPackageInfo {
|
||||||
name: string;
|
name: string;
|
||||||
version: string;
|
version: string;
|
||||||
aiKey: string;
|
aiKey: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPackageInfo(packageJson: any): IPackageInfo {
|
export function getPackageInfo(packageJson: any): IPackageInfo {
|
||||||
if (packageJson) {
|
if (packageJson) {
|
||||||
return {
|
return {
|
||||||
name: packageJson.name,
|
name: packageJson.name,
|
||||||
version: packageJson.version,
|
version: packageJson.version,
|
||||||
aiKey: packageJson.aiKey
|
aiKey: packageJson.aiKey
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the configuration for a extensionName
|
* Escapes all single-quotes (') by prefixing them with another single quote ('')
|
||||||
* @param extensionName The string name of the extension to get the configuration for
|
* ' => ''
|
||||||
* @param resource The optional URI, as a URI object or a string, to use to get resource-scoped configurations
|
* @param value The string to escape
|
||||||
*/
|
*/
|
||||||
export function getConfiguration(extensionName?: string, resource?: vscode.Uri | string): vscode.WorkspaceConfiguration {
|
export function doubleEscapeSingleQuotes(value: string): string {
|
||||||
if (typeof resource === 'string') {
|
return value.replace(/'/g, '\'\'');
|
||||||
try {
|
|
||||||
resource = this.parseUri(resource);
|
|
||||||
} catch (e) {
|
|
||||||
resource = undefined;
|
|
||||||
}
|
|
||||||
} else if (!resource) {
|
|
||||||
// Fix to avoid adding lots of errors to debug console. Expects a valid resource or null, not undefined
|
|
||||||
resource = null;
|
|
||||||
}
|
|
||||||
return vscode.workspace.getConfiguration(extensionName, resource as vscode.Uri);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Escape all double-quotes (") by prefixing them with a \
|
||||||
|
* " => \"
|
||||||
|
* @param value The string to escape
|
||||||
|
*/
|
||||||
|
export function backEscapeDoubleQuotes(value: string): string {
|
||||||
|
return value.replace(/"/g, '\\"');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map an error message into a friendly short name for the type of error.
|
||||||
|
* @param msg The error message to map
|
||||||
|
*/
|
||||||
|
export function getTelemetryErrorType(msg: string): string {
|
||||||
|
if (msg.indexOf('is not recognized as an internal or external command') !== -1) {
|
||||||
|
return 'ExeNotFound';
|
||||||
|
}
|
||||||
|
else if (msg.indexOf('Unknown Action') !== -1) {
|
||||||
|
return 'UnknownAction';
|
||||||
|
}
|
||||||
|
else if (msg.indexOf('No Action Provided') !== -1) {
|
||||||
|
return 'NoActionProvided';
|
||||||
|
}
|
||||||
|
else if (msg.indexOf('Run exception') !== -1) {
|
||||||
|
return 'RunException';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 'Other';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,22 +1,22 @@
|
|||||||
{
|
{
|
||||||
"compileOnSave": true,
|
"compileOnSave": true,
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"outDir": "./out",
|
"outDir": "./out",
|
||||||
"lib": [
|
"lib": [
|
||||||
"es6", "es2015.promise"
|
"es6", "es2015.promise"
|
||||||
],
|
],
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
"./node_modules/@types"
|
"./node_modules/@types"
|
||||||
],
|
],
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"declaration": true
|
"declaration": true
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -2,13 +2,6 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
agent-base@4, agent-base@^4.1.0:
|
|
||||||
version "4.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9"
|
|
||||||
integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==
|
|
||||||
dependencies:
|
|
||||||
es6-promisify "^5.0.0"
|
|
||||||
|
|
||||||
ajv@^6.5.5:
|
ajv@^6.5.5:
|
||||||
version "6.9.2"
|
version "6.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.9.2.tgz#4927adb83e7f48e5a32b45729744c71ec39c9c7b"
|
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.9.2.tgz#4927adb83e7f48e5a32b45729744c71ec39c9c7b"
|
||||||
@@ -141,11 +134,6 @@ balanced-match@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||||
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
||||||
|
|
||||||
base64-js@^1.0.2:
|
|
||||||
version "1.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3"
|
|
||||||
integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==
|
|
||||||
|
|
||||||
bcrypt-pbkdf@^1.0.0:
|
bcrypt-pbkdf@^1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
|
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
|
||||||
@@ -158,14 +146,6 @@ beeper@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
|
resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
|
||||||
integrity sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=
|
integrity sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=
|
||||||
|
|
||||||
bl@^1.0.0:
|
|
||||||
version "1.2.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c"
|
|
||||||
integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==
|
|
||||||
dependencies:
|
|
||||||
readable-stream "^2.3.5"
|
|
||||||
safe-buffer "^5.1.1"
|
|
||||||
|
|
||||||
block-stream@*:
|
block-stream@*:
|
||||||
version "0.0.9"
|
version "0.0.9"
|
||||||
resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
|
resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
|
||||||
@@ -190,37 +170,11 @@ braces@^1.8.2:
|
|||||||
preserve "^0.2.0"
|
preserve "^0.2.0"
|
||||||
repeat-element "^1.1.2"
|
repeat-element "^1.1.2"
|
||||||
|
|
||||||
buffer-alloc-unsafe@^1.1.0:
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
|
|
||||||
integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==
|
|
||||||
|
|
||||||
buffer-alloc@^1.2.0:
|
|
||||||
version "1.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec"
|
|
||||||
integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==
|
|
||||||
dependencies:
|
|
||||||
buffer-alloc-unsafe "^1.1.0"
|
|
||||||
buffer-fill "^1.0.0"
|
|
||||||
|
|
||||||
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"
|
||||||
integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=
|
integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=
|
||||||
|
|
||||||
buffer-fill@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
|
|
||||||
integrity sha1-+PeLdniYiO858gXNY39o5wISKyw=
|
|
||||||
|
|
||||||
buffer@^5.2.1:
|
|
||||||
version "5.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6"
|
|
||||||
integrity sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==
|
|
||||||
dependencies:
|
|
||||||
base64-js "^1.0.2"
|
|
||||||
ieee754 "^1.1.4"
|
|
||||||
|
|
||||||
camelcase-keys@^2.0.0:
|
camelcase-keys@^2.0.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
|
resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
|
||||||
@@ -317,13 +271,6 @@ commander@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"
|
||||||
integrity sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=
|
integrity sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=
|
||||||
|
|
||||||
commander@~2.8.1:
|
|
||||||
version "2.8.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4"
|
|
||||||
integrity sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=
|
|
||||||
dependencies:
|
|
||||||
graceful-readlink ">= 1.0.0"
|
|
||||||
|
|
||||||
concat-map@0.0.1:
|
concat-map@0.0.1:
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||||
@@ -375,78 +322,11 @@ debug@2.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ms "0.7.1"
|
ms "0.7.1"
|
||||||
|
|
||||||
debug@3.1.0:
|
|
||||||
version "3.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
|
||||||
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
|
|
||||||
dependencies:
|
|
||||||
ms "2.0.0"
|
|
||||||
|
|
||||||
debug@^3.1.0:
|
|
||||||
version "3.2.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
|
|
||||||
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
|
|
||||||
dependencies:
|
|
||||||
ms "^2.1.1"
|
|
||||||
|
|
||||||
decamelize@^1.1.2:
|
decamelize@^1.1.2:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
|
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
|
||||||
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
|
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
|
||||||
|
|
||||||
decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1:
|
|
||||||
version "4.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1"
|
|
||||||
integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==
|
|
||||||
dependencies:
|
|
||||||
file-type "^5.2.0"
|
|
||||||
is-stream "^1.1.0"
|
|
||||||
tar-stream "^1.5.2"
|
|
||||||
|
|
||||||
decompress-tarbz2@^4.0.0:
|
|
||||||
version "4.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b"
|
|
||||||
integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==
|
|
||||||
dependencies:
|
|
||||||
decompress-tar "^4.1.0"
|
|
||||||
file-type "^6.1.0"
|
|
||||||
is-stream "^1.1.0"
|
|
||||||
seek-bzip "^1.0.5"
|
|
||||||
unbzip2-stream "^1.0.9"
|
|
||||||
|
|
||||||
decompress-targz@^4.0.0:
|
|
||||||
version "4.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee"
|
|
||||||
integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==
|
|
||||||
dependencies:
|
|
||||||
decompress-tar "^4.1.1"
|
|
||||||
file-type "^5.2.0"
|
|
||||||
is-stream "^1.1.0"
|
|
||||||
|
|
||||||
decompress-unzip@^4.0.1:
|
|
||||||
version "4.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69"
|
|
||||||
integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k=
|
|
||||||
dependencies:
|
|
||||||
file-type "^3.8.0"
|
|
||||||
get-stream "^2.2.0"
|
|
||||||
pify "^2.3.0"
|
|
||||||
yauzl "^2.4.2"
|
|
||||||
|
|
||||||
decompress@^4.2.0:
|
|
||||||
version "4.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.0.tgz#7aedd85427e5a92dacfe55674a7c505e96d01f9d"
|
|
||||||
integrity sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=
|
|
||||||
dependencies:
|
|
||||||
decompress-tar "^4.0.0"
|
|
||||||
decompress-tarbz2 "^4.0.0"
|
|
||||||
decompress-targz "^4.0.0"
|
|
||||||
decompress-unzip "^4.0.1"
|
|
||||||
graceful-fs "^4.1.10"
|
|
||||||
make-dir "^1.0.0"
|
|
||||||
pify "^2.3.0"
|
|
||||||
strip-dirs "^2.0.0"
|
|
||||||
|
|
||||||
deep-assign@^1.0.0:
|
deep-assign@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/deep-assign/-/deep-assign-1.0.0.tgz#b092743be8427dc621ea0067cdec7e70dd19f37b"
|
resolved "https://registry.yarnpkg.com/deep-assign/-/deep-assign-1.0.0.tgz#b092743be8427dc621ea0067cdec7e70dd19f37b"
|
||||||
@@ -520,18 +400,6 @@ error-ex@^1.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-arrayish "^0.2.1"
|
is-arrayish "^0.2.1"
|
||||||
|
|
||||||
es6-promise@^4.0.3:
|
|
||||||
version "4.2.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f"
|
|
||||||
integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==
|
|
||||||
|
|
||||||
es6-promisify@^5.0.0:
|
|
||||||
version "5.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
|
|
||||||
integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=
|
|
||||||
dependencies:
|
|
||||||
es6-promise "^4.0.3"
|
|
||||||
|
|
||||||
escape-string-regexp@1.0.2:
|
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"
|
||||||
@@ -581,11 +449,6 @@ event-stream@~3.1.5:
|
|||||||
stream-combiner "~0.0.4"
|
stream-combiner "~0.0.4"
|
||||||
through "~2.3.1"
|
through "~2.3.1"
|
||||||
|
|
||||||
eventemitter2@^5.0.1:
|
|
||||||
version "5.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-5.0.1.tgz#6197a095d5fb6b57e8942f6fd7eaad63a09c9452"
|
|
||||||
integrity sha1-YZegldX7a1folC9v1+qtY6CclFI=
|
|
||||||
|
|
||||||
expand-brackets@^0.1.4:
|
expand-brackets@^0.1.4:
|
||||||
version "0.1.5"
|
version "0.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
|
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
|
||||||
@@ -656,21 +519,6 @@ fd-slicer@~1.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
pend "~1.2.0"
|
pend "~1.2.0"
|
||||||
|
|
||||||
file-type@^3.8.0:
|
|
||||||
version "3.9.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
|
|
||||||
integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek=
|
|
||||||
|
|
||||||
file-type@^5.2.0:
|
|
||||||
version "5.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6"
|
|
||||||
integrity sha1-LdvqfHP/42No365J3DOMBYwritY=
|
|
||||||
|
|
||||||
file-type@^6.1.0:
|
|
||||||
version "6.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919"
|
|
||||||
integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==
|
|
||||||
|
|
||||||
filename-regex@^2.0.0:
|
filename-regex@^2.0.0:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
|
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
|
||||||
@@ -731,11 +579,6 @@ from@^0.1.7, from@~0:
|
|||||||
resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
|
resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
|
||||||
integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=
|
integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=
|
||||||
|
|
||||||
fs-constants@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
|
|
||||||
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
|
|
||||||
|
|
||||||
fs.realpath@^1.0.0:
|
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"
|
||||||
@@ -761,14 +604,6 @@ get-stdin@^4.0.1:
|
|||||||
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
|
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
|
||||||
integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=
|
integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=
|
||||||
|
|
||||||
get-stream@^2.2.0:
|
|
||||||
version "2.3.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de"
|
|
||||||
integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=
|
|
||||||
dependencies:
|
|
||||||
object-assign "^4.0.1"
|
|
||||||
pinkie-promise "^2.0.0"
|
|
||||||
|
|
||||||
getpass@^0.1.1:
|
getpass@^0.1.1:
|
||||||
version "0.1.7"
|
version "0.1.7"
|
||||||
resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
|
resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
|
||||||
@@ -851,7 +686,7 @@ glogg@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
sparkles "^1.0.0"
|
sparkles "^1.0.0"
|
||||||
|
|
||||||
graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.2:
|
graceful-fs@^4.0.0, graceful-fs@^4.1.2:
|
||||||
version "4.1.15"
|
version "4.1.15"
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
|
||||||
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
|
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
|
||||||
@@ -863,11 +698,6 @@ graceful-fs@~3.0.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
natives "^1.1.0"
|
natives "^1.1.0"
|
||||||
|
|
||||||
"graceful-readlink@>= 1.0.0":
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
|
|
||||||
integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=
|
|
||||||
|
|
||||||
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"
|
||||||
@@ -1046,14 +876,6 @@ hosted-git-info@^2.1.4:
|
|||||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
|
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
|
||||||
integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==
|
integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==
|
||||||
|
|
||||||
http-proxy-agent@^2.1.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405"
|
|
||||||
integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==
|
|
||||||
dependencies:
|
|
||||||
agent-base "4"
|
|
||||||
debug "3.1.0"
|
|
||||||
|
|
||||||
http-signature@~1.2.0:
|
http-signature@~1.2.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
|
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
|
||||||
@@ -1063,19 +885,6 @@ http-signature@~1.2.0:
|
|||||||
jsprim "^1.2.2"
|
jsprim "^1.2.2"
|
||||||
sshpk "^1.7.0"
|
sshpk "^1.7.0"
|
||||||
|
|
||||||
https-proxy-agent@^2.2.1:
|
|
||||||
version "2.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0"
|
|
||||||
integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==
|
|
||||||
dependencies:
|
|
||||||
agent-base "^4.1.0"
|
|
||||||
debug "^3.1.0"
|
|
||||||
|
|
||||||
ieee754@^1.1.4:
|
|
||||||
version "1.1.12"
|
|
||||||
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b"
|
|
||||||
integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==
|
|
||||||
|
|
||||||
indent-string@^2.1.0:
|
indent-string@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
|
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
|
||||||
@@ -1154,11 +963,6 @@ is-glob@^3.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-extglob "^2.1.0"
|
is-extglob "^2.1.0"
|
||||||
|
|
||||||
is-natural-number@^4.0.1:
|
|
||||||
version "4.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8"
|
|
||||||
integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=
|
|
||||||
|
|
||||||
is-number@^2.1.0:
|
is-number@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
|
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
|
||||||
@@ -1531,13 +1335,6 @@ lru-cache@2:
|
|||||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
|
||||||
integrity sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=
|
integrity sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=
|
||||||
|
|
||||||
make-dir@^1.0.0:
|
|
||||||
version "1.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
|
|
||||||
integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==
|
|
||||||
dependencies:
|
|
||||||
pify "^3.0.0"
|
|
||||||
|
|
||||||
map-obj@^1.0.0, map-obj@^1.0.1:
|
map-obj@^1.0.0, map-obj@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
|
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
|
||||||
@@ -1675,16 +1472,6 @@ ms@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"
|
||||||
integrity sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=
|
integrity sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=
|
||||||
|
|
||||||
ms@2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
|
||||||
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
|
||||||
|
|
||||||
ms@^2.1.1:
|
|
||||||
version "2.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
|
|
||||||
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
|
|
||||||
|
|
||||||
multimatch@^2.0.0:
|
multimatch@^2.0.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
|
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
|
||||||
@@ -1780,11 +1567,6 @@ ordered-read-streams@^0.3.0:
|
|||||||
is-stream "^1.0.1"
|
is-stream "^1.0.1"
|
||||||
readable-stream "^2.0.1"
|
readable-stream "^2.0.1"
|
||||||
|
|
||||||
os-tmpdir@~1.0.2:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
|
|
||||||
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
|
|
||||||
|
|
||||||
parse-glob@^3.0.4:
|
parse-glob@^3.0.4:
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
|
resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
|
||||||
@@ -1855,16 +1637,11 @@ performance-now@^2.1.0:
|
|||||||
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
||||||
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
|
||||||
|
|
||||||
pify@^2.0.0, pify@^2.3.0:
|
pify@^2.0.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
||||||
integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
|
integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
|
||||||
|
|
||||||
pify@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
|
|
||||||
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
|
|
||||||
|
|
||||||
pinkie-promise@^2.0.0:
|
pinkie-promise@^2.0.0:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
|
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
|
||||||
@@ -1950,7 +1727,7 @@ read-pkg@^1.0.0:
|
|||||||
isarray "0.0.1"
|
isarray "0.0.1"
|
||||||
string_decoder "~0.10.x"
|
string_decoder "~0.10.x"
|
||||||
|
|
||||||
readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6:
|
readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.3.5, readable-stream@~2.3.6:
|
||||||
version "2.3.6"
|
version "2.3.6"
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
|
||||||
integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
|
integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
|
||||||
@@ -2060,7 +1837,7 @@ rimraf@2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.1.3"
|
glob "^7.1.3"
|
||||||
|
|
||||||
safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
version "5.1.2"
|
version "5.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||||
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
||||||
@@ -2070,29 +1847,11 @@ safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
|
|||||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||||
|
|
||||||
seek-bzip@^1.0.5:
|
|
||||||
version "1.0.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc"
|
|
||||||
integrity sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=
|
|
||||||
dependencies:
|
|
||||||
commander "~2.8.1"
|
|
||||||
|
|
||||||
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0:
|
"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0:
|
||||||
version "5.6.0"
|
version "5.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
|
||||||
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
|
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
|
||||||
|
|
||||||
"service-downloader@github:anthonydresser/service-downloader#0.1.5":
|
|
||||||
version "0.1.5"
|
|
||||||
resolved "https://codeload.github.com/anthonydresser/service-downloader/tar.gz/6ebb0465573cc140e461a22f334260f55ef45546"
|
|
||||||
dependencies:
|
|
||||||
decompress "^4.2.0"
|
|
||||||
eventemitter2 "^5.0.1"
|
|
||||||
http-proxy-agent "^2.1.0"
|
|
||||||
https-proxy-agent "^2.2.1"
|
|
||||||
mkdirp "^0.5.1"
|
|
||||||
tmp "^0.0.33"
|
|
||||||
|
|
||||||
sigmund@~1.0.0:
|
sigmund@~1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
|
resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
|
||||||
@@ -2262,13 +2021,6 @@ strip-bom@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-utf8 "^0.2.0"
|
is-utf8 "^0.2.0"
|
||||||
|
|
||||||
strip-dirs@^2.0.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5"
|
|
||||||
integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==
|
|
||||||
dependencies:
|
|
||||||
is-natural-number "^4.0.1"
|
|
||||||
|
|
||||||
strip-indent@^1.0.1:
|
strip-indent@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
|
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
|
||||||
@@ -2291,19 +2043,6 @@ supports-color@^2.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
|
||||||
integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
|
integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
|
||||||
|
|
||||||
tar-stream@^1.5.2:
|
|
||||||
version "1.6.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555"
|
|
||||||
integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==
|
|
||||||
dependencies:
|
|
||||||
bl "^1.0.0"
|
|
||||||
buffer-alloc "^1.2.0"
|
|
||||||
end-of-stream "^1.0.0"
|
|
||||||
fs-constants "^1.0.0"
|
|
||||||
readable-stream "^2.3.0"
|
|
||||||
to-buffer "^1.1.1"
|
|
||||||
xtend "^4.0.0"
|
|
||||||
|
|
||||||
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"
|
||||||
@@ -2371,13 +2110,6 @@ time-stamp@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3"
|
resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3"
|
||||||
integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=
|
integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=
|
||||||
|
|
||||||
tmp@^0.0.33:
|
|
||||||
version "0.0.33"
|
|
||||||
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
|
|
||||||
integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
|
|
||||||
dependencies:
|
|
||||||
os-tmpdir "~1.0.2"
|
|
||||||
|
|
||||||
to-absolute-glob@^0.1.1:
|
to-absolute-glob@^0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f"
|
resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f"
|
||||||
@@ -2385,11 +2117,6 @@ to-absolute-glob@^0.1.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
extend-shallow "^2.0.1"
|
extend-shallow "^2.0.1"
|
||||||
|
|
||||||
to-buffer@^1.1.1:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80"
|
|
||||||
integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==
|
|
||||||
|
|
||||||
to-iso-string@0.0.2:
|
to-iso-string@0.0.2:
|
||||||
version "0.0.2"
|
version "0.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1"
|
resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1"
|
||||||
@@ -2420,14 +2147,6 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
|||||||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
|
||||||
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
|
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
|
||||||
|
|
||||||
unbzip2-stream@^1.0.9:
|
|
||||||
version "1.3.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz#d156d205e670d8d8c393e1c02ebd506422873f6a"
|
|
||||||
integrity sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==
|
|
||||||
dependencies:
|
|
||||||
buffer "^5.2.1"
|
|
||||||
through "^2.3.8"
|
|
||||||
|
|
||||||
unique-stream@^2.0.2:
|
unique-stream@^2.0.2:
|
||||||
version "2.3.1"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac"
|
resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac"
|
||||||
@@ -2588,7 +2307,7 @@ wrappy@1:
|
|||||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||||
|
|
||||||
"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1:
|
"xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.0, xtend@~4.0.1:
|
||||||
version "4.0.1"
|
version "4.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
|
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
|
||||||
integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68=
|
integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68=
|
||||||
@@ -2605,7 +2324,7 @@ xtend@~3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a"
|
resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a"
|
||||||
integrity sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=
|
integrity sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=
|
||||||
|
|
||||||
yauzl@^2.2.1, yauzl@^2.4.2:
|
yauzl@^2.2.1:
|
||||||
version "2.10.0"
|
version "2.10.0"
|
||||||
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
|
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
|
||||||
integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
|
integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
|
||||||
|
|||||||
1
extensions/agent/.gitignore
vendored
Normal file
1
extensions/agent/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.vsix
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
client/src/**
|
src/**
|
||||||
client/tsconfig.json
|
out/test/**
|
||||||
|
tsconfig.json
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
"name": "agent",
|
"name": "agent",
|
||||||
"displayName": "SQL Server Agent",
|
"displayName": "SQL Server Agent",
|
||||||
"description": "Manage and troubleshoot SQL Server Agent jobs",
|
"description": "Manage and troubleshoot SQL Server Agent jobs",
|
||||||
"version": "0.37.0",
|
"version": "0.40.0",
|
||||||
"publisher": "Microsoft",
|
"publisher": "Microsoft",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/master/LICENSE.txt",
|
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/master/LICENSE.txt",
|
||||||
"icon": "images/sqlserver.png",
|
"icon": "images/sqlserver.png",
|
||||||
"aiKey": "AIF-5574968e-856d-40d2-af67-c89a14e76412",
|
"aiKey": "AIF-5574968e-856d-40d2-af67-c89a14e76412",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "0.10.x"
|
"vscode": "^1.25.0"
|
||||||
},
|
},
|
||||||
"activationEvents": [
|
"activationEvents": [
|
||||||
"*"
|
"*"
|
||||||
@@ -46,7 +46,13 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"mocha-junit-reporter": "^1.17.0",
|
"mocha-junit-reporter": "^1.17.0",
|
||||||
"mocha-multi-reporters": "^1.1.7"
|
"mocha-multi-reporters": "^1.1.7",
|
||||||
|
"@types/mocha": "^5.2.5",
|
||||||
|
"@types/node": "^8.10.25",
|
||||||
|
"mocha": "^5.2.0",
|
||||||
|
"should": "^13.2.1",
|
||||||
|
"typemoq": "^2.1.0",
|
||||||
|
"vscode": "1.1.5"
|
||||||
},
|
},
|
||||||
"__metadata": {
|
"__metadata": {
|
||||||
"id": "10",
|
"id": "10",
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* 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.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as data from 'azdata';
|
import * as data from 'azdata';
|
||||||
|
|
||||||
@@ -12,52 +11,51 @@ import * as data from 'azdata';
|
|||||||
* this API from our code
|
* this API from our code
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
* @class ApiWrapper
|
|
||||||
*/
|
*/
|
||||||
export class ApiWrapper {
|
export class ApiWrapper {
|
||||||
// Data APIs
|
// Data APIs
|
||||||
|
|
||||||
public registerWebviewProvider(widgetId: string, handler: (webview: data.DashboardWebview) => void): void {
|
public registerWebviewProvider(widgetId: string, handler: (webview: data.DashboardWebview) => void): void {
|
||||||
return data.dashboard.registerWebviewProvider(widgetId, handler);
|
return data.dashboard.registerWebviewProvider(widgetId, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public registerControlHostProvider(widgetId: string, handler: (webview: data.DashboardWebview) => void): void {
|
public registerControlHostProvider(widgetId: string, handler: (webview: data.DashboardWebview) => void): void {
|
||||||
return data.dashboard.registerWebviewProvider(widgetId, handler);
|
return data.dashboard.registerWebviewProvider(widgetId, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the configuration for a extensionName
|
* Get the configuration for a extensionName
|
||||||
* @param extensionName The string name of the extension to get the configuration for
|
* @param extensionName The string name of the extension to get the configuration for
|
||||||
* @param resource The optional URI, as a URI object or a string, to use to get resource-scoped configurations
|
* @param resource The optional URI, as a URI object or a string, to use to get resource-scoped configurations
|
||||||
*/
|
*/
|
||||||
public getConfiguration(extensionName: string, resource?: vscode.Uri | string): vscode.WorkspaceConfiguration {
|
public getConfiguration(extensionName: string, resource?: vscode.Uri | string): vscode.WorkspaceConfiguration {
|
||||||
if (typeof resource === 'string') {
|
if (typeof resource === 'string') {
|
||||||
try {
|
try {
|
||||||
resource = this.parseUri(resource);
|
resource = this.parseUri(resource);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
resource = undefined;
|
resource = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return vscode.workspace.getConfiguration(extensionName, resource as vscode.Uri);
|
return vscode.workspace.getConfiguration(extensionName, resource as vscode.Uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse uri
|
* Parse uri
|
||||||
*/
|
*/
|
||||||
public parseUri(uri: string): vscode.Uri {
|
public parseUri(uri: string): vscode.Uri {
|
||||||
return vscode.Uri.parse(uri);
|
return vscode.Uri.parse(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
public showOpenDialog(options: vscode.OpenDialogOptions): Thenable<vscode.Uri[] | undefined> {
|
public showOpenDialog(options: vscode.OpenDialogOptions): Thenable<vscode.Uri[] | undefined> {
|
||||||
return vscode.window.showOpenDialog(options);
|
return vscode.window.showOpenDialog(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
public showErrorMessage(message: string, ...items: string[]): Thenable<string | undefined> {
|
public showErrorMessage(message: string, ...items: string[]): Thenable<string | undefined> {
|
||||||
return vscode.window.showErrorMessage(message, ...items);
|
return vscode.window.showErrorMessage(message, ...items);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get workspaceRootPath(): string {
|
public get workspaceRootPath(): string {
|
||||||
return vscode.workspace.rootPath;
|
return vscode.workspace.rootPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export class AlertData implements IAgentDialogData {
|
|||||||
public static readonly AlertTypeSqlServerEventString: string = localize('alertData.DefaultAlertTypString', 'SQL Server event alert');
|
public static readonly AlertTypeSqlServerEventString: string = localize('alertData.DefaultAlertTypString', 'SQL Server event alert');
|
||||||
public static readonly AlertTypePerformanceConditionString: string = localize('alertDialog.PerformanceCondition', 'SQL Server performance condition alert');
|
public static readonly AlertTypePerformanceConditionString: string = localize('alertDialog.PerformanceCondition', 'SQL Server performance condition alert');
|
||||||
public static readonly AlertTypeWmiEventString: string = localize('alertDialog.WmiEvent', 'WMI event alert');
|
public static readonly AlertTypeWmiEventString: string = localize('alertDialog.WmiEvent', 'WMI event alert');
|
||||||
public static readonly DefaultAlertTypeString: string = AlertData.AlertTypeSqlServerEventString;
|
public static readonly DefaultAlertTypeString: string = AlertData.AlertTypeSqlServerEventString;
|
||||||
|
|
||||||
ownerUri: string;
|
ownerUri: string;
|
||||||
dialogMode: AgentDialogMode = AgentDialogMode.CREATE;
|
dialogMode: AgentDialogMode = AgentDialogMode.CREATE;
|
||||||
@@ -50,7 +50,7 @@ export class AlertData implements IAgentDialogData {
|
|||||||
private jobModel: JobData;
|
private jobModel: JobData;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
ownerUri:string,
|
ownerUri: string,
|
||||||
alertInfo: azdata.AgentAlertInfo,
|
alertInfo: azdata.AgentAlertInfo,
|
||||||
jobModel?: JobData,
|
jobModel?: JobData,
|
||||||
viaJobDialog: boolean = false
|
viaJobDialog: boolean = false
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const localize = nls.loadMessageBundle();
|
|||||||
|
|
||||||
export class JobData implements IAgentDialogData {
|
export class JobData implements IAgentDialogData {
|
||||||
|
|
||||||
private readonly JobCompletionActionCondition_Always: string = localize('jobData.whenJobCompletes', 'When the job completes');
|
private readonly JobCompletionActionCondition_Always: string = localize('jobData.whenJobCompletes', 'When the job completes');
|
||||||
private readonly JobCompletionActionCondition_OnFailure: string = localize('jobData.whenJobFails', 'When the job fails');
|
private readonly JobCompletionActionCondition_OnFailure: string = localize('jobData.whenJobFails', 'When the job fails');
|
||||||
private readonly JobCompletionActionCondition_OnSuccess: string = localize('jobData.whenJobSucceeds', 'When the job succeeds');
|
private readonly JobCompletionActionCondition_OnSuccess: string = localize('jobData.whenJobSucceeds', 'When the job succeeds');
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ export class JobData implements IAgentDialogData {
|
|||||||
public async save() {
|
public async save() {
|
||||||
let jobInfo: azdata.AgentJobInfo = this.toAgentJobInfo();
|
let jobInfo: azdata.AgentJobInfo = this.toAgentJobInfo();
|
||||||
let result = this.dialogMode === AgentDialogMode.CREATE
|
let result = this.dialogMode === AgentDialogMode.CREATE
|
||||||
? await this._agentService.createJob(this.ownerUri, jobInfo)
|
? await this._agentService.createJob(this.ownerUri, jobInfo)
|
||||||
: await this._agentService.updateJob(this.ownerUri, this.originalName, jobInfo);
|
: await this._agentService.updateJob(this.ownerUri, this.originalName, jobInfo);
|
||||||
if (!result || !result.success) {
|
if (!result || !result.success) {
|
||||||
if (this.dialogMode === AgentDialogMode.EDIT) {
|
if (this.dialogMode === AgentDialogMode.EDIT) {
|
||||||
@@ -142,7 +142,7 @@ export class JobData implements IAgentDialogData {
|
|||||||
localize('jobData.saveSucessMessage', "Job '{0}' updated successfully", jobInfo.name));
|
localize('jobData.saveSucessMessage', "Job '{0}' updated successfully", jobInfo.name));
|
||||||
} else {
|
} else {
|
||||||
vscode.window.showInformationMessage(
|
vscode.window.showInformationMessage(
|
||||||
localize('jobData.newJobSuccessMessage',"Job '{0}' created successfully", jobInfo.name));
|
localize('jobData.newJobSuccessMessage', "Job '{0}' created successfully", jobInfo.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export class JobStepData implements IAgentDialogData {
|
|||||||
private jobModel: JobData;
|
private jobModel: JobData;
|
||||||
private viaJobDialog: boolean;
|
private viaJobDialog: boolean;
|
||||||
|
|
||||||
constructor(ownerUri:string, jobModel?: JobData, viaJobDialog: boolean = false) {
|
constructor(ownerUri: string, jobModel?: JobData, viaJobDialog: boolean = false) {
|
||||||
this.ownerUri = ownerUri;
|
this.ownerUri = ownerUri;
|
||||||
this.jobName = jobModel.name;
|
this.jobName = jobModel.name;
|
||||||
this.jobModel = jobModel;
|
this.jobModel = jobModel;
|
||||||
@@ -102,26 +102,26 @@ export class JobStepData implements IAgentDialogData {
|
|||||||
stepData.jobName = jobStepInfo.jobName;
|
stepData.jobName = jobStepInfo.jobName;
|
||||||
stepData.script = jobStepInfo.script;
|
stepData.script = jobStepInfo.script;
|
||||||
stepData.scriptName = jobStepInfo.scriptName,
|
stepData.scriptName = jobStepInfo.scriptName,
|
||||||
stepData.stepName = jobStepInfo.stepName,
|
stepData.stepName = jobStepInfo.stepName,
|
||||||
stepData.subSystem = jobStepInfo.subSystem,
|
stepData.subSystem = jobStepInfo.subSystem,
|
||||||
stepData.id = jobStepInfo.id,
|
stepData.id = jobStepInfo.id,
|
||||||
stepData.failureAction = jobStepInfo.failureAction,
|
stepData.failureAction = jobStepInfo.failureAction,
|
||||||
stepData.successAction = jobStepInfo.successAction,
|
stepData.successAction = jobStepInfo.successAction,
|
||||||
stepData.failStepId = jobStepInfo.failStepId,
|
stepData.failStepId = jobStepInfo.failStepId,
|
||||||
stepData.successStepId = jobStepInfo.successStepId,
|
stepData.successStepId = jobStepInfo.successStepId,
|
||||||
stepData.command = jobStepInfo.command,
|
stepData.command = jobStepInfo.command,
|
||||||
stepData.commandExecutionSuccessCode = jobStepInfo.commandExecutionSuccessCode,
|
stepData.commandExecutionSuccessCode = jobStepInfo.commandExecutionSuccessCode,
|
||||||
stepData.databaseName = jobStepInfo.databaseName,
|
stepData.databaseName = jobStepInfo.databaseName,
|
||||||
stepData.databaseUserName = jobStepInfo.databaseUserName,
|
stepData.databaseUserName = jobStepInfo.databaseUserName,
|
||||||
stepData.server = jobStepInfo.server,
|
stepData.server = jobStepInfo.server,
|
||||||
stepData.outputFileName = jobStepInfo.outputFileName,
|
stepData.outputFileName = jobStepInfo.outputFileName,
|
||||||
stepData.appendToLogFile = jobStepInfo.appendToLogFile,
|
stepData.appendToLogFile = jobStepInfo.appendToLogFile,
|
||||||
stepData.appendToStepHist = jobStepInfo.appendToStepHist,
|
stepData.appendToStepHist = jobStepInfo.appendToStepHist,
|
||||||
stepData.writeLogToTable = jobStepInfo.writeLogToTable,
|
stepData.writeLogToTable = jobStepInfo.writeLogToTable,
|
||||||
stepData.appendLogToTable = jobStepInfo.appendLogToTable,
|
stepData.appendLogToTable = jobStepInfo.appendLogToTable,
|
||||||
stepData.retryAttempts = jobStepInfo.retryAttempts,
|
stepData.retryAttempts = jobStepInfo.retryAttempts,
|
||||||
stepData.retryInterval = jobStepInfo.retryInterval,
|
stepData.retryInterval = jobStepInfo.retryInterval,
|
||||||
stepData.proxyName = jobStepInfo.proxyName;
|
stepData.proxyName = jobStepInfo.proxyName;
|
||||||
stepData.dialogMode = AgentDialogMode.EDIT;
|
stepData.dialogMode = AgentDialogMode.EDIT;
|
||||||
stepData.viaJobDialog = true;
|
stepData.viaJobDialog = true;
|
||||||
return stepData;
|
return stepData;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class OperatorData implements IAgentDialogData {
|
|||||||
weekdayPagerStartTime: string;
|
weekdayPagerStartTime: string;
|
||||||
weekdayPagerEndTime: string;
|
weekdayPagerEndTime: string;
|
||||||
|
|
||||||
constructor(ownerUri:string, operatorInfo: azdata.AgentOperatorInfo) {
|
constructor(ownerUri: string, operatorInfo: azdata.AgentOperatorInfo) {
|
||||||
this.ownerUri = ownerUri;
|
this.ownerUri = ownerUri;
|
||||||
if (operatorInfo) {
|
if (operatorInfo) {
|
||||||
this.dialogMode = AgentDialogMode.EDIT;
|
this.dialogMode = AgentDialogMode.EDIT;
|
||||||
@@ -58,7 +58,7 @@ export class OperatorData implements IAgentDialogData {
|
|||||||
|
|
||||||
public async save() {
|
public async save() {
|
||||||
let agentService = await AgentUtils.getAgentService();
|
let agentService = await AgentUtils.getAgentService();
|
||||||
let result = await agentService.createOperator(this.ownerUri, this.toAgentOperatorInfo());
|
let result = await agentService.createOperator(this.ownerUri, this.toAgentOperatorInfo());
|
||||||
if (!result || !result.success) {
|
if (!result || !result.success) {
|
||||||
// TODO handle error here
|
// TODO handle error here
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export class PickScheduleData implements IAgentDialogData {
|
|||||||
public selectedSchedule: azdata.AgentJobScheduleInfo;
|
public selectedSchedule: azdata.AgentJobScheduleInfo;
|
||||||
private jobName: string;
|
private jobName: string;
|
||||||
|
|
||||||
constructor(ownerUri:string, jobName: string) {
|
constructor(ownerUri: string, jobName: string) {
|
||||||
this.ownerUri = ownerUri;
|
this.ownerUri = ownerUri;
|
||||||
this.jobName = jobName;
|
this.jobName = jobName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export class ProxyData implements IAgentDialogData {
|
|||||||
credentialId: number;
|
credentialId: number;
|
||||||
isEnabled: boolean;
|
isEnabled: boolean;
|
||||||
|
|
||||||
constructor(ownerUri:string, proxyInfo: azdata.AgentProxyInfo) {
|
constructor(ownerUri: string, proxyInfo: azdata.AgentProxyInfo) {
|
||||||
this.ownerUri = ownerUri;
|
this.ownerUri = ownerUri;
|
||||||
|
|
||||||
if (proxyInfo) {
|
if (proxyInfo) {
|
||||||
@@ -48,7 +48,7 @@ export class ProxyData implements IAgentDialogData {
|
|||||||
localize('proxyData.saveSucessMessage', "Proxy '{0}' updated successfully", proxyInfo.accountName));
|
localize('proxyData.saveSucessMessage', "Proxy '{0}' updated successfully", proxyInfo.accountName));
|
||||||
} else {
|
} else {
|
||||||
vscode.window.showInformationMessage(
|
vscode.window.showInformationMessage(
|
||||||
localize('proxyData.newJobSuccessMessage',"Proxy '{0}' created successfully", proxyInfo.accountName));
|
localize('proxyData.newJobSuccessMessage', "Proxy '{0}' created successfully", proxyInfo.accountName));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export class ScheduleData implements IAgentDialogData {
|
|||||||
public schedules: azdata.AgentJobScheduleInfo[];
|
public schedules: azdata.AgentJobScheduleInfo[];
|
||||||
public selectedSchedule: azdata.AgentJobScheduleInfo;
|
public selectedSchedule: azdata.AgentJobScheduleInfo;
|
||||||
|
|
||||||
constructor(ownerUri:string) {
|
constructor(ownerUri: string) {
|
||||||
this.ownerUri = ownerUri;
|
this.ownerUri = ownerUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
|||||||
private static readonly CancelButtonText: string = localize('agentDialog.Cancel', 'Cancel');
|
private static readonly CancelButtonText: string = localize('agentDialog.Cancel', 'Cancel');
|
||||||
|
|
||||||
protected _onSuccess: vscode.EventEmitter<T> = new vscode.EventEmitter<T>();
|
protected _onSuccess: vscode.EventEmitter<T> = new vscode.EventEmitter<T>();
|
||||||
|
protected _isOpen: boolean = false;
|
||||||
public readonly onSuccess: vscode.Event<T> = this._onSuccess.event;
|
public readonly onSuccess: vscode.Event<T> = this._onSuccess.event;
|
||||||
public dialog: azdata.window.Dialog;
|
public dialog: azdata.window.Dialog;
|
||||||
|
|
||||||
@@ -35,29 +36,34 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
|||||||
protected abstract async initializeDialog(dialog: azdata.window.Dialog);
|
protected abstract async initializeDialog(dialog: azdata.window.Dialog);
|
||||||
|
|
||||||
public async openDialog(dialogName?: string) {
|
public async openDialog(dialogName?: string) {
|
||||||
let event = dialogName ? dialogName : null;
|
if (!this._isOpen) {
|
||||||
this.dialog = azdata.window.createModelViewDialog(this.title, event);
|
this._isOpen = true;
|
||||||
|
let event = dialogName ? dialogName : null;
|
||||||
|
this.dialog = azdata.window.createModelViewDialog(this.title, event);
|
||||||
|
|
||||||
await this.model.initialize();
|
await this.model.initialize();
|
||||||
|
|
||||||
await this.initializeDialog(this.dialog);
|
await this.initializeDialog(this.dialog);
|
||||||
|
|
||||||
this.dialog.okButton.label = AgentDialog.OkButtonText;
|
this.dialog.okButton.label = AgentDialog.OkButtonText;
|
||||||
this.dialog.okButton.onClick(async () => await this.execute());
|
this.dialog.okButton.onClick(async () => await this.execute());
|
||||||
|
|
||||||
this.dialog.cancelButton.label = AgentDialog.CancelButtonText;
|
this.dialog.cancelButton.label = AgentDialog.CancelButtonText;
|
||||||
this.dialog.cancelButton.onClick(async () => await this.cancel());
|
this.dialog.cancelButton.onClick(async () => await this.cancel());
|
||||||
|
|
||||||
azdata.window.openDialog(this.dialog);
|
azdata.window.openDialog(this.dialog);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async execute() {
|
protected async execute() {
|
||||||
this.updateModel();
|
this.updateModel();
|
||||||
await this.model.save();
|
await this.model.save();
|
||||||
|
this._isOpen = false;
|
||||||
this._onSuccess.fire(this.model);
|
this._onSuccess.fire(this.model);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async cancel() {
|
protected async cancel() {
|
||||||
|
this._isOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getActualConditionValue(checkbox: azdata.CheckBoxComponent, dropdown: azdata.DropDownComponent): azdata.JobCompletionActionCondition {
|
protected getActualConditionValue(checkbox: azdata.CheckBoxComponent, dropdown: azdata.DropDownComponent): azdata.JobCompletionActionCondition {
|
||||||
@@ -77,4 +83,8 @@ export abstract class AgentDialog<T extends IAgentDialogData> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get isOpen(): boolean {
|
||||||
|
return this._isOpen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -62,14 +62,14 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
private static readonly AlertSeverity025Label: string = localize('alertDialog.Severity025', '025 - Fatal Error');
|
private static readonly AlertSeverity025Label: string = localize('alertDialog.Severity025', '025 - Fatal Error');
|
||||||
private static readonly AllDatabases: string = localize('alertDialog.AllDatabases', '<all databases>');
|
private static readonly AllDatabases: string = localize('alertDialog.AllDatabases', '<all databases>');
|
||||||
|
|
||||||
private static readonly AlertTypes: string[] = [
|
private static readonly AlertTypes: string[] = [
|
||||||
AlertData.AlertTypeSqlServerEventString,
|
AlertData.AlertTypeSqlServerEventString,
|
||||||
// Disabled until next release
|
// Disabled until next release
|
||||||
// AlertData.AlertTypePerformanceConditionString,
|
// AlertData.AlertTypePerformanceConditionString,
|
||||||
// AlertData.AlertTypeWmiEventString
|
// AlertData.AlertTypeWmiEventString
|
||||||
];
|
];
|
||||||
|
|
||||||
private static readonly AlertSeverities: string[] = [
|
private static readonly AlertSeverities: string[] = [
|
||||||
AlertDialog.AlertSeverity001Label,
|
AlertDialog.AlertSeverity001Label,
|
||||||
AlertDialog.AlertSeverity002Label,
|
AlertDialog.AlertSeverity002Label,
|
||||||
AlertDialog.AlertSeverity003Label,
|
AlertDialog.AlertSeverity003Label,
|
||||||
@@ -100,21 +100,21 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
// Response tab strings
|
// Response tab strings
|
||||||
private static readonly ExecuteJobCheckBoxLabel: string = localize('alertDialog.ExecuteJob', 'Execute Job');
|
private static readonly ExecuteJobCheckBoxLabel: string = localize('alertDialog.ExecuteJob', 'Execute Job');
|
||||||
private static readonly ExecuteJobTextBoxLabel: string = localize('alertDialog.ExecuteJobName', 'Job Name');
|
private static readonly ExecuteJobTextBoxLabel: string = localize('alertDialog.ExecuteJobName', 'Job Name');
|
||||||
private static readonly NotifyOperatorsTextBoxLabel: string = localize('alertDialog.NotifyOperators', 'Notify Operators');
|
private static readonly NotifyOperatorsTextBoxLabel: string = localize('alertDialog.NotifyOperators', 'Notify Operators');
|
||||||
private static readonly NewJobButtonLabel: string = localize('alertDialog.NewJob', 'New Job');
|
private static readonly NewJobButtonLabel: string = localize('alertDialog.NewJob', 'New Job');
|
||||||
private static readonly OperatorListLabel: string = localize('alertDialog.OperatorList', 'Operator List');
|
private static readonly OperatorListLabel: string = localize('alertDialog.OperatorList', 'Operator List');
|
||||||
private static readonly OperatorNameColumnLabel: string = localize('alertDialog.OperatorName', 'Operator');
|
private static readonly OperatorNameColumnLabel: string = localize('alertDialog.OperatorName', 'Operator');
|
||||||
private static readonly OperatorEmailColumnLabel: string = localize('alertDialog.OperatorEmail', 'E-mail');
|
private static readonly OperatorEmailColumnLabel: string = localize('alertDialog.OperatorEmail', 'E-mail');
|
||||||
private static readonly OperatorPagerColumnLabel: string = localize('alertDialog.OperatorPager', 'Pager');
|
private static readonly OperatorPagerColumnLabel: string = localize('alertDialog.OperatorPager', 'Pager');
|
||||||
private static readonly NewOperatorButtonLabel: string = localize('alertDialog.NewOperator', 'New Operator');
|
private static readonly NewOperatorButtonLabel: string = localize('alertDialog.NewOperator', 'New Operator');
|
||||||
|
|
||||||
// Options tab strings
|
// Options tab strings
|
||||||
private static readonly IncludeErrorInEmailCheckBoxLabel: string = localize('alertDialog.IncludeErrorInEmail', 'Include alert error text in e-mail');
|
private static readonly IncludeErrorInEmailCheckBoxLabel: string = localize('alertDialog.IncludeErrorInEmail', 'Include alert error text in e-mail');
|
||||||
private static readonly IncludeErrorInPagerCheckBoxLabel: string = localize('alertDialog.IncludeErrorInPager', 'Include alert error text in pager');
|
private static readonly IncludeErrorInPagerCheckBoxLabel: string = localize('alertDialog.IncludeErrorInPager', 'Include alert error text in pager');
|
||||||
private static readonly AdditionalMessageTextBoxLabel: string = localize('alertDialog.AdditionalNotification', 'Additional notification message to send');
|
private static readonly AdditionalMessageTextBoxLabel: string = localize('alertDialog.AdditionalNotification', 'Additional notification message to send');
|
||||||
private static readonly DelayBetweenResponsesTextBoxLabel: string = localize('alertDialog.DelayBetweenResponse', 'Delay between responses');
|
private static readonly DelayBetweenResponsesTextBoxLabel: string = localize('alertDialog.DelayBetweenResponse', 'Delay between responses');
|
||||||
private static readonly DelayMinutesTextBoxLabel: string = localize('alertDialog.DelayMinutes', 'Delay Minutes');
|
private static readonly DelayMinutesTextBoxLabel: string = localize('alertDialog.DelayMinutes', 'Delay Minutes');
|
||||||
private static readonly DelaySecondsTextBoxLabel: string = localize('alertDialog.DelaySeconds', 'Delay Seconds');
|
private static readonly DelaySecondsTextBoxLabel: string = localize('alertDialog.DelaySeconds', 'Delay Seconds');
|
||||||
|
|
||||||
// Event Name strings
|
// Event Name strings
|
||||||
private readonly NewAlertDialog = 'NewAlertDialogOpen';
|
private readonly NewAlertDialog = 'NewAlertDialogOpen';
|
||||||
@@ -315,7 +315,7 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
}],
|
}],
|
||||||
title: AlertDialog.EventAlertText
|
title: AlertDialog.EventAlertText
|
||||||
}
|
}
|
||||||
]).withLayout({ width: '100%' }).component();
|
]).withLayout({ width: '100%' }).component();
|
||||||
|
|
||||||
await view.initializeModel(formModel);
|
await view.initializeModel(formModel);
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
|
|
||||||
if (this.model.severity > 0) {
|
if (this.model.severity > 0) {
|
||||||
this.severityRadioButton.checked = true;
|
this.severityRadioButton.checked = true;
|
||||||
this.severityDropDown.value = this.severityDropDown.values[this.model.severity-1];
|
this.severityDropDown.value = this.severityDropDown.values[this.model.severity - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.model.databaseName) {
|
if (this.model.databaseName) {
|
||||||
@@ -356,9 +356,9 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
.component();
|
.component();
|
||||||
this.executeJobTextBox.enabled = false;
|
this.executeJobTextBox.enabled = false;
|
||||||
this.newJobButton = view.modelBuilder.button().withProperties({
|
this.newJobButton = view.modelBuilder.button().withProperties({
|
||||||
label: AlertDialog.NewJobButtonLabel,
|
label: AlertDialog.NewJobButtonLabel,
|
||||||
width: 80
|
width: 80
|
||||||
}).component();
|
}).component();
|
||||||
this.newJobButton.enabled = false;
|
this.newJobButton.enabled = false;
|
||||||
this.newJobButton.onDidClick(() => {
|
this.newJobButton.onDidClick(() => {
|
||||||
let jobDialog = new JobDialog(this.ownerUri);
|
let jobDialog = new JobDialog(this.ownerUri);
|
||||||
@@ -382,7 +382,7 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
}, {
|
}, {
|
||||||
component: this.newJobButton,
|
component: this.newJobButton,
|
||||||
title: AlertDialog.NewJobButtonLabel
|
title: AlertDialog.NewJobButtonLabel
|
||||||
}], { componentWidth: '100%'}).component();
|
}], { componentWidth: '100%' }).component();
|
||||||
|
|
||||||
let previewTag = view.modelBuilder.text()
|
let previewTag = view.modelBuilder.text()
|
||||||
.withProperties({
|
.withProperties({
|
||||||
@@ -409,9 +409,9 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.newOperatorButton = view.modelBuilder.button().withProperties({
|
this.newOperatorButton = view.modelBuilder.button().withProperties({
|
||||||
label: AlertDialog.NewOperatorButtonLabel,
|
label: AlertDialog.NewOperatorButtonLabel,
|
||||||
width: 80
|
width: 80
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.operatorsTable.enabled = false;
|
this.operatorsTable.enabled = false;
|
||||||
this.newOperatorButton.enabled = false;
|
this.newOperatorButton.enabled = false;
|
||||||
@@ -438,7 +438,7 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
}, {
|
}, {
|
||||||
component: this.newOperatorButton,
|
component: this.newOperatorButton,
|
||||||
title: ''
|
title: ''
|
||||||
}], { componentWidth: '100%'}).component();
|
}], { componentWidth: '100%' }).component();
|
||||||
|
|
||||||
let formModel = view.modelBuilder.formContainer()
|
let formModel = view.modelBuilder.formContainer()
|
||||||
.withFormItems([{
|
.withFormItems([{
|
||||||
@@ -548,7 +548,7 @@ export class AlertDialog extends AgentDialog<AlertData> {
|
|||||||
} else {
|
} else {
|
||||||
this.model.eventDescriptionKeyword = '';
|
this.model.eventDescriptionKeyword = '';
|
||||||
}
|
}
|
||||||
let minutes = this.delayMinutesTextBox.value ? +this.delayMinutesTextBox.value : 0;
|
let minutes = this.delayMinutesTextBox.value ? +this.delayMinutesTextBox.value : 0;
|
||||||
let seconds = this.delaySecondsTextBox.value ? +this.delaySecondsTextBox : 0;
|
let seconds = this.delaySecondsTextBox.value ? +this.delaySecondsTextBox : 0;
|
||||||
this.model.delayBetweenResponses = minutes + seconds;
|
this.model.delayBetweenResponses = minutes + seconds;
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
|
|
||||||
// Event Name strings
|
// Event Name strings
|
||||||
private readonly NewJobDialogEvent: string = 'NewJobDialogOpened';
|
private readonly NewJobDialogEvent: string = 'NewJobDialogOpened';
|
||||||
private readonly EditJobDialogEvent: string = 'EditJobDialogOpened';
|
private readonly EditJobDialogEvent: string = 'EditJobDialogOpened';
|
||||||
|
|
||||||
// UI Components
|
// UI Components
|
||||||
private generalTab: azdata.window.DialogTab;
|
private generalTab: azdata.window.DialogTab;
|
||||||
@@ -229,7 +229,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
this.StepsTable_FailureColumnString
|
this.StepsTable_FailureColumnString
|
||||||
],
|
],
|
||||||
data: data,
|
data: data,
|
||||||
height: 650
|
height: 500
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.startStepDropdown = view.modelBuilder.dropDown().withProperties({ width: 180 }).component();
|
this.startStepDropdown = view.modelBuilder.dropDown().withProperties({ width: 180 }).component();
|
||||||
@@ -259,9 +259,9 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
width: 140
|
width: 140
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.newStepButton.onDidClick((e)=>{
|
this.newStepButton.onDidClick((e) => {
|
||||||
if (this.nameTextBox.value && this.nameTextBox.value.length > 0) {
|
if (this.nameTextBox.value && this.nameTextBox.value.length > 0) {
|
||||||
let stepDialog = new JobStepDialog(this.model.ownerUri, '' , this.model, null, true);
|
let stepDialog = new JobStepDialog(this.model.ownerUri, '', this.model, null, true);
|
||||||
stepDialog.onSuccess((step) => {
|
stepDialog.onSuccess((step) => {
|
||||||
let stepInfo = JobStepData.convertToAgentJobStepInfo(step);
|
let stepInfo = JobStepData.convertToAgentJobStepInfo(step);
|
||||||
this.steps.push(stepInfo);
|
this.steps.push(stepInfo);
|
||||||
@@ -296,7 +296,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
this.deleteStepButton.enabled = false;
|
this.deleteStepButton.enabled = false;
|
||||||
|
|
||||||
this.moveStepUpButton.onDidClick(() => {
|
this.moveStepUpButton.onDidClick(() => {
|
||||||
let rowNumber = this.stepsTable.selectedRows[0];
|
let rowNumber = this.stepsTable.selectedRows[0];
|
||||||
let previousRow = rowNumber - 1;
|
let previousRow = rowNumber - 1;
|
||||||
let previousStep = this.steps[previousRow];
|
let previousStep = this.steps[previousRow];
|
||||||
let previousStepId = this.steps[previousRow].id;
|
let previousStepId = this.steps[previousRow].id;
|
||||||
@@ -329,7 +329,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
if (this.stepsTable.selectedRows.length === 1) {
|
if (this.stepsTable.selectedRows.length === 1) {
|
||||||
let rowNumber = this.stepsTable.selectedRows[0];
|
let rowNumber = this.stepsTable.selectedRows[0];
|
||||||
let stepData = this.model.jobSteps[rowNumber];
|
let stepData = this.model.jobSteps[rowNumber];
|
||||||
let editStepDialog = new JobStepDialog(this.model.ownerUri, '' , this.model, stepData, true);
|
let editStepDialog = new JobStepDialog(this.model.ownerUri, '', this.model, stepData, true);
|
||||||
editStepDialog.onSuccess((step) => {
|
editStepDialog.onSuccess((step) => {
|
||||||
let stepInfo = JobStepData.convertToAgentJobStepInfo(step);
|
let stepInfo = JobStepData.convertToAgentJobStepInfo(step);
|
||||||
for (let i = 0; i < this.steps.length; i++) {
|
for (let i = 0; i < this.steps.length; i++) {
|
||||||
@@ -349,7 +349,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.deleteStepButton.onDidClick(async() => {
|
this.deleteStepButton.onDidClick(async () => {
|
||||||
if (this.stepsTable.selectedRows.length === 1) {
|
if (this.stepsTable.selectedRows.length === 1) {
|
||||||
let rowNumber = this.stepsTable.selectedRows[0];
|
let rowNumber = this.stepsTable.selectedRows[0];
|
||||||
AgentUtils.getAgentService().then(async (agentService) => {
|
AgentUtils.getAgentService().then(async (agentService) => {
|
||||||
@@ -448,7 +448,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
this.alerts.push(alertInfo);
|
this.alerts.push(alertInfo);
|
||||||
this.alertsTable.data = this.convertAlertsToData(this.alerts);
|
this.alertsTable.data = this.convertAlertsToData(this.alerts);
|
||||||
});
|
});
|
||||||
this.newAlertButton.onDidClick(()=>{
|
this.newAlertButton.onDidClick(() => {
|
||||||
if (this.nameTextBox.value && this.nameTextBox.value.length > 0) {
|
if (this.nameTextBox.value && this.nameTextBox.value.length > 0) {
|
||||||
alertDialog.jobId = this.model.jobId;
|
alertDialog.jobId = this.model.jobId;
|
||||||
alertDialog.jobName = this.model.name ? this.model.name : this.nameTextBox.value;
|
alertDialog.jobName = this.model.name ? this.model.name : this.nameTextBox.value;
|
||||||
@@ -491,7 +491,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
label: 'Remove schedule',
|
label: 'Remove schedule',
|
||||||
width: 100
|
width: 100
|
||||||
}).component();
|
}).component();
|
||||||
this.pickScheduleButton.onDidClick(()=>{
|
this.pickScheduleButton.onDidClick(() => {
|
||||||
let pickScheduleDialog = new PickScheduleDialog(this.model.ownerUri, this.model.name);
|
let pickScheduleDialog = new PickScheduleDialog(this.model.ownerUri, this.model.name);
|
||||||
pickScheduleDialog.onSuccess((dialogModel) => {
|
pickScheduleDialog.onSuccess((dialogModel) => {
|
||||||
let selectedSchedule = dialogModel.selectedSchedule;
|
let selectedSchedule = dialogModel.selectedSchedule;
|
||||||
@@ -507,8 +507,8 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
pickScheduleDialog.showDialog();
|
pickScheduleDialog.showDialog();
|
||||||
});
|
});
|
||||||
this.removeScheduleButton.onDidClick(() => {
|
this.removeScheduleButton.onDidClick(() => {
|
||||||
if (this.schedulesTable.selectedRows.length === 1) {
|
if (this.schedulesTable.selectedRows.length === 1) {
|
||||||
let selectedRow = this.schedulesTable.selectedRows[0];
|
let selectedRow = this.schedulesTable.selectedRows[0];
|
||||||
let selectedScheduleName = this.schedulesTable.data[selectedRow][1];
|
let selectedScheduleName = this.schedulesTable.data[selectedRow][1];
|
||||||
for (let i = 0; i < this.schedules.length; i++) {
|
for (let i = 0; i < this.schedules.length; i++) {
|
||||||
if (this.schedules[i].name === selectedScheduleName) {
|
if (this.schedules[i].name === selectedScheduleName) {
|
||||||
@@ -595,22 +595,23 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
let formModel = view.modelBuilder.formContainer().withFormItems([
|
let formModel = view.modelBuilder.formContainer().withFormItems([
|
||||||
{
|
{
|
||||||
components:
|
components:
|
||||||
[{
|
[{
|
||||||
component: emailContainer,
|
component: emailContainer,
|
||||||
title: ''
|
title: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: pagerContainer,
|
component: pagerContainer,
|
||||||
title: ''
|
title: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: eventLogContainer,
|
component: eventLogContainer,
|
||||||
title: ''
|
title: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: deleteJobContainer,
|
component: deleteJobContainer,
|
||||||
title: ''
|
title: ''
|
||||||
}], title: this.NotificationsTabTopLabelString}]).withLayout({ width: '100%' }).component();
|
}], title: this.NotificationsTabTopLabelString
|
||||||
|
}]).withLayout({ width: '100%' }).component();
|
||||||
|
|
||||||
await view.initializeModel(formModel);
|
await view.initializeModel(formModel);
|
||||||
this.emailConditionDropdown.values = this.model.JobCompletionActionConditions;
|
this.emailConditionDropdown.values = this.model.JobCompletionActionConditions;
|
||||||
@@ -694,7 +695,7 @@ export class JobDialog extends AgentDialog<JobData> {
|
|||||||
this.model.pageLevel = this.getActualConditionValue(this.pagerCheckBox, this.pagerConditionDropdown);
|
this.model.pageLevel = this.getActualConditionValue(this.pagerCheckBox, this.pagerConditionDropdown);
|
||||||
this.model.eventLogLevel = this.getActualConditionValue(this.eventLogCheckBox, this.eventLogConditionDropdown);
|
this.model.eventLogLevel = this.getActualConditionValue(this.eventLogCheckBox, this.eventLogConditionDropdown);
|
||||||
this.model.deleteLevel = this.getActualConditionValue(this.deleteJobCheckBox, this.deleteJobConditionDropdown);
|
this.model.deleteLevel = this.getActualConditionValue(this.deleteJobCheckBox, this.deleteJobConditionDropdown);
|
||||||
this.model.startStepId = this.startStepDropdown.enabled ? +this.getDropdownValue(this.startStepDropdown) : 1;
|
this.model.startStepId = this.startStepDropdown.enabled ? +this.getDropdownValue(this.startStepDropdown) : 1;
|
||||||
if (!this.model.jobSteps) {
|
if (!this.model.jobSteps) {
|
||||||
this.model.jobSteps = [];
|
this.model.jobSteps = [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
private readonly GeneralTabText: string = localize('jobStepDialog.general', 'General');
|
private readonly GeneralTabText: string = localize('jobStepDialog.general', 'General');
|
||||||
private readonly AdvancedTabText: string = localize('jobStepDialog.advanced', 'Advanced');
|
private readonly AdvancedTabText: string = localize('jobStepDialog.advanced', 'Advanced');
|
||||||
private readonly OpenCommandText: string = localize('jobStepDialog.open', 'Open...');
|
private readonly OpenCommandText: string = localize('jobStepDialog.open', 'Open...');
|
||||||
private readonly ParseCommandText: string = localize('jobStepDialog.parse','Parse');
|
private readonly ParseCommandText: string = localize('jobStepDialog.parse', 'Parse');
|
||||||
private readonly SuccessfulParseText: string = localize('jobStepDialog.successParse', 'The command was successfully parsed.');
|
private readonly SuccessfulParseText: string = localize('jobStepDialog.successParse', 'The command was successfully parsed.');
|
||||||
private readonly FailureParseText: string = localize('jobStepDialog.failParse', 'The command failed.');
|
private readonly FailureParseText: string = localize('jobStepDialog.failParse', 'The command failed.');
|
||||||
private readonly BlankStepNameErrorText: string = localize('jobStepDialog.blankStepName', 'The step name cannot be left blank');
|
private readonly BlankStepNameErrorText: string = localize('jobStepDialog.blankStepName', 'The step name cannot be left blank');
|
||||||
@@ -124,15 +124,15 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
viaJobDialog: boolean = false
|
viaJobDialog: boolean = false
|
||||||
) {
|
) {
|
||||||
super(ownerUri,
|
super(ownerUri,
|
||||||
jobStepInfo ? JobStepData.convertToJobStepData(jobStepInfo, jobModel) : new JobStepData(ownerUri, jobModel, viaJobDialog),
|
jobStepInfo ? JobStepData.convertToJobStepData(jobStepInfo, jobModel) : new JobStepData(ownerUri, jobModel, viaJobDialog),
|
||||||
jobStepInfo ? JobStepDialog.EditDialogTitle : JobStepDialog.NewDialogTitle);
|
jobStepInfo ? JobStepDialog.EditDialogTitle : JobStepDialog.NewDialogTitle);
|
||||||
this.stepId = jobStepInfo ?
|
this.stepId = jobStepInfo ?
|
||||||
jobStepInfo.id : jobModel.jobSteps ?
|
jobStepInfo.id : jobModel.jobSteps ?
|
||||||
jobModel.jobSteps.length + 1 : 1;
|
jobModel.jobSteps.length + 1 : 1;
|
||||||
this.isEdit = jobStepInfo ? true : false;
|
this.isEdit = jobStepInfo ? true : false;
|
||||||
this.model.dialogMode = this.isEdit ? AgentDialogMode.EDIT : AgentDialogMode.CREATE;
|
this.model.dialogMode = this.isEdit ? AgentDialogMode.EDIT : AgentDialogMode.CREATE;
|
||||||
this.jobModel = jobModel;
|
this.jobModel = jobModel;
|
||||||
this.jobName = this.jobName ? this.jobName : this.jobModel.name;
|
this.jobName = this.jobName ? this.jobName : this.jobModel.name;
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.dialogName = this.isEdit ? this.EditStepDialog : this.NewStepDialog;
|
this.dialogName = this.isEdit ? this.EditStepDialog : this.NewStepDialog;
|
||||||
}
|
}
|
||||||
@@ -164,7 +164,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
if (this.commandTextBox.value) {
|
if (this.commandTextBox.value) {
|
||||||
queryProvider.parseSyntax(this.ownerUri, this.commandTextBox.value).then(result => {
|
queryProvider.parseSyntax(this.ownerUri, this.commandTextBox.value).then(result => {
|
||||||
if (result && result.parseable) {
|
if (result && result.parseable) {
|
||||||
this.dialog.message = { text: this.SuccessfulParseText, level: 2};
|
this.dialog.message = { text: this.SuccessfulParseText, level: 2 };
|
||||||
} else if (result && !result.parseable) {
|
} else if (result && !result.parseable) {
|
||||||
this.dialog.message = { text: this.FailureParseText };
|
this.dialog.message = { text: this.FailureParseText };
|
||||||
}
|
}
|
||||||
@@ -246,7 +246,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
}).component();
|
}).component();
|
||||||
this.typeDropdown.onValueChanged((type) => {
|
this.typeDropdown.onValueChanged((type) => {
|
||||||
switch (type.selected) {
|
switch (type.selected) {
|
||||||
case(this.TSQLScript):
|
case (this.TSQLScript):
|
||||||
this.runAsDropdown.value = '';
|
this.runAsDropdown.value = '';
|
||||||
this.runAsDropdown.values = [''];
|
this.runAsDropdown.values = [''];
|
||||||
this.runAsDropdown.enabled = false;
|
this.runAsDropdown.enabled = false;
|
||||||
@@ -256,7 +256,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
this.processExitCodeBox.value = '';
|
this.processExitCodeBox.value = '';
|
||||||
this.processExitCodeBox.enabled = false;
|
this.processExitCodeBox.enabled = false;
|
||||||
break;
|
break;
|
||||||
case(this.Powershell):
|
case (this.Powershell):
|
||||||
this.runAsDropdown.value = this.AgentServiceAccount;
|
this.runAsDropdown.value = this.AgentServiceAccount;
|
||||||
this.runAsDropdown.values = [this.runAsDropdown.value];
|
this.runAsDropdown.values = [this.runAsDropdown.value];
|
||||||
this.runAsDropdown.enabled = true;
|
this.runAsDropdown.enabled = true;
|
||||||
@@ -266,7 +266,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
this.processExitCodeBox.value = '';
|
this.processExitCodeBox.value = '';
|
||||||
this.processExitCodeBox.enabled = false;
|
this.processExitCodeBox.enabled = false;
|
||||||
break;
|
break;
|
||||||
case(this.CmdExec):
|
case (this.CmdExec):
|
||||||
this.databaseDropdown.enabled = false;
|
this.databaseDropdown.enabled = false;
|
||||||
this.databaseDropdown.values = [''];
|
this.databaseDropdown.values = [''];
|
||||||
this.databaseDropdown.value = '';
|
this.databaseDropdown.value = '';
|
||||||
@@ -397,13 +397,13 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
|
|
||||||
let retryAttemptsContainer = view.modelBuilder.formContainer()
|
let retryAttemptsContainer = view.modelBuilder.formContainer()
|
||||||
.withFormItems(
|
.withFormItems(
|
||||||
[{
|
[{
|
||||||
component: this.retryAttemptsBox,
|
component: this.retryAttemptsBox,
|
||||||
title: this.RetryAttemptsLabel
|
title: this.RetryAttemptsLabel
|
||||||
}], {
|
}], {
|
||||||
horizontal: false,
|
horizontal: false,
|
||||||
componentWidth: '100%'
|
componentWidth: '100%'
|
||||||
})
|
})
|
||||||
.component();
|
.component();
|
||||||
|
|
||||||
let retryIntervalContainer = view.modelBuilder.formContainer()
|
let retryIntervalContainer = view.modelBuilder.formContainer()
|
||||||
@@ -411,7 +411,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
[{
|
[{
|
||||||
component: this.retryIntervalBox,
|
component: this.retryIntervalBox,
|
||||||
title: this.RetryIntervalLabel
|
title: this.RetryIntervalLabel
|
||||||
}], {
|
}], {
|
||||||
horizontal: false
|
horizontal: false
|
||||||
})
|
})
|
||||||
.component();
|
.component();
|
||||||
@@ -427,13 +427,13 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
let fileBrowserTitle = this.FileBrowserDialogTitle + `${this.server}`;
|
let fileBrowserTitle = this.FileBrowserDialogTitle + `${this.server}`;
|
||||||
this.fileBrowserDialog = azdata.window.createModelViewDialog(fileBrowserTitle);
|
this.fileBrowserDialog = azdata.window.createModelViewDialog(fileBrowserTitle);
|
||||||
let fileBrowserTab = azdata.window.createTab('File Browser');
|
let fileBrowserTab = azdata.window.createTab('File Browser');
|
||||||
this.fileBrowserDialog.content = [fileBrowserTab];
|
this.fileBrowserDialog.content = [fileBrowserTab];
|
||||||
fileBrowserTab.registerContent(async (view) => {
|
fileBrowserTab.registerContent(async (view) => {
|
||||||
this.fileBrowserTree = view.modelBuilder.fileBrowserTree()
|
this.fileBrowserTree = view.modelBuilder.fileBrowserTree()
|
||||||
.withProperties({ ownerUri: this.ownerUri, width: 420, height: 700 })
|
.withProperties({ ownerUri: this.ownerUri, width: 420, height: 700 })
|
||||||
.component();
|
.component();
|
||||||
this.selectedPathTextBox = view.modelBuilder.inputBox()
|
this.selectedPathTextBox = view.modelBuilder.inputBox()
|
||||||
.withProperties({ inputType: 'text'})
|
.withProperties({ inputType: 'text' })
|
||||||
.component();
|
.component();
|
||||||
this.fileBrowserTree.onDidChange((args) => {
|
this.fileBrowserTree.onDidChange((args) => {
|
||||||
this.selectedPathTextBox.value = args.fullPath;
|
this.selectedPathTextBox.value = args.fullPath;
|
||||||
@@ -462,7 +462,7 @@ export class JobStepDialog extends AgentDialog<JobStepData> {
|
|||||||
component: this.fileBrowserNameBox,
|
component: this.fileBrowserNameBox,
|
||||||
title: this.FileNameLabelString
|
title: this.FileNameLabelString
|
||||||
}
|
}
|
||||||
]).component();
|
]).component();
|
||||||
view.initializeModel(fileBrowserContainer);
|
view.initializeModel(fileBrowserContainer);
|
||||||
});
|
});
|
||||||
this.fileBrowserDialog.okButton.onClick(() => {
|
this.fileBrowserDialog.okButton.onClick(() => {
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
|||||||
|
|
||||||
|
|
||||||
this.pagerTuesdayCheckBox.onChanged(() => {
|
this.pagerTuesdayCheckBox.onChanged(() => {
|
||||||
if (this.pagerTuesdayCheckBox .checked) {
|
if (this.pagerTuesdayCheckBox.checked) {
|
||||||
this.weekdayPagerStartTimeInput.enabled = true;
|
this.weekdayPagerStartTimeInput.enabled = true;
|
||||||
this.weekdayPagerEndTimeInput.enabled = true;
|
this.weekdayPagerEndTimeInput.enabled = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -153,7 +153,7 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
|||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.pagerWednesdayCheckBox.onChanged(() => {
|
this.pagerWednesdayCheckBox.onChanged(() => {
|
||||||
if (this.pagerWednesdayCheckBox .checked) {
|
if (this.pagerWednesdayCheckBox.checked) {
|
||||||
this.weekdayPagerStartTimeInput.enabled = true;
|
this.weekdayPagerStartTimeInput.enabled = true;
|
||||||
this.weekdayPagerEndTimeInput.enabled = true;
|
this.weekdayPagerEndTimeInput.enabled = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -171,7 +171,7 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
|||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.pagerThursdayCheckBox.onChanged(() => {
|
this.pagerThursdayCheckBox.onChanged(() => {
|
||||||
if (this.pagerThursdayCheckBox .checked) {
|
if (this.pagerThursdayCheckBox.checked) {
|
||||||
this.weekdayPagerStartTimeInput.enabled = true;
|
this.weekdayPagerStartTimeInput.enabled = true;
|
||||||
this.weekdayPagerEndTimeInput.enabled = true;
|
this.weekdayPagerEndTimeInput.enabled = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -362,7 +362,7 @@ export class OperatorDialog extends AgentDialog<OperatorData> {
|
|||||||
}, {
|
}, {
|
||||||
component: pagerSundayCheckboxContainer,
|
component: pagerSundayCheckboxContainer,
|
||||||
title: ''
|
title: ''
|
||||||
}] ,
|
}],
|
||||||
title: OperatorDialog.PagerDutyScheduleLabel
|
title: OperatorDialog.PagerDutyScheduleLabel
|
||||||
}]).withLayout({ width: '100%' }).component();
|
}]).withLayout({ width: '100%' }).component();
|
||||||
await view.initializeModel(formModel);
|
await view.initializeModel(formModel);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* 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.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
@@ -20,8 +20,8 @@ export class PickScheduleDialog {
|
|||||||
private readonly CancelButtonText: string = localize('pickSchedule.cancel', 'Cancel');
|
private readonly CancelButtonText: string = localize('pickSchedule.cancel', 'Cancel');
|
||||||
private readonly SchedulesLabelText: string = localize('pickSchedule.availableSchedules', 'Available Schedules:');
|
private readonly SchedulesLabelText: string = localize('pickSchedule.availableSchedules', 'Available Schedules:');
|
||||||
public static readonly ScheduleNameLabelText: string = localize('pickSchedule.scheduleName', 'Name');
|
public static readonly ScheduleNameLabelText: string = localize('pickSchedule.scheduleName', 'Name');
|
||||||
public static readonly SchedulesIDText: string = localize('pickSchedule.scheduleID','ID');
|
public static readonly SchedulesIDText: string = localize('pickSchedule.scheduleID', 'ID');
|
||||||
public static readonly ScheduleDescription: string = localize('pickSchedule.description','Description');
|
public static readonly ScheduleDescription: string = localize('pickSchedule.description', 'Description');
|
||||||
|
|
||||||
|
|
||||||
// UI Components
|
// UI Components
|
||||||
@@ -74,7 +74,7 @@ export class PickScheduleDialog {
|
|||||||
let data: any[][] = [];
|
let data: any[][] = [];
|
||||||
for (let i = 0; i < this.model.schedules.length; ++i) {
|
for (let i = 0; i < this.model.schedules.length; ++i) {
|
||||||
let schedule = this.model.schedules[i];
|
let schedule = this.model.schedules[i];
|
||||||
data[i] = [ schedule.id, schedule.name, schedule.description ];
|
data[i] = [schedule.id, schedule.name, schedule.description];
|
||||||
}
|
}
|
||||||
this.schedulesTable.data = data;
|
this.schedulesTable.data = data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export class ProxyDialog extends AgentDialog<ProxyData> {
|
|||||||
this.generalTab.registerContent(async view => {
|
this.generalTab.registerContent(async view => {
|
||||||
|
|
||||||
this.proxyNameTextBox = view.modelBuilder.inputBox()
|
this.proxyNameTextBox = view.modelBuilder.inputBox()
|
||||||
.withProperties({width: 420})
|
.withProperties({ width: 420 })
|
||||||
.component();
|
.component();
|
||||||
|
|
||||||
this.credentialNameDropDown = view.modelBuilder.dropDown()
|
this.credentialNameDropDown = view.modelBuilder.dropDown()
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export class ScheduleDialog {
|
|||||||
let data: any[][] = [];
|
let data: any[][] = [];
|
||||||
for (let i = 0; i < this.model.schedules.length; ++i) {
|
for (let i = 0; i < this.model.schedules.length; ++i) {
|
||||||
let schedule = this.model.schedules[i];
|
let schedule = this.model.schedules[i];
|
||||||
data[i] = [ schedule.name ];
|
data[i] = [schedule.name];
|
||||||
}
|
}
|
||||||
this.schedulesTable.data = data;
|
this.schedulesTable.data = data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,57 +22,57 @@ const localize = nls.loadMessageBundle();
|
|||||||
* The main controller class that initializes the extension
|
* The main controller class that initializes the extension
|
||||||
*/
|
*/
|
||||||
export class MainController {
|
export class MainController {
|
||||||
protected _context: vscode.ExtensionContext;
|
protected _context: vscode.ExtensionContext;
|
||||||
|
|
||||||
// PUBLIC METHODS //////////////////////////////////////////////////////
|
// PUBLIC METHODS //////////////////////////////////////////////////////
|
||||||
public constructor(context: vscode.ExtensionContext) {
|
public constructor(context: vscode.ExtensionContext) {
|
||||||
this._context = context;
|
this._context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static showNotYetImplemented(): void {
|
public static showNotYetImplemented(): void {
|
||||||
vscode.window.showInformationMessage(
|
vscode.window.showInformationMessage(
|
||||||
localize('mainController.notImplemented', "This feature is under development. Check-out the latest insiders build if you'd like to try out the most recent changes!"));
|
localize('mainController.notImplemented', "This feature is under development. Check-out the latest insiders build if you'd like to try out the most recent changes!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activates the extension
|
* Activates the extension
|
||||||
*/
|
*/
|
||||||
public activate(): void {
|
public activate(): void {
|
||||||
vscode.commands.registerCommand('agent.openJobDialog', async (ownerUri: string, jobInfo: azdata.AgentJobInfo) => {
|
vscode.commands.registerCommand('agent.openJobDialog', async (ownerUri: string, jobInfo: azdata.AgentJobInfo) => {
|
||||||
let dialog = new JobDialog(ownerUri, jobInfo);
|
let dialog = new JobDialog(ownerUri, jobInfo);
|
||||||
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
||||||
});
|
});
|
||||||
vscode.commands.registerCommand('agent.openNewStepDialog', (ownerUri: string, server: string, jobInfo: azdata.AgentJobInfo, jobStepInfo: azdata.AgentJobStepInfo) => {
|
vscode.commands.registerCommand('agent.openNewStepDialog', (ownerUri: string, server: string, jobInfo: azdata.AgentJobInfo, jobStepInfo: azdata.AgentJobStepInfo) => {
|
||||||
AgentUtils.getAgentService().then(async(agentService) => {
|
AgentUtils.getAgentService().then(async (agentService) => {
|
||||||
let jobData: JobData = new JobData(ownerUri, jobInfo, agentService);
|
let jobData: JobData = new JobData(ownerUri, jobInfo, agentService);
|
||||||
let dialog = new JobStepDialog(ownerUri, server, jobData, jobStepInfo, false);
|
let dialog = new JobStepDialog(ownerUri, server, jobData, jobStepInfo, false);
|
||||||
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
vscode.commands.registerCommand('agent.openPickScheduleDialog', async (ownerUri: string, jobName: string) => {
|
vscode.commands.registerCommand('agent.openPickScheduleDialog', async (ownerUri: string, jobName: string) => {
|
||||||
let dialog = new PickScheduleDialog(ownerUri, jobName);
|
let dialog = new PickScheduleDialog(ownerUri, jobName);
|
||||||
await dialog.showDialog();
|
await dialog.showDialog();
|
||||||
});
|
});
|
||||||
vscode.commands.registerCommand('agent.openAlertDialog', (ownerUri: string, jobInfo: azdata.AgentJobInfo, alertInfo: azdata.AgentAlertInfo) => {
|
vscode.commands.registerCommand('agent.openAlertDialog', (ownerUri: string, jobInfo: azdata.AgentJobInfo, alertInfo: azdata.AgentAlertInfo) => {
|
||||||
AgentUtils.getAgentService().then(async (agentService) => {
|
AgentUtils.getAgentService().then(async (agentService) => {
|
||||||
let jobData: JobData = new JobData(ownerUri, jobInfo, agentService);
|
let jobData: JobData = new JobData(ownerUri, jobInfo, agentService);
|
||||||
let dialog = new AlertDialog(ownerUri, jobData, alertInfo, false);
|
let dialog = new AlertDialog(ownerUri, jobData, alertInfo, false);
|
||||||
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
vscode.commands.registerCommand('agent.openOperatorDialog', async (ownerUri: string, operatorInfo: azdata.AgentOperatorInfo) => {
|
vscode.commands.registerCommand('agent.openOperatorDialog', async (ownerUri: string, operatorInfo: azdata.AgentOperatorInfo) => {
|
||||||
let dialog = new OperatorDialog(ownerUri, operatorInfo);
|
let dialog = new OperatorDialog(ownerUri, operatorInfo);
|
||||||
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
||||||
});
|
});
|
||||||
vscode.commands.registerCommand('agent.openProxyDialog', async (ownerUri: string, proxyInfo: azdata.AgentProxyInfo, credentials: azdata.CredentialInfo[]) => {
|
vscode.commands.registerCommand('agent.openProxyDialog', async (ownerUri: string, proxyInfo: azdata.AgentProxyInfo, credentials: azdata.CredentialInfo[]) => {
|
||||||
let dialog = new ProxyDialog(ownerUri, proxyInfo, credentials);
|
let dialog = new ProxyDialog(ownerUri, proxyInfo, credentials);
|
||||||
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deactivates the extension
|
* Deactivates the extension
|
||||||
*/
|
*/
|
||||||
public deactivate(): void {
|
public deactivate(): void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
import * as assert from 'assert';
|
|
||||||
import 'mocha';
|
|
||||||
import * as vscode from 'vscode';
|
|
||||||
import * as azdata from 'azdata';
|
|
||||||
import { JobData } from '../data/jobData';
|
|
||||||
import { TestAgentService } from './testAgentService';
|
|
||||||
|
|
||||||
const testOwnerUri = 'agent://testuri';
|
|
||||||
|
|
||||||
suite('Agent extension', () => {
|
|
||||||
test('Create Job Data', async () => {
|
|
||||||
let testAgentService = new TestAgentService();
|
|
||||||
let data = new JobData(testOwnerUri, undefined, testAgentService);
|
|
||||||
data.save();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
82
extensions/agent/src/test/agentServiceTests/agent.test.ts
Normal file
82
extensions/agent/src/test/agentServiceTests/agent.test.ts
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import * as should from 'should';
|
||||||
|
import * as TypeMoq from 'typemoq';
|
||||||
|
import 'mocha';
|
||||||
|
import * as azdata from 'azdata';
|
||||||
|
import { JobData } from '../../data/jobData';
|
||||||
|
|
||||||
|
const testOwnerUri = 'agent://testuri';
|
||||||
|
let mockJobData: TypeMoq.IMock<JobData>;
|
||||||
|
let mockAgentService: TypeMoq.IMock<azdata.AgentServicesProvider>;
|
||||||
|
|
||||||
|
describe('Agent extension create job objects', function (): void {
|
||||||
|
beforeEach(() => {
|
||||||
|
mockAgentService = TypeMoq.Mock.ofType<azdata.AgentServicesProvider>();
|
||||||
|
mockAgentService.setup(s => s.createJob(TypeMoq.It.isAnyString(), TypeMoq.It.isAny())).returns(() => TypeMoq.It.isAny());
|
||||||
|
mockAgentService.setup(s => s.createJob(undefined, TypeMoq.It.isAny())).returns(() => undefined);
|
||||||
|
mockAgentService.setup(s => s.createAlert(TypeMoq.It.isAnyString(), TypeMoq.It.isAny())).returns(() => TypeMoq.It.isAny());
|
||||||
|
mockAgentService.setup(s => s.createAlert(undefined, TypeMoq.It.isAny())).returns(() => undefined);
|
||||||
|
mockAgentService.setup(s => s.createJobSchedule(TypeMoq.It.isAnyString(), TypeMoq.It.isAny())).returns(() => TypeMoq.It.isAny());
|
||||||
|
mockAgentService.setup(s => s.createJobSchedule(undefined, TypeMoq.It.isAny())).returns(() => undefined);
|
||||||
|
mockAgentService.setup(s => s.createJobStep(TypeMoq.It.isAnyString(), TypeMoq.It.isAny())).returns(() => TypeMoq.It.isAny());
|
||||||
|
mockAgentService.setup(s => s.createJobStep(undefined, TypeMoq.It.isAny())).returns(() => undefined);
|
||||||
|
mockAgentService.setup(s => s.createOperator(TypeMoq.It.isAnyString(), TypeMoq.It.isAny())).returns(() => TypeMoq.It.isAny());
|
||||||
|
mockAgentService.setup(s => s.createOperator(undefined, TypeMoq.It.isAny())).returns(() => undefined);
|
||||||
|
mockAgentService.setup(s => s.createProxy(TypeMoq.It.isAnyString(), TypeMoq.It.isAny())).returns(() => TypeMoq.It.isAny());
|
||||||
|
mockAgentService.setup(s => s.createProxy(undefined, TypeMoq.It.isAny())).returns(() => undefined);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Create Job Data', async () => {
|
||||||
|
// should fail when ownerUri is null
|
||||||
|
let createJobResult = mockAgentService.object.createJob(null, TypeMoq.It.isAny());
|
||||||
|
should.strictEqual(createJobResult, undefined);
|
||||||
|
createJobResult = mockAgentService.object.createJob(testOwnerUri, TypeMoq.It.isAny());
|
||||||
|
should.notEqual(createJobResult, undefined);
|
||||||
|
mockJobData = TypeMoq.Mock.ofType<JobData>(JobData, TypeMoq.MockBehavior.Loose, false, [TypeMoq.It.isAnyString(), undefined, mockAgentService]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Create Alert Data', async () => {
|
||||||
|
// should fail when ownerUri is null
|
||||||
|
let createAlertResult = mockAgentService.object.createAlert(null, TypeMoq.It.isAny());
|
||||||
|
should.strictEqual(createAlertResult, undefined);
|
||||||
|
createAlertResult = mockAgentService.object.createAlert(testOwnerUri, TypeMoq.It.isAny());
|
||||||
|
should.notEqual(createAlertResult, undefined);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Create Job Schedule Data', async () => {
|
||||||
|
// should fail when ownerUri is null
|
||||||
|
let createJobScheduleResult = mockAgentService.object.createJobSchedule(null, TypeMoq.It.isAny());
|
||||||
|
should.strictEqual(createJobScheduleResult, undefined);
|
||||||
|
createJobScheduleResult = mockAgentService.object.createJobSchedule(testOwnerUri, TypeMoq.It.isAny());
|
||||||
|
should.notEqual(createJobScheduleResult, undefined);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Create Job Step Data', async () => {
|
||||||
|
// should fail when ownerUri is null
|
||||||
|
let createJobStepResult = mockAgentService.object.createJobStep(null, TypeMoq.It.isAny());
|
||||||
|
should.strictEqual(createJobStepResult, undefined);
|
||||||
|
createJobStepResult = mockAgentService.object.createJobStep(testOwnerUri, TypeMoq.It.isAny());
|
||||||
|
should.notEqual(createJobStepResult, undefined);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Create Operator Data', async () => {
|
||||||
|
// should fail when ownerUri is null
|
||||||
|
let createOperatorResult = mockAgentService.object.createOperator(null, TypeMoq.It.isAny());
|
||||||
|
should.strictEqual(createOperatorResult, undefined);
|
||||||
|
createOperatorResult = mockAgentService.object.createOperator(testOwnerUri, TypeMoq.It.isAny());
|
||||||
|
should.notEqual(createOperatorResult, undefined);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Create Proxy Data', async () => {
|
||||||
|
// should fail when ownerUri is null
|
||||||
|
let createProxyResult = mockAgentService.object.createProxy(null, TypeMoq.It.isAny());
|
||||||
|
should.strictEqual(createProxyResult, undefined);
|
||||||
|
createProxyResult = mockAgentService.object.createProxy(testOwnerUri, TypeMoq.It.isAny());
|
||||||
|
should.notEqual(createProxyResult, undefined);
|
||||||
|
});
|
||||||
|
});
|
||||||
30
extensions/agent/src/test/index.ts
Normal file
30
extensions/agent/src/test/index.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const testRunner = require('vscode/lib/testrunner');
|
||||||
|
|
||||||
|
const suite = 'Agent Tests';
|
||||||
|
|
||||||
|
const options: any = {
|
||||||
|
ui: 'bdd',
|
||||||
|
useColors: true,
|
||||||
|
timeout: 600000
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
|
options.reporter = 'mocha-multi-reporters';
|
||||||
|
options.reporterOptions = {
|
||||||
|
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||||
|
mochaJunitReporterReporterOptions: {
|
||||||
|
testsuitesTitle: `${suite} ${process.platform}`,
|
||||||
|
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
testRunner.configure(options);
|
||||||
|
|
||||||
|
export = testRunner;
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
|
|
||||||
import * as azdata from 'azdata';
|
|
||||||
|
|
||||||
export class TestAgentService implements azdata.AgentServicesProvider {
|
|
||||||
handle?: number;
|
|
||||||
readonly providerId: string = 'Test Provider';
|
|
||||||
|
|
||||||
// Job management methods
|
|
||||||
getJobs(ownerUri: string): Thenable<azdata.AgentJobsResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
getJobHistory(ownerUri: string, jobId: string, jobName: string): Thenable<azdata.AgentJobHistoryResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
jobAction(ownerUri: string, jobName: string, action: string): Thenable<azdata.ResultStatus> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
createJob(ownerUri: string, jobInfo: azdata.AgentJobInfo): Thenable<azdata.CreateAgentJobResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
updateJob(ownerUri: string, originalJobName: string, jobInfo: azdata.AgentJobInfo): Thenable<azdata.UpdateAgentJobResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
deleteJob(ownerUri: string, jobInfo: azdata.AgentJobInfo): Thenable<azdata.ResultStatus> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
getJobDefaults(ownerUri: string): Thenable<azdata.AgentJobDefaultsResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Job Step management methods
|
|
||||||
createJobStep(ownerUri: string, jobInfo: azdata.AgentJobStepInfo): Thenable<azdata.CreateAgentJobStepResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
updateJobStep(ownerUri: string, originalJobStepName: string, jobInfo: azdata.AgentJobStepInfo): Thenable<azdata.UpdateAgentJobStepResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
deleteJobStep(ownerUri: string, jobInfo: azdata.AgentJobStepInfo): Thenable<azdata.ResultStatus> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Alert management methods
|
|
||||||
getAlerts(ownerUri: string): Thenable<azdata.AgentAlertsResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
createAlert(ownerUri: string, alertInfo: azdata.AgentAlertInfo): Thenable<azdata.CreateAgentAlertResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
updateAlert(ownerUri: string, originalAlertName: string, alertInfo: azdata.AgentAlertInfo): Thenable<azdata.UpdateAgentAlertResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
deleteAlert(ownerUri: string, alertInfo: azdata.AgentAlertInfo): Thenable<azdata.ResultStatus> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Operator management methods
|
|
||||||
getOperators(ownerUri: string): Thenable<azdata.AgentOperatorsResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
createOperator(ownerUri: string, operatorInfo: azdata.AgentOperatorInfo): Thenable<azdata.CreateAgentOperatorResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
updateOperator(ownerUri: string, originalOperatorName: string, operatorInfo: azdata.AgentOperatorInfo): Thenable<azdata.UpdateAgentOperatorResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
deleteOperator(ownerUri: string, operatorInfo: azdata.AgentOperatorInfo): Thenable<azdata.ResultStatus> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Proxy management methods
|
|
||||||
getProxies(ownerUri: string): Thenable<azdata.AgentProxiesResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
createProxy(ownerUri: string, proxyInfo: azdata.AgentProxyInfo): Thenable<azdata.CreateAgentOperatorResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
updateProxy(ownerUri: string, originalProxyName: string, proxyInfo: azdata.AgentProxyInfo): Thenable<azdata.UpdateAgentOperatorResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
deleteProxy(ownerUri: string, proxyInfo: azdata.AgentProxyInfo): Thenable<azdata.ResultStatus> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Agent Credential method
|
|
||||||
getCredentials(ownerUri: string): Thenable<azdata.GetCredentialsResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Job Schedule management methods
|
|
||||||
getJobSchedules(ownerUri: string): Thenable<azdata.AgentJobSchedulesResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
createJobSchedule(ownerUri: string, scheduleInfo: azdata.AgentJobScheduleInfo): Thenable<azdata.CreateAgentJobScheduleResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
updateJobSchedule(ownerUri: string, originalScheduleName: string, scheduleInfo: azdata.AgentJobScheduleInfo): Thenable<azdata.UpdateAgentJobScheduleResult> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
deleteJobSchedule(ownerUri: string, scheduleInfo: azdata.AgentJobScheduleInfo): Thenable<azdata.ResultStatus> {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
registerOnUpdated(handler: () => any): void {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +1,18 @@
|
|||||||
{
|
{
|
||||||
"compileOnSave": true,
|
"compileOnSave": true,
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"outDir": "./out",
|
"outDir": "./out",
|
||||||
"lib": [
|
"lib": [
|
||||||
"es6", "es2015.promise"
|
"es6", "es2015.promise"
|
||||||
],
|
],
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node"
|
||||||
"declaration": true
|
},
|
||||||
},
|
"exclude": [
|
||||||
"exclude": [
|
"node_modules"
|
||||||
"node_modules"
|
]
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
|||||||
|
src/**
|
||||||
|
out/**
|
||||||
|
tsconfig.json
|
||||||
|
extension.webpack.config.js
|
||||||
|
yarn.lock
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user