diff --git a/src/targets.ts b/src/targets.ts index df8f4d4..9bb6f4b 100644 --- a/src/targets.ts +++ b/src/targets.ts @@ -36,7 +36,6 @@ import * as deploy_values from './values'; import * as deploy_workspaces from './workspaces'; import * as Enumerable from 'node-enumerable'; import * as i18 from './i18'; -import * as Minimatch from 'minimatch'; import * as Moment from 'moment'; import * as Path from 'path'; import * as SanitizeFilename from 'sanitize-filename'; @@ -1036,7 +1035,7 @@ export async function mapFilesForTarget(bodyScriptFullPath); + const BODY_MODULE = deploy_helpers.loadModule(bodyScriptFullPath); if (BODY_MODULE) { const GET_BODY = BODY_MODULE.getBody; if (GET_BODY) { diff --git a/src/targets/operations/open.ts b/src/targets/operations/open.ts index 412eee8..964bc5c 100644 --- a/src/targets/operations/open.ts +++ b/src/targets/operations/open.ts @@ -17,7 +17,6 @@ import * as deploy_helpers from '../../helpers'; import * as deploy_targets from '../../targets'; -import * as vscode from 'vscode'; /** diff --git a/src/targets/operations/script.ts b/src/targets/operations/script.ts index 7d08a68..d41219b 100644 --- a/src/targets/operations/script.ts +++ b/src/targets/operations/script.ts @@ -18,7 +18,6 @@ import * as deploy_contracts from '../../contracts'; import * as deploy_events from '../../events'; import * as deploy_helpers from '../../helpers'; -import * as deploy_log from '../../log'; import * as deploy_session from '../../session'; import * as deploy_targets from '../../targets'; import * as i18 from '../../i18'; @@ -96,7 +95,7 @@ export async function execute(context: deploy_targets.TargetOperationExecutionCo scriptFile)); } - const SCRIPT_MODULE = await deploy_helpers.loadModule(scriptFullPath); + const SCRIPT_MODULE = deploy_helpers.loadModule(scriptFullPath); if (SCRIPT_MODULE) { const EXECUTE = SCRIPT_MODULE.execute; if (EXECUTE) { diff --git a/src/targets/operations/slack.ts b/src/targets/operations/slack.ts index 49d2461..89e0b7c 100644 --- a/src/targets/operations/slack.ts +++ b/src/targets/operations/slack.ts @@ -15,7 +15,6 @@ * along with this program. If not, see . */ -import * as deploy_contracts from '../../contracts'; import * as deploy_helpers from '../../helpers'; import * as deploy_targets from '../../targets'; import * as Enumerable from 'node-enumerable'; diff --git a/src/test/extension.test.ts b/src/test/extension.test.ts index 300eead..b0aeb1f 100644 --- a/src/test/extension.test.ts +++ b/src/test/extension.test.ts @@ -1,3 +1,5 @@ +/* tslint:disable */ + /** * This file is part of the vscode-deploy-reloaded distribution. * Copyright (c) Marcel Joachim Kloubert. diff --git a/src/tools/sendfile.ts b/src/tools/sendfile.ts index e007d13..31bd319 100644 --- a/src/tools/sendfile.ts +++ b/src/tools/sendfile.ts @@ -41,7 +41,6 @@ const DEFAULT_PORT = 23979; const LAST_PORT_KEY = "vscdrLastReceiveFileHostPort"; const LAST_REMOTE_ADDR_KEY = "vscdrLastSendFileRemoteAddress"; let server: Net.Server; -const SERVER_BTN_COMMAND = ""; let serverButton: vscode.StatusBarItem; /** @@ -113,7 +112,7 @@ export async function receiveFile(context: vscode.ExtensionContext) { context.globalState.update(LAST_PORT_KEY, port).then(() => { }, (err) => { deploy_log.CONSOLE - .trace(err, "tools.sendfile.receiveFile('updateLastPort')") + .trace(err, "tools.sendfile.receiveFile('updateLastPort')"); }); serverButton = vscode.window.createStatusBarItem(); @@ -123,7 +122,7 @@ export async function receiveFile(context: vscode.ExtensionContext) { serverButton.tooltip = i18.t('tools.sendOrReceiveFile.receive.button.tooltip'); serverButton.show(); - const NEW_SERVER = server = await SimpleSocket.listen(port, (err, remoteConnection) => { + server = await SimpleSocket.listen(port, (err, remoteConnection) => { if (err) { closeServer(); diff --git a/src/workspaces.ts b/src/workspaces.ts index b315db7..0bcf8ef 100644 --- a/src/workspaces.ts +++ b/src/workspaces.ts @@ -31,7 +31,6 @@ import * as deploy_gui from './gui'; import * as deploy_helpers from './helpers'; import * as deploy_list from './list'; import * as deploy_log from './log'; -import * as deploy_mappings from './mappings'; import * as deploy_objects from './objects'; import * as deploy_output from './output'; import * as deploy_packages from './packages'; @@ -50,7 +49,6 @@ import * as i18 from './i18'; import * as i18next from 'i18next'; const MergeDeep = require('merge-deep'); import * as Moment from 'moment'; -import * as OS from 'os'; import * as Path from 'path'; import * as vscode from 'vscode'; @@ -572,7 +570,7 @@ export class Workspace extends deploy_objects.DisposableBase implements deploy_c if (deploy_helpers.toBooleanSafe(settings.isMustHave)) { // must match - const SELECTED_ITEM = await this.showErrorMessage( + await this.showErrorMessage( i18.t('requirements.conditions.mustMatch', NAME), { @@ -1393,8 +1391,6 @@ export class Workspace extends deploy_objects.DisposableBase implements deploy_c public getSelectedSwitchOption(target: SwitchTarget): SwitchTargetOption | false { const ME = this; - const MY_ID = deploy_helpers.toStringSafe(ME.id); - if (ME.canBeHandledByMe(target)) { const ALL_OPTIONS = ME.getAllSwitchOptions(target); if (ALL_OPTIONS.length > 0) { @@ -1875,8 +1871,6 @@ export class Workspace extends deploy_objects.DisposableBase implements deploy_c section: string; } - const ALTERNATIVE_FILENAME = './.vscode/deploy.json'; - const ALTERNATIVE_SECTION_NAME = 'deploy'; const DEFAULT_DIR = this.folder.uri.fsPath; const DEFAULT_FILENAME = './.vscode/settings.json'; const DEFAULT_FILE = Path.join(