mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-18 11:01:36 -05:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9c8eb8564 | ||
|
|
c2d6a2f4ff | ||
|
|
b0d3c95bec | ||
|
|
734de6251d | ||
|
|
8fc95f45d4 | ||
|
|
34aa77eea3 | ||
|
|
b292e4233e | ||
|
|
fc1e3a24ef | ||
|
|
0148071c0d | ||
|
|
560e8974dd | ||
|
|
23fbd4c1ed | ||
|
|
f0186bc5c0 | ||
|
|
295009ec3d | ||
|
|
ee835356be | ||
|
|
62822874ad | ||
|
|
932865ceee | ||
|
|
b02e97e851 | ||
|
|
3faf51b573 | ||
|
|
1928d076b1 | ||
|
|
c2d294cb79 | ||
|
|
5e7356d652 | ||
|
|
8335854015 | ||
|
|
52d33b493a | ||
|
|
2e53b4c241 | ||
|
|
efade32c62 | ||
|
|
2fd6990e73 | ||
|
|
d204fa9940 | ||
|
|
1f08aded06 | ||
|
|
fc2138228d | ||
|
|
a830820915 |
@@ -212,7 +212,6 @@
|
||||
"restrictions": [
|
||||
"vs/nls",
|
||||
"azdata",
|
||||
"azurecore",
|
||||
"**/{vs,sql}/base/common/**",
|
||||
"**/{vs,sql}/base/parts/*/common/**",
|
||||
"**/{vs,sql}/platform/*/common/**"
|
||||
@@ -473,7 +472,6 @@
|
||||
"restrictions": [
|
||||
"vscode",
|
||||
"azdata",
|
||||
"azurecore",
|
||||
"vs/nls",
|
||||
"**/{vs,sql}/base/common/**",
|
||||
"**/{vs,sql}/platform/*/common/**",
|
||||
@@ -579,7 +577,6 @@
|
||||
"vs/nls",
|
||||
"vs/css!./**/*",
|
||||
"azdata",
|
||||
"azurecore",
|
||||
"vscode",
|
||||
"**/{vs,sql}/base/**/{common,browser,worker}/**",
|
||||
"**/{vs,sql}/platform/**/{common,browser}/**",
|
||||
|
||||
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@@ -11,7 +11,6 @@
|
||||
/extensions/query-history/ @Charles-Gagnon
|
||||
/extensions/resource-deployment/ @Charles-Gagnon
|
||||
/extensions/schema-compare/ @kisantia
|
||||
/extensions/sql-bindings/ @vasubhog @Charles-Gagnon @lucyzhang929 @chlafreniere @MaddyDev
|
||||
/extensions/sql-database-projects/ @Benjin @kisantia
|
||||
/extensions/mssql/config.json @Charles-Gagnon @alanrenmsft @kburtram
|
||||
|
||||
|
||||
16
.github/label-actions.yml
vendored
16
.github/label-actions.yml
vendored
@@ -27,22 +27,6 @@ There are two types of logs to collect:
|
||||
|
||||
- This will open the log folder locally. Please zip up this folder and attach it to the issue."
|
||||
|
||||
# actions for Needs Logs - Azure label
|
||||
Needs Logs - Azure:
|
||||
comment: "We need more info to debug your Azure Active Directory issue. If you could attach your logs to the issue (ensure no private data is in them), it would help us fix the issue much faster.
|
||||
|
||||
- In the settings menu, find the setting titled `Azure: Logging Level` and select the `Verbose` option
|
||||
|
||||
- Run the process that produces your error
|
||||
|
||||
- Open command palette (Click **View** -> **Command Palette**)
|
||||
|
||||
- Run the command: **`Developer: Open Logs Folder`**
|
||||
|
||||
- Follow this path to find the Azure Accounts log file: `[default log folder]/exthost1/output_logging_[earliest timestamp]/#-Azure Acounts.log`
|
||||
|
||||
- Please attach the Azure-Accounts.log file to the issue."
|
||||
|
||||
# actions for Out of Scope label
|
||||
Out of Scope:
|
||||
comment: "Thank you for opening this suggestion! This enhancement is not planned in our
|
||||
|
||||
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -13,7 +13,7 @@ on:
|
||||
jobs:
|
||||
windows:
|
||||
name: Windows
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
CHILD_CONCURRENCY: "1"
|
||||
@@ -131,15 +131,12 @@ jobs:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
|
||||
# Don't inline source maps so that we generate code coverage for ts files
|
||||
- name: Compile and Download
|
||||
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
|
||||
env:
|
||||
SQL_NO_INLINE_SOURCEMAP: 1
|
||||
|
||||
- name: Run Unit Tests (Electron)
|
||||
id: electron-unit-tests
|
||||
run: DISPLAY=:10 ./scripts/test.sh --runGlob "**/sql/**/*.test.js" --coverage
|
||||
run: DISPLAY=:10 ./scripts/test.sh --runGlob "**/sql/**/*.test.js" # {{SQL CARBON EDIT}} Run only our tests with coverage. Disable for now since it's currently broken --coverage
|
||||
|
||||
- name: Run Extension Unit Tests (Electron)
|
||||
id: electron-extension-unit-tests
|
||||
|
||||
2
.yarnrc
2
.yarnrc
@@ -1,3 +1,3 @@
|
||||
disturl "https://electronjs.org/headers"
|
||||
target "13.6.6"
|
||||
target "13.5.0"
|
||||
runtime "electron"
|
||||
|
||||
68
CHANGELOG.md
68
CHANGELOG.md
@@ -1,53 +1,5 @@
|
||||
# Change Log
|
||||
|
||||
## Version 1.36.0
|
||||
* Release date: April 20, 2022
|
||||
* Release status: General Availability
|
||||
## What's new in this version
|
||||
- General Availability of the Azure SQL Migration Extension for ADS
|
||||
- Support for .NET Interactive Notebooks Extension
|
||||
- New Table Designer Features including support for System Versioned, Graph and Memory Optomized Tables
|
||||
- Query Plan Viewer Updates includign warning and parallelism icons, the option to disable tooltips and support for opening .sqlplan files
|
||||
- Improvements in SQL Projects and Schema Compare
|
||||
|
||||
| Platform |
|
||||
| --------------------------------------- |
|
||||
| [Windows User Installer][win-user] |
|
||||
| [Windows System Installer][win-system] |
|
||||
| [Windows ZIP][win-zip] |
|
||||
| [macOS ZIP][osx-zip] |
|
||||
| [Linux TAR.GZ][linux-zip] |
|
||||
| [Linux RPM][linux-rpm] |
|
||||
| [Linux DEB][linux-deb] |
|
||||
|
||||
[win-user]: https://go.microsoft.com/fwlink/?linkid=2193235
|
||||
[win-system]: https://go.microsoft.com/fwlink/?linkid=2193326
|
||||
[win-zip]: https://go.microsoft.com/fwlink/?linkid=2193236
|
||||
[osx-zip]: https://go.microsoft.com/fwlink/?linkid=2192971
|
||||
[linux-zip]: https://go.microsoft.com/fwlink/?linkid=2193237
|
||||
[linux-rpm]: https://go.microsoft.com/fwlink/?linkid=2193238
|
||||
[linux-deb]: https://go.microsoft.com/fwlink/?linkid=2193327
|
||||
|
||||
## Version 1.35.1
|
||||
* Release date: March 17, 2022
|
||||
* Release status: General Availability
|
||||
## Hotfix release
|
||||
- Fix for [Excel number format #18615](https://github.com/microsoft/azuredatastudio/issues/18615)
|
||||
- Fix for [Geometry Data Type Returned as Unknown Charset in Results Grid #18630](https://github.com/microsoft/azuredatastudio/issues/18630)
|
||||
|
||||
## Version 1.35.0
|
||||
* Release date: February 24, 2022
|
||||
* Release status: General Availability
|
||||
## What's new in this version
|
||||
* New Features:
|
||||
* Table Designer - Added functionality for creation and management of tables for SQL Servers. Built using DacFx framework
|
||||
* Query Plan Viewer - Added functionality for users to view a graphic view of estimated and actual query plans without need for an extension
|
||||
* Azure Arc Extension - Updated the Data Controller deployment wizard and the SQL Managed Instance - Azure Arc deployment wizard to reflect the deployment experience in Azure Portal
|
||||
|
||||
* Bug Fixes:
|
||||
* Azure Arc Extension - SQL Managed Instance-Azure Arc is now fixed for both indirect connectivity mode and direct connectivity mode
|
||||
* Notebooks - Support for keyboard navigation between cells to minimize mouse clicking
|
||||
|
||||
## Version 1.34.0
|
||||
* Release date: December 15, 2021
|
||||
* Release status: General Availability
|
||||
@@ -79,6 +31,26 @@
|
||||
- Fix for [#16535 Unable to See Saved Connections in Restricted Mode](https://github.com/microsoft/azuredatastudio/issues/17535)
|
||||
- Fix for [#17579 Can't type in Notebook code cell after editing text cell](https://github.com/microsoft/azuredatastudio/issues/17579)
|
||||
|
||||
|
||||
|
||||
| Platform |
|
||||
| --------------------------------------- |
|
||||
| [Windows User Installer][win-user] |
|
||||
| [Windows System Installer][win-system] |
|
||||
| [Windows ZIP][win-zip] |
|
||||
| [macOS ZIP][osx-zip] |
|
||||
| [Linux TAR.GZ][linux-zip] |
|
||||
| [Linux RPM][linux-rpm] |
|
||||
| [Linux DEB][linux-deb] |
|
||||
|
||||
[win-user]: https://go.microsoft.com/fwlink/?linkid=2176805
|
||||
[win-system]: https://go.microsoft.com/fwlink/?linkid=2175910
|
||||
[win-zip]: https://go.microsoft.com/fwlink/?linkid=2176806
|
||||
[osx-zip]: https://go.microsoft.com/fwlink/?linkid=2176807
|
||||
[linux-zip]: https://go.microsoft.com/fwlink/?linkid=2176505
|
||||
[linux-rpm]: https://go.microsoft.com/fwlink/?linkid=2176005
|
||||
[linux-deb]: https://go.microsoft.com/fwlink/?linkid=2176006
|
||||
|
||||
## Version 1.33.0
|
||||
* Release date: October 27, 2021
|
||||
* Release status: General Availability
|
||||
|
||||
14
README.md
14
README.md
@@ -131,10 +131,10 @@ Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Licensed under the [Source EULA](LICENSE.txt).
|
||||
|
||||
[win-user]: https://go.microsoft.com/fwlink/?linkid=2193235
|
||||
[win-system]: https://go.microsoft.com/fwlink/?linkid=2193326
|
||||
[win-zip]: https://go.microsoft.com/fwlink/?linkid=2193236
|
||||
[osx-zip]: https://go.microsoft.com/fwlink/?linkid=2192971
|
||||
[linux-zip]: https://go.microsoft.com/fwlink/?linkid=2193237
|
||||
[linux-rpm]: https://go.microsoft.com/fwlink/?linkid=2193238
|
||||
[linux-deb]: https://go.microsoft.com/fwlink/?linkid=2193327
|
||||
[win-user]: https://go.microsoft.com/fwlink/?linkid=2183280
|
||||
[win-system]: https://go.microsoft.com/fwlink/?linkid=2183423
|
||||
[win-zip]: https://go.microsoft.com/fwlink/?linkid=2183190
|
||||
[osx-zip]: https://go.microsoft.com/fwlink/?linkid=2183189
|
||||
[linux-zip]: https://go.microsoft.com/fwlink/?linkid=2183277
|
||||
[linux-rpm]: https://go.microsoft.com/fwlink/?linkid=2183342
|
||||
[linux-deb]: https://go.microsoft.com/fwlink/?linkid=2183341
|
||||
|
||||
@@ -106,7 +106,7 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
./scripts/test.sh --build --tfs "Unit Tests" --coverage
|
||||
./scripts/test.sh --build --tfs "Unit Tests" # Disable code coverage since it's currently broken --coverage
|
||||
displayName: Run unit tests
|
||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||
|
||||
@@ -128,24 +128,14 @@ steps:
|
||||
yarn gulp compile-extensions
|
||||
displayName: Compile Extensions
|
||||
|
||||
# Per https://developercommunity.visualstudio.com/t/variablesexpressions-dont-work-with-continueonerro/1187733 we can't use variables
|
||||
# in continueOnError directly so instead make two copies of the task and only run one or the other based on the SMOKE_FAIL_ON_ERROR value
|
||||
- script: |
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/azuredatastudio-darwin-x64
|
||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||
yarn smoketest --build "$APP_ROOT/$APP_NAME" --screenshots "$(build.artifactstagingdirectory)/smokeshots" --log "$(build.artifactstagingdirectory)/logs/darwin/smoke.log" --extensionsDir "$(build.sourcesdirectory)/extensions"
|
||||
displayName: Run smoke tests (Electron) (Continue on Error)
|
||||
displayName: Run smoke tests (Electron)
|
||||
continueOnError: true
|
||||
condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), ne(variables['SMOKE_FAIL_ON_ERROR'], 'true')))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
APP_ROOT=$(agent.builddirectory)/azuredatastudio-darwin-x64
|
||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||
yarn smoketest --build "$APP_ROOT/$APP_NAME" --screenshots "$(build.artifactstagingdirectory)/smokeshots" --log "$(build.artifactstagingdirectory)/logs/darwin/smoke.log" --extensionsDir "$(build.sourcesdirectory)/extensions"
|
||||
displayName: Run smoke tests (Electron) (Fail on Error)
|
||||
condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), eq(variables['SMOKE_FAIL_ON_ERROR'], 'true')))
|
||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||
|
||||
# - script: |
|
||||
# set -e
|
||||
|
||||
@@ -119,7 +119,7 @@ steps:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests" --coverage
|
||||
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests" # Disable code coverage since it's currently broken --coverage
|
||||
displayName: Run unit tests (Electron)
|
||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||
|
||||
|
||||
@@ -6,9 +6,6 @@ trigger:
|
||||
|
||||
pr: none
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
steps:
|
||||
- template: linux/sql-product-build-linux.yml
|
||||
parameters:
|
||||
extensionsToUnitTest: ["admin-tool-ext-win", "agent", "azcli", "azurecore", "cms", "dacpac", "data-workspace", "import", "machine-learning", "notebook", "resource-deployment", "schema-compare", "sql-bindings", "sql-database-projects"]
|
||||
extensionsToUnitTest: ["admin-tool-ext-win", "agent", "azcli", "azurecore", "cms", "dacpac", "data-workspace", "import", "machine-learning", "notebook", "resource-deployment", "schema-compare", "sql-database-projects"]
|
||||
timeoutInMinutes: 90
|
||||
|
||||
- job: Windows
|
||||
@@ -60,17 +60,16 @@ jobs:
|
||||
- template: win32/sql-product-build-win32.yml
|
||||
timeoutInMinutes: 90
|
||||
|
||||
# disable due to invalid machine pool (karlb 3/9/2022)
|
||||
# - job: Windows_Test
|
||||
# condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
||||
# pool:
|
||||
# name: mssqltools
|
||||
# dependsOn:
|
||||
# - Linux
|
||||
# - Windows
|
||||
# steps:
|
||||
# - template: win32/sql-product-test-win32.yml
|
||||
# timeoutInMinutes: 90
|
||||
- job: Windows_Test
|
||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
||||
pool:
|
||||
name: mssqltools
|
||||
dependsOn:
|
||||
- Linux
|
||||
- Windows
|
||||
steps:
|
||||
- template: win32/sql-product-test-win32.yml
|
||||
timeoutInMinutes: 90
|
||||
|
||||
- job: Release
|
||||
condition: and(succeeded(), or(eq(variables['VSCODE_RELEASE'], 'true'), and(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['Build.Reason'], 'Schedule'))))
|
||||
@@ -80,8 +79,7 @@ jobs:
|
||||
- macOS
|
||||
- Linux
|
||||
- Windows
|
||||
# disable due to invalid machine pool (karlb 3/9/2022)
|
||||
# - Windows_Test
|
||||
- Windows_Test
|
||||
- macOS_Signing
|
||||
steps:
|
||||
- template: sql-release.yml
|
||||
|
||||
@@ -93,7 +93,6 @@ steps:
|
||||
AZURE_STORAGE_ACCESS_KEY="$(sourcemap-storage-key)" \
|
||||
node build/azure-pipelines/upload-sourcemaps
|
||||
displayName: Upload sourcemaps
|
||||
condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
@@ -104,26 +104,14 @@ steps:
|
||||
yarn gulp compile-extensions
|
||||
displayName: Compile Extensions
|
||||
|
||||
# disable smoke tests (karlb 3/2/2022)
|
||||
# # Per https://developercommunity.visualstudio.com/t/variablesexpressions-dont-work-with-continueonerro/1187733 we can't use variables
|
||||
# # in continueOnError directly so instead make two copies of the task and only run one or the other based on the SMOKE_FAIL_ON_ERROR value
|
||||
# - script: |
|
||||
# set -e
|
||||
# node ./node_modules/playwright/install.js
|
||||
# APP_ROOT=$(Agent.BuildDirectory)/vscode-reh-web-linux-x64
|
||||
# xvfb-run yarn smoketest --build "$(Agent.BuildDirectory)/vscode-reh-web-linux-x64" --web --headless --screenshots "$(Build.ArtifactStagingDirectory)/smokeshots" --log "$(Build.ArtifactStagingDirectory)/logs/web/smoke.log"
|
||||
# displayName: Run smoke tests (Browser) (Continue on Error)
|
||||
# continueOnError: true
|
||||
# condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), ne(variables['SMOKE_FAIL_ON_ERROR'], 'true')))
|
||||
|
||||
# disable smoke tests (karlb 3/2/2022)
|
||||
# - script: |
|
||||
# set -e
|
||||
# node ./node_modules/playwright/install.js
|
||||
# APP_ROOT=$(Agent.BuildDirectory)/vscode-reh-web-linux-x64
|
||||
# xvfb-run yarn smoketest --build "$(Agent.BuildDirectory)/vscode-reh-web-linux-x64" --web --headless --screenshots "$(Build.ArtifactStagingDirectory)/smokeshots" --log "$(Build.ArtifactStagingDirectory)/logs/web/smoke.log"
|
||||
# displayName: Run smoke tests (Browser) (Fail on Error)
|
||||
# condition: and(succeeded(), and(eq(variables['RUN_TESTS'], 'true'), eq(variables['SMOKE_FAIL_ON_ERROR'], 'true')))
|
||||
- script: |
|
||||
set -e
|
||||
node ./node_modules/playwright/install.js
|
||||
APP_ROOT=$(Agent.BuildDirectory)/vscode-reh-web-linux-x64
|
||||
xvfb-run yarn smoketest --build "$(Agent.BuildDirectory)/vscode-reh-web-linux-x64" --web --headless --screenshots "$(Build.ArtifactStagingDirectory)/smokeshots" --log "$(Build.ArtifactStagingDirectory)/logs/web/smoke.log"
|
||||
displayName: Run smoke tests (Browser)
|
||||
continueOnError: true
|
||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
||||
|
||||
# - script: |
|
||||
# set -e
|
||||
|
||||
@@ -129,19 +129,16 @@ gulp.task('package-external-extensions', task.series(
|
||||
const packageManifestPath = path.join(packageDir, 'package.json');
|
||||
const json = require('gulp-json-editor');
|
||||
const packageJsonStream = gulp.src(packageManifestPath) // Create stream for the original package.json
|
||||
.pipe(json(data => {
|
||||
// And now use gulp-json-editor to modify the contents
|
||||
.pipe(json(data => { // And now use gulp-json-editor to modify the contents
|
||||
const updateData = JSON.parse(fs.readFileSync(vscodeManifestFullPath)); // Read in the set of values to replace from package.vscode.json
|
||||
Object.keys(updateData).forEach(key => {
|
||||
data[key] = updateData[key];
|
||||
});
|
||||
if(data.contributes?.menus){
|
||||
// Remove ADS-only menus. This is a subset of the menus listed in https://github.com/microsoft/azuredatastudio/blob/main/src/vs/workbench/api/common/menusExtensionPoint.ts
|
||||
// More can be added to the list as needed.
|
||||
['objectExplorer/item/context', 'dataExplorer/context', 'dashboard/toolbar'].forEach(menu => {
|
||||
delete data.contributes.menus[menu];
|
||||
});
|
||||
}
|
||||
// Remove ADS-only menus. This is a subset of the menus listed in https://github.com/microsoft/azuredatastudio/blob/main/src/vs/workbench/api/common/menusExtensionPoint.ts
|
||||
// More can be added to the list as needed.
|
||||
['objectExplorer/item/context', 'dataExplorer/context', 'dashboard/toolbar'].forEach(menu => {
|
||||
delete data.contributes.menus[menu];
|
||||
});
|
||||
return data;
|
||||
}, { beautify: false }))
|
||||
.pipe(gulp.dest(packageDir));
|
||||
|
||||
@@ -135,7 +135,6 @@ const extensionsFilter = filter([
|
||||
'**/schema-compare.xlf',
|
||||
'**/server-report.xlf',
|
||||
'**/sql-assessment.xlf',
|
||||
'**/sql-bindings.xlf',
|
||||
'**/sql-database-projects.xlf',
|
||||
'**/sql-migration.xlf',
|
||||
'**/xml-language-features.xlf'
|
||||
|
||||
@@ -37,7 +37,7 @@ function createCompile(src, build, emitError) {
|
||||
const sourcemaps = require('gulp-sourcemaps');
|
||||
const projectPath = path.join(__dirname, '../../', src, 'tsconfig.json');
|
||||
const overrideOptions = Object.assign(Object.assign({}, getTypeScriptCompilerOptions(src)), { inlineSources: Boolean(build) });
|
||||
if (!build && !process.env['SQL_NO_INLINE_SOURCEMAP']) {
|
||||
if (!build) {
|
||||
overrideOptions.inlineSourceMap = true;
|
||||
}
|
||||
const compilation = tsb.create(projectPath, overrideOptions, false, err => reporter(err));
|
||||
|
||||
@@ -44,7 +44,7 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
|
||||
|
||||
const projectPath = path.join(__dirname, '../../', src, 'tsconfig.json');
|
||||
const overrideOptions = { ...getTypeScriptCompilerOptions(src), inlineSources: Boolean(build) };
|
||||
if (!build && !process.env['SQL_NO_INLINE_SOURCEMAP']) {
|
||||
if (!build) {
|
||||
overrideOptions.inlineSourceMap = true;
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ function createCompile(src: string, build: boolean, emitError?: boolean) {
|
||||
export function compileTask(src: string, out: string, build: boolean): () => NodeJS.ReadWriteStream {
|
||||
|
||||
return function () {
|
||||
|
||||
if (os.totalmem() < 4_000_000_000) {
|
||||
throw new Error('compilation requires 4GB of RAM');
|
||||
}
|
||||
|
||||
@@ -231,7 +231,6 @@ const externalExtensions = [
|
||||
'schema-compare',
|
||||
'server-report',
|
||||
'sql-assessment',
|
||||
'sql-bindings',
|
||||
'sql-database-projects',
|
||||
'sql-migration'
|
||||
];
|
||||
|
||||
@@ -267,7 +267,6 @@ const externalExtensions = [
|
||||
'schema-compare',
|
||||
'server-report',
|
||||
'sql-assessment',
|
||||
'sql-bindings',
|
||||
'sql-database-projects',
|
||||
'sql-migration'
|
||||
];
|
||||
|
||||
@@ -18,13 +18,6 @@ const File = require("vinyl");
|
||||
const rimraf = require("rimraf");
|
||||
const gulp = require("gulp");
|
||||
const vfs = require("vinyl-fs");
|
||||
/**
|
||||
* If you need to compile this file for any changes, please run: yarn tsc -p ./build/tsconfig.json
|
||||
*/
|
||||
//List of extensions that we changed from vscode, so we can exclude them from having "Microsoft." appended in front.
|
||||
const alteredVSCodeExtensions = [
|
||||
'git'
|
||||
];
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
// Modified packageLocalExtensionsStream from extensions.ts, but for langpacks.
|
||||
function packageLangpacksStream() {
|
||||
@@ -141,13 +134,10 @@ function modifyI18nPackFiles(existingTranslationFolder, resultingTranslationPath
|
||||
for (let extension in extensionsPacks) {
|
||||
const translatedExtFile = i18n.createI18nFile(`extensions/${extension}`, extensionsPacks[extension]);
|
||||
this.queue(translatedExtFile);
|
||||
// exclude altered vscode extensions from having a new path even if we provide a new I18n file.
|
||||
if (alteredVSCodeExtensions.indexOf(extension) === -1) {
|
||||
//handle edge case for 'Microsoft.sqlservernotebook' where extension name is the same as extension ID.
|
||||
//(Other extensions need to have publisher appended in front as their ID.)
|
||||
let adsExtensionId = (extension === 'Microsoft.sqlservernotebook') ? extension : 'Microsoft.' + extension;
|
||||
resultingTranslationPaths.push({ id: adsExtensionId, resourceName: `extensions/${extension}.i18n.json` });
|
||||
}
|
||||
//handle edge case for 'Microsoft.sqlservernotebook' where extension name is the same as extension ID.
|
||||
//(Other extensions need to have publisher appended in front as their ID.)
|
||||
const adsExtensionId = (extension === 'Microsoft.sqlservernotebook') ? extension : 'Microsoft.' + extension;
|
||||
resultingTranslationPaths.push({ id: adsExtensionId, resourceName: `extensions/${extension}.i18n.json` });
|
||||
}
|
||||
this.queue(null);
|
||||
})
|
||||
@@ -172,6 +162,7 @@ const VSCODEExtensions = [
|
||||
"bat",
|
||||
"configuration-editing",
|
||||
"docker",
|
||||
"extension-editing",
|
||||
"git-ui",
|
||||
"git",
|
||||
"github-authentication",
|
||||
|
||||
@@ -17,15 +17,6 @@ import * as rimraf from 'rimraf';
|
||||
import * as gulp from 'gulp';
|
||||
import * as vfs from 'vinyl-fs';
|
||||
|
||||
/**
|
||||
* If you need to compile this file for any changes, please run: yarn tsc -p ./build/tsconfig.json
|
||||
*/
|
||||
|
||||
//List of extensions that we changed from vscode, so we can exclude them from having "Microsoft." appended in front.
|
||||
const alteredVSCodeExtensions = [
|
||||
'git'
|
||||
]
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
|
||||
// Modified packageLocalExtensionsStream from extensions.ts, but for langpacks.
|
||||
@@ -77,7 +68,7 @@ function updateMainI18nFile(existingTranslationFilePath: string, originalFilePat
|
||||
|
||||
// Delete any SQL strings that are no longer part of ADS in current langpack.
|
||||
for (let contentKey of Object.keys(objectContents)) {
|
||||
if (contentKey.startsWith('sql') && messages.contents[contentKey] === undefined) {
|
||||
if(contentKey.startsWith('sql') && messages.contents[contentKey] === undefined){
|
||||
delete objectContents[`${contentKey}`]
|
||||
}
|
||||
}
|
||||
@@ -157,14 +148,10 @@ export function modifyI18nPackFiles(existingTranslationFolder: string, resulting
|
||||
const translatedExtFile = i18n.createI18nFile(`extensions/${extension}`, extensionsPacks[extension]);
|
||||
this.queue(translatedExtFile);
|
||||
|
||||
// exclude altered vscode extensions from having a new path even if we provide a new I18n file.
|
||||
if (alteredVSCodeExtensions.indexOf(extension) === -1) {
|
||||
//handle edge case for 'Microsoft.sqlservernotebook' where extension name is the same as extension ID.
|
||||
//(Other extensions need to have publisher appended in front as their ID.)
|
||||
let adsExtensionId = (extension === 'Microsoft.sqlservernotebook') ? extension : 'Microsoft.' + extension;
|
||||
|
||||
resultingTranslationPaths.push({ id: adsExtensionId, resourceName: `extensions/${extension}.i18n.json` });
|
||||
}
|
||||
//handle edge case for 'Microsoft.sqlservernotebook' where extension name is the same as extension ID.
|
||||
//(Other extensions need to have publisher appended in front as their ID.)
|
||||
const adsExtensionId = (extension === 'Microsoft.sqlservernotebook') ? extension : 'Microsoft.' + extension;
|
||||
resultingTranslationPaths.push({ id: adsExtensionId, resourceName: `extensions/${extension}.i18n.json` });
|
||||
}
|
||||
this.queue(null);
|
||||
})
|
||||
@@ -412,7 +399,7 @@ export function renameVscodeLangpacks(): Promise<void> {
|
||||
|
||||
//Copy files to vscode langpack, then remove the ADS langpack, and finally rename the vscode langpack to match the ADS one.
|
||||
globMDArray.forEach(element => {
|
||||
fs.copyFileSync(element, path.join(locVSCODEFolder, path.parse(element).base));
|
||||
fs.copyFileSync(element, path.join(locVSCODEFolder,path.parse(element).base));
|
||||
});
|
||||
rimraf.sync(locADSFolder);
|
||||
fs.renameSync(locVSCODEFolder, locADSFolder);
|
||||
|
||||
@@ -48,7 +48,6 @@ exports.dirs = [
|
||||
'extensions/server-report',
|
||||
'extensions/simple-browser',
|
||||
'extensions/sql-assessment',
|
||||
'extensions/sql-bindings',
|
||||
'extensions/sql-database-projects',
|
||||
'extensions/sql-migration',
|
||||
'extensions/vscode-test-resolver',
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
"mime": "^1.4.1",
|
||||
"mkdirp": "^1.0.4",
|
||||
"p-limit": "^3.1.0",
|
||||
"plist": "^3.0.5",
|
||||
"plist": "^3.0.1",
|
||||
"rollup": "^1.20.3",
|
||||
"rollup-plugin-commonjs": "^10.1.0",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
|
||||
@@ -783,7 +783,7 @@ balanced-match@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||
|
||||
base64-js@^1.5.1:
|
||||
base64-js@^1.2.3:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||
@@ -2038,13 +2038,14 @@ pify@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
|
||||
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
|
||||
|
||||
plist@^3.0.1, plist@^3.0.5:
|
||||
version "3.0.5"
|
||||
resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.5.tgz#2cbeb52d10e3cdccccf0c11a63a85d830970a987"
|
||||
integrity sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA==
|
||||
plist@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c"
|
||||
integrity sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==
|
||||
dependencies:
|
||||
base64-js "^1.5.1"
|
||||
base64-js "^1.2.3"
|
||||
xmlbuilder "^9.0.7"
|
||||
xmldom "0.1.x"
|
||||
|
||||
"postcss@5 - 7":
|
||||
version "7.0.36"
|
||||
@@ -2675,6 +2676,11 @@ xmlbuilder@~11.0.0:
|
||||
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3"
|
||||
integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==
|
||||
|
||||
xmldom@0.1.x:
|
||||
version "0.1.31"
|
||||
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff"
|
||||
integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==
|
||||
|
||||
yallist@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/ads-extension-telemetry": "^1.1.3",
|
||||
"@microsoft/ads-service-downloader": "0.2.4",
|
||||
"@microsoft/ads-service-downloader": "0.2.3",
|
||||
"vscode-nls": "^4.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -189,16 +189,16 @@
|
||||
dependencies:
|
||||
vscode-extension-telemetry "^0.1.6"
|
||||
|
||||
"@microsoft/ads-service-downloader@0.2.4":
|
||||
version "0.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-0.2.4.tgz#905a11eb2da19673629852d9764fb9fb94ad81bd"
|
||||
integrity sha512-3J0YjH29a5pP+5Yu0HF7itRBZpNOgUN34Gh/p0Py/TQr7qUzZSXwOM+fWD1nCea+q9t8mfHr0yuy0aeDX+33vQ==
|
||||
"@microsoft/ads-service-downloader@0.2.3":
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-0.2.3.tgz#5987c1fc291d2019915e434263ccfe2223d27d5c"
|
||||
integrity sha512-c8vvBeV0pdLUzATjoj0PlGTH3UwN3tsnT3gA6Uo+H3ZaOfkULhDrv1hG+2jJ8kA7oq+HfTHWEIR6tSnaFk2G/w==
|
||||
dependencies:
|
||||
async-retry "^1.2.3"
|
||||
eventemitter2 "^5.0.1"
|
||||
http-proxy-agent "^2.1.0"
|
||||
https-proxy-agent "^2.2.3"
|
||||
mkdirp "1.0.4"
|
||||
mkdirp "^0.5.1"
|
||||
tar "^6.1.11"
|
||||
tmp "^0.0.33"
|
||||
yauzl "^2.10.0"
|
||||
@@ -236,9 +236,9 @@ agent-base@4, agent-base@^4.3.0:
|
||||
es6-promisify "^5.0.0"
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
@@ -739,18 +739,18 @@ mkdirp@0.5.1:
|
||||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
mkdirp@1.0.4, mkdirp@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
|
||||
mkdirp@~0.5.1:
|
||||
mkdirp@^0.5.1, mkdirp@~0.5.1:
|
||||
version "0.5.4"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.4.tgz#fd01504a6797ec5c9be81ff43d204961ed64a512"
|
||||
integrity sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==
|
||||
dependencies:
|
||||
minimist "^1.2.5"
|
||||
|
||||
mkdirp@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
|
||||
mocha-junit-reporter@^1.17.0:
|
||||
version "1.23.1"
|
||||
resolved "https://registry.yarnpkg.com/mocha-junit-reporter/-/mocha-junit-reporter-1.23.1.tgz#ba11519c0b967f404e4123dd69bc4ba022ab0f12"
|
||||
|
||||
@@ -208,9 +208,9 @@
|
||||
integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
|
||||
@@ -185,24 +185,21 @@
|
||||
"print (f'Creating Azure Arc Data Controller: {arc_data_controller_name} using configuration {arc_cluster_context}')\n",
|
||||
"os.environ[\"AZDATA_USERNAME\"] = arc_admin_username\n",
|
||||
"os.environ[\"AZDATA_PASSWORD\"] = arc_admin_password\n",
|
||||
"os.environ[\"LOG_WORKSPACE_ID\"] = log_analytics_workspace_id\n",
|
||||
"os.environ[\"LOG_SHARED_KEY\"] = log_analytics_primary_key\n",
|
||||
"\n",
|
||||
"# If connection mode is indirect\n",
|
||||
"namespace = f' --k8s-namespace {arc_data_controller_namespace}' if is_indirect else ''\n",
|
||||
"use_k8s = ' --use-k8s' if is_indirect else ''\n",
|
||||
"\n",
|
||||
"# If connection mode is direct\n",
|
||||
"custom_location = f' --custom-location {arc_data_controller_custom_location}' if not is_indirect else ''\n",
|
||||
"cluster_name = f' --cluster-name {arc_cluster_context}' if not is_indirect else ''\n",
|
||||
"\n",
|
||||
"auto_upload_metrics_value = 'true' if arc_data_controller_auto_upload_metrics == 'true' else 'false'\n",
|
||||
"auto_upload_logs_value = 'true' if arc_data_controller_auto_upload_logs == 'true' else 'false'\n",
|
||||
"\n",
|
||||
"auto_upload_metrics = f' --auto-upload-metrics {auto_upload_metrics_value}' if not is_indirect else ''\n",
|
||||
"auto_upload_logs = f' --auto-upload-logs {auto_upload_logs_value}' if not is_indirect else ''\n",
|
||||
"\n",
|
||||
"if os.name == 'nt':\n",
|
||||
" print(f'If you don\\'t see output produced by az, you can run the following command in a terminal window to check the deployment status:\\n\\t {os.environ[\"AZDATA_NB_VAR_KUBECTL\"]} get pods -n {arc_data_controller_namespace}')\n",
|
||||
"run_command(f'az arcdata dc create --connectivity-mode {arc_data_controller_connectivity_mode} --name {arc_data_controller_name}{namespace} --subscription {arc_subscription} --resource-group {arc_resource_group} --location {arc_data_controller_location} --storage-class {arc_data_controller_storage_class} --profile-name {arc_profile} --infrastructure {arc_infrastructure}{custom_location}{cluster_name}{auto_upload_metrics}{auto_upload_logs}{use_k8s}')\n",
|
||||
"run_command(f'az arcdata dc create --connectivity-mode {arc_data_controller_connectivity_mode} --name {arc_data_controller_name}{namespace} --subscription {arc_subscription} --resource-group {arc_resource_group} --location {arc_data_controller_location} --storage-class {arc_data_controller_storage_class} --profile-name {arc_profile} --infrastructure {arc_infrastructure}{custom_location}{auto_upload_metrics}{auto_upload_logs}{use_k8s}')\n",
|
||||
"print(f'Azure Arc Data Controller: {arc_data_controller_name} created.') "
|
||||
]
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "arc",
|
||||
"displayName": "%arc.displayName%",
|
||||
"description": "%arc.description%",
|
||||
"version": "1.1.0",
|
||||
"version": "1.0.0",
|
||||
"publisher": "Microsoft",
|
||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||
"icon": "images/extension.png",
|
||||
@@ -360,49 +360,6 @@
|
||||
"target": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_CONNECTIVITY_MODE",
|
||||
"value": "Direct"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "options",
|
||||
"label": "%arc.data.controller.log.analytics.workspace.names%",
|
||||
"variableName": "AZDATA_NB_VAR_LOG_ANALYTICS_WORKSPACE_NAMES",
|
||||
"required": true,
|
||||
"options": {
|
||||
"source": {
|
||||
"providerId": "arc.logAnalyticsWorkspaceNames"
|
||||
},
|
||||
"optionsType": "dropdown"
|
||||
},
|
||||
"enabled": {
|
||||
"target": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_AUTO_UPLOAD_LOGS",
|
||||
"value": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "%arc.data.controller.log.analytics.workspace.id%",
|
||||
"required": true,
|
||||
"isEvaluated": true,
|
||||
"variableName": "AZDATA_NB_VAR_LOG_ANALYTICS_WORKSPACE_ID",
|
||||
"valueProvider": {
|
||||
"providerId": "workspace-name-to-id",
|
||||
"triggerFields": [
|
||||
"AZDATA_NB_VAR_LOG_ANALYTICS_WORKSPACE_NAMES"
|
||||
]
|
||||
},
|
||||
"enabled": {
|
||||
"target": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_AUTO_UPLOAD_LOGS",
|
||||
"value": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "%arc.data.controller.log.analytics.primary.key%",
|
||||
"required": true,
|
||||
"variableName": "AZDATA_NB_VAR_LOG_ANALYTICS_PRIMARY_KEY",
|
||||
"enabled": {
|
||||
"target": "AZDATA_NB_VAR_ARC_DATA_CONTROLLER_AUTO_UPLOAD_LOGS",
|
||||
"value": "true"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1433,9 +1390,6 @@
|
||||
"resourceDeploymentOptionsSources": [
|
||||
{
|
||||
"id": "arc.controllers"
|
||||
},
|
||||
{
|
||||
"id": "arc.logAnalyticsWorkspaceNames"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"arc.openDashboard": "Manage",
|
||||
|
||||
"resource.type.azure.arc.display.name": "Azure Arc data controller",
|
||||
"resource.type.azure.arc.description": "Creates an Azure Arc data controller. Ensure that you have run az login before starting this wizard.",
|
||||
"resource.type.azure.arc.description": "Creates an Azure Arc data controller",
|
||||
"arc.data.controller.new.wizard.title": "Create Azure Arc data controller",
|
||||
"arc.data.controller.cluster.environment.title": "What is your target existing Kubernetes cluster environment?",
|
||||
"arc.data.controller.select.cluster.title": "Select from existing Kubernetes clusters",
|
||||
@@ -43,9 +43,6 @@
|
||||
"arc.data.controller.auto.upload.metrics.description": "Enable the automatic upload of metrics. Direct mode only.",
|
||||
"arc.data.controller.auto.upload.logs": "Auto-upload Logs",
|
||||
"arc.data.controller.auto.upload.logs.description": "Enable the automatic upload of logs. Direct mode only.",
|
||||
"arc.data.controller.log.analytics.workspace.names": "Log Analytics workspace",
|
||||
"arc.data.controller.log.analytics.workspace.id": "Log Analytics workspace ID",
|
||||
"arc.data.controller.log.analytics.primary.key": "Log Analytics primary key",
|
||||
|
||||
"arc.data.controller.metrics.and.logs.dashboard.credentials.title": "Metrics and Logs Dashboard Credentials",
|
||||
"arc.data.controller.metrics.and.logs.dashboard.credentials.username": "Username",
|
||||
|
||||
@@ -1,28 +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 { InputValueType } from 'resource-deployment';
|
||||
import * as azExt from 'az-ext';
|
||||
import * as vscode from 'vscode';
|
||||
import { errorListingLogAnalyticsWorkspaces } from '../localizedConstants';
|
||||
|
||||
export const licenseTypeVarName = 'AZDATA_NB_VAR_LOG_ANALYTICS_WORKSPACE_NAMES';
|
||||
|
||||
// Gets the Log Analytics workspace id from the workspace name.
|
||||
export async function getWorkspaceIdFromName(triggerFields: { [key: string]: InputValueType }): Promise<string | undefined> {
|
||||
try {
|
||||
const _azApi = <azExt.IExtension>vscode.extensions.getExtension(azExt.extension.name)?.exports;
|
||||
const workspaces = await _azApi.az.monitor.logAnalytics.workspace.list();
|
||||
const targetWorkspace = workspaces.stdout.find(workspace => workspace.name === triggerFields[licenseTypeVarName]);
|
||||
if (targetWorkspace) {
|
||||
return targetWorkspace.customerId;
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
} catch (e) {
|
||||
vscode.window.showErrorMessage(errorListingLogAnalyticsWorkspaces(e));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,6 @@ import { AzureArcTreeDataProvider } from './ui/tree/azureArcTreeDataProvider';
|
||||
import { ControllerTreeNode } from './ui/tree/controllerTreeNode';
|
||||
import { TreeNode } from './ui/tree/treeNode';
|
||||
import * as pricing from './common/pricingUtils';
|
||||
import * as workspace from './common/workspaceUtils';
|
||||
import { LogAnalyticsWorkspaceOptionsSourceProvider } from './providers/logAnalyticsWorkspaceOptionsSourceProvider';
|
||||
|
||||
export async function activate(context: vscode.ExtensionContext): Promise<arc.IExtension> {
|
||||
IconPathHelper.setExtensionContext(context);
|
||||
@@ -63,15 +61,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<arc.IE
|
||||
// register option sources
|
||||
const rdApi = <rd.IExtension>vscode.extensions.getExtension(rd.extension.name)?.exports;
|
||||
context.subscriptions.push(rdApi.registerOptionsSourceProvider(new ArcControllersOptionsSourceProvider(treeDataProvider)));
|
||||
context.subscriptions.push(rdApi.registerOptionsSourceProvider(new LogAnalyticsWorkspaceOptionsSourceProvider()));
|
||||
|
||||
// Register valueprovider for getting the Log Analytics workspace id from the workspace name.
|
||||
context.subscriptions.push(rdApi.registerValueProvider({
|
||||
id: 'workspace-name-to-id',
|
||||
getValue: async (triggerFields: { [key: string]: rd.InputValueType }) => {
|
||||
return workspace.getWorkspaceIdFromName(triggerFields);
|
||||
}
|
||||
}));
|
||||
|
||||
// Register valueprovider for getting the calculated cost per VCore.
|
||||
context.subscriptions.push(rdApi.registerValueProvider({
|
||||
|
||||
@@ -334,4 +334,3 @@ export const userCancelledError = localize('arc.userCancelledError', "User cance
|
||||
export const clusterContextConfigNoLongerValid = (configFile: string, clusterContext: string, error: any) => localize('clusterContextConfigNoLongerValid', "The cluster context information specified by config file: {0} and cluster context: {1} is no longer valid. Error is:\n\t{2}\n Do you want to update this information?", configFile, clusterContext, getErrorMessage(error));
|
||||
export const invalidConfigPath = localize('arc.invalidConfigPath', "Invalid config path");
|
||||
export const loadingClusterContextsError = (error: any): string => localize('arc.loadingClusterContextsError', "Error loading cluster contexts. {0}", getErrorMessage(error));
|
||||
export function errorListingLogAnalyticsWorkspaces(error: any): string { return localize('arc.errorListingLogAnalyticsWorkspaces', "Error listing Log Analytics workspaces {0}", getErrorMessage(error, true)); }
|
||||
|
||||
@@ -1,31 +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 azExt from 'az-ext';
|
||||
import * as rd from 'resource-deployment';
|
||||
import * as vscode from 'vscode';
|
||||
import { errorListingLogAnalyticsWorkspaces } from '../localizedConstants';
|
||||
|
||||
/**
|
||||
* Class that provides options sources for Log Analytics workspace names
|
||||
*/
|
||||
export class LogAnalyticsWorkspaceOptionsSourceProvider implements rd.IOptionsSourceProvider {
|
||||
readonly id = 'arc.logAnalyticsWorkspaceNames';
|
||||
private readonly _azApi: azExt.IExtension;
|
||||
|
||||
constructor() {
|
||||
this._azApi = <azExt.IExtension>vscode.extensions.getExtension(azExt.extension.name)?.exports;
|
||||
}
|
||||
|
||||
public async getOptions(): Promise<string[]> {
|
||||
try {
|
||||
const workspacesListResult = await this._azApi.az.monitor.logAnalytics.workspace.list();
|
||||
return workspacesListResult.stdout.map(workspace => workspace.name);
|
||||
} catch (err) {
|
||||
vscode.window.showErrorMessage(errorListingLogAnalyticsWorkspaces(err));
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,9 @@ describe('radioOptionsGroup', function (): void {
|
||||
const label = radioOptionsGroup.items[0] as azdata.TextComponent;
|
||||
should(label.value).not.be.undefined();
|
||||
label.value!.should.deepEqual(loc.loadingClusterContextsError(loadingError));
|
||||
should(label.CSSStyles).not.be.undefined();
|
||||
should(label.CSSStyles!.color).not.be.undefined();
|
||||
label.CSSStyles!.color.should.equal('Red');
|
||||
});
|
||||
|
||||
describe('getters and setters', async () => {
|
||||
|
||||
@@ -67,7 +67,7 @@ export class RadioOptionsGroup {
|
||||
this.component().loadingCompletedText = this._loadingCompleteMessage;
|
||||
}
|
||||
catch (e) {
|
||||
const errorLabel = this._modelBuilder.text().withProps({ value: loc.loadingClusterContextsError(e), textType: azdata.TextType.Error }).component();
|
||||
const errorLabel = this._modelBuilder.text().withProps({ value: loc.loadingClusterContextsError(e), CSSStyles: { 'color': 'Red' } }).component();
|
||||
this._divContainer.addItem(errorLabel);
|
||||
this.component().loadingCompletedText = this._loadingCompleteErrorMessage(e);
|
||||
}
|
||||
|
||||
@@ -283,9 +283,9 @@ agent-base@4, agent-base@^4.3.0:
|
||||
es6-promisify "^5.0.0"
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "azcli",
|
||||
"displayName": "%azcli.arc.displayName%",
|
||||
"description": "%azcli.arc.description%",
|
||||
"version": "1.1.0",
|
||||
"version": "1.0.0",
|
||||
"publisher": "Microsoft",
|
||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||
"icon": "images/extension.png",
|
||||
|
||||
@@ -154,17 +154,6 @@ export function getAzApi(localAzDiscovered: Promise<IAzTool | undefined>, azTool
|
||||
}
|
||||
}
|
||||
},
|
||||
monitor: {
|
||||
logAnalytics: {
|
||||
workspace: {
|
||||
list: async (resourceGroup?: string, subscription?: string, additionalEnvVars?: azExt.AdditionalEnvVars) => {
|
||||
await localAzDiscovered;
|
||||
validateAz(azToolService.localAz);
|
||||
return azToolService.localAz!.monitor.logAnalytics.workspace.list(resourceGroup, subscription, additionalEnvVars);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
getPath: async () => {
|
||||
await localAzDiscovered;
|
||||
throwIfNoAz(azToolService.localAz);
|
||||
|
||||
@@ -209,19 +209,6 @@ export class AzTool implements azExt.IAzApi {
|
||||
}
|
||||
};
|
||||
|
||||
public monitor = {
|
||||
logAnalytics: {
|
||||
workspace: {
|
||||
list: (resourceGroup?: string, subscription?: string, additionalEnvVars?: azExt.AdditionalEnvVars): Promise<azExt.AzOutput<azExt.LogAnalyticsWorkspaceListResult[]>> => {
|
||||
const argsArray = ['monitor', 'log-analytics', 'workspace', 'list'];
|
||||
if (resourceGroup) { argsArray.push('--resource-group', resourceGroup); }
|
||||
if (subscription) { argsArray.push('--subscription', subscription); }
|
||||
return this.executeCommand<azExt.LogAnalyticsWorkspaceListResult[]>(argsArray, additionalEnvVars);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Gets the output of running '--version' command on the az tool.
|
||||
|
||||
50
extensions/azcli/src/typings/az-ext.d.ts
vendored
50
extensions/azcli/src/typings/az-ext.d.ts
vendored
@@ -187,45 +187,6 @@ declare module 'az-ext' {
|
||||
state: string //Completed
|
||||
}
|
||||
|
||||
export interface LogAnalyticsWorkspaceListResult {
|
||||
createdDate: string, // "2020-02-25T16:59:38Z"
|
||||
customerId: string, // "7e136a79-c0b6-4878-86bf-7bf7a6a7e6f6",
|
||||
eTag: string, // null,
|
||||
etag: string, // "\"00006df1-0000-0700-0000-61ee552f0000\"",
|
||||
features: {
|
||||
clusterResourceId: string, // null,
|
||||
disableLocalAuth: boolean, // null,
|
||||
enableDataExport: boolean, // null,
|
||||
enableLogAccessUsingOnlyResourcePermissions: boolean, //true,
|
||||
immediatePurgeDataOn30Days: boolean, // null,
|
||||
legacy: number, // 0,
|
||||
searchVersion: number // 1
|
||||
},
|
||||
forceCmkForQuery: boolean, // null,
|
||||
id: string, // "/subscriptions/a5082b19-8a6e-4bc5-8fdd-8ef39dfebc39/resourcegroups/bugbash/providers/microsoft.operationalinsights/workspaces/bugbash-logs",
|
||||
location: string, // "westus",
|
||||
modifiedDate: string, // "2022-02-21T09:18:22.3906451Z",
|
||||
name: string, // "bugbash-logs",
|
||||
privateLinkScopedResources: string, // null,
|
||||
provisioningState: string, // "Succeeded",
|
||||
publicNetworkAccessForIngestion: string, // "Enabled",
|
||||
publicNetworkAccessForQuery: string, // "Enabled",
|
||||
resourceGroup: string, // "bugbash",
|
||||
retentionInDays: number, // 30,
|
||||
sku: {
|
||||
capacityReservationLevel: number, // null,
|
||||
lastSkuUpdate: string, // "2020-02-25T16:59:38Z",
|
||||
name: string, // "pergb2018"
|
||||
},
|
||||
tags: string[], //null,
|
||||
type: string, //"Microsoft.OperationalInsights/workspaces",
|
||||
workspaceCapping: {
|
||||
dailyQuotaGb: number, //-1.0,
|
||||
dataIngestionStatus: string, // "RespectQuota",
|
||||
quotaNextResetTime: string, // "2022-02-21T19:00:00Z"
|
||||
}
|
||||
}
|
||||
|
||||
export interface PostgresServerShowResult {
|
||||
apiVersion: string, // "arcdata.microsoft.com/v1alpha1"
|
||||
kind: string, // "postgresql"
|
||||
@@ -401,17 +362,6 @@ declare module 'az-ext' {
|
||||
): Promise<AzOutput<SqlMiDbRestoreResult>>
|
||||
}
|
||||
},
|
||||
monitor: {
|
||||
logAnalytics: {
|
||||
workspace: {
|
||||
list(
|
||||
resourceGroup?: string, // test-rg
|
||||
subscription?: string, // 122c121a-095a-4f5d-22e4-cc6b238490a3
|
||||
additionalEnvVars?: AdditionalEnvVars
|
||||
): Promise<AzOutput<LogAnalyticsWorkspaceListResult[]>>
|
||||
}
|
||||
}
|
||||
},
|
||||
getPath(): Promise<string>,
|
||||
/**
|
||||
* The semVersion corresponding to this installation of the Azure CLI. version() method should have been run
|
||||
|
||||
@@ -307,9 +307,9 @@ ajv@^6.5.5:
|
||||
uri-js "^4.2.2"
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
|
||||
@@ -81,10 +81,6 @@ export abstract class AzureAuth implements vscode.Disposable {
|
||||
this.resources = this.resources.concat(this.metadata.settings.azureKustoResource);
|
||||
}
|
||||
|
||||
if (this.metadata.settings.powerBiResource) {
|
||||
this.resources = this.resources.concat(this.metadata.settings.powerBiResource);
|
||||
}
|
||||
|
||||
this.scopes = [...this.metadata.settings.scopes];
|
||||
this.scopesString = this.scopes.join(' ');
|
||||
}
|
||||
|
||||
@@ -20,8 +20,7 @@ const enum SettingIds {
|
||||
ado = 'ado',
|
||||
ala = 'ala',
|
||||
storage = 'storage',
|
||||
kusto = 'kusto',
|
||||
powerbi = 'powerbi'
|
||||
kusto = 'kusto'
|
||||
}
|
||||
|
||||
const publicAzureSettings: ProviderSettings = {
|
||||
@@ -88,11 +87,6 @@ const publicAzureSettings: ProviderSettings = {
|
||||
endpoint: 'https://kusto.kusto.windows.net',
|
||||
azureResourceId: AzureResource.AzureKusto,
|
||||
},
|
||||
powerBiResource: {
|
||||
id: SettingIds.powerbi,
|
||||
endpoint: 'https://analysis.windows.net/powerbi/api',
|
||||
azureResourceId: AzureResource.PowerBi
|
||||
},
|
||||
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
||||
scopes: [
|
||||
'openid', 'email', 'profile', 'offline_access',
|
||||
@@ -153,11 +147,6 @@ const usGovAzureSettings: ProviderSettings = {
|
||||
endpointSuffix: '.core.usgovcloudapi.net',
|
||||
azureResourceId: AzureResource.AzureStorage
|
||||
},
|
||||
powerBiResource: {
|
||||
id: SettingIds.powerbi,
|
||||
endpoint: 'https://analysis.windows.net/powerbi/api',
|
||||
azureResourceId: AzureResource.PowerBi
|
||||
},
|
||||
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
||||
scopes: [
|
||||
'openid', 'email', 'profile', 'offline_access',
|
||||
@@ -262,11 +251,6 @@ const germanyAzureSettings: ProviderSettings = {
|
||||
endpointSuffix: '.core.cloudapi.de',
|
||||
azureResourceId: AzureResource.AzureStorage
|
||||
},
|
||||
powerBiResource: {
|
||||
id: SettingIds.powerbi,
|
||||
endpoint: 'https://analysis.windows.net/powerbi/api',
|
||||
azureResourceId: AzureResource.PowerBi
|
||||
},
|
||||
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
||||
scopes: [
|
||||
'openid', 'email', 'profile', 'offline_access',
|
||||
@@ -326,11 +310,6 @@ const chinaAzureSettings: ProviderSettings = {
|
||||
endpointSuffix: '.core.chinacloudapi.cn',
|
||||
azureResourceId: AzureResource.AzureStorage
|
||||
},
|
||||
powerBiResource: {
|
||||
id: SettingIds.powerbi,
|
||||
endpoint: 'https://analysis.windows.net/powerbi/api',
|
||||
azureResourceId: AzureResource.PowerBi
|
||||
},
|
||||
redirectUri: 'https://vscode-redirect.azurewebsites.net/',
|
||||
scopes: [
|
||||
'openid', 'email', 'profile', 'offline_access',
|
||||
|
||||
13
extensions/azurecore/src/azurecore.d.ts
vendored
13
extensions/azurecore/src/azurecore.d.ts
vendored
@@ -129,15 +129,10 @@ declare module 'azurecore' {
|
||||
azureLogAnalyticsResource?: Resource;
|
||||
|
||||
/**
|
||||
* Information that describes the Azure Storage resource
|
||||
* Information that describes the Azure Storage resourceI
|
||||
*/
|
||||
azureStorageResource?: Resource;
|
||||
|
||||
/**
|
||||
* Information that describes the Power BI resource
|
||||
*/
|
||||
powerBiResource?: Resource;
|
||||
|
||||
/**
|
||||
* A list of tenant IDs to authenticate against. If defined, then these IDs will be used
|
||||
* instead of querying the tenants endpoint of the armResource
|
||||
@@ -268,12 +263,6 @@ declare module 'azurecore' {
|
||||
}
|
||||
|
||||
export interface IExtension {
|
||||
/**
|
||||
* Gets the list of subscriptions for the specified AzureAccount
|
||||
* @param account The account to get the subscriptions for
|
||||
* @param ignoreErrors If true any errors are not thrown and instead collected and returned as part of the result
|
||||
* @param selectedOnly Whether to only list subscriptions the user has selected to filter to for this account
|
||||
*/
|
||||
getSubscriptions(account?: AzureAccount, ignoreErrors?: boolean, selectedOnly?: boolean): Promise<GetSubscriptionsResult>;
|
||||
getResourceGroups(account?: AzureAccount, subscription?: azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Promise<GetResourceGroupsResult>;
|
||||
getLocations(account?: AzureAccount, subscription?: azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Promise<GetLocationsResult>;
|
||||
|
||||
@@ -469,9 +469,9 @@ abort-controller@^3.0.0:
|
||||
event-target-shim "^5.0.0"
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
@@ -655,9 +655,9 @@ events@^3.0.0:
|
||||
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
|
||||
|
||||
follow-redirects@^1.14.0:
|
||||
version "1.14.8"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc"
|
||||
integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==
|
||||
version "1.14.7"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
|
||||
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
|
||||
|
||||
form-data@^2.5.0:
|
||||
version "2.5.1"
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.2.2",
|
||||
"figures": "^2.0.0",
|
||||
"find-remove": "1.2.1",
|
||||
"@microsoft/ads-service-downloader": "0.2.4",
|
||||
"@microsoft/ads-service-downloader": "0.2.3",
|
||||
"vscode-extension-telemetry": "0.4.2",
|
||||
"vscode-languageclient": "5.2.1",
|
||||
"vscode-nls": "^4.0.0"
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@microsoft/ads-service-downloader@0.2.4":
|
||||
version "0.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-0.2.4.tgz#905a11eb2da19673629852d9764fb9fb94ad81bd"
|
||||
integrity sha512-3J0YjH29a5pP+5Yu0HF7itRBZpNOgUN34Gh/p0Py/TQr7qUzZSXwOM+fWD1nCea+q9t8mfHr0yuy0aeDX+33vQ==
|
||||
"@microsoft/ads-service-downloader@0.2.3":
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-0.2.3.tgz#5987c1fc291d2019915e434263ccfe2223d27d5c"
|
||||
integrity sha512-c8vvBeV0pdLUzATjoj0PlGTH3UwN3tsnT3gA6Uo+H3ZaOfkULhDrv1hG+2jJ8kA7oq+HfTHWEIR6tSnaFk2G/w==
|
||||
dependencies:
|
||||
async-retry "^1.2.3"
|
||||
eventemitter2 "^5.0.1"
|
||||
http-proxy-agent "^2.1.0"
|
||||
https-proxy-agent "^2.2.3"
|
||||
mkdirp "1.0.4"
|
||||
mkdirp "^0.5.1"
|
||||
tar "^6.1.11"
|
||||
tmp "^0.0.33"
|
||||
yauzl "^2.10.0"
|
||||
@@ -187,6 +187,11 @@ minimatch@^3.0.4:
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
minimist@^1.2.5:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||
|
||||
minipass@^3.0.0:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd"
|
||||
@@ -202,7 +207,14 @@ minizlib@^2.1.1:
|
||||
minipass "^3.0.0"
|
||||
yallist "^4.0.0"
|
||||
|
||||
mkdirp@1.0.4, mkdirp@^1.0.3:
|
||||
mkdirp@^0.5.1:
|
||||
version "0.5.5"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
|
||||
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
|
||||
dependencies:
|
||||
minimist "^1.2.5"
|
||||
|
||||
mkdirp@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../mssql';
|
||||
import * as Utils from './cmsResource/utils';
|
||||
import { ICmsResourceNodeInfo } from './cmsResource/tree/baseTreeNodes';
|
||||
|
||||
|
||||
3
extensions/cms/src/typings/ref.d.ts
vendored
3
extensions/cms/src/typings/ref.d.ts
vendored
@@ -6,5 +6,4 @@
|
||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||
/// <reference types='@types/node'/>
|
||||
/// <reference types='@types/node'/>
|
||||
@@ -208,9 +208,9 @@
|
||||
integrity sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
|
||||
@@ -14,14 +14,10 @@ let packageInfo = Utils.getPackageInfo(packageJson);
|
||||
export const TelemetryReporter = new AdsTelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey);
|
||||
|
||||
export enum TelemetryViews {
|
||||
DataTierApplicationWizard = 'DataTierApplicationWizard'
|
||||
}
|
||||
|
||||
export enum TelemetryAction {
|
||||
DeployDacpac = 'DeployDacpacOperation',
|
||||
GenerateScript = 'GenerateDeployScriptOperation',
|
||||
GenerateDeployPlan = 'GenerateDeployPlan',
|
||||
ExtractDacpac = 'ExtractDacpacOperation',
|
||||
ExportBacpac = 'ExportBacpacOperation',
|
||||
ImportBacpac = 'ImportBacpacOperation'
|
||||
DataTierApplicationWizard = 'DataTierApplicationWizard',
|
||||
DeployDacpac = 'DeployDacpac',
|
||||
DeployPlanPage = 'DeployPlanPage',
|
||||
ExportBacpac = 'ExportBacpac',
|
||||
ExtractDacpac = 'ExtractDacpac',
|
||||
ImportBacpac = 'ImportBacpac'
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../mssql/src/mssql';
|
||||
|
||||
export const deployOperationId = 'deploy dacpac';
|
||||
export const extractOperationId = 'extract dacpac';
|
||||
|
||||
1
extensions/dacpac/src/typings/ref.d.ts
vendored
1
extensions/dacpac/src/typings/ref.d.ts
vendored
@@ -6,5 +6,4 @@
|
||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||
/// <reference types='@types/node'/>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import * as loc from '../localizedConstants';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as utils from '../utils';
|
||||
import { SelectOperationPage } from './pages/selectOperationpage';
|
||||
import { DeployConfigPage } from './pages/deployConfigPage';
|
||||
@@ -17,9 +17,10 @@ import { ExtractConfigPage } from './pages/extractConfigPage';
|
||||
import { ImportConfigPage } from './pages/importConfigPage';
|
||||
import { DacFxDataModel } from './api/models';
|
||||
import { BasePage } from './api/basePage';
|
||||
import { TelemetryAction, TelemetryReporter, TelemetryViews } from '../telemetry';
|
||||
import { TelemetryReporter, TelemetryViews } from '../telemetry';
|
||||
import { TelemetryEventMeasures, TelemetryEventProperties } from '@microsoft/ads-extension-telemetry';
|
||||
|
||||
const msSqlProvider = 'MSSQL';
|
||||
class Page {
|
||||
wizardPage: azdata.window.WizardPage;
|
||||
dacFxPage: BasePage;
|
||||
@@ -279,8 +280,8 @@ export class DataTierApplicationWizard {
|
||||
}
|
||||
}
|
||||
|
||||
if (!result?.success && result.errorMessage) {
|
||||
vscode.window.showErrorMessage(this.getOperationErrorMessage(this.selectedOperation, result.errorMessage));
|
||||
if (!result || !result.success) {
|
||||
vscode.window.showErrorMessage(this.getOperationErrorMessage(this.selectedOperation, result?.errorMessage));
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -307,130 +308,160 @@ export class DataTierApplicationWizard {
|
||||
private cancelDataTierApplicationWizard(): void {
|
||||
TelemetryReporter.createActionEvent(TelemetryViews.DataTierApplicationWizard, 'WizardCanceled')
|
||||
.withAdditionalProperties({
|
||||
isPotentialDataLoss: this.model.potentialDataLoss?.toString(),
|
||||
page: this.wizard.currentPage.toString(),
|
||||
selectedOperation: this.selectedOperation.toString()
|
||||
isPotentialDataLoss: this.model.potentialDataLoss?.toString()
|
||||
}).send();
|
||||
}
|
||||
|
||||
public async deploy(): Promise<mssql.DacFxResult> {
|
||||
const deployStartTime = new Date().getTime();
|
||||
let service: mssql.IDacFxService;
|
||||
let ownerUri: string;
|
||||
let result: mssql.DacFxResult;
|
||||
let additionalProps: TelemetryEventProperties = {};
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
try {
|
||||
service = await this.getService(msSqlProvider);
|
||||
ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
result = await service.deployDacpac(this.model.filePath, this.model.database, this.model.upgradeExisting, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
} catch (e) {
|
||||
additionalProps.exceptionOccurred = 'true';
|
||||
}
|
||||
|
||||
const service = await this.getService();
|
||||
const ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
|
||||
const deployStartTime = new Date().getTime();
|
||||
const result = await service.deployDacpac(this.model.filePath, this.model.database, this.model.upgradeExisting, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - deployStartTime);
|
||||
additionalMeasurements.deployDacpacFileSizeBytes = await utils.tryGetFileSize(this.model.filePath);
|
||||
// If result is null which means exception occured, will be adding additional props to the Telemetry
|
||||
if (!result) {
|
||||
additionalProps = { ...additionalProps, ...this.getDacServiceArgsAsProps(service, this.model.database, this.model.filePath, ownerUri) };
|
||||
}
|
||||
additionalProps.deploymentStatus = result?.success.toString();
|
||||
additionalProps.upgradeExistingDatabase = this.model.upgradeExisting.toString();
|
||||
additionalProps.potentialDataLoss = this.model.potentialDataLoss.toString();
|
||||
|
||||
this.sendDacFxOperationTelemetryEvent(result, TelemetryAction.DeployDacpac, additionalProps, additionalMeasurements);
|
||||
additionalMeasurements.deployDacpacFileSizeBytes = await utils.tryGetFileSize(this.model.filePath);
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - deployStartTime);
|
||||
|
||||
// Deploy Dacpac: 'Deploy button' clicked in deploy summary page, Reporting the event selection to the telemetry
|
||||
this.sendDacServiceTelemetryEvent(TelemetryViews.DeployDacpac, 'DeployDacpacOperation', additionalProps, additionalMeasurements);
|
||||
return result;
|
||||
}
|
||||
|
||||
private async extract(): Promise<mssql.DacFxResult> {
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
|
||||
const service = await this.getService();
|
||||
const ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
|
||||
const extractStartTime = new Date().getTime();
|
||||
const result = await service.extractDacpac(this.model.database, this.model.filePath, this.model.database, this.model.version, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
let service: mssql.IDacFxService;
|
||||
let ownerUri: string;
|
||||
let result: mssql.DacFxResult;
|
||||
let additionalProps: TelemetryEventProperties = {};
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
try {
|
||||
service = await this.getService(msSqlProvider);
|
||||
ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
result = await service.extractDacpac(this.model.database, this.model.filePath, this.model.database, this.model.version, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
} catch (e) {
|
||||
additionalProps.exceptionOccurred = 'true';
|
||||
}
|
||||
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - extractStartTime);
|
||||
// If result is null which means exception occured, will be adding additional props to the Telemetry
|
||||
if (!result) {
|
||||
additionalProps = { ...additionalProps, ...this.getDacServiceArgsAsProps(service, this.model.database, this.model.filePath, ownerUri) };
|
||||
}
|
||||
additionalProps.extractStatus = result?.success.toString();
|
||||
additionalMeasurements.extractedDacpacFileSizeBytes = await utils.tryGetFileSize(this.model.filePath);
|
||||
|
||||
this.sendDacFxOperationTelemetryEvent(result, TelemetryAction.ExtractDacpac, { version: this.model.version }, additionalMeasurements);
|
||||
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - extractStartTime);
|
||||
// Extract Dacpac: 'Extract button' clicked in extract summary page, Reporting the event selection to the telemetry
|
||||
this.sendDacServiceTelemetryEvent(TelemetryViews.ExtractDacpac, 'ExtractDacpacOperation', additionalProps, additionalMeasurements);
|
||||
return result;
|
||||
}
|
||||
|
||||
private async export(): Promise<mssql.DacFxResult> {
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
|
||||
const service = await this.getService();
|
||||
const ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
|
||||
const exportStartTime = new Date().getTime();
|
||||
const result = await service.exportBacpac(this.model.database, this.model.filePath, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
let service: mssql.IDacFxService;
|
||||
let ownerUri: string;
|
||||
let result: mssql.DacFxResult;
|
||||
let additionalProps: TelemetryEventProperties = {};
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
try {
|
||||
service = await this.getService(msSqlProvider);
|
||||
ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
result = await service.exportBacpac(this.model.database, this.model.filePath, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
} catch (e) {
|
||||
additionalProps.exceptionOccurred = 'true';
|
||||
}
|
||||
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - exportStartTime);
|
||||
// If result is null which means exception occured, will be adding additional props to the Telemetry
|
||||
if (!result) {
|
||||
additionalProps = { ...additionalProps, ...this.getDacServiceArgsAsProps(service, this.model.database, this.model.filePath, ownerUri) };
|
||||
}
|
||||
additionalProps.exportStatus = result?.success.toString();
|
||||
additionalMeasurements.exportedBacpacFileSizeBytes = await utils.tryGetFileSize(this.model.filePath);
|
||||
|
||||
this.sendDacFxOperationTelemetryEvent(result, TelemetryAction.ExportBacpac, undefined, additionalMeasurements);
|
||||
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - exportStartTime);
|
||||
// Export Bacpac: 'Export button' clicked in Export summary page, Reporting the event selection to the telemetry
|
||||
this.sendDacServiceTelemetryEvent(TelemetryViews.ExportBacpac, 'ExportBacpacOperation', additionalProps, additionalMeasurements);
|
||||
return result;
|
||||
}
|
||||
|
||||
private async import(): Promise<mssql.DacFxResult> {
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
|
||||
const service = await this.getService();
|
||||
const ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
|
||||
const importStartTime = new Date().getTime();
|
||||
const result = await service.importBacpac(this.model.filePath, this.model.database, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
let service: mssql.IDacFxService;
|
||||
let ownerUri: string;
|
||||
let result: mssql.DacFxResult;
|
||||
let additionalProps: TelemetryEventProperties = {};
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
try {
|
||||
service = await this.getService(msSqlProvider);
|
||||
ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
result = await service.importBacpac(this.model.filePath, this.model.database, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
} catch (e) {
|
||||
additionalProps.exceptionOccurred = 'true';
|
||||
}
|
||||
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - importStartTime);
|
||||
// If result is null which means exception occured, will be adding additional props to the Telemetry
|
||||
if (!result) {
|
||||
additionalProps = { ...additionalProps, ...this.getDacServiceArgsAsProps(service, this.model.database, this.model.filePath, ownerUri) };
|
||||
}
|
||||
additionalProps.importStatus = result?.success.toString();
|
||||
additionalMeasurements.importedBacpacFileSizeBytes = await utils.tryGetFileSize(this.model.filePath);
|
||||
|
||||
this.sendDacFxOperationTelemetryEvent(result, TelemetryAction.ImportBacpac, undefined, additionalMeasurements);
|
||||
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - importStartTime);
|
||||
// Import Bacpac: 'Import button' clicked in Import summary page, Reporting the event selection to the telemetry
|
||||
this.sendDacServiceTelemetryEvent(TelemetryViews.ImportBacpac, 'ImportBacpacOperation', additionalProps, additionalMeasurements);
|
||||
return result;
|
||||
}
|
||||
|
||||
public async generateDeployScript(): Promise<mssql.DacFxResult> {
|
||||
const genScriptStartTime = new Date().getTime();
|
||||
let service: mssql.IDacFxService;
|
||||
let ownerUri: string;
|
||||
let result: mssql.DacFxResult;
|
||||
let additionalProps: TelemetryEventProperties = {};
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
this.wizard.message = {
|
||||
text: loc.generatingScriptMessage,
|
||||
level: azdata.window.MessageLevel.Information
|
||||
};
|
||||
try {
|
||||
this.wizard.message = {
|
||||
text: loc.generatingScriptMessage,
|
||||
level: azdata.window.MessageLevel.Information,
|
||||
description: ''
|
||||
};
|
||||
|
||||
const service = await this.getService();
|
||||
const ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
service = await this.getService(msSqlProvider);
|
||||
ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
result = await service.generateDeployScript(this.model.filePath, this.model.database, ownerUri, azdata.TaskExecutionMode.script);
|
||||
} catch (e) {
|
||||
additionalProps.exceptionOccurred = 'true';
|
||||
}
|
||||
|
||||
const genScriptStartTime = new Date().getTime();
|
||||
const result = await service.generateDeployScript(this.model.filePath, this.model.database, ownerUri, azdata.TaskExecutionMode.script);
|
||||
if (!result || !result.success) {
|
||||
vscode.window.showErrorMessage(loc.generateDeployErrorMessage(result?.errorMessage));
|
||||
}
|
||||
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - genScriptStartTime);
|
||||
additionalMeasurements.deployDacpacFileSizeBytes = await utils.tryGetFileSize(this.model.filePath);
|
||||
// If result is null which means exception occured, will be adding additional props to the Telemetry
|
||||
if (!result) {
|
||||
additionalProps = { ...additionalProps, ...this.getDacServiceArgsAsProps(service, this.model.database, this.model.filePath, ownerUri) };
|
||||
}
|
||||
additionalProps.isScriptGenerated = result?.success.toString();
|
||||
additionalProps.potentialDataLoss = this.model.potentialDataLoss.toString();
|
||||
|
||||
this.sendDacFxOperationTelemetryEvent(result, TelemetryAction.GenerateScript, undefined, additionalMeasurements);
|
||||
|
||||
if (!result?.success && result.errorMessage) {
|
||||
vscode.window.showErrorMessage(loc.generateDeployErrorMessage(result.errorMessage));
|
||||
}
|
||||
|
||||
additionalMeasurements.deployDacpacFileSizeBytes = await utils.tryGetFileSize(this.model.filePath);
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - genScriptStartTime);
|
||||
// Deploy Dacpac 'generate script' button clicked in DeployPlanPage, Reporting the event selection to the telemetry with fail/sucess status
|
||||
this.sendDacServiceTelemetryEvent(TelemetryViews.DeployDacpac, 'GenerateDeployScriptOperation', additionalProps, additionalMeasurements);
|
||||
return result;
|
||||
}
|
||||
|
||||
public async generateDeployPlan(): Promise<string> {
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
|
||||
const service = await this.getService();
|
||||
const ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
|
||||
const deployPlanStartTime = new Date().getTime();
|
||||
const result = await service.generateDeployPlan(this.model.filePath, this.model.database, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - deployPlanStartTime);
|
||||
|
||||
this.sendDacFxOperationTelemetryEvent(result, TelemetryAction.GenerateDeployPlan, undefined, additionalMeasurements);
|
||||
|
||||
if (!result?.success && result.errorMessage) {
|
||||
vscode.window.showErrorMessage(loc.deployPlanErrorMessage(result.errorMessage));
|
||||
}
|
||||
|
||||
return result.report;
|
||||
}
|
||||
|
||||
public getPage(idx: number): Page {
|
||||
let page: Page;
|
||||
|
||||
@@ -470,24 +501,56 @@ export class DataTierApplicationWizard {
|
||||
|| (this.selectedOperation === Operation.deploy) && idx === DeployOperationPath.summary;
|
||||
}
|
||||
|
||||
private async getService(): Promise<mssql.IDacFxService> {
|
||||
public async generateDeployPlan(): Promise<string> {
|
||||
const deployPlanStartTime = new Date().getTime();
|
||||
let service: mssql.IDacFxService;
|
||||
let ownerUri: string;
|
||||
let result: mssql.GenerateDeployPlanResult;
|
||||
let additionalProps: TelemetryEventProperties = {};
|
||||
let additionalMeasurements: TelemetryEventMeasures = {};
|
||||
try {
|
||||
service = await this.getService(msSqlProvider);
|
||||
ownerUri = await azdata.connection.getUriForConnection(this.model.server.connectionId);
|
||||
result = await service.generateDeployPlan(this.model.filePath, this.model.database, ownerUri, azdata.TaskExecutionMode.execute);
|
||||
} catch (e) {
|
||||
additionalProps.exceptionOccurred = 'true';
|
||||
}
|
||||
|
||||
if (!result || !result.success) {
|
||||
vscode.window.showErrorMessage(loc.deployPlanErrorMessage(result?.errorMessage));
|
||||
}
|
||||
|
||||
// If result is null which means exception occured, will be adding additional props to the Telemetry
|
||||
if (!result) {
|
||||
additionalProps = { ...additionalProps, ...this.getDacServiceArgsAsProps(service, this.model.database, this.model.filePath, ownerUri) };
|
||||
}
|
||||
additionalProps.isPlanGenerated = result?.success.toString();
|
||||
additionalMeasurements.totalDurationMs = (new Date().getTime() - deployPlanStartTime);
|
||||
// send Generate deploy plan error/succes telemetry event
|
||||
this.sendDacServiceTelemetryEvent(TelemetryViews.DeployPlanPage, 'GenerateDeployPlanOperation', additionalProps, additionalMeasurements);
|
||||
return result.report;
|
||||
}
|
||||
|
||||
private async getService(providerName: string): Promise<mssql.IDacFxService> {
|
||||
if (!this.dacfxService) {
|
||||
this.dacfxService = (vscode.extensions.getExtension(mssql.extension.name).exports as mssql.IExtension).dacFx;
|
||||
}
|
||||
return this.dacfxService;
|
||||
}
|
||||
|
||||
private sendDacFxOperationTelemetryEvent(result: azdata.ResultStatus, telemetryAction: string, additionalProps: TelemetryEventProperties, additionalMeasurements: TelemetryEventMeasures): void {
|
||||
if (result?.success) {
|
||||
TelemetryReporter.createActionEvent(TelemetryViews.DataTierApplicationWizard, telemetryAction)
|
||||
.withAdditionalProperties(additionalProps)
|
||||
.withAdditionalMeasurements(additionalMeasurements)
|
||||
.send();
|
||||
} else {
|
||||
TelemetryReporter.createErrorEvent(TelemetryViews.DataTierApplicationWizard, telemetryAction)
|
||||
.withAdditionalProperties(additionalProps)
|
||||
.withAdditionalMeasurements(additionalMeasurements)
|
||||
.send();
|
||||
}
|
||||
public getDacServiceArgsAsProps(service: mssql.IDacFxService, database: string, filePath: string, ownerUri: string): { [k: string]: string } {
|
||||
return {
|
||||
isServiceExist: (!!service).toString(),
|
||||
isDatabaseExists: (!!database).toString(),
|
||||
isFilePathExist: (!!filePath).toString(),
|
||||
isOwnerUriExist: (!!ownerUri).toString()
|
||||
};
|
||||
}
|
||||
|
||||
private sendDacServiceTelemetryEvent(telemetryView: string, telemetryAction: string, additionalProps: TelemetryEventProperties, additionalMeasurements: TelemetryEventMeasures): void {
|
||||
TelemetryReporter.createActionEvent(telemetryView, telemetryAction)
|
||||
.withAdditionalProperties(additionalProps)
|
||||
.withAdditionalMeasurements(additionalMeasurements)
|
||||
.send();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,9 +263,9 @@
|
||||
integrity sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "data-workspace",
|
||||
"displayName": "Data Workspace",
|
||||
"description": "Additional common functionality for database projects",
|
||||
"version": "0.2.0",
|
||||
"version": "0.1.1",
|
||||
"publisher": "Microsoft",
|
||||
"preview": true,
|
||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||
@@ -133,12 +133,12 @@
|
||||
"view/item/context": [
|
||||
{
|
||||
"command": "projects.manageProject",
|
||||
"when": "view == dataworkspace.views.main && viewItem =~ /^(databaseProject.itemType.project|databaseProject.itemType.legacyProject)$/ && azdataAvailable",
|
||||
"when": "view == dataworkspace.views.main && viewItem == databaseProject.itemType.project && azdataAvailable",
|
||||
"group": "0_projectsFirst@1"
|
||||
},
|
||||
{
|
||||
"command": "projects.removeProject",
|
||||
"when": "view == dataworkspace.views.main && viewItem =~ /^(databaseProject.itemType.project|databaseProject.itemType.legacyProject)$/",
|
||||
"when": "view == dataworkspace.views.main && viewItem == databaseProject.itemType.project",
|
||||
"group": "9_dbProjectsLast@9"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -35,7 +35,7 @@ export const DefaultInputWidth = '400px';
|
||||
export const DefaultButtonWidth = '80px';
|
||||
|
||||
// New Project Dialog
|
||||
export const NewProjectDialogTitle = localize('dataworkspace.NewProjectDialogTitle', "Create new database project");
|
||||
export const NewProjectDialogTitle = localize('dataworkspace.NewProjectDialogTitle', "Create new project");
|
||||
export const TypeTitle = localize('dataworkspace.Type', "Type");
|
||||
export const ProjectNameTitle = localize('dataworkspace.projectNameTitle', "Name");
|
||||
export const ProjectNamePlaceholder = localize('dataworkspace.projectNamePlaceholder', "Enter project name");
|
||||
@@ -45,17 +45,10 @@ export const ProjectLocationPlaceholder = localize('dataworkspace.projectLocatio
|
||||
export const ProjectParentDirectoryNotExistError = (location: string): string => { return localize('dataworkspace.projectParentDirectoryNotExistError', "The selected project location '{0}' does not exist or is not a directory.", location); };
|
||||
export const ProjectDirectoryAlreadyExistError = (projectName: string, location: string): string => { return localize('dataworkspace.projectDirectoryAlreadyExistError', "There is already a directory named '{0}' in the selected location: '{1}'.", projectName, location); };
|
||||
export const ProjectDirectoryAlreadyExistErrorShort = (projectName: string) => { return localize('dataworkspace.projectDirectoryAlreadyExistErrorShort', "Directory '{0}' already exists in the selected location, please choose another", projectName); };
|
||||
export const SelectProjectType = localize('dataworkspace.selectProjectType', "Select Database Project Type");
|
||||
export const SelectProjectType = localize('dataworkspace.selectProjectType', "Select Project Type");
|
||||
export const SelectProjectLocation = localize('dataworkspace.selectProjectLocation', "Select Project Location");
|
||||
export const NameCannotBeEmpty = localize('dataworkspace.nameCannotBeEmpty', "Name cannot be empty");
|
||||
export const TargetPlatform = localize('dataworkspace.targetPlatform', "Target Platform");
|
||||
export const SdkStyleProject = localize('dataworkspace.sdkStyleProject', "SDK-style project (Preview)");
|
||||
export const LearnMore = localize('dataworkspace.learnMore', "Learn More");
|
||||
export const YesRecommended = localize('dataworkspace.yesRecommended', "Yes (Recommended)");
|
||||
export const No = localize('dataworkspace.no', "No");
|
||||
export const SdkLearnMorePlaceholder = localize('dataworkspace.sdkLearnMorePlaceholder', "Click \"Learn More\" button for more information about SDK-style projects");
|
||||
export const Default = localize('dataworkspace.default', "Default");
|
||||
export const SelectTargetPlatform = localize('dataworkspace.selectTargetPlatform', "Select Target Platform");
|
||||
|
||||
//Open Existing Dialog
|
||||
export const OpenExistingDialogTitle = localize('dataworkspace.openExistingDialogTitle', "Open Existing Project");
|
||||
|
||||
@@ -25,10 +25,6 @@ export class DataWorkspaceExtension implements IExtension {
|
||||
void vscode.commands.executeCommand('dataworkspace.views.main.focus');
|
||||
}
|
||||
|
||||
refreshProjectsTree(): void {
|
||||
this.workspaceService.refreshProjectsTree();
|
||||
}
|
||||
|
||||
get defaultProjectSaveLocation(): vscode.Uri | undefined {
|
||||
return defaultProjectSaveLocation();
|
||||
}
|
||||
|
||||
@@ -74,9 +74,8 @@ export interface IWorkspaceService {
|
||||
* @param location The location of the project
|
||||
* @param projectTypeId The project type id
|
||||
* @param projectTargetPlatform The target platform of the project
|
||||
* @param sdkStyleProject Whether or not the project is SDK-style
|
||||
*/
|
||||
createProject(name: string, location: vscode.Uri, projectTypeId: string, projectTargetPlatform?: string, sdkStyleProject?: boolean): Promise<vscode.Uri>;
|
||||
createProject(name: string, location: vscode.Uri, projectTypeId: string, projectTargetPlatform?: string): Promise<vscode.Uri>;
|
||||
|
||||
/**
|
||||
* Clones git repository and adds projects to workspace
|
||||
|
||||
16
extensions/data-workspace/src/dataworkspace.d.ts
vendored
16
extensions/data-workspace/src/dataworkspace.d.ts
vendored
@@ -33,11 +33,6 @@ declare module 'dataworkspace' {
|
||||
*/
|
||||
showProjectsView(): void;
|
||||
|
||||
/**
|
||||
* Fires event to refresh the project tree. The tree is not guaranteed to be refreshed after this call returns
|
||||
*/
|
||||
refreshProjectsTree(): void;
|
||||
|
||||
/**
|
||||
* Returns the default location to save projects
|
||||
*/
|
||||
@@ -72,9 +67,8 @@ declare module 'dataworkspace' {
|
||||
* @param location the parent directory of the project
|
||||
* @param projectTypeId the identifier of the selected project type
|
||||
* @param projectTargetPlatform the target platform of the project
|
||||
* @param sdkStyleProject whether or not a project is SDK-style
|
||||
*/
|
||||
createProject(name: string, location: vscode.Uri, projectTypeId: string, projectTargetPlatform?: string, sdkStyleProject?: boolean): Promise<vscode.Uri>;
|
||||
createProject(name: string, location: vscode.Uri, projectTypeId: string, projectTargetPlatform?: string): Promise<vscode.Uri>;
|
||||
|
||||
/**
|
||||
* Gets the project data corresponding to the project file, to be placed in the dashboard container
|
||||
@@ -137,14 +131,14 @@ declare module 'dataworkspace' {
|
||||
readonly defaultTargetPlatform?: string;
|
||||
|
||||
/**
|
||||
* Whether or not sdk style project is an option
|
||||
* Link display value for a link at the end of the project description. linkLocation also needs to be set to use this
|
||||
*/
|
||||
readonly sdkStyleOption?: boolean;
|
||||
readonly linkDisplayValue?: string;
|
||||
|
||||
/**
|
||||
* Location where clicking on the Learn More next to SDK style checkbox will go. sdkStyleOption needs to be set to true to use this
|
||||
* Location where clicking on the linkDisplayValue will go to
|
||||
*/
|
||||
readonly sdkStyleLearnMoreUrl?: string
|
||||
readonly linkLocation?: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,6 @@ class NewProjectDialogModel {
|
||||
name: string = '';
|
||||
location: string = '';
|
||||
targetPlatform?: string;
|
||||
sdkStyleProject?: boolean;
|
||||
}
|
||||
|
||||
export async function openSpecificProjectNewProjectDialog(projectType: IProjectType, workspaceService: WorkspaceService): Promise<vscode.Uri | undefined> {
|
||||
@@ -36,7 +35,6 @@ export class NewProjectDialog extends DialogBase {
|
||||
public model: NewProjectDialogModel = new NewProjectDialogModel();
|
||||
public formBuilder: azdataType.FormBuilder | undefined;
|
||||
public targetPlatformDropdownFormComponent: azdataType.FormComponent | undefined;
|
||||
public sdkProjectCheckboxFormComponent: azdataType.FormComponent | undefined;
|
||||
public newProjectDialogComplete: Deferred<void> | undefined;
|
||||
public newDialogPromise: Promise<void> = new Promise<void>((resolve, reject) => this.newProjectDialogComplete = { resolve, reject });
|
||||
public projectUri: vscode.Uri | undefined;
|
||||
@@ -89,7 +87,7 @@ export class NewProjectDialog extends DialogBase {
|
||||
.withAdditionalProperties({ projectFileExtension: this.model.projectFileExtension, projectTemplateId: this.model.projectTypeId })
|
||||
.send();
|
||||
|
||||
this.projectUri = await this.workspaceService.createProject(this.model.name, vscode.Uri.file(this.model.location), this.model.projectTypeId, this.model.targetPlatform, this.model.sdkStyleProject);
|
||||
this.projectUri = await this.workspaceService.createProject(this.model.name, vscode.Uri.file(this.model.location), this.model.projectTypeId, this.model.targetPlatform);
|
||||
this.newProjectDialogComplete?.resolve();
|
||||
}
|
||||
catch (err) {
|
||||
@@ -124,7 +122,8 @@ export class NewProjectDialog extends DialogBase {
|
||||
'font-weight': 'bold'
|
||||
}
|
||||
}, {
|
||||
textValue: projectType.description
|
||||
textValue: projectType.description,
|
||||
linkDisplayValue: projectType.linkDisplayValue
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -139,7 +138,15 @@ export class NewProjectDialog extends DialogBase {
|
||||
selectedCardId: allProjectTypes.length > 0 ? allProjectTypes[0].id : undefined
|
||||
}).component();
|
||||
|
||||
this.register(projectTypeRadioCardGroup.onSelectionChanged(async (e) => {
|
||||
projectTypeRadioCardGroup.onLinkClick(async (value) => {
|
||||
for (let projectType of allProjectTypes) {
|
||||
if (value.cardId === projectType.id) {
|
||||
void vscode.env.openExternal(vscode.Uri.parse(projectType.linkLocation!));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.register(projectTypeRadioCardGroup.onSelectionChanged((e) => {
|
||||
this.model.projectTypeId = e.cardId;
|
||||
const selectedProject = allProjectTypes.find(p => p.id === e.cardId);
|
||||
|
||||
@@ -148,30 +155,12 @@ export class NewProjectDialog extends DialogBase {
|
||||
targetPlatformDropdown.values = selectedProject?.targetPlatforms;
|
||||
targetPlatformDropdown.value = this.getDefaultTargetPlatform(selectedProject);
|
||||
|
||||
this.formBuilder?.insertFormItem(this.targetPlatformDropdownFormComponent!, 3);
|
||||
this.formBuilder?.addFormItem(this.targetPlatformDropdownFormComponent!);
|
||||
} else {
|
||||
// remove the target version dropdown if the selected project type didn't provide values for this
|
||||
this.formBuilder?.removeFormItem(this.targetPlatformDropdownFormComponent!);
|
||||
this.model.targetPlatform = undefined;
|
||||
}
|
||||
|
||||
if (selectedProject?.sdkStyleOption) {
|
||||
sdkProjectCheckbox.checked = true;
|
||||
this.model.sdkStyleProject = true;
|
||||
|
||||
if (selectedProject.sdkStyleLearnMoreUrl) {
|
||||
await sdkLearnMore.updateProperty('url', selectedProject.sdkStyleLearnMoreUrl);
|
||||
sdkFormComponentGroup.addItem(sdkLearnMore);
|
||||
} else {
|
||||
// remove learn more link if the project type didn't provide it
|
||||
sdkFormComponentGroup.removeItem(sdkLearnMore);
|
||||
}
|
||||
|
||||
this.formBuilder?.addFormItem(this.sdkProjectCheckboxFormComponent!);
|
||||
} else {
|
||||
this.model.sdkStyleProject = false;
|
||||
this.formBuilder?.removeFormItem(this.sdkProjectCheckboxFormComponent!);
|
||||
}
|
||||
}));
|
||||
|
||||
const projectNameTextBox = view.modelBuilder.inputBox().withProps({
|
||||
@@ -238,34 +227,6 @@ export class NewProjectDialog extends DialogBase {
|
||||
component: targetPlatformDropdown
|
||||
};
|
||||
|
||||
const sdkProjectCheckbox = view.modelBuilder.checkBox().withProps({
|
||||
checked: true,
|
||||
label: constants.SdkStyleProject
|
||||
}).component();
|
||||
|
||||
this.register(sdkProjectCheckbox.onChanged(() => {
|
||||
this.model.sdkStyleProject = sdkProjectCheckbox.checked;
|
||||
}));
|
||||
|
||||
const sdkLearnMore = view.modelBuilder.hyperlink().withProps({
|
||||
label: constants.LearnMore,
|
||||
url: ''
|
||||
}).component();
|
||||
|
||||
const sdkFormComponentGroup = view.modelBuilder.flexContainer()
|
||||
.withLayout({ flexFlow: 'row', alignItems: 'baseline' })
|
||||
.withItems([sdkProjectCheckbox], { CSSStyles: { flex: '0 0 auto', 'margin-right': '10px' } })
|
||||
.component();
|
||||
|
||||
if (allProjectTypes[0].sdkStyleLearnMoreUrl) {
|
||||
await sdkLearnMore.updateProperty('url', allProjectTypes[0].sdkStyleLearnMoreUrl);
|
||||
sdkFormComponentGroup.addItem(sdkLearnMore);
|
||||
}
|
||||
|
||||
this.sdkProjectCheckboxFormComponent = {
|
||||
component: sdkFormComponentGroup,
|
||||
};
|
||||
|
||||
this.formBuilder = view.modelBuilder.formContainer().withFormItems([
|
||||
{
|
||||
title: constants.TypeTitle,
|
||||
@@ -289,11 +250,6 @@ export class NewProjectDialog extends DialogBase {
|
||||
this.formBuilder.addFormItem(this.targetPlatformDropdownFormComponent);
|
||||
}
|
||||
|
||||
// add sdk style checkbox is the first project has the option
|
||||
if (allProjectTypes[0].sdkStyleOption) {
|
||||
this.formBuilder.addFormItem(this.sdkProjectCheckboxFormComponent);
|
||||
}
|
||||
|
||||
await view.initializeModel(this.formBuilder.component());
|
||||
this.initDialogComplete?.resolve();
|
||||
}
|
||||
|
||||
@@ -19,12 +19,8 @@ export async function createNewProjectWithQuickpick(workspaceService: WorkspaceS
|
||||
return {
|
||||
label: projType.displayName,
|
||||
description: projType.description,
|
||||
id: projType.id,
|
||||
targetPlatforms: projType.targetPlatforms,
|
||||
defaultTargetPlatform: projType.defaultTargetPlatform,
|
||||
sdkOption: projType.sdkStyleOption,
|
||||
sdkLearnMoreUrl: projType.sdkStyleLearnMoreUrl
|
||||
} as vscode.QuickPickItem & { id: string, sdkOption?: boolean, targetPlatforms?: string[], defaultTargetPlatform?: string, sdkLearnMoreUrl?: string };
|
||||
id: projType.id
|
||||
} as vscode.QuickPickItem & { id: string };
|
||||
});
|
||||
|
||||
// 1. Prompt for project type
|
||||
@@ -91,79 +87,5 @@ export async function createNewProjectWithQuickpick(workspaceService: WorkspaceS
|
||||
continue;
|
||||
}
|
||||
|
||||
let targetPlatform;
|
||||
if (projectType.targetPlatforms) {
|
||||
// 4. Target platform of the project
|
||||
let targetPlatforms: vscode.QuickPickItem[] = projectType.targetPlatforms.map(targetPlatform => { return { label: targetPlatform }; });
|
||||
|
||||
if (projectType.defaultTargetPlatform) {
|
||||
// move the default target platform to be the first one in the list
|
||||
const defaultIndex = targetPlatforms.findIndex(i => i.label === projectType.defaultTargetPlatform);
|
||||
if (defaultIndex > -1) {
|
||||
targetPlatforms.splice(defaultIndex, 1);
|
||||
}
|
||||
|
||||
// add default next to the default target platform
|
||||
targetPlatforms.unshift({ label: projectType.defaultTargetPlatform, description: constants.Default });
|
||||
}
|
||||
|
||||
const selectedTargetPlatform = await vscode.window.showQuickPick(targetPlatforms, { title: constants.SelectTargetPlatform, ignoreFocusOut: true });
|
||||
if (!selectedTargetPlatform) {
|
||||
// User cancelled
|
||||
return;
|
||||
}
|
||||
|
||||
targetPlatform = selectedTargetPlatform.label;
|
||||
}
|
||||
|
||||
let sdkStyle;
|
||||
if (projectType.sdkOption) {
|
||||
// 5. SDK-style project or not
|
||||
const sdkLearnMoreButton: vscode.QuickInputButton = {
|
||||
iconPath: new vscode.ThemeIcon('link-external'),
|
||||
tooltip: constants.LearnMore
|
||||
};
|
||||
const quickPick = vscode.window.createQuickPick();
|
||||
quickPick.items = [{ label: constants.YesRecommended }, { label: constants.No }];
|
||||
quickPick.title = constants.SdkStyleProject;
|
||||
quickPick.ignoreFocusOut = true;
|
||||
const disposables: vscode.Disposable[] = [];
|
||||
|
||||
try {
|
||||
if (projectType.sdkLearnMoreUrl) {
|
||||
// add button to open sdkLearnMoreUrl if it was provided
|
||||
quickPick.buttons = [sdkLearnMoreButton];
|
||||
quickPick.placeholder = constants.SdkLearnMorePlaceholder;
|
||||
}
|
||||
|
||||
let sdkStylePromise = new Promise<boolean | undefined>((resolve) => {
|
||||
disposables.push(
|
||||
quickPick.onDidHide(() => {
|
||||
resolve(undefined);
|
||||
}),
|
||||
quickPick.onDidChangeSelection((item) => {
|
||||
resolve(item[0].label === constants.YesRecommended);
|
||||
}));
|
||||
|
||||
if (projectType.sdkLearnMoreUrl) {
|
||||
disposables.push(quickPick.onDidTriggerButton(async () => {
|
||||
await vscode.env.openExternal(vscode.Uri.parse(projectType.sdkLearnMoreUrl!));
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
quickPick.show();
|
||||
sdkStyle = await sdkStylePromise;
|
||||
quickPick.hide();
|
||||
} finally {
|
||||
disposables.forEach(d => d.dispose());
|
||||
}
|
||||
|
||||
if (sdkStyle === undefined) {
|
||||
// User cancelled
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await workspaceService.createProject(projectName, vscode.Uri.file(projectLocation), projectType.id, targetPlatform, sdkStyle);
|
||||
await workspaceService.createProject(projectName, vscode.Uri.file(projectLocation), projectType.id, undefined);
|
||||
}
|
||||
|
||||
@@ -169,12 +169,10 @@ export class ProjectDashboard {
|
||||
.component();
|
||||
header.addItem(locationLabel, { CSSStyles: { 'padding-left': '34px', 'padding-top': '15px', 'padding-bottom': '50px', 'font-size': '16px' } });
|
||||
|
||||
const backgroundImage = this.projectProvider!.image; // background image added at the bottom right of the header
|
||||
// Files need to have the vscode-file scheme to be loaded by ADS
|
||||
const backgroundUri = vscode.Uri.file(backgroundImage!.light.toString()).with({ scheme: 'vscode-file' });
|
||||
const image = this.projectProvider!.image; // background image added at the bottom right of the header
|
||||
headerContainer.addItem(header, {
|
||||
CSSStyles: {
|
||||
'background-image': `url(${backgroundUri})`,
|
||||
'background-image': `url(${vscode.Uri.file(image!.light.toString())})`,
|
||||
'background-repeat': 'no-repeat',
|
||||
'background-position': '85% bottom',
|
||||
'background-size': '10%',
|
||||
|
||||
@@ -168,13 +168,6 @@ export class WorkspaceService implements IWorkspaceService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire event to refresh projects tree
|
||||
*/
|
||||
public refreshProjectsTree(): void {
|
||||
this._onDidWorkspaceProjectsChange.fire();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all the supported projects in the folder
|
||||
* @param folder folder to look look for projects
|
||||
@@ -204,10 +197,10 @@ export class WorkspaceService implements IWorkspaceService {
|
||||
return ProjectProviderRegistry.getProviderByProjectExtension(projectType);
|
||||
}
|
||||
|
||||
async createProject(name: string, location: vscode.Uri, projectTypeId: string, projectTargetVersion?: string, sdkStyleProject?: boolean): Promise<vscode.Uri> {
|
||||
async createProject(name: string, location: vscode.Uri, projectTypeId: string, projectTargetVersion?: string): Promise<vscode.Uri> {
|
||||
const provider = ProjectProviderRegistry.getProviderByProjectType(projectTypeId);
|
||||
if (provider) {
|
||||
const projectFile = await provider.createProject(name, location, projectTypeId, projectTargetVersion, sdkStyleProject);
|
||||
const projectFile = await provider.createProject(name, location, projectTypeId, projectTargetVersion);
|
||||
await this.addProjectsToWorkspace([projectFile]);
|
||||
this._onDidWorkspaceProjectsChange.fire();
|
||||
return projectFile;
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
integrity sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
|
||||
@@ -50,9 +50,9 @@ delayed-stream@~1.0.0:
|
||||
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
|
||||
|
||||
follow-redirects@^1.14.0:
|
||||
version "1.14.8"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc"
|
||||
integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==
|
||||
version "1.14.7"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
|
||||
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==
|
||||
|
||||
form-data@^3.0.0:
|
||||
version "3.0.0"
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
"dependencies": {
|
||||
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#0.3.0",
|
||||
"htmlparser2": "^3.10.1",
|
||||
"@microsoft/ads-service-downloader": "0.2.4",
|
||||
"@microsoft/ads-service-downloader": "0.2.3",
|
||||
"vscode-extension-telemetry": "0.4.2",
|
||||
"vscode-nls": "^3.2.1"
|
||||
},
|
||||
|
||||
@@ -182,16 +182,16 @@
|
||||
resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd"
|
||||
integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==
|
||||
|
||||
"@microsoft/ads-service-downloader@0.2.4":
|
||||
version "0.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-0.2.4.tgz#905a11eb2da19673629852d9764fb9fb94ad81bd"
|
||||
integrity sha512-3J0YjH29a5pP+5Yu0HF7itRBZpNOgUN34Gh/p0Py/TQr7qUzZSXwOM+fWD1nCea+q9t8mfHr0yuy0aeDX+33vQ==
|
||||
"@microsoft/ads-service-downloader@0.2.3":
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-0.2.3.tgz#5987c1fc291d2019915e434263ccfe2223d27d5c"
|
||||
integrity sha512-c8vvBeV0pdLUzATjoj0PlGTH3UwN3tsnT3gA6Uo+H3ZaOfkULhDrv1hG+2jJ8kA7oq+HfTHWEIR6tSnaFk2G/w==
|
||||
dependencies:
|
||||
async-retry "^1.2.3"
|
||||
eventemitter2 "^5.0.1"
|
||||
http-proxy-agent "^2.1.0"
|
||||
https-proxy-agent "^2.2.3"
|
||||
mkdirp "1.0.4"
|
||||
mkdirp "^0.5.1"
|
||||
tar "^6.1.11"
|
||||
tmp "^0.0.33"
|
||||
yauzl "^2.10.0"
|
||||
@@ -284,9 +284,9 @@ agent-base@^4.3.0:
|
||||
es6-promisify "^5.0.0"
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
@@ -788,18 +788,13 @@ minizlib@^2.1.1:
|
||||
minipass "^3.0.0"
|
||||
yallist "^4.0.0"
|
||||
|
||||
mkdirp@0.5.1:
|
||||
mkdirp@0.5.1, mkdirp@^0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||
integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
|
||||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
mkdirp@1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
|
||||
mkdirp@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.3.tgz#4cf2e30ad45959dddea53ad97d518b6c8205e1ea"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import 'mocha';
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as utils from './utils';
|
||||
import * as uuid from './uuid';
|
||||
import assert = require('assert');
|
||||
|
||||
@@ -9,7 +9,7 @@ import * as utils from './utils';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as vscode from 'vscode';
|
||||
import { getStandaloneServer } from './testConfig';
|
||||
import * as assert from 'assert';
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'mocha';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as utils from './utils';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../mssql';
|
||||
import * as os from 'os';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||
/// <reference path='../../../../src/sql/azdata.test.d.ts'/>
|
||||
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||
/// <reference types='@types/node'/>
|
||||
|
||||
@@ -262,9 +262,9 @@ ajv@^6.5.5:
|
||||
uri-js "^4.2.2"
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
@@ -953,9 +953,9 @@ mocha@^5.2.0:
|
||||
supports-color "5.4.0"
|
||||
|
||||
moment@^2.21.0, moment@^2.22.2:
|
||||
version "2.29.2"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.2.tgz#00910c60b20843bcba52d37d58c628b47b1f20e4"
|
||||
integrity sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==
|
||||
version "2.24.0"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
|
||||
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
|
||||
|
||||
ms-rest-azure@^2.5.5:
|
||||
version "2.6.0"
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.2.2",
|
||||
"figures": "^2.0.0",
|
||||
"find-remove": "1.2.1",
|
||||
"@microsoft/ads-service-downloader": "0.2.4",
|
||||
"@microsoft/ads-service-downloader": "0.2.3",
|
||||
"vscode-extension-telemetry": "0.4.2",
|
||||
"vscode-languageclient": "5.2.1",
|
||||
"vscode-nls": "^4.0.0"
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@microsoft/ads-service-downloader@0.2.4":
|
||||
version "0.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-0.2.4.tgz#905a11eb2da19673629852d9764fb9fb94ad81bd"
|
||||
integrity sha512-3J0YjH29a5pP+5Yu0HF7itRBZpNOgUN34Gh/p0Py/TQr7qUzZSXwOM+fWD1nCea+q9t8mfHr0yuy0aeDX+33vQ==
|
||||
"@microsoft/ads-service-downloader@0.2.3":
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/@microsoft/ads-service-downloader/-/ads-service-downloader-0.2.3.tgz#5987c1fc291d2019915e434263ccfe2223d27d5c"
|
||||
integrity sha512-c8vvBeV0pdLUzATjoj0PlGTH3UwN3tsnT3gA6Uo+H3ZaOfkULhDrv1hG+2jJ8kA7oq+HfTHWEIR6tSnaFk2G/w==
|
||||
dependencies:
|
||||
async-retry "^1.2.3"
|
||||
eventemitter2 "^5.0.1"
|
||||
http-proxy-agent "^2.1.0"
|
||||
https-proxy-agent "^2.2.3"
|
||||
mkdirp "1.0.4"
|
||||
mkdirp "^0.5.1"
|
||||
tar "^6.1.11"
|
||||
tmp "^0.0.33"
|
||||
yauzl "^2.10.0"
|
||||
@@ -262,6 +262,11 @@ minimatch@^3.0.4:
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
minimist@^1.2.5:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||
|
||||
minipass@^3.0.0:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd"
|
||||
@@ -277,7 +282,14 @@ minizlib@^2.1.1:
|
||||
minipass "^3.0.0"
|
||||
yallist "^4.0.0"
|
||||
|
||||
mkdirp@1.0.4, mkdirp@^1.0.3:
|
||||
mkdirp@^0.5.1:
|
||||
version "0.5.5"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
|
||||
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
|
||||
dependencies:
|
||||
minimist "^1.2.5"
|
||||
|
||||
mkdirp@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"devDependencies": {
|
||||
"@types/node": "^12.11.7",
|
||||
"ts-loader": "^5.3.3",
|
||||
"tslint": "^5.12.1",
|
||||
"typescript": "^3.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -35,11 +35,13 @@ export class HostSessionManager {
|
||||
const queryProvider = new QueryProvider(true);
|
||||
queryProvider.initialize(true, sharedService);
|
||||
|
||||
/* tslint:disable:no-unused-expression */
|
||||
new StatusProvider(
|
||||
isHost,
|
||||
vslsApi,
|
||||
connectionProvider,
|
||||
sharedService);
|
||||
/* tslint:enable:no-unused-expression */
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,10 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* tslint:disable:no-unused-expression */
|
||||
new HostSessionManager(context, vslsApi);
|
||||
new GuestSessionManager(context, vslsApi);
|
||||
/* tslint:enable:no-unused-expression */
|
||||
}
|
||||
|
||||
export function deactivate(): void {
|
||||
|
||||
@@ -2,6 +2,22 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@babel/code-frame@^7.0.0":
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8"
|
||||
integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==
|
||||
dependencies:
|
||||
"@babel/highlight" "^7.0.0"
|
||||
|
||||
"@babel/highlight@^7.0.0":
|
||||
version "7.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540"
|
||||
integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==
|
||||
dependencies:
|
||||
chalk "^2.0.0"
|
||||
esutils "^2.0.2"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@types/node@^12.11.7":
|
||||
version "12.12.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.7.tgz#01e4ea724d9e3bd50d90c11fd5980ba317d8fa11"
|
||||
@@ -14,6 +30,13 @@ ansi-styles@^3.2.1:
|
||||
dependencies:
|
||||
color-convert "^1.9.0"
|
||||
|
||||
argparse@^1.0.7:
|
||||
version "1.0.10"
|
||||
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
||||
integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
|
||||
dependencies:
|
||||
sprintf-js "~1.0.2"
|
||||
|
||||
arr-diff@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
|
||||
@@ -44,6 +67,11 @@ atob@^2.1.1:
|
||||
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
|
||||
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
||||
|
||||
base@^0.11.1:
|
||||
version "0.11.2"
|
||||
resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
|
||||
@@ -62,6 +90,14 @@ big.js@^5.2.2:
|
||||
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
|
||||
integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
braces@^2.3.1:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
|
||||
@@ -78,6 +114,11 @@ braces@^2.3.1:
|
||||
split-string "^3.0.2"
|
||||
to-regex "^3.0.1"
|
||||
|
||||
builtin-modules@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
|
||||
integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=
|
||||
|
||||
cache-base@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
|
||||
@@ -93,7 +134,7 @@ cache-base@^1.0.1:
|
||||
union-value "^1.0.0"
|
||||
unset-value "^1.0.0"
|
||||
|
||||
chalk@^2.3.0:
|
||||
chalk@^2.0.0, chalk@^2.3.0:
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
|
||||
@@ -132,11 +173,21 @@ color-name@1.1.3:
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
||||
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
|
||||
|
||||
commander@^2.12.1:
|
||||
version "2.20.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
|
||||
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
|
||||
|
||||
component-emitter@^1.2.1:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
|
||||
integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
||||
|
||||
copy-descriptor@^0.1.0:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
|
||||
@@ -187,6 +238,11 @@ define-property@^2.0.2:
|
||||
is-descriptor "^1.0.2"
|
||||
isobject "^3.0.1"
|
||||
|
||||
diff@^3.2.0:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
|
||||
integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==
|
||||
|
||||
emojis-list@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
|
||||
@@ -213,6 +269,16 @@ escape-string-regexp@^1.0.5:
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||
|
||||
esprima@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
|
||||
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
|
||||
|
||||
esutils@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
|
||||
integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=
|
||||
|
||||
expand-brackets@^2.1.4:
|
||||
version "2.1.4"
|
||||
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
|
||||
@@ -277,11 +343,28 @@ fragment-cache@^0.2.1:
|
||||
dependencies:
|
||||
map-cache "^0.2.2"
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
|
||||
|
||||
get-value@^2.0.3, get-value@^2.0.6:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
|
||||
integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=
|
||||
|
||||
glob@^7.1.1:
|
||||
version "7.1.4"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
|
||||
integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.4"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
graceful-fs@^4.1.2:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b"
|
||||
@@ -323,7 +406,15 @@ has-values@^1.0.0:
|
||||
is-number "^3.0.0"
|
||||
kind-of "^4.0.0"
|
||||
|
||||
inherits@~2.0.3:
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2, inherits@~2.0.3:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
@@ -427,6 +518,19 @@ isobject@^3.0.0, isobject@^3.0.1:
|
||||
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
|
||||
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
|
||||
|
||||
js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
|
||||
js-yaml@^3.13.1:
|
||||
version "3.13.1"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
|
||||
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
|
||||
dependencies:
|
||||
argparse "^1.0.7"
|
||||
esprima "^4.0.0"
|
||||
|
||||
json5@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
|
||||
@@ -506,10 +610,22 @@ micromatch@^3.1.4:
|
||||
snapdragon "^0.8.1"
|
||||
to-regex "^3.0.2"
|
||||
|
||||
minimatch@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
minimist@0.0.8:
|
||||
version "0.0.8"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
|
||||
integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
|
||||
|
||||
minimist@^1.2.0:
|
||||
version "1.2.6"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
|
||||
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
|
||||
|
||||
mixin-deep@^1.2.0:
|
||||
version "1.3.2"
|
||||
@@ -519,6 +635,13 @@ mixin-deep@^1.2.0:
|
||||
for-in "^1.0.2"
|
||||
is-extendable "^1.0.1"
|
||||
|
||||
mkdirp@^0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||
integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
|
||||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
ms@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
@@ -564,11 +687,28 @@ object.pick@^1.3.0:
|
||||
dependencies:
|
||||
isobject "^3.0.1"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
pascalcase@^0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
|
||||
integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
|
||||
|
||||
path-parse@^1.0.6:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
|
||||
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
|
||||
|
||||
posix-character-classes@^0.1.0:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
|
||||
@@ -620,6 +760,13 @@ resolve-url@^0.2.1:
|
||||
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
|
||||
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
|
||||
|
||||
resolve@^1.3.2:
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e"
|
||||
integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==
|
||||
dependencies:
|
||||
path-parse "^1.0.6"
|
||||
|
||||
ret@~0.1.10:
|
||||
version "0.1.15"
|
||||
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
||||
@@ -637,7 +784,7 @@ safe-regex@^1.1.0:
|
||||
dependencies:
|
||||
ret "~0.1.10"
|
||||
|
||||
semver@^5.0.1:
|
||||
semver@^5.0.1, semver@^5.3.0:
|
||||
version "5.7.0"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
|
||||
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
|
||||
@@ -710,6 +857,11 @@ split-string@^3.0.1, split-string@^3.0.2:
|
||||
dependencies:
|
||||
extend-shallow "^3.0.0"
|
||||
|
||||
sprintf-js@~1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
|
||||
|
||||
static-extend@^0.1.1:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
|
||||
@@ -773,6 +925,37 @@ ts-loader@^5.3.3:
|
||||
micromatch "^3.1.4"
|
||||
semver "^5.0.1"
|
||||
|
||||
tslib@^1.8.0, tslib@^1.8.1:
|
||||
version "1.10.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
|
||||
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
|
||||
|
||||
tslint@^5.12.1:
|
||||
version "5.18.0"
|
||||
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.18.0.tgz#f61a6ddcf372344ac5e41708095bbf043a147ac6"
|
||||
integrity sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.0.0"
|
||||
builtin-modules "^1.1.1"
|
||||
chalk "^2.3.0"
|
||||
commander "^2.12.1"
|
||||
diff "^3.2.0"
|
||||
glob "^7.1.1"
|
||||
js-yaml "^3.13.1"
|
||||
minimatch "^3.0.4"
|
||||
mkdirp "^0.5.1"
|
||||
resolve "^1.3.2"
|
||||
semver "^5.3.0"
|
||||
tslib "^1.8.0"
|
||||
tsutils "^2.29.0"
|
||||
|
||||
tsutils@^2.29.0:
|
||||
version "2.29.0"
|
||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
|
||||
integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==
|
||||
dependencies:
|
||||
tslib "^1.8.1"
|
||||
|
||||
typescript@^3.3.1:
|
||||
version "3.5.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
|
||||
@@ -840,3 +1023,8 @@ vsls@^0.3.1291:
|
||||
version "0.3.1291"
|
||||
resolved "https://registry.yarnpkg.com/vsls/-/vsls-0.3.1291.tgz#55928c363b24d39a5d03d8e946ba85d7dcec3e38"
|
||||
integrity sha512-8yJPN9p7k+XYyczOVtQmpun4K1CRDsw/hdnIzT/c40r5bIkpptfsBlHmmLemoIV+CAHvrTLdWKEf5OtRvdcn9A==
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../mssql';
|
||||
import { ApiWrapper } from '../common/apiWrapper';
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'mocha';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import { createContext } from './utils';
|
||||
import { LanguageController } from '../../../views/externalLanguages/languageController';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../../../mssql';
|
||||
|
||||
describe('External Languages Controller', () => {
|
||||
it('Should open dialog for manage languages successfully ', async function (): Promise<void> {
|
||||
@@ -21,7 +21,7 @@ describe('External Languages Controller', () => {
|
||||
|
||||
it('Should list languages successfully ', async function (): Promise<void> {
|
||||
let testContext = createContext();
|
||||
let languages: mssql.ExternalLanguage[] = [{
|
||||
let languages: mssql.ExternalLanguage[] = [{
|
||||
name: '',
|
||||
contents: [{
|
||||
extensionFileName: '',
|
||||
@@ -30,7 +30,7 @@ describe('External Languages Controller', () => {
|
||||
}]
|
||||
}];
|
||||
|
||||
testContext.dialogModel.setup(x => x.getLanguageList()).returns(() => Promise.resolve(languages));
|
||||
testContext.dialogModel.setup( x=> x.getLanguageList()).returns(() => Promise.resolve(languages));
|
||||
let controller = new LanguageController(testContext.apiWrapper.object, '', testContext.dialogModel.object);
|
||||
let dialog = await controller.manageLanguages();
|
||||
let actual = await dialog.listLanguages();
|
||||
@@ -48,7 +48,7 @@ describe('External Languages Controller', () => {
|
||||
}]
|
||||
};
|
||||
|
||||
testContext.dialogModel.setup(x => x.updateLanguage(language)).returns(() => Promise.resolve());
|
||||
testContext.dialogModel.setup( x=> x.updateLanguage(language)).returns(() => Promise.resolve());
|
||||
let controller = new LanguageController(testContext.apiWrapper.object, '', testContext.dialogModel.object);
|
||||
let dialog = await controller.manageLanguages();
|
||||
await dialog.updateLanguage({
|
||||
@@ -70,7 +70,7 @@ describe('External Languages Controller', () => {
|
||||
}]
|
||||
};
|
||||
|
||||
testContext.dialogModel.setup(x => x.deleteLanguage(language.name)).returns(() => Promise.resolve());
|
||||
testContext.dialogModel.setup( x=> x.deleteLanguage(language.name)).returns(() => Promise.resolve());
|
||||
let controller = new LanguageController(testContext.apiWrapper.object, '', testContext.dialogModel.object);
|
||||
let dialog = await controller.manageLanguages();
|
||||
await dialog.deleteLanguage({
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
import * as should from 'should';
|
||||
import 'mocha';
|
||||
import { createContext } from './utils';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../../../mssql';
|
||||
import { LanguageService } from '../../../externalLanguage/languageService';
|
||||
|
||||
describe('External Languages Dialog Model', () => {
|
||||
it('Should list languages successfully ', async function (): Promise<void> {
|
||||
let testContext = createContext();
|
||||
let languages: mssql.ExternalLanguage[] = [{
|
||||
let languages: mssql.ExternalLanguage[] = [{
|
||||
name: '',
|
||||
contents: [{
|
||||
extensionFileName: '',
|
||||
@@ -20,7 +20,7 @@ describe('External Languages Dialog Model', () => {
|
||||
pathToExtension: '',
|
||||
}]
|
||||
}];
|
||||
testContext.languageExtensionService.listLanguages = () => { return Promise.resolve(languages); };
|
||||
testContext.languageExtensionService.listLanguages = () => {return Promise.resolve(languages);};
|
||||
let model = new LanguageService(testContext.apiWrapper.object, testContext.languageExtensionService);
|
||||
await model.load();
|
||||
let actual = await model.getLanguageList();
|
||||
@@ -29,7 +29,7 @@ describe('External Languages Dialog Model', () => {
|
||||
|
||||
it('Should update language successfully ', async function (): Promise<void> {
|
||||
let testContext = createContext();
|
||||
let language: mssql.ExternalLanguage = {
|
||||
let language: mssql.ExternalLanguage = {
|
||||
name: '',
|
||||
contents: [{
|
||||
extensionFileName: '',
|
||||
@@ -45,7 +45,7 @@ describe('External Languages Dialog Model', () => {
|
||||
|
||||
it('Should delete language successfully ', async function (): Promise<void> {
|
||||
let testContext = createContext();
|
||||
let language: mssql.ExternalLanguage = {
|
||||
let language: mssql.ExternalLanguage = {
|
||||
name: '',
|
||||
contents: [{
|
||||
extensionFileName: '',
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
||||
import * as TypeMoq from 'typemoq';
|
||||
import { ApiWrapper } from '../../../common/apiWrapper';
|
||||
import { LanguageViewBase } from '../../../views/externalLanguages/languageViewBase';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../../../mssql';
|
||||
import { LanguageService } from '../../../externalLanguage/languageService';
|
||||
import { createViewContext } from '../utils';
|
||||
|
||||
|
||||
@@ -8,5 +8,4 @@
|
||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||
/// <reference path='../../../azurecore/src/azurecore.d.ts'/>
|
||||
/// <reference path='../../../azurecore/src/azureResource/azure-resource.d.ts'/>
|
||||
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||
/// <reference types='@types/node'/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../../mssql';
|
||||
import { LanguageViewBase } from './languageViewBase';
|
||||
import * as constants from '../../common/constants';
|
||||
import { ApiWrapper } from '../../common/apiWrapper';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../../mssql';
|
||||
import { ApiWrapper } from '../../common/apiWrapper';
|
||||
import { LanguageService } from '../../externalLanguage/languageService';
|
||||
import { LanguagesDialog } from './languagesDialog';
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as constants from '../../common/constants';
|
||||
import { ApiWrapper } from '../../common/apiWrapper';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../../mssql';
|
||||
import * as path from 'path';
|
||||
|
||||
export interface LanguageUpdateModel {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as constants from '../../common/constants';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../../../../mssql';
|
||||
import { LanguageViewBase } from './languageViewBase';
|
||||
import { ApiWrapper } from '../../common/apiWrapper';
|
||||
|
||||
|
||||
@@ -38,11 +38,10 @@ export class DashboardWidget {
|
||||
}).component();
|
||||
const header = await this.createHeader(view);
|
||||
const footerContainer = this.createFooter(view);
|
||||
const backgroundImageUri = vscode.Uri.file(this.asAbsolutePath('images/background.svg')).with({ scheme: 'vscode-file' });
|
||||
container.addItem(header, {
|
||||
CSSStyles: {
|
||||
'background-image': `
|
||||
url(${backgroundImageUri}),
|
||||
url(${vscode.Uri.file(this.asAbsolutePath('images/background.svg'))}),
|
||||
linear-gradient(0deg, rgba(0,0,0,0.09) 0%, rgba(0,0,0,0) 100%)
|
||||
`,
|
||||
'background-repeat': 'no-repeat',
|
||||
@@ -301,11 +300,9 @@ export class DashboardWidget {
|
||||
await this._apiWrapper.openExternal(vscode.Uri.parse(linkMetaData.link));
|
||||
}
|
||||
});
|
||||
// Files need to have the vscode-file scheme to be loaded by ADS
|
||||
const imageUri = vscode.Uri.file(this.asAbsolutePath(linkMetaData.iconPath?.light as string || '')).with({ scheme: 'vscode-file' });
|
||||
videosContainer.addItem(video1Container, {
|
||||
CSSStyles: {
|
||||
'background-image': `url(${imageUri})`,
|
||||
'background-image': `url(${vscode.Uri.file(this.asAbsolutePath(linkMetaData.iconPath?.light as string || ''))})`,
|
||||
'background-repeat': 'no-repeat',
|
||||
'background-position': 'top',
|
||||
'width': `${maxWidth}px`,
|
||||
|
||||
@@ -298,9 +298,9 @@ ajv@^6.5.5:
|
||||
uri-js "^4.2.2"
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
|
||||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
||||
"version": "3.0.0-release.238",
|
||||
"version": "3.0.0-release.207",
|
||||
"downloadFileNames": {
|
||||
"Windows_86": "win-x86-net6.0.zip",
|
||||
"Windows_64": "win-x64-net6.0.zip",
|
||||
|
||||
@@ -514,14 +514,14 @@
|
||||
{
|
||||
"command": "mssql.designTable",
|
||||
"when": "connectionProvider == MSSQL && nodeType == Table && config.workbench.enablePreviewFeatures",
|
||||
"group": "connection@3"
|
||||
"group":"connection@3"
|
||||
},
|
||||
{
|
||||
"command": "mssql.newTable",
|
||||
"when": "connectionProvider == MSSQL && nodeType == Folder && nodeLabel == Tables && config.workbench.enablePreviewFeatures",
|
||||
"group": "connection@1"
|
||||
"group":"connection@1"
|
||||
}
|
||||
],
|
||||
],
|
||||
"notebook/toolbar": [
|
||||
{
|
||||
"command": "mssql.exportNotebookToSql",
|
||||
@@ -759,9 +759,6 @@
|
||||
"connectionProvider": {
|
||||
"providerId": "MSSQL",
|
||||
"displayName": "%mssql.provider.displayName%",
|
||||
"supportedExecutionPlanFileExtensions": [
|
||||
"sqlplan"
|
||||
],
|
||||
"iconPath": [
|
||||
{
|
||||
"id": "mssql:cloud",
|
||||
@@ -1314,7 +1311,7 @@
|
||||
"find-remove": "1.2.1",
|
||||
"request": "^2.88.0",
|
||||
"request-light": "^0.3.0",
|
||||
"@microsoft/ads-service-downloader": "0.2.4",
|
||||
"@microsoft/ads-service-downloader": "0.2.3",
|
||||
"stream-meter": "^1.0.4",
|
||||
"through2": "^3.0.1",
|
||||
"tough-cookie": "^3.0.1",
|
||||
|
||||
@@ -9,7 +9,7 @@ import * as contracts from '../contracts';
|
||||
import { AppContext } from '../appContext';
|
||||
import { ConnectParams, ClientCapabilities } from 'dataprotocol-client/lib/protocol';
|
||||
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
||||
import { ListRegisteredServersResult, ICmsService } from 'mssql';
|
||||
import { ListRegisteredServersResult, ICmsService } from '../mssql';
|
||||
import * as Utils from '../utils';
|
||||
|
||||
export class CmsService implements ICmsService {
|
||||
|
||||
@@ -65,6 +65,10 @@ export enum MssqlClusterItemsSubType {
|
||||
Spark = ':spark:'
|
||||
}
|
||||
|
||||
export enum TableType {
|
||||
Basic = 'basic'
|
||||
}
|
||||
|
||||
// SPARK JOB SUBMISSION //////////////////////////////////////////////////////////
|
||||
export const mssqlClusterNewNotebookTask = 'mssqlCluster.task.newNotebook';
|
||||
export const mssqlClusterOpenNotebookTask = 'mssqlCluster.task.openNotebook';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { NotificationType, RequestType } from 'vscode-languageclient';
|
||||
import { ITelemetryEventProperties, ITelemetryEventMeasures } from './telemetry';
|
||||
import * as azdata from 'azdata';
|
||||
import { ConnectParams } from 'dataprotocol-client/lib/protocol';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from './mssql';
|
||||
|
||||
// ------------------------------- < Telemetry Sent Event > ------------------------------------
|
||||
|
||||
@@ -679,6 +679,10 @@ export namespace SchemaCompareGenerateScriptRequest {
|
||||
export const type = new RequestType<SchemaCompareGenerateScriptParams, azdata.ResultStatus, void, void>('schemaCompare/generateScript');
|
||||
}
|
||||
|
||||
export namespace SchemaComparePublishChangesRequest {
|
||||
export const type = new RequestType<SchemaComparePublishDatabaseChangesParams, azdata.ResultStatus, void, void>('schemaCompare/publish');
|
||||
}
|
||||
|
||||
export namespace SchemaComparePublishDatabaseChangesRequest {
|
||||
export const type = new RequestType<SchemaComparePublishDatabaseChangesParams, azdata.ResultStatus, void, void>('schemaCompare/publishDatabase');
|
||||
}
|
||||
@@ -1092,7 +1096,7 @@ export namespace InitializeTableDesignerRequest {
|
||||
}
|
||||
|
||||
export namespace ProcessTableDesignerEditRequest {
|
||||
export const type = new RequestType<TableDesignerEditRequestParams, azdata.designers.DesignerEditResult<azdata.designers.TableDesignerView>, void, void>('tabledesigner/processedit');
|
||||
export const type = new RequestType<TableDesignerEditRequestParams, azdata.designers.DesignerEditResult, void, void>('tabledesigner/processedit');
|
||||
}
|
||||
|
||||
export namespace PublishTableDesignerChangesRequest {
|
||||
@@ -1104,31 +1108,9 @@ export namespace TableDesignerGenerateScriptRequest {
|
||||
}
|
||||
|
||||
export namespace TableDesignerGenerateChangePreviewReportRequest {
|
||||
export const type = new RequestType<azdata.designers.TableInfo, azdata.designers.GeneratePreviewReportResult, void, void>('tabledesigner/generatepreviewreport');
|
||||
export const type = new RequestType<azdata.designers.TableInfo, string, void, void>('tabledesigner/generatepreviewreport');
|
||||
}
|
||||
export namespace DisposeTableDesignerRequest {
|
||||
export const type = new RequestType<azdata.designers.TableInfo, void, void, void>('tabledesigner/dispose');
|
||||
}
|
||||
// ------------------------------- < Table Designer > ------------------------------------
|
||||
|
||||
|
||||
// ------------------------------- < Execution Plan > ------------------------------------
|
||||
|
||||
export interface GetExecutionPlanParams {
|
||||
graphInfo: azdata.executionPlan.ExecutionPlanGraphInfo,
|
||||
}
|
||||
|
||||
export namespace GetExecutionPlanRequest {
|
||||
export const type = new RequestType<GetExecutionPlanParams, azdata.executionPlan.GetExecutionPlanResult, void, void>('queryExecutionPlan/getExecutionPlan');
|
||||
}
|
||||
|
||||
export interface ExecutionPlanComparisonParams {
|
||||
firstExecutionPlanGraphInfo: azdata.executionPlan.ExecutionPlanGraphInfo;
|
||||
secondExecutionPlanGraphInfo: azdata.executionPlan.ExecutionPlanGraphInfo;
|
||||
}
|
||||
|
||||
export namespace ExecutionPlanComparisonRequest {
|
||||
export const type = new RequestType<ExecutionPlanComparisonParams, azdata.executionPlan.ExecutionPlanComparisonResult, void, void>('queryExecutionPlan/compareExecutionPlanGraph');
|
||||
}
|
||||
|
||||
// ------------------------------- < Execution Plan > ------------------------------------
|
||||
|
||||
@@ -43,20 +43,16 @@ export class SqlCredentialService extends SqlOpsFeature<any> {
|
||||
|
||||
protected override registerProvider(options: any): Disposable {
|
||||
let readCredential = async (credentialId: string): Promise<azdata.Credential> => {
|
||||
if (Utils.isLinux) {
|
||||
const password = await this._secretStorage.get(credentialId);
|
||||
return {
|
||||
credentialId: credentialId,
|
||||
password: password
|
||||
};
|
||||
}
|
||||
return this._client.sendRequest(Contracts.ReadCredentialRequest.type, { credentialId, password: undefined });
|
||||
};
|
||||
|
||||
let saveCredential = async (credentialId: string, password: string): Promise<boolean> => {
|
||||
if (Utils.isLinux) {
|
||||
/**
|
||||
* This is only done for linux because this is going to be
|
||||
* the default credential system for linux in the next release
|
||||
*/
|
||||
await this._secretStorage.store(credentialId, password);
|
||||
return true;
|
||||
}
|
||||
return this._client.sendRequest(Contracts.SaveCredentialRequest.type, { credentialId, password });
|
||||
};
|
||||
@@ -65,7 +61,6 @@ export class SqlCredentialService extends SqlOpsFeature<any> {
|
||||
if (Utils.isLinux) {
|
||||
try {
|
||||
await this._secretStorage.delete(credentialId);
|
||||
return true;
|
||||
} catch (e) {
|
||||
console.log('credential does not exist in native secret store');
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../mssql';
|
||||
import { AppContext } from '../appContext';
|
||||
import { ISqlOpsFeature, SqlOpsDataClient } from 'dataprotocol-client';
|
||||
import { ClientCapabilities } from 'vscode-languageclient';
|
||||
|
||||
@@ -1117,7 +1117,7 @@ export class TableDesignerFeature extends SqlOpsFeature<undefined> {
|
||||
return Promise.reject(e);
|
||||
}
|
||||
};
|
||||
const processTableEdit = (tableInfo: azdata.designers.TableInfo, tableChangeInfo: azdata.designers.DesignerEdit): Thenable<azdata.designers.DesignerEditResult<azdata.designers.TableDesignerView>> => {
|
||||
const processTableEdit = (tableInfo: azdata.designers.TableInfo, tableChangeInfo: azdata.designers.DesignerEdit): Thenable<azdata.designers.DesignerEditResult> => {
|
||||
let params: contracts.TableDesignerEditRequestParams = {
|
||||
tableInfo: tableInfo,
|
||||
tableChangeInfo: tableChangeInfo
|
||||
@@ -1151,7 +1151,7 @@ export class TableDesignerFeature extends SqlOpsFeature<undefined> {
|
||||
}
|
||||
};
|
||||
|
||||
const generatePreviewReport = (tableInfo: azdata.designers.TableInfo): Thenable<azdata.designers.GeneratePreviewReportResult> => {
|
||||
const generatePreviewReport = (tableInfo: azdata.designers.TableInfo): Thenable<string> => {
|
||||
try {
|
||||
return client.sendRequest(contracts.TableDesignerGenerateChangePreviewReportRequest.type, tableInfo);
|
||||
}
|
||||
@@ -1183,63 +1183,3 @@ export class TableDesignerFeature extends SqlOpsFeature<undefined> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Execution Plan Service Feature
|
||||
* TODO: Move this feature to data protocol client repo once stablized
|
||||
*/
|
||||
export class ExecutionPlanServiceFeature extends SqlOpsFeature<undefined> {
|
||||
private static readonly messagesTypes: RPCMessageType[] = [
|
||||
contracts.GetExecutionPlanRequest.type,
|
||||
];
|
||||
|
||||
constructor(client: SqlOpsDataClient) {
|
||||
super(client, ExecutionPlanServiceFeature.messagesTypes);
|
||||
}
|
||||
|
||||
public fillClientCapabilities(capabilities: ClientCapabilities): void {
|
||||
}
|
||||
|
||||
public initialize(capabilities: ServerCapabilities): void {
|
||||
this.register(this.messages, {
|
||||
id: UUID.generateUuid(),
|
||||
registerOptions: undefined
|
||||
});
|
||||
}
|
||||
|
||||
protected registerProvider(options: undefined): Disposable {
|
||||
const client = this._client;
|
||||
|
||||
const getExecutionPlan = (planFile: azdata.executionPlan.ExecutionPlanGraphInfo): Thenable<azdata.executionPlan.GetExecutionPlanResult> => {
|
||||
const params: contracts.GetExecutionPlanParams = { graphInfo: planFile };
|
||||
return client.sendRequest(contracts.GetExecutionPlanRequest.type, params).then(
|
||||
r => r,
|
||||
e => {
|
||||
client.logFailedRequest(contracts.GetExecutionPlanRequest.type, e);
|
||||
return Promise.reject(e);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
const compareExecutionPlanGraph = (firstPlanFile: azdata.executionPlan.ExecutionPlanGraphInfo, secondPlanFile: azdata.executionPlan.ExecutionPlanGraphInfo): Thenable<azdata.executionPlan.ExecutionPlanComparisonResult> => {
|
||||
const params: contracts.ExecutionPlanComparisonParams = {
|
||||
firstExecutionPlanGraphInfo: firstPlanFile,
|
||||
secondExecutionPlanGraphInfo: secondPlanFile
|
||||
};
|
||||
|
||||
return client.sendRequest(contracts.ExecutionPlanComparisonRequest.type, params).then(
|
||||
r => r,
|
||||
e => {
|
||||
client.logFailedRequest(contracts.ExecutionPlanComparisonRequest.type, e);
|
||||
return Promise.reject(e);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return azdata.dataprotocol.registerExecutionPlanProvider({
|
||||
providerId: client.providerId,
|
||||
getExecutionPlan,
|
||||
compareExecutionPlanGraph
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { AppContext } from '../appContext';
|
||||
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
||||
import * as constants from '../constants';
|
||||
import * as mssql from 'mssql';
|
||||
import * as mssql from '../mssql';
|
||||
import * as Utils from '../utils';
|
||||
import { ClientCapabilities } from 'vscode-languageclient';
|
||||
import * as contracts from '../contracts';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user