diff --git a/package.json b/package.json index 5ee1c09..b18c47d 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ }, "dependencies": { "@favware/colorette-spinner": "^1.0.0", - "@sapphire/result": "^1.1.1", + "@sapphire/result": "^2.0.1", "colorette": "^2.0.19", "commander": "^9.3.0", "execa": "^6.1.0", @@ -57,10 +57,10 @@ "@sapphire/prettier-config": "^1.4.3", "@sapphire/ts-config": "^3.3.4", "@types/js-yaml": "^4.0.5", - "@types/node": "^17.0.33", - "@types/prompts": "^2.0.14", - "@typescript-eslint/eslint-plugin": "^5.30.3", - "@typescript-eslint/parser": "^5.30.3", + "@types/node": "^18.0.1", + "@types/prompts": "^2.4.0", + "@typescript-eslint/eslint-plugin": "^5.30.4", + "@typescript-eslint/parser": "^5.30.4", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.19.0", "eslint-config-prettier": "^8.5.0", diff --git a/src/commands/generate.ts b/src/commands/generate.ts index 32d7025..6851cd9 100644 --- a/src/commands/generate.ts +++ b/src/commands/generate.ts @@ -2,7 +2,7 @@ import { componentsFolder } from '#constants'; import { CreateFileFromTemplate } from '#functions/CreateFileFromTemplate'; import { fileExists } from '#functions/FileExists'; import { Spinner } from '@favware/colorette-spinner'; -import { fromAsync, isErr } from '@sapphire/result'; +import { Result } from '@sapphire/result'; import { blueBright, red } from 'colorette'; import findUp from 'find-up'; import { load } from 'js-yaml'; @@ -48,7 +48,7 @@ export default async (component: string, name: string) => { const fail = (error: string, additionalExecution?: () => void) => { spinner.error({ text: error }); - if (additionalExecution) additionalExecution(); + additionalExecution?.(); process.exit(1); }; @@ -64,14 +64,17 @@ export default async (component: string, name: string) => { return fail("Can't parse the Sapphire CLI config."); } - const result = await fromAsync(async () => createComponent(component, name, config, configLoc.replace(/.sapphirerc.(json|yml)/g, ''))); + const result = await Result.fromAsync(() => + createComponent(component, name, config, configLoc.replace(/.sapphirerc.(json|yml)/g, '')) + ); - if (isErr(result)) { - return fail((result.error as Error).message, () => console.log(red((result.error as Error).message))); - } - - spinner.success(); + return result.match({ + ok: () => { + spinner.success(); - console.log(blueBright('Done!')); - process.exit(0); + console.log(blueBright('Done!')); + process.exit(0); + }, + err: (error) => fail(error.message, () => console.log(red(error.message))) + }); }; diff --git a/src/commands/new.ts b/src/commands/new.ts index 03f959c..31d5c76 100644 --- a/src/commands/new.ts +++ b/src/commands/new.ts @@ -4,7 +4,7 @@ import { CreateFileFromTemplate } from '#functions/CreateFileFromTemplate'; import { fileExists } from '#functions/FileExists'; import { PromptNew, PromptNewObjectKeys } from '#prompts/PromptNew'; import { Spinner } from '@favware/colorette-spinner'; -import { fromAsync, isErr, isOk } from '@sapphire/result'; +import { Result } from '@sapphire/result'; import { blueBright, red } from 'colorette'; import { execa } from 'execa'; import { cp, readFile, rm, writeFile } from 'node:fs/promises'; @@ -18,24 +18,18 @@ async function editPackageJson(location: string, name: string) { output.name = name; - const result = await fromAsync(() => writeFile(pjLocation, JSON.stringify(output, null, 2))); + const result = await Result.fromAsync(() => writeFile(pjLocation, JSON.stringify(output, null, 2))); - return isOk(result); + return result.isOk(); } async function installDeps(location: string, pm: string, verbose: boolean) { - const result = await fromAsync(() => - execa(pm.toLowerCase(), ['install'], { - stdio: verbose ? 'inherit' : undefined, - cwd: `./${location}/` - }) - ); - - if (isErr(result)) { - throw result.error; - } + const value = await execa(pm.toLowerCase(), ['install'], { + stdio: verbose ? 'inherit' : undefined, + cwd: `./${location}/` + }); - if (result.value.exitCode !== 0) { + if (value.exitCode !== 0) { throw new Error('An unknown error occurred while installing the dependencies. Try running Sapphire CLI with "--verbose" flag.'); } @@ -50,23 +44,16 @@ async function installDeps(location: string, pm: string, verbose: boolean) { async function configureYarnRc(location: string, name: string, value: string) { await execa('yarn', ['config', 'set', name, value], { cwd: `./${location}/` }); - return true; } async function installYarnV3(location: string, verbose: boolean) { - const result = await fromAsync(() => - execa('yarn', ['set', 'version', 'berry'], { - stdio: verbose ? 'inherit' : undefined, - cwd: `./${location}/` - }) - ); - - if (isErr(result)) { - throw result.error; - } + const value = await execa('yarn', ['set', 'version', 'berry'], { + stdio: verbose ? 'inherit' : undefined, + cwd: `./${location}/` + }); - if (result.value.exitCode !== 0) { + if (value.exitCode !== 0) { throw new Error('An unknown error occurred while installing Yarn v3. Try running Sapphire CLI with "--verbose" flag.'); } @@ -81,43 +68,34 @@ async function installYarnV3(location: string, verbose: boolean) { async function installYarnTypescriptPlugin(location: string) { await execa('yarn', ['plugin', 'import', 'typescript'], { cwd: `./${location}/` }); - return true; } async function initializeGitRepo(location: string) { await execa('git', ['init'], { cwd: `./${location}/` }); - return true; } async function runJob(job: () => Promise, name: string) { const spinner = new Spinner(name).start(); - const result = await fromAsync(async () => job()); - - if (isErr(result)) { - spinner.error({ text: red((result.error as Error).message) }); - console.error(red((result.error as Error).message)); - throw result.error; - } - - spinner.success(); - return true; + const result = await Result.fromAsync(() => job()); + return result.match({ + ok: () => { + spinner.success(); + return true; + }, + err: (error) => { + spinner.error({ text: red(error.message) }); + console.error(red(error.message)); + throw error; + } + }); } async function cloneRepo(location: string, verbose: boolean) { - const result = await fromAsync(async () => - execa('git', ['clone', repoUrl, `${location}/ghr`], { - stdio: verbose ? 'inherit' : undefined - }) - ); - - if (isErr(result)) { - throw result.error; - } - - if (result.value.exitCode !== 0) { + const value = await execa('git', ['clone', repoUrl, `${location}/ghr`], { stdio: verbose ? 'inherit' : undefined }); + if (value.exitCode !== 0) { throw new Error('An unknown error occurred while cloning the repository. Try running Sapphire CLI with "--verbose" flag.'); } diff --git a/src/functions/CommandExists.ts b/src/functions/CommandExists.ts index 5903c5d..b4fad34 100644 --- a/src/functions/CommandExists.ts +++ b/src/functions/CommandExists.ts @@ -23,17 +23,17 @@ */ import { fileExists } from '#functions/FileExists'; -import { fromAsync, isErr } from '@sapphire/result'; -import { execa } from 'execa'; +import { Result } from '@sapphire/result'; +import { execa, ExecaReturnValue } from 'execa'; import { constants } from 'node:fs'; import { access } from 'node:fs/promises'; const windows = process.platform === 'win32'; async function isExecutable(command: string): Promise { - const result = await fromAsync(() => access(command, constants.X_OK)); + const result = await Result.fromAsync(() => access(command, constants.X_OK)); - return isErr(result); + return result.isErr(); } function cleanWindowsCommand(input: string) { @@ -52,13 +52,11 @@ async function commandExistsUnix(command: string): Promise { } } - const result = await fromAsync(() => execa('which', [command])); - - if (isErr(result)) { - return false; - } - - return Boolean(result.value.stdout); + const result = await Result.fromAsync(() => execa('which', [command])); + return result.match({ + err: () => false, + ok: (value: ExecaReturnValue) => Boolean(value.stdout) + }); } const invalidWindowsCommandNameRegex = /[\x00-\x1f<>:"|?*]/; @@ -68,13 +66,11 @@ async function commandExistsWindows(command: string): Promise { return false; } - const result = await fromAsync(async () => execa('where', [cleanWindowsCommand(command)])); - - if (isErr(result)) { - return fileExists(command); - } - - return true; + const result = await Result.fromAsync(async () => execa('where', [cleanWindowsCommand(command)])); + return result.match({ + err: () => fileExists(command), + ok: () => true + }); } export async function CommandExists(command: string): Promise { diff --git a/src/functions/FileExists.ts b/src/functions/FileExists.ts index 57f30c1..247a6ca 100644 --- a/src/functions/FileExists.ts +++ b/src/functions/FileExists.ts @@ -1,8 +1,8 @@ -import { fromAsync, isOk } from '@sapphire/result'; +import { Result } from '@sapphire/result'; import { access } from 'node:fs/promises'; export async function fileExists(filePath: string): Promise { - const result = await fromAsync(() => access(filePath)); + const result = await Result.fromAsync(() => access(filePath)); - return isOk(result); + return result.isOk(); } diff --git a/yarn.lock b/yarn.lock index a9d2c30..7712745 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,29 +6,29 @@ __metadata: cacheKey: 8 "@babel/code-frame@npm:^7.0.0": - version: 7.16.7 - resolution: "@babel/code-frame@npm:7.16.7" + version: 7.18.6 + resolution: "@babel/code-frame@npm:7.18.6" dependencies: - "@babel/highlight": ^7.16.7 - checksum: db2f7faa31bc2c9cf63197b481b30ea57147a5fc1a6fab60e5d6c02cdfbf6de8e17b5121f99917b3dabb5eeb572da078312e70697415940383efc140d4e0808b + "@babel/highlight": ^7.18.6 + checksum: 195e2be3172d7684bf95cff69ae3b7a15a9841ea9d27d3c843662d50cdd7d6470fd9c8e64be84d031117e4a4083486effba39f9aef6bbb2c89f7f21bcfba33ba languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/helper-validator-identifier@npm:7.16.7" - checksum: dbb3db9d184343152520a209b5684f5e0ed416109cde82b428ca9c759c29b10c7450657785a8b5c5256aa74acc6da491c1f0cf6b784939f7931ef82982051b69 +"@babel/helper-validator-identifier@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-validator-identifier@npm:7.18.6" + checksum: e295254d616bbe26e48c196a198476ab4d42a73b90478c9842536cf910ead887f5af6b5c4df544d3052a25ccb3614866fa808dc1e3a5a4291acd444e243c0648 languageName: node linkType: hard -"@babel/highlight@npm:^7.16.7": - version: 7.17.12 - resolution: "@babel/highlight@npm:7.17.12" +"@babel/highlight@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/highlight@npm:7.18.6" dependencies: - "@babel/helper-validator-identifier": ^7.16.7 + "@babel/helper-validator-identifier": ^7.18.6 chalk: ^2.0.0 js-tokens: ^4.0.0 - checksum: 841a11aa353113bcce662b47085085a379251bf8b09054e37e1e082da1bf0d59355a556192a6b5e9ee98e8ee6f1f2831ac42510633c5e7043e3744dda2d6b9d6 + checksum: 92d8ee61549de5ff5120e945e774728e5ccd57fd3b2ed6eace020ec744823d4a98e242be1453d21764a30a14769ecd62170fba28539b211799bbaf232bbb2789 languageName: node linkType: hard @@ -61,16 +61,6 @@ __metadata: languageName: node linkType: hard -"@commitlint/config-validator@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/config-validator@npm:17.0.0" - dependencies: - "@commitlint/types": ^17.0.0 - ajv: ^6.12.6 - checksum: 3130f5b57eff3f2b0fb0044a292f63ed37f501bb6764ba7a85e53125c6962b5914332397ce0f8bb8f0a0ede479e109c8cfa4aabd4ed5983af5eccf09aa5661d1 - languageName: node - linkType: hard - "@commitlint/config-validator@npm:^17.0.3": version: 17.0.3 resolution: "@commitlint/config-validator@npm:17.0.3" @@ -130,26 +120,7 @@ __metadata: languageName: node linkType: hard -"@commitlint/load@npm:>6.1.1": - version: 17.0.0 - resolution: "@commitlint/load@npm:17.0.0" - dependencies: - "@commitlint/config-validator": ^17.0.0 - "@commitlint/execute-rule": ^17.0.0 - "@commitlint/resolve-extends": ^17.0.0 - "@commitlint/types": ^17.0.0 - "@types/node": ">=12" - chalk: ^4.1.0 - cosmiconfig: ^7.0.0 - cosmiconfig-typescript-loader: ^2.0.0 - lodash: ^4.17.19 - resolve-from: ^5.0.0 - typescript: ^4.6.4 - checksum: c35f7c5d7a8e2812a62b2d10f304c4b4ab8754923b0e59c66f3d9ce5ff3ea84502539c905b82fafbe666b02db5e7d818c119764af5d46485532a8bb73dba0661 - languageName: node - linkType: hard - -"@commitlint/load@npm:^17.0.3": +"@commitlint/load@npm:>6.1.1, @commitlint/load@npm:^17.0.3": version: 17.0.3 resolution: "@commitlint/load@npm:17.0.3" dependencies: @@ -198,20 +169,6 @@ __metadata: languageName: node linkType: hard -"@commitlint/resolve-extends@npm:^17.0.0": - version: 17.0.0 - resolution: "@commitlint/resolve-extends@npm:17.0.0" - dependencies: - "@commitlint/config-validator": ^17.0.0 - "@commitlint/types": ^17.0.0 - import-fresh: ^3.0.0 - lodash: ^4.17.19 - resolve-from: ^5.0.0 - resolve-global: ^1.0.0 - checksum: 5ebf45caf2062f7a5410bef50b5e2ee9cabab56c8390790140ad8150d434410a1061ad9f585447c2f4171903bcf7d63bc2064c0330787ea0be5284ef8ecb4728 - languageName: node - linkType: hard - "@commitlint/resolve-extends@npm:^17.0.3": version: 17.0.3 resolution: "@commitlint/resolve-extends@npm:17.0.3" @@ -364,16 +321,16 @@ __metadata: linkType: hard "@jridgewell/resolve-uri@npm:^3.0.3": - version: 3.0.7 - resolution: "@jridgewell/resolve-uri@npm:3.0.7" - checksum: 94f454f4cef8f0acaad85745fd3ca6cd0d62ef731cf9f952ecb89b8b2ce5e20998cd52be31311cedc5fa5b28b1708a15f3ad9df0fe1447ee4f42959b036c4b5b + version: 3.0.8 + resolution: "@jridgewell/resolve-uri@npm:3.0.8" + checksum: 28d739f49b4a52a95843b15669dcb2daaab48f0eaef8f457b9aacd0bdebeb60468d0684f73244f613b786e9d871c25abdbe6f55991bba36814cdadc399dbb3a8 languageName: node linkType: hard "@jridgewell/sourcemap-codec@npm:^1.4.10": - version: 1.4.13 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.13" - checksum: f14449096f60a5f921262322fef65ce0bbbfb778080b3b20212080bcefdeba621c43a58c27065bd536ecb4cc767b18eb9c45f15b6b98a4970139572b60603a1c + version: 1.4.14 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" + checksum: 61100637b6d173d3ba786a5dff019e1a74b1f394f323c1fee337ff390239f053b87266c7a948777f4b1ee68c01a8ad0ab61e5ff4abb5a012a0b091bec391ab97 languageName: node linkType: hard @@ -445,13 +402,13 @@ __metadata: "@favware/npm-deprecate": ^1.0.4 "@sapphire/eslint-config": ^4.3.7 "@sapphire/prettier-config": ^1.4.3 - "@sapphire/result": ^1.1.1 + "@sapphire/result": ^2.0.1 "@sapphire/ts-config": ^3.3.4 "@types/js-yaml": ^4.0.5 - "@types/node": ^17.0.33 - "@types/prompts": ^2.0.14 - "@typescript-eslint/eslint-plugin": ^5.30.3 - "@typescript-eslint/parser": ^5.30.3 + "@types/node": ^18.0.1 + "@types/prompts": ^2.4.0 + "@typescript-eslint/eslint-plugin": ^5.30.4 + "@typescript-eslint/parser": ^5.30.4 colorette: ^2.0.19 commander: ^9.3.0 cz-conventional-changelog: ^3.3.0 @@ -509,13 +466,6 @@ __metadata: languageName: node linkType: hard -"@sapphire/result@npm:^1.1.1": - version: 1.1.1 - resolution: "@sapphire/result@npm:1.1.1" - checksum: ccb3fcd051523f439c5f9871a251273e10ffeebcb5d6817c1c7efb24b60d8866fd5a781e0c77fe15a66a2dd5c5831b00258e70c76b6a82bb43bb150e10598767 - languageName: node - linkType: hard - "@sapphire/result@npm:^2.0.0": version: 2.0.0 resolution: "@sapphire/result@npm:2.0.0" @@ -523,6 +473,13 @@ __metadata: languageName: node linkType: hard +"@sapphire/result@npm:^2.0.1": + version: 2.0.1 + resolution: "@sapphire/result@npm:2.0.1" + checksum: 878790efbd4a3127513f6ddb1ffdf287503a88595915a22550ac3583e4dde229dd0d7d49612d397a49f12a0c2323afc43ab54ceb818d969f8d0571d71336287a + languageName: node + linkType: hard + "@sapphire/ts-config@npm:^3.3.4": version: 3.3.4 resolution: "@sapphire/ts-config@npm:3.3.4" @@ -534,9 +491,9 @@ __metadata: linkType: hard "@sapphire/utilities@npm:^3.0.1, @sapphire/utilities@npm:^3.6.2": - version: 3.6.2 - resolution: "@sapphire/utilities@npm:3.6.2" - checksum: 71210753b446f3f2835dd9d28fb10767f4c6f005b465eea179082d9f2c071acb7dcd2aebdf7c4974b26aad3ab2374a1dd168a66371b06bd65f248bbca4a90cda + version: 3.7.0 + resolution: "@sapphire/utilities@npm:3.7.0" + checksum: 3b574586242f015859e913123a5311774ad2d6cb79241c2a3d447a585282bdb04cddcd8e086f757a8ae5d2c49f4a25b4f848d63cebe605c7641364b51c3cfa11 languageName: node linkType: hard @@ -603,17 +560,10 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:>=12": - version: 18.0.0 - resolution: "@types/node@npm:18.0.0" - checksum: aab2b325727a2599f6d25ebe0dedf58c40fb66a51ce4ca9c0226ceb70fcda2d3afccdca29db5942eb48b158ee8585a274a1e3750c718bbd5399d7f41d62dfdcc - languageName: node - linkType: hard - -"@types/node@npm:^17.0.33": - version: 17.0.45 - resolution: "@types/node@npm:17.0.45" - checksum: aa04366b9103b7d6cfd6b2ef64182e0eaa7d4462c3f817618486ea0422984c51fc69fd0d436eae6c9e696ddfdbec9ccaa27a917f7c2e8c75c5d57827fe3d95e8 +"@types/node@npm:>=12, @types/node@npm:^18.0.1": + version: 18.0.1 + resolution: "@types/node@npm:18.0.1" + checksum: be14b251c54cc2b4ca78ac6eadf2fe5e831e487f2e17848f21d576295945b538271dcc674d0bba582b3f8d95b84f6826e99b6ba4710c76f165a8bdd4d4f0618e languageName: node linkType: hard @@ -631,43 +581,20 @@ __metadata: languageName: node linkType: hard -"@types/prompts@npm:^2.0.14": +"@types/prompts@npm:^2.4.0": version: 2.4.0 resolution: "@types/prompts@npm:2.4.0" checksum: ec75655f07fbc3cb2df60a3e3bdd13bfda0554a16f5541285c4b1cc0610756838a2863dccfc911cbb1385492054c07210512164e3dbef272ec638d631783b278 languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^5.28.0": - version: 5.28.0 - resolution: "@typescript-eslint/eslint-plugin@npm:5.28.0" - dependencies: - "@typescript-eslint/scope-manager": 5.28.0 - "@typescript-eslint/type-utils": 5.28.0 - "@typescript-eslint/utils": 5.28.0 - debug: ^4.3.4 - functional-red-black-tree: ^1.0.1 - ignore: ^5.2.0 - regexpp: ^3.2.0 - semver: ^7.3.7 - tsutils: ^3.21.0 - peerDependencies: - "@typescript-eslint/parser": ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 49e08865abd35acdc44829b929f2cd01d01a1f91d3c3c357963b6980e938de365f178efcec21e0ed6ec13a2ad9373f52b73001ddd5cdc7b0245fcf02b9564dd3 - languageName: node - linkType: hard - -"@typescript-eslint/eslint-plugin@npm:^5.30.3": - version: 5.30.3 - resolution: "@typescript-eslint/eslint-plugin@npm:5.30.3" +"@typescript-eslint/eslint-plugin@npm:^5.28.0, @typescript-eslint/eslint-plugin@npm:^5.30.4": + version: 5.30.4 + resolution: "@typescript-eslint/eslint-plugin@npm:5.30.4" dependencies: - "@typescript-eslint/scope-manager": 5.30.3 - "@typescript-eslint/type-utils": 5.30.3 - "@typescript-eslint/utils": 5.30.3 + "@typescript-eslint/scope-manager": 5.30.4 + "@typescript-eslint/type-utils": 5.30.4 + "@typescript-eslint/utils": 5.30.4 debug: ^4.3.4 functional-red-black-tree: ^1.0.1 ignore: ^5.2.0 @@ -680,69 +607,42 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 74533498eb570a5976f15119019f4d16d98f460a1309a8dcb7839f2590b2014d85bf740e29f6f21f24dde50a669a95c9361388546c9116d0eb90c8fd21ac888e - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^5.28.0": - version: 5.28.0 - resolution: "@typescript-eslint/parser@npm:5.28.0" - dependencies: - "@typescript-eslint/scope-manager": 5.28.0 - "@typescript-eslint/types": 5.28.0 - "@typescript-eslint/typescript-estree": 5.28.0 - debug: ^4.3.4 - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: cb18ff47b0a10373ba1c05c90901d08f5f99180e624f3f2faa85f13d1048fc59601a3cab6b852f72d13287b314d94c4d4997129ff6c639496a9144c762f6d31e + checksum: 9b9290448b3009b93dc9bbc263049103f48c006d395351695486f7ab156f24b3f3e9e83a9f68a8cf73afc036c2d1092005446085f171afc9cdcb0b1b475443e3 languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.30.3": - version: 5.30.3 - resolution: "@typescript-eslint/parser@npm:5.30.3" +"@typescript-eslint/parser@npm:^5.28.0, @typescript-eslint/parser@npm:^5.30.4": + version: 5.30.4 + resolution: "@typescript-eslint/parser@npm:5.30.4" dependencies: - "@typescript-eslint/scope-manager": 5.30.3 - "@typescript-eslint/types": 5.30.3 - "@typescript-eslint/typescript-estree": 5.30.3 + "@typescript-eslint/scope-manager": 5.30.4 + "@typescript-eslint/types": 5.30.4 + "@typescript-eslint/typescript-estree": 5.30.4 debug: ^4.3.4 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: d1bd40b0e97ea22fcb4c921e02dd02cfcbcf740261bfb6984fdbebf27b668e4abf0e0bf2135363f1bf7541d88f5d65206ce7e3dc30d385f03721177b61a2f5e1 + checksum: e13ffd0cbb691b5b82038a5a1475a7771409398bc90e0430e9b3818174926c5af7c637d5915f7c2949f38201c04bfe57dfc91f4d9052a48ee551faba3b8c7349 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.28.0": - version: 5.28.0 - resolution: "@typescript-eslint/scope-manager@npm:5.28.0" +"@typescript-eslint/scope-manager@npm:5.30.4": + version: 5.30.4 + resolution: "@typescript-eslint/scope-manager@npm:5.30.4" dependencies: - "@typescript-eslint/types": 5.28.0 - "@typescript-eslint/visitor-keys": 5.28.0 - checksum: f187fd295d152508aa85233ef3ac89031952300fbbe277e188dfba3fbfd82656b15d3d8daa6d85984970ce00a30fdf75da912c4024df982004b24f3a95420b8f + "@typescript-eslint/types": 5.30.4 + "@typescript-eslint/visitor-keys": 5.30.4 + checksum: 3da442dc113ee821c6b1c4510ee4cfd6f6f34838587785b7c486d262af913dca66229a47ebb9a63ad605f8edbe57a8387be24c817c8091783b57c33b7862cbcc languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.30.3": - version: 5.30.3 - resolution: "@typescript-eslint/scope-manager@npm:5.30.3" +"@typescript-eslint/type-utils@npm:5.30.4": + version: 5.30.4 + resolution: "@typescript-eslint/type-utils@npm:5.30.4" dependencies: - "@typescript-eslint/types": 5.30.3 - "@typescript-eslint/visitor-keys": 5.30.3 - checksum: d2b6673cdcaa46fa8893482e8edaae8362d1e9fec814b79db6f256373cee365e90a4dbab98bc71d29194e29162434b8dd3bdec1a865f9dedf9a9b1e23b96fe9c - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:5.28.0": - version: 5.28.0 - resolution: "@typescript-eslint/type-utils@npm:5.28.0" - dependencies: - "@typescript-eslint/utils": 5.28.0 + "@typescript-eslint/utils": 5.30.4 debug: ^4.3.4 tsutils: ^3.21.0 peerDependencies: @@ -750,46 +650,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 05563dab5414a42b7781f5ce65ee540b10a946c419bde3fbc45593aa3b1225b2a70558581f311720d670dc82ab699a3f9ecb4b1447d6fd557bd330cf8890d8ca + checksum: 552eb1a5b11787d3b98dc454a80153b05bcb6d58aeb97c861d6b006f3eb6af95d117a3f9a679b41a8b6d58ac0dceaaeafd23ce28d83881a363e51bbc1a088936 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.30.3": - version: 5.30.3 - resolution: "@typescript-eslint/type-utils@npm:5.30.3" - dependencies: - "@typescript-eslint/utils": 5.30.3 - debug: ^4.3.4 - tsutils: ^3.21.0 - peerDependencies: - eslint: "*" - peerDependenciesMeta: - typescript: - optional: true - checksum: 5d81ca9986a219373abeab08af086ac80f0d8d9c0ee758adba720a2d414b06e1a0923477dc02c130d77f8104431bfcbddfac6a84998d94a93a49e1f2cb6e8ad6 +"@typescript-eslint/types@npm:5.30.4": + version: 5.30.4 + resolution: "@typescript-eslint/types@npm:5.30.4" + checksum: 06181c33551850492ccfd48232f93083c6cf9205d26b26fe6e356b7a4ebb08beffd89ae3b84011da94ffd0e6948422d91d94df7005edeca1c8348117d4776715 languageName: node linkType: hard -"@typescript-eslint/types@npm:5.28.0": - version: 5.28.0 - resolution: "@typescript-eslint/types@npm:5.28.0" - checksum: e948915d6f24ece98043763a48e34ced5e16a1aa88cc86ea7d9057010ed92ce39457a753dd7a140be52f9b546b27f8a3b33bdc7d671427a386aa1aa381d908ef - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:5.30.3": - version: 5.30.3 - resolution: "@typescript-eslint/types@npm:5.30.3" - checksum: 6b095321c7d7592234c1a4c08fc214b32c4b7b2e0cd954dba06e971b8d7361ae21dd1f4eab0f317eee457a0890b6442bfc676b3e8a8a82a66a0b25aa0c8c01b1 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:5.28.0": - version: 5.28.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.28.0" +"@typescript-eslint/typescript-estree@npm:5.30.4": + version: 5.30.4 + resolution: "@typescript-eslint/typescript-estree@npm:5.30.4" dependencies: - "@typescript-eslint/types": 5.28.0 - "@typescript-eslint/visitor-keys": 5.28.0 + "@typescript-eslint/types": 5.30.4 + "@typescript-eslint/visitor-keys": 5.30.4 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 @@ -798,77 +675,33 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: e7be6e9ff778ab2728bdc545713f29cd40bbe1282662461453fe46bc18f676f9b33c60e3514347fbc4e5e94d764525c20b8ef3d47baa62fec6bd3ce05fdde6eb + checksum: 1aaa414993a4e35927e93f929d34a6e07cb8ec46c4ea9a58f018c36ff1fc3027ca5007e6abe922c5869557cd2d7f319e8c57cccd618517781979e669d3b704d0 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.30.3": - version: 5.30.3 - resolution: "@typescript-eslint/typescript-estree@npm:5.30.3" - dependencies: - "@typescript-eslint/types": 5.30.3 - "@typescript-eslint/visitor-keys": 5.30.3 - debug: ^4.3.4 - globby: ^11.1.0 - is-glob: ^4.0.3 - semver: ^7.3.7 - tsutils: ^3.21.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 2a83143cf79cbb6a471ddba71914df5728f00378188a052e2c9bf0275b79bccecd0a244699e15f8ab06eab67fc7274409ab561bb873ff8c3c21328f28327a62e - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:5.28.0": - version: 5.28.0 - resolution: "@typescript-eslint/utils@npm:5.28.0" +"@typescript-eslint/utils@npm:5.30.4": + version: 5.30.4 + resolution: "@typescript-eslint/utils@npm:5.30.4" dependencies: "@types/json-schema": ^7.0.9 - "@typescript-eslint/scope-manager": 5.28.0 - "@typescript-eslint/types": 5.28.0 - "@typescript-eslint/typescript-estree": 5.28.0 + "@typescript-eslint/scope-manager": 5.30.4 + "@typescript-eslint/types": 5.30.4 + "@typescript-eslint/typescript-estree": 5.30.4 eslint-scope: ^5.1.1 eslint-utils: ^3.0.0 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: d30958552470c3f46b2183b690fa8c922a375a84ef83ccfda4785148b8dafb7bf428ab01de6608f67cefbcae35c6a2b0c54b5a6a89bba31566ec3b41f098c02e + checksum: 0f680d366701c6ca5a4e1fc53247876e6f6acaee498400d32a7cb767e6187d0d75bc4488350cf6dc6e7c373ea023d62e395ea14ba56ad246b458d6853b213782 languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.30.3": - version: 5.30.3 - resolution: "@typescript-eslint/utils@npm:5.30.3" +"@typescript-eslint/visitor-keys@npm:5.30.4": + version: 5.30.4 + resolution: "@typescript-eslint/visitor-keys@npm:5.30.4" dependencies: - "@types/json-schema": ^7.0.9 - "@typescript-eslint/scope-manager": 5.30.3 - "@typescript-eslint/types": 5.30.3 - "@typescript-eslint/typescript-estree": 5.30.3 - eslint-scope: ^5.1.1 - eslint-utils: ^3.0.0 - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: cfc080878c7c209aecdc0dc6799825b4ddf1dce240004ab79abce93a156e6ff41d7dda51329a76a3ecdcb066d34d3f366ca07702b67f148ee8808a125bfb43e3 - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:5.28.0": - version: 5.28.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.28.0" - dependencies: - "@typescript-eslint/types": 5.28.0 + "@typescript-eslint/types": 5.30.4 eslint-visitor-keys: ^3.3.0 - checksum: e97251968ea273ce33fa0de8a9c04426499b797f6f7800379ff880c4be6e6e02fe023038be0092c595be394a8636f73ee8911974214d5232b3d59492a50771bf - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:5.30.3": - version: 5.30.3 - resolution: "@typescript-eslint/visitor-keys@npm:5.30.3" - dependencies: - "@typescript-eslint/types": 5.30.3 - eslint-visitor-keys: ^3.3.0 - checksum: d0947247fcff6f405235d6e825e5f864e551b3603e504418f33e931a72e6da49592767e3bbfa37fa6d9caf1a2f7aac6565978a0da43e71dceea6406550ae1d9d + checksum: ec39680a89b058e8350adc084c2a957e83161e87ac9732c9fef8fd3045ce5004e059b2ddb0c366192806e3998bf3263c8bbb2cc74a4f2ad3313154ed35dd479a languageName: node linkType: hard @@ -939,7 +772,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.4, ajv@npm:^6.12.6": +"ajv@npm:^6.10.0, ajv@npm:^6.12.4": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -1461,16 +1294,16 @@ __metadata: linkType: hard "cosmiconfig-typescript-loader@npm:^2.0.0": - version: 2.0.1 - resolution: "cosmiconfig-typescript-loader@npm:2.0.1" + version: 2.0.2 + resolution: "cosmiconfig-typescript-loader@npm:2.0.2" dependencies: cosmiconfig: ^7 - ts-node: ^10.8.0 + ts-node: ^10.8.1 peerDependencies: "@types/node": "*" cosmiconfig: ">=7" typescript: ">=3" - checksum: 8412f91c0c00150ffab8a4a1bf797cc5dc417b8b99c48d445daa11608722d87456aec5052b52c38d990868cdbb763708a272fd377f6f5c51e70d414bd69fafee + checksum: 0c9a777e2e3ff7594d753e5781e8c3817ce5ba493a4e69cfde698a8e231b438695248dcc62a16c661f93ada7f762ac6e24457889439c94f58c094a24aecbd982 languageName: node linkType: hard @@ -1742,22 +1575,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:^4.0.0": - version: 4.0.0 - resolution: "eslint-plugin-prettier@npm:4.0.0" - dependencies: - prettier-linter-helpers: ^1.0.0 - peerDependencies: - eslint: ">=7.28.0" - prettier: ">=2.0.0" - peerDependenciesMeta: - eslint-config-prettier: - optional: true - checksum: 03d69177a3c21fa2229c7e427ce604429f0b20ab7f411e2e824912f572a207c7f5a41fd1f0a95b9b8afe121e291c1b1f1dc1d44c7aad4b0837487f9c19f5210d - languageName: node - linkType: hard - -"eslint-plugin-prettier@npm:^4.2.1": +"eslint-plugin-prettier@npm:^4.0.0, eslint-plugin-prettier@npm:^4.2.1": version: 4.2.1 resolution: "eslint-plugin-prettier@npm:4.2.1" dependencies: @@ -1817,52 +1635,7 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^8.17.0": - version: 8.18.0 - resolution: "eslint@npm:8.18.0" - dependencies: - "@eslint/eslintrc": ^1.3.0 - "@humanwhocodes/config-array": ^0.9.2 - ajv: ^6.10.0 - chalk: ^4.0.0 - cross-spawn: ^7.0.2 - debug: ^4.3.2 - doctrine: ^3.0.0 - escape-string-regexp: ^4.0.0 - eslint-scope: ^7.1.1 - eslint-utils: ^3.0.0 - eslint-visitor-keys: ^3.3.0 - espree: ^9.3.2 - esquery: ^1.4.0 - esutils: ^2.0.2 - fast-deep-equal: ^3.1.3 - file-entry-cache: ^6.0.1 - functional-red-black-tree: ^1.0.1 - glob-parent: ^6.0.1 - globals: ^13.15.0 - ignore: ^5.2.0 - import-fresh: ^3.0.0 - imurmurhash: ^0.1.4 - is-glob: ^4.0.0 - js-yaml: ^4.1.0 - json-stable-stringify-without-jsonify: ^1.0.1 - levn: ^0.4.1 - lodash.merge: ^4.6.2 - minimatch: ^3.1.2 - natural-compare: ^1.4.0 - optionator: ^0.9.1 - regexpp: ^3.2.0 - strip-ansi: ^6.0.1 - strip-json-comments: ^3.1.0 - text-table: ^0.2.0 - v8-compile-cache: ^2.0.3 - bin: - eslint: bin/eslint.js - checksum: d9b4b7488a9cee97608343cbb5ac652d3f316436f95ef0800cd9497c1c6f877b655a3275817989c02f1ff0d5dfd1959c5092af9251c7e3fcf60659da37752a10 - languageName: node - linkType: hard - -"eslint@npm:^8.19.0": +"eslint@npm:^8.17.0, eslint@npm:^8.19.0": version: 8.19.0 resolution: "eslint@npm:8.19.0" dependencies: @@ -2165,9 +1938,9 @@ __metadata: linkType: hard "flatted@npm:^3.1.0": - version: 3.2.5 - resolution: "flatted@npm:3.2.5" - checksum: 3c436e9695ccca29620b4be5671dd72e5dd0a7500e0856611b7ca9bd8169f177f408c3b9abfa78dfe1493ee2d873e2c119080a8a9bee4e1a186a9e60ca6c89f1 + version: 3.2.6 + resolution: "flatted@npm:3.2.6" + checksum: 33b87aa88dfa40ca6ee31d7df61712bbbad3d3c05c132c23e59b9b61d34631b337a18ff2b8dc5553acdc871ec72b741e485f78969cf006124a3f57174de29a0e languageName: node linkType: hard @@ -3196,11 +2969,11 @@ __metadata: linkType: hard "minipass@npm:^3.0.0, minipass@npm:^3.1.0, minipass@npm:^3.1.1, minipass@npm:^3.1.3": - version: 3.2.1 - resolution: "minipass@npm:3.2.1" + version: 3.3.4 + resolution: "minipass@npm:3.3.4" dependencies: yallist: ^4.0.0 - checksum: 3a33b74784dda2299d7d16b847247848e8d2f99f026ba4df22321ea09fcf6bacea7fff027046375e9aff60941bc4ddf3e7ca993a50e2f2f8d90cb32bbfa952e0 + checksum: 5d95a7738c54852ba78d484141e850c792e062666a2d0c681a5ac1021275beb7e1acb077e59f9523ff1defb80901aea4e30fac10ded9a20a25d819a42916ef1b languageName: node linkType: hard @@ -4330,45 +4103,7 @@ __metadata: languageName: node linkType: hard -"ts-node@npm:^10.8.0": - version: 10.8.1 - resolution: "ts-node@npm:10.8.1" - dependencies: - "@cspotcode/source-map-support": ^0.8.0 - "@tsconfig/node10": ^1.0.7 - "@tsconfig/node12": ^1.0.7 - "@tsconfig/node14": ^1.0.0 - "@tsconfig/node16": ^1.0.2 - acorn: ^8.4.1 - acorn-walk: ^8.1.1 - arg: ^4.1.0 - create-require: ^1.1.0 - diff: ^4.0.1 - make-error: ^1.1.1 - v8-compile-cache-lib: ^3.0.1 - yn: 3.1.1 - peerDependencies: - "@swc/core": ">=1.2.50" - "@swc/wasm": ">=1.2.50" - "@types/node": "*" - typescript: ">=2.7" - peerDependenciesMeta: - "@swc/core": - optional: true - "@swc/wasm": - optional: true - bin: - ts-node: dist/bin.js - ts-node-cwd: dist/bin-cwd.js - ts-node-esm: dist/bin-esm.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: 7d1aa7aa3ae1c0459c4922ed0dbfbade442cfe0c25aebaf620cdf1774f112c8d7a9b14934cb6719274917f35b2c503ba87bcaf5e16a0d39ba0f68ce3e7728363 - languageName: node - linkType: hard - -"ts-node@npm:^10.8.2": +"ts-node@npm:^10.8.1, ts-node@npm:^10.8.2": version: 10.8.2 resolution: "ts-node@npm:10.8.2" dependencies: