debt - remove sudo-prompt typings

This commit is contained in:
Benjamin Pasero 2019-11-14 09:01:41 +01:00
parent a73d87acae
commit 175b78de96
4 changed files with 7 additions and 15 deletions

View file

@ -45,7 +45,7 @@
"onigasm-umd": "^2.2.4",
"semver-umd": "^5.5.3",
"spdlog": "^0.11.1",
"sudo-prompt": "9.0.0",
"sudo-prompt": "9.1.0",
"v8-inspect-profiler": "^0.0.20",
"vscode-minimist": "^1.2.1",
"vscode-nsfw": "1.2.8",

View file

@ -1,9 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'sudo-prompt' {
export function exec(cmd: string, options: { name?: string, icns?: string }, callback: (error: string, stdout: string, stderr: string) => void): void;
}

View file

@ -286,7 +286,8 @@ export class NativeTextFileService extends AbstractTextFileService {
private async sudoPromptCopy(source: string, target: string, options?: IWriteTextFileOptions): Promise<void> {
// load sudo-prompt module lazy
const sudoPrompt = await import('sudo-prompt');
// @ts-ignore TODO@ben wait for update of sudo-prompt
const sudoPrompt: { exec(cmd: string, options: { name?: string, icns?: string }, callback: (error: string, stdout: string, stderr: string) => void): void } = await import('sudo-prompt');
return new Promise<void>((resolve, reject) => {
const promptOptions = {

View file

@ -8150,10 +8150,10 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1:
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
sudo-prompt@9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.0.0.tgz#eebedeee9fcd6f661324e6bb46335e3288e8dc8a"
integrity sha512-kUn5fiOk0nhY2oKD9onIkcNCE4Zt85WTsvOfSmqCplmlEvXCcPOmp1npH5YWuf8Bmyy9wLWkIxx+D+8cThBORQ==
sudo-prompt@9.1.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.1.0.tgz#9618823e748ce19e2d9e481feaf3ada7d52df52f"
integrity sha512-bJigY3ELFd2ZA7gfyQ4wMZIp1EICPFQcMe3RgSz5OQTzrPPaeryhgaxbInO/G62vpiqJs37qlGdb9TaqHeF2yA==
supports-color@1.2.0:
version "1.2.0"