diff --git a/.vscodeignore b/.vscodeignore index 2883cfa..4f7269b 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,9 +1,10 @@ .vscode/** .vscode-test/** -node_modules/** out/test/** test/** -src/** **/*.map .gitignore tsconfig.json +*.code-workspace +*lint.json +src/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3ef4d22..b42b934 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "databricks-vscode", - "version": "0.9.4", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "databricks-vscode", - "version": "0.9.4", + "version": "1.0.0", "license": "GPL-3.0-or-later", "dependencies": { "@angular/common": "^14.0.1", diff --git a/src/ThisExtension.ts b/src/ThisExtension.ts index 699c31c..878cee0 100644 --- a/src/ThisExtension.ts +++ b/src/ThisExtension.ts @@ -8,7 +8,6 @@ import { SensitiveValueStore } from './vscode/treeviews/connections/_types'; import { DatabricksConnectionTreeItem } from './vscode/treeviews/connections/DatabricksConnectionTreeItem'; import { DatabricksConnectionManagerCLI } from './vscode/treeviews/connections/DatabricksConnectionManagerCLI'; import { DatabricksKernel } from './vscode/notebook/DatabricksKernel'; -import { Dictionary } from 'form-data'; // https://vshaxe.github.io/vscode-extern/vscode/TreeDataProvider.html export abstract class ThisExtension { @@ -188,17 +187,8 @@ export abstract class ThisExtension { } static async getSecureSetting(setting: string): Promise { - let value = this.secrets.get(setting); // new way to store secrets - - // check if the new secret is not yet set/used - if(await value == undefined) - { - let _keytar = require('keytar'); - // get old value and store it the new way - value = _keytar.getPassword(this.configuration.id, setting); - await this.setSecureSetting(setting, await value); - } - + let value = this.secrets.get(setting); + return value; } diff --git a/src/helpers/Helper.ts b/src/helpers/Helper.ts index a4d2fcd..60cfdd3 100644 --- a/src/helpers/Helper.ts +++ b/src/helpers/Helper.ts @@ -275,53 +275,6 @@ export abstract class Helper { }); } - static async addCodeCells(filePath: string): Promise { - try { - const replace = require('replace-in-file'); - let regex = new RegExp(this.DatabricksCommandTagRegEx, 'g'); - let options = { - files: filePath, - from: regex, - to: this.DatabricksCommandTagRegEx + '\n' + this.CodeCellTag - }; - - - let results = await replace(options); - ThisExtension.log('Replacement results:', results[0].hasChanged); - - // remove duplicat code cells that might have been added - regex = new RegExp(this.CodeCellTag + '[\\r\\n]' + this.CodeCellTag, 'g'); - options = { - files: filePath, - from: regex, - to: this.CodeCellTag - }; - - results = await replace(options); - ThisExtension.log('Replacement results:', results[0].hasChanged); - } - catch (error) { - ThisExtension.log('Error occurred:', error); - } - } - static async removeCodeCells(filePath: string): Promise { - try { - const replace = require('replace-in-file'); - const regex = new RegExp(this.DatabricksCommandTagRegEx + '[\\r\\n]*' + this.CodeCellTag, 'g'); - const options = { - files: filePath, - from: regex, - to: this.DatabricksCommandTagRegEx, - }; - - const results = await replace(options); - ThisExtension.log('Replacement results:', results[0].hasChanged); - } - catch (error) { - ThisExtension.log('Error occurred:', error); - } - } - static secondsToHms(seconds: number) { var h = Math.floor(seconds / 3600); var m = Math.floor(seconds % 3600 / 60);