From 7bc8aa8d1ff6f859d7886a4792c7ea6275551096 Mon Sep 17 00:00:00 2001 From: Aasim Khan Date: Fri, 9 Dec 2022 16:10:29 -0800 Subject: [PATCH] updating data client protocol in import extension (#21391) --- build/gulpfile.extensions.js | 7 +-- extensions/import/.vscodeignore | 4 ++ extensions/import/config.json | 6 +- extensions/import/extension.webpack.config.js | 17 ++++++ extensions/import/package.json | 6 +- extensions/import/yarn.lock | 57 ++++++++++--------- 6 files changed, 57 insertions(+), 40 deletions(-) create mode 100644 extensions/import/extension.webpack.config.js diff --git a/build/gulpfile.extensions.js b/build/gulpfile.extensions.js index 015af75251..dacb0916c8 100644 --- a/build/gulpfile.extensions.js +++ b/build/gulpfile.extensions.js @@ -24,11 +24,6 @@ const product = require('../product.json'); const extensionsPath = path.join(path.dirname(__dirname), 'extensions'); -// {{SQL CARBON EDIT}} - TODO: Import needs to be updated to work with langpacks. -const sqlLocalizedExtensions = [ - 'import', -]; - // {{SQL CARBON EDIT}} Not doing this for us right now // To save 250ms for each gulp startup, we are caching the result here const compilations = glob.sync('**/tsconfig.json', { @@ -161,7 +156,7 @@ const tasks = compilations.map(function (tsconfigFile) { const cleanTask = task.define(`clean-extension-${name}`, util.rimraf(out)); const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => { - const pipeline = createPipeline(sqlLocalizedExtensions.includes(name), true); // {{SQL CARBON EDIT}} + const pipeline = createPipeline(false, true); const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts'])); const input = es.merge(nonts, pipeline.tsProjectSrc()); diff --git a/extensions/import/.vscodeignore b/extensions/import/.vscodeignore index 2490a95c2b..188b56b3e7 100644 --- a/extensions/import/.vscodeignore +++ b/extensions/import/.vscodeignore @@ -1,3 +1,7 @@ src/** +out/** tsconfig.json .gitignore +extension.webpack.config.js +*.vsix +yarn.lock diff --git a/extensions/import/config.json b/extensions/import/config.json index 6847e7d30e..9635faee53 100644 --- a/extensions/import/config.json +++ b/extensions/import/config.json @@ -1,11 +1,11 @@ { - "downloadUrl": "https://sqlopsextensions.blob.core.windows.net/extensions/import/service/{#version#}/{#fileName#}", + "downloadUrl": "https://sqlopsextensions.blob.core.windows.net/extensions/import/service/{#version#}/flatfileimportservice-{#fileName#}", "useDefaultLinuxRuntime": true, - "version": "0.0.9", + "version": "0.0.10", "downloadFileNames": { "Windows_64": "win-x64.zip", "Windows_86": "win-x86.zip", - "OSX": "osx.tar.gz", + "OSX": "osx-x64.tar.gz", "Linux": "linux-x64.tar.gz" }, "installDirectory": "flatfileimportservice/{#platform#}/{#version#}", diff --git a/extensions/import/extension.webpack.config.js b/extensions/import/extension.webpack.config.js new file mode 100644 index 0000000000..b63c59c65d --- /dev/null +++ b/extensions/import/extension.webpack.config.js @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the Source EULA. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +//@ts-check + +'use strict'; + +const withDefaults = require('../shared.webpack.config'); + +module.exports = withDefaults({ + context: __dirname, + entry: { + main: './src/main.ts' + } +}); diff --git a/extensions/import/package.json b/extensions/import/package.json index 717be4dcf9..367f5821d8 100644 --- a/extensions/import/package.json +++ b/extensions/import/package.json @@ -2,7 +2,7 @@ "name": "import", "displayName": "SQL Server Import", "description": "SQL Server Import for Azure Data Studio supports importing CSV or JSON files into SQL Server.", - "version": "1.5.2", + "version": "1.5.4", "publisher": "Microsoft", "preview": false, "engines": { @@ -77,11 +77,11 @@ } }, "dependencies": { - "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#0.3.0", + "dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.1", "htmlparser2": "^3.10.1", "@microsoft/ads-service-downloader": "1.0.4", "@microsoft/ads-extension-telemetry": "^1.3.1", - "vscode-nls": "^3.2.1" + "vscode-nls": "^4.1.2" }, "devDependencies": { "@types/mocha": "^7.0.2", diff --git a/extensions/import/yarn.lock b/extensions/import/yarn.lock index e652630809..718bba43b7 100644 --- a/extensions/import/yarn.lock +++ b/extensions/import/yarn.lock @@ -527,11 +527,11 @@ crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= -"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#0.3.0": - version "0.3.0" - resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/21487d15a5f753ba885ce1e489abc0af03487544" +"dataprotocol-client@github:Microsoft/sqlops-dataprotocolclient#1.3.1": + version "1.3.1" + resolved "https://codeload.github.com/Microsoft/sqlops-dataprotocolclient/tar.gz/2df6982e07c0208c2b8a5f8cd4b3d65944138d15" dependencies: - vscode-languageclient "3.5.1" + vscode-languageclient "5.2.1" debug@3.1.0: version "3.1.0" @@ -1499,7 +1499,7 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -semver@^5.4.1, semver@^5.6.0, semver@^5.7.0: +semver@^5.4.1, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -1742,35 +1742,36 @@ util-deprecate@^1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -vscode-jsonrpc@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-3.5.0.tgz#87239d9e166b2d7352245b8a813597804c1d63aa" - integrity sha512-LeE9LS1IOIRDZy5Xugrbk2tKeMa64vkRODrXPZbwyn2l/Q0e/jyYq8ze/Lo96sjOFiRe3HHbTVN39Ta8KN2RpA== +vscode-jsonrpc@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz#a7bf74ef3254d0a0c272fab15c82128e378b3be9" + integrity sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg== -vscode-languageclient@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-3.5.1.tgz#c78e582459c24e58f88020dfa34065e976186a98" - integrity sha512-GTQ+hSq/o4c/y6GYmyP9XNrVoIu0NFZ67KltSkqN+tO0eUNDIlrVNX+3DJzzyLhSsrctuGzuYWm3t87mNAcBmQ== +vscode-languageclient@5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-5.2.1.tgz#7cfc83a294c409f58cfa2b910a8cfeaad0397193" + integrity sha512-7jrS/9WnV0ruqPamN1nE7qCxn0phkH5LjSgSp9h6qoJGoeAKzwKz/PF6M+iGA/aklx4GLZg1prddhEPQtuXI1Q== dependencies: - vscode-languageserver-protocol "3.5.1" + semver "^5.5.0" + vscode-languageserver-protocol "3.14.1" -vscode-languageserver-protocol@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.5.1.tgz#5144a3a9eeccbd83fe2745bd4ed75fad6cc45f0d" - integrity sha512-1fPDIwsAv1difCV+8daOrJEGunClNJWqnUHq/ncWrjhitKWXgGmRCjlwZ3gDUTt54yRcvXz1PXJDaRNvNH6pYA== +vscode-languageserver-protocol@3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz#b8aab6afae2849c84a8983d39a1cf742417afe2f" + integrity sha512-IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g== dependencies: - vscode-jsonrpc "3.5.0" - vscode-languageserver-types "3.5.0" + vscode-jsonrpc "^4.0.0" + vscode-languageserver-types "3.14.0" -vscode-languageserver-types@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.5.0.tgz#e48d79962f0b8e02de955e3f524908e2b19c0374" - integrity sha512-D4rUfu/oKYdc9Tmec0nEfedj+uXO2tZHR+eoHs9rE9G/QpRyZaHuug8ZUNGTGdO+ALLGgenL6bRpY8y3J9acHg== +vscode-languageserver-types@3.14.0: + version "3.14.0" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz#d3b5952246d30e5241592b6dde8280e03942e743" + integrity sha512-lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A== -vscode-nls@^3.2.1: - version "3.2.5" - resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-3.2.5.tgz#25520c1955108036dec607c85e00a522f247f1a4" - integrity sha512-ITtoh3V4AkWXMmp3TB97vsMaHRgHhsSFPsUdzlueSL+dRZbSNTZeOmdQv60kjCV306ghPxhDeoNUEm3+EZMuyw== +vscode-nls@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-4.1.2.tgz#ca8bf8bb82a0987b32801f9fddfdd2fb9fd3c167" + integrity sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw== which-boxed-primitive@^1.0.2: version "1.0.2"