0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-31 22:51:25 -05:00

refactor(cli): experience improvements

This commit is contained in:
Gao Sun 2022-10-03 17:52:28 +08:00
parent a67c23e4b0
commit a59ba6e318
No known key found for this signature in database
GPG key ID: 13EBE123E4773688
5 changed files with 267 additions and 273 deletions

View file

@ -1,12 +1,11 @@
{
"name": "cli",
"name": "@logto/cli",
"version": "1.0.0-beta.9",
"description": "Logto CLI.",
"author": "Silverhand Inc. <contact@silverhand.io>",
"homepage": "https://github.com/logto-io/logto#readme",
"license": "MPL-2.0",
"//": "Temporarily set to private until the package is ready.",
"private": true,
"main": "lib/index.js",
"files": [
"lib"
],
@ -14,11 +13,12 @@
"type": "git",
"url": "git+https://github.com/logto-io/logto.git"
},
"bin": "./lib/index.js",
"bin": "lib/index.js",
"scripts": {
"precommit": "lint-staged",
"build": "rimraf lib && tsc",
"dev": "tsc --watch --preserveWatchOutput --incremental",
"start": "node .",
"dev": "ts-node src/index.ts",
"lint": "eslint --ext .ts src",
"lint:report": "pnpm lint --format json --output-file report.json",
"prepack": "pnpm build"
@ -30,19 +30,26 @@
"url": "https://github.com/logto-io/logto/issues"
},
"dependencies": {
"decompress": "^4.2.1",
"chalk": "^4.1.2",
"got": "^11.8.2",
"prompts": "^2.4.2"
"ora": "^5.0.0",
"prompts": "^2.4.2",
"semver": "^7.3.7",
"tar": "^6.1.11"
},
"devDependencies": {
"@silverhand/eslint-config": "1.0.0",
"@silverhand/ts-config": "1.0.0",
"@types/decompress": "^4.2.4",
"@types/node": "^16.0.0",
"@types/prompts": "^2.0.14",
"@types/semver": "^7.3.12",
"@types/tar": "^6.1.2",
"eslint": "^8.21.0",
"lint-staged": "^13.0.0",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
},
"eslintConfig": {

View file

@ -1,31 +0,0 @@
import { execSync } from 'child_process';
import { createWriteStream } from 'fs';
import got from 'got';
export const isVersionGreaterThan = (version: string, targetMajor: number) =>
Number(version.split('.')[0]) >= targetMajor;
export const trimVersion = (version: string) =>
version.startsWith('v') ? version.slice(1) : version;
export const safeExecSync = (command: string) => {
try {
return execSync(command, { encoding: 'utf8', stdio: 'pipe' });
} catch {}
};
export const downloadFile = async (url: string, destination: string) => {
const file = createWriteStream(destination);
got.stream(url).pipe(file);
return new Promise((resolve, reject) => {
file.on('error', (error) => {
reject(error.message);
});
file.on('finish', () => {
file.close();
resolve(file);
});
});
};

View file

@ -1,89 +1,130 @@
import { execSync } from 'child_process';
import { existsSync } from 'fs';
import { unlink } from 'fs/promises';
import { mkdir } from 'fs/promises';
import os from 'os';
import path from 'path';
import decompress from 'decompress';
import chalk from 'chalk';
import ora from 'ora';
import * as prompts from 'prompts';
import * as semver from 'semver';
import tar from 'tar';
import { downloadFile, isVersionGreaterThan, safeExecSync, trimVersion } from './functions';
import { downloadFile, log, safeExecSync } from './utilities';
const DIRECTORY = 'logto';
const NODE_MAJOR_VERSION = 16;
const POSTGRES_MAJOR_VERSION = 14;
const pgRequired = new semver.SemVer('14.0.0');
const getPromptResponse = async (pgVersion: string) =>
prompts.default(
const validateNodeVersion = () => {
const required = new semver.SemVer('16.0.0');
const current = new semver.SemVer(execSync('node -v', { encoding: 'utf8', stdio: 'pipe' }));
if (required.compare(current) > 0) {
log.error(`Logto requires NodeJS >=${required.version}, but ${current.version} found.`);
}
if (current.major > required.major) {
log.warn(
`Logto is tested under NodeJS ^${required.version}, but version ${current.version} found.`
);
}
};
const getInstancePath = async () => {
const response = await prompts.default(
[
{
name: 'instancePath',
message: 'Where should we create your logto instance?',
type: 'text',
initial: './' + DIRECTORY,
initial: './logto',
format: (value: string) => path.resolve(value.trim()),
validate: (value: string) =>
existsSync(value) ? 'That path already exists, please try another.' : true,
},
{
name: 'hasPostgresUrl',
message: `Logto requires PostgreSQL >= ${POSTGRES_MAJOR_VERSION}.0.0 but cannot find in the current environment. Do you have a remote PostgreSQL instance ready?`,
type: !isVersionGreaterThan(trimVersion(pgVersion), POSTGRES_MAJOR_VERSION) && 'confirm',
initial: true,
},
{
name: 'postgresUrl',
message: 'What is the URL of your PostgreSQL instance?',
type: (_, data) => (data.hasPostgresUrl ? 'text' : null),
format: (value: string) => value.trim(),
validate: (value: string) =>
(value &&
Boolean(
/^(?:([^\s#/:?]+):\/{2})?(?:([^\s#/?@]+)@)?([^\s#/?]+)?(?:\/([^\s#?]*))?(?:\?([^\s#]+))?\S*$/.test(
value
)
)) ||
'Please enter a valid connection URL.',
},
{
name: 'startInstance',
message: 'Would you like to start Logto now?',
type: 'confirm',
initial: true,
message: `Logto requires PostgreSQL >=${pgRequired.version} but cannot find in the current environment.\n Do you have a remote PostgreSQL instance ready?`,
type: () => {
const pgOutput = safeExecSync('postgres --version') ?? '';
// Filter out all brackets in the output since Homebrew will append `(Homebrew)`.
const pgArray = pgOutput.split(' ').filter((value) => !value.startsWith('('));
const pgCurrent = semver.coerce(pgArray[pgArray.length - 1]);
return (!pgCurrent || pgCurrent.compare(pgRequired) < 0) && 'confirm';
},
format: (previous) => {
if (!previous) {
log.error('Logto requires a Postgres instance to run.');
}
},
},
],
{
onCancel: () => {
throw new Error('Operation cancelled');
log.error('Operation cancelled');
},
}
);
async function main() {
const nodeVersion = execSync('node -v', { encoding: 'utf8', stdio: 'pipe' });
const pgOutput = safeExecSync('postgres --version') ?? '';
const pgArray = pgOutput.split(' ');
const pgVersion = pgArray[pgArray.length - 1] ?? '';
return String(response.instancePath);
};
if (!isVersionGreaterThan(trimVersion(nodeVersion), NODE_MAJOR_VERSION)) {
throw new Error(`Logto requires NodeJS >= ${NODE_MAJOR_VERSION}.0.0.`);
}
const tryStartInstance = async (instancePath: string) => {
const response = await prompts.default({
name: 'startInstance',
message: 'Would you like to start Logto now?',
type: 'confirm',
initial: true,
});
const response = await getPromptResponse(pgVersion);
const startCommand = `cd ${String(response.instancePath)} && npm start`;
const tarFileLocation = path.resolve('./logto.tar.gz');
const yes = Boolean(response.startInstance);
const startCommand = `cd ${instancePath} && npm start`;
await downloadFile(
'https://github.com/logto-io/logto/releases/latest/download/logto.tar.gz',
tarFileLocation
);
await decompress(tarFileLocation, response.instancePath);
await unlink(tarFileLocation);
if (response.startInstance) {
if (yes) {
execSync(startCommand, { stdio: 'inherit' });
} else {
console.log(`You can use ${startCommand} to start Logto. Happy hacking!`);
log.info(`You can use ${startCommand} to start Logto. Happy hacking!`);
}
}
};
await main();
const downloadRelease = async () => {
const tarFilePath = path.resolve(os.tmpdir(), './logto.tar.gz');
log.info(`Download Logto to ${tarFilePath}`);
await downloadFile(
'https://github.com/logto-io/logto/releases/latest/download/logto.tar.gz',
tarFilePath
);
return tarFilePath;
};
const decompress = async (toPath: string, tarPath: string) => {
const decompressSpinner = ora({
text: `Decompress to ${toPath}`,
prefixText: chalk.blue('[info]'),
}).start();
try {
await mkdir(toPath);
await tar.extract({ file: tarPath, cwd: toPath, strip: 1 });
} catch {
decompressSpinner.fail();
return;
}
decompressSpinner.succeed();
};
const main = async () => {
validateNodeVersion();
const instancePath = await getInstancePath();
const tarPath = await downloadRelease();
await decompress(instancePath, tarPath);
await tryStartInstance(instancePath);
};
void main();

View file

@ -0,0 +1,65 @@
import { execSync } from 'child_process';
import { createWriteStream } from 'fs';
import chalk from 'chalk';
import got, { Progress } from 'got';
import ora from 'ora';
export const safeExecSync = (command: string) => {
try {
return execSync(command, { encoding: 'utf8', stdio: 'pipe' });
} catch {}
};
type Log = Readonly<{
info: typeof console.log;
warn: typeof console.log;
error: typeof console.log;
}>;
export const log: Log = Object.freeze({
info: (...args) => {
console.log(chalk.blue('[info]'), ...args);
},
warn: (...args) => {
console.log(chalk.yellow('[warn]'), ...args);
},
error: (...args) => {
console.log(chalk.red('[error]'), ...args);
// eslint-disable-next-line unicorn/no-process-exit
process.exit(1);
},
});
export const downloadFile = async (url: string, destination: string) => {
const file = createWriteStream(destination);
const stream = got.stream(url);
const spinner = ora({
text: 'Connecting',
prefixText: chalk.blue('[info]'),
}).start();
stream.pipe(file);
return new Promise((resolve, reject) => {
stream.on('downloadProgress', ({ total, percent }: Progress) => {
if (!total) {
return;
}
// eslint-disable-next-line @silverhand/fp/no-mutation
spinner.text = `${(percent * 100).toFixed(1)}%`;
});
file.on('error', (error) => {
spinner.fail();
reject(error.message);
});
file.on('finish', () => {
file.close();
spinner.succeed();
resolve(file);
});
});
};

272
pnpm-lock.yaml generated
View file

@ -23,28 +23,42 @@ importers:
'@silverhand/eslint-config': 1.0.0
'@silverhand/ts-config': 1.0.0
'@types/decompress': ^4.2.4
'@types/node': ^16.0.0
'@types/prompts': ^2.0.14
decompress: ^4.2.1
'@types/semver': ^7.3.12
'@types/tar': ^6.1.2
chalk: ^4.1.2
eslint: ^8.21.0
got: ^11.8.2
lint-staged: ^13.0.0
ora: ^5.0.0
prettier: ^2.7.1
prompts: ^2.4.2
rimraf: ^3.0.2
semver: ^7.3.7
tar: ^6.1.11
ts-node: ^10.9.1
typescript: ^4.7.4
dependencies:
decompress: 4.2.1
chalk: 4.1.2
got: 11.8.3
ora: 5.4.1
prompts: 2.4.2
semver: 7.3.7
tar: 6.1.11
devDependencies:
'@silverhand/eslint-config': 1.0.0_swk2g7ygmfleszo5c33j4vooni
'@silverhand/ts-config': 1.0.0_typescript@4.7.4
'@types/decompress': 4.2.4
'@types/node': 16.11.12
'@types/prompts': 2.0.14
'@types/semver': 7.3.12
'@types/tar': 6.1.2
eslint: 8.21.0
lint-staged: 13.0.0
prettier: 2.7.1
rimraf: 3.0.2
ts-node: 10.9.1_ccwudyfw5se7hgalwgkzhn2yp4
typescript: 4.7.4
packages/console:
@ -1680,8 +1694,8 @@ packages:
/@jridgewell/trace-mapping/0.3.9:
resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
dependencies:
'@jridgewell/resolve-uri': 3.0.5
'@jridgewell/sourcemap-codec': 1.4.11
'@jridgewell/resolve-uri': 3.1.0
'@jridgewell/sourcemap-codec': 1.4.14
dev: true
/@koa/cors/3.1.0:
@ -3850,7 +3864,7 @@ packages:
eslint-import-resolver-typescript: 3.4.0_jatgrcxl4x7ywe7ak6cnjca2ae
eslint-plugin-consistent-default-export-name: 0.0.15
eslint-plugin-eslint-comments: 3.2.0_eslint@8.21.0
eslint-plugin-import: 2.26.0_eslint@8.21.0
eslint-plugin-import: 2.26.0_klqlxqqxnpnfpttri4irupweri
eslint-plugin-no-use-extend-native: 0.5.0
eslint-plugin-node: 11.1.0_eslint@8.21.0
eslint-plugin-prettier: 4.2.1_h62lvancfh4b7r6zn2dgodrh5e
@ -3860,6 +3874,7 @@ packages:
eslint-plugin-unused-imports: 2.0.0_i7ihj7mda6acsfp32zwgvvndem
prettier: 2.7.1
transitivePeerDependencies:
- eslint-import-resolver-webpack
- supports-color
- typescript
dev: true
@ -4624,6 +4639,10 @@ packages:
resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==}
dev: true
/@types/semver/7.3.12:
resolution: {integrity: sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==}
dev: true
/@types/serve-static/1.13.10:
resolution: {integrity: sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==}
dependencies:
@ -4891,12 +4910,6 @@ packages:
hasBin: true
dev: true
/acorn/8.7.1:
resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
/acorn/8.8.0:
resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==}
engines: {node: '>=0.4.0'}
@ -5302,13 +5315,6 @@ packages:
engines: {node: '>=8'}
dev: true
/bl/1.2.3:
resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==}
dependencies:
readable-stream: 2.3.7
safe-buffer: 5.2.1
dev: false
/bl/4.1.0:
resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}
dependencies:
@ -5374,23 +5380,9 @@ packages:
node-int64: 0.4.0
dev: true
/buffer-alloc-unsafe/1.1.0:
resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==}
dev: false
/buffer-alloc/1.2.0:
resolution: {integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==}
dependencies:
buffer-alloc-unsafe: 1.1.0
buffer-fill: 1.0.0
dev: false
/buffer-crc32/0.2.13:
resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
/buffer-fill/1.0.0:
resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==}
dev: false
dev: true
/buffer-from/1.1.2:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
@ -5741,7 +5733,7 @@ packages:
mimic-response: 1.0.1
/clone/1.0.4:
resolution: {integrity: sha1-2jCcwmPfFZlMaIypAheco8fNfH4=}
resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==}
engines: {node: '>=0.8'}
/clone/2.1.2:
@ -5857,6 +5849,7 @@ packages:
/commander/2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
dev: true
/commander/5.1.0:
resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==}
@ -5996,8 +5989,8 @@ packages:
engines: {node: '>=10'}
hasBin: true
dependencies:
is-text-path: 1.0.1
JSONStream: 1.3.5
is-text-path: 1.0.1
lodash: 4.17.21
meow: 8.1.2
split2: 3.2.2
@ -6056,6 +6049,7 @@ packages:
/core-util-is/1.0.3:
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
dev: true
/cosmiconfig-typescript-loader/2.0.0_bjctuninx3nzqxltyvshqte2ni:
resolution: {integrity: sha512-2NlGul/E3vTQEANqPziqkA01vfiuUU8vT0jZAuUIjEW8u3eCcnCQWLggapCjhbF76s7KQF0fM0kXSKmzaDaG1g==}
@ -6286,12 +6280,22 @@ packages:
/debug/2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: 2.0.0
dev: true
/debug/3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: 2.1.3
dev: true
@ -6365,59 +6369,6 @@ packages:
dependencies:
mimic-response: 3.1.0
/decompress-tar/4.1.1:
resolution: {integrity: sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==}
engines: {node: '>=4'}
dependencies:
file-type: 5.2.0
is-stream: 1.1.0
tar-stream: 1.6.2
dev: false
/decompress-tarbz2/4.1.1:
resolution: {integrity: sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==}
engines: {node: '>=4'}
dependencies:
decompress-tar: 4.1.1
file-type: 6.2.0
is-stream: 1.1.0
seek-bzip: 1.0.6
unbzip2-stream: 1.4.3
dev: false
/decompress-targz/4.1.1:
resolution: {integrity: sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==}
engines: {node: '>=4'}
dependencies:
decompress-tar: 4.1.1
file-type: 5.2.0
is-stream: 1.1.0
dev: false
/decompress-unzip/4.0.1:
resolution: {integrity: sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==}
engines: {node: '>=4'}
dependencies:
file-type: 3.9.0
get-stream: 2.3.1
pify: 2.3.0
yauzl: 2.10.0
dev: false
/decompress/4.2.1:
resolution: {integrity: sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==}
engines: {node: '>=4'}
dependencies:
decompress-tar: 4.1.1
decompress-tarbz2: 4.1.1
decompress-targz: 4.1.1
decompress-unzip: 4.0.1
graceful-fs: 4.2.9
make-dir: 1.3.0
pify: 2.3.0
strip-dirs: 2.1.0
dev: false
/dedent/0.7.0:
resolution: {integrity: sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=}
dev: true
@ -6434,7 +6385,7 @@ packages:
engines: {node: '>=0.10.0'}
/defaults/1.0.3:
resolution: {integrity: sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=}
resolution: {integrity: sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA==}
dependencies:
clone: 1.0.4
@ -6879,6 +6830,8 @@ packages:
dependencies:
debug: 3.2.7
resolve: 1.22.0
transitivePeerDependencies:
- supports-color
dev: true
/eslint-import-resolver-typescript/3.4.0_jatgrcxl4x7ywe7ak6cnjca2ae:
@ -6891,7 +6844,7 @@ packages:
debug: 4.3.4
enhanced-resolve: 5.10.0
eslint: 8.21.0
eslint-plugin-import: 2.26.0_eslint@8.21.0
eslint-plugin-import: 2.26.0_klqlxqqxnpnfpttri4irupweri
get-tsconfig: 4.2.0
globby: 13.1.2
is-core-module: 2.9.0
@ -6901,12 +6854,31 @@ packages:
- supports-color
dev: true
/eslint-module-utils/2.7.3:
/eslint-module-utils/2.7.3_dirjbmf3bsnpt3git34hjh5rju:
resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser': '*'
eslint-import-resolver-node: '*'
eslint-import-resolver-typescript: '*'
eslint-import-resolver-webpack: '*'
peerDependenciesMeta:
'@typescript-eslint/parser':
optional: true
eslint-import-resolver-node:
optional: true
eslint-import-resolver-typescript:
optional: true
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 5.32.0_qugx7qdu5zevzvxaiqyxfiwquq
debug: 3.2.7
eslint-import-resolver-node: 0.3.6
eslint-import-resolver-typescript: 3.4.0_jatgrcxl4x7ywe7ak6cnjca2ae
find-up: 2.1.0
transitivePeerDependencies:
- supports-color
dev: true
/eslint-plugin-consistent-default-export-name/0.0.15:
@ -6939,19 +6911,24 @@ packages:
ignore: 5.2.0
dev: true
/eslint-plugin-import/2.26.0_eslint@8.21.0:
/eslint-plugin-import/2.26.0_klqlxqqxnpnfpttri4irupweri:
resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser': '*'
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
peerDependenciesMeta:
'@typescript-eslint/parser':
optional: true
dependencies:
'@typescript-eslint/parser': 5.32.0_qugx7qdu5zevzvxaiqyxfiwquq
array-includes: 3.1.4
array.prototype.flat: 1.2.5
debug: 2.6.9
doctrine: 2.1.0
eslint: 8.21.0
eslint-import-resolver-node: 0.3.6
eslint-module-utils: 2.7.3
eslint-module-utils: 2.7.3_dirjbmf3bsnpt3git34hjh5rju
has: 1.0.3
is-core-module: 2.9.0
is-glob: 4.0.3
@ -6959,6 +6936,10 @@ packages:
object.values: 1.1.5
resolve: 1.22.0
tsconfig-paths: 3.14.1
transitivePeerDependencies:
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- supports-color
dev: true
/eslint-plugin-no-use-extend-native/0.5.0:
@ -7418,6 +7399,7 @@ packages:
resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==}
dependencies:
pend: 1.2.0
dev: true
/figures/3.2.0:
resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==}
@ -7432,21 +7414,6 @@ packages:
flat-cache: 3.0.4
dev: true
/file-type/3.9.0:
resolution: {integrity: sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==}
engines: {node: '>=0.10.0'}
dev: false
/file-type/5.2.0:
resolution: {integrity: sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==}
engines: {node: '>=4'}
dev: false
/file-type/6.2.0:
resolution: {integrity: sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==}
engines: {node: '>=4'}
dev: false
/filelist/1.0.2:
resolution: {integrity: sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ==}
dependencies:
@ -7592,6 +7559,7 @@ packages:
/fs-constants/1.0.0:
resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}
dev: true
/fs-exists-sync/0.1.0:
resolution: {integrity: sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg==}
@ -7742,14 +7710,6 @@ packages:
engines: {node: '>=10'}
dev: true
/get-stream/2.3.1:
resolution: {integrity: sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==}
engines: {node: '>=0.10.0'}
dependencies:
object-assign: 4.1.1
pinkie-promise: 2.0.1
dev: false
/get-stream/5.2.0:
resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==}
engines: {node: '>=8'}
@ -8783,10 +8743,6 @@ packages:
resolution: {integrity: sha1-PZh3iZ5qU+/AFgUEzeFfgubwYdU=}
dev: true
/is-natural-number/4.0.1:
resolution: {integrity: sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==}
dev: false
/is-negative-zero/2.0.2:
resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==}
engines: {node: '>= 0.4'}
@ -8876,11 +8832,6 @@ packages:
protocols: 1.4.8
dev: true
/is-stream/1.1.0:
resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==}
engines: {node: '>=0.10.0'}
dev: false
/is-stream/2.0.1:
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
engines: {node: '>=8'}
@ -8952,6 +8903,7 @@ packages:
/isarray/1.0.0:
resolution: {integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=}
dev: true
/isexe/2.0.0:
resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=}
@ -10448,7 +10400,6 @@ packages:
engines: {node: '>=10'}
dependencies:
yallist: 4.0.0
dev: true
/lru-cache/7.10.1:
resolution: {integrity: sha512-BQuhQxPuRl79J5zSXRP+uNzPOyZw2oFI9JLRQ80XswSvg21KMKNtQza9eF42rfI/3Z40RvzBdXgziEkudzjo8A==}
@ -10460,13 +10411,6 @@ packages:
hasBin: true
dev: true
/make-dir/1.3.0:
resolution: {integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==}
engines: {node: '>=4'}
dependencies:
pify: 3.0.0
dev: false
/make-dir/2.1.0:
resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==}
engines: {node: '>=6'}
@ -11197,6 +11141,7 @@ packages:
engines: {node: '>=8'}
dependencies:
yallist: 4.0.0
dev: true
/minipass/3.3.5:
resolution: {integrity: sha512-rQ/p+KfKBkeNwo04U15i+hOwoVBVmekmm/HcfTkTN2t9pbQKCMm4eN5gFeqgrrSp/kH/7BYYhTIHOxGqzbBPaA==}
@ -11730,6 +11675,7 @@ packages:
/object-assign/4.1.1:
resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=}
engines: {node: '>=0.10.0'}
dev: true
/object-hash/2.2.0:
resolution: {integrity: sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==}
@ -11918,7 +11864,7 @@ packages:
dev: true
/os-tmpdir/1.0.2:
resolution: {integrity: sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=}
resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
engines: {node: '>=0.10.0'}
/p-cancelable/2.1.1:
@ -12287,6 +12233,7 @@ packages:
/pend/1.2.0:
resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==}
dev: true
/pg-connection-string/2.5.0:
resolution: {integrity: sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==}
@ -12419,10 +12366,12 @@ packages:
/pify/2.3.0:
resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
engines: {node: '>=0.10.0'}
dev: true
/pify/3.0.0:
resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==}
engines: {node: '>=4'}
dev: true
/pify/4.0.1:
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
@ -12434,18 +12383,6 @@ packages:
engines: {node: '>=10'}
dev: true
/pinkie-promise/2.0.1:
resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==}
engines: {node: '>=0.10.0'}
dependencies:
pinkie: 2.0.4
dev: false
/pinkie/2.0.4:
resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==}
engines: {node: '>=0.10.0'}
dev: false
/pirates/4.0.4:
resolution: {integrity: sha512-ZIrVPH+A52Dw84R0L3/VS9Op04PuQ2SEoJL6bkshmiTic/HldyW9Tf7oH5mhJZBK7NmDx27vSMrYEXPXclpDKw==}
engines: {node: '>= 6'}
@ -12757,6 +12694,7 @@ packages:
/process-nextick-args/2.0.1:
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
dev: true
/process/0.11.10:
resolution: {integrity: sha1-czIwDoQBYb2j5podHZGn1LwW8YI=}
@ -13379,6 +13317,7 @@ packages:
safe-buffer: 5.1.2
string_decoder: 1.1.1
util-deprecate: 1.0.2
dev: true
/readable-stream/3.6.0:
resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==}
@ -13728,6 +13667,7 @@ packages:
/safe-buffer/5.1.2:
resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
dev: true
/safe-buffer/5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
@ -13764,13 +13704,6 @@ packages:
loose-envify: 1.4.0
dev: true
/seek-bzip/1.0.6:
resolution: {integrity: sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==}
hasBin: true
dependencies:
commander: 2.20.3
dev: false
/semver-compare/1.0.0:
resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==}
@ -13795,7 +13728,6 @@ packages:
hasBin: true
dependencies:
lru-cache: 6.0.0
dev: true
/serialize-error/7.0.1:
resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==}
@ -14348,6 +14280,7 @@ packages:
resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}
dependencies:
safe-buffer: 5.1.2
dev: true
/string_decoder/1.3.0:
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
@ -14391,12 +14324,6 @@ packages:
engines: {node: '>=8'}
dev: true
/strip-dirs/2.1.0:
resolution: {integrity: sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==}
dependencies:
is-natural-number: 4.0.1
dev: false
/strip-final-newline/2.0.0:
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
engines: {node: '>=6'}
@ -14700,19 +14627,6 @@ packages:
tar-stream: 2.2.0
dev: true
/tar-stream/1.6.2:
resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==}
engines: {node: '>= 0.8.0'}
dependencies:
bl: 1.2.3
buffer-alloc: 1.2.0
end-of-stream: 1.4.4
fs-constants: 1.0.0
readable-stream: 2.3.7
to-buffer: 1.1.1
xtend: 4.0.2
dev: false
/tar-stream/2.2.0:
resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==}
engines: {node: '>=6'}
@ -14730,7 +14644,7 @@ packages:
dependencies:
chownr: 2.0.0
fs-minipass: 2.1.0
minipass: 3.1.6
minipass: 3.3.5
minizlib: 2.1.2
mkdirp: 1.0.4
yallist: 4.0.0
@ -14828,10 +14742,6 @@ packages:
resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==}
dev: true
/to-buffer/1.1.1:
resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==}
dev: false
/to-fast-properties/2.0.0:
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
engines: {node: '>=4'}
@ -15002,7 +14912,7 @@ packages:
'@tsconfig/node14': 1.0.1
'@tsconfig/node16': 1.0.2
'@types/node': 16.11.12
acorn: 8.7.1
acorn: 8.8.0
acorn-walk: 8.2.0
arg: 4.1.3
create-require: 1.1.1
@ -15161,6 +15071,7 @@ packages:
dependencies:
buffer: 5.7.1
through: 2.3.8
dev: true
/undefsafe/2.0.5:
resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==}
@ -15506,7 +15417,7 @@ packages:
dev: true
/wcwidth/1.0.1:
resolution: {integrity: sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=}
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
defaults: 1.0.3
@ -15803,6 +15714,7 @@ packages:
dependencies:
buffer-crc32: 0.2.13
fd-slicer: 1.1.0
dev: true
/ylru/1.2.1:
resolution: {integrity: sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ==}