mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
remove pify
This commit is contained in:
parent
591c692349
commit
605b29f4fa
6 changed files with 10 additions and 22 deletions
|
|
@ -27,7 +27,6 @@
|
||||||
"node-pty": "0.11.0-beta29",
|
"node-pty": "0.11.0-beta29",
|
||||||
"os-locale": "5.0.0",
|
"os-locale": "5.0.0",
|
||||||
"parse-url": "8.1.0",
|
"parse-url": "8.1.0",
|
||||||
"pify": "5.0.0",
|
|
||||||
"queue": "6.0.2",
|
"queue": "6.0.2",
|
||||||
"react": "17.0.2",
|
"react": "17.0.2",
|
||||||
"react-dom": "17.0.2",
|
"react-dom": "17.0.2",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import pify from 'pify';
|
import {existsSync, readlink, symlink} from 'fs';
|
||||||
import fs from 'fs';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import notify from '../notify';
|
import notify from '../notify';
|
||||||
import {cliScriptPath, cliLinkPath} from '../config/paths';
|
import {cliScriptPath, cliLinkPath} from '../config/paths';
|
||||||
|
|
@ -8,13 +7,14 @@ import type {ValueType} from 'native-reg';
|
||||||
import sudoPrompt from 'sudo-prompt';
|
import sudoPrompt from 'sudo-prompt';
|
||||||
import {clipboard, dialog} from 'electron';
|
import {clipboard, dialog} from 'electron';
|
||||||
import {mkdirpSync} from 'fs-extra';
|
import {mkdirpSync} from 'fs-extra';
|
||||||
|
import {promisify} from 'util';
|
||||||
|
|
||||||
const readlink = pify(fs.readlink);
|
const readLink = promisify(readlink);
|
||||||
const symlink = pify(fs.symlink);
|
const symLink = promisify(symlink);
|
||||||
const sudoExec = pify(sudoPrompt.exec, {multiArgs: true});
|
const sudoExec = promisify(sudoPrompt.exec);
|
||||||
|
|
||||||
const checkInstall = () => {
|
const checkInstall = () => {
|
||||||
return readlink(cliLinkPath)
|
return readLink(cliLinkPath)
|
||||||
.then((link) => link === cliScriptPath)
|
.then((link) => link === cliScriptPath)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
if (err.code === 'ENOENT') {
|
if (err.code === 'ENOENT') {
|
||||||
|
|
@ -32,14 +32,14 @@ const addSymlink = async (silent: boolean) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('Linking HyperCLI');
|
console.log('Linking HyperCLI');
|
||||||
if (!fs.existsSync(path.dirname(cliLinkPath))) {
|
if (!existsSync(path.dirname(cliLinkPath))) {
|
||||||
try {
|
try {
|
||||||
mkdirpSync(path.dirname(cliLinkPath));
|
mkdirpSync(path.dirname(cliLinkPath));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw `Failed to create directory ${path.dirname(cliLinkPath)} - ${err}`;
|
throw `Failed to create directory ${path.dirname(cliLinkPath)} - ${err}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await symlink(cliScriptPath, cliLinkPath);
|
await symLink(cliScriptPath, cliLinkPath);
|
||||||
} catch (_err) {
|
} catch (_err) {
|
||||||
const err = _err as {code: string};
|
const err = _err as {code: string};
|
||||||
// 'EINVAL' is returned by readlink,
|
// 'EINVAL' is returned by readlink,
|
||||||
|
|
|
||||||
|
|
@ -780,11 +780,6 @@ picomatch@^2.0.4, picomatch@^2.2.1:
|
||||||
resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
|
resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
|
||||||
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
|
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
|
||||||
|
|
||||||
pify@5.0.0:
|
|
||||||
version "5.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f"
|
|
||||||
integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==
|
|
||||||
|
|
||||||
pkg-up@^3.1.0:
|
pkg-up@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5"
|
resolved "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {spawn, exec, SpawnOptions} from 'child_process';
|
||||||
import {isAbsolute, resolve} from 'path';
|
import {isAbsolute, resolve} from 'path';
|
||||||
import {existsSync} from 'fs';
|
import {existsSync} from 'fs';
|
||||||
import {version} from '../app/package.json';
|
import {version} from '../app/package.json';
|
||||||
import pify from 'pify';
|
import {promisify} from 'util';
|
||||||
import args from 'args';
|
import args from 'args';
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import open from 'open';
|
import open from 'open';
|
||||||
|
|
@ -232,7 +232,7 @@ const main = (argv: string[]) => {
|
||||||
const opts = {
|
const opts = {
|
||||||
env
|
env
|
||||||
};
|
};
|
||||||
return pify(exec)(cmd, opts);
|
return promisify(exec)(cmd, opts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,6 @@
|
||||||
"@types/mousetrap": "1.6.11",
|
"@types/mousetrap": "1.6.11",
|
||||||
"@types/ms": "0.7.31",
|
"@types/ms": "0.7.31",
|
||||||
"@types/node": "16.18.12",
|
"@types/node": "16.18.12",
|
||||||
"@types/pify": "5.0.1",
|
|
||||||
"@types/plist": "3.0.2",
|
"@types/plist": "3.0.2",
|
||||||
"@types/react": "^17.0.43",
|
"@types/react": "^17.0.43",
|
||||||
"@types/react-dom": "^17.0.14",
|
"@types/react-dom": "^17.0.14",
|
||||||
|
|
|
||||||
|
|
@ -998,11 +998,6 @@
|
||||||
resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
|
resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
|
||||||
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
|
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
|
||||||
|
|
||||||
"@types/pify@5.0.1":
|
|
||||||
version "5.0.1"
|
|
||||||
resolved "https://registry.npmjs.org/@types/pify/-/pify-5.0.1.tgz#10e398a89e3740dd5c316c502acad9ea5e444d3f"
|
|
||||||
integrity sha512-UYcJBAqWLyg+eITXGIu9DR7RXJFvSupz+Hf+RqJYHzDJedvDMTsB1JmDV6Qfna2g62VIxUKvoWqTxGHy6U/bLA==
|
|
||||||
|
|
||||||
"@types/plist@3.0.2", "@types/plist@^3.0.1":
|
"@types/plist@3.0.2", "@types/plist@^3.0.1":
|
||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
resolved "https://registry.npmjs.org/@types/plist/-/plist-3.0.2.tgz#61b3727bba0f5c462fe333542534a0c3e19ccb01"
|
resolved "https://registry.npmjs.org/@types/plist/-/plist-3.0.2.tgz#61b3727bba0f5c462fe333542534a0c3e19ccb01"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue